git: b23ea4e2d2f5 - main - devel/cmake: Create a meta-port for CMake

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 08 Sep 2022 20:20:33 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b23ea4e2d2f51b53d8915fe9fd7b4efbdd575e38

commit b23ea4e2d2f51b53d8915fe9fd7b4efbdd575e38
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-09-08 03:43:52 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-09-08 20:14:05 +0000

    devel/cmake: Create a meta-port for CMake
    
    Create a meta-port for CMake to make it easier for the end user and
    better handling of build dependencies.
    
    This pushes devel/cmake into /devel/cmake-core and splits manpages and
    its dependencies to /devel/cmake-man
    
    Approved by:    kde (tcberner)
    Differential Revision:  https://reviews.freebsd.org/D34957
---
 Mk/Uses/cmake.mk                                   |  4 +-
 devel/Makefile                                     |  2 +
 devel/cmake-core/Makefile                          | 96 +++++++++++++++++++++
 devel/{cmake => cmake-core}/distinfo               |  0
 .../{cmake => cmake-core}/files/InitialCache.cmake |  0
 .../files/patch-Modules_FindBoost.cmake            |  0
 .../files/patch-Modules_FindFLEX.cmake             |  0
 .../files/patch-Modules_FindOpenMP.cmake           |  0
 .../files/patch-Modules_FindSDL.cmake              |  0
 .../files/patch-Modules_Platform_FreeBSD-CXX.cmake |  0
 .../files/patch-Modules_Platform_FreeBSD.cmake     |  0
 devel/cmake-core/pkg-descr                         |  9 ++
 devel/{cmake => cmake-core}/pkg-plist              | 23 -----
 devel/cmake-doc/Makefile                           |  2 +-
 devel/cmake-gui/Makefile                           |  2 +-
 devel/cmake-man/Makefile                           | 36 ++++++++
 devel/cmake-man/pkg-descr                          |  9 ++
 devel/cmake-man/pkg-plist                          | 23 +++++
 devel/cmake/Makefile                               | 99 +++-------------------
 devel/cmake/pkg-descr                              |  3 +
 20 files changed, 196 insertions(+), 112 deletions(-)

diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk
index eeaa2fda20f7..901d65e8fd57 100644
--- a/Mk/Uses/cmake.mk
+++ b/Mk/Uses/cmake.mk
@@ -57,10 +57,10 @@ IGNORE=	Incorrect 'USES+= cmake:${cmake_ARGS}' usage: argument [${arg}] is not r
 .  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
index 9cf3e51c930c..45f35f61cc72 100644
--- 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
index 000000000000..b1519391d252
--- /dev/null
+++ b/devel/cmake-core/Makefile
@@ -0,0 +1,96 @@
+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
+WWW=		https://www.cmake.org/
+
+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 <bsd.port.pre.mk>
+
+.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 <bsd.port.post.mk>
diff --git a/devel/cmake/distinfo b/devel/cmake-core/distinfo
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
similarity index 100%
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
index 000000000000..509face9c7dd
--- /dev/null
+++ b/devel/cmake-core/pkg-descr
@@ -0,0 +1,9 @@
+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.
diff --git a/devel/cmake/pkg-plist b/devel/cmake-core/pkg-plist
similarity index 99%
rename from devel/cmake/pkg-plist
rename to devel/cmake-core/pkg-plist
index 7d14a903a68c..10999bd4688c 100644
--- a/devel/cmake/pkg-plist
+++ b/devel/cmake-core/pkg-plist
@@ -3029,28 +3029,5 @@ share/vim/vimfiles/syntax/cmake.vim
 %%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
index a026768085a2..0d6b46a36a05 100644
--- a/devel/cmake-doc/Makefile
+++ b/devel/cmake-doc/Makefile
@@ -13,7 +13,7 @@ LICENSE_FILE=	${WRKSRC}/Copyright.txt
 
 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
index b0b27e300791..28d901083fa3 100644
--- a/devel/cmake-gui/Makefile
+++ b/devel/cmake-gui/Makefile
@@ -45,7 +45,7 @@ CXXFLAGS+=	-D__BSD_VISIBLE
 
 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
index 000000000000..47bd31bff60a
--- /dev/null
+++ b/devel/cmake-man/Makefile
@@ -0,0 +1,36 @@
+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
+WWW=		https://www.cmake.org/
+
+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 <bsd.port.mk>
diff --git a/devel/cmake-man/pkg-descr b/devel/cmake-man/pkg-descr
new file mode 100644
index 000000000000..debd09f2256c
--- /dev/null
+++ b/devel/cmake-man/pkg-descr
@@ -0,0 +1,9 @@
+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
diff --git a/devel/cmake-man/pkg-plist b/devel/cmake-man/pkg-plist
new file mode 100644
index 000000000000..b6c2bf8ae976
--- /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
index a438cd0f2d7b..224829f21f04 100644
--- a/devel/cmake/Makefile
+++ b/devel/cmake/Makefile
@@ -1,100 +1,29 @@
 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}/
+PORTREVISION=	1
 
 MAINTAINER=	kde@FreeBSD.org
-COMMENT=	Cross-platform Makefile generator
+COMMENT=	Meta-port to connect all CMake bits
 WWW=		https://www.cmake.org/
 
 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
+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 <bsd.port.pre.mk>
-
-.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 <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/cmake/pkg-descr b/devel/cmake/pkg-descr
index 0a9cf81b3d12..deade187cda3 100644
--- a/devel/cmake/pkg-descr
+++ b/devel/cmake/pkg-descr
@@ -4,3 +4,6 @@ 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 a Meta-port to connect all related ports to CMake's distribution
+such as CMake itself, documentation and frontends.