git: a9ea71306345 - main - misc/py-lightgbm: New port: Gradient boosting framework that uses tree based learning algorithms

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 12 Jan 2023 07:21:32 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a9ea71306345ecfb2312f4a5532d5834b4763840

commit a9ea71306345ecfb2312f4a5532d5834b4763840
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-12 07:20:48 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-01-12 07:21:29 +0000

    misc/py-lightgbm: New port: Gradient boosting framework that uses tree based learning algorithms
---
 misc/Makefile              |  1 +
 misc/py-lightgbm/Makefile  | 42 ++++++++++++++++++++++++++++++++++++++++++
 misc/py-lightgbm/distinfo  |  9 +++++++++
 misc/py-lightgbm/pkg-descr |  8 ++++++++
 misc/py-lightgbm/pkg-plist |  1 +
 5 files changed, 61 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 6fae8d2dbd4c..6603fa0ecfe4 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -410,6 +410,7 @@
     SUBDIR += py-huepy
     SUBDIR += py-ipyfastscape
     SUBDIR += py-kartograph
+    SUBDIR += py-lightgbm
     SUBDIR += py-log_symbols
     SUBDIR += py-mffpy
     SUBDIR += py-molequeue
diff --git a/misc/py-lightgbm/Makefile b/misc/py-lightgbm/Makefile
new file mode 100644
index 000000000000..832b6e3241f4
--- /dev/null
+++ b/misc/py-lightgbm/Makefile
@@ -0,0 +1,42 @@
+PORTNAME=	lightgbm
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.3.4
+CATEGORIES=	misc # machine-learning
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Gradient boosting framework that uses tree based learning algorithms
+WWW=		https://lightgbm.readthedocs.io/en/latest/
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/../LICENSE
+
+PY_DEPENDS=	${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scikit-learn>=0.22.0:science/py-scikit-learn@${PY_FLAVOR}
+BUILD_DEPENDS=	cmake:devel/cmake-core \
+		gmake:devel/gmake \
+		${PY_DEPENDS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PY_DEPENDS}
+
+USES=		eigen:3 python
+USE_PYTHON=	distutils autoplist
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	microsoft
+GH_PROJECT=	LightGBM
+GH_TUPLE=	boostorg:compute:36350b7:boostorg_compute/../external_libs/compute \
+		fmtlib:fmt:b6f4cea:fmt/../external_libs/fmt \
+		lemire:fast_double_parser:ace6064:fast_double_parser/../external_libs/fast_double_parser
+
+WRKSRC_SUBDIR=	python-package
+
+CXXFLAGS+=	-I${LOCALBASE}/include/eigen3
+
+BINARY_ALIAS=	make=${GMAKE}
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/lightgbm/lib_lightgbm.so
+
+.include <bsd.port.mk>
diff --git a/misc/py-lightgbm/distinfo b/misc/py-lightgbm/distinfo
new file mode 100644
index 000000000000..1523fc870adc
--- /dev/null
+++ b/misc/py-lightgbm/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1673503825
+SHA256 (microsoft-LightGBM-v3.3.4_GH0.tar.gz) = ad7e4ebf54e223542682f2be0f25f2bad112ebcd4c2a2db949645a356218b8de
+SIZE (microsoft-LightGBM-v3.3.4_GH0.tar.gz) = 6874102
+SHA256 (boostorg-compute-36350b7_GH0.tar.gz) = b82330296614fe9222bcdee60c5f71362d6fc16f17b0fb6fb5901b6531d1df90
+SIZE (boostorg-compute-36350b7_GH0.tar.gz) = 377110
+SHA256 (fmtlib-fmt-b6f4cea_GH0.tar.gz) = 121577275e29f0302dcda9c0fa4e6d33cad5f238777d8c2a7623a8cd88be8aa2
+SIZE (fmtlib-fmt-b6f4cea_GH0.tar.gz) = 826134
+SHA256 (lemire-fast_double_parser-ace6064_GH0.tar.gz) = a53e6ebeb1d37d700cfebf98b2afb98d2c92df742c6ae45c27354d950cd02988
+SIZE (lemire-fast_double_parser-ace6064_GH0.tar.gz) = 635218
diff --git a/misc/py-lightgbm/pkg-descr b/misc/py-lightgbm/pkg-descr
new file mode 100644
index 000000000000..c37de910f9d7
--- /dev/null
+++ b/misc/py-lightgbm/pkg-descr
@@ -0,0 +1,8 @@
+LightGBM is a gradient boosting framework that uses tree based learning
+algorithms. It is designed to be distributed and efficient with the
+following advantages:
+* Faster training speed and higher efficiency.
+* Lower memory usage.
+* Better accuracy.
+* Support of parallel, distributed, and GPU learning.
+* Capable of handling large-scale data.
diff --git a/misc/py-lightgbm/pkg-plist b/misc/py-lightgbm/pkg-plist
new file mode 100644
index 000000000000..675c71203717
--- /dev/null
+++ b/misc/py-lightgbm/pkg-plist
@@ -0,0 +1 @@
+%%PYTHON_SITELIBDIR%%/lightgbm/lib_lightgbm.so