git: 97c31b93991c - main - devel/cmake*: Pet portclippy(1) and migrate to Qt6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Feb 2024 23:25:04 UTC
The branch main has been updated by jhale:
URL: https://cgit.FreeBSD.org/ports/commit/?id=97c31b93991c7a4bef0b2e8a5f8ec6c42e3e7d86
commit 97c31b93991c7a4bef0b2e8a5f8ec6c42e3e7d86
Author: Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-02-03 21:34:32 +0000
Commit: Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-02-03 23:19:43 +0000
devel/cmake*: Pet portclippy(1) and migrate to Qt6
Migrate towards Qt6:
- Switch the default flavor of devel/cmake-gui to qt6.
- Use qt6-tools instead of qt5-help in devel/cmake-doc to generate the Qt
help file.
Depend on the flavorized version of textproc/py-sphinx.
Pet portclippy(1) and portlint(1) and make Makefile order more consistent
within the devel/cmake* ports. Remove duplicate DISTINFO_FILE line from
devel/cmake-man. [1]
Make build of devel/cmake-core verbose [2] and respect WITH_CCACHE_BUILD
in bootstrapping phase.
Remove the "experimental" annotation from the CPACK option in
devel/cmake-core to avoid end-user confusion. [3] The FreeBSD CPack
generator has been marked experimental since version 3.11.4, but is
supported upstream and shouldn't be considered experimental even if
we've had to make some local changes to it. If it isn't working
correctly, please file a bug report.
PR: 276792 [1], 276782[2], 274640 [3]
Reported by: diizzy [1], Anton Saietskii <vsasjason@gmail.com> [2],
Martin Waschbüsch <martin@waschbuesch.de> [3]
---
devel/cmake-core/Makefile | 17 +++++++++++------
.../patch-Source_CPack_cmCPackFreeBSDGenerator.cxx | 6 ++----
devel/cmake-doc/Makefile | 19 ++++++++++---------
devel/cmake-gui/Makefile | 7 ++++---
devel/cmake-man/Makefile | 17 ++++++++---------
5 files changed, 35 insertions(+), 31 deletions(-)
diff --git a/devel/cmake-core/Makefile b/devel/cmake-core/Makefile
index 127a5da4982c..c7d1054c060b 100644
--- a/devel/cmake-core/Makefile
+++ b/devel/cmake-core/Makefile
@@ -17,10 +17,9 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 \
librhash.so:security/rhash
USES= cmake:_internal compiler:c++11-lang cpe localbase ncurses ssl
-
CPE_VENDOR= cmake_project
+
HAS_CONFIGURE= yes
-CONFIGURE_ENV= MAKE=make
CONFIGURE_ARGS= --prefix=${PREFIX} \
--datadir="/${DATADIR_REL}" \
--docdir="/${DOCSDIR_REL}" \
@@ -37,21 +36,25 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \
--no-system-curl \
--no-system-nghttp2 \
--parallel=${MAKE_JOBS_NUMBER} \
+ --verbose \
--init="${WRKSRC}/InitialCache.cmake"
+.if defined(WITH_CCACHE_BUILD)
+CONFIGURE_ARGS+= --enable-ccache
+.endif
+CONFIGURE_ENV= MAKE=${MAKE}
-# Quick fix to enable build with non-base SSL (PR: 274512)
+# Quick fix to enable build with non-base SSL (CFLAGS/LDFLAGS only) (PR: 274512)
CFLAGS+= -I${OPENSSLINC}
+CXXFLAGS+= -D__BSD_VISIBLE
LDFLAGS+= -L${OPENSSLLIB}
OPTIONS_DEFINE= DOCS CPACK
OPTIONS_DEFAULT= CPACK
OPTIONS_SUB= yes
-CPACK_DESC= Enable FreeBSD generator in CPack (experimental)
+CPACK_DESC= Enable FreeBSD generator in CPack
CPACK_LIB_DEPENDS= libpkg.so:${PKG_ORIGIN}
-CXXFLAGS+= -D__BSD_VISIBLE
-
.include <bsd.port.pre.mk>
.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG)
@@ -93,6 +96,8 @@ post-patch:
${WRKSRC}/Modules/FindDCMTK.cmake
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/Modules/FindFLEX.cmake
+ @${REINPLACE_CMD} -e 's|_compiler=\"ccache|_compiler="${CCACHE_BIN}|g' \
+ ${WRKSRC}/bootstrap
# cmake-gui(1) is installed by devel/cmake-gui. Remove the man page's source to
# prevent it from being built/installed by devel/cmake.
diff --git a/devel/cmake-core/files/patch-Source_CPack_cmCPackFreeBSDGenerator.cxx b/devel/cmake-core/files/patch-Source_CPack_cmCPackFreeBSDGenerator.cxx
index c07173192de8..ed30e1aa305d 100644
--- a/devel/cmake-core/files/patch-Source_CPack_cmCPackFreeBSDGenerator.cxx
+++ b/devel/cmake-core/files/patch-Source_CPack_cmCPackFreeBSDGenerator.cxx
@@ -1,8 +1,6 @@
-diff --git Source/CPack/cmCPackFreeBSDGenerator.cxx Source/CPack/cmCPackFreeBSDGenerator.cxx
-index 162dfc7346..206f2d06a0 100644
---- Source/CPack/cmCPackFreeBSDGenerator.cxx
+--- Source/CPack/cmCPackFreeBSDGenerator.cxx.orig 2024-01-29 20:01:32 UTC
+++ Source/CPack/cmCPackFreeBSDGenerator.cxx
-@@ -245,8 +245,15 @@ public:
+@@ -245,8 +245,15 @@ class ManifestKeyDepsValue : public ManifestKeyListVal
void write_value(cmGeneratedFileStream& s) const override
{
s << "{\n";
diff --git a/devel/cmake-doc/Makefile b/devel/cmake-doc/Makefile
index 4da5ba04af7d..0a8bfeb3690e 100644
--- a/devel/cmake-doc/Makefile
+++ b/devel/cmake-doc/Makefile
@@ -1,5 +1,6 @@
PORTNAME= cmake
DISTVERSION= ${_CMAKE_VERSION}
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMESUFFIX= -doc
@@ -10,24 +11,24 @@ WWW= https://www.cmake.org
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/Copyright.txt
-BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
+BUILD_DEPENDS= sphinx-build:textproc/py-sphinx@${PY_FLAVOR}
-DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo
-
-NO_ARCH= yes
-USES= cmake qt:5
-USE_QT= help:build
+USES= cmake python:build qt:6
USE_LOCALE= en_US.UTF-8
+USE_QT= sqldriver-sqlite:build tools:build
-CMAKE_OFF= SPHINX_MAN
-CMAKE_ON= SPHINX_HTML SPHINX_QTHELP
CMAKE_ARGS= -DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
- -DQHELPGENERATOR_EXECUTABLE=${QT_BINDIR}/qhelpgenerator
+ -DQHELPGENERATOR_EXECUTABLE=${QT_TOOLDIR}/qhelpgenerator
+CMAKE_ON= SPHINX_HTML SPHINX_QTHELP
+CMAKE_OFF= SPHINX_MAN
CMAKE_SOURCE_PATH= ${WRKSRC}/Utilities/Sphinx
ALL_TARGET= documentation
INSTALL_TARGET= install
+NO_ARCH= yes
+
+DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo
PLIST_SUB= CMAKEVERSION="${DISTVERSION:S/.//g:C/-.*//}"
.include <bsd.port.mk>
diff --git a/devel/cmake-gui/Makefile b/devel/cmake-gui/Makefile
index 891d82a48971..d80d834b5ff3 100644
--- a/devel/cmake-gui/Makefile
+++ b/devel/cmake-gui/Makefile
@@ -1,5 +1,6 @@
PORTNAME= cmake
DISTVERSION= ${_CMAKE_VERSION}
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMESUFFIX= -gui-${FLAVOR}
@@ -10,7 +11,7 @@ WWW= https://www.cmake.org
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/Copyright.txt
-BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
+BUILD_DEPENDS= sphinx-build:textproc/py-sphinx@${PY_FLAVOR}
LIB_DEPENDS= libcurl.so:ftp/curl \
libexpat.so:textproc/expat2 \
libjsoncpp.so:devel/jsoncpp \
@@ -18,12 +19,12 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
librhash.so:security/rhash
FLAVORS= qt5 qt6
-FLAVOR?= qt5
+FLAVOR?= qt6
qt5_CONFLICTS_INSTALL= cmake-gui-qt6
qt6_CONFLICTS_INSTALL= cmake-gui-qt5
USES= cmake:run,insource compiler:c++11-lang desktop-file-utils libarchive \
- shared-mime-info qt:${FLAVOR:S/qt//}
+ python:build shared-mime-info qt:${FLAVOR:S/qt//}
_USE_QT_qt5= core gui widgets buildtools:build qmake:build
_USE_QT_qt6= base
USE_QT= ${_USE_QT_${FLAVOR}}
diff --git a/devel/cmake-man/Makefile b/devel/cmake-man/Makefile
index 1be3e0ec0420..80773d21b2a9 100644
--- a/devel/cmake-man/Makefile
+++ b/devel/cmake-man/Makefile
@@ -1,5 +1,6 @@
PORTNAME= cmake
DISTVERSION= ${_CMAKE_VERSION}
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMESUFFIX= -man
@@ -9,25 +10,23 @@ WWW= https://www.cmake.org/
LICENSE= BSD3CLAUSE
-DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo
-
-BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
+BUILD_DEPENDS= sphinx-build:textproc/py-sphinx@${PY_FLAVOR}
-USES= cmake
+USES= cmake python:build
USE_LOCALE= en_US.UTF-8
-NO_ARCH= yes
-DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo
-
-CMAKE_OFF= SPHINX_HTML SPHINX_QTHELP
-CMAKE_ON= SPHINX_MAN
CMAKE_ARGS= -DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
-DCMAKE_MAN_DIR:STRING="share/man"
+CMAKE_ON= SPHINX_MAN
+CMAKE_OFF= SPHINX_HTML SPHINX_QTHELP
CMAKE_SOURCE_PATH= ${WRKSRC}/Utilities/Sphinx
ALL_TARGET= documentation
INSTALL_TARGET= install
+NO_ARCH= yes
+
+DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo
PLIST_SUB= CMAKEVERSION="${DISTVERSION:S/.//g:C/-.*//}"
post-install: