Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly portage-stable package updates 2023-12-11 #1477

Closed
Changes from 1 commit
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
b93f14b
app-alternatives/gzip: Sync with Gentoo
Dec 11, 2023
798ee59
app-arch/libarchive: Sync with Gentoo
Dec 11, 2023
1bcaa22
app-arch/xz-utils: Sync with Gentoo
Dec 11, 2023
bfb45ef
app-containers/docker: Sync with Gentoo
Dec 11, 2023
a28c7d3
app-containers/docker-cli: Sync with Gentoo
Dec 11, 2023
3559a5b
app-crypt/pinentry: Sync with Gentoo
Dec 11, 2023
394b48c
app-editors/vim: Sync with Gentoo
Dec 11, 2023
ea67663
app-editors/vim-core: Sync with Gentoo
Dec 11, 2023
e239786
app-emulation/qemu: Sync with Gentoo
Dec 11, 2023
fe8b0e3
app-misc/pax-utils: Sync with Gentoo
Dec 11, 2023
574e509
app-shells/bash: Sync with Gentoo
Dec 11, 2023
d97e1d5
app-text/asciidoc: Sync with Gentoo
Dec 11, 2023
b787562
dev-db/sqlite: Sync with Gentoo
Dec 11, 2023
2860354
dev-lang/lua: Sync with Gentoo
Dec 11, 2023
8c24969
dev-lang/perl: Sync with Gentoo
Dec 11, 2023
d4a4c08
dev-lang/python: Sync with Gentoo
Dec 11, 2023
fe1c743
dev-libs/elfutils: Sync with Gentoo
Dec 11, 2023
e31a7b5
dev-libs/glib: Sync with Gentoo
Dec 11, 2023
8888726
dev-libs/json-c: Sync with Gentoo
Dec 11, 2023
3f9e368
dev-libs/libgcrypt: Sync with Gentoo
Dec 11, 2023
bf2bce2
dev-libs/libksba: Sync with Gentoo
Dec 11, 2023
061a303
dev-libs/libnl: Sync with Gentoo
Dec 11, 2023
7bb4ed5
dev-libs/libpcre2: Sync with Gentoo
Dec 11, 2023
9d8b4ac
dev-libs/libunistring: Sync with Gentoo
Dec 11, 2023
ba15f81
dev-libs/libusb: Sync with Gentoo
Dec 11, 2023
aed7aaf
dev-libs/libuv: Sync with Gentoo
Dec 11, 2023
623c4e6
dev-libs/libxml2: Sync with Gentoo
Dec 11, 2023
629ecf8
dev-libs/libxslt: Sync with Gentoo
Dec 11, 2023
3878720
dev-libs/mpfr: Sync with Gentoo
Dec 11, 2023
c9e3db3
dev-libs/nettle: Sync with Gentoo
Dec 11, 2023
7c8fcdb
dev-libs/oniguruma: Sync with Gentoo
Dec 11, 2023
88e23ea
dev-libs/protobuf: Sync with Gentoo
Dec 11, 2023
69d0d96
dev-libs/xmlsec: Sync with Gentoo
Dec 11, 2023
80fb1c1
dev-python/certifi: Sync with Gentoo
Dec 11, 2023
4ea58b0
dev-python/cython: Sync with Gentoo
Dec 11, 2023
a827c3a
dev-python/jaraco-functools: Sync with Gentoo
Dec 11, 2023
ce47d8c
dev-python/jaraco-text: Sync with Gentoo
Dec 11, 2023
50fd69f
dev-python/lxml: Sync with Gentoo
Dec 11, 2023
20117d3
dev-python/packaging: Sync with Gentoo
Dec 11, 2023
63017db
dev-python/platformdirs: Sync with Gentoo
Dec 11, 2023
2121442
dev-python/pygments: Sync with Gentoo
Dec 11, 2023
7cfb523
dev-python/pyparsing: Sync with Gentoo
Dec 11, 2023
a8849c8
dev-python/setuptools: Sync with Gentoo
Dec 11, 2023
e4d78ca
dev-python/typing-extensions: Sync with Gentoo
Dec 11, 2023
1cd0fd9
dev-python/wheel: Sync with Gentoo
Dec 11, 2023
4e1196d
dev-util/bpftool: Sync with Gentoo
Dec 11, 2023
292137a
dev-util/cmake: Sync with Gentoo
Dec 11, 2023
7aa665a
dev-util/desktop-file-utils: Sync with Gentoo
Dec 11, 2023
0fc553b
dev-util/gdbus-codegen: Sync with Gentoo
Dec 11, 2023
d07a86e
dev-util/glib-utils: Sync with Gentoo
Dec 11, 2023
70966eb
dev-util/gperf: Sync with Gentoo
Dec 11, 2023
3c8a82f
dev-util/meson: Sync with Gentoo
Dec 11, 2023
b0adf23
dev-util/patchelf: Sync with Gentoo
Dec 11, 2023
22b9418
dev-util/pkgconf: Sync with Gentoo
Dec 11, 2023
8ac33eb
dev-util/strace: Sync with Gentoo
Dec 11, 2023
e977ad1
dev-vcs/git: Sync with Gentoo
Dec 11, 2023
63b73cf
eclass/acct-user: Sync with Gentoo
Dec 11, 2023
14bb39b
eclass/cargo: Sync with Gentoo
Dec 11, 2023
d27719f
eclass/distutils-r1: Sync with Gentoo
Dec 11, 2023
40454d8
eclass/flag-o-matic: Sync with Gentoo
Dec 11, 2023
134d7f0
eclass/git-r3: Sync with Gentoo
Dec 11, 2023
5b465f9
eclass/java-pkg-opt-2: Sync with Gentoo
Dec 11, 2023
0588b48
eclass/java-utils-2: Sync with Gentoo
Dec 11, 2023
017fcb6
eclass/llvm: Sync with Gentoo
Dec 11, 2023
565901e
eclass/meson: Sync with Gentoo
Dec 11, 2023
b10547f
eclass/multibuild: Sync with Gentoo
Dec 11, 2023
dda69c4
eclass/python-utils-r1: Sync with Gentoo
Dec 11, 2023
f9bf008
eclass/toolchain-autoconf: Sync with Gentoo
Dec 11, 2023
1d2cd71
eclass/toolchain-funcs: Sync with Gentoo
Dec 11, 2023
5b64767
eclass/toolchain: Sync with Gentoo
Dec 11, 2023
1b9d767
licenses: Sync with Gentoo
Dec 11, 2023
1833d02
net-analyzer/traceroute: Sync with Gentoo
Dec 11, 2023
d85d475
net-dns/bind-tools: Sync with Gentoo
Dec 11, 2023
fd574c4
net-dns/c-ares: Sync with Gentoo
Dec 11, 2023
2c5dec0
net-firewall/ipset: Sync with Gentoo
Dec 11, 2023
d14892a
net-libs/gnutls: Sync with Gentoo
Dec 11, 2023
42f3cbb
net-libs/libmicrohttpd: Sync with Gentoo
Dec 11, 2023
b5fdc74
net-libs/libnftnl: Sync with Gentoo
Dec 11, 2023
be9710b
net-libs/libpcap: Sync with Gentoo
Dec 11, 2023
123969b
net-libs/libslirp: Sync with Gentoo
Dec 11, 2023
0fa5648
net-libs/libssh2: Sync with Gentoo
Dec 11, 2023
c864cb8
net-libs/nghttp2: Sync with Gentoo
Dec 11, 2023
e2f97a6
net-misc/bridge-utils: Sync with Gentoo
Dec 11, 2023
1b2892b
net-misc/curl: Sync with Gentoo
Dec 11, 2023
c2bf0b0
net-misc/iperf: Sync with Gentoo
Dec 11, 2023
d6b8cad
net-misc/ntp: Sync with Gentoo
Dec 11, 2023
716b011
net-misc/socat: Sync with Gentoo
Dec 11, 2023
b728559
net-misc/whois: Sync with Gentoo
Dec 11, 2023
319fce4
net-nds/openldap: Sync with Gentoo
Dec 11, 2023
25c02bf
profiles: Sync with Gentoo
Dec 11, 2023
cc3381d
sec-policy/selinux-base: Sync with Gentoo
Dec 11, 2023
e836b6e
sec-policy/selinux-base-policy: Sync with Gentoo
Dec 11, 2023
639942f
sec-policy/selinux-container: Sync with Gentoo
Dec 11, 2023
697f3e9
sec-policy/selinux-dbus: Sync with Gentoo
Dec 11, 2023
73e0546
sec-policy/selinux-sssd: Sync with Gentoo
Dec 11, 2023
c1f1fb7
sec-policy/selinux-unconfined: Sync with Gentoo
Dec 11, 2023
61f7f59
sys-apps/debianutils: Sync with Gentoo
Dec 11, 2023
9008d2c
sys-apps/ethtool: Sync with Gentoo
Dec 11, 2023
3bf1e10
sys-apps/file: Sync with Gentoo
Dec 11, 2023
73a1015
sys-apps/gawk: Sync with Gentoo
Dec 11, 2023
c9defa9
sys-apps/gptfdisk: Sync with Gentoo
Dec 11, 2023
21baf8e
sys-apps/groff: Sync with Gentoo
Dec 11, 2023
6e44067
sys-apps/i2c-tools: Sync with Gentoo
Dec 11, 2023
acca6a8
sys-apps/iproute2: Sync with Gentoo
Dec 11, 2023
872b376
sys-apps/kbd: Sync with Gentoo
Dec 11, 2023
d8ac128
sys-apps/less: Sync with Gentoo
Dec 11, 2023
04b2b3f
sys-apps/man-db: Sync with Gentoo
Dec 11, 2023
ecdd878
sys-apps/net-tools: Sync with Gentoo
Dec 11, 2023
a25ab6b
sys-apps/portage: Sync with Gentoo
Dec 11, 2023
3cb7bcf
sys-apps/pv: Sync with Gentoo
Dec 11, 2023
d4ce3bc
sys-apps/smartmontools: Sync with Gentoo
Dec 11, 2023
4d4a3bf
sys-apps/texinfo: Sync with Gentoo
Dec 11, 2023
68625da
sys-apps/usbutils: Sync with Gentoo
Dec 11, 2023
4a53b79
sys-apps/util-linux: Sync with Gentoo
Dec 11, 2023
7e70f37
sys-block/parted: Sync with Gentoo
Dec 11, 2023
27ace03
sys-block/thin-provisioning-tools: Sync with Gentoo
Dec 11, 2023
c199227
sys-boot/gnu-efi: Sync with Gentoo
Dec 11, 2023
d56f9bf
sys-devel/autoconf: Sync with Gentoo
Dec 11, 2023
2847750
sys-devel/automake: Sync with Gentoo
Dec 11, 2023
3571cfe
sys-devel/binutils: Sync with Gentoo
Dec 11, 2023
8114453
sys-devel/crossdev: Sync with Gentoo
Dec 11, 2023
b2f39d9
sys-devel/gcc: Sync with Gentoo
Dec 11, 2023
6e655ff
sys-devel/gdb: Sync with Gentoo
Dec 11, 2023
8b67714
sys-devel/gettext: Sync with Gentoo
Dec 11, 2023
2a6ba93
sys-devel/m4: Sync with Gentoo
Dec 11, 2023
0dfc595
sys-firmware/edk2-ovmf-bin: Sync with Gentoo
Dec 11, 2023
c67b515
sys-firmware/intel-microcode: Sync with Gentoo
Dec 11, 2023
bc596b5
sys-fs/e2fsprogs: Sync with Gentoo
Dec 11, 2023
5248dc0
sys-fs/fuse-common: Sync with Gentoo
Dec 11, 2023
8dc6960
sys-fs/multipath-tools: Sync with Gentoo
Dec 11, 2023
155e220
sys-kernel/installkernel-gentoo: Sync with Gentoo
Dec 11, 2023
1f57ffa
sys-libs/binutils-libs: Sync with Gentoo
Dec 11, 2023
308434b
sys-libs/ldb: Sync with Gentoo
Dec 11, 2023
54bb12a
sys-libs/libnvme: Sync with Gentoo
Dec 11, 2023
09aab7e
sys-libs/libseccomp: Sync with Gentoo
Dec 11, 2023
86233dc
sys-libs/libunwind: Sync with Gentoo
Dec 11, 2023
29509d6
sys-libs/readline: Sync with Gentoo
Dec 11, 2023
0bf9d62
sys-libs/zlib: Sync with Gentoo
Dec 11, 2023
802fa69
sys-process/lsof: Sync with Gentoo
Dec 11, 2023
26f2ffa
sys-process/procps: Sync with Gentoo
Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
dev-util/cmake: Sync with Gentoo
It's from Gentoo commit 066302043166550e970a08293fde501ef5f910d1.
Flatcar Buildbot committed Dec 11, 2023
commit 292137adbbba1ffb650642958e63b44c5aaef358
Original file line number Diff line number Diff line change
@@ -12,3 +12,12 @@ DIST cmake-3.27.6.tar.gz 10982239 BLAKE2B 1aa876c0c4601261de30fa7829726f9423f359
DIST cmake-3.27.7-SHA-256.txt 1646 BLAKE2B 452413e7d2fe4eb8db96227e6b262bb540c8b58dbf9b34d07ecbc5ade69e76035940c82b643830086e09f113ba08271f271042a8e18b40478959f8f6010b081a SHA512 5f093ed51b10f530318c8b8205ff35f91443a71064008115eecce2f7e8393a3cb3b7dd1c35e5b7b58981c49b19ee708966321085a3237ec313a0865d26948e32
DIST cmake-3.27.7-SHA-256.txt.asc 833 BLAKE2B 687dc73a61abbda26be24dfce98f617e032c3f5494c7e5bd12aa83e3b91f2cf87cd1b08e7cdc5465eef29d005dcc317c3550cf6d447a199e94bf756374b57262 SHA512 cf5a657d739f66daa515b1c49914aabe264bedc24a6e91a18c7959623fac42390b75dc74063587c84b4a365451d5176766d76868279a4db1826eca6b69a44965
DIST cmake-3.27.7.tar.gz 10982558 BLAKE2B a20fac503ba54b4b7e85896056a614b67aa346ad2636e7ab1bf09a2660b92a52754485527f36101e59d47713e7445d27797577c1fa6a8ebe59acb4675227c6da SHA512 2e9b83dee8f8c012be4219ab74ebaa8b8438ea55d5204237a1c9feba94c732afe7baceddb9c681672903112b1e40f7b1a86b284cfceed15f46ce8f90143dbb86
DIST cmake-3.27.8-SHA-256.txt 1646 BLAKE2B e78bf23e703d9b89f3daa74d39794cadf5188c3b92f5d43a6b97fdbbeae27d86186cae16675560108391ee078072beddc855f7d92e7159a60ce3ad6c562f9907 SHA512 5c1b60500ce0915418c07f4b3770304d0b7d905bbefbd83bc9f21edea81b5c60d2b74a003e33aec851c2c691e5e57447d0ab2be51abb820180e45b43a90d36b8
DIST cmake-3.27.8-SHA-256.txt.asc 833 BLAKE2B e516fccd908987d70f02da85c79e6e57811c560a6fba31625829b5c316969a8ef0516e74a2055b46297888072fa5b6dd58af637e59579f41cb276d45664c7863 SHA512 ac37186a282151a5edfea2c0f05597f021ffad2de8b9608093930a8d4d10f9afd9ff71a8ee25198902d8d3831ce95a264fb48bc23fb31fa65985ec529988e866
DIST cmake-3.27.8.tar.gz 10983480 BLAKE2B 8c746d58fe07978bf0ccc92b31731bda46d13965bc3642846b41b7f2ab2d87e88122aa976f9b57a82d04ead4937d5c150b7ec3e9ae601985bfb5382509ddbe84 SHA512 ca7782caee11d487a21abcd1c00fce03f3172c718c70605568d277d5a8cad95a18f2bf32a52637935afb0db1102f0da92d5a412a7166e3f19be2767d6f316f3d
DIST cmake-3.27.9-SHA-256.txt 1646 BLAKE2B abfef38f8994d7684a44caaa4a5efa1ac8fbe38bd8e8c98bf341cf813f77ee54bea58f7b3ab7f68b3f5d992519396fd15a1f72a1d9587f593d80b8d2f8ba36e7 SHA512 310c45281735cf9812d9d1cf22a656c5b44e596ef7032a8b7b09900ef838e74b884599b42ed2f5469946f371d431b7d4b1e44f6cd49dfb36ea49d88b187b4804
DIST cmake-3.27.9-SHA-256.txt.asc 833 BLAKE2B 57d52fc2f3233662af13eb362ec82626c4821267f55f1313907513b61cee5b8481936da2b03c908c507b3e0919e4811e90c6cb47568420a8b2187c7942de9f1e SHA512 cad2007e356eac480b2cb93778f90152788e33be2e565b38535a2d205794054e5d67d4ed7db0765a05017aedc5f1af21556535a084014fe6c446bc13258253da
DIST cmake-3.27.9.tar.gz 10984490 BLAKE2B 66f8fb6e301ed19f993fde6c4f9e336124be6373d49b58d130ce59f4e5225cd27e02813856636b51c2521403c3a56c200ce646de5c35be2b25b5e6240c98bdb4 SHA512 56ce723b0b6d09b420a2f89ba1636cdfb1bc305bc2df91ae716f866bee07f5d702d75efbddfbaf724f47382df809107fe1e6d046314cd2f1ff07bca34ad6340a
DIST cmake-3.28.0-SHA-256.txt 1646 BLAKE2B d2ca3e3b06e0cb94d421d920e0a0b03c22d2ee170a452fbbac3688c41fd0306eb3c914495c2a94ede835d31872c29bb633c24827b5dcb1899a866a099dff1e78 SHA512 4f68c13e0f3bf51855a01f0d1258974aa352ae5a1f194a913ff0e637fbd9a2899d73bf889757faba27981a6629bc723ca27a4a64ab7e7c6a056fb80d14eaf058
DIST cmake-3.28.0-SHA-256.txt.asc 833 BLAKE2B 6a7e266dfc873be04e75881d982ad7bffe21600992ddd79cd68a4b8322aeb2f5760361810cdd74af719ce004cd233e76e521e5853eabcef5b4c73b7e055a97ac SHA512 8c0fe1461d26ed2b7facbfd9294b3006d76ef00614416da4e22936808e53b76f029137d47c352223c8a4ed4ba385dcb9987acb5c1962cc3f2fa0783424059b17
DIST cmake-3.28.0.tar.gz 11064707 BLAKE2B 8e03436d7e2b16d5865cef4ed94d12ffdf134d12ad59c4296589bad1a2836916cbb17367f4adda99a9bd835af8b891fee34b2e00441dd22696e396e4109f61f2 SHA512 54f0fa5754693ab0a58314301da6957fbee410cf3c5906eaf5a5eabe9d371d8eda84eba42832c29d0a223d954b580c955811f62be38b33b817cab7199f884b60
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ else
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"
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
# 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=/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 gui ncurses qt6 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:* )
gui? (
!qt6? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
qt6? ( dev-qt/qtbase:6[gui,widgets] )
)
ncurses? ( sys-libs/ncurses:= )
"
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)
# pkgconf
# fixes https://github.com/pkgconf/pkgconf/issues/317
"${FILESDIR}"/${PN}-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch
)

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)
-DBUILD_QtDialog=$(usex gui)
)

use gui && mycmakeargs+=( -DCMake_QT_MAJOR_VERSION=$(usex qt6 6 5) )

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 gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

pkg_postrm() {
use emacs && elisp-site-regen

if use gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
# 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=/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 gui ncurses qt6 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:* )
gui? (
!qt6? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
qt6? ( dev-qt/qtbase:6[gui,widgets] )
)
ncurses? ( sys-libs/ncurses:= )
"
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)
# pkgconf
# fixes https://github.com/pkgconf/pkgconf/issues/317
"${FILESDIR}"/${PN}-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch
)

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)
-DBUILD_QtDialog=$(usex gui)
)

use gui && mycmakeargs+=( -DCMake_QT_MAJOR_VERSION=$(usex qt6 6 5) )

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 gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

pkg_postrm() {
use emacs && elisp-site-regen

if use gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
# 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=/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 gui ncurses qt6 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:* )
gui? (
!qt6? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
qt6? ( dev-qt/qtbase:6[gui,widgets] )
)
ncurses? ( sys-libs/ncurses:= )
"
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)
"${FILESDIR}"/${PN}-3.28.0-c99.patch
)

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)
-DBUILD_QtDialog=$(usex gui)
)

use gui && mycmakeargs+=( -DCMake_QT_MAJOR_VERSION=$(usex qt6 6 5) )

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 gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}

pkg_postrm() {
use emacs && elisp-site-regen

if use gui; then
xdg_icon_cache_update
xdg_desktop_database_update
xdg_mimeinfo_database_update
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9002

From 9ede6138b71ac2ab961b0954b10a9dc03cf77b37 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 23 Nov 2023 08:45:05 +0100
Subject: [PATCH] Tests: Improve C compatibility of LoadCommand tests

The previous code used `char **` and `const char **`` types as if they
were the same. But they are distinct types in C, so when passing
these pointers as function arguments, their types have to match.
Future C compilers will treat this as an error, similar to what
C++ compilers do today.
---
Tests/LoadCommand/CMakeCommands/cmTestCommand.c | 13 ++++++++-----
.../CMakeCommands/cmTestCommand.c | 15 +++++++++------
2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
index 7176ebe9d4b..ba13727d2b8 100644
--- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
@@ -16,14 +16,14 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
{
char* file;
char* str;
- char* srcs;
+ const char* srcs;
const char* cstr;
char buffer[1024];
void* source_file;
char* args[2];
- char* ccArgs[4];
- char* ccDep[1];
- char* ccOut[1];
+ const char* ccArgs[4];
+ const char* ccDep[1];
+ const char* ccOut[1];
cmLoadedCommandInfo* info = (cmLoadedCommandInfo*)inf;

cmVTKWrapTclData* cdata =
@@ -148,7 +148,10 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
if (info->CAPI->GetTotalArgumentSize(2, args) != 13) {
return 0;
}
- info->CAPI->ExecuteCommand(mf, "SET", 2, args);
+
+ ccArgs[0] = "TEST_EXEC";
+ ccArgs[1] = "TRUE";
+ info->CAPI->ExecuteCommand(mf, "SET", 2, ccArgs);

/* make sure we can find the source file */
if (!info->CAPI->GetSource(mf, argv[1])) {
diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
index 7176ebe9d4b..e3b332c1aa9 100644
--- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
@@ -16,14 +16,14 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
{
char* file;
char* str;
- char* srcs;
- const char* cstr;
+ const char* srcs;
+ char* cstr;
char buffer[1024];
void* source_file;
char* args[2];
- char* ccArgs[4];
- char* ccDep[1];
- char* ccOut[1];
+ const char* ccArgs[4];
+ const char* ccDep[1];
+ const char* ccOut[1];
cmLoadedCommandInfo* info = (cmLoadedCommandInfo*)inf;

cmVTKWrapTclData* cdata =
@@ -148,7 +148,10 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
if (info->CAPI->GetTotalArgumentSize(2, args) != 13) {
return 0;
}
- info->CAPI->ExecuteCommand(mf, "SET", 2, args);
+
+ ccArgs[0] = "TEST_EXEC";
+ ccArgs[1] = "TRUE";
+ info->CAPI->ExecuteCommand(mf, "SET", 2, ccArgs);

/* make sure we can find the source file */
if (!info->CAPI->GetSource(mf, argv[1])) {
--
GitLab