git: d0a6c40cb51b - main - math/{,py-}or-tools: Update 9.1 -> 9.2

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 20 Dec 2021 07:48:56 UTC
The branch main has been updated by yuri:

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

commit d0a6c40cb51b8d750f6bd8cd8c9842b76dedc3ec
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-12-20 07:28:06 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-12-20 07:48:51 +0000

    math/{,py-}or-tools: Update 9.1 -> 9.2
    
    Reported by:    portscout
---
 math/or-tools/Makefile                              |  6 ++++--
 math/or-tools/distinfo                              |  6 +++---
 math/or-tools/pkg-plist                             | 11 ++++++-----
 math/py-or-tools/Makefile                           | 10 +++-------
 math/py-or-tools/distinfo                           | 10 +++-------
 math/py-or-tools/files/patch-cmake_python.cmake     | 21 ++++++++++++---------
 .../files/patch-ortools_python_setup.py.in          | 12 +++++++-----
 math/py-or-tools/files/patch-tools_setup.py.in      | 12 +++++++-----
 8 files changed, 45 insertions(+), 43 deletions(-)

diff --git a/math/or-tools/Makefile b/math/or-tools/Makefile
index c6f0ef40a9e5..b092bc4f6400 100644
--- a/math/or-tools/Makefile
+++ b/math/or-tools/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	or-tools
 DISTVERSIONPREFIX=	v
-DISTVERSION=	9.1
+DISTVERSION=	9.2
 CATEGORIES=	math
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -24,13 +24,15 @@ LIB_DEPENDS=	libabsl_base.so:devel/abseil \
 		libglog.so:devel/glog \
 		libprotobuf.so:devel/protobuf
 
-USES=		blaslapack cmake compiler:c++17-lang pkgconfig
+USES=		blaslapack cmake:testing compiler:c++17-lang pkgconfig
 USE_GITHUB=	yes
 GH_ACCOUNT=	google
 USE_LDCONFIG=	yes
 
 CMAKE_OFF=	BUILD_PYTHON BUILD_DEPS INSTALL_BUILD_DEPS BUILD_EXAMPLES BUILD_SAMPLES
 CMAKE_ON=	BUILD_CXX
+CMAKE_TESTING_ON=	BUILD_EXAMPLES BUILD_CXX_EXAMPLES
+
 CONFIGURE_ENV=	UNIX_CBC_DIR=${LOCALBASE} UNIX_CLP_DIR=${LOCALBASE}
 
 OPTIONS_DEFINE=		FLATZINC SCIP
diff --git a/math/or-tools/distinfo b/math/or-tools/distinfo
index 90b53a5ca9c3..0ab443a1a46e 100644
--- a/math/or-tools/distinfo
+++ b/math/or-tools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1633363392
-SHA256 (google-or-tools-v9.1_GH0.tar.gz) = b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307
-SIZE (google-or-tools-v9.1_GH0.tar.gz) = 245524168
+TIMESTAMP = 1639967041
+SHA256 (google-or-tools-v9.2_GH0.tar.gz) = 5337935ea1fa010bb62cf0fc8bedd6de07dda77bff3db7a0f6a36c84c7bd58db
+SIZE (google-or-tools-v9.2_GH0.tar.gz) = 246278500
diff --git a/math/or-tools/pkg-plist b/math/or-tools/pkg-plist
index bf378b323d8d..a3b4846297e4 100644
--- a/math/or-tools/pkg-plist
+++ b/math/or-tools/pkg-plist
@@ -13,6 +13,7 @@ include/ortools/base/adjustable_priority_queue.h
 include/ortools/base/base_export.h
 include/ortools/base/basictypes.h
 include/ortools/base/bitmap.h
+include/ortools/base/case.h
 include/ortools/base/cleanup.h
 include/ortools/base/commandlineflags.h
 include/ortools/base/container_logging.h
@@ -39,7 +40,6 @@ include/ortools/base/protobuf_util.h
 include/ortools/base/protoutil.h
 include/ortools/base/ptr_util.h
 include/ortools/base/python-swig.h
-include/ortools/base/random.h
 include/ortools/base/raw_logging.h
 include/ortools/base/recordio.h
 include/ortools/base/small_map.h
@@ -159,6 +159,7 @@ include/ortools/linear_solver/scip_proto_solver.h
 include/ortools/lp_data/lp_data.h
 include/ortools/lp_data/lp_data_utils.h
 include/ortools/lp_data/lp_decomposer.h
+include/ortools/lp_data/lp_parser.h
 include/ortools/lp_data/lp_print_utils.h
 include/ortools/lp_data/lp_types.h
 include/ortools/lp_data/lp_utils.h
@@ -337,12 +338,12 @@ lib/cmake/ortools/ortoolsConfig.cmake
 lib/cmake/ortools/ortoolsConfigVersion.cmake
 lib/cmake/ortools/ortoolsTargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/ortools/ortoolsTargets.cmake
-%%FLATZINC%%lib/libflatzinc.so
-%%FLATZINC%%lib/libflatzinc.so.9
-%%FLATZINC%%lib/libflatzinc.so.9.1.9999
+lib/libflatzinc.so
+lib/libflatzinc.so.9
+lib/libflatzinc.so.9.2.9999
 lib/libortools.so
 lib/libortools.so.9
-lib/libortools.so.9.1.9999
+lib/libortools.so.9.2.9999
 %%FLATZINC%%share/minizinc/ortools/fzn_all_different_int.mzn
 %%FLATZINC%%share/minizinc/ortools/fzn_circuit.mzn
 %%FLATZINC%%share/minizinc/ortools/fzn_cumulative.mzn
diff --git a/math/py-or-tools/Makefile b/math/py-or-tools/Makefile
index 6620f812d36c..623d97c15228 100644
--- a/math/py-or-tools/Makefile
+++ b/math/py-or-tools/Makefile
@@ -1,13 +1,9 @@
 PORTNAME=	or-tools
 DISTVERSIONPREFIX=	v
-DISTVERSION=	9.1
+DISTVERSION=	9.2
 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)
 
@@ -16,8 +12,8 @@ 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}absl-py>0:devel/py-absl-py@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}mypy-protobuf>0:devel/py-mypy-protobuf@${PY_FLAVOR} \
+PY_DEPENDS=	${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}absl-py>0:devel/py-absl-py@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR}
 BUILD_DEPENDS=	${PY_DEPENDS} \
 		protoc-gen-mypy:devel/py-mypy-protobuf@${PY_FLAVOR} \
diff --git a/math/py-or-tools/distinfo b/math/py-or-tools/distinfo
index 93a796e356b3..c08313ca51fe 100644
--- a/math/py-or-tools/distinfo
+++ b/math/py-or-tools/distinfo
@@ -1,7 +1,3 @@
-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
+TIMESTAMP = 1639979871
+SHA256 (google-or-tools-v9.2_GH0.tar.gz) = 5337935ea1fa010bb62cf0fc8bedd6de07dda77bff3db7a0f6a36c84c7bd58db
+SIZE (google-or-tools-v9.2_GH0.tar.gz) = 246278500
diff --git a/math/py-or-tools/files/patch-cmake_python.cmake b/math/py-or-tools/files/patch-cmake_python.cmake
index a8ffda0d7611..8e5e3e4d5f7b 100644
--- a/math/py-or-tools/files/patch-cmake_python.cmake
+++ b/math/py-or-tools/files/patch-cmake_python.cmake
@@ -1,4 +1,4 @@
---- cmake/python.cmake.orig	2021-10-01 03:13:58 UTC
+--- cmake/python.cmake.orig	2021-12-14 20:57:53 UTC
 +++ cmake/python.cmake
 @@ -23,7 +23,7 @@ if(UNIX AND NOT APPLE)
  endif()
@@ -8,13 +8,16 @@
 +find_package(Python3 ${FREEBSD_PYTHON_VER} REQUIRED EXACT COMPONENTS Interpreter Development.Module)
  list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3")
  
- # 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
+ # Find if the python module is available,
+@@ -294,9 +294,9 @@ 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_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
+-    COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT}
++    COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --no-index --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT}
+     # install modules only required to run examples
+-    COMMAND ${VENV_Python3_EXECUTABLE} -m pip install pandas matplotlib
++    #COMMAND ${VENV_Python3_EXECUTABLE} -m pip install pandas matplotlib
      BYPRODUCTS ${VENV_DIR}
-     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM)
+     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+     COMMENT "Create venv and install ${PYTHON_PROJECT}"
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 16b2bc7ca247..b490847ca28a 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,17 @@
 See https://github.com/google/or-tools/issues/2305
 
---- ortools/python/setup.py.in.orig	2021-10-01 03:13:58 UTC
+--- ortools/python/setup.py.in.orig	2021-12-14 20:57:53 UTC
 +++ ortools/python/setup.py.in
-@@ -42,8 +42,8 @@ setup(
-     version='@PROJECT_VERSION@',
+@@ -43,9 +43,9 @@ setup(
      packages=find_packages(),
+     python_requires='>= 3.6',
      install_requires=[
--        'protobuf >= 3.18.0',
 -        'absl-py >= 0.13',
-+        #'protobuf >= 3.18.0',
+-        'numpy >= 1.13.3',
+-        'protobuf >= 3.19.1',
 +        #'absl-py >= 0.13',
++        #'numpy >= 1.13.3',
++        #'protobuf >= 3.19.1',
      ],
      package_data={
          '@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 1303279af5ec..02afbb69eed0 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,17 @@
 See https://github.com/google/or-tools/issues/2305
 
---- tools/setup.py.in.orig	2021-10-01 03:13:58 UTC
+--- tools/setup.py.in.orig	2021-12-14 20:57:53 UTC
 +++ tools/setup.py.in
-@@ -42,8 +42,8 @@ setup(
-     version='VVVV',
+@@ -43,9 +43,9 @@ setup(
      packages=find_packages(),
+     python_requires='>= 3.6',
      install_requires=[
--        'protobuf >= 3.18.0',
 -        'absl-py >= 0.13',
-+        #'protobuf >= 3.18.0',
+-        'numpy >= 1.13.3',
+-        'protobuf >= 3.19.1',
 +        #'absl-py >= 0.13',
++        #'numpy >= 1.13.3',
++        #'protobuf >= 3.19.1',
      ],
      package_data={
          'ortools.init' : ['_pywrapinit.dll', '*.pyi'],