From 121a7a0e6228e50390bb9d350be794d93682bc89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 10 Sep 2022 13:14:20 +0100 Subject: toolchain bump --- sys-devel/binutils/Manifest | 4 +- sys-devel/binutils/binutils-2.37_p1-r10.ebuild | 457 ------------------- sys-devel/binutils/binutils-2.39-r2.ebuild | 492 +++++++++++++++++++++ sys-devel/gcc/Manifest | 5 +- sys-devel/gcc/gcc-10.3.0-r10.ebuild | 21 - sys-devel/gcc/gcc-12.2.0.ebuild | 52 +++ sys-devel/libtool/Manifest | 2 +- .../libtool/files/libtool-2.4.6-darwin20.patch | 13 + sys-devel/libtool/libtool-2.4.6-r10.ebuild | 114 ----- sys-devel/libtool/libtool-2.4.7.ebuild | 115 +++++ 10 files changed, 678 insertions(+), 597 deletions(-) delete mode 100644 sys-devel/binutils/binutils-2.37_p1-r10.ebuild create mode 100644 sys-devel/binutils/binutils-2.39-r2.ebuild delete mode 100644 sys-devel/gcc/gcc-10.3.0-r10.ebuild create mode 100644 sys-devel/gcc/gcc-12.2.0.ebuild create mode 100644 sys-devel/libtool/files/libtool-2.4.6-darwin20.patch delete mode 100644 sys-devel/libtool/libtool-2.4.6-r10.ebuild create mode 100644 sys-devel/libtool/libtool-2.4.7.ebuild (limited to 'sys-devel') diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index fdccfc44..e296997b 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -1,2 +1,2 @@ -DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24 -DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28 +DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee +DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 diff --git a/sys-devel/binutils/binutils-2.37_p1-r10.ebuild b/sys-devel/binutils/binutils-2.37_p1-r10.ebuild deleted file mode 100644 index e5e61cf2..00000000 --- a/sys-devel/binutils/binutils-2.37_p1-r10.ebuild +++ /dev/null @@ -1,457 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" -LICENSE="GPL-3+" -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" -REQUIRED_USE="default-gold? ( gold )" - -# Variables that can be set here (ignored for live ebuilds) -# PATCH_VER - the patchset version -# Default: empty, no patching -# PATCH_BINUTILS_VER - the binutils version in the patchset name -# - Default: PV -# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... -# for the patchsets - -PATCH_VER=0 -PATCH_DEV=dilfridge - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 - SLOT=${PV} -else - PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} - PATCH_DEV=${PATCH_DEV:-dilfridge} - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" - [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" - SLOT=$(ver_cut 1-2) - # live ebuild - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi - -# -# The cross-compile logic -# -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -# -# The dependencies -# -RDEPEND=" - >=sys-devel/binutils-config-3 - sys-libs/zlib -" -DEPEND="${RDEPEND}" -BDEPEND=" - doc? ( sys-apps/texinfo ) - test? ( - dev-util/dejagnu - sys-devel/bc - ) - nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR=${WORKDIR}/build - -src_unpack() { - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patch || die - - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P/-hppa64/}.tar.xz - - cd "${WORKDIR}" || die - unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz - - # _p patch versions are Gentoo specific tarballs ... - local dir=${P%_p?} - dir=${dir/-hppa64/} - - S=${WORKDIR}/${dir} - fi - - cd "${WORKDIR}" || die - mkdir -p "${MY_BUILDDIR}" || die -} - -src_prepare() { - local patchsetname - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" - fi - - if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then - if ! use vanilla; then - einfo "Applying binutils patchset ${patchsetname}" - eapply "${WORKDIR}/patch" - einfo "Done." - fi - fi - - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - fi - fi - - # Make sure our explicit libdir paths don't get clobbered. #562460 - sed -i \ - -e 's:@bfdlibdir@:@libdir@:g' \ - -e 's:@bfdincludedir@:@includedir@:g' \ - {bfd,opcodes}/Makefile.in || die - - # Fix locale issues if possible #122216 - if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then - einfo "Fixing misc issues in configure files" - for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do - ebegin " Updating ${f/${S}\/}" - patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ - || eerror "Please file a bug about this" - eend $? - done - fi - - # Fix conflicts with newer glibc #272594 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then - sed -i 's:\:get_line:g' libiberty/testsuite/test-demangle.c - fi - - # Apply things from PATCHES and user dirs - default - - # Run misc portage update scripts - gnuconfig_update - elibtoolize --portage --no-uclibc -} - -toolchain-binutils_bugurl() { - printf "https://bugs.gentoo.org/" -} -toolchain-binutils_pkgversion() { - printf "Gentoo ${PV}" - [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" -} - -src_configure() { - # Setup some paths - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} - INCPATH=${LIBPATH}/include - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} - if is_cross ; then - TOOLPATH=/usr/${CHOST}/${CTARGET} - else - TOOLPATH=/usr/${CTARGET} - fi - BINPATH=${TOOLPATH}/binutils-bin/${PV} - - # Make sure we filter $LINGUAS so that only ones that - # actually work make it through #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - - local x - echo - for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do - einfo "$(printf '%10s' ${x}:) ${!x}" - done - echo - - cd "${MY_BUILDDIR}" - local myconf=() - - if use plugins ; then - myconf+=( --enable-plugins ) - fi - # enable gold (installed as ld.gold) and ld's plugin architecture - if use gold ; then - myconf+=( --enable-gold ) - if use default-gold; then - myconf+=( --enable-gold=default ) - fi - fi - - if use nls ; then - myconf+=( --without-included-gettext ) - else - myconf+=( --disable-nls ) - fi - - myconf+=( --with-system-zlib ) - - # For bi-arch systems, enable a 64bit bfd. This matches - # the bi-arch logic in toolchain.eclass. #446946 - # We used to do it for everyone, but it's slow on 32bit arches. #438522 - case $(tc-arch) in - ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; - esac - - use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) - - [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) - - is_cross && myconf+=( - --with-sysroot="${EPREFIX}"/usr/${CTARGET} - --enable-poison-system-directories - ) - - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ - # on everyone in alpha (for now), we'll just enable it when possible - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) - - # mips can't do hash-style=gnu ... - if [[ $(tc-arch) != mips ]] ; then - myconf+=( --enable-default-hash-style=gnu ) - fi - - myconf+=( - --prefix="${EPREFIX}"/usr - --host=${CHOST} - --target=${CTARGET} - --datadir="${EPREFIX}"${DATAPATH} - --datarootdir="${EPREFIX}"${DATAPATH} - --infodir="${EPREFIX}"${DATAPATH}/info - --mandir="${EPREFIX}"${DATAPATH}/man - --bindir="${EPREFIX}"${BINPATH} - --libdir="${EPREFIX}"${LIBPATH} - --libexecdir="${EPREFIX}"${LIBPATH} - --includedir="${EPREFIX}"${INCPATH} - --enable-obsolete - --enable-shared - --enable-threads - # Newer versions (>=2.27) offer a configure flag now. - --enable-relro - # Newer versions (>=2.24) make this an explicit option. #497268 - --enable-install-libiberty - # Available from 2.35 on - --enable-textrel-check=warning - # Works better than vapier's patch... #808787 - --enable-new-dtags - --disable-werror - --with-bugurl="$(toolchain-binutils_bugurl)" - --with-pkgversion="$(toolchain-binutils_pkgversion)" - $(use_enable static-libs static) - ${EXTRA_ECONF} - # Disable modules that are in a combined binutils/gdb tree. #490566 - --disable-{gdb,libdecnumber,readline,sim} - # Strip out broken static link flags. - # https://gcc.gnu.org/PR56750 - --without-stage1-ldflags - # Change SONAME to avoid conflict across - # {native,cross}/binutils, binutils-libs. #666100 - --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) - - # avoid automagic dependency on (currently prefix) systems - # systems with debuginfod library, bug #754753 - --without-debuginfod - - # Allow user to opt into CET for host libraries. - # Ideally we would like automagic-or-disabled here. - # But the check does not quite work on i686: bug #760926. - $(use_enable cet) - ) - echo ./configure "${myconf[@]}" - "${S}"/configure "${myconf[@]}" || die - - # Prevent makeinfo from running if doc is unset. - if ! use doc ; then - sed -i \ - -e '/^MAKEINFO/s:=.*:= true:' \ - Makefile || die - fi -} - -src_compile() { - cd "${MY_BUILDDIR}" - # see Note [tooldir hack for ldscripts] - emake tooldir="${EPREFIX}${TOOLPATH}" all - - # only build info pages if the user wants them - if use doc ; then - emake info - fi - - # we nuke the manpages when we're left with junk - # (like when we bootstrap, no perl -> no manpages) - find . -name '*.1' -a -size 0 -delete -} - -src_test() { - cd "${MY_BUILDDIR}" - - # bug 637066 - filter-flags -Wall -Wreturn-type - - emake -k check -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" - # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install - rm -rf "${ED}"/${LIBPATH}/bin - use static-libs || find "${ED}" -name '*.la' -delete - - # Newer versions of binutils get fancy with ${LIBPATH} #171905 - cd "${ED}"/${LIBPATH} - for d in ../* ; do - [[ ${d} == ../${PV} ]] && continue - mv ${d}/* . || die - rmdir ${d} || die - done - - # Now we collect everything intp the proper SLOT-ed dirs - # When something is built to cross-compile, it installs into - # /usr/$CHOST/ by default ... we have to 'fix' that :) - if is_cross ; then - cd "${ED}"/${BINPATH} - for x in * ; do - mv ${x} ${x/${CTARGET}-} - done - - if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then - mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} - mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/usr/${CHOST}/{include,lib} - fi - fi - insinto ${INCPATH} - local libiberty_headers=( - # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. - demangle.h - dyn-string.h - fibheap.h - hashtab.h - libiberty.h - objalloc.h - splay-tree.h - ) - doins "${libiberty_headers[@]/#/${S}/include/}" - if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/${LIBPATH}/lib - fi - - # Generate an env.d entry for this binutils - insinto /etc/env.d/binutils - cat <<-EOF > "${T}"/env.d - TARGET="${CTARGET}" - VER="${PV}" - LIBPATH="${EPREFIX}${LIBPATH}" - EOF - newins "${T}"/env.d ${CTARGET}-${PV} - - # Handle documentation - if ! is_cross ; then - cd "${S}" - dodoc README - docinto bfd - dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO - docinto binutils - dodoc binutils/ChangeLog binutils/NEWS binutils/README - docinto gas - dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* - docinto gprof - dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl - docinto ld - dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO - docinto libiberty - dodoc libiberty/ChangeLog* libiberty/README - docinto opcodes - dodoc opcodes/ChangeLog* - fi - - # Remove shared info pages - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} - - # Trim all empty dirs - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null -} - -pkg_postinst() { - # Make sure this ${CTARGET} has a binutils version selected - [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 - binutils-config ${CTARGET}-${PV} -} - -pkg_postrm() { - local current_profile=$(binutils-config -c ${CTARGET}) - - # If no other versions exist, then uninstall for this - # target ... otherwise, switch to the newest version - # Note: only do this if this version is unmerged. We - # rerun binutils-config if this is a remerge, as - # we want the mtimes on the symlinks updated (if - # it is the same as the current selected profile) - if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then - local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') - choice=${choice//$'\n'/ } - choice=${choice/* } - if [[ -z ${choice} ]] ; then - binutils-config -u ${CTARGET} - else - binutils-config ${choice} - fi - elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then - binutils-config ${CTARGET}-${PV} - fi -} - -# Note [slotting support] -# ----------------------- -# Gentoo's layout for binutils files is non-standard as Gentoo -# supports slotted installation for binutils. Many tools -# still expect binutils to reside in known locations. -# binutils-config package restores symlinks into known locations, -# like: -# /usr/bin/${CTARGET}- -# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips -# /usr/include/ -# -# Note [tooldir hack for ldscripts] -# --------------------------------- -# Build system does not allow ./configure to tweak every location -# we need for slotting binutils hence all the shuffling in -# src_install(). This note is about SCRIPTDIR define handling. -# -# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value -# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' -# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. -# Thus we can't just move files around after compilation finished. -# -# Our goal is the following: -# - at build-time set scriptdir to point to symlinked location: -# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) -# - at install-time set scriptdir to point to slotted location: -# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sys-devel/binutils/binutils-2.39-r2.ebuild b/sys-devel/binutils/binutils-2.39-r2.ebuild new file mode 100644 index 00000000..e4e43cdd --- /dev/null +++ b/sys-devel/binutils/binutils-2.39-r2.ebuild @@ -0,0 +1,492 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" + +LICENSE="GPL-3+" +IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla" +REQUIRED_USE="default-gold? ( gold )" + +# Variables that can be set here (ignored for live ebuilds) +# PATCH_VER - the patchset version +# Default: empty, no patching +# PATCH_BINUTILS_VER - the binutils version in the patchset name +# - Default: PV +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... +# for the patchsets + +PATCH_VER=4 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SLOT=${PV} +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" + [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + SLOT=$(ver_cut 1-2) + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# +# The cross-compile logic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +# +# The dependencies +# +RDEPEND=" + >=sys-devel/binutils-config-3 + sys-libs/zlib +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + sys-devel/bc + ) + nls? ( sys-devel/gettext ) + sys-devel/flex + virtual/yacc +" + +RESTRICT="!test? ( test )" + +MY_BUILDDIR=${WORKDIR}/build + +src_unpack() { + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-hppa64/}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + + # _p patch versions are Gentoo specific tarballs ... + local dir=${P%_p?} + dir=${dir/-hppa64/} + + S=${WORKDIR}/${dir} + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die +} + +src_prepare() { + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi + + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Fix locale issues if possible, bug #122216 + if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then + einfo "Fixing misc issues in configure files" + for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do + ebegin " Updating ${f/${S}\/}" + patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ + || eerror "Please file a bug about this" + eend $? + done + fi + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + # enable gold (installed as ld.gold) and ld's plugin architecture + if use gold ; then + myconf+=( --enable-gold ) + if use default-gold; then + myconf+=( --enable-gold=default ) + fi + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + --enable-obsolete + --enable-shared + --enable-threads + # Newer versions (>=2.27) offer a configure flag now. + --enable-relro + # Newer versions (>=2.24) make this an explicit option, bug #497268 + --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + + # Available from 2.39 on + --enable-warn-execstack + --enable-warn-rwx-segments + # TODO: Available from 2.39+ on but let's try the warning on for a bit + # first... (--enable-warn-execstack) + # Could put it under USE=hardened? + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # Things to think about + #--enable-deterministic-archives + + # Works better than vapier's patch, bug #808787 + --enable-new-dtags + + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,libdecnumber,readline,sim} + # Strip out broken static link flags. + # https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across + # {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + # Avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" || die + + # Prevent makeinfo from running if doc is unset. + if ! use doc ; then + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die + fi +} + +src_compile() { + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake V=1 info + fi + + # we nuke the manpages when we're left with junk + # (like when we bootstrap, no perl -> no manpages) + find . -name '*.1' -a -size 0 -delete +} + +src_test() { + cd "${MY_BUILDDIR}" || die + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k V=1 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + rm -rf "${ED}"/${LIBPATH}/bin || die + use static-libs || find "${ED}" -name '*.la' -delete + + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die + for d in ../* ; do + [[ ${d} == ../${PV} ]] && continue + mv ${d}/* . || die + rmdir ${d} || die + done + + # Now we collect everything intp the proper SLOT-ed dirs + # When something is built to cross-compile, it installs into + # /usr/$CHOST/ by default ... we have to 'fix' that :) + if is_cross ; then + cd "${ED}"/${BINPATH} || die + for x in * ; do + mv ${x} ${x/${CTARGET}-} || die + done + + if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/usr/${CHOST}/{include,lib} + fi + fi + + insinto ${INCPATH} + local libiberty_headers=( + # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. + demangle.h + dyn-string.h + fibheap.h + hashtab.h + libiberty.h + objalloc.h + splay-tree.h + ) + doins "${libiberty_headers[@]/#/${S}/include/}" + if [[ -d ${ED}/${LIBPATH}/lib ]] ; then + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + fi + + # Generate an env.d entry for this binutils + insinto /etc/env.d/binutils + cat <<-EOF > "${T}"/env.d + TARGET="${CTARGET}" + VER="${PV}" + LIBPATH="${EPREFIX}${LIBPATH}" + EOF + newins "${T}"/env.d ${CTARGET}-${PV} + + # Handle documentation + if ! is_cross ; then + cd "${S}" || die + dodoc README + + docinto bfd + dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/README + + docinto opcodes + dodoc opcodes/ChangeLog* + fi + + # Remove shared info pages + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + + # Trim all empty dirs + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null +} + +pkg_postinst() { + # Make sure this ${CTARGET} has a binutils version selected + [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 + binutils-config ${CTARGET}-${PV} +} + +pkg_postrm() { + local current_profile=$(binutils-config -c ${CTARGET}) + + # If no other versions exist, then uninstall for this + # target ... otherwise, switch to the newest version + # Note: only do this if this version is unmerged. We + # rerun binutils-config if this is a remerge, as + # we want the mtimes on the symlinks updated (if + # it is the same as the current selected profile) + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then + local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') + choice=${choice//$'\n'/ } + choice=${choice/* } + if [[ -z ${choice} ]] ; then + binutils-config -u ${CTARGET} + else + binutils-config ${choice} + fi + elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then + binutils-config ${CTARGET}-${PV} + fi +} + +# Note [slotting support] +# ----------------------- +# Gentoo's layout for binutils files is non-standard as Gentoo +# supports slotted installation for binutils. Many tools +# still expect binutils to reside in known locations. +# binutils-config package restores symlinks into known locations, +# like: +# /usr/bin/${CTARGET}- +# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips +# /usr/include/ +# +# Note [tooldir hack for ldscripts] +# --------------------------------- +# Build system does not allow ./configure to tweak every location +# we need for slotting binutils hence all the shuffling in +# src_install(). This note is about SCRIPTDIR define handling. +# +# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value +# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' +# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. +# Thus we can't just move files around after compilation finished. +# +# Our goal is the following: +# - at build-time set scriptdir to point to symlinked location: +# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) +# - at install-time set scriptdir to point to slotted location: +# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index b545db19..885c738c 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -1,2 +1,3 @@ -DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e -DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86 +DIST gcc-12.2.0-musl-patches-1.tar.xz 3844 BLAKE2B 004432806696f7d0a32366270ac45695e858abee73a255e44dc6e0a225339e4cad40aab0d51dfe9a55d5aa4b4001f5726064bb2eea3212a0874b2d27e229abd7 SHA512 c354edcd641a9dfaf902a0ff4c44c75065d0cf1c36bbf6c3c35c2e23bff22b8f70bcf4458a5a0ef86371e9f2fafca8a54ca822e35820ff442c9458a2819c3606 +DIST gcc-12.2.0-patches-1.tar.xz 12864 BLAKE2B a5ae0a85dfc1b6f0bd968f0d5262ebed14ec9cdb3249e3a4c571578c54eda0e53708ee7fe8e03e506366c7f3cf7926eced9b390d9dee948c1249298c0fabd9fb SHA512 f3d793b89a2a0385d596162fb0c653d4acdf21ae418cb792c1786a01fde0391bd0719715dbf07d53636f127168f5cd99108a1dc11cf6cea889b7d82385bcc258 +DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173 diff --git a/sys-devel/gcc/gcc-10.3.0-r10.ebuild b/sys-devel/gcc/gcc-10.3.0-r10.ebuild deleted file mode 100644 index 2d3e3739..00000000 --- a/sys-devel/gcc/gcc-10.3.0-r10.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_VER="1" - -inherit toolchain - -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - if has_version '>=sys-libs/glibc-2.32-r1'; then - rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die - fi - - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-12.2.0.ebuild b/sys-devel/gcc/gcc-12.2.0.ebuild new file mode 100644 index 00000000..aa3dfbf9 --- /dev/null +++ b/sys-devel/gcc/gcc-12.2.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="1" +PATCH_GCC_VER="12.2.0" +MUSL_VER="1" +MUSL_GCC_VER="12.2.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/libtool/Manifest b/sys-devel/libtool/Manifest index 4f2d5bac..d36ba6c5 100644 --- a/sys-devel/libtool/Manifest +++ b/sys-devel/libtool/Manifest @@ -1 +1 @@ -DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 +DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da diff --git a/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch b/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch new file mode 100644 index 00000000..02cb1d7e --- /dev/null +++ b/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch @@ -0,0 +1,13 @@ +macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases. +macOS Monterey is 12.0. +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1076,7 +1076,7 @@ + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; +- 10.*) ++ 10.*|11.*|12.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; diff --git a/sys-devel/libtool/libtool-2.4.6-r10.ebuild b/sys-devel/libtool/libtool-2.4.6-r10.ebuild deleted file mode 100644 index 1e876837..00000000 --- a/sys-devel/libtool/libtool-2.4.6-r10.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LIBTOOLIZE="true" #225559 -WANT_LIBTOOL="none" -inherit autotools prefix - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git" - inherit git-r3 -else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -fi - -DESCRIPTION="A shared library tool for developers" -HOMEPAGE="https://www.gnu.org/software/libtool/" - -LICENSE="GPL-2" -SLOT="2" -IUSE="vanilla" - -# Pull in libltdl directly until we convert packages to the new dep. -RDEPEND=" - sys-devel/gnuconfig - >=sys-devel/autoconf-2.69:* - >=sys-devel/automake-1.13:* - dev-libs/libltdl:0" -DEPEND="${RDEPEND}" -[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" - -PATCHES=( - "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 - "${FILESDIR}"/${PN}-2.4.6-link-specs.patch - "${FILESDIR}"/${PN}-2.4.6-link-fsanitize.patch #573744 - "${FILESDIR}"/${PN}-2.4.6-link-fuse-ld.patch - "${FILESDIR}"/${PN}-2.4.6-libtoolize-slow.patch - "${FILESDIR}"/${PN}-2.4.6-libtoolize-delay-help.patch - "${FILESDIR}"/${PN}-2.4.6-sed-quote-speedup.patch #542252 - "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch #581314 - - "${FILESDIR}"/${PN}-2.4.6-mint.patch - "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch - "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch -) - -src_prepare() { - if [[ ${PV} == *9999 ]] ; then - eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876 - ./bootstrap || die - else - PATCHES+=( - "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #650876 - ) - fi - - # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway - chmod +w build-aux/ltmain.sh || die - - if use vanilla ; then - eapply_user - return 0 - else - default - fi - - if use prefix ; then - # seems that libtool has to know about EPREFIX a little bit - # better, since it fails to find prefix paths to search libs - # from, resulting in some packages building static only, since - # libtool is fooled into thinking that libraries are unavailable - # (argh...). This could also be fixed by making the gcc wrapper - # return the correct result for -print-search-dirs (doesn't - # include prefix dirs ...). - eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch - eprefixify m4/libtool.m4 - fi - - pushd libltdl >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - - # Make sure timestamps don't trigger a rebuild of man pages. #556512 - if [[ ${PV} != *9999 ]] ; then - touch doc/*.1 || die - export HELP2MAN=false - fi -} - -src_configure() { - # the libtool script uses bash code in it and at configure time, tries - # to find a bash shell. if /bin/sh is bash, it uses that. this can - # cause problems for people who switch /bin/sh on the fly to other - # shells, so just force libtool to use /bin/bash all the time. - export CONFIG_SHELL="$(type -P bash)" - - # Do not bother hardcoding the full path to sed. Just rely on $PATH. #574550 - export ac_cv_path_SED="$(basename "$(type -P sed)")" - - [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g" - ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install -} - -src_install() { - default - - local x - while read -d $'\0' -r x ; do - ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die - done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0) -} diff --git a/sys-devel/libtool/libtool-2.4.7.ebuild b/sys-devel/libtool/libtool-2.4.7.ebuild new file mode 100644 index 00000000..09853e34 --- /dev/null +++ b/sys-devel/libtool/libtool-2.4.7.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Please bump with dev-libs/libltdl. + +# bug #225559 +LIBTOOLIZE="true" +WANT_LIBTOOL="none" +inherit autotools prefix + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git" + inherit git-r3 +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +fi + +DESCRIPTION="A shared library tool for developers" +HOMEPAGE="https://www.gnu.org/software/libtool/" + +LICENSE="GPL-2" +SLOT="2" +IUSE="vanilla" + +# Pull in libltdl directly until we convert packages to the new dep. +RDEPEND=" + sys-devel/gnuconfig + >=sys-devel/autoconf-2.69:* + >=sys-devel/automake-1.13:* + >=dev-libs/libltdl-2.4.7" +DEPEND="${RDEPEND}" +[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" + +PATCHES=( + # bug #109105 + "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch + # bug #581314 + "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch + + "${FILESDIR}"/${PN}-2.4.6-mint.patch + "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch + "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch +) + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876 + ./bootstrap || die + else + PATCHES+=( + "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876 + ) + fi + + # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway + chmod +w build-aux/ltmain.sh || die + + if use vanilla ; then + eapply_user + return 0 + else + default + fi + + if use prefix ; then + # seems that libtool has to know about EPREFIX a little bit + # better, since it fails to find prefix paths to search libs + # from, resulting in some packages building static only, since + # libtool is fooled into thinking that libraries are unavailable + # (argh...). This could also be fixed by making the gcc wrapper + # return the correct result for -print-search-dirs (doesn't + # include prefix dirs ...). + eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch + eprefixify m4/libtool.m4 + fi + + pushd libltdl >/dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + popd >/dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + + # Make sure timestamps don't trigger a rebuild of man pages. #556512 + if [[ ${PV} != *9999 ]] ; then + touch doc/*.1 || die + export HELP2MAN=false + fi +} + +src_configure() { + # the libtool script uses bash code in it and at configure time, tries + # to find a bash shell. if /bin/sh is bash, it uses that. this can + # cause problems for people who switch /bin/sh on the fly to other + # shells, so just force libtool to use /bin/bash all the time. + export CONFIG_SHELL="$(type -P bash)" + + # Do not bother hardcoding the full path to sed. + # Just rely on $PATH. bug #574550 + export ac_cv_path_SED="$(basename "$(type -P sed)")" + + [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g" + + ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install +} + +src_install() { + default + + local x + while read -d $'\0' -r x ; do + ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die + done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0) +} -- cgit v1.2.3