diff --git a/math/py-or-tools/Makefile b/math/py-or-tools/Makefile index 701a29736dcb..fee318c63cf7 100644 --- a/math/py-or-tools/Makefile +++ b/math/py-or-tools/Makefile @@ -1,7 +1,6 @@ PORTNAME= or-tools DISTVERSIONPREFIX= v -DISTVERSION= 9.5 -PORTREVISION= 9 +DISTVERSION= 9.10 CATEGORIES= math PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -19,9 +18,9 @@ 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} \ - ${PY_SETUPTOOLS} \ pybind11>0:devel/pybind11 \ protoc-gen-mypy:devel/py-mypy-protobuf@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mypy>0:devel/py-mypy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}virtualenv>0:devel/py-virtualenv@${PY_FLAVOR} \ @@ -48,8 +47,10 @@ USE_PYTHON= flavors pytest # tests fail, see https://github.com/google/or-tools/ USE_GITHUB= yes GH_ACCOUNT= google -CMAKE_OFF= BUILD_DEPS BUILD_pybind11 INSTALL_BUILD_DEPS BUILD_TESTING BUILD_EXAMPLES -CMAKE_ON= BUILD_PYTHON +#CMAKE_OFF= BUILD_DEPS BUILD_pybind11 BUILD_pybind11_abseil BUILD_pybind11_protobuf INSTALL_BUILD_DEPS BUILD_EXAMPLES BUILD_TESTING USE_HIGHS +CMAKE_OFF= BUILD_DEPS BUILD_pybind11 BUILD_pybind11_abseil INSTALL_BUILD_DEPS BUILD_EXAMPLES BUILD_TESTING USE_HIGHS +#CMAKE_OFF= BUILD_DEPS BUILD_pybind11 INSTALL_BUILD_DEPS BUILD_EXAMPLES BUILD_TESTING USE_HIGHS +CMAKE_ON= BUILD_PYTHON BUILD_pybind11_protobuf CMAKE_ARGS= -DSWIG_EXECUTABLE=${LOCALBASE}/bin/swig -DFREEBSD_PYTHON_VER=${PYTHON_VER} CONFIGURE_ENV= UNIX_CBC_DIR=${LOCALBASE} UNIX_CLP_DIR=${LOCALBASE} CXXFLAGS+= -DABSL_LEGACY_THREAD_ANNOTATIONS diff --git a/math/py-or-tools/distinfo b/math/py-or-tools/distinfo index f3b496e5344c..13ea1893b47b 100644 --- a/math/py-or-tools/distinfo +++ b/math/py-or-tools/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1672604938 -SHA256 (google-or-tools-v9.5_GH0.tar.gz) = 57f81b94949d35dc042690db3fa3f53245cffbf6824656e1a03f103a3623c939 -SIZE (google-or-tools-v9.5_GH0.tar.gz) = 14795911 +TIMESTAMP = 1717261937 +SHA256 (google-or-tools-v9.10_GH0.tar.gz) = e7c27a832f3595d4ae1d7e53edae595d0347db55c82c309c8f24227e675fd378 +SIZE (google-or-tools-v9.10_GH0.tar.gz) = 20465445 diff --git a/math/py-or-tools/files/patch-abseil b/math/py-or-tools/files/patch-abseil deleted file mode 100644 index eccc97345062..000000000000 --- a/math/py-or-tools/files/patch-abseil +++ /dev/null @@ -1,20 +0,0 @@ ---- ortools/lp_data/lp_parser.cc.orig 2022-11-25 09:21:54 UTC -+++ ortools/lp_data/lp_parser.cc -@@ -185,7 +185,7 @@ bool LPParser::ParseIntegerVariablesList(StringPiece l - - bool LPParser::ParseConstraint(StringPiece constraint) { - const StatusOr parsed_constraint_or_status = -- ::operations_research::glop::ParseConstraint(constraint.as_string()); -+ ::operations_research::glop::ParseConstraint(std::string(constraint)); - if (!parsed_constraint_or_status.ok()) return false; - const ParsedConstraint& parsed_constraint = - parsed_constraint_or_status.value(); -@@ -414,7 +414,7 @@ StatusOr ParseConstraint(absl::strin - if (ConsumeToken(&constraint, &consumed_name, &consumed_coeff) != - TokenType::END) { - return absl::InvalidArgumentError(absl::StrCat( -- "End of input was expected, found: ", constraint.as_string())); -+ "End of input was expected, found: ", std::string(constraint))); - } - } - diff --git a/math/py-or-tools/files/patch-cmake_python.cmake b/math/py-or-tools/files/patch-cmake_python.cmake index 487171ac1b2b..cfe8c318e98f 100644 --- a/math/py-or-tools/files/patch-cmake_python.cmake +++ b/math/py-or-tools/files/patch-cmake_python.cmake @@ -1,6 +1,6 @@ ---- cmake/python.cmake.orig 2022-11-25 09:21:54 UTC +--- cmake/python.cmake.orig 2024-05-06 09:47:02 UTC +++ cmake/python.cmake -@@ -40,7 +40,7 @@ if(UNIX AND NOT APPLE) +@@ -40,7 +40,7 @@ endif() endif() # Find Python 3 @@ -9,15 +9,17 @@ list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") # Find if the python module is available, -@@ -367,9 +367,9 @@ if(BUILD_VENV) +@@ -590,10 +590,10 @@ if(BUILD_VENV) # 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 ${PYTHON_PROJECT}==${PROJECT_VERSION} + --no-index --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT}==${PROJECT_VERSION} # install modules only required to run examples -- COMMAND ${VENV_Python3_EXECUTABLE} -m pip install pandas matplotlib pytest -+ #COMMAND ${VENV_Python3_EXECUTABLE} -m pip install pandas matplotlib pytest +- COMMAND ${VENV_Python3_EXECUTABLE} -m pip install +- pandas matplotlib pytest scipy svgwrite ++ #COMMAND ${VENV_Python3_EXECUTABLE} -m pip install ++ # pandas matplotlib pytest scipy svgwrite BYPRODUCTS ${VENV_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Create venv and install ${PYTHON_PROJECT}" diff --git a/math/py-or-tools/files/patch-ortools_util_zvector.h b/math/py-or-tools/files/patch-ortools_util_zvector.h deleted file mode 100644 index 58e86097df4b..000000000000 --- a/math/py-or-tools/files/patch-ortools_util_zvector.h +++ /dev/null @@ -1,14 +0,0 @@ ---- ortools/util/zvector.h.orig 2020-12-09 16:30:21 UTC -+++ ortools/util/zvector.h -@@ -17,7 +17,11 @@ - #if (defined(__APPLE__) || defined(__FreeBSD__)) && defined(__GNUC__) - #include - #elif !defined(_MSC_VER) -+#if defined(__FreeBSD__) -+#include -+#else - #include -+#endif - #endif - #include - #include