git: 05149951ce60 - main - devel/pyside2*: optionize webengine support
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Mar 2022 19:56:40 UTC
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=05149951ce605c2781167299653b81577e5a2b64
commit 05149951ce605c2781167299653b81577e5a2b64
Author: Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-03-02 12:08:56 +0000
Commit: Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-03-22 19:50:31 +0000
devel/pyside2*: optionize webengine support
PR: 262558
Approved by: tcberner
---
devel/pyside2-tools/Makefile | 17 +++++++++++++----
devel/pyside2/Makefile | 14 +++++++++++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/devel/pyside2-tools/Makefile b/devel/pyside2-tools/Makefile
index 91efc9a1ecbe..c67e47025397 100644
--- a/devel/pyside2-tools/Makefile
+++ b/devel/pyside2-tools/Makefile
@@ -30,12 +30,21 @@ SHEBANG_FILES= pyside_tool.py
CMAKE_ARGS+= "-DUSE_PYTHON_VERSION=${PYTHON_VER}"
-.include <bsd.port.pre.mk>
-
WRKSRC= ${WRKDIR}/pyside-setup-opensource-src-${DISTVERSION:C/^([0-9].[0-9]+.[0-9])(.[0-9])?/\1/}/sources/pyside2-tools
-.if ${ARCH} == amd64 || ${ARCH} == i386
+OPTIONS_DEFINE_i386= WEBENGINE
+OPTIONS_DEFINE_amd64= WEBENGINE
+OPTIONS_DEFAULT_i386= WEBENGINE
+OPTIONS_DEFAULT_amd64= WEBENGINE
+
+WEBENGINE_DESC= Enable QtWebEngine support
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MWEBENGINE}
USE_QT+= webengine
+.else
+CMAKE_ARGS+= -DDISABLE_QtWebEngine:BOOL=TRUE
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/pyside2/Makefile b/devel/pyside2/Makefile
index e7211fb4fc05..e79b08c266ff 100644
--- a/devel/pyside2/Makefile
+++ b/devel/pyside2/Makefile
@@ -28,18 +28,26 @@ USE_QT= 3d buildtools_build charts concurrent core datavis3d declarative \
CMAKE_ARGS+= "-DUSE_PYTHON_VERSION=${PYTHON_VER}" \
"-DPYTHON_EXECUTABLE=${PYTHON_CMD}"
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE_i386= WEBENGINE
+OPTIONS_DEFINE_amd64= WEBENGINE
+OPTIONS_DEFAULT_i386= WEBENGINE
+OPTIONS_DEFAULT_amd64= WEBENGINE
+
+WEBENGINE_DESC= Enable QtWebEngine support
PLIST_SUB+= PYVERSTR=.cpython-${PYTHON_SUFFIX}${PYTHON_ABIVER}
PLIST_SUB+= DISTVERSION=${DISTVERSION}
WRKSRC= ${WRKDIR}/pyside-setup-opensource-src-${DISTVERSION:C/^([0-9].[0-9]+.[0-9])(.[0-9])?/\1/}/sources/pyside2
-.if ${ARCH} == amd64 || ${ARCH} == i386
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MWEBENGINE}
PLIST_SUB+= WEBENGINE=""
USE_QT+= webengine
.else
PLIST_SUB+= WEBENGINE="@comment "
+CMAKE_ARGS+= -DDISABLE_QtWebEngine:BOOL=TRUE
.endif
post-install:
@@ -50,4 +58,4 @@ post-install:
-f -d ${PYTHONPREFIX_SITELIBDIR} \
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>