diff --git a/misc/py-xgboost/Makefile b/misc/py-xgboost/Makefile index aaae00b37b08..4eb0ccef8a42 100644 --- a/misc/py-xgboost/Makefile +++ b/misc/py-xgboost/Makefile @@ -1,47 +1,47 @@ PORTNAME= xgboost DISTVERSIONPREFIX= v -DISTVERSION= 2.1.4 +DISTVERSION= 3.1.3 CATEGORIES= misc # machine-learning PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM) WWW= https://xgboost.ai/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/../LICENSE BROKEN_armv7= compilation fails due to type conversion issues, like on i386, but the upstream says that they don't support 32-bit architectures BROKEN_i386= compilation fails, see https://github.com/dmlc/xgboost/issues/10002 BUILD_DEPENDS= cmake:devel/cmake-core \ ${PYTHON_PKGNAMEPREFIX}hatchling>=1.12.1:devel/py-hatchling@${PY_FLAVOR} LIB_DEPENDS= libdmlc.so:devel/dmlc-core RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pandas>=1.2:math/py-pandas@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyarrow>0:databases/py-pyarrow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scikit-learn>0:science/py-scikit-learn@${PY_FLAVOR} USES= compiler:c11 python localbase:ldflags USE_PYTHON= pep517 autoplist pytest USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= dmlc WRKSRC_SUBDIR= python-package LDFLAGS+= -lexecinfo \ -ldmlc PYDISTUTILS_INSTALLARGS= --use-system-libxgboost # this is ignored so that setup.py has to be patched, see https://github.com/dmlc/xgboost/issues/6879 TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} TEST_WRKSRC= ${WRKSRC}/../tests/python post-install: @${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/xgboost/lib/libxgboost.so .include diff --git a/misc/py-xgboost/distinfo b/misc/py-xgboost/distinfo index 7c625d307fa1..d44192f5a83a 100644 --- a/misc/py-xgboost/distinfo +++ b/misc/py-xgboost/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1738905163 -SHA256 (dmlc-xgboost-v2.1.4_GH0.tar.gz) = 8c86edcdc4ea4e8ef92d62d71ddb59a2500d87312c5e1092cb41f60b59212101 -SIZE (dmlc-xgboost-v2.1.4_GH0.tar.gz) = 2137827 +TIMESTAMP = 1768210996 +SHA256 (dmlc-xgboost-v3.1.3_GH0.tar.gz) = 17c545f43ca543979dcafdfeb4921240ba3673d1464ec4c2f592733af12ad578 +SIZE (dmlc-xgboost-v3.1.3_GH0.tar.gz) = 2388327 diff --git a/misc/py-xgboost/files/patch-CMakeLists.txt b/misc/py-xgboost/files/patch-CMakeLists.txt index a0003ec715ea..10ec5aecd063 100644 --- a/misc/py-xgboost/files/patch-CMakeLists.txt +++ b/misc/py-xgboost/files/patch-CMakeLists.txt @@ -1,67 +1,67 @@ ---- ../CMakeLists.txt.orig 2024-06-19 18:31:39 UTC +--- ../CMakeLists.txt.orig 2026-01-08 13:54:31 UTC +++ ../CMakeLists.txt -@@ -148,11 +148,11 @@ endif() +@@ -162,11 +162,11 @@ endif() if(PLUGIN_RMM AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Linux")) message(SEND_ERROR "`PLUGIN_RMM` must be used with Linux.") endif() -if(ENABLE_ALL_WARNINGS) - if((NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) - message(SEND_ERROR "ENABLE_ALL_WARNINGS is only available for Clang and GCC.") - endif() -endif() +#if(ENABLE_ALL_WARNINGS) +# if((NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) +# message(SEND_ERROR "ENABLE_ALL_WARNINGS is only available for Clang and GCC.") +# endif() +#endif() if(BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS)) message(SEND_ERROR "Cannot build a static library libxgboost.a when R or JVM packages are enabled.") endif() -@@ -266,7 +266,7 @@ set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) +@@ -289,7 +289,7 @@ set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) # dmlc-core set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) -add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +#add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) if(MSVC) if(TARGET dmlc_unit_tests) -@@ -279,7 +279,7 @@ add_subdirectory(${xgboost_SOURCE_DIR}/src) +@@ -302,7 +302,7 @@ add_subdirectory(${xgboost_SOURCE_DIR}/src) # core xgboost add_subdirectory(${xgboost_SOURCE_DIR}/src) -target_link_libraries(objxgboost PUBLIC dmlc) +#target_link_libraries(objxgboost PUBLIC dmlc) # Link -lstdc++fs for GCC 8.x if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0") -@@ -341,7 +341,7 @@ if(BUILD_DEPRECATED_CLI) +@@ -391,7 +391,7 @@ if(BUILD_DEPRECATED_CLI) target_include_directories(runxgboost PRIVATE ${xgboost_SOURCE_DIR}/include - ${xgboost_SOURCE_DIR}/dmlc-core/include + #${xgboost_SOURCE_DIR}/dmlc-core/include - ${xgboost_SOURCE_DIR}/rabit/include ) set_target_properties(runxgboost PROPERTIES OUTPUT_NAME xgboost) -@@ -358,7 +358,7 @@ endif() + xgboost_target_properties(runxgboost) +@@ -407,7 +407,7 @@ endif() #-- End CLI for xgboost # Common setup for all targets -foreach(target xgboost objxgboost dmlc) +foreach(target xgboost objxgboost) xgboost_target_properties(${target}) xgboost_target_link_libraries(${target}) xgboost_target_defs(${target}) -@@ -420,9 +420,9 @@ if(BUILD_STATIC_LIB) +@@ -469,9 +469,9 @@ if(BUILD_STATIC_LIB) # https://github.com/dmlc/xgboost/issues/6085 if(BUILD_STATIC_LIB) if(BUILD_DEPRECATED_CLI) - set(INSTALL_TARGETS xgboost runxgboost objxgboost dmlc) + set(INSTALL_TARGETS xgboost runxgboost objxgboost) else() - set(INSTALL_TARGETS xgboost objxgboost dmlc) + set(INSTALL_TARGETS xgboost objxgboost) endif() else() if(BUILD_DEPRECATED_CLI) diff --git a/misc/xgboost/Makefile b/misc/xgboost/Makefile index 0e8bdafa566d..9e874c36b4d7 100644 --- a/misc/xgboost/Makefile +++ b/misc/xgboost/Makefile @@ -1,41 +1,41 @@ PORTNAME= xgboost DISTVERSIONPREFIX= v -DISTVERSION= 2.1.4 +DISTVERSION= 3.1.3 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT, GBM) WWW= https://xgboost.ai \ https://xgboost.readthedocs.io/en/stable/ \ https://github.com/dmlc/xgboost LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_armv7= compilation fails: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t', see https://github.com/dmlc/xgboost/issues/8489 BROKEN_i386= compilation fails: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t', see https://github.com/dmlc/xgboost/issues/8489 BROKEN_powerpc= compilation fails: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t', see https://github.com/dmlc/xgboost/issues/8489 LIB_DEPENDS= libdmlc.so:devel/dmlc-core TEST_DEPENDS= googletest>0:devel/googletest USES= cmake:testing compiler:c++17-lang localbase:ldflags USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= dmlc GH_TUPLE= \ NVlabs:cub:af39ee2:NVlabs_cub/cub \ rapidsai:gputreeshap:acb5be3:rapidsai_gputreeshap/gputreeshap LDFLAGS+= ${LOCALBASE}/lib/libdmlc.so -lexecinfo CMAKE_TESTING_ON= GOOGLE_TEST OPTIONS_DEFINE= OPENMP OPENMP_CMAKE_BOOL= USE_OPENMP # tests as of 2.1.4: 100% tests passed, 0 tests failed out of 1 (failures when machine is loaded, see https://github.com/dmlc/xgboost/issues/11214) .include diff --git a/misc/xgboost/distinfo b/misc/xgboost/distinfo index bee3d40ff076..f65e2a67dd62 100644 --- a/misc/xgboost/distinfo +++ b/misc/xgboost/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1738904981 -SHA256 (dmlc-xgboost-v2.1.4_GH0.tar.gz) = 8c86edcdc4ea4e8ef92d62d71ddb59a2500d87312c5e1092cb41f60b59212101 -SIZE (dmlc-xgboost-v2.1.4_GH0.tar.gz) = 2137827 +TIMESTAMP = 1768210728 +SHA256 (dmlc-xgboost-v3.1.3_GH0.tar.gz) = 17c545f43ca543979dcafdfeb4921240ba3673d1464ec4c2f592733af12ad578 +SIZE (dmlc-xgboost-v3.1.3_GH0.tar.gz) = 2388327 SHA256 (NVlabs-cub-af39ee2_GH0.tar.gz) = 3444f1d0af16d3680bf5089c1a91e707769d946580b80f12463860366fb6884b SIZE (NVlabs-cub-af39ee2_GH0.tar.gz) = 413215 SHA256 (rapidsai-gputreeshap-acb5be3_GH0.tar.gz) = c2b67f8f398000570cac6b9d82a0bdab251105391602a3e07fd497c5e61534c4 SIZE (rapidsai-gputreeshap-acb5be3_GH0.tar.gz) = 61972 diff --git a/misc/xgboost/files/patch-CMakeLists.txt b/misc/xgboost/files/patch-CMakeLists.txt index 3750419d3296..9bed7ab3e30d 100644 --- a/misc/xgboost/files/patch-CMakeLists.txt +++ b/misc/xgboost/files/patch-CMakeLists.txt @@ -1,67 +1,67 @@ ---- CMakeLists.txt.orig 2024-06-19 18:31:39 UTC +--- CMakeLists.txt.orig 2026-01-08 13:54:31 UTC +++ CMakeLists.txt -@@ -148,11 +148,11 @@ endif() +@@ -162,11 +162,11 @@ endif() if(PLUGIN_RMM AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Linux")) message(SEND_ERROR "`PLUGIN_RMM` must be used with Linux.") endif() -if(ENABLE_ALL_WARNINGS) - if((NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) - message(SEND_ERROR "ENABLE_ALL_WARNINGS is only available for Clang and GCC.") - endif() -endif() +#if(ENABLE_ALL_WARNINGS) +# if((NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) +# message(SEND_ERROR "ENABLE_ALL_WARNINGS is only available for Clang and GCC.") +# endif() +#endif() if(BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS)) message(SEND_ERROR "Cannot build a static library libxgboost.a when R or JVM packages are enabled.") endif() -@@ -266,7 +266,7 @@ set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) +@@ -289,7 +289,7 @@ set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) # dmlc-core set(DMLC_FORCE_SHARED_CRT ${FORCE_SHARED_CRT}) -add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +#add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) if(MSVC) if(TARGET dmlc_unit_tests) -@@ -279,7 +279,7 @@ add_subdirectory(${xgboost_SOURCE_DIR}/src) +@@ -302,7 +302,7 @@ add_subdirectory(${xgboost_SOURCE_DIR}/src) # core xgboost add_subdirectory(${xgboost_SOURCE_DIR}/src) -target_link_libraries(objxgboost PUBLIC dmlc) +#target_link_libraries(objxgboost PUBLIC dmlc) # Link -lstdc++fs for GCC 8.x if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0") -@@ -341,7 +341,7 @@ if(BUILD_DEPRECATED_CLI) +@@ -391,7 +391,7 @@ if(BUILD_DEPRECATED_CLI) target_include_directories(runxgboost PRIVATE ${xgboost_SOURCE_DIR}/include - ${xgboost_SOURCE_DIR}/dmlc-core/include + #${xgboost_SOURCE_DIR}/dmlc-core/include - ${xgboost_SOURCE_DIR}/rabit/include ) set_target_properties(runxgboost PROPERTIES OUTPUT_NAME xgboost) -@@ -358,7 +358,7 @@ endif() + xgboost_target_properties(runxgboost) +@@ -407,7 +407,7 @@ endif() #-- End CLI for xgboost # Common setup for all targets -foreach(target xgboost objxgboost dmlc) +foreach(target xgboost objxgboost) xgboost_target_properties(${target}) xgboost_target_link_libraries(${target}) xgboost_target_defs(${target}) -@@ -420,9 +420,9 @@ if(BUILD_STATIC_LIB) +@@ -469,9 +469,9 @@ if(BUILD_STATIC_LIB) # https://github.com/dmlc/xgboost/issues/6085 if(BUILD_STATIC_LIB) if(BUILD_DEPRECATED_CLI) - set(INSTALL_TARGETS xgboost runxgboost objxgboost dmlc) + set(INSTALL_TARGETS xgboost runxgboost objxgboost) else() - set(INSTALL_TARGETS xgboost objxgboost dmlc) + set(INSTALL_TARGETS xgboost objxgboost) endif() else() if(BUILD_DEPRECATED_CLI) diff --git a/misc/xgboost/pkg-plist b/misc/xgboost/pkg-plist index baa8200d6ee5..8251f8d00122 100644 --- a/misc/xgboost/pkg-plist +++ b/misc/xgboost/pkg-plist @@ -1,36 +1,38 @@ include/xgboost/base.h include/xgboost/c_api.h include/xgboost/cache.h +include/xgboost/collective/poll_utils.h include/xgboost/collective/result.h include/xgboost/collective/socket.h include/xgboost/context.h include/xgboost/data.h include/xgboost/feature_map.h include/xgboost/gbm.h include/xgboost/global_config.h include/xgboost/host_device_vector.h include/xgboost/intrusive_ptr.h include/xgboost/json.h include/xgboost/json_io.h include/xgboost/learner.h include/xgboost/linalg.h include/xgboost/linear_updater.h include/xgboost/logging.h include/xgboost/metric.h include/xgboost/model.h include/xgboost/multi_target_tree_model.h include/xgboost/objective.h include/xgboost/parameter.h include/xgboost/predictor.h include/xgboost/span.h include/xgboost/string_view.h include/xgboost/task.h include/xgboost/tree_model.h include/xgboost/tree_updater.h include/xgboost/version_config.h +include/xgboost/windefs.h lib/cmake/xgboost/XGBoostTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/xgboost/XGBoostTargets.cmake lib/cmake/xgboost/xgboost-config-version.cmake lib/cmake/xgboost/xgboost-config.cmake lib/libxgboost.so libdata/pkgconfig/xgboost.pc