diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -57,10 +57,10 @@ . endfor CMAKE_BIN= ${LOCALBASE}/bin/cmake -BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake +BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core . if ${cmake_ARGS:Mrun} -RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake +RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core . endif . if defined(WITH_DEBUG) diff --git a/devel/Makefile b/devel/Makefile --- a/devel/Makefile +++ b/devel/Makefile @@ -388,9 +388,11 @@ SUBDIR += cltune SUBDIR += clxclient SUBDIR += cmake + SUBDIR += cmake-core SUBDIR += cmake-doc SUBDIR += cmake-fedora SUBDIR += cmake-gui + SUBDIR += cmake-man SUBDIR += cmake-modules-webos SUBDIR += cmakedoc SUBDIR += cmph diff --git a/devel/cmake-core/Makefile b/devel/cmake-core/Makefile new file mode 100644 --- /dev/null +++ b/devel/cmake-core/Makefile @@ -0,0 +1,95 @@ +PORTNAME= cmake +# Remember to update devel/cmake-doc and devel/cmake-gui as well. +DISTVERSION= 3.23.3 +CATEGORIES= devel +MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ + https://www.cmake.org/files/v${PORTVERSION}/ +PKGNAMESUFFIX= -core + +MAINTAINER= kde@FreeBSD.org +COMMENT= Cross-platform Makefile generator + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/Copyright.txt + +LIB_DEPENDS= libcurl.so:ftp/curl \ + libexpat.so:textproc/expat2 \ + libjsoncpp.so:devel/jsoncpp \ + libuv.so:devel/libuv \ + librhash.so:security/rhash + +USES= compiler:c++11-lang cpe ncurses + +CPE_VENDOR= cmake_project +HAS_CONFIGURE= yes +CONFIGURE_ENV= MAKE=make +CONFIGURE_ARGS= --prefix=${PREFIX} \ + --datadir="/${DATADIR_REL}" \ + --docdir="/${DOCSDIR_REL}" \ + --system-libs \ + --parallel=${MAKE_JOBS_NUMBER} \ + --init="${WRKSRC}/InitialCache.cmake" + +OPTIONS_DEFINE= DOCS CPACK +OPTIONS_SUB= yes + +CPACK_DESC= Enable FreeBSD generator in CPack (experimental) +CPACK_LIB_DEPENDS= libpkg.so:${PKG_ORIGIN} +CPACK_USES_OFF= libarchive +# When CPACK is on, uses base libarchive and won't pass stage-qa + +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" + +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 + @${FIND} ${WRKSRC} -name "*.bak" -delete -o -name "*.orig" -delete + +# 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/distinfo b/devel/cmake-core/distinfo rename from devel/cmake/distinfo rename to devel/cmake-core/distinfo diff --git a/devel/cmake/files/InitialCache.cmake b/devel/cmake-core/files/InitialCache.cmake rename from devel/cmake/files/InitialCache.cmake rename to devel/cmake-core/files/InitialCache.cmake diff --git a/devel/cmake/files/patch-Modules_FindBoost.cmake b/devel/cmake-core/files/patch-Modules_FindBoost.cmake rename from devel/cmake/files/patch-Modules_FindBoost.cmake rename to devel/cmake-core/files/patch-Modules_FindBoost.cmake diff --git a/devel/cmake/files/patch-Modules_FindFLEX.cmake b/devel/cmake-core/files/patch-Modules_FindFLEX.cmake rename from devel/cmake/files/patch-Modules_FindFLEX.cmake rename to devel/cmake-core/files/patch-Modules_FindFLEX.cmake diff --git a/devel/cmake/files/patch-Modules_FindOpenMP.cmake b/devel/cmake-core/files/patch-Modules_FindOpenMP.cmake rename from devel/cmake/files/patch-Modules_FindOpenMP.cmake rename to devel/cmake-core/files/patch-Modules_FindOpenMP.cmake diff --git a/devel/cmake/files/patch-Modules_FindSDL.cmake b/devel/cmake-core/files/patch-Modules_FindSDL.cmake rename from devel/cmake/files/patch-Modules_FindSDL.cmake rename to devel/cmake-core/files/patch-Modules_FindSDL.cmake diff --git a/devel/cmake/files/patch-Modules_Platform_FreeBSD-CXX.cmake b/devel/cmake-core/files/patch-Modules_Platform_FreeBSD-CXX.cmake rename from devel/cmake/files/patch-Modules_Platform_FreeBSD-CXX.cmake rename to devel/cmake-core/files/patch-Modules_Platform_FreeBSD-CXX.cmake diff --git a/devel/cmake/files/patch-Modules_Platform_FreeBSD.cmake b/devel/cmake-core/files/patch-Modules_Platform_FreeBSD.cmake rename from devel/cmake/files/patch-Modules_Platform_FreeBSD.cmake rename to devel/cmake-core/files/patch-Modules_Platform_FreeBSD.cmake diff --git a/devel/cmake-core/pkg-descr b/devel/cmake-core/pkg-descr new file mode 100644 --- /dev/null +++ b/devel/cmake-core/pkg-descr @@ -0,0 +1,11 @@ +CMake is used to control the software compilation process using simple +platform and compiler independent configuration files. CMake generates native +makefiles and workspaces that can be used in the compiler environment of your +choice. CMake is quite sophisticated: it is possible to support complex +environments requiring system configuration, pre-processor generation, code +generation, and template instantiation. + +This port contains CMake core software used by projects depending on CMake +to build. + +WWW: http://www.cmake.org/ diff --git a/devel/cmake/pkg-plist b/devel/cmake-core/pkg-plist rename from devel/cmake/pkg-plist rename to devel/cmake-core/pkg-plist --- a/devel/cmake/pkg-plist +++ b/devel/cmake-core/pkg-plist @@ -3029,28 +3029,5 @@ %%DATADIR%%/Templates/Windows/StoreLogo.png %%DATADIR%%/Templates/Windows/Windows_TemporaryKey.pfx %%DATADIR%%/include/cmCPluginAPI.h -%%MANPAGES%%man/man1/ccmake.1.gz -%%MANPAGES%%man/man1/cmake.1.gz -%%MANPAGES%%man/man1/cpack.1.gz -%%MANPAGES%%man/man1/ctest.1.gz -%%MANPAGES%%man/man7/cmake-buildsystem.7.gz -%%MANPAGES%%man/man7/cmake-commands.7.gz -%%MANPAGES%%man/man7/cmake-compile-features.7.gz -%%MANPAGES%%man/man7/cmake-developer.7.gz -%%MANPAGES%%man/man7/cmake-env-variables.7.gz -%%MANPAGES%%man/man7/cmake-file-api.7.gz -%%MANPAGES%%man/man7/cmake-generator-expressions.7.gz -%%MANPAGES%%man/man7/cmake-generators.7.gz -%%MANPAGES%%man/man7/cmake-language.7.gz -%%MANPAGES%%man/man7/cmake-modules.7.gz -%%MANPAGES%%man/man7/cmake-packages.7.gz -%%MANPAGES%%man/man7/cmake-policies.7.gz -%%MANPAGES%%man/man7/cmake-presets.7.gz -%%MANPAGES%%man/man7/cmake-properties.7.gz -%%MANPAGES%%man/man7/cmake-qt.7.gz -%%MANPAGES%%man/man7/cmake-server.7.gz -%%MANPAGES%%man/man7/cmake-toolchains.7.gz -%%MANPAGES%%man/man7/cmake-variables.7.gz -%%MANPAGES%%man/man7/cpack-generators.7.gz %%PORTDOCS%%%%DOCSDIR%%/Copyright.txt %%PORTDOCS%%%%DOCSDIR%%/cmsys/Copyright.txt diff --git a/devel/cmake-doc/Makefile b/devel/cmake-doc/Makefile --- a/devel/cmake-doc/Makefile +++ b/devel/cmake-doc/Makefile @@ -12,7 +12,7 @@ BUILD_DEPENDS= sphinx-build:textproc/py-sphinx -DISTINFO_FILE= ${.CURDIR}/../cmake/distinfo +DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo NO_ARCH= yes USES= cmake qt:5 diff --git a/devel/cmake-gui/Makefile b/devel/cmake-gui/Makefile --- a/devel/cmake-gui/Makefile +++ b/devel/cmake-gui/Makefile @@ -44,7 +44,7 @@ INSTALL_WRKSRC= ${WRKSRC}/Source/QtDialog -DISTINFO_FILE= ${.CURDIR}/../cmake/distinfo +DISTINFO_FILE= ${.CURDIR}/../cmake-core/distinfo post-patch: @(${FIND} ${WRKSRC}/Modules -name "*.cmake" -print0; \ diff --git a/devel/cmake-man/Makefile b/devel/cmake-man/Makefile new file mode 100644 --- /dev/null +++ b/devel/cmake-man/Makefile @@ -0,0 +1,35 @@ +PORTNAME= cmake +DISTVERSION= 3.23.3 +CATEGORIES= devel +MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ + https://www.cmake.org/files/v${DISTVERSION}/ +PKGNAMESUFFIX= -man + +MAINTAINER= kde@FreeBSD.org +COMMENT= Manual pages for CMake + +LICENSE= BSD3CLAUSE + +BUILD_DEPENDS= sphinx-build:textproc/py-sphinx + +USES= cmake +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}" +CMAKE_SOURCE_PATH= ${WRKSRC}/Utilities/Sphinx + +ALL_TARGET= documentation +INSTALL_TARGET= install + +PLIST_SUB= CMAKEVERSION="${DISTVERSION:S/.//g:C/-.*//}" + +post-install: +# Installed by devel/cmake-gui + @${RM} ${STAGEDIR}${PREFIX}/man/man1/cmake-gui.1 + +.include diff --git a/devel/cmake-man/pkg-descr b/devel/cmake-man/pkg-descr new file mode 100644 --- /dev/null +++ b/devel/cmake-man/pkg-descr @@ -0,0 +1,11 @@ +CMake is used to control the software compilation process using +simple platform and compiler independent configuration files. CMake +generates native makefiles and workspaces that can be used in the +compiler environment of your choice. CMake is quite sophisticated: +it is possible to support complex environments requiring system +configuration, pre-processor generation, code generation, and +template instantiation. + +This port contains CMake's manual pages + +WWW: https://www.cmake.org diff --git a/devel/cmake-man/pkg-plist b/devel/cmake-man/pkg-plist new file mode 100644 --- /dev/null +++ b/devel/cmake-man/pkg-plist @@ -0,0 +1,23 @@ +man/man1/ccmake.1.gz +man/man1/cmake.1.gz +man/man1/cpack.1.gz +man/man1/ctest.1.gz +man/man7/cmake-buildsystem.7.gz +man/man7/cmake-commands.7.gz +man/man7/cmake-compile-features.7.gz +man/man7/cmake-developer.7.gz +man/man7/cmake-env-variables.7.gz +man/man7/cmake-file-api.7.gz +man/man7/cmake-generator-expressions.7.gz +man/man7/cmake-generators.7.gz +man/man7/cmake-language.7.gz +man/man7/cmake-modules.7.gz +man/man7/cmake-packages.7.gz +man/man7/cmake-policies.7.gz +man/man7/cmake-presets.7.gz +man/man7/cmake-properties.7.gz +man/man7/cmake-qt.7.gz +man/man7/cmake-server.7.gz +man/man7/cmake-toolchains.7.gz +man/man7/cmake-variables.7.gz +man/man7/cpack-generators.7.gz diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile --- a/devel/cmake/Makefile +++ b/devel/cmake/Makefile @@ -1,99 +1,28 @@ PORTNAME= cmake -# Remember to update devel/cmake-doc and devel/cmake-gui as well. DISTVERSION= 3.23.3 CATEGORIES= devel -MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ - https://www.cmake.org/files/v${PORTVERSION}/ MAINTAINER= kde@FreeBSD.org -COMMENT= Cross-platform Makefile generator +COMMENT= Meta-port to connect all CMake bits LICENSE= BSD3CLAUSE -LICENSE_FILE= ${WRKSRC}/Copyright.txt -LIB_DEPENDS= libcurl.so:ftp/curl \ - libexpat.so:textproc/expat2 \ - libjsoncpp.so:devel/jsoncpp \ - libuv.so:devel/libuv \ - librhash.so:security/rhash +USES= cmake:run metaport -USES= compiler:c++11-lang cpe ncurses +NO_LICENSES_INSTALL= yes +PLIST_FILES= # not applicable -CPE_VENDOR= cmake_project -HAS_CONFIGURE= yes -CONFIGURE_ENV= MAKE=make -CONFIGURE_ARGS= --prefix=${PREFIX} \ - --datadir="/${DATADIR_REL}" \ - --docdir="/${DOCSDIR_REL}" \ - --system-libs \ - --parallel=${MAKE_JOBS_NUMBER} \ - --init="${WRKSRC}/InitialCache.cmake" +OPTIONS_DEFINE= DOCS GUI MANPAGES +OPTIONS_DEFAULT= MANPAGES -OPTIONS_DEFINE= DOCS MANPAGES CPACK -OPTIONS_DEFAULT=MANPAGES -OPTIONS_SUB= yes +DOCSADD_DESC= Additional HTML and Qt Creator helpfiles +GUI_DESC= Qt-based GUI -MANPAGES_USES= python:env -MANPAGES_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx -MANPAGES_CONFIGURE_ON= --sphinx-man +DOCS_RUN_DEPENDS= ${LOCALBASE}/share/doc/cmake/html/index.html:devel/cmake-doc +GUI_RUN_DEPENDS= ${LOCALBASE}/bin/cmake-gui:devel/cmake-gui +MANPAGES_RUN_DEPENDS= ${LOCALBASE}/man/man1/cmake.1.gz:devel/cmake-man -CPACK_DESC= Enable FreeBSD generator in CPack (experimental) -CPACK_LIB_DEPENDS= libpkg.so:${PKG_ORIGIN} -CPACK_USES_OFF= libarchive -# When CPACK is on, uses base libarchive and won't pass stage-qa +# Mk/Uses/cmake.mk sets do-configure which we don't want for a meta-port +do-configure: -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" - -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 - @${FIND} ${WRKSRC} -name "*.bak" -delete -o -name "*.orig" -delete - -# 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 +.include diff --git a/devel/cmake/pkg-descr b/devel/cmake/pkg-descr --- a/devel/cmake/pkg-descr +++ b/devel/cmake/pkg-descr @@ -5,4 +5,7 @@ environments requiring system configuration, pre-processor generation, code generation, and template instantiation. +This port a Meta-port to connect all related ports to CMake's distribution +such as CMake itself, documentation and frontends. + WWW: http://www.cmake.org/