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
This commit is contained in:
parent
513910e35a
commit
b23ea4e2d2
@ -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)
|
||||
|
@ -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
|
||||
|
96
devel/cmake-core/Makefile
Normal file
96
devel/cmake-core/Makefile
Normal file
@ -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>
|
9
devel/cmake-core/pkg-descr
Normal file
9
devel/cmake-core/pkg-descr
Normal file
@ -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.
|
@ -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
|
@ -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
|
||||
|
@ -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; \
|
||||
|
36
devel/cmake-man/Makefile
Normal file
36
devel/cmake-man/Makefile
Normal file
@ -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>
|
9
devel/cmake-man/pkg-descr
Normal file
9
devel/cmake-man/pkg-descr
Normal file
@ -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
|
23
devel/cmake-man/pkg-plist
Normal file
23
devel/cmake-man/pkg-plist
Normal file
@ -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
|
@ -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 MANPAGES CPACK
|
||||
OPTIONS_DEFINE= DOCS GUI MANPAGES
|
||||
OPTIONS_DEFAULT= MANPAGES
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
MANPAGES_USES= python:env
|
||||
MANPAGES_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
|
||||
MANPAGES_CONFIGURE_ON= --sphinx-man
|
||||
GUI_DESC= Qt-based GUI
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
CXXFLAGS+= -D__BSD_VISIBLE
|
||||
# Mk/Uses/cmake.mk sets do-configure which we don't want for a meta-port
|
||||
do-configure:
|
||||
|
||||
.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>
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user