From bfd63d5b0e96ad32e0d0a8fe15512b6a9ac6fc9e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 21 May 2024 00:05:36 +0100 Subject: gentoo auto-resync : 21:05:2024 - 00:05:35 --- sys-libs/Manifest.gz | Bin 14572 -> 14578 bytes sys-libs/kpmcore/Manifest | 4 +- sys-libs/kpmcore/kpmcore-24.02.2.ebuild | 31 --- sys-libs/kpmcore/kpmcore-24.04.90.ebuild | 31 +++ sys-libs/libcap/Manifest | 2 + sys-libs/libcap/libcap-2.70.ebuild | 94 ++++++++++ sys-libs/musl/Manifest | 3 + .../files/musl-1.2.4-arm64-crti-alignment.patch | 32 ++++ sys-libs/musl/musl-1.2.4-r2.ebuild | 205 ++++++++++++++++++++ sys-libs/musl/musl-1.2.5-r1.ebuild | 207 +++++++++++++++++++++ 10 files changed, 576 insertions(+), 33 deletions(-) delete mode 100644 sys-libs/kpmcore/kpmcore-24.02.2.ebuild create mode 100644 sys-libs/kpmcore/kpmcore-24.04.90.ebuild create mode 100644 sys-libs/libcap/libcap-2.70.ebuild create mode 100644 sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch create mode 100644 sys-libs/musl/musl-1.2.4-r2.ebuild create mode 100644 sys-libs/musl/musl-1.2.5-r1.ebuild (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index dc9b2986fb84..6512c4b50d42 100644 Binary files a/sys-libs/Manifest.gz and b/sys-libs/Manifest.gz differ diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest index b2c079f7f173..4e694e6e7df8 100644 --- a/sys-libs/kpmcore/Manifest +++ b/sys-libs/kpmcore/Manifest @@ -1,5 +1,5 @@ DIST kpmcore-23.08.5.tar.xz 630396 BLAKE2B f5a470c9b54663b9f52467519046646de9ea20b83c8afaf199e3877ecc3f9de47139c9d44e8b23a2d49bfb00ae624b9117cf1adf83092f141a8e46d02adfaf8f SHA512 30ddbe62412df5645e034b745159b7c8db7801340225653d05856032083181d482379415a56d4e6f703c4f6c4a1a79c252a3b549beba227ab70dfc673cc59acd -DIST kpmcore-24.02.2.tar.xz 633412 BLAKE2B b270bbb8c41b9b1821b6bb4761faf3d17efd19b137a2283cc31eb91efd362b0c3ba5c795edc468744a678674997b345038989fe3124bf5f69504c86272740ae4 SHA512 24664d79e4fbc630ecdbc08006de2bc6a1d42abd1eeeb842b00c45a17742ae651c0c5a490310d99803b6dfe757f4fcc0a66c211dd2afbbafd4cd8cfb30050bd0 +DIST kpmcore-24.04.90.tar.xz 637972 BLAKE2B 60356c4d8db29cc5240809053d83069ec1b5d2db0aa69f741b9e939daf10552788e231af76a6df52bd014c9a43a75197e26153dfc5579b5ff00c448d5cf8eab3 SHA512 d7772ac8e443db3ded7de74fab3a3c11cf435adf3c3b0c31f8d7534f9321f1805bddc7b5666b1620f6aa92ee0473f41847672d31b7530daf3d6bead03ef6b9f1 EBUILD kpmcore-23.08.5.ebuild 751 BLAKE2B 213a0bcdd1fe60de05ef4759d4a2e750ed3bfdc19d7c20ea3981243efefa36248592b9699972749e117d415326b29846bb5c59e2643e2ec7c4a6dcada5f4d1a6 SHA512 a0085e7c8e3ad6aace56fa13d0032433b2fa21bc43ff4fe3b76e2f1bf4f08b13b31c63ab3e5a645bfc5fd9f527076bc03ad9739a6b220b1ecd905f267694cd13 -EBUILD kpmcore-24.02.2.ebuild 677 BLAKE2B 5e428ac7bd2b50067ef6a52350db6db98cbae9bb2bed6efc389abffa85dd7f59123631b31b3d3405c5fbcddda250ac664c9bd7e1c36bd7440da48089077b2735 SHA512 1090d23327d8895ad7f913054d1604a7eaa1a516799c12b8508a4202b5f3d982506c84a6355307fb283e190113f70e85522e9c3b87a0e48f4f6f17d431c0fb35 +EBUILD kpmcore-24.04.90.ebuild 677 BLAKE2B 5e428ac7bd2b50067ef6a52350db6db98cbae9bb2bed6efc389abffa85dd7f59123631b31b3d3405c5fbcddda250ac664c9bd7e1c36bd7440da48089077b2735 SHA512 1090d23327d8895ad7f913054d1604a7eaa1a516799c12b8508a4202b5f3d982506c84a6355307fb283e190113f70e85522e9c3b87a0e48f4f6f17d431c0fb35 MISC metadata.xml 318 BLAKE2B 922a5e32e706b2976c5f359a14194d268d3f499398576c80ce5fad8c0fcea0fbf048de4480a80a6a1889c88b8b6c14147654a3ab4d5ffbcc258c2290da63f6d1 SHA512 614cb8dda7ad2088e5d6ef39b449bb4be0ac72cd0231c320188d76d1816dce6490c5114bb4798112c4b11d99d30a9e82ff8fcf08ffa8c049589682a5e38208f6 diff --git a/sys-libs/kpmcore/kpmcore-24.02.2.ebuild b/sys-libs/kpmcore/kpmcore-24.02.2.ebuild deleted file mode 100644 index 981859e0e0f5..000000000000 --- a/sys-libs/kpmcore/kpmcore-24.02.2.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -ECM_NONGUI="true" -KFMIN=6.0.0 -QTMIN=6.6.2 -inherit ecm gear.kde.org - -DESCRIPTION="Library for managing partitions" -HOMEPAGE="https://apps.kde.org/partitionmanager/" - -LICENSE="GPL-3" -SLOT="6/10" -KEYWORDS="~amd64" -IUSE="" - -# bug 689468, tests need polkit etc. -RESTRICT="test" - -DEPEND=" - >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets] - >=kde-frameworks/kcoreaddons-${KFMIN}:6 - >=kde-frameworks/ki18n-${KFMIN}:6 - >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 - >=sys-apps/util-linux-2.33.2 - >=sys-auth/polkit-qt-0.175.0[qt6] -" -RDEPEND="${DEPEND}" -BDEPEND="virtual/pkgconfig" diff --git a/sys-libs/kpmcore/kpmcore-24.04.90.ebuild b/sys-libs/kpmcore/kpmcore-24.04.90.ebuild new file mode 100644 index 000000000000..981859e0e0f5 --- /dev/null +++ b/sys-libs/kpmcore/kpmcore-24.04.90.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_NONGUI="true" +KFMIN=6.0.0 +QTMIN=6.6.2 +inherit ecm gear.kde.org + +DESCRIPTION="Library for managing partitions" +HOMEPAGE="https://apps.kde.org/partitionmanager/" + +LICENSE="GPL-3" +SLOT="6/10" +KEYWORDS="~amd64" +IUSE="" + +# bug 689468, tests need polkit etc. +RESTRICT="test" + +DEPEND=" + >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets] + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 + >=sys-apps/util-linux-2.33.2 + >=sys-auth/polkit-qt-0.175.0[qt6] +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index 21df47a64389..b4c8132dbd81 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -1,5 +1,7 @@ AUX libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch 724 BLAKE2B 39b2924071c9c6b1ffba3acf2fbeea6196c20da175ed4a5ddd6fac5375d604df3823bf183c36da6eb03e1b9cd918d107fd7e5b30f2f3746ce17b589a77f3dec5 SHA512 11ca33d7f1a352cce9dad179be415b6282efdbb9049a92ba945cbfbee2b6c263af39adb3a93f62e5077d9b33e0f098f9125362432bd333601345d8c3671d40bd DIST libcap-2.69.tar.xz 189200 BLAKE2B 94d1fef7666a1c383a8b96f1f6092bd242164631532868b628d2f5de71b42a371d041a978ef7fbadfee3eeb433165444995d1078cd790275bc0433a7875a697e SHA512 647c307dc451517da9d089495ab959b4a6fbbe41c79f4e1e9bb663569dad630ead0c2e413dfb393319e3ea14dc9848c81b392107fe3382ce1813d278c3394a7f +DIST libcap-2.70.tar.xz 191388 BLAKE2B 77b72acee53032117ea481e3380d1b497f9264b6193b9523542508c7c3e46070248ca4ed910d35809ce6e52caa60cbb31edb125c47221627eeda35c61bd0914b SHA512 4e0bf0efeccb654c409afe9727b2b53c1d4da8190d7a0a9848fc52550ff3e13502add3eacde04a68a5b7bec09e91df487f64c5746ba987f873236a9e53b3d4e8 EBUILD libcap-2.69-r1.ebuild 2180 BLAKE2B f97553d779b1432b5af33493afad8fbdd65f1c2ff40b8d74038922cc1452c97b7796ed164a112444be315abfecc734959cf3d1f2398694c1c97303dd1df0f759 SHA512 ee63fb73be7d7dc94d881dbf004ea1f44d566719c1afcc5c36455d85fef9bd70a0175e9b57b92e7454ffc6be7c0e1451d61a5c7f56944987fb2f7267f82b3b21 +EBUILD libcap-2.70.ebuild 2188 BLAKE2B c090d7a6d384cb1e0298b57eb3ff5ff36912b6dc68995058df2cd12a30b83e9ebbfb37738f248e67e57c68baf2ea3f2f5d1572d4d093b9c56db47f6289d6f28f SHA512 ec9fb399a62a915d2626835e0edfdcea841642ea93d4f0531294832b29bee000f973e96659a8bdebf96c6b541b3c67d5add8edc25acc1fe1ec12d39e6e925e6f EBUILD libcap-9999.ebuild 2188 BLAKE2B c090d7a6d384cb1e0298b57eb3ff5ff36912b6dc68995058df2cd12a30b83e9ebbfb37738f248e67e57c68baf2ea3f2f5d1572d4d093b9c56db47f6289d6f28f SHA512 ec9fb399a62a915d2626835e0edfdcea841642ea93d4f0531294832b29bee000f973e96659a8bdebf96c6b541b3c67d5add8edc25acc1fe1ec12d39e6e925e6f MISC metadata.xml 438 BLAKE2B b5260cc84a3fe6b992bb6218846c738af296522d7a467337c05a6240fd07fc9d6cece779bd9fcf24a11486a70874e17acae8182647d307a31cf43e1c19c3a2d3 SHA512 fa3713dcf6b7bb2ea6d4c2fdefc05e92ae345c76a6187ebcb40dab8c4ce0148650a8301f236efcb8cf53fff25730977a385578dbaa160b800159c6d6abbf37a9 diff --git a/sys-libs/libcap/libcap-2.70.ebuild b/sys-libs/libcap/libcap-2.70.ebuild new file mode 100644 index 000000000000..ee91b8f42d9c --- /dev/null +++ b/sys-libs/libcap/libcap-2.70.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal toolchain-funcs pam + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git" +else + SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="https://sites.google.com/site/fullycapable/" + +# it's available under either of the licenses +LICENSE="|| ( GPL-2 BSD )" +SLOT="0" +IUSE="pam static-libs tools" + +# While the build system optionally uses gperf, we don't DEPEND on it because +# the build automatically falls back when it's unavailable. #604802 +PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )" +DEPEND="${PDEPEND} + sys-kernel/linux-headers" +BDEPEND=" + sys-apps/diffutils + tools? ( dev-lang/go )" + +QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS + +PATCHES=( + "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch +) + +src_prepare() { + default + multilib_copy_sources +} + +run_emake() { + local args=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + OBJCOPY="$(tc-getOBJCOPY)" + RANLIB="$(tc-getRANLIB)" + exec_prefix="${EPREFIX}" + lib_prefix="${EPREFIX}/usr" + lib="$(get_libdir)" + prefix="${EPREFIX}/usr" + PAM_CAP="$(usex pam yes no)" + DYNAMIC=yes + GOLANG="$(multilib_native_usex tools yes no)" + ) + emake "${args[@]}" "$@" +} + +src_configure() { + tc-export_build_env BUILD_CC + multilib-minimal_src_configure +} + +multilib_src_compile() { + run_emake +} + +multilib_src_test() { + run_emake test +} + +multilib_src_install() { + # no configure, needs explicit install line #444724#c3 + run_emake DESTDIR="${D}" install + + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die + fi + + # install pam plugins ourselves + rm -rf "${ED}"/usr/$(get_libdir)/security || die + + if use pam ; then + dopammod pam_cap/pam_cap.so + dopamsecurity '' pam_cap/capability.conf + fi +} + +multilib_src_install_all() { + dodoc CHANGELOG README doc/capability.md +} diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index abc1c105f11e..d783eddf3d22 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -1,4 +1,5 @@ AUX ldconfig.in-r3 3093 BLAKE2B 146374fe711c660a61e4a23f89ae066e78b8bca6884719c058981069ab92833d7f660b7bd78e7c8b86112944706823f0260d7c63f19d64960f27f44b4e95a6a3 SHA512 ba021cf7d52c001d6ef9a54a91de93240cd7eef9f7a6d7a48ae0c58f934aaea6796979ce80e1cfa9bdc6008023108f3c226440360f8e3134fc23f7fdac0e55b1 +AUX musl-1.2.4-arm64-crti-alignment.patch 847 BLAKE2B 4f652b924fd9b7a396d21cf8fef0d618c23ce14ea662290850e9a8ed78ac6303f674ac978f74e86f8671df75a7749ee54bbbe11278ae283892d1157e540a86d8 SHA512 77d6a4798a71d3593621bb8d3177b288f04bc0e5a4b2a6b91e8ad73e8a96279a4ae18344df77fafb97228931d6e6306b4b0c2adba8dded6449b7bb2565041d31 AUX musl-1.2.4-elfutils-0.190-relr.patch 2930 BLAKE2B 81bcc8932eb4ffb7cf0ae5707866d755c731e67bdcfa71e097f48ee3f13ab75fc96645bfc76e376cda700d81fbb6f7e47f83b06964ded9ea173c262965e4cb04 SHA512 47a24912f5dc16e21a0692c8f0b323dec815867dca7d65f97740a0ad2623c42cd0711e0b69609f24774db8cb26518e2ee5577b4a89d36cc2b053ba7b879cb2f8 AUX stack_chk_fail_local.c 1798 BLAKE2B 380bcbb920bd40a5185246621ba93716f27d61cd0077cd796ff267e10c534c9cc64982b2a66c89b61395dc93d67dae77e8c59908f65f2903f16016180cf94bbb SHA512 bb0bdd7f205d57771920c7ea898c1f84a55d6f90ddd1f8203bfeed98d13ccefa6f68d5fd1c0761321b2732ca928ca81b425e3fe8321c936d1316dea6f1930091 DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609a59b6b07e7404f676c415383ae88c0aede95694821f6ee381bffd93cc3330501e17dc07d122bd SHA512 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d @@ -12,6 +13,8 @@ DIST musl-1.2.5.tar.gz.asc 490 BLAKE2B f0d91b20aa7729449bd02a60adf17e8287904ed59 DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee EBUILD musl-1.2.3-r8.ebuild 5934 BLAKE2B 6b59d02f8163923c41f66535cd3e1fd5a476a6a7426677f65fac1be3759d2453fcd42e7e0fea522fbe90684346974910bea737c8624921f9924ad348fc7d06e4 SHA512 73894ff4988ce54113bb1d46ca53ae1be12fdf0f56209406e7931c645f250e6a8f10417d3f31906d10526dabb841535af603073e6fae7b25fe5a157d1639f94e EBUILD musl-1.2.4-r1.ebuild 5723 BLAKE2B 2c40e6a549a79610d4c1c73d159eaa238fdbe2a965ebd781e617b7829010624c1ad38e9b2335bf77b0bf5ea2887128d3475aae4fb98cebfb9d36596bbad9e86b SHA512 25c4b6d7d09a90662aa8a2e7fd7cbab13b6439ba3a65c7f52c39e30bf4eacc224d2c3d9d81ff1088d0e32406c6513189281d6ab27788cb3a3c583cce3725f161 +EBUILD musl-1.2.4-r2.ebuild 5785 BLAKE2B 913bb167f55ba2c35ae0d1db85a67c1ef5430826a1402c3cdb91f75ff520e9f3c4e1c467d29b68a131da19644ad4cda3e4f79c840370eba6efff542b6673ac9a SHA512 6e10ce461c28516f19df9410ee3b5cf0762672c2a5c1453566df10d080829230509880b433b874aab4e268fae6a373265cb0780287607a30d1b6bc9e3c8a9e71 +EBUILD musl-1.2.5-r1.ebuild 5783 BLAKE2B 4ba1b947af8452818c3b3b5c8fdc0e63c4f2e657fd5cdd7623fb66976bc45cbf9a059d8346aa69f9e4d1038798537cd7d6a6225f1a2317c67dd679c109e20759 SHA512 f4df9f85a50ac27e7cc62aeeb348a6e3179f340f7953bcafbe9fcc953aef075ade4d518ddbce2b0fe6163dab5a6361d01e8c6aed15891fd6188cb14a6cda2abb EBUILD musl-1.2.5.ebuild 5714 BLAKE2B 5d539f26f6bcfe43bdcfd23a3d84659a2cadf3ecc9c01a812303a0d699343689ac0d310ffea98199a21da40be61e9c8082a01162d9af57b2d8254bba5c983d77 SHA512 76c8ee66312bc1b9bc7c0d68531b92affe352301b9676e04ec776c9a91acfda43c4f6c324830e056d9753a6e11137fd57559adfbcc99ceb384dd3940b62c8841 EBUILD musl-9999.ebuild 5691 BLAKE2B 47179b9846400c4a6eefab996bfb928a10f96de3324094072c5fdc5f529e1a964f2fd2668e2386274d9f4f7d902ab234d8fc9233b903208700a9f88f044b1a41 SHA512 d4a89572ea8d6605ebb6e0b6c81cc9934da8d3be31ae4a57007d4e5bd47cfec9d1dc69a4d0411f9b076df7bf6e9248ff2da53e76ba63d9b73431663f58279d67 MISC metadata.xml 559 BLAKE2B 8b1093a5278f716b8e21467b325e373a790f54c8ab71b92adc4c87dd569a92b20e08009372065f0f27ced39e3361c9e5e5a2e1bff271753d280439fabbddd3a4 SHA512 a35c13ea32ac8f26984bdb0d70d28a4285f34e32a2b0b17ad98fe3f357fb46c87a1e853377630d4da58fd5953de3fdeb02ee89181394e1815f5e0bbba4cd9f92 diff --git a/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch b/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch new file mode 100644 index 000000000000..8b548bdb255f --- /dev/null +++ b/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch @@ -0,0 +1,32 @@ +https://git.musl-libc.org/cgit/musl/commit/?id=cbf59dd662cea8786c2f3a5ea21f8da64f002b30 +https://github.com/rui314/mold/issues/1255 +https://bugs.gentoo.org/931782 + +From cbf59dd662cea8786c2f3a5ea21f8da64f002b30 Mon Sep 17 00:00:00 2001 +From: mojyack +Date: Sun, 12 May 2024 12:13:06 -0400 +Subject: aarch64 crti.o: fix alignment of _init/_fini + +without explicit alignment directives, whether they end up at the +necessary alignment depends on linker/linking conditions. initially +reported as mold issue 1255. +--- a/crt/aarch64/crti.s ++++ b/crt/aarch64/crti.s +@@ -1,6 +1,7 @@ + .section .init + .global _init + .type _init,%function ++.align 2 + _init: + stp x29,x30,[sp,-16]! + mov x29,sp +@@ -8,6 +9,7 @@ _init: + .section .fini + .global _fini + .type _fini,%function ++.align 2 + _fini: + stp x29,x30,[sp,-16]! + mov x29,sp +-- +cgit v1.2.1 diff --git a/sys-libs/musl/musl-1.2.4-r2.ebuild b/sys-libs/musl/musl-1.2.4-r2.ebuild new file mode 100644 index 000000000000..1ec30208d947 --- /dev/null +++ b/sys-libs/musl/musl-1.2.4-r2.ebuild @@ -0,0 +1,205 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev flag-o-matic toolchain-funcs prefix +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.musl-libc.org/git/musl" + inherit git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc + inherit verify-sig + + SRC_URI="https://musl.libc.org/releases/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86" + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )" +fi +GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" +GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" +SRC_URI+=" + https://dev.gentoo.org/~blueness/musl-misc/getconf.c + https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE} + https://dev.gentoo.org/~blueness/musl-misc/iconv.c +" + +DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" +HOMEPAGE="https://musl.libc.org" + +LICENSE="MIT LGPL-2 GPL-2" +SLOT="0" +IUSE="crypt headers-only split-usr" + +QA_SONAME="usr/lib/libc.so" +QA_DT_NEEDED="usr/lib/libc.so" +# bug #830213 +QA_PRESTRIPPED="usr/lib/crtn.o" + +# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?) +# built as part as crossdev. Also, elide the blockers when in cross-*, +# as it doesn't make sense to block the normal CBUILD libxcrypt at all +# there when we're installing into /usr/${CHOST} anyway. +if is_crosspkg ; then + IUSE="${IUSE/crypt/+crypt}" +else + RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )" + PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )" +fi + +PATCHES=( + "${FILESDIR}"/${P}-elfutils-0.190-relr.patch + "${FILESDIR}"/${PN}-1.2.4-arm64-crti-alignment.patch +) + +just_headers() { + use headers-only && target_is_not_host +} + +pkg_setup() { + if [[ ${CTARGET} == ${CHOST} ]] ; then + case ${CHOST} in + *-musl*) ;; + *) die "Use sys-devel/crossdev to build a musl toolchain" ;; + esac + fi + + # fix for #667126, copied from glibc ebuild + # make sure host make.conf doesn't pollute us + if target_is_not_host || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + elif use verify-sig ; then + # We only verify the release; not the additional (fixed, safe) files + # we download. + # (Seem to get IPC error on verifying in cross?) + ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + default + + mkdir "${WORKDIR}"/misc || die + cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die + cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die + cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die +} + +src_configure() { + strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343 + tc-getCC ${CTARGET} + + just_headers && export CC=true + + local sysroot + target_is_not_host && sysroot=/usr/${CTARGET} + ./configure \ + --target=${CTARGET} \ + --prefix="${EPREFIX}${sysroot}/usr" \ + --syslibdir="${EPREFIX}${sysroot}/lib" \ + --disable-gcc-wrapper || die +} + +src_compile() { + emake obj/include/bits/alltypes.h + just_headers && return 0 + + emake + if ! is_crosspkg ; then + emake -C "${T}" getconf getent iconv \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + VPATH="${WORKDIR}/misc" + fi + + $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die + $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die +} + +src_install() { + local target="install" + just_headers && target="install-headers" + emake DESTDIR="${D}" ${target} + just_headers && return 0 + + # musl provides ldd via a sym link to its ld.so + local sysroot= + target_is_not_host && sysroot=/usr/${CTARGET} + local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*) + dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd" + + if ! use crypt ; then + # Allow sys-libs/libxcrypt[system] to provide it instead + rm "${ED}/usr/include/crypt.h" || die + rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die + fi + + if ! is_crosspkg ; then + # Fish out of config: + # ARCH = ... + # SUBARCH = ... + # and print $(ARCH)$(SUBARCH). + local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) + + # The musl build system seems to create a symlink: + # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) + # During cross or within prefix, there's no guarantee that the host is + # using musl so that file may not exist. Use a relative symlink within + # ${D} instead. + rm "${ED}"/lib/ld-musl-${arch}.so.1 || die + if use split-usr; then + dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1 + # If it's still a dead symlink, OK, we really do need to abort. + [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die + else + dosym libc.so /usr/lib/ld-musl-${arch}.so.1 + [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die + fi + + cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die + sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die + eprefixify "${T}"/ldconfig + into / + dosbin "${T}"/ldconfig + into /usr + dobin "${T}"/getconf + dobin "${T}"/getent + dobin "${T}"/iconv + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die + doenvd "${T}"/00musl + fi + + if target_is_not_host ; then + into /usr/${CTARGET} + dolib.a libssp_nonshared.a + else + dolib.a libssp_nonshared.a + fi +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d +} + +pkg_postinst() { + target_is_not_host && return 0 + + [ -n "${ROOT}" ] && return 0 + + ldconfig || die +} diff --git a/sys-libs/musl/musl-1.2.5-r1.ebuild b/sys-libs/musl/musl-1.2.5-r1.ebuild new file mode 100644 index 000000000000..9d233979f7e2 --- /dev/null +++ b/sys-libs/musl/musl-1.2.5-r1.ebuild @@ -0,0 +1,207 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev flag-o-matic toolchain-funcs prefix + +DESCRIPTION="Light, fast and, simple C library focused on standards-conformance and safety" +HOMEPAGE="https://musl.libc.org" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.musl-libc.org/git/musl" + inherit git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc + inherit verify-sig + + SRC_URI="https://musl.libc.org/releases/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )" + KEYWORDS="-* ~riscv" + #KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86" + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )" +fi + +GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" +GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" +SRC_URI+=" + https://dev.gentoo.org/~blueness/musl-misc/getconf.c + https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE} + https://dev.gentoo.org/~blueness/musl-misc/iconv.c +" + +LICENSE="MIT LGPL-2 GPL-2" +SLOT="0" +IUSE="crypt headers-only split-usr" + +QA_SONAME="usr/lib/libc.so" +QA_DT_NEEDED="usr/lib/libc.so" +# bug #830213 +QA_PRESTRIPPED="usr/lib/crtn.o" + +# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?) +# built as part as crossdev. Also, elide the blockers when in cross-*, +# as it doesn't make sense to block the normal CBUILD libxcrypt at all +# there when we're installing into /usr/${CHOST} anyway. +if is_crosspkg ; then + IUSE="${IUSE/crypt/+crypt}" +else + RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )" + PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )" +fi + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.4-arm64-crti-alignment.patch +) + +just_headers() { + use headers-only && target_is_not_host +} + +pkg_setup() { + if [[ ${CTARGET} == ${CHOST} ]] ; then + case ${CHOST} in + *-musl*) ;; + *) die "Use sys-devel/crossdev to build a musl toolchain" ;; + esac + fi + + # Fix for bug #667126, copied from glibc ebuild: + # make sure host make.conf doesn't pollute us + if target_is_not_host || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + elif use verify-sig ; then + # We only verify the release; not the additional (fixed, safe) files + # we download. + # (Seem to get IPC error on verifying in cross?) + ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + default + + mkdir "${WORKDIR}"/misc || die + cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die + cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die + cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die +} + +src_configure() { + strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343 + tc-getCC ${CTARGET} + + just_headers && export CC=true + + local sysroot + target_is_not_host && sysroot=/usr/${CTARGET} + ./configure \ + --target=${CTARGET} \ + --prefix="${EPREFIX}${sysroot}/usr" \ + --syslibdir="${EPREFIX}${sysroot}/lib" \ + --disable-gcc-wrapper || die +} + +src_compile() { + emake obj/include/bits/alltypes.h + just_headers && return 0 + + emake + if ! is_crosspkg ; then + emake -C "${T}" getconf getent iconv \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + VPATH="${WORKDIR}/misc" + fi + + $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die + $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die +} + +src_install() { + local target="install" + just_headers && target="install-headers" + emake DESTDIR="${D}" ${target} + just_headers && return 0 + + # musl provides ldd via a sym link to its ld.so + local sysroot= + target_is_not_host && sysroot=/usr/${CTARGET} + local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*) + dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd" + + if ! use crypt ; then + # Allow sys-libs/libxcrypt[system] to provide it instead + rm "${ED}/usr/include/crypt.h" || die + rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die + fi + + if ! is_crosspkg ; then + # Fish out of config: + # ARCH = ... + # SUBARCH = ... + # and print $(ARCH)$(SUBARCH). + local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) + + # The musl build system seems to create a symlink: + # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) + # During cross or within prefix, there's no guarantee that the host is + # using musl so that file may not exist. Use a relative symlink within + # ${D} instead. + rm "${ED}"/lib/ld-musl-${arch}.so.1 || die + if use split-usr; then + dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1 + # If it's still a dead symlink, OK, we really do need to abort. + [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die + else + dosym libc.so /usr/lib/ld-musl-${arch}.so.1 + [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die + fi + + cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die + sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die + eprefixify "${T}"/ldconfig + into / + dosbin "${T}"/ldconfig + into /usr + dobin "${T}"/getconf + dobin "${T}"/getent + dobin "${T}"/iconv + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die + doenvd "${T}"/00musl + fi + + if target_is_not_host ; then + into /usr/${CTARGET} + dolib.a libssp_nonshared.a + else + dolib.a libssp_nonshared.a + fi +} + +pkg_preinst() { + # Nothing to do if just installing headers + just_headers && return + + # Prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d +} + +pkg_postinst() { + target_is_not_host && return 0 + + [[ -n "${ROOT}" ]] && return 0 + + ldconfig || die +} -- cgit v1.2.3