summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-09-23 11:01:48 +0200
committerLars Wendler <polynomial-c@gentoo.org>2020-09-23 11:06:41 +0200
commitace8bb52a71d1fee9a667b90d164205a4b85fb0b (patch)
tree61c94cd92b3bf0df20ad5400564be1ceb930cf3d /dev-util/cmake
parentdev-libs/tinyxml: fix libdir path in tinyxml.pc file (diff)
downloadgentoo-ace8bb52a71d1fee9a667b90d164205a4b85fb0b.tar.gz
gentoo-ace8bb52a71d1fee9a667b90d164205a4b85fb0b.tar.bz2
gentoo-ace8bb52a71d1fee9a667b90d164205a4b85fb0b.zip
dev-util/cmake: Bump to version 3.18.3
Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'dev-util/cmake')
-rw-r--r--dev-util/cmake/Manifest1
-rw-r--r--dev-util/cmake/cmake-3.18.3.ebuild214
2 files changed, 215 insertions, 0 deletions
diff --git a/dev-util/cmake/Manifest b/dev-util/cmake/Manifest
index 5ee7baca2596..6b6e19a4f08a 100644
--- a/dev-util/cmake/Manifest
+++ b/dev-util/cmake/Manifest
@@ -2,3 +2,4 @@ DIST cmake-3.13.5.tar.gz 8618821 BLAKE2B 765678bc92821207c53bfb4ac995a791b938f20
DIST cmake-3.16.5.tar.gz 9111262 BLAKE2B 5f996113a4979563d7b9f298b4b1a32d6f91eebaa79af42e1cbf247884e443de47e30030fd0f16c7755c4086e2bff0c0741911753ea7c889b68c393c0b98c876 SHA512 204ce83501c8068ff660c30a68641a354764135e1600a9a95b39476d072876e400961377e19bbe03a7b18412b36dcf21a693946a2a81cff5985e637e9f193671
DIST cmake-3.17.4.tar.gz 9473549 BLAKE2B 2ce29415525b5292ae9e06d73570ed0af2173d8d15612f4d645f22d4f55cb99018663c374c4282731e09f8c6e4ffd59316d65f38aef9db5c34d874ca8992382b SHA512 6af879502e52388f3be02a4edfb006274840ad1afa8f28ffd6ec69b0310c7f718812b2272e5f77ffa422717f61407a6d482deb95941555c21c73fc5f62356a4e
DIST cmake-3.18.2.tar.gz 8970663 BLAKE2B 10924eabbcd20bc3dc2cb6f2d619d824ed0a28fdf35ce6b92ed46d0d85320343d797b0c810aa90ab740477548e3390ed98ec5d2777f635920bff84eecb8e0531 SHA512 74915e643d09af1d8451e57120f2e5963f6fd34ca2cfa0cd573bd7f234924458105e7cc76952c022732de7566cd590141127b243933a564ac575a0dcbb8cc6e7
+DIST cmake-3.18.3.tar.gz 8976093 BLAKE2B 266432f8647828359e0f1a4390d62ac6449fcee5c7bc95d96fea62bc0ae94af9734edf6e0366efe95e3c65c5f29e16abbec0ae6b086781926ac0ae0a08a64b19 SHA512 28c0c310b6cd8117d4a8b9ad60064b22b00bdc170303b190994e9a3d4fe83fbd9cae6c8f36da62faf6c356b5acf430c78878f19210386ec26844b56334d3941e
diff --git a/dev-util/cmake/cmake-3.18.3.ebuild b/dev-util/cmake/cmake-3.18.3.ebuild
new file mode 100644
index 000000000000..7334e72c320d
--- /dev/null
+++ b/dev-util/cmake/cmake-3.18.3.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake" # TODO: Re-check with 3.19, see commit 491dddfb; bug #596460
+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 ~x86-macos ~sparc-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
+ )
+"
+
+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
+ # Next patch requires new work from prefix people
+ #"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
+
+ # handle gentoo packaging in find modules
+ "${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
+ "${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.CommandLineTar: whatever...
+ # 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|Fortran|RunCMake.CommandLineTar|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \
+ || die "Tests failed"
+
+ popd > /dev/null
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # disable Xcode hooks, bug #652134
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
+ Source/cmGlobalXCodeGenerator.cxx || die
+ 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
+}