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 @@ -1,107 +1,112 @@ PORTNAME= cmake # Remember to update devel/cmake-doc and devel/cmake-gui as well. DISTVERSION= ${_CMAKE_VERSION} CATEGORIES= devel PKGNAMESUFFIX= -core MAINTAINER= kde@FreeBSD.org COMMENT= Cross-platform Makefile generator WWW= https://www.cmake.org/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/Copyright.txt LIB_DEPENDS= libexpat.so:textproc/expat2 \ libjsoncpp.so:devel/jsoncpp \ libuv.so:devel/libuv \ 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}" \ --system-expat \ --system-jsoncpp \ --system-zlib \ --system-zstd \ --system-bzip2 \ --system-liblzma \ --system-libarchive \ --system-librhash \ --system-libuv \ --no-system-cppdap \ --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 .if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) INSTALL_TARGET= install/strip .endif # Before running configure, substitute in the values of options # for the build. CMake's configure doesn't accept --with-foo # or similar options: it expects them to be set in CMake-style # syntax in the initial cache. pre-configure: @${CP} "${FILESDIR}/InitialCache.cmake" "${WRKSRC}/InitialCache.cmake" @${FIND} ${WRKSRC} -name "*.bak" -delete -o -name "*.orig" -delete pre-configure-CPACK-on: @${REINPLACE_CMD} \ -e 's/@@CPACK_OPTION_VALUE@@/ON/' \ -e 's/@@CPACK_OPTION_COMMENT@@//' \ "${WRKSRC}/InitialCache.cmake" pre-configure-CPACK-off: @${REINPLACE_CMD} \ -e 's/@@CPACK_OPTION_VALUE@@/OFF/' \ -e 's/@@CPACK_OPTION_COMMENT@@/# /' \ "${WRKSRC}/InitialCache.cmake" post-patch: @(${FIND} ${WRKSRC}/Modules -name "*.cmake" -print0; \ ${FIND} ${WRKSRC}/Tests -name "CMakeLists.txt" -print0 ) | \ ${XARGS} -0 -n 100 ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g; \ s,/usr/X11R6,${LOCALBASE},g' @${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \ ${WRKSRC}/Source/cmLocalGenerator.cxx \ ${WRKSRC}/Source/CPack/cmCPackGenerator.cxx \ ${WRKSRC}/bootstrap @${REINPLACE_CMD} -e 's,/opt/kde4,${PREFIX},g' \ ${WRKSRC}/Modules/FindKDE4.cmake @${REINPLACE_CMD} -e 's,/usr/include,${LOCALBASE}/include,' \ ${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. ${RM} ${WRKSRC}/Help/manual/cmake-gui.1.rst post-install: ${INSTALL_DATA} ${WRKSRC}/Auxiliary/cmake-mode.el ${STAGEDIR}${PREFIX}/share/emacs/site-lisp # The .NoDartCoverage is supposed to suppress testing in the # source directories, but gets accidentally installed. @${FIND} ${STAGEDIR}${PREFIX} -name ".NoDartCoverage" -delete .include 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,22 +1,20 @@ -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"; - for (std::string const& elem : value) { - s << " \"" << elem << R"(": {"origin": ")" << elem << "\"},\n"; + for (std::string const& origin : value) { + // Split the origin into its category and name components. + // Treat it like a path (which it sort-of is, in the ports tree). + // Because it is a "cat/name" style relative path, it gets split + // into "" "cat" and "name" parts. + std::vector originComponents; + cmSystemTools::SplitPath(origin, originComponents); + const std::string name = (originComponents.size() == 3) ? originComponents[2] : origin; + s << " \"" << name << R"(": {"origin": ")" << origin << "\"},\n"; } s << '}'; } 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,33 +1,34 @@ PORTNAME= cmake DISTVERSION= ${_CMAKE_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMESUFFIX= -doc MAINTAINER= kde@FreeBSD.org COMMENT= HTML and Qt Creator helpfiles for CMake 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 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,67 +1,68 @@ PORTNAME= cmake DISTVERSION= ${_CMAKE_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMESUFFIX= -gui-${FLAVOR} MAINTAINER= kde@FreeBSD.org COMMENT= Qt-based GUI for CMake 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 \ libuv.so:devel/libuv \ 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}} CMAKE_ARGS= -DCMAKE_DATA_DIR:STRING="/${DATADIR_REL}" \ -DCMAKE_DOC_DIR:STRING="/${DOCSDIR_REL}" \ -DCMake_QT_MAJOR_VERSION=${FLAVOR:S/qt//} CMAKE_ON= BUILD_QtDialog \ CMAKE_USE_SYSTEM_CURL \ CMAKE_USE_SYSTEM_EXPAT \ CMAKE_USE_SYSTEM_FORM \ CMAKE_USE_SYSTEM_JSONCPP \ CMAKE_USE_SYSTEM_LIBARCHIVE \ CMAKE_USE_SYSTEM_LIBRHASH \ CMAKE_USE_SYSTEM_LIBUV \ SPHINX_MAN CMAKE_OFF= BUILD_CursesDialog \ CMake_SPHINX_DEPEND_ON_EXECUTABLES \ CMAKE_USE_SYSTEM_CPPDAP ALL_TARGET= cmake-gui documentation CXXFLAGS+= -D__BSD_VISIBLE INSTALL_WRKSRC= ${WRKSRC}/Source/QtDialog DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo post-patch: @(${FIND} ${WRKSRC}/Modules -name "*.cmake" -print0; \ ${FIND} ${WRKSRC}/Tests -name "CMakeLists.txt" -print0 ) | \ ${XARGS} -0 -n 100 ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g; \ s,/usr/X11R6,${LOCALBASE},g' pre-install: ${LN} -sf ${CMAKE_BIN} ${WRKSRC}/bin post-install: ${INSTALL_MAN} ${WRKSRC}/Utilities/Sphinx/man/cmake-gui.1 \ ${STAGEDIR}${PREFIX}/share/man/man1 .include 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,37 +1,36 @@ PORTNAME= cmake DISTVERSION= ${_CMAKE_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMESUFFIX= -man MAINTAINER= kde@FreeBSD.org COMMENT= Manual pages for CMake 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: # Installed by devel/cmake-gui @${RM} ${STAGEDIR}${PREFIX}/share/man/man1/cmake-gui.1 .include