source: trunk/dports/math/liblinear/Portfile

Last change on this file was 145011, checked in by khindenburg@…, 20 months ago

liblinear: remove legacy variants

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 145011 2016-01-23 20:17:44Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                liblinear
7version             2.01
8categories          math
9maintainers         hum openmaintainer
10
11description         A simple package for solving large-scale regularized linear classification.
12
13long_description    LIBLINEAR is a simple package for solving large-scale regularized \
14                    linear classification. It currently supports L2-regularized logistic \
15                    regression/L2-loss support vector classification/L1-loss support vector \
16                    classification, and L1-regularized L2-loss support vector classification/ \
17                    logistic regression.
18
19homepage            http://www.csie.ntu.edu.tw/~cjlin/liblinear/
20platforms           darwin
21license             BSD
22
23master_sites        ${homepage}
24checksums           rmd160  35a5dc7179a0d5198609ae9c478d848816b27928 \
25                    sha256  ebc71999224f5779574b11e248f1e2ef647b5d839c0380c1c5a4ac8789aa95a9
26
27patchfiles          patch-Makefile.diff
28
29use_configure       no
30
31variant universal {}
32
33build.target        all
34build.args          CC="${configure.cc}   ${configure.cflags}   [get_canonical_archflags]" \
35                    CXX="${configure.cxx} ${configure.cxxflags} [get_canonical_archflags cxx]" \
36                    PREFIX=${prefix}
37
38destroot {
39    xinstall -m 755 -W ${worksrcpath} train predict ${destroot}${prefix}/bin
40    xinstall -m 644 -W ${worksrcpath} liblinear.dylib ${destroot}${prefix}/lib
41    xinstall -m 644 -W ${worksrcpath} linear.h tron.h ${destroot}${prefix}/include
42
43    # Copy additional documents.
44    set dest_doc ${destroot}${prefix}/share/doc/${name}
45    xinstall -m 755 -d ${dest_doc}
46    xinstall -m 644 -W ${worksrcpath} COPYRIGHT README ${dest_doc}
47
48    # Copy sample data.
49    set dest_ex ${destroot}${prefix}/share/examples/${name}
50    xinstall -m 755 -d ${dest_ex}
51    xinstall -m 644 -W ${worksrcpath} heart_scale ${dest_ex}
52
53    # Copy python scripts.
54    set dest_py ${dest_ex}/python
55    xinstall -m 755 -d ${dest_py}
56    xinstall -m 644 -W ${worksrcpath}/python \
57        README liblinear.py liblinearutil.py \
58        ${dest_py}
59}
60
61# TODO: Remove after 2016-05-14.
62variant python26 requires python27 description {Legacy variant} {}
63variant python33 requires python34 description {Legacy variant} {}
64
65variant python27 description {Install Python 2.7 interface} {
66    depends_lib-append  port:python27
67    post-destroot { install_py 2.7 }
68}
69
70variant python34 description {Install Python 3.4 interface} {
71    depends_lib-append  port:python34
72    post-destroot { install_py 3.4 }
73}
74
75proc install_py {branch} {
76    global frameworks_dir destroot worksrcpath
77    set py_prefix  ${frameworks_dir}/Python.framework/Versions/${branch}
78    set dir        ${destroot}${py_prefix}/lib/python${branch}/site-packages
79    xinstall -m 755 -d ${dir}
80    xinstall -m 644 -W ${worksrcpath}/python liblinear.py liblinearutil.py ${dir}
81}           
82
83if {![variant_isset python27] && ![variant_isset python34]} {
84    default_variants +python27
85}
86
87livecheck.type          regex
88livecheck.regex         {Version *([0-9.]+) *}
Note: See TracBrowser for help on using the repository browser.