Really update libcharon to 4.8

N.B. the wrinkle in cmake build here.
find_package(Pythoninterp 3.4 REQUIRED) can find your install Python 3.9
instead of the DEFAULT Python. Force the correct one with a few patches.

PR:		ports/251236
Submitted by:	sko@rostwald.de
Reported by:	trombik1973@gmail.com
This commit is contained in:
Diane Bruce 2021-01-13 23:19:06 +00:00
parent b4553f4060
commit e5daec898c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=561522
3 changed files with 38 additions and 5 deletions

View file

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= libCharon
DISTVERSION= 4.7.1
DISTVERSION= 4.8.0
CATEGORIES= net devel cad
DIST_SUBDIR= Ultimaker
@ -16,7 +16,10 @@ STRIP=
USE_GITHUB= yes
GH_ACCOUNT= Ultimaker
GH_TAGNAME= c34738dd
#GH_TAGNAME= c34738d
CMAKE_ARGS+= -DPYTHON_EXECUTABLE:STRING=${PYTHON_CMD} \
-DPYTHONPREFIX_SITELIBDIR:STRING=${PYTHONPREFIX_SITELIBDIR}
NO_ARCH= yes
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1600557973
SHA256 (Ultimaker/Ultimaker-libCharon-4.7.1-c34738dd_GH0.tar.gz) = cea1dd86c54cfdbe6e1d996fa01083d4c7c4b26301c523a2294d69ea53d7f109
SIZE (Ultimaker/Ultimaker-libCharon-4.7.1-c34738dd_GH0.tar.gz) = 151232
TIMESTAMP = 1610491353
SHA256 (Ultimaker/Ultimaker-libCharon-4.8.0_GH0.tar.gz) = 94ce4e3ac2a8fe63a698feef190bf06fc6f617710b7df61cbe91cd7d0b49c0bf
SIZE (Ultimaker/Ultimaker-libCharon-4.8.0_GH0.tar.gz) = 151223

View file

@ -0,0 +1,30 @@
--- CMakeLists.txt.orig 2020-04-16 10:34:42 UTC
+++ CMakeLists.txt
@@ -15,13 +15,27 @@ else()
find_package(Python3 3.4 REQUIRED COMPONENTS Interpreter)
endif()
+if (NOT PYTHON_EXECUTABLE STREQUAL "" )
+ set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
+ message("Using given PYTHON_EXECUTABLE")
+endif()
+if (NOT PYTHONPREFIX_SITELIBDIR STREQUAL "")
+ set(PYTHONPREFIX_SITELIBDIR ${PYTHONPREFIX_SITELIBDIR})
+ message("Using given PYTHONPREFIX_SITELIBDIR")
+endif()
+
option(INSTALL_SERVICE "Install the Charon DBus-service" ON)
option(INSTALL_CLIENT "Install the Charon Client library" ON)
+if ( NOT PYTHONPREFIX_SITELIBDIR STREQUAL "")
+ message("Using given PYTHONPREFIX_SITELIBDIR for CHARON_INSTALL_PATH")
+ set(CHARON_INSTALL_PATH ${PYTHONPREFIX_SITELIBDIR})
+else()
if(EXISTS /etc/debian_version)
set(CHARON_INSTALL_PATH lib${LIB_SUFFIX}/python${Python3_VERSION_MAJOR}/dist-packages)
else()
set(CHARON_INSTALL_PATH lib${LIB_SUFFIX}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages)
+endif()
endif()
set(_excludes PATTERN __pycache__ EXCLUDE)