aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-10-05 18:35:48 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-10-05 18:36:30 +0000
commit236421cb98b46876710b07fa35e2116c55ee782f (patch)
tree12568896c742c0bdb15d1a4f16733246da27f20c
parent270c43110dc5ea37e302f184326e95c33398018f (diff)
downloadports-236421cb98b46876710b07fa35e2116c55ee782f.tar.gz
ports-236421cb98b46876710b07fa35e2116c55ee782f.zip
math/py-or-tools: Update 8.2 -> 9.1
-rw-r--r--math/py-or-tools/Makefile21
-rw-r--r--math/py-or-tools/distinfo10
-rw-r--r--math/py-or-tools/files/patch-cmake_python.cmake18
-rw-r--r--math/py-or-tools/files/patch-ortools_base_integral__types.h11
-rw-r--r--math/py-or-tools/files/patch-ortools_python_setup.py.in12
-rw-r--r--math/py-or-tools/files/patch-tools_setup.py.in12
-rw-r--r--math/py-or-tools/pkg-plist22
7 files changed, 57 insertions, 49 deletions
diff --git a/math/py-or-tools/Makefile b/math/py-or-tools/Makefile
index 68f698ab325a..6620f812d36c 100644
--- a/math/py-or-tools/Makefile
+++ b/math/py-or-tools/Makefile
@@ -1,10 +1,13 @@
PORTNAME= or-tools
DISTVERSIONPREFIX= v
-DISTVERSION= 8.2
-PORTREVISION= 1
+DISTVERSION= 9.1
CATEGORIES= math
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/commit/
+PATCHFILES= c68ae78b1d78406dc4379afcacbfb156492c80c0.patch:-p1 # fixes https://github.com/google/or-tools/issues/2526
+PATCHFILES+= 3bbe33d9776c8f200a3296344e7df7bdf91188fe.patch:-p1 # fixes https://github.com/google/or-tools/issues/2814
+
MAINTAINER= yuri@FreeBSD.org
COMMENT= Google's Operations Research tools (Python binding)
@@ -13,8 +16,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE-2.0.txt
BROKEN_i386= SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32 # see https://github.com/google/or-tools/issues/2130
-PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}absl-py>0:devel/py-absl-py@${PY_FLAVOR}
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}absl-py>0:devel/py-absl-py@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}mypy-protobuf>0:devel/py-mypy-protobuf@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR}
BUILD_DEPENDS= ${PY_DEPENDS} \
protoc-gen-mypy:devel/py-mypy-protobuf@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \
@@ -24,6 +28,12 @@ BUILD_DEPENDS= ${PY_DEPENDS} \
LIB_DEPENDS= libabsl_base.so:devel/abseil \
libCbc.so:math/cbc \
libCgl.so:math/cgl \
+ libcoinasl.so:math/asl \
+ libcoinmumps.so:math/ipopt \
+ libCoinUtils.so:math/coinutils \
+ libnauty.so:math/nauty \
+ libopenblas.so:math/openblas \
+ libOsi.so:math/osi \
libOsiClp.so:math/clp \
libgflags.so:devel/gflags \
libglog.so:devel/glog \
@@ -36,14 +46,13 @@ USE_PYTHON= flavors
USE_GITHUB= yes
GH_ACCOUNT= google
-CMAKE_OFF= BUILD_DEPS INSTALL_BUILD_DEPS BUILD_EXAMPLES
+CMAKE_OFF= BUILD_DEPS INSTALL_BUILD_DEPS BUILD_TESTING BUILD_EXAMPLES
CMAKE_ON= BUILD_PYTHON
CMAKE_ARGS= -DSWIG_EXECUTABLE=${LOCALBASE}/bin/swig -DFREEBSD_PYTHON_VER=${PYTHON_VER}
CONFIGURE_ENV= UNIX_CBC_DIR=${LOCALBASE} UNIX_CLP_DIR=${LOCALBASE}
BUILD_ENV= UNIX_CBC_DIR=${LOCALBASE} UNIX_CLP_DIR=${LOCALBASE}
OPTIONS_DEFINE= SCIP
-#OPTIONS_DEFAULT= SCIP # undesirable to make it default because SCIP's license doesn't allow package build, and this would block package availability for math/py-or-tools
SCIP_DESC= Use the SCIP solver # SCIP package isn't built because of licensing restrictions
SCIP_CMAKE_BOOL= USE_SCIP
diff --git a/math/py-or-tools/distinfo b/math/py-or-tools/distinfo
index 524e7a11e888..93a796e356b3 100644
--- a/math/py-or-tools/distinfo
+++ b/math/py-or-tools/distinfo
@@ -1,3 +1,7 @@
-TIMESTAMP = 1619044509
-SHA256 (google-or-tools-v8.2_GH0.tar.gz) = cf40715fa5cfeee88e2c8f5583465182c8dedf60b4eb7c4a967b32ff61ac4302
-SIZE (google-or-tools-v8.2_GH0.tar.gz) = 236722388
+TIMESTAMP = 1633451473
+SHA256 (google-or-tools-v9.1_GH0.tar.gz) = b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307
+SIZE (google-or-tools-v9.1_GH0.tar.gz) = 245524168
+SHA256 (c68ae78b1d78406dc4379afcacbfb156492c80c0.patch) = c073b783b1923da1f63f5f4f089aac20213b7e8bdb8ef0ccfa94ba4f6190b87b
+SIZE (c68ae78b1d78406dc4379afcacbfb156492c80c0.patch) = 680
+SHA256 (3bbe33d9776c8f200a3296344e7df7bdf91188fe.patch) = 1b4e3d25d019877e5622acbf69367e0e615c88f45bb336c20fffedf74786be50
+SIZE (3bbe33d9776c8f200a3296344e7df7bdf91188fe.patch) = 2778
diff --git a/math/py-or-tools/files/patch-cmake_python.cmake b/math/py-or-tools/files/patch-cmake_python.cmake
index 900ab2b34706..a8ffda0d7611 100644
--- a/math/py-or-tools/files/patch-cmake_python.cmake
+++ b/math/py-or-tools/files/patch-cmake_python.cmake
@@ -1,20 +1,20 @@
---- cmake/python.cmake.orig 2020-12-09 16:30:21 UTC
+--- cmake/python.cmake.orig 2021-10-01 03:13:58 UTC
+++ cmake/python.cmake
@@ -23,7 +23,7 @@ if(UNIX AND NOT APPLE)
endif()
- # Find Python
--find_package(Python REQUIRED COMPONENTS Interpreter Development)
-+find_package(Python ${FREEBSD_PYTHON_VER} EXACT REQUIRED COMPONENTS Interpreter Development)
+ # Find Python 3
+-find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
++find_package(Python3 ${FREEBSD_PYTHON_VER} REQUIRED EXACT COMPONENTS Interpreter Development.Module)
+ list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3")
- if(Python_VERSION VERSION_GREATER_EQUAL 3)
- list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3")
-@@ -206,7 +206,7 @@ if(BUILD_TESTING)
+ # Find if python module MODULE_NAME is available,
+@@ -214,7 +214,7 @@ if(BUILD_TESTING)
COMMAND ${VENV_EXECUTABLE} ${VENV_DIR}
# Must not call it in a folder containing the setup.py otherwise pip call it
# (i.e. "python setup.py bdist") while we want to consume the wheel package
-- COMMAND ${VENV_Python_EXECUTABLE} -m pip install --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME}
-+ COMMAND ${VENV_Python_EXECUTABLE} -m pip install --no-index --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME}
+- COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME}
++ COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --no-index --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/test.py.in ${VENV_DIR}/test.py
BYPRODUCTS ${VENV_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM)
diff --git a/math/py-or-tools/files/patch-ortools_base_integral__types.h b/math/py-or-tools/files/patch-ortools_base_integral__types.h
deleted file mode 100644
index f51677c60a8e..000000000000
--- a/math/py-or-tools/files/patch-ortools_base_integral__types.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ortools/base/integral_types.h.orig 2020-09-06 04:04:04 UTC
-+++ ortools/base/integral_types.h
-@@ -24,7 +24,7 @@
- #define ARCH_K8
- #elif defined(__APPLE__) && defined(__GNUC__)
- #define ARCH_K8 // We only support 64 bit on Mac OS X.
--#elif defined(__GNUC__) && defined(__LP64__) && !defined(__aarch64__)
-+#elif defined(__GNUC__) && defined(__LP64__) && !defined(__aarch64__) && !defined(__powerpc64__)
- #define ARCH_K8 // Linux x86_64
- #endif
-
diff --git a/math/py-or-tools/files/patch-ortools_python_setup.py.in b/math/py-or-tools/files/patch-ortools_python_setup.py.in
index a9add07a6e20..16b2bc7ca247 100644
--- a/math/py-or-tools/files/patch-ortools_python_setup.py.in
+++ b/math/py-or-tools/files/patch-ortools_python_setup.py.in
@@ -1,15 +1,15 @@
See https://github.com/google/or-tools/issues/2305
---- ortools/python/setup.py.in.orig 2021-03-02 14:21:44 UTC
+--- ortools/python/setup.py.in.orig 2021-10-01 03:13:58 UTC
+++ ortools/python/setup.py.in
@@ -42,8 +42,8 @@ setup(
version='@PROJECT_VERSION@',
packages=find_packages(),
install_requires=[
-- 'protobuf >= 3.15.3',
-- 'absl-py >= 0.11',
-+ #'protobuf >= 3.15.3',
-+ #'absl-py >= 0.11',
+- 'protobuf >= 3.18.0',
+- 'absl-py >= 0.13',
++ #'protobuf >= 3.18.0',
++ #'absl-py >= 0.13',
],
package_data={
- '@PROJECT_NAME@':[$<$<NOT:$<PLATFORM_ID:Windows>>:'.libs/*', '../$<TARGET_SONAME_FILE_NAME:ortools>'>],
+ '@PROJECT_NAME@':[$<$<STREQUAL:$<TARGET_PROPERTY:@PYTHON_PROJECT@,TYPE>,SHARED_LIBRARY>:'.libs/*', '../$<TARGET_SONAME_FILE_NAME:@PYTHON_PROJECT@>'>],
diff --git a/math/py-or-tools/files/patch-tools_setup.py.in b/math/py-or-tools/files/patch-tools_setup.py.in
index 4d630e0eabd1..1303279af5ec 100644
--- a/math/py-or-tools/files/patch-tools_setup.py.in
+++ b/math/py-or-tools/files/patch-tools_setup.py.in
@@ -1,15 +1,15 @@
See https://github.com/google/or-tools/issues/2305
---- tools/setup.py.in.orig 2020-12-09 16:30:21 UTC
+--- tools/setup.py.in.orig 2021-10-01 03:13:58 UTC
+++ tools/setup.py.in
@@ -42,8 +42,8 @@ setup(
version='VVVV',
packages=find_packages(),
install_requires=[
-- 'protobuf >= 3.14.0',
-- 'absl-py >= 0.11',
-+ #'protobuf >= 3.14.0',
-+ #'absl-py >= 0.11',
+- 'protobuf >= 3.18.0',
+- 'absl-py >= 0.13',
++ #'protobuf >= 3.18.0',
++ #'absl-py >= 0.13',
],
package_data={
- 'ortools.constraint_solver' : ['_pywrapcp.dll', '*.pyi'],
+ 'ortools.init' : ['_pywrapinit.dll', '*.pyi'],
diff --git a/math/py-or-tools/pkg-plist b/math/py-or-tools/pkg-plist
index 81005de37a24..96a84666ba31 100644
--- a/math/py-or-tools/pkg-plist
+++ b/math/py-or-tools/pkg-plist
@@ -1,4 +1,4 @@
-%%PYTHON_SITELIBDIR%%/ortools/.libs/libortools.so.8
+%%PYTHON_SITELIBDIR%%/ortools/.libs/libortools.so.9
%%PYTHON_SITELIBDIR%%/ortools/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/algorithms/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/algorithms/_pywrapknapsack_solver.so
@@ -18,22 +18,21 @@
%%PYTHON_SITELIBDIR%%/ortools/constraint_solver/search_stats_pb2.pyi
%%PYTHON_SITELIBDIR%%/ortools/constraint_solver/solver_parameters_pb2.py
%%PYTHON_SITELIBDIR%%/ortools/constraint_solver/solver_parameters_pb2.pyi
-%%PYTHON_SITELIBDIR%%/ortools/data/__init__.py
-%%PYTHON_SITELIBDIR%%/ortools/data/_pywraprcpsp.so
-%%PYTHON_SITELIBDIR%%/ortools/data/jobshop_scheduling_pb2.py
-%%PYTHON_SITELIBDIR%%/ortools/data/jobshop_scheduling_pb2.pyi
-%%PYTHON_SITELIBDIR%%/ortools/data/pywraprcpsp.py
-%%PYTHON_SITELIBDIR%%/ortools/data/rcpsp_pb2.py
-%%PYTHON_SITELIBDIR%%/ortools/data/rcpsp_pb2.pyi
%%PYTHON_SITELIBDIR%%/ortools/graph/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/graph/_pywrapgraph.so
%%PYTHON_SITELIBDIR%%/ortools/graph/pywrapgraph.py
+%%PYTHON_SITELIBDIR%%/ortools/init/__init__.py
+%%PYTHON_SITELIBDIR%%/ortools/init/_pywrapinit.so
+%%PYTHON_SITELIBDIR%%/ortools/init/pywrapinit.py
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/_pywraplp.so
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/linear_solver_natural_api.py
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/linear_solver_pb2.py
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/linear_solver_pb2.pyi
%%PYTHON_SITELIBDIR%%/ortools/linear_solver/pywraplp.py
+%%PYTHON_SITELIBDIR%%/ortools/packing/__init__.py
+%%PYTHON_SITELIBDIR%%/ortools/packing/vector_bin_packing_pb2.py
+%%PYTHON_SITELIBDIR%%/ortools/packing/vector_bin_packing_pb2.pyi
%%PYTHON_SITELIBDIR%%/ortools/sat/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/sat/_pywrapsat.so
%%PYTHON_SITELIBDIR%%/ortools/sat/boolean_problem_pb2.py
@@ -49,6 +48,13 @@
%%PYTHON_SITELIBDIR%%/ortools/sat/pywrapsat.py
%%PYTHON_SITELIBDIR%%/ortools/sat/sat_parameters_pb2.py
%%PYTHON_SITELIBDIR%%/ortools/sat/sat_parameters_pb2.pyi
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/__init__.py
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/_pywraprcpsp.so
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/jobshop_scheduling_pb2.py
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/jobshop_scheduling_pb2.pyi
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/pywraprcpsp.py
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/rcpsp_pb2.py
+%%PYTHON_SITELIBDIR%%/ortools/scheduling/rcpsp_pb2.pyi
%%PYTHON_SITELIBDIR%%/ortools/util/__init__.py
%%PYTHON_SITELIBDIR%%/ortools/util/_sorted_interval_list.so
%%PYTHON_SITELIBDIR%%/ortools/util/optional_boolean_pb2.py