git: f0937002c523 - main - misc/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:31 UTC
The branch main has been updated by yuri:

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

commit f0937002c523c10b90f5528a5624c2ce78747028
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-12 06:19:28 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-01-12 07:21:28 +0000

    misc/lightgbm: New port: Gradient boosting framework that uses tree based learning algorithms
---
 misc/Makefile                            |  1 +
 misc/lightgbm/Makefile                   | 32 ++++++++++++++++++++++++++++
 misc/lightgbm/distinfo                   |  9 ++++++++
 misc/lightgbm/files/patch-CMakeLists.txt | 11 ++++++++++
 misc/lightgbm/pkg-descr                  |  8 +++++++
 misc/lightgbm/pkg-plist                  | 36 ++++++++++++++++++++++++++++++++
 6 files changed, 97 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 61e7aa3de93f..6fae8d2dbd4c 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -236,6 +236,7 @@
     SUBDIR += libutf
     SUBDIR += libxdf
     SUBDIR += lifelines
+    SUBDIR += lightgbm
     SUBDIR += lingoteach
     SUBDIR += locale-en_DK
     SUBDIR += localedata
diff --git a/misc/lightgbm/Makefile b/misc/lightgbm/Makefile
new file mode 100644
index 000000000000..e6cb6977cec3
--- /dev/null
+++ b/misc/lightgbm/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	lightgbm
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.3.4
+CATEGORIES=	misc # machine-learning
+
+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
+
+TEST_DEPENDS=	googletest>0:devel/googletest
+
+USES=		cmake:testing compiler:c++11-lang eigen:3
+
+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
+
+CMAKE_TESTING_ON=	BUILD_CPP_TEST
+CMAKE_TESTING_TARGET=
+
+CXXFLAGS+=	-I${LOCALBASE}/include/eigen3
+
+post-test:
+	${WRKSRC}/testlightgbm
+
+.include <bsd.port.mk>
diff --git a/misc/lightgbm/distinfo b/misc/lightgbm/distinfo
new file mode 100644
index 000000000000..d05fc2231597
--- /dev/null
+++ b/misc/lightgbm/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1673502081
+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/lightgbm/files/patch-CMakeLists.txt b/misc/lightgbm/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..683e41a31528
--- /dev/null
+++ b/misc/lightgbm/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2022-12-29 04:59:34 UTC
++++ CMakeLists.txt
+@@ -507,7 +507,7 @@ endif(__BUILD_FOR_R)
+ 
+ #-- Google C++ tests
+ if(BUILD_CPP_TEST)
+-  find_package(GTest CONFIG)
++  find_package(GTest)
+   if(NOT GTEST_FOUND)
+     message(STATUS "Did not find Google Test in the system root. Fetching Google Test now...")
+     include(FetchContent)
diff --git a/misc/lightgbm/pkg-descr b/misc/lightgbm/pkg-descr
new file mode 100644
index 000000000000..c37de910f9d7
--- /dev/null
+++ b/misc/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/lightgbm/pkg-plist b/misc/lightgbm/pkg-plist
new file mode 100644
index 000000000000..61da587e1ce4
--- /dev/null
+++ b/misc/lightgbm/pkg-plist
@@ -0,0 +1,36 @@
+bin/lightgbm
+include/LightGBM/application.h
+include/LightGBM/bin.h
+include/LightGBM/boosting.h
+include/LightGBM/c_api.h
+include/LightGBM/config.h
+include/LightGBM/cuda/cuda_utils.h
+include/LightGBM/cuda/vector_cudahost.h
+include/LightGBM/dataset.h
+include/LightGBM/dataset_loader.h
+include/LightGBM/export.h
+include/LightGBM/feature_group.h
+include/LightGBM/meta.h
+include/LightGBM/metric.h
+include/LightGBM/network.h
+include/LightGBM/objective_function.h
+include/LightGBM/prediction_early_stop.h
+include/LightGBM/train_share_states.h
+include/LightGBM/tree.h
+include/LightGBM/tree_learner.h
+include/LightGBM/utils/array_args.h
+include/LightGBM/utils/chunked_array.hpp
+include/LightGBM/utils/common.h
+include/LightGBM/utils/common_legacy_solaris.h
+include/LightGBM/utils/file_io.h
+include/LightGBM/utils/json11.h
+include/LightGBM/utils/log.h
+include/LightGBM/utils/openmp_wrapper.h
+include/LightGBM/utils/pipeline_reader.h
+include/LightGBM/utils/random.h
+include/LightGBM/utils/text_reader.h
+include/LightGBM/utils/threading.h
+include/LightGBM/utils/yamc/alternate_shared_mutex.hpp
+include/LightGBM/utils/yamc/yamc_rwlock_sched.hpp
+include/LightGBM/utils/yamc/yamc_shared_lock.hpp
+lib/lib_lightgbm.so