From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AD1B915800A for ; Thu, 24 Aug 2023 14:41:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E16112BC01C; Thu, 24 Aug 2023 14:41:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C69792BC01C for ; Thu, 24 Aug 2023 14:41:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9BC66340DD5 for ; Thu, 24 Aug 2023 14:41:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D164C1069 for ; Thu, 24 Aug 2023 14:41:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1692888094.27280e2c125bbef9a22cd535b8f1f8989b942e3b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cmake/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/cmake/Manifest dev-util/cmake/cmake-3.27.4.ebuild X-VCS-Directories: dev-util/cmake/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 27280e2c125bbef9a22cd535b8f1f8989b942e3b X-VCS-Branch: master Date: Thu, 24 Aug 2023 14:41:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5650339a-d4ed-4a8f-903f-198194eeffe8 X-Archives-Hash: 3e3b5dbf1a55dc219bc0e3ab8a0e7ec3 commit: 27280e2c125bbef9a22cd535b8f1f8989b942e3b Author: Sam James gentoo org> AuthorDate: Thu Aug 24 14:40:27 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 24 14:41:34 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27280e2c dev-util/cmake: add 3.27.4 Signed-off-by: Sam James gentoo.org> dev-util/cmake/Manifest | 3 + dev-util/cmake/cmake-3.27.4.ebuild | 288 +++++++++++++++++++++++++++++++++++++ 2 files changed, 291 insertions(+) diff --git a/dev-util/cmake/Manifest b/dev-util/cmake/Manifest index 2e9a13884906..a69ce34cf8a9 100644 --- a/dev-util/cmake/Manifest +++ b/dev-util/cmake/Manifest @@ -18,3 +18,6 @@ DIST cmake-3.27.2.tar.gz 10978264 BLAKE2B 709e6c2769365daf1003ce4bb443291286cd23 DIST cmake-3.27.3-SHA-256.txt 1646 BLAKE2B 937aea86f553e65b17d3ec5b3c67d790cb614510bfc054cd24c4a39c1f1d6961798ccc067465b6ea2c837ce9a422075d160820c368c3897a37d60c0c8e0c942f SHA512 5d88128a559581924112e04b6049cf293c64e5f095a5685844ad553caf6d66c8589a2665ccd4cc4b546bd670aa932b529dbca82c1a4db4e611c8a341cc241277 DIST cmake-3.27.3-SHA-256.txt.asc 833 BLAKE2B a73010dead5d44a0d146bbf1c84d303eb07e51ca752f5c3396f534abcd8353afb453f9e00eb77958075ec622e42f48faa70deb1626164607efd521e86477cf55 SHA512 965d62f92133b68911846f65d50dadc2a99c4034fcff9abc1c9e94780049a4e35d621a379079d77bdab18ab22d21bb287ee166cdd6ca2c1f7be0cf6500c11746 DIST cmake-3.27.3.tar.gz 10978618 BLAKE2B 00376f64031365b5b3ed53d18a51d64ac33b3722933fb48e041fd28942688022e003697450228e46f9bfbfdc81f402552a7f741542dd800b34f7520cf5ba7087 SHA512 cbb845d2a8724faf5c9b57c6350a130c981ef5d209eb34fd52a5940ff7e176b0ae6512f766ee9ee6f03063269179ba15e123690a0d62ac65e32ffe8027806d9f +DIST cmake-3.27.4-SHA-256.txt 1646 BLAKE2B 42c905f7550e0140ca28f334dc4cd8b244f57830af3011c098b3859cb5c50643141045a61e1e22559d2bb0cf29034229465e73aa4752e2a927fb8ce1426f7f74 SHA512 ecd9e60edee28dd272e8afcc7b0b2240e19f0676b9d634dbe02727bade880103b4a03a1f52a757264e825984a4c4bf7d290df5b32e9b1204555b56afb33d488f +DIST cmake-3.27.4-SHA-256.txt.asc 833 BLAKE2B 983a89f1637596ebf72e5456a488293bd2dcc21ade8738051279ce43d18244573b912acb7bbe3ff5d52e4b5b52f2bb23784a0750c84997d311d925dd3a608c11 SHA512 f99f606f9907581c3f121b4e0d99ec54a439be35012ca94d4762ae95764c01ef5aeda848dd9c460e340a284e9c3d59fd97315006bfd259863551ae6764af2e4e +DIST cmake-3.27.4.tar.gz 10980052 BLAKE2B 29991e736c3ed901d30f656742f236e78854fbc13b543f02b08348733e2d4fbc5ef2e4b32f5d2a641c0a1eeacd091db6cc71643f000e9c5505718d999897457c SHA512 fc04b041f5c73b0a969ba09251e00e20f33e7a76460630d60e95ce08086c6b41b82315bd8782c19070b5f12a4290858825687f816b69ad5df8101053b4a2b48a diff --git a/dev-util/cmake/cmake-3.27.4.ebuild b/dev-util/cmake/cmake-3.27.4.ebuild new file mode 100644 index 000000000000..98ff361e9f75 --- /dev/null +++ b/dev-util/cmake/cmake-3.27.4.ebuild @@ -0,0 +1,288 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${CMAKE_DOCS_PREBUILT:=1} + +CMAKE_DOCS_PREBUILT_DEV=sam +#CMAKE_DOCS_VERSION=$(ver_cut 1-3) +CMAKE_DOCS_VERSION=3.27.0 +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# See bug #784815 +CMAKE_DOCS_USEFLAG="+doc" + +# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja +# ... but seems fine as of 3.22.3? +# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759. +CMAKE_MAKEFILE_GENERATOR="emake" +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/" +if [[ ${PV} == 9999 ]] ; then + CMAKE_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.kitware.com/cmake/cmake.git" + inherit git-r3 +else + SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz" + + if [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${CMAKE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${CMAKE_DOCS_VERSION}-docs.tar.xz )" + fi + + if [[ ${PV} != *_rc* ]] ; then + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bradking.asc + inherit verify-sig + + SRC_URI+=" verify-sig? ( + https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt + https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc + )" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20230817 )" + fi +fi + +[[ ${CMAKE_DOCS_PREBUILT} == 1 ]] && CMAKE_DOCS_USEFLAG="doc" + +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD" +SLOT="0" +IUSE="${CMAKE_DOCS_USEFLAG} dap emacs ncurses qt5 test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=app-arch/libarchive-3.3.3:= + app-crypt/rhash:0= + >=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 + dap? ( dev-cpp/cppdap ) + 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] ) +" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( + # Prefix + "${FILESDIR}"/${PN}-3.27.0_rc1-0001-Don-t-use-.so-for-modules-on-darwin-macos.-Use-.bund.patch + "${FILESDIR}"/${PN}-3.27.0_rc1-0002-Set-some-proper-paths-to-make-cmake-find-our-tools.patch + # Misc + "${FILESDIR}"/${PN}-3.27.0_rc1-0003-Prefer-pkgconfig-in-FindBLAS.patch + "${FILESDIR}"/${PN}-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch + "${FILESDIR}"/${PN}-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch + "${FILESDIR}"/${PN}-3.27.0_rc1-0006-Filter-out-distcc-warnings-to-avoid-confusing-CMake.patch + + # 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" +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + elif [[ ${PV} == *_rc* ]] || ! use verify-sig ; then + default + else + cd "${DISTDIR}" || die + + # See https://mgorny.pl/articles/verify-sig-by-example.html#verifying-using-a-checksum-file-with-a-detached-signature + verify-sig_verify_detached ${MY_P}-SHA-256.txt{,.asc} + verify-sig_verify_unsigned_checksums ${MY_P}-SHA-256.txt sha256 ${MY_P}.tar.gz + + cd "${WORKDIR}" || die + + default + fi +} + +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.13 || ! 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 + + # ODR warnings, bug #858335 + # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 + filter-lto + + local mycmakeargs=( + -DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMake_ENABLE_DEBUGGER=$(usex dap) + -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() { + # 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 || die + + # Excluded tests: + # BootstrapTest: we actualy bootstrap it every time so why test it. + # BundleUtilities: bundle creation broken + # CMakeOnly.AllFindModules: pthread issues + # CTest.updatecvs: which 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 + # TestUpload, which requires network access + # RunCMake.CMP0125, known failure reported upstream (bug #829414) + local myctestargs=( + --output-on-failure + -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \ + ) + + virtx cmake_src_test +} + +src_install() { + cmake_src_install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/man*/*.[0-8] + fi + + 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 +}