dev-util/cmake: update to 3.18.5

Update dev-util/cmake to 3.18.5, as it is needed by dev-lang/rust 1.52.
Without that, building rust 1.52 simply fails at the early stage.
This commit is contained in:
Dongsu Park 2021-05-11 11:16:07 +02:00
parent fc655024f5
commit b18797dc23
20 changed files with 904 additions and 931 deletions

View File

@ -1,5 +1,4 @@
DIST cmake-3.10.2.tar.gz 7824452 BLAKE2B cc579f27d7d5668d1f375e7263e0b62212be1191735189d34b1f0aa921861ead5d3872388eebbb5136a72e3dec3920f1ebfb0bf45b642cf92eef02e4c8665d49 SHA512 f58fdd025285c9ff5396c0bd0d9573fc8a498fcbe5c11b336cb8ad6154ca6bc875c1a5e22d6654ba98596791ecf89ae8adffb83450839fa1275756b0af5bf82b DIST cmake-3.13.5.tar.gz 8618821 BLAKE2B 765678bc92821207c53bfb4ac995a791b938f20236c3a6fda873b8edd11cd1401b4f4c05f170b8f600f38bde5f1227c715499eee072a8de3bb29d4f5cd230226 SHA512 99e3a8f5bc147dd90b9cab11f06892d87f289aa1354ad323711fe96ebc9c32b1e887e8f9d3575a37831c4d2153a070ff9115c5e27a185d54170bad9dbbaabc26
DIST cmake-3.10.3.tar.gz 7825559 BLAKE2B 1db8c21abdcfac2612fa914d49f9edcf199240b714104dba1d470c8e1e487d8e6cc5d486febae88d4a71eb9419064bcf94f9bb2c779771323221c1f117baa693 SHA512 1ba6381321cb34c3c050548a1346d3b92d590a196d8aff7435c079cd485d01f7a6cd650ad97d00931aff424fcdc195bbaa6d9d7db679bf02f72f586c7b528ae4 DIST cmake-3.18.5.tar.gz 8975784 BLAKE2B 62ea68b602e7e352c22ba6122aa010fb78fb5c4e484aa51bc336e750280d5fc03ffa439bd8005d2c43176f5a5db4ebfd419beca65cc59c5b8cd5666e38394fb8 SHA512 c15e0937a9c0ce0b6164c3d02a147e679ea57e1119cff4189a15de71429a7facb3c04eb8db467471876b5da5dbd4a25acb228efa7101fe78efd205f0d2c96343
DIST cmake-3.11.0.tar.gz 7948287 BLAKE2B c56da8645d87bc06735e2afb9b8481918acd0a43e3fc96b6f58c1a311fa6a7a270a9be8d13d2106b3fcde802f8c084314717262edd760c7c7f06bd8c07f1fe69 SHA512 03b058483d236d4f4427c93cc41af77068c243fc4b6f24aeaf2daf97af215bc664bc1b733195463af4cfc94ec70076710f425661859d752ddf3b9610adca9834 DIST cmake-3.19.7.tar.gz 9271358 BLAKE2B 379b89c0d6bcfe81a397257cb3f95e4b4a8987566258f6d5b312e8ffd455fd07f09ed570c47111f9a519d76f43014b680e8242cddef13810ba87f9b9ec7e2e2f SHA512 6af1fe3ea41906324d4c29f5f982281d92145d086f4a47fa2220b93483bc65d59b1e23f5b51d82305c630690be7c552827bb795560674b03620763e0917bf14a
DIST cmake-3.11.1.tar.gz 7951125 BLAKE2B 157c2eac49900df554fb335c4a17484ca425a97e2c41b9539cf1f02cc09246e515d8c2b43549a7a395df378f1dd3f4757465edab6f1ea5d08d5835b6728b35d7 SHA512 d5df043453a9f9478a0e165ded6ce247a7b495fe8c4e56905bb523889a016fb8eb769455c2c2c5f6118c61bcffafe4e3e219ad99b2a85918323c2155f10089d8 DIST cmake-3.20.2.tar.gz 9438694 BLAKE2B b1e1c091047d5ccae77d64ffda8201cfa7661f09fac2aceadfede8be09257cebdc8c2536f10ced82c700fd87174979344489fa6ab1b460e3ddfc41325ca6f19b SHA512 675a92f84b437169aee86dbfa59715671b9195ddeffc6fea83c7803a70abe3116106ad0a627b9e4bef326bfb2a10fdf624ad341fd9d3d08e3d8a69c271cd2b32
DIST cmake-3.9.6.tar.gz 7705400 BLAKE2B e0a5307af0a34863c50ea6aa9323025ef588b27e648107c3a81c362ee7ae4a1d2a07cc335d816b286ce4ddb249f9c6c08c3e8cf99856c7113f3724f47c62da43 SHA512 9fda2c9ac054ef8fb1bf3885fbdec02c518da89ade220eba06b5502ac3ff300f635ec0922e61f3b2d090644fb743b8f71a04c532ab66b2d890a180cc7da54e6c

View File

@ -1,212 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CMAKE_MAKEFILE_GENERATOR="emake"
CMAKE_REMOVE_MODULES="no"
inherit bash-completion-r1 elisp-common eutils flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils cmake-utils
MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
LICENSE="CMake"
SLOT="0"
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs system-jsoncpp ncurses qt5"
RDEPEND="
app-crypt/rhash
>=app-arch/libarchive-3.0.0:=
>=dev-libs/expat-2.0.1
>=dev-libs/libuv-1.0.0:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/pkgconfig
emacs? ( virtual/emacs )
ncurses? ( sys-libs/ncurses:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
"
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
"
S="${WORKDIR}/${MY_P}"
SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.9.0_rc2-FindImageMagick.patch
"${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch
"${FILESDIR}"/${PN}-3.8.0_rc2-FindBoost-python.patch
"${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
# upstream fixes (can usually be removed with a version bump)
)
cmake_src_bootstrap() {
# Cleanup args to extract only JOBS.
# Because bootstrap does not know anything else.
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
if [ $? -eq 0 ]; then
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')
par_arg="--parallel=${par_arg}"
else
par_arg="--parallel=1"
fi
# disable running of cmake in boostrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed"
# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
fi
tc-export CC CXX LD
# bootstrap script isn't exactly /bin/sh compatible
${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
${par_arg} \
|| die "Bootstrap failed"
}
cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass
sed -i -e 's:#IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die
pushd "${BUILD_DIR}" > /dev/null
local ctestargs
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests:
# BootstrapTest: we actualy bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken
# CTest.updatecvs: which fails to commit as root
# Fortran: requires fortran
# Qt4Deploy, which tries to break sandbox and ignores prefix
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location
# TestUpload, which requires network access
"${BUILD_DIR}"/bin/ctest ${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|RunCMake.CPack_RPM|TestUpload)" \
|| die "Tests failed"
popd > /dev/null
}
src_prepare() {
cmake-utils_src_prepare
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap
fi
}
src_configure() {
# Fix linking on Solaris
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)"
)
if use qt5 ; then
mycmakeargs+=(
-DBUILD_QtDialog=ON
$(cmake-utils_use_find_package qt5 Qt5Widgets)
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el
}
src_test() {
virtx cmake_src_test
}
src_install() {
cmake-utils_src_install
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
insinto /usr/share/vim/vimfiles/syntax
doins Auxiliary/vim/syntax/cmake.vim
insinto /usr/share/vim/vimfiles/indent
doins Auxiliary/vim/indent/cmake.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
rm -r "${ED}"/usr/share/cmake/{completions,editors} || die
}
pkg_postinst() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

View File

@ -1,212 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CMAKE_MAKEFILE_GENERATOR="emake"
CMAKE_REMOVE_MODULES="no"
inherit bash-completion-r1 elisp-common eutils flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils cmake-utils
MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
LICENSE="CMake"
SLOT="0"
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs system-jsoncpp ncurses qt5"
RDEPEND="
app-crypt/rhash
>=app-arch/libarchive-3.0.0:=
>=dev-libs/expat-2.0.1
>=dev-libs/libuv-1.0.0:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/pkgconfig
emacs? ( virtual/emacs )
ncurses? ( sys-libs/ncurses:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
"
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
"
S="${WORKDIR}/${MY_P}"
SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.9.0_rc2-FindImageMagick.patch
"${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch
"${FILESDIR}"/${PN}-3.8.0_rc2-FindBoost-python.patch
"${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
# upstream fixes (can usually be removed with a version bump)
)
cmake_src_bootstrap() {
# Cleanup args to extract only JOBS.
# Because bootstrap does not know anything else.
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
if [ $? -eq 0 ]; then
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')
par_arg="--parallel=${par_arg}"
else
par_arg="--parallel=1"
fi
# disable running of cmake in boostrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed"
# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
fi
tc-export CC CXX LD
# bootstrap script isn't exactly /bin/sh compatible
${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
${par_arg} \
|| die "Bootstrap failed"
}
cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass
sed -i -e 's:#IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die
pushd "${BUILD_DIR}" > /dev/null
local ctestargs
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests:
# BootstrapTest: we actualy bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken
# CTest.updatecvs: which fails to commit as root
# Fortran: requires fortran
# Qt4Deploy, which tries to break sandbox and ignores prefix
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location
# TestUpload, which requires network access
"${BUILD_DIR}"/bin/ctest ${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|RunCMake.CPack_RPM|TestUpload)" \
|| die "Tests failed"
popd > /dev/null
}
src_prepare() {
cmake-utils_src_prepare
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap
fi
}
src_configure() {
# Fix linking on Solaris
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)"
)
if use qt5 ; then
mycmakeargs+=(
-DBUILD_QtDialog=ON
$(cmake-utils_use_find_package qt5 Qt5Widgets)
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el
}
src_test() {
virtx cmake_src_test
}
src_install() {
cmake-utils_src_install
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
insinto /usr/share/vim/vimfiles/syntax
doins Auxiliary/vim/syntax/cmake.vim
insinto /usr/share/vim/vimfiles/indent
doins Auxiliary/vim/indent/cmake.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
rm -r "${ED}"/usr/share/cmake/{completions,editors} || die
}
pkg_postinst() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

View File

@ -1,33 +1,33 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake" CMAKE_MAKEFILE_GENERATOR="emake"
CMAKE_REMOVE_MODULES="no" CMAKE_REMOVE_MODULES_LIST=( none )
inherit bash-completion-r1 elisp-common eutils flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils cmake-utils inherit bash-completion-r1 cmake elisp-common flag-o-matic toolchain-funcs virtualx xdg-utils
MY_P="${P/_/-}" MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make" DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/" HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz" SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
LICENSE="CMake" LICENSE="CMake"
SLOT="0" SLOT="0"
[[ "${PV}" = *_rc* ]] || \ [[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs system-jsoncpp ncurses qt5" IUSE="doc emacs system-jsoncpp ncurses qt5"
RDEPEND=" RDEPEND="
app-crypt/rhash app-crypt/rhash
>=app-arch/libarchive-3.0.0:= >=app-arch/libarchive-3.0.0:=
>=dev-libs/expat-2.0.1 >=dev-libs/expat-2.0.1
>=dev-libs/libuv-1.0.0:= >=dev-libs/libuv-1.10.0:=
>=net-misc/curl-7.21.5[ssl] >=net-misc/curl-7.21.5[ssl]
sys-libs/zlib sys-libs/zlib
virtual/pkgconfig virtual/pkgconfig
emacs? ( virtual/emacs ) emacs? ( >=app-editors/emacs-23.1:* )
ncurses? ( sys-libs/ncurses:0= ) ncurses? ( sys-libs/ncurses:0= )
qt5? ( qt5? (
dev-qt/qtcore:5 dev-qt/qtcore:5
@ -36,8 +36,12 @@ RDEPEND="
) )
system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= ) system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
" "
DEPEND="${RDEPEND} DEPEND="${RDEPEND}"
doc? ( dev-python/sphinx ) BDEPEND="
doc? (
dev-python/requests
dev-python/sphinx
)
" "
S="${WORKDIR}/${MY_P}" S="${WORKDIR}/${MY_P}"
@ -47,7 +51,7 @@ SITEFILE="50${PN}-gentoo.el"
PATCHES=( PATCHES=(
# prefix # prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch "${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch "${FILESDIR}"/${PN}-3.13.4-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch "${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules # handle gentoo packaging in find modules
@ -59,15 +63,18 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch "${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
# boost (#660980)
"${FILESDIR}"/${PN}-3.11.4-fix-boost-detection.patch
# upstream fixes (can usually be removed with a version bump) # upstream fixes (can usually be removed with a version bump)
) )
cmake_src_bootstrap() { cmake_src_bootstrap() {
# Cleanup args to extract only JOBS. # Cleanup args to extract only JOBS.
# Because bootstrap does not know anything else. # Because bootstrap does not know anything else.
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" > /dev/null
if [ $? -eq 0 ]; then if [[ $? -eq 0 ]] ; then
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+') par_arg=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" | tail -n1 | grep -o '[[:digit:]]+')
par_arg="--parallel=${par_arg}" par_arg="--parallel=${par_arg}"
else else
par_arg="--parallel=1" par_arg="--parallel=1"
@ -96,7 +103,7 @@ cmake_src_bootstrap() {
cmake_src_test() { cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests # fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass # these are altered thanks to our eclass
sed -i -e 's:#IGNORE ::g' \ sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \ "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die || die
@ -108,21 +115,27 @@ cmake_src_test() {
# Excluded tests: # Excluded tests:
# BootstrapTest: we actualy bootstrap it every time so why test it. # BootstrapTest: we actualy bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken # BundleUtilities: bundle creation broken
# CMakeOnly.AllFindModules: pthread issues
# CTest.updatecvs: which fails to commit as root # CTest.updatecvs: which fails to commit as root
# Fortran: requires fortran # Fortran: requires fortran
# Qt4Deploy, which tries to break sandbox and ignores prefix # RunCMake.CompilerLauncher: also requires fortran
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because # RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location # debugedit binary is not in the expected location
# RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
# it can't find a deb package that owns libc
# TestUpload, which requires network access # TestUpload, which requires network access
"${BUILD_DIR}"/bin/ctest ${ctestargs} \ "${BUILD_DIR}"/bin/ctest \
-E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|RunCMake.CPack_RPM|TestUpload)" \ -j "$(makeopts_jobs)" \
--test-load "$(makeopts_loadavg)" \
${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload)" \
|| die "Tests failed" || die "Tests failed"
popd > /dev/null popd > /dev/null
} }
src_prepare() { src_prepare() {
cmake-utils_src_prepare cmake_src_prepare
# disable Xcode hooks, bug #652134 # disable Xcode hooks, bug #652134
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
@ -133,6 +146,7 @@ src_prepare() {
# Add gcc libs to the default link paths # Add gcc libs to the default link paths
sed -i \ sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
@ -148,7 +162,6 @@ src_configure() {
local mycmakeargs=( local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp) -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-DCMAKE_DOC_DIR=/share/doc/${PF} -DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man -DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN} -DCMAKE_DATA_DIR=/share/${PN}
@ -160,15 +173,15 @@ src_configure() {
if use qt5 ; then if use qt5 ; then
mycmakeargs+=( mycmakeargs+=(
-DBUILD_QtDialog=ON -DBUILD_QtDialog=ON
$(cmake-utils_use_find_package qt5 Qt5Widgets) $(cmake_use_find_package qt5 Qt5Widgets)
) )
fi fi
cmake-utils_src_configure cmake_src_configure
} }
src_compile() { src_compile() {
cmake-utils_src_compile cmake_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el use emacs && elisp-compile Auxiliary/cmake-mode.el
} }
@ -177,7 +190,7 @@ src_test() {
} }
src_install() { src_install() {
cmake-utils_src_install cmake_src_install
if use emacs; then if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
@ -201,7 +214,7 @@ src_install() {
pkg_postinst() { pkg_postinst() {
use emacs && elisp-site-regen use emacs && elisp-site-regen
if use qt5; then if use qt5; then
gnome2_icon_cache_update xdg_icon_cache_update
xdg_desktop_database_update xdg_desktop_database_update
xdg_mimeinfo_database_update xdg_mimeinfo_database_update
fi fi
@ -210,7 +223,7 @@ pkg_postinst() {
pkg_postrm() { pkg_postrm() {
use emacs && elisp-site-regen use emacs && elisp-site-regen
if use qt5; then if use qt5; then
gnome2_icon_cache_update xdg_icon_cache_update
xdg_desktop_database_update xdg_desktop_database_update
xdg_mimeinfo_database_update xdg_mimeinfo_database_update
fi fi

View File

@ -1,43 +1,50 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake" CMAKE_MAKEFILE_GENERATOR="emake" # Fixed in 3.19, see commit 491dddfb; bug #596460
CMAKE_REMOVE_MODULES="no" CMAKE_REMOVE_MODULES_LIST=( none )
inherit bash-completion-r1 elisp-common eutils flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils cmake-utils inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
toolchain-funcs virtualx xdg-utils
MY_P="${P/_/-}" MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make" DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/" HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz" SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
LICENSE="CMake" LICENSE="CMake"
SLOT="0" SLOT="0"
[[ "${PV}" = *_rc* ]] || \ [[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs system-jsoncpp ncurses qt5" IUSE="doc emacs ncurses qt5 test"
RESTRICT="!test? ( test )"
RDEPEND=" RDEPEND="
>=app-arch/libarchive-3.3.3:=
app-crypt/rhash app-crypt/rhash
>=app-arch/libarchive-3.0.0:=
>=dev-libs/expat-2.0.1 >=dev-libs/expat-2.0.1
>=dev-libs/libuv-1.0.0:= >=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.10.0:=
>=net-misc/curl-7.21.5[ssl] >=net-misc/curl-7.21.5[ssl]
sys-libs/zlib sys-libs/zlib
virtual/pkgconfig virtual/pkgconfig
emacs? ( virtual/emacs ) emacs? ( >=app-editors/emacs-23.1:* )
ncurses? ( sys-libs/ncurses:0= ) ncurses? ( sys-libs/ncurses:0= )
qt5? ( qt5? (
dev-qt/qtcore:5 dev-qt/qtcore:5
dev-qt/qtgui:5 dev-qt/qtgui:5
dev-qt/qtwidgets:5 dev-qt/qtwidgets:5
) )
system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
" "
DEPEND="${RDEPEND} DEPEND="${RDEPEND}"
doc? ( dev-python/sphinx ) BDEPEND="
doc? (
dev-python/requests
dev-python/sphinx
)
test? ( app-arch/libarchive[zstd] )
" "
S="${WORKDIR}/${MY_P}" S="${WORKDIR}/${MY_P}"
@ -46,34 +53,27 @@ SITEFILE="50${PN}-gentoo.el"
PATCHES=( PATCHES=(
# prefix # prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch "${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch "${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch # Next patch requires new work from prefix people
#"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules # handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.11.0_rc2-FindBLAS.patch "${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
"${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch "${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses # respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch "${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
"${FILESDIR}"/${PN}-3.18.0-filter_distcc_warning.patch # bug 691544
# upstream fixes (can usually be removed with a version bump) # upstream fixes (can usually be removed with a version bump)
) )
cmake_src_bootstrap() { cmake_src_bootstrap() {
# Cleanup args to extract only JOBS. # disable running of cmake in bootstrap command
# Because bootstrap does not know anything else.
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
if [ $? -eq 0 ]; then
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')
par_arg="--parallel=${par_arg}"
else
par_arg="--parallel=1"
fi
# disable running of cmake in boostrap command
sed -i \ sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \ -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed" bootstrap || die "sed failed"
@ -84,19 +84,17 @@ cmake_src_bootstrap() {
Source/kwsys/CMakeLists.txt || die Source/kwsys/CMakeLists.txt || die
fi fi
tc-export CC CXX LD
# bootstrap script isn't exactly /bin/sh compatible # bootstrap script isn't exactly /bin/sh compatible
${CONFIG_SHELL:-sh} ./bootstrap \ tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \ --prefix="${T}/cmakestrap/" \
${par_arg} \ --parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|| die "Bootstrap failed" || die "Bootstrap failed"
} }
cmake_src_test() { cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests # fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass # these are altered thanks to our eclass
sed -i -e 's:#IGNORE ::g' \ sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \ "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die || die
@ -106,23 +104,30 @@ cmake_src_test() {
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests: # Excluded tests:
# BootstrapTest: we actualy bootstrap it every time so why test it. # BootstrapTest: we actually bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken # BundleUtilities: bundle creation broken
# CTest.updatecvs: which fails to commit as root # CMakeOnly.AllFindModules: pthread issues
# CTest.updatecvs: fails to commit as root
# Fortran: requires fortran # Fortran: requires fortran
# Qt4Deploy, which tries to break sandbox and ignores prefix # RunCMake.CompilerLauncher: also requires fortran
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because # RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location # debugedit binary is not in the expected location
# TestUpload, which requires network access # RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
"${BUILD_DIR}"/bin/ctest ${ctestargs} \ # it can't find a deb package that owns libc
-E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|RunCMake.CPack_RPM|TestUpload)" \ # RunCMake.{IncompatibleQt,ObsoleteQtMacros}: Require Qt4
# TestUpload: requires network access
"${BUILD_DIR}"/bin/ctest \
-j "$(makeopts_jobs)" \
--test-load "$(makeopts_loadavg)" \
${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \
|| die "Tests failed" || die "Tests failed"
popd > /dev/null popd > /dev/null
} }
src_prepare() { src_prepare() {
cmake-utils_src_prepare cmake_src_prepare
# disable Xcode hooks, bug #652134 # disable Xcode hooks, bug #652134
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
@ -133,9 +138,10 @@ src_prepare() {
# Add gcc libs to the default link paths # Add gcc libs to the default link paths
sed -i \ sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then if ! has_version -b \>=${CATEGORY}/${PN}-3.4.0_rc1 || ! cmake --version &>/dev/null ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap cmake_src_bootstrap
fi fi
@ -147,28 +153,21 @@ src_configure() {
local mycmakeargs=( local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-DCMAKE_DOC_DIR=/share/doc/${PF} -DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man -DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN} -DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc) -DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc) -DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)" -DBUILD_CursesDialog="$(usex ncurses)"
-DBUILD_TESTING=$(usex test)
) )
use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
if use qt5 ; then cmake_src_configure
mycmakeargs+=(
-DBUILD_QtDialog=ON
$(cmake-utils_use_find_package qt5 Qt5Widgets)
)
fi
cmake-utils_src_configure
} }
src_compile() { src_compile() {
cmake-utils_src_compile cmake_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el use emacs && elisp-compile Auxiliary/cmake-mode.el
} }
@ -177,7 +176,7 @@ src_test() {
} }
src_install() { src_install() {
cmake-utils_src_install cmake_src_install
if use emacs; then if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
@ -194,14 +193,12 @@ src_install() {
doins "${FILESDIR}/${PN}.vim" doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack} dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
rm -r "${ED}"/usr/share/cmake/{completions,editors} || die
} }
pkg_postinst() { pkg_postinst() {
use emacs && elisp-site-regen use emacs && elisp-site-regen
if use qt5; then if use qt5; then
gnome2_icon_cache_update xdg_icon_cache_update
xdg_desktop_database_update xdg_desktop_database_update
xdg_mimeinfo_database_update xdg_mimeinfo_database_update
fi fi
@ -210,7 +207,7 @@ pkg_postinst() {
pkg_postrm() { pkg_postrm() {
use emacs && elisp-site-regen use emacs && elisp-site-regen
if use qt5; then if use qt5; then
gnome2_icon_cache_update xdg_icon_cache_update
xdg_desktop_database_update xdg_desktop_database_update
xdg_mimeinfo_database_update xdg_mimeinfo_database_update
fi fi

View File

@ -0,0 +1,232 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake" # TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
CMAKE_REMOVE_MODULES_LIST=( none )
inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
toolchain-funcs virtualx xdg-utils
MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
LICENSE="CMake"
SLOT="0"
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs ncurses qt5 test"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-arch/libarchive-3.3.3:=
app-crypt/rhash
>=dev-libs/expat-2.0.1
>=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.10.0:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/pkgconfig
emacs? ( >=app-editors/emacs-23.1:* )
ncurses? ( sys-libs/ncurses:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
dev-python/requests
dev-python/sphinx
)
test? ( app-arch/libarchive[zstd] )
"
S="${WORKDIR}/${MY_P}"
SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch
# handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
# Next patch needs to be reworked
#"${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
"${FILESDIR}"/${PN}-3.18.0-filter_distcc_warning.patch # bug 691544
# upstream fixes (can usually be removed with a version bump)
)
cmake_src_bootstrap() {
# disable running of cmake in bootstrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed"
# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' \
Source/kwsys/CMakeLists.txt || die
fi
# bootstrap script isn't exactly /bin/sh compatible
tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
--parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|| die "Bootstrap failed"
}
cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass
sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die
pushd "${BUILD_DIR}" > /dev/null
local ctestargs
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests:
# BootstrapTest: we actually bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken
# CMakeOnly.AllFindModules: pthread issues
# CTest.updatecvs: fails to commit as root
# Fortran: requires fortran
# RunCMake.CompilerLauncher: also requires fortran
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location
# RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
# it can't find a deb package that owns libc
# RunCMake.{IncompatibleQt,ObsoleteQtMacros}: Require Qt4
# TestUpload: requires network access
"${BUILD_DIR}"/bin/ctest \
-j "$(makeopts_jobs)" \
--test-load "$(makeopts_loadavg)" \
${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|DependencyGraph|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \
|| die "Tests failed"
popd > /dev/null
}
src_prepare() {
cmake_src_prepare
if [[ ${CHOST} == *-darwin* ]] ; then
# disable Xcode hooks, bug #652134
sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \
Source/CMakeLists.txt || die
sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \
-e '/cmGlobalXCodeGenerator.h/d' \
Source/cmake.cxx || die
# disable isysroot usage with GCC, we've properly instructed
# where things are via GCC configuration and ldwrapper
sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
Modules/Platform/Apple-GNU-*.cmake || die
# disable isysroot usage with clang as well
sed -i -e '/_SYSROOT_FLAG/d' \
Modules/Platform/Apple-Clang.cmake || die
# don't set a POSIX standard, system headers don't like that, #757426
sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
Source/cmLoadCommandCommand.cxx \
Source/cmStandardLexer.h \
Source/cmSystemTools.cxx \
Source/cmTimestamp.cxx
sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
Source/cmStandardLexer.h
fi
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version -b \>=${CATEGORY}/${PN}-3.4.0_rc1 || ! cmake --version &>/dev/null ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap
fi
}
src_configure() {
# Fix linking on Solaris
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)"
-DBUILD_TESTING=$(usex test)
)
use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
cmake_src_configure
}
src_compile() {
cmake_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el
}
src_test() {
virtx cmake_src_test
}
src_install() {
cmake_src_install
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
insinto /usr/share/vim/vimfiles/syntax
doins Auxiliary/vim/syntax/cmake.vim
insinto /usr/share/vim/vimfiles/indent
doins Auxiliary/vim/indent/cmake.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
}
pkg_postinst() {
use emacs && elisp-site-regen
if use qt5; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
if use qt5; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

View File

@ -0,0 +1,232 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake" # TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
CMAKE_REMOVE_MODULES_LIST=( none )
inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
toolchain-funcs virtualx xdg-utils
MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
LICENSE="CMake"
SLOT="0"
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs ncurses qt5 test"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-arch/libarchive-3.3.3:=
app-crypt/rhash
>=dev-libs/expat-2.0.1
>=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.10.0:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/pkgconfig
emacs? ( >=app-editors/emacs-23.1:* )
ncurses? ( sys-libs/ncurses:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
dev-python/requests
dev-python/sphinx
)
test? ( app-arch/libarchive[zstd] )
"
S="${WORKDIR}/${MY_P}"
SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch
# handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
# Next patch needs to be reworked
#"${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
"${FILESDIR}"/${PN}-3.18.0-filter_distcc_warning.patch # bug 691544
# upstream fixes (can usually be removed with a version bump)
)
cmake_src_bootstrap() {
# disable running of cmake in bootstrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed"
# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' \
Source/kwsys/CMakeLists.txt || die
fi
# bootstrap script isn't exactly /bin/sh compatible
tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
--parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|| die "Bootstrap failed"
}
cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass
sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die
pushd "${BUILD_DIR}" > /dev/null
local ctestargs
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests:
# BootstrapTest: we actually bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken
# CMakeOnly.AllFindModules: pthread issues
# CTest.updatecvs: fails to commit as root
# Fortran: requires fortran
# RunCMake.CompilerLauncher: also requires fortran
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location
# RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
# it can't find a deb package that owns libc
# RunCMake.{IncompatibleQt,ObsoleteQtMacros}: Require Qt4
# TestUpload: requires network access
"${BUILD_DIR}"/bin/ctest \
-j "$(makeopts_jobs)" \
--test-load "$(makeopts_loadavg)" \
${ctestargs} \
-E "(BootstrapTest|BundleUtilities|ConfigSources|CMakeOnly.AllFindModules|CPackComponentsDEB-components-depend2|CompileOptions|CTest.UpdateCVS|DependencyGraph|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \
|| die "Tests failed"
popd > /dev/null
}
src_prepare() {
cmake_src_prepare
if [[ ${CHOST} == *-darwin* ]] ; then
# disable Xcode hooks, bug #652134
sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \
Source/CMakeLists.txt || die
sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \
-e '/cmGlobalXCodeGenerator.h/d' \
Source/cmake.cxx || die
# disable isysroot usage with GCC, we've properly instructed
# where things are via GCC configuration and ldwrapper
sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
Modules/Platform/Apple-GNU-*.cmake || die
# disable isysroot usage with clang as well
sed -i -e '/_SYSROOT_FLAG/d' \
Modules/Platform/Apple-Clang.cmake || die
# don't set a POSIX standard, system headers don't like that, #757426
sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
Source/cmLoadCommandCommand.cxx \
Source/cmStandardLexer.h \
Source/cmSystemTools.cxx \
Source/cmTimestamp.cxx
sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
Source/cmStandardLexer.h
fi
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version -b \>=${CATEGORY}/${PN}-3.4.0_rc1 || ! cmake --version &>/dev/null ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap
fi
}
src_configure() {
# Fix linking on Solaris
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)"
-DBUILD_TESTING=$(usex test)
)
use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
cmake_src_configure
}
src_compile() {
cmake_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el
}
src_test() {
virtx cmake_src_test
}
src_install() {
cmake_src_install
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
insinto /usr/share/vim/vimfiles/syntax
doins Auxiliary/vim/syntax/cmake.vim
insinto /usr/share/vim/vimfiles/indent
doins Auxiliary/vim/indent/cmake.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
}
pkg_postinst() {
use emacs && elisp-site-regen
if use qt5; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
if use qt5; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

View File

@ -1,214 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CMAKE_MAKEFILE_GENERATOR="emake"
CMAKE_REMOVE_MODULES="no"
inherit bash-completion-r1 elisp-common eutils flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils cmake-utils
MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
SRC_URI="https://cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
LICENSE="CMake"
SLOT="0"
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs server system-jsoncpp ncurses qt5"
RDEPEND="
app-crypt/rhash
>=app-arch/libarchive-3.0.0:=
>=dev-libs/expat-2.0.1
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/pkgconfig
emacs? ( virtual/emacs )
ncurses? ( sys-libs/ncurses:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
server? ( >=dev-libs/libuv-1.0.0:= )
system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
"
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
"
S="${WORKDIR}/${MY_P}"
SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules
"${FILESDIR}"/${PN}-3.9.0_rc2-FindImageMagick.patch
"${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch
"${FILESDIR}"/${PN}-3.8.0_rc2-FindBoost-python.patch
"${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
# respect python eclasses
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
# upstream fixes (can usually be removed with a version bump)
)
cmake_src_bootstrap() {
# Cleanup args to extract only JOBS.
# Because bootstrap does not know anything else.
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
if [ $? -eq 0 ]; then
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')
par_arg="--parallel=${par_arg}"
else
par_arg="--parallel=1"
fi
# disable running of cmake in boostrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
bootstrap || die "sed failed"
# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
fi
tc-export CC CXX LD
# bootstrap script isn't exactly /bin/sh compatible
${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
${par_arg} \
|| die "Bootstrap failed"
}
cmake_src_test() {
# fix OutDir and SelectLibraryConfigurations tests
# these are altered thanks to our eclass
sed -i -e 's:#IGNORE ::g' \
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|| die
pushd "${BUILD_DIR}" > /dev/null
local ctestargs
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
# Excluded tests:
# BootstrapTest: we actualy bootstrap it every time so why test it.
# BundleUtilities: bundle creation broken
# CTest.updatecvs: which fails to commit as root
# Fortran: requires fortran
# Qt4Deploy, which tries to break sandbox and ignores prefix
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
# debugedit binary is not in the expected location
# TestUpload, which requires network access
"${BUILD_DIR}"/bin/ctest ${ctestargs} \
-E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|RunCMake.CPack_RPM|TestUpload)" \
|| die "Tests failed"
popd > /dev/null
}
src_prepare() {
cmake-utils_src_prepare
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
cmake_src_bootstrap
fi
}
src_configure() {
# Fix linking on Solaris
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
local mycmakeargs=(
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-DCMAKE_DOC_DIR=/share/doc/${PF}
-DCMAKE_MAN_DIR=/share/man
-DCMAKE_DATA_DIR=/share/${PN}
-DSPHINX_MAN=$(usex doc)
-DSPHINX_HTML=$(usex doc)
-DBUILD_CursesDialog="$(usex ncurses)"
-DCMake_ENABLE_SERVER_MODE="$(usex server)"
-DCMAKE_USE_LIBUV="$(usex server)"
)
if use qt5 ; then
mycmakeargs+=(
-DBUILD_QtDialog=ON
$(cmake-utils_use_find_package qt5 Qt5Widgets)
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
use emacs && elisp-compile Auxiliary/cmake-mode.el
}
src_test() {
virtx cmake_src_test
}
src_install() {
cmake-utils_src_install
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
insinto /usr/share/vim/vimfiles/syntax
doins Auxiliary/vim/syntax/cmake.vim
insinto /usr/share/vim/vimfiles/indent
doins Auxiliary/vim/indent/cmake.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/${PN}.vim"
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
rm -r "${ED}"/usr/share/cmake/{completions,editors} || die
}
pkg_postinst() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
if use qt5; then
gnome2_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

View File

@ -1,43 +0,0 @@
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -4,6 +4,10 @@
#
# Find BLAS library
#
+# Version modified for Gentoo Linux.
+# If a valid PkgConfig configuration is found, this overrides and cancels
+# all further checks.
+#
# This module finds an installed fortran library that implements the
# BLAS linear-algebra interface (see http://www.netlib.org/blas/). The
# list of libraries searched for is taken from the autoconf macro file,
@@ -50,6 +54,23 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+# first, try PkgConfig
+#
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(PC_BLAS blas)
+if(PC_BLAS_FOUND)
+ foreach(PC_LIB ${PC_BLAS_LIBRARIES})
+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_BLAS_LIBRARY_DIRS} )
+ if (NOT ${PC_LIB}_LIBRARY)
+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_BLAS_LIBRARY_DIRS}")
+ endif (NOT ${PC_LIB}_LIBRARY)
+ list(APPEND BLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
+ endforeach(PC_LIB)
+ find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARIES)
+ mark_as_advanced(BLAS_LIBRARIES)
+else(PC_BLAS_FOUND)
+message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
+
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
@@ -688,3 +709,5 @@
endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+
+endif(PC_BLAS_FOUND)

View File

@ -0,0 +1,13 @@
https://bugs.gentoo.org/660980
--- cmake-3.11.4/Modules/FindBoost.cmake
+++ cmake-3.11.4/Modules/FindBoost.cmake
@@ -1680,7 +1680,7 @@
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
# Gentoo
- list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}.${COMPONENT_PYTHON_VERSION_MINOR}")
# RPMs
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
endif()

View File

@ -19,10 +19,10 @@ Updated by Lars Wendler (cmake-3.9.0_rc2)
Modules/Platform/UnixPaths.cmake | 29 ++++++++++++++++++++++++----- Modules/Platform/UnixPaths.cmake | 29 ++++++++++++++++++++++++-----
2 files changed, 32 insertions(+), 9 deletions(-) 2 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake Index: cmake-3.13.3/Modules/Platform/Darwin.cmake
index 727baa6e1..543d9e034 100644 ===================================================================
--- a/Modules/Platform/Darwin.cmake --- cmake-3.13.3.orig/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake +++ cmake-3.13.3/Modules/Platform/Darwin.cmake
@@ -108,9 +108,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) @@ -108,9 +108,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F)
set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F)
set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F)
@ -62,18 +62,20 @@ index 727baa6e1..543d9e034 100644
"~/Applications" "~/Applications"
"/Applications" "/Applications"
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake Index: cmake-3.13.3/Modules/Platform/UnixPaths.cmake
index 5687653cf..be7695898 100644 ===================================================================
--- a/Modules/Platform/UnixPaths.cmake --- cmake-3.13.3.orig/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake +++ cmake-3.13.3/Modules/Platform/UnixPaths.cmake
@@ -23,6 +23,7 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) @@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DI
# search types. # search types.
list(APPEND CMAKE_SYSTEM_PREFIX_PATH list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard # Standard
- /usr/local /usr /
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ + @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
/usr/local /usr / + @GENTOO_HOST@/usr/local /usr /
# CMake install location # CMake install location
"${_CMAKE_INSTALL_DIR}"
@@ -50,23 +51,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH @@ -50,23 +51,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# List common include file locations not under the common prefixes. # List common include file locations not under the common prefixes.
@ -109,18 +111,17 @@ index 5687653cf..be7695898 100644
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32 + @GENTOO_PORTAGE_EPREFIX@usr/lib32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib + @GENTOO_PORTAGE_EPREFIX@usr/lib
+ @GENTOO_PORTAGE_EPREFIX@lib + @GENTOO_PORTAGE_EPREFIX@lib
+ /lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 + @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
) )
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
- /usr/include
+ @GENTOO_PORTAGE_EPREFIX@usr/include + @GENTOO_PORTAGE_EPREFIX@usr/include
/usr/include + @GENTOO_HOST@/usr/include
) )
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
- /usr/include
+ @GENTOO_PORTAGE_EPREFIX@usr/include + @GENTOO_PORTAGE_EPREFIX@usr/include
/usr/include + @GENTOO_HOST@/usr/include
) )
list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
--
2.13.1

View File

@ -0,0 +1,142 @@
From 8ab270bf43f038bba4f992031508b065fa83f390 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Fri, 1 Mar 2019 23:11:41 +0100
Subject: [PATCH] Set some proper paths to make cmake find our tools.
The ebuild now adds an extra / at the end of $EPREFIX so that it is
never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains
correct)
Original patch by Heiko Przybyl.
Updated by Chris Reffett (cmake-2.8.8)
Updated by Johannes Huber (cmake-2.8.9)
Updated by Michael Palimaka (cmake-2.8.10)
Updated by Chris Reffett (cmake-2.8.11)
Updated by Michael Palimaka (cmake-3.0.0)
Updated by Lars Wendler (cmake-3.9.0_rc2)
Updated by Benda Xu (cmake-3.13.4)
Updated by Lars Wendler (cmake-3.14.0_rc1)
Updated by Lars Wendler (cmake-3.14.0_rc2)
Updated by Lars Wendler (cmake-3.14.0_rc3)
Updated by Jacob Floyd (cmake-3.19.2)
---
Modules/Platform/Darwin.cmake | 12 +++++++----
Modules/Platform/UnixPaths.cmake | 35 ++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 5590433a3b..b04383e51d 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -116,9 +116,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F)
set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F)
set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F)
-# default to searching for frameworks first
+# default to searching for frameworks last
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
- set(CMAKE_FIND_FRAMEWORK FIRST)
+ set(CMAKE_FIND_FRAMEWORK LAST)
endif()
# Older OS X linkers do not report their framework search path
@@ -140,6 +140,9 @@ endif()
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
+ @GENTOO_PORTAGE_EPREFIX@MacOSX.sdk/System/Library/Frameworks
+ @GENTOO_PORTAGE_EPREFIX@Frameworks
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
~/Library/Frameworks
)
if(_CMAKE_OSX_SYSROOT_PATH)
@@ -186,13 +189,15 @@ if(CMAKE_OSX_SYSROOT)
endif()
endif()
-# default to searching for application bundles first
+# default to searching for application bundles last
if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
- set(CMAKE_FIND_APPBUNDLE FIRST)
+ set(CMAKE_FIND_APPBUNDLE LAST)
endif()
# set up the default search directories for application bundles
set(_apps_paths)
foreach(_path
+ @GENTOO_PORTAGE_EPREFIX@Applications
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
"~/Applications"
"/Applications"
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 97f744d521..8d11827371 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
# search types.
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
- /usr/local /usr /
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
+ @GENTOO_HOST@/usr/local /usr /
# CMake install location
"${_CMAKE_INSTALL_DIR}"
@@ -50,17 +51,33 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# List common include file locations not under the common prefixes.
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
- # X11
- /usr/include/X11
+ @GENTOO_PORTAGE_EPREFIX@usr/include
)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- # X11
- /usr/lib/X11
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
+ @GENTOO_PORTAGE_GCCLIBDIR@
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
+ @GENTOO_PORTAGE_EPREFIX@lib
+ )
+
+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
+ @GENTOO_PORTAGE_EPREFIX@bin
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
+ @GENTOO_PORTAGE_GCCLIBDIR@
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
+ @GENTOO_PORTAGE_EPREFIX@lib
+ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
)
if(CMAKE_SYSROOT_COMPILE)
@@ -73,11 +90,13 @@ endif()
# parsing the implicit directory information from compiler output.
set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}
- "${_cmake_sysroot_compile}/usr/include"
+ @GENTOO_PORTAGE_EPREFIX@usr/include
+ @GENTOO_HOST@/usr/include
)
set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}
- "${_cmake_sysroot_compile}/usr/include"
+ @GENTOO_PORTAGE_EPREFIX@usr/include
+ @GENTOO_HOST@/usr/include
)
set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES}
--
2.21.0

View File

@ -0,0 +1,41 @@
From ce929588adf61ee24bb6850f4b9a58cc7ea224c7 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Tue, 19 Nov 2019 12:28:53 +0100
Subject: [PATCH] Don't use .so for modules on darwin/macos. Use .bundle
instead.
Patch by Heiko Przybyl
Forward-ported from 2.8.10 to 3.4.0-rc1
Forward-ported from 3.4.0-rc1 to 3.16.0-rc4
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
Modules/Platform/Darwin.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 1482d76ae6..6a432963b6 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -43,7 +43,7 @@ endif()
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
-set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_SHARED_MODULE_SUFFIX ".bundle")
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "")
@@ -67,7 +67,7 @@ foreach(lang C CXX OBJC OBJCXX)
endforeach()
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".bundle" ".a")
# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache
--
2.24.0

View File

@ -0,0 +1,37 @@
From f4009d1efccf571d229e89fab846b0d5873e7a5b Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Thu, 13 Feb 2020 13:12:45 +0100
Subject: [PATCH] Prefer pkgconfig in FindBLAS
---
Modules/FindBLAS.cmake | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 9b6d09c2f9..c2af42468c 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -7,6 +7,10 @@ FindBLAS
Find Basic Linear Algebra Subprograms (BLAS) library
+Version modified for Gentoo Linux.
+If a valid PkgConfig configuration is found, this overrides and cancels
+all further checks.
+
This module finds an installed Fortran library that implements the
BLAS linear-algebra interface (see http://www.netlib.org/blas/).
@@ -107,6 +111,9 @@ if(NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_CO
endif()
endif()
+# first, try PkgConfig
+set(BLA_PREFER_PKGCONFIG On)
+
if(CMAKE_Fortran_COMPILER_LOADED)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
else()
--
2.25.0

View File

@ -0,0 +1,56 @@
From 7459f27dd4bb9b60067ac49ee2c6be93d20c2c1e Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Thu, 13 Feb 2020 13:16:16 +0100
Subject: [PATCH] Prefer pkgconfig in FindLAPACK
---
Modules/FindLAPACK.cmake | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index c9629769f0..de852d562c 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -7,6 +7,10 @@ FindLAPACK
Find Linear Algebra PACKage (LAPACK) library
+Version modified for Gentoo Linux.
+If a valid PkgConfig configuration is found, this overrides and cancels
+all further checks.
+
This module finds an installed Fortran library that implements the
LAPACK linear-algebra interface (see http://www.netlib.org/lapack/).
@@ -186,6 +190,22 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
endmacro()
+# first, try PkgConfig
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(PC_LAPACK lapack)
+if(PC_LAPACK_FOUND)
+ foreach(PC_LIB ${PC_LAPACK_LIBRARIES})
+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} )
+ if (NOT ${PC_LIB}_LIBRARY)
+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}")
+ endif (NOT ${PC_LIB}_LIBRARY)
+ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY})
+ endforeach(PC_LIB)
+ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES)
+ mark_as_advanced(LAPACK_LIBRARIES)
+else(PC_LAPACK_FOUND)
+message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.")
+
set(LAPACK_LINKER_FLAGS)
set(LAPACK_LIBRARIES)
set(LAPACK95_LIBRARIES)
@@ -494,3 +514,5 @@ endif()
cmake_pop_check_state()
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+
+endif(PC_LAPACK_FOUND)
--
2.25.0

View File

@ -0,0 +1,17 @@
https://bugs.gentoo.org/691544
Patch-by: Felix W. <felix.wischke@gmail.com>
Forward-ported from 3.16.5 to 3.18.0
--- cmake-3.18.0/Source/Checks/cm_cxx_features.cmake
+++ cmake-3.18.0/Source/Checks/cm_cxx_features.cmake
@@ -36,6 +36,8 @@
string(REGEX REPLACE "[^\n]*icpc: command line warning #10121: overriding [^\n]*" "" check_output "${check_output}")
# Filter out ld warnings.
string(REGEX REPLACE "[^\n]*ld: warning: [^\n]*" "" check_output "${check_output}")
+ # Filter out distcc.
+ string(REGEX REPLACE "[^\n]*distcc\\[[0-9]+\\][^\n]*[Ww]arning:[^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)

View File

@ -0,0 +1,14 @@
grobian@gentoo.org: fix compilation on macOS using GCC
compiler says it all: include memory if you use unique_ptr
--- a/Source/cmMachO.h.orig 2020-11-24 14:50:26.000000000 +0100
+++ b/Source/cmMachO.h 2020-11-28 16:05:11.509620124 +0100
@@ -6,6 +6,7 @@
#include <iosfwd>
#include <string>
+#include <memory>
#if !defined(CMAKE_USE_MACH_PARSER)
# error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled."

View File

@ -1,95 +0,0 @@
From 7d3a5c466bf14a0c12edc6ece359012b723e39bc Mon Sep 17 00:00:00 2001
From: Michael Palimaka <kensington@gentoo.org>
Date: Thu, 23 Mar 2017 11:36:39 +0100
Subject: [PATCH] Fix detection of PYTHON_ABI-versioned Boost Python libraries
Gentoo-bug: 400969
Gentoo-bug: 613442
---
Modules/FindBoost.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index e795aadcc..11269c30b 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1481,6 +1481,16 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ # If a certain version of python has already been selected ensure we select the corresponding boost python version.
+ if(PYTHON_EXECUTABLE)
+ set(GENTOO_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
+ else()
+ set(GENTOO_PYTHON_EXECUTABLE "python")
+ endif()
+ execute_process(COMMAND "${GENTOO_PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version)
+ endif()
+
# Compute component-specific hints.
set(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT "")
if(${COMPONENT} STREQUAL "mpi" OR ${COMPONENT} STREQUAL "mpi_python" OR
@@ -1529,6 +1539,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} )
+ endif()
+
if(_boost_STATIC_RUNTIME_WORKAROUND)
set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
list(APPEND _boost_RELEASE_NAMES
@@ -1536,6 +1555,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
endif()
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
@@ -1571,6 +1597,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} )
+ endif()
if(_boost_STATIC_RUNTIME_WORKAROUND)
set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
list(APPEND _boost_DEBUG_NAMES
@@ -1578,6 +1613,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
endif()
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
--
2.12.1

View File

@ -1,47 +0,0 @@
From f51ccd38ed85e5799b2f0a88829eb6a40574ab05 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Fri, 9 Jun 2017 02:07:11 +0200
Subject: [PATCH] Find more variants of ImageMagick
---
Modules/FindImageMagick.cmake | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 7d5534bc2..488d7e0bf 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -196,24 +196,30 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
Magick++ CORE_RL_Magick++_
+ Magick++-6.Q64 Magick++-6.Q64HDRI Magick++-6.Q32 Magick++-6.Q32HDRI
Magick++-Q8 Magick++-Q16 Magick++-Q16HDRI Magick++-Q8HDRI
Magick++-6.Q16 Magick++-6.Q8 Magick++-6.Q16HDRI Magick++-6.Q8HDRI
+ Magick++-7.Q64 Magick++-7.Q64HDRI Magick++-7.Q32 Magick++-7.Q32HDRI
Magick++-7.Q16 Magick++-7.Q8 Magick++-7.Q16HDRI Magick++-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand "wand/MagickWand.h;MagickWand/MagickWand.h"
Wand MagickWand CORE_RL_wand_
+ MagickWand-6.Q64 MagickWand-6.Q64HDRI MagickWand-6.Q32 MagickWand-6.Q32HDRI
MagickWand-Q16 MagickWand-Q8 MagickWand-Q16HDRI MagickWand-Q8HDRI
MagickWand-6.Q16 MagickWand-6.Q8 MagickWand-6.Q16HDRI MagickWand-6.Q8HDRI
+ MagickWand-7.Q64 MagickWand-7.Q64HDRI MagickWand-7.Q32 MagickWand-7.Q32HDRI
MagickWand-7.Q16 MagickWand-7.Q8 MagickWand-7.Q16HDRI MagickWand-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore "magick/MagickCore.h;MagickCore/MagickCore.h"
Magick MagickCore CORE_RL_magick_
+ MagickCore-6.Q64 MagickCore-6.Q64HDRI MagickCore-6.Q32 MagickCore-6.Q32HDRI
MagickCore-Q16 MagickCore-Q8 MagickCore-Q16HDRI MagickCore-Q8HDRI
MagickCore-6.Q16 MagickCore-6.Q8 MagickCore-6.Q16HDRI MagickCore-6.Q8HDRI
+ MagickCore-7.Q64 MagickCore-7.Q64HDRI MagickCore-7.Q32 MagickCore-7.Q32HDRI
MagickCore-7.Q16 MagickCore-7.Q8 MagickCore-7.Q16HDRI MagickCore-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
--
2.13.1

View File

@ -6,7 +6,9 @@
<name>Gentoo KDE Project</name> <name>Gentoo KDE Project</name>
</maintainer> </maintainer>
<use> <use>
<flag name="server">Enable cmake-server support.</flag>
<flag name="system-jsoncpp">Use system copy of <pkg>dev-libs/jsoncpp</pkg> instead of bundled one.</flag> <flag name="system-jsoncpp">Use system copy of <pkg>dev-libs/jsoncpp</pkg> instead of bundled one.</flag>
</use> </use>
<upstream>
<remote-id type="cpe">cpe:/a:cmake_project:cmake</remote-id>
</upstream>
</pkgmetadata> </pkgmetadata>