1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

devel/cmake: allow consumers to qualify boost_python version

PR:		227428
Exp-run by:	antoine
This commit is contained in:
Jan Beich 2018-04-18 13:58:15 +00:00
parent cc95712fbe
commit 297facc037
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=467712
3 changed files with 25 additions and 1 deletions

View File

@ -663,6 +663,7 @@ PY_FUTURES= ${PYTHON_PKGNAMEPREFIX}futures>0:devel/py-futures@${PY_FLAVOR}
PY_FUTURES=
.endif
CMAKE_ARGS+= -DBOOST_PYTHON_SUFFIX:STRING=${PYTHON_SUFFIX}
PY_BOOST_LIB= boost_python${PYTHON_SUFFIX}
PY_BOOST= lib${PY_BOOST_LIB}.so:devel/boost-python-libs@${PY_FLAVOR}

View File

@ -4,7 +4,7 @@
PORTNAME= cmake
# Remember to update devel/cmake-doc and devel/cmake-gui as well.
DISTVERSION= 3.11.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/

View File

@ -0,0 +1,23 @@
--- Modules/FindBoost.cmake.orig 2018-03-28 11:16:49 UTC
+++ Modules/FindBoost.cmake
@@ -55,6 +55,7 @@
# (or BOOSTROOT)
# BOOST_INCLUDEDIR - Preferred include directory e.g. <prefix>/include
# BOOST_LIBRARYDIR - Preferred library directory e.g. <prefix>/lib
+# BOOST_PYTHON_SUFFIX - Preferred Python version
# Boost_NO_SYSTEM_PATHS - Set to ON to disable searching in locations not
# specified by these hint variables. Default is OFF.
# Boost_ADDITIONAL_VERSIONS
@@ -1663,10 +1664,10 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
# Handle Python version suffixes
unset(COMPONENT_PYTHON_VERSION_MAJOR)
unset(COMPONENT_PYTHON_VERSION_MINOR)
- if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
+ if(${COMPONENT}${BOOST_PYTHON_SUFFIX} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
- elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
+ elseif(${COMPONENT}${BOOST_PYTHON_SUFFIX} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")