diff options
29 files changed, 1460 insertions, 113 deletions
diff --git a/app-crypt/rhash/rhash-1.4.4-r1.ebuild b/app-crypt/rhash/rhash-1.4.4-r1.ebuild new file mode 100644 index 000000000000..02a4f11e44ac --- /dev/null +++ b/app-crypt/rhash/rhash-1.4.4-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs multilib-minimal + +DESCRIPTION="Console utility and library for computing and verifying file hash sums" +HOMEPAGE="https://rhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="0BSD" +SLOT="0/1" +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" +IUSE="debug nls ssl static-libs" + +RDEPEND=" + ssl? ( + dev-libs/openssl:0=[${MULTILIB_USEDEP}] +)" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/RHash-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-prefix.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then + # we lack posix_memalign + sed -i -e '/if _POSIX_VERSION/s/if .*$/if 0/' \ + librhash/util.h || die + fi + + # upstream fix for BSD and others, but was only applied for BSD + # we need support for Solaris, where we use a GNU toolchain, so use + # the original hack, hopefully next release has this fixed + # https://github.com/rhash/RHash/issues/238 + if [[ ${CHOST} == *-solaris* ]] ; then + sed -i -e 's/^elif linux; then/else/' configure || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + set -- \ + ./configure \ + --target="${CHOST}" \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --sysconfdir="${EPREFIX}"/etc \ + --disable-openssl-runtime \ + --disable-static \ + --enable-lib-shared \ + $(use_enable debug) \ + $(use_enable nls gettext) \ + $(use_enable ssl openssl) \ + $(use_enable static-libs lib-static) + + echo "${@}" + "${@}" || die "configure failed" +} + +multilib_src_compile() { + emake all \ + $(multilib_is_native_abi && use nls && echo compile-gmo) +} + +multilib_src_install() { + # -j1 needed due to race condition. + emake DESTDIR="${D}" -j1 \ + install{,-lib-headers,-pkg-config} \ + $(multilib_is_native_abi && use nls && echo install-gmo) \ + install-lib-so-link +} + +multilib_src_test() { + emake test +} diff --git a/app-office/libreoffice/libreoffice-7.5.6.2.ebuild b/app-office/libreoffice/libreoffice-7.5.6.2.ebuild index 9d2b564c853d..7ec34f336fdf 100644 --- a/app-office/libreoffice/libreoffice-7.5.6.2.ebuild +++ b/app-office/libreoffice/libreoffice-7.5.6.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -395,6 +395,9 @@ src_configure() { einfo "Preset CFLAGS: ${CFLAGS}" einfo "Preset LDFLAGS: ${LDFLAGS}" + # Workaround for bug #915067 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + if use clang ; then # Force clang einfo "Enforcing the use of clang due to USE=clang ..." @@ -408,9 +411,6 @@ src_configure() { # Workaround for bug #907905 filter-lto - # Workaround for bug #915067 - append-ldflags -Wl,--undefined-version - # Not implemented by Clang, bug #903889 filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch else diff --git a/app-office/libreoffice/libreoffice-7.5.8.2-r2.ebuild b/app-office/libreoffice/libreoffice-7.5.8.2-r2.ebuild index 2d1d90c37611..984ca1c390bb 100644 --- a/app-office/libreoffice/libreoffice-7.5.8.2-r2.ebuild +++ b/app-office/libreoffice/libreoffice-7.5.8.2-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -405,6 +405,9 @@ src_configure() { einfo "Preset CFLAGS: ${CFLAGS}" einfo "Preset LDFLAGS: ${LDFLAGS}" + # Workaround for bug #915067 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + if use clang ; then # Force clang einfo "Enforcing the use of clang due to USE=clang ..." @@ -418,9 +421,6 @@ src_configure() { # Workaround for bug #907905 filter-lto - # Workaround for bug #915067 - append-ldflags -Wl,--undefined-version - # Not implemented by Clang, bug #903889 filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch else diff --git a/app-office/libreoffice/libreoffice-7.5.8.2.ebuild b/app-office/libreoffice/libreoffice-7.5.8.2.ebuild index b346307b840c..c0a3d703ff40 100644 --- a/app-office/libreoffice/libreoffice-7.5.8.2.ebuild +++ b/app-office/libreoffice/libreoffice-7.5.8.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -398,6 +398,9 @@ src_configure() { einfo "Preset CFLAGS: ${CFLAGS}" einfo "Preset LDFLAGS: ${LDFLAGS}" + # Workaround for bug #915067 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + if use clang ; then # Force clang einfo "Enforcing the use of clang due to USE=clang ..." @@ -411,9 +414,6 @@ src_configure() { # Workaround for bug #907905 filter-lto - # Workaround for bug #915067 - append-ldflags -Wl,--undefined-version - # Not implemented by Clang, bug #903889 filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch else diff --git a/app-office/libreoffice/libreoffice-7.5.9.2.ebuild b/app-office/libreoffice/libreoffice-7.5.9.2.ebuild index 64d3859995c9..c072a93b00e1 100644 --- a/app-office/libreoffice/libreoffice-7.5.9.2.ebuild +++ b/app-office/libreoffice/libreoffice-7.5.9.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -404,6 +404,9 @@ src_configure() { einfo "Preset CFLAGS: ${CFLAGS}" einfo "Preset LDFLAGS: ${LDFLAGS}" + # Workaround for bug #915067 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + if use clang ; then # Force clang einfo "Enforcing the use of clang due to USE=clang ..." @@ -417,9 +420,6 @@ src_configure() { # Workaround for bug #907905 filter-lto - # Workaround for bug #915067 - append-ldflags -Wl,--undefined-version - # Not implemented by Clang, bug #903889 filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch else diff --git a/app-office/libreoffice/libreoffice-9999.ebuild b/app-office/libreoffice/libreoffice-9999.ebuild index 7eec09df7595..3341480b61da 100644 --- a/app-office/libreoffice/libreoffice-9999.ebuild +++ b/app-office/libreoffice/libreoffice-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -395,6 +395,9 @@ src_configure() { einfo "Preset CFLAGS: ${CFLAGS}" einfo "Preset LDFLAGS: ${LDFLAGS}" + # Workaround for bug #915067 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + if use clang ; then # Force clang einfo "Enforcing the use of clang due to USE=clang ..." @@ -408,9 +411,6 @@ src_configure() { # Workaround for bug #907905 filter-lto - # Workaround for bug #915067 - append-ldflags -Wl,--undefined-version - # Not implemented by Clang, bug #903889 filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch else diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild new file mode 100644 index 000000000000..58bb08a334e1 --- /dev/null +++ b/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc +inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="General purpose crypto library based on the code used in GnuPG" +HOMEPAGE="https://www.gnupg.org/" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" +SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" + +LICENSE="LGPL-2.1 MIT" +SLOT="0/20" # subslot = soname major version +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" +IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs" + +# Build system only has --disable-arm-crypto-support right now +# If changing this, update src_configure logic too. +# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions, +# but this looks like it might change in future. This is just a safety check +# in case people somehow do have a CPU which only supports some. They must +# for now disable them all if that's the case. +REQUIRED_USE=" + cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 ) + cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 ) + cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 ) + cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 ) + cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec ) +" + +RDEPEND=" + >=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}] + getentropy? ( + kernel_linux? ( + elibc_glibc? ( >=sys-libs/glibc-2.25 ) + elibc_musl? ( >=sys-libs/musl-1.1.20 ) + ) + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( virtual/texi2dvi ) + verify-sig? ( sec-keys/openpgp-keys-gnupg ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-multilib-syspath.patch + "${FILESDIR}"/${PN}-powerpc-darwin.patch + "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/libgcrypt-config +) + +pkg_pretend() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + if use kernel_linux && use getentropy; then + unset KV_FULL + get_running_version + if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then + eerror "The getentropy function requires the getrandom syscall." + eerror "This was introduced in Linux 3.17." + eerror "Your system is currently running Linux ${KV_FULL}." + eerror "Disable the 'getentropy' USE flag or upgrade your kernel." + die "Kernel is too old for getentropy" + fi + fi +} + +pkg_setup() { + : +} + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + if [[ ${CHOST} == *86*-solaris* ]] ; then + # ASM code uses GNU ELF syntax, divide in particular, we need to + # allow this via ASFLAGS, since we don't have a flag-o-matic + # function for that, we'll have to abuse cflags for this + append-cflags -Wa,--divide + fi + + if [[ ${CHOST} == powerpc* ]] ; then + # ./configure does a lot of automagic, prevent that + # generic ppc32+ppc64 altivec + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no + # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support + use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no + # power9 vector extension, aka arch 3.00 ISA + use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no + fi + + # Workaround for GCC < 11.3 bug + # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29 + # https://dev.gnupg.org/T5581 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 + if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && + (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + append-flags -fno-tree-loop-vectorize + fi + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + --enable-noexecstack + $(use_enable cpu_flags_arm_neon neon-support) + # See REQUIRED_USE comment above + $(use_enable cpu_flags_arm_aes arm-crypto-support) + $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support) + $(use_enable cpu_flags_x86_aes aesni-support) + $(use_enable cpu_flags_x86_avx avx-support) + $(use_enable cpu_flags_x86_avx2 avx2-support) + $(use_enable cpu_flags_x86_padlock padlock-support) + $(use_enable cpu_flags_x86_sha shaext-support) + $(use_enable cpu_flags_x86_sse4_1 sse41-support) + # required for sys-power/suspend[crypt], bug 751568 + $(use_enable static-libs static) + + # disabled due to various applications requiring privileges + # after libgcrypt drops them (bug #468616) + --without-capabilities + + # http://trac.videolan.org/vlc/ticket/620 + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") + + $(use asm || echo "--disable-asm") + + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + ) + + if use kernel_linux; then + # --enable-random=getentropy requires getentropy/getrandom. + # --enable-random=linux enables legacy code that tries getrandom + # and falls back to reading /dev/random. + myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') +} + +multilib_src_compile() { + default + multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf +} + +multilib_src_test() { + # t-secmem and t-sexp need mlock which requires extra privileges; nspawn + # at least disallows that by default. + local -x GCRYPT_IN_ASAN_TEST=1 + + default +} + +multilib_src_install() { + emake DESTDIR="${D}" install + multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf +} + +multilib_src_install_all() { + default + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/npth/npth-1.6-r2.ebuild b/dev-libs/npth/npth-1.6-r2.ebuild new file mode 100644 index 000000000000..71d952cdae8c --- /dev/null +++ b/dev-libs/npth/npth-1.6-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="New GNU Portable Threads Library" +HOMEPAGE="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="LGPL-2.1+" +SLOT="0" +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" +IUSE="test" +RESTRICT="!test? ( test )" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + econf $(use_enable test tests) +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-libs/popt/popt-1.19-r1.ebuild b/dev-libs/popt/popt-1.19-r1.ebuild new file mode 100644 index 000000000000..58a87653a6e5 --- /dev/null +++ b/dev-libs/popt/popt-1.19-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal libtool + +DESCRIPTION="Parse Options - Command line parser" +HOMEPAGE="https://github.com/rpm-software-management/popt" +SRC_URI="http://ftp.rpm.org/${PN}/releases/${PN}-1.x/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +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" +IUSE="nls static-libs" + +RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( >=sys-devel/gettext-0.19.8 )" + +src_prepare() { + default + + # Unclear what the background to this is, perhaps + # https://gitlab.exherbo.org/exherbo/arbor/-/commit/5545d22d3493279acf7a55246179f818ef22f5fa + sed -i -e 's:lt-test1:test1:' tests/testit.sh || die + + elibtoolize +} + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local myeconfargs=( + --disable-werror + $(use_enable static-libs static) + $(use_enable nls) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" -type f -name "*.la" -delete || die +} diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 0cb64f3010ea..0e416e253cc2 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -233,8 +233,8 @@ qt5-build_src_configure() { # Workaround for bug #915203 # Upstream: https://bugreports.qt.io/browse/QTBUG-111514 - if [[ ${PN} != qtcore ]] && tc-ld-is-lld ; then - append-ldflags -Wl,--undefined-version + if [[ ${PN} != qtcore ]] ; then + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) fi # many bugs, no one to fix diff --git a/media-libs/libpulse/libpulse-16.1-r5.ebuild b/media-libs/libpulse/libpulse-16.1-r5.ebuild new file mode 100644 index 000000000000..bcf2a2ee25ce --- /dev/null +++ b/media-libs/libpulse/libpulse-16.1-r5.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PV="${PV/_pre*}" +MY_P="pulseaudio-${MY_PV}" +inherit bash-completion-r1 flag-o-matic gnome2-utils meson-multilib optfeature systemd udev + +DESCRIPTION="Libraries for PulseAudio clients" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" + +if [[ ${PV} = 9999 ]]; then + inherit git-r3 + EGIT_BRANCH="master" + EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" +else + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1+" + +SLOT="0" +IUSE="+asyncns dbus doc +glib gtk selinux systemd test valgrind X" +RESTRICT="!test? ( test )" + +# NOTE: libpcre needed in some cases, bug #472228 +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too +RDEPEND=" + dev-libs/libatomic_ops + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}] + asyncns? ( >=net-libs/libasyncns-0.1[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.4.12[${MULTILIB_USEDEP}] ) + elibc_mingw? ( dev-libs/libpcre:3 ) + glib? ( >=dev-libs/glib-2.28.0:2[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:3 ) + selinux? ( sec-policy/selinux-pulseaudio ) + systemd? ( sys-apps/systemd:= ) + valgrind? ( dev-util/valgrind ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}] + ) + !<media-sound/pulseaudio-15.0-r100 + !<media-sound/pulseaudio-daemon-16.1-r8 +" + +DEPEND="${RDEPEND} + test? ( >=dev-libs/check-0.9.10 ) + X? ( x11-base/xorg-proto ) +" + +# pulseaudio ships a bundled xmltoman, which uses XML::Parser +BDEPEND=" + dev-lang/perl + dev-perl/XML-Parser + sys-devel/gettext + sys-devel/m4 + virtual/libiconv + virtual/libintl + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" +PDEPEND=" + || ( + media-video/pipewire[sound-server(+)] + media-sound/pulseaudio-daemon + media-sound/pulseaudio[daemon(+)] + ) +" + +DOCS=( NEWS README ) + +# patches merged upstream, to be removed with 16.2 or later bump +PATCHES=( + "${FILESDIR}"/pulseaudio-16.1-memfd-cleanup.patch + "${FILESDIR}"/pulseaudio-16.1-proplist-util-without-gdkx.patch + "${FILESDIR}"/pulseaudio-16.1-smoother-start-paused.patch + "${FILESDIR}"/pulseaudio-16.1-smoother-time-calculation.patch + "${FILESDIR}"/pulseaudio-16.1-fix-memblock-alignment.patch + "${FILESDIR}"/pulseaudio-16.1-add-more-standard-samplerates.patch +) + +src_prepare() { + default + + # disable autospawn by client + sed -i -e 's:; autospawn = yes:autospawn = no:g' src/pulse/client.conf.in || die + + gnome2_environment_reset +} + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local emesonargs=( + --localstatedir="${EPREFIX}"/var + + -Ddaemon=false + -Dclient=true + $(meson_native_use_bool doc doxygen) + -Dgcov=false + # tests involve random modules, so just do them for the native # TODO: tests should run always + $(meson_native_use_bool test tests) + -Ddatabase=simple # Not used for non-daemon, simple database avoids external dep checks + -Dstream-restore-clear-old-devices=true + -Drunning-from-build-tree=false + + # Paths + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} + -Dsystemduserunitdir=$(systemd_get_userunitdir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value + + # Optional features + -Dalsa=disabled + $(meson_feature asyncns) + -Davahi=disabled + -Dbluez5=disabled + -Dbluez5-gstreamer=disabled + -Dbluez5-native-headset=false + -Dbluez5-ofono-headset=false + $(meson_feature dbus) + -Delogind=disabled + -Dfftw=disabled + $(meson_feature glib) # WARNING: toggling this likely changes ABI + -Dgsettings=disabled + -Dgstreamer=disabled + $(meson_native_use_feature gtk) + -Dhal-compat=false + -Dipv6=true + -Djack=disabled + -Dlirc=disabled + -Dopenssl=disabled + -Dorc=disabled + -Doss-output=disabled + -Dsamplerate=disabled # Matches upstream + -Dsoxr=disabled + -Dspeex=disabled + $(meson_native_use_feature systemd) + -Dtcpwrap=disabled + -Dudev=disabled + $(meson_native_use_feature valgrind) + $(meson_feature X x11) + + # Echo cancellation + -Dadrian-aec=false + -Dwebrtc-aec=disabled + ) + + if multilib_is_native_abi; then + # Make padsp work for non-native ABI, supposedly only possible with glibc; + # this is used by /usr/bin/padsp that comes from native build, thus we need + # this argument for native build + if use elibc_glibc; then + emesonargs+=( -Dpulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' ) + fi + else + emesonargs+=( -Dman=false ) + if ! use elibc_glibc; then + # Non-glibc multilib is probably non-existent but just in case: + ewarn "padsp wrapper for OSS emulation will only work with native ABI applications!" + fi + fi + + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile + + if multilib_is_native_abi; then + if use doc; then + einfo "Generating documentation ..." + meson_src_compile doxygen + fi + fi +} + +multilib_src_install() { + # The files referenced in the DOCS array do not exist in the multilib source directory, + # therefore clear the variable when calling the function that will access it. + DOCS= meson_src_install + + # Upstream installs 'pactl' if client is built, with all symlinks except for + # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. + # This trips QA warning, workaround: + # - install missing aliases in media-libs/libpulse (client build) + # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) + bashcomp_alias pactl pulseaudio + bashcomp_alias pactl pacmd + bashcomp_alias pactl pasuspender + + if multilib_is_native_abi; then + if use doc; then + einfo "Installing documentation ..." + docinto html + dodoc -r doxygen/html/. + fi + fi +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} + +pkg_postinst() { + optfeature_header "PulseAudio can be enhanced by installing the following:" + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit +} diff --git a/media-libs/libpulse/libpulse-16.99.1-r1.ebuild b/media-libs/libpulse/libpulse-16.99.1-r1.ebuild new file mode 100644 index 000000000000..680ac1f67b16 --- /dev/null +++ b/media-libs/libpulse/libpulse-16.99.1-r1.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PV="${PV/_pre*}" +MY_P="pulseaudio-${MY_PV}" +inherit bash-completion-r1 flag-o-matic gnome2-utils meson-multilib optfeature systemd udev + +DESCRIPTION="Libraries for PulseAudio clients" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" + +if [[ ${PV} = 9999 ]]; then + inherit git-r3 + EGIT_BRANCH="master" + EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" +else + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1+" + +SLOT="0" +IUSE="+asyncns dbus doc +glib gtk selinux systemd test valgrind X" +RESTRICT="!test? ( test )" + +# NOTE: libpcre needed in some cases, bug #472228 +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too +RDEPEND=" + dev-libs/libatomic_ops + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}] + asyncns? ( >=net-libs/libasyncns-0.1[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.4.12[${MULTILIB_USEDEP}] ) + elibc_mingw? ( dev-libs/libpcre:3 ) + glib? ( >=dev-libs/glib-2.28.0:2[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:3 ) + selinux? ( sec-policy/selinux-pulseaudio ) + systemd? ( sys-apps/systemd:= ) + valgrind? ( dev-util/valgrind ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}] + ) + !<media-sound/pulseaudio-16.1 + !<media-sound/pulseaudio-daemon-16.99.1 +" + +DEPEND="${RDEPEND} + test? ( >=dev-libs/check-0.9.10 ) + X? ( x11-base/xorg-proto ) +" + +# pulseaudio ships a bundled xmltoman, which uses XML::Parser +BDEPEND=" + dev-lang/perl + dev-perl/XML-Parser + sys-devel/gettext + sys-devel/m4 + virtual/libiconv + virtual/libintl + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" +PDEPEND=" + || ( + media-video/pipewire[sound-server(+)] + media-sound/pulseaudio-daemon + media-sound/pulseaudio[daemon(+)] + ) +" + +DOCS=( NEWS README ) + +# patches merged upstream, to be removed with 16.99.2 or later bump +PATCHES=( + "${FILESDIR}"/pulseaudio-16.99.1-memfd-compat.patch +) + +src_prepare() { + default + + # disable autospawn by client + sed -i -e 's:; autospawn = yes:autospawn = no:g' src/pulse/client.conf.in || die + + gnome2_environment_reset +} + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local emesonargs=( + --localstatedir="${EPREFIX}"/var + + -Ddaemon=false + -Dclient=true + $(meson_native_use_bool doc doxygen) + -Dgcov=false + # tests involve random modules, so just do them for the native # TODO: tests should run always + $(meson_native_use_bool test tests) + -Ddatabase=simple # Not used for non-daemon, simple database avoids external dep checks + -Dstream-restore-clear-old-devices=true + -Drunning-from-build-tree=false + + # Paths + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} + -Dsystemduserunitdir=$(systemd_get_userunitdir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value + + # Optional features + -Dalsa=disabled + $(meson_feature asyncns) + -Davahi=disabled + -Dbluez5=disabled + -Dbluez5-gstreamer=disabled + -Dbluez5-native-headset=false + -Dbluez5-ofono-headset=false + $(meson_feature dbus) + -Delogind=disabled + -Dfftw=disabled + $(meson_feature glib) # WARNING: toggling this likely changes ABI + -Dgsettings=disabled + -Dgstreamer=disabled + $(meson_native_use_feature gtk) + -Dhal-compat=false + -Dipv6=true + -Djack=disabled + -Dlirc=disabled + -Dopenssl=disabled + -Dorc=disabled + -Doss-output=disabled + -Dsamplerate=disabled # Matches upstream + -Dsoxr=disabled + -Dspeex=disabled + $(meson_native_use_feature systemd) + -Dtcpwrap=disabled + -Dudev=disabled + $(meson_native_use_feature valgrind) + $(meson_feature X x11) + + # Echo cancellation + -Dadrian-aec=false + -Dwebrtc-aec=disabled + ) + + if multilib_is_native_abi; then + # Make padsp work for non-native ABI, supposedly only possible with glibc; + # this is used by /usr/bin/padsp that comes from native build, thus we need + # this argument for native build + if use elibc_glibc; then + emesonargs+=( -Dpulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' ) + fi + else + emesonargs+=( -Dman=false ) + if ! use elibc_glibc; then + # Non-glibc multilib is probably non-existent but just in case: + ewarn "padsp wrapper for OSS emulation will only work with native ABI applications!" + fi + fi + + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile + + if multilib_is_native_abi; then + if use doc; then + einfo "Generating documentation ..." + meson_src_compile doxygen + fi + fi +} + +multilib_src_install() { + # The files referenced in the DOCS array do not exist in the multilib source directory, + # therefore clear the variable when calling the function that will access it. + DOCS= meson_src_install + + # Upstream installs 'pactl' if client is built, with all symlinks except for + # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. + # This trips QA warning, workaround: + # - install missing aliases in media-libs/libpulse (client build) + # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) + bashcomp_alias pactl pulseaudio + bashcomp_alias pactl pacmd + bashcomp_alias pactl pasuspender + + if multilib_is_native_abi; then + if use doc; then + einfo "Installing documentation ..." + docinto html + dodoc -r doxygen/html/. + fi + fi +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} + +pkg_postinst() { + optfeature_header "PulseAudio can be enhanced by installing the following:" + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit +} diff --git a/net-dns/libidn2/libidn2-2.3.4-r2.ebuild b/net-dns/libidn2/libidn2-2.3.4-r2.ebuild new file mode 100644 index 000000000000..436d7026ba71 --- /dev/null +++ b/net-dns/libidn2/libidn2-2.3.4-r2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893)" +HOMEPAGE=" + https://www.gnu.org/software/libidn/#libidn2 + https://gitlab.com/libidn/libidn2/ +" +SRC_URI=" + mirror://gnu/libidn/${P}.tar.gz + verify-sig? ( mirror://gnu/libidn/${P}.tar.gz.sig ) +" +S="${WORKDIR}"/${P/a/} + +LICENSE="|| ( GPL-2+ LGPL-3+ ) GPL-3+ unicode" +SLOT="0/2" +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" +IUSE="nls static-libs" + +RDEPEND=" + dev-libs/libunistring:=[${MULTILIB_USEDEP}] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + dev-lang/perl + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-libidn ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libidn.asc + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local myconf=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + $(use_enable static-libs static) + $(multilib_native_use_enable nls) + --enable-doc + --disable-gcc-warnings + --disable-gtk-doc + --disable-valgrind-tests + ) + + local ECONF_SOURCE=${S} + econf "${myconf[@]}" +} + +multilib_src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-libs/libtirpc/libtirpc-1.3.4-r1.ebuild b/net-libs/libtirpc/libtirpc-1.3.4-r1.ebuild new file mode 100644 index 000000000000..8942db187989 --- /dev/null +++ b/net-libs/libtirpc/libtirpc-1.3.4-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal usr-ldscript + +DESCRIPTION="Transport Independent RPC library (SunRPC replacement)" +HOMEPAGE="https://sourceforge.net/projects/libtirpc/ https://git.linux-nfs.org/?p=steved/libtirpc.git" +SRC_URI=" + mirror://sourceforge/${PN}/${P}.tar.bz2 + mirror://gentoo/${PN}-glibc-nfs.tar.xz +" + +LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+" +SLOT="0/3" # subslot matches SONAME major +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="kerberos static-libs" + +RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )" +DEPEND=" + ${RDEPEND} + elibc_musl? ( sys-libs/queue-standalone ) +" +BDEPEND=" + app-arch/xz-utils + virtual/pkgconfig +" + +src_prepare() { + cp -ra "${WORKDIR}"/tirpc "${S}"/ || die + + default +} + +multilib_src_configure() { + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local myeconfargs=( + $(use_enable kerberos gssapi) + $(use_enable static-libs static) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install() { + default + + # libtirpc replaces rpc support in glibc, so we need it in / + gen_usr_ldscript -a tirpc +} + +multilib_src_install_all() { + einstalldocs + + insinto /etc + doins doc/netconfig + + insinto /usr/include/tirpc + doins -r "${WORKDIR}"/tirpc/* + + # makes sure that the linking order for nfs-utils is proper, as + # libtool would inject a libgssglue dependency in the list. + if ! use static-libs ; then + find "${ED}" -name "*.la" -delete || die + fi +} diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild b/sys-devel/binutils/binutils-2.32-r2.ebuild index df54d7b7423d..f80ba08099ae 100644 --- a/sys-devel/binutils/binutils-2.32-r2.ebuild +++ b/sys-devel/binutils/binutils-2.32-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -162,12 +162,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sys-devel/binutils/binutils-2.33.1-r1.ebuild index 04c74a25e107..ca79c2b7f77e 100644 --- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -155,12 +155,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.34-r2.ebuild index 941890975f99..5f5b7e3cea60 100644 --- a/sys-devel/binutils/binutils-2.34-r2.ebuild +++ b/sys-devel/binutils/binutils-2.34-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -152,12 +152,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild index 3e9e6183b4cd..280c2624b3d5 100644 --- a/sys-devel/binutils/binutils-2.35.2.ebuild +++ b/sys-devel/binutils/binutils-2.35.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -169,12 +169,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.36.1-r2.ebuild b/sys-devel/binutils/binutils-2.36.1-r2.ebuild index dcaa4a446b58..133d412e6bd7 100644 --- a/sys-devel/binutils/binutils-2.36.1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -164,12 +164,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild index 333ff355ede5..7dae8e9b42b7 100644 --- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -170,12 +170,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild index bea67260a9ec..22272438a18b 100644 --- a/sys-devel/binutils/binutils-2.38-r2.ebuild +++ b/sys-devel/binutils/binutils-2.38-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -175,12 +175,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.39-r5.ebuild b/sys-devel/binutils/binutils-2.39-r5.ebuild index c1b0195faed3..e2e702d49a83 100644 --- a/sys-devel/binutils/binutils-2.39-r5.ebuild +++ b/sys-devel/binutils/binutils-2.39-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -171,12 +171,7 @@ src_configure() { # Keep things sane strip-flags - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.40-r5.ebuild b/sys-devel/binutils/binutils-2.40-r5.ebuild index 8d0073e79611..4709d16710d5 100644 --- a/sys-devel/binutils/binutils-2.40-r5.ebuild +++ b/sys-devel/binutils/binutils-2.40-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -178,12 +178,7 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.40-r9.ebuild b/sys-devel/binutils/binutils-2.40-r9.ebuild index d4f97d214914..733e8778706e 100644 --- a/sys-devel/binutils/binutils-2.40-r9.ebuild +++ b/sys-devel/binutils/binutils-2.40-r9.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -183,12 +183,7 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.41-r2.ebuild b/sys-devel/binutils/binutils-2.41-r2.ebuild index aabb87038c48..a72ae053b872 100644 --- a/sys-devel/binutils/binutils-2.41-r2.ebuild +++ b/sys-devel/binutils/binutils-2.41-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -183,12 +183,7 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-2.41-r3.ebuild b/sys-devel/binutils/binutils-2.41-r3.ebuild index 10a57e931405..8abcecba0e8f 100644 --- a/sys-devel/binutils/binutils-2.41-r3.ebuild +++ b/sys-devel/binutils/binutils-2.41-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -183,12 +183,7 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index 5d9cedc9c2b5..71f57af9f840 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -183,12 +183,7 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs - # https://github.com/gentoo/gentoo/pull/28355 - # mold needs this too but right now tc-ld-is-mold is also not available - if tc-ld-is-lld; then - append-ldflags -Wl,--undefined-version - fi + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.36-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r1.ebuild new file mode 100644 index 000000000000..91fc2b596b54 --- /dev/null +++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r1.ebuild @@ -0,0 +1,335 @@ +# Copyright 2004-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +# NEED_BOOTSTRAP is for developers to quickly generate a tarball +# for publishing to the tree. +NEED_BOOTSTRAP="no" +inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal + +DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others" +HOMEPAGE="https://github.com/besser82/libxcrypt" +if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then + inherit autotools + SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz" +else + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz" +fi + +LICENSE="LGPL-2.1+ public-domain BSD BSD-2" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+compat split-usr static-libs +system test headers-only" +REQUIRED_USE="split-usr? ( system )" +RESTRICT="!test? ( test )" + +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi + +is_cross() { + local enabled_abis=( $(multilib_get_enabled_abis) ) + [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]] +} + +DEPEND=" + system? ( + elibc_glibc? ( + ${CATEGORY}/glibc[-crypt(+)] + !${CATEGORY}/glibc[crypt(+)] + ) + elibc_musl? ( + ${CATEGORY}/musl[-crypt(+)] + !${CATEGORY}/musl[crypt(+)] + ) + ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + dev-lang/perl + test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') ) +" + +python_check_deps() { + python_has_version "dev-python/passlib[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + if has "distcc" ${FEATURES} ; then + ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!" + ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179." + + if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then + die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!" + fi + fi +} + +pkg_setup() { + MULTIBUILD_VARIANTS=( + $(usev compat 'xcrypt_compat') + xcrypt_nocompat + ) + + use test && python-any-r1_pkg_setup +} + +src_prepare() { + default + + # WARNING: Please read on bumping or applying patches! + # + # There are two circular dependencies to be aware of: + # 1) + # if we're bootstrapping configure and makefiles: + # libxcrypt -> automake -> perl -> libxcrypt + # + # mitigation: + # toolchain@ manually runs `make dist` after running autoconf + `./configure` + # and the ebuild uses that. + # (Don't include the pre-generated Perl artefacts.) + # + # solution for future: + # Upstream are working on producing `make dist` tarballs. + # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573 + # + # 2) + # configure *unconditionally* needs Perl at build time to generate + # a list of enabled algorithms based on the set passed to `configure`: + # libxcrypt -> perl -> libxcrypt + # + # mitigation: + # None at the moment. + # + # solution for future: + # Not possible right now. Upstream intend on depending on Perl for further + # configuration options. + # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573 + # + # Therefore, on changes (inc. bumps): + # * You must check whether upstream have started providing tarballs with bootstrapped + # auto{conf,make}; + # + # * diff the build system changes! + # + if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then + # Facilitate our split variant build for compat + non-compat + eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch + eautoreconf + fi +} + +src_configure() { + # Avoid possible "illegal instruction" errors with gold + # bug #821496 + tc-ld-disable-gold + + # Doesn't work with LTO: bug #852917. + # https://github.com/besser82/libxcrypt/issues/24 + filter-lto + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + multibuild_foreach_variant multilib-minimal_src_configure +} + +get_xcprefix() { + if is_cross; then + echo "${EPREFIX}/usr/${CTARGET}" + else + echo "${EPREFIX}" + fi +} + +get_xclibdir() { + printf -- "%s/%s/%s/%s\n" \ + "$(get_xcprefix)" \ + "$(usev !split-usr '/usr')" \ + "$(get_libdir)" \ + "$(usev !system 'xcrypt')" +} + +get_xcincludedir() { + printf -- "%s/usr/include/%s\n" \ + "$(get_xcprefix)" \ + "$(usev !system 'xcrypt')" +} + +get_xcmandir() { + printf -- "%s/usr/share/man\n" \ + "$(get_xcprefix)" +} + +get_xcpkgconfigdir() { + printf -- "%s/usr/%s/pkgconfig\n" \ + "$(get_xcprefix)" \ + "$(get_libdir)" +} + +multilib_src_configure() { + local -a myconf=( + --host=${CTARGET} + --disable-werror + --libdir=$(get_xclibdir) + --with-pkgconfigdir=$(get_xcpkgconfigdir) + --includedir=$(get_xcincludedir) + --mandir="$(get_xcmandir)" + ) + + tc-export PKG_CONFIG + + if is_cross; then + if tc-is-clang; then + export CC="${CTARGET}-clang" + else + export CC="${CTARGET}-gcc" + fi + fi + + case "${MULTIBUILD_ID}" in + xcrypt_compat-*) + myconf+=( + --disable-static + --disable-xcrypt-compat-files + --enable-obsolete-api=yes + ) + ;; + xcrypt_nocompat-*) + myconf+=( + --enable-obsolete-api=no + $(use_enable static-libs static) + ) + ;; + *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; + esac + + if use headers-only; then + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC is sane. + headers_only_flags="CC=$(tc-getBUILD_CC)" + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}" +} + +src_compile() { + use headers-only && return + + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake check +} + +src_test() { + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + multibuild_foreach_variant multilib-minimal_src_install + + use headers-only || \ + ( + shopt -s failglob || die "failglob failed" + + # Make sure our man pages do not collide with glibc or man-pages. + for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do + mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \ + || die "mv failed" + done + ) || die "failglob error" + + # Remove useless stuff from installation + find "${ED}"/usr/share/doc/${PF} -type l -delete || die + find "${ED}" -name '*.la' -delete || die + + # workaround broken upstream cross-* --docdir by installing files in proper locations + if is_cross; then + insinto "$(get_xcprefix)"/usr/share + doins -r "${ED}"/usr/share/doc + rm -r "${ED}"/usr/share/doc || die + fi +} + +multilib_src_install() { + if use headers-only; then + emake DESTDIR="${D}" install-nodist_includeHEADERS + return + fi + + emake DESTDIR="${D}" install + + # Don't install the libcrypt.so symlink for the "compat" version + case "${MULTIBUILD_ID}" in + xcrypt_compat-*) + rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \ + || die "failed to remove extra compat libraries" + ;; + xcrypt_nocompat-*) + if use split-usr; then + ( + if use static-libs; then + # .a files are installed to /$(get_libdir) by default + # Move static libraries to /usr prefix or portage will abort + shopt -s nullglob || die "failglob failed" + static_libs=( "${D}"/$(get_xclibdir)/*.a ) + + if [[ -n ${static_libs[*]} ]]; then + dodir "/usr/$(get_xclibdir)" + mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \ + || die "Moving static libs failed" + fi + fi + + if use system; then + # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir) + # to allow linker to correctly find shared libraries. + shopt -s failglob || die "failglob failed" + + for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do + lib_file_basename="$(basename "${lib_file}")" + lib_file_target="$(basename "$(readlink -f "${lib_file}")")" + + # We already know we're in split-usr (checked above) + # See bug #843209 (also worth keeping in mind bug #802222 too) + local libdir_no_prefix=$(get_xclibdir) + libdir_no_prefix=${libdir_no_prefix#${EPREFIX}} + libdir_no_prefix=${libdir_no_prefix%/usr} + dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}" + done + + rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed" + fi + ) + fi + ;; + *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; + esac +} + +pkg_preinst() { + # Verify we're not in a bad case like bug #843209 with broken symlinks. + # This can be dropped when, if ever, the split-usr && system && compat case + # is cleaned up in *_src_install. + local broken_symlinks=() + mapfile -d '' broken_symlinks < <( + find "${ED}" -xtype l -print0 + ) + + if [[ ${#broken_symlinks[@]} -gt 0 ]]; then + eerror "Broken symlinks found before merging!" + local symlink target resolved + for symlink in "${broken_symlinks[@]}" ; do + target="$(readlink "${symlink}")" + resolved="$(readlink -f "${symlink}")" + eerror " '${symlink}' -> '${target}' (${resolved})" + done + die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug." + fi +} diff --git a/sys-libs/zlib/zlib-1.3-r3.ebuild b/sys-libs/zlib/zlib-1.3-r3.ebuild new file mode 100644 index 000000000000..0be6cfaf4931 --- /dev/null +++ b/sys-libs/zlib/zlib-1.3-r3.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Worth keeping an eye on 'develop' branch upstream for possible backports. +AUTOTOOLS_AUTO_DEPEND="no" +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc +inherit autotools edo multilib-minimal flag-o-matic usr-ldscript verify-sig + +DESCRIPTION="Standard (de)compression library" +HOMEPAGE="https://zlib.net/" +SRC_URI=" + https://zlib.net/${P}.tar.xz + https://zlib.net/fossils/${P}.tar.xz + https://zlib.net/current/beta/${P}.tar.xz + https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz + verify-sig? ( + https://zlib.net/${P}.tar.xz.asc + https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc + ) +" + +LICENSE="ZLIB" +SLOT="0/1" # subslot = SONAME +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" +IUSE="minizip static-libs" + +RDEPEND="!sys-libs/zlib-ng[compat]" +DEPEND="${RDEPEND}" +BDEPEND=" + minizip? ( ${AUTOTOOLS_DEPEND} ) + verify-sig? ( sec-keys/openpgp-keys-madler ) +" + +PATCHES=( + # Don't install unexpected & unused crypt.h header (which would clash with other pkgs) + # Pending upstream. bug #658536 + "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch + + # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628 + "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch + + # Respect LDFLAGS during configure tests. Pending upstream + "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch + + # Fix building on sparc with older binutils, we pass it in ebuild instead + "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch + + # CVE-2023-45853 (bug #916484) + "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch +) + +src_prepare() { + default + + if use minizip ; then + cd contrib/minizip || die + eautoreconf + fi + + case ${CHOST} in + *-mingw*|mingw*) + # Uses preconfigured Makefile rather than configure script + multilib_copy_sources + + ;; + esac +} + +multilib_src_configure() { + # We pass manually instead of relying on the configure script/makefile + # because it would pass it even for older binutils. + use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments) + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + case ${CHOST} in + *-mingw*|mingw*) + ;; + + *) + # bug #347167 + local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) + + local myconf=( + --shared + --prefix="${EPREFIX}/usr" + --libdir="${EPREFIX}/usr/$(get_libdir)" + ${uname:+--uname=${uname}} + ) + + # Not an autoconf script, so can't use econf + edo "${S}"/configure "${myconf[@]}" + + ;; + esac + + if use minizip ; then + local minizipdir="contrib/minizip" + mkdir -p "${BUILD_DIR}/${minizipdir}" || die + + cd ${minizipdir} || die + ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static) + fi +} + +multilib_src_compile() { + case ${CHOST} in + *-mingw*|mingw*) + emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- + sed \ + -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \ + -e 's|@exec_prefix@|${prefix}|g' \ + -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \ + -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \ + -e 's|@includedir@|${prefix}/include|g' \ + -e 's|@VERSION@|'${PV}'|g' \ + zlib.pc.in > zlib.pc || die + ;; + + *) + emake + + ;; + esac + + use minizip && emake -C contrib/minizip +} + +multilib_src_install() { + case ${CHOST} in + *-mingw*|mingw*) + emake -f win32/Makefile.gcc install \ + BINARY_PATH="${ED}/usr/bin" \ + LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ + INCLUDE_PATH="${ED}/usr/include" \ + SHARED_MODE=1 + + # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136 + insinto /usr/$(get_libdir)/pkgconfig + doins zlib.pc + + ;; + + *) + emake install DESTDIR="${D}" LDCONFIG=: + gen_usr_ldscript -a z + + ;; + esac + + if use minizip ; then + emake -C contrib/minizip install DESTDIR="${D}" + + # This might not exist if slibtool is used. + # bug #816756 + rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die + fi + + if ! use static-libs ; then + # bug #419645 + rm "${ED}"/usr/$(get_libdir)/libz.a || die + fi +} + +multilib_src_install_all() { + dodoc FAQ README ChangeLog doc/*.txt + + if use minizip ; then + dodoc contrib/minizip/*.txt + doman contrib/minizip/*.1 + fi +} |