diff options
| author | Yuri Victorovich <yuri@FreeBSD.org> | 2019-12-14 22:12:32 +0000 |
|---|---|---|
| committer | Yuri Victorovich <yuri@FreeBSD.org> | 2019-12-14 22:12:32 +0000 |
| commit | 65f46a60aa05ef3738ab89798fe51ec22f1da2c6 (patch) | |
| tree | df078943f3c1eabfa00f498b0d7762324a00b347 /misc/py-xgboost | |
| parent | Upgrade to version 1.3.4 (diff) | |
New port: misc/py-xgboost: Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM)
Diffstat (limited to 'misc/py-xgboost')
| -rw-r--r-- | misc/py-xgboost/Makefile | 42 | ||||
| -rw-r--r-- | misc/py-xgboost/distinfo | 3 | ||||
| -rw-r--r-- | misc/py-xgboost/files/patch-xgboost_libpath.py | 11 | ||||
| -rw-r--r-- | misc/py-xgboost/pkg-descr | 5 |
4 files changed, 61 insertions, 0 deletions
diff --git a/misc/py-xgboost/Makefile b/misc/py-xgboost/Makefile new file mode 100644 index 000000000000..aab54fe74f3b --- /dev/null +++ b/misc/py-xgboost/Makefile @@ -0,0 +1,42 @@ +# $FreeBSD$ + +PORTNAME= xgboost +DISTVERSIONPREFIX= v +DISTVERSION= 0.90-235 +DISTVERSIONSUFFIX= -gad4a1c73 +CATEGORIES= misc # machine-learning +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM) + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/../LICENSE + +LIB_DEPENDS= libdmlc.so:devel/dmlc-core \ + librabit.so:misc/xgboost +RUN_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} + +USES= python +USE_GITHUB= yes +GH_ACCOUNT= dmlc +USE_PYTHON= distutils autoplist +USE_LDCONFIG= yes + +WRKSRC_SUBDIR= python-package + +MAKE_ENV+= FREEBSD_LIBRARY_PATH=${LOCALBASE}/lib + +NO_ARCH= yes + +POST_PLIST= fix-plist + +post-install: + @${RM} ${STAGEDIR}${PREFIX}/xgboost/libxgboost.so + @${RMDIR} ${STAGEDIR}${PREFIX}/xgboost + +fix-plist: # https://github.com/dmlc/xgboost/issues/5118 + @${REINPLACE_CMD} -e 's|^xgboost/libxgboost.so$$||' ${TMPPLIST} + +.include <bsd.port.mk> diff --git a/misc/py-xgboost/distinfo b/misc/py-xgboost/distinfo new file mode 100644 index 000000000000..e75a2fcebd1e --- /dev/null +++ b/misc/py-xgboost/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1576359661 +SHA256 (dmlc-xgboost-v0.90-235-gad4a1c73_GH0.tar.gz) = c5fd4f9c152ba56961a43b677397251f20f78e534571926247f8d24275f9642b +SIZE (dmlc-xgboost-v0.90-235-gad4a1c73_GH0.tar.gz) = 1131611 diff --git a/misc/py-xgboost/files/patch-xgboost_libpath.py b/misc/py-xgboost/files/patch-xgboost_libpath.py new file mode 100644 index 000000000000..1382491c8a1d --- /dev/null +++ b/misc/py-xgboost/files/patch-xgboost_libpath.py @@ -0,0 +1,11 @@ +--- xgboost/libpath.py.orig 2019-12-14 21:46:06 UTC ++++ xgboost/libpath.py +@@ -20,7 +20,7 @@ def find_lib_path(): + """ + curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) + # make pythonpack hack: copy this directory one level upper for setup.py +- dll_path = [curr_path, os.path.join(curr_path, '../../lib/'), ++ dll_path = [os.getenv('FREEBSD_LIBRARY_PATH'), + os.path.join(curr_path, './lib/'), + os.path.join(sys.prefix, 'xgboost')] + if sys.platform == 'win32': diff --git a/misc/py-xgboost/pkg-descr b/misc/py-xgboost/pkg-descr new file mode 100644 index 000000000000..bba4247ecd28 --- /dev/null +++ b/misc/py-xgboost/pkg-descr @@ -0,0 +1,5 @@ +Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) +Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, +Hadoop, Spark, Flink and DataFlow. + +WWW: https://xgboost.ai/ |
