Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2020 19:23:04 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r536525 - in head/misc/py-xgboost: . files
Message-ID:  <202005251923.04PJN4v8093328@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Mon May 25 19:23:03 2020
New Revision: 536525
URL: https://svnweb.freebsd.org/changeset/ports/536525

Log:
  misc/py-xgboost: Update 1.0.2 -> 1.1.0
  
  Reported by:	portscout

Added:
  head/misc/py-xgboost/files/patch-CMakeLists.txt   (contents, props changed)
  head/misc/py-xgboost/files/patch-setup.py   (contents, props changed)
Modified:
  head/misc/py-xgboost/Makefile
  head/misc/py-xgboost/distinfo
  head/misc/py-xgboost/files/patch-xgboost_libpath.py

Modified: head/misc/py-xgboost/Makefile
==============================================================================
--- head/misc/py-xgboost/Makefile	Mon May 25 19:21:40 2020	(r536524)
+++ head/misc/py-xgboost/Makefile	Mon May 25 19:23:03 2020	(r536525)
@@ -2,7 +2,7 @@
 
 PORTNAME=	xgboost
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.0.2
+DISTVERSION=	1.1.0
 CATEGORIES=	misc # machine-learning
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -12,30 +12,29 @@ COMMENT=	Scalable, Portable and Distributed Gradient B
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
+BUILD_DEPENDS=	cmake:devel/cmake
 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
+USES=		python localbase:ldflags
 USE_GITHUB=	yes
 GH_ACCOUNT=	dmlc
 USE_PYTHON=	distutils autoplist
 USE_LDCONFIG=	yes
+GH_TUPLE=	\
+		dmlc:rabit:4fb34a008db6437c84d1877635064e09a55c8553:dmlc_rabit/../rabit
 
 WRKSRC_SUBDIR=	python-package
 
 MAKE_ENV+=	FREEBSD_LIBRARY_PATH=${LOCALBASE}/lib
 
-NO_ARCH=	yes
+LDFLAGS+=	-lexecinfo
 
 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} '/^xgboost\/libxgboost.so$$/d' ${TMPPLIST}
+fix-plist: # https://github.com/dmlc/xgboost/issues/5705
+	@${REINPLACE_CMD} 's|/libxgboost.so$$|/xgboost/lib/libxgboost.so|' ${TMPPLIST}
 
 .include <bsd.port.mk>

Modified: head/misc/py-xgboost/distinfo
==============================================================================
--- head/misc/py-xgboost/distinfo	Mon May 25 19:21:40 2020	(r536524)
+++ head/misc/py-xgboost/distinfo	Mon May 25 19:23:03 2020	(r536525)
@@ -1,3 +1,5 @@
-TIMESTAMP = 1583311829
-SHA256 (dmlc-xgboost-v1.0.2_GH0.tar.gz) = f0ff412996cc82d6be2006aaa90c6c24e5aed8ebe52b896dfa8d97e9fc2af4ed
-SIZE (dmlc-xgboost-v1.0.2_GH0.tar.gz) = 1171236
+TIMESTAMP = 1590430425
+SHA256 (dmlc-xgboost-v1.1.0_GH0.tar.gz) = 8c081ae2a86619be990200ede5552c711067afcb51e3468f8d95ea3ac6ee8acb
+SIZE (dmlc-xgboost-v1.1.0_GH0.tar.gz) = 1255067
+SHA256 (dmlc-rabit-4fb34a008db6437c84d1877635064e09a55c8553_GH0.tar.gz) = 7d9a18b1613dfd3a5244524ecdb164d6b2a1f150d297cc7b8527e221aabb6eb7
+SIZE (dmlc-rabit-4fb34a008db6437c84d1877635064e09a55c8553_GH0.tar.gz) = 93236

Added: head/misc/py-xgboost/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/py-xgboost/files/patch-CMakeLists.txt	Mon May 25 19:23:03 2020	(r536525)
@@ -0,0 +1,26 @@
+--- ../CMakeLists.txt.orig	2019-12-14 20:50:22 UTC
++++ ../CMakeLists.txt
+@@ -101,16 +101,16 @@ endif (USE_CUDA)
+ 
+ # dmlc-core
+ msvc_use_static_runtime()
+-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
+-set_target_properties(dmlc PROPERTIES
+-  CXX_STANDARD 11
+-  CXX_STANDARD_REQUIRED ON
+-  POSITION_INDEPENDENT_CODE ON)
+-list(APPEND LINKED_LIBRARIES_PRIVATE dmlc)
++#add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
++#set_target_properties(dmlc PROPERTIES
++#  CXX_STANDARD 11
++#  CXX_STANDARD_REQUIRED ON
++#  POSITION_INDEPENDENT_CODE ON)
++#list(APPEND LINKED_LIBRARIES_PRIVATE dmlc)
+ 
+ # rabit
+ set(RABIT_BUILD_DMLC OFF)
+-set(DMLC_ROOT ${xgboost_SOURCE_DIR}/dmlc-core)
++set(DMLC_ROOT ${CMAKE_INSTALL_PREFIX})
+ set(RABIT_WITH_R_LIB ${R_LIB})
+ add_subdirectory(rabit)
+ 

Added: head/misc/py-xgboost/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/py-xgboost/files/patch-setup.py	Mon May 25 19:23:03 2020	(r536525)
@@ -0,0 +1,19 @@
+--- setup.py.orig	2020-05-25 18:12:50 UTC
++++ setup.py
+@@ -57,14 +57,14 @@ def copy_tree(src_dir, target_dir):
+ 
+     src = os.path.join(src_dir, 'src')
+     inc = os.path.join(src_dir, 'include')
+-    dmlc_core = os.path.join(src_dir, 'dmlc-core')
++    #dmlc_core = os.path.join(src_dir, 'dmlc-core')
+     rabit = os.path.join(src_dir, 'rabit')
+     cmake = os.path.join(src_dir, 'cmake')
+     plugin = os.path.join(src_dir, 'plugin')
+ 
+     clean_copy_tree(src, os.path.join(target_dir, 'src'))
+     clean_copy_tree(inc, os.path.join(target_dir, 'include'))
+-    clean_copy_tree(dmlc_core, os.path.join(target_dir, 'dmlc-core'))
++    #clean_copy_tree(dmlc_core, os.path.join(target_dir, 'dmlc-core'))
+     clean_copy_tree(rabit, os.path.join(target_dir, 'rabit'))
+     clean_copy_tree(cmake, os.path.join(target_dir, 'cmake'))
+     clean_copy_tree(plugin, os.path.join(target_dir, 'plugin'))

Modified: head/misc/py-xgboost/files/patch-xgboost_libpath.py
==============================================================================
--- head/misc/py-xgboost/files/patch-xgboost_libpath.py	Mon May 25 19:21:40 2020	(r536524)
+++ head/misc/py-xgboost/files/patch-xgboost_libpath.py	Mon May 25 19:23:03 2020	(r536525)
@@ -1,11 +1,11 @@
---- xgboost/libpath.py.orig	2019-12-14 21:46:06 UTC
+--- xgboost/libpath.py.orig	2020-05-25 18:09:22 UTC
 +++ xgboost/libpath.py
-@@ -20,7 +20,7 @@ def find_lib_path():
+@@ -20,6 +20,8 @@ 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':
+     dll_path = [
++        os.getenv('FREEBSD_LIBRARY_PATH'),
++	os.path.join(sys.prefix, 'xgboost'),
+         # normal, after installation `lib` is copied into Python package tree.
+         os.path.join(curr_path, 'lib'),
+         # editable installation, no copying is performed.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005251923.04PJN4v8093328>