You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
79 lines
2.9 KiB
Tcl
79 lines
2.9 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
|
|
name liblinear
|
|
version 2.47
|
|
revision 0
|
|
categories math
|
|
maintainers nomaintainer
|
|
|
|
description A simple package for solving large-scale regularized linear classification.
|
|
|
|
long_description LIBLINEAR is a simple package for solving large-scale regularized \
|
|
linear classification. It currently supports L2-regularized logistic \
|
|
regression/L2-loss support vector classification/L1-loss support vector \
|
|
classification, and L1-regularized L2-loss support vector classification/ \
|
|
logistic regression.
|
|
|
|
homepage https://www.csie.ntu.edu.tw/~cjlin/liblinear/
|
|
license BSD
|
|
|
|
master_sites ${homepage}
|
|
distname ${name}-${version}
|
|
checksums rmd160 687ef9dd3344d24adb385b25f81e0fabd37f8ca7 \
|
|
sha256 99ce98ca3ce7cfb31f2544c42f23ba5bc6c226e536f95d6cd21fe012f94c65e0 \
|
|
size 569095
|
|
|
|
set py_ver 3.11
|
|
set py_ver_nodot [string map {. {}} ${py_ver}]
|
|
depends_build-append \
|
|
port:python${py_ver_nodot}
|
|
|
|
patchfiles patch-Makefile.diff
|
|
|
|
use_configure no
|
|
|
|
variant universal {}
|
|
|
|
build.target all
|
|
build.args CC="${configure.cc} ${configure.cflags} [get_canonical_archflags]" \
|
|
CXX="${configure.cxx} ${configure.cxxflags} [get_canonical_archflags cxx]" \
|
|
PREFIX=${prefix}
|
|
|
|
destroot {
|
|
xinstall -m 755 -W ${worksrcpath} train predict ${destroot}${prefix}/bin
|
|
xinstall -m 644 -W ${worksrcpath} liblinear.dylib ${destroot}${prefix}/lib
|
|
xinstall -m 644 -W ${worksrcpath} linear.h newton.h ${destroot}${prefix}/include
|
|
|
|
# Copy additional documents.
|
|
set dest_doc ${destroot}${prefix}/share/doc/${name}
|
|
xinstall -m 755 -d ${dest_doc}
|
|
xinstall -m 644 -W ${worksrcpath} COPYRIGHT README ${dest_doc}
|
|
|
|
# Copy sample data.
|
|
set dest_ex ${destroot}${prefix}/share/examples/${name}
|
|
xinstall -m 755 -d ${dest_ex}
|
|
xinstall -m 644 -W ${worksrcpath} heart_scale ${dest_ex}
|
|
|
|
# Copy python scripts.
|
|
set dest_py ${dest_ex}/python
|
|
xinstall -m 755 -d ${dest_py}
|
|
xinstall -m 644 -W ${worksrcpath}/python README ${dest_py}
|
|
xinstall -m 644 -W ${worksrcpath}/python/${name} \
|
|
liblinear.py liblinearutil.py ${dest_py}
|
|
}
|
|
|
|
post-destroot { install_py ${py_ver} }
|
|
|
|
proc install_py {branch} {
|
|
global frameworks_dir destroot worksrcpath
|
|
set py_prefix ${frameworks_dir}/Python.framework/Versions/${branch}
|
|
set dir ${destroot}${py_prefix}/lib/python${branch}/site-packages
|
|
xinstall -m 755 -d ${dir}
|
|
xinstall -m 644 -W ${worksrcpath}/python/liblinear liblinear.py liblinearutil.py ${dir}
|
|
}
|
|
|
|
livecheck.type regex
|
|
livecheck.regex {Version *([0-9.]+) *}
|