summaryrefslogtreecommitdiff
path: root/sys-devel/native-cctools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
commit9c417bacd51da6d8b57fa9f37425161d30d4b95b (patch)
tree47c9d6e4243f39a1f48afd54c969b65b00a5c649 /sys-devel/native-cctools
parentd934827bf44b7cfcf6711964418148fa60877668 (diff)
gentoo resync : 28.11.2020
Diffstat (limited to 'sys-devel/native-cctools')
-rw-r--r--sys-devel/native-cctools/Manifest1
-rw-r--r--sys-devel/native-cctools/native-cctools-5.ebuild119
2 files changed, 120 insertions, 0 deletions
diff --git a/sys-devel/native-cctools/Manifest b/sys-devel/native-cctools/Manifest
index f5754a4c0d24..6f7595f5ac55 100644
--- a/sys-devel/native-cctools/Manifest
+++ b/sys-devel/native-cctools/Manifest
@@ -2,4 +2,5 @@ AUX aix-2/ld 2779 BLAKE2B 83b6e5069741a346c80d11069d233fe75d22cdacd2eaa508f705e6
AUX aix-2/mkexpfile 1535 BLAKE2B 8e4fa825cad0bef1bee2e6db348f895e58fbf281a1801d49679971f0de0b466c20150237222e56fbead3da3579945eb481f9cbceb8daa439d82e3e9e903d7e0c SHA512 51491a3b215b2efcbf3a14ee7cc90ea6e9062eb98a939e88671b288cbd8262864aec8cffe481689ba325c1aed125881a2c6a375eff1bb1f4f9902f29b53944c6
AUX aix-2/nm 176 BLAKE2B a3ca7388a558fadaab1d843ebe684c2c945872bb34423042aacfbadfebc28ef005e63236dde6899aec954dbe1a1c810ce4aa99d5485ed225ad07a3bd435c71a2 SHA512 d5206f7bf3ce54f79c292f9734b028aa8c9d0db811db4cb6ef2a4570f3bd13e38b2e41def4d6053a3794dd0f5ed81b485deee4d27c3db6462035071d7c522411
EBUILD native-cctools-4.ebuild 2809 BLAKE2B 45a4b4ecbfcea0678290f3c1cbd978e10d0591356ff91c61d73cb44b68bd799d36246817e2cd8c433f52d9e040e3099c4d2797671a339a127d3fc6f58359979b SHA512 b26b2f8e11810f2a4d18758db79109f604b229eaccc8a95774c959eead0d340cbb10eeac66d561363aa8d602ea470c81d5db303d143822041703500a3c2fb879
+EBUILD native-cctools-5.ebuild 2999 BLAKE2B fba1610df5b8dd63dadd1f02e7fafb0b8bc097751c0efa2219f154bbad1de2cad137e546e723fcbfb48b624b8aa4c22c0fff779d14b51f7d9e55470876395ff9 SHA512 718d7731e0c859f37d1b3785fecbd73d5013cb39d89c2f1deef2abe14ce7fa2ccc14d42caffd2750cc957ed2946f41b9a23fede803db0466d689b683f3eae867
MISC metadata.xml 243 BLAKE2B d650658b3e248940751d20c9e517a011a34f8d99df54d5203162d67c21df384f507e44ed0c848c1adc99fae8d511e204129f2709f5bdc5d1b2c8e41120bbe6db SHA512 8489be9ea6eac385511b0d193b1b61fad9c8e0d4cb86fd711e6faf04e66b2c935ae64ce6ce0a044d036e76de6787e5d440d67f831e89261a71e74b645a0999d9
diff --git a/sys-devel/native-cctools/native-cctools-5.ebuild b/sys-devel/native-cctools/native-cctools-5.ebuild
new file mode 100644
index 000000000000..d548ec568b42
--- /dev/null
+++ b/sys-devel/native-cctools/native-cctools-5.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils
+
+DESCRIPTION="Host OS native assembler as and static linker ld"
+HOMEPAGE="https://prefix.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2" # actually, we don't know, the wrapper is
+SLOT="0"
+
+AIX_V='aix-2'
+
+KEYWORDS="~ppc-aix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE=""
+
+DEPEND="sys-devel/binutils-config"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ mkdir -p "${S}"
+}
+
+src_install() {
+ LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
+ BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
+
+ keepdir ${LIBPATH} || die
+ dodir ${BINPATH}
+
+ # allow for future hosts with different paths
+ nativepath=""
+ wrappers=()
+ case ${CHOST} in
+ *-solaris*)
+ nativepath=/usr/sfw/bin
+ ;;
+ *-aix*)
+ nativepath=/usr/ccs/bin
+ wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld")
+ wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm")
+ wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile")
+ ;;
+ *-apple-darwin*|*-netbsd*|*-openbsd*)
+ nativepath=/usr/bin
+ ;;
+ *-interix*)
+ nativepath=/opt/gcc.3.3/bin
+ ;;
+ *)
+ die "Don't know where the native linker for your platform is"
+ ;;
+ esac
+
+ what="addr2line as ar c++filt gprof ld nm objcopy objdump \
+ ranlib readelf elfdump size strings strip"
+ # Darwin things
+ what="${what} install_name_tool ld64 libtool lipo nmedit \
+ otool otool64 pagestuff redo_prebinding segedit"
+
+ # copy from the host os
+ cd "${ED}${BINPATH}"
+ for b in ${what} ; do
+ if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
+ echo "linking darwin libtool ${nativepath}/${b}"
+ ln -s "${nativepath}/${b}" "${b}"
+ elif [[ -x ${nativepath}/g${b} ]] ; then
+ einfo "linking ${nativepath}/g${b}"
+ ln -s "${nativepath}/g${b}" "${b}"
+ elif [[ -x ${nativepath}/${b} ]] ; then
+ einfo "linking ${nativepath}/${b}"
+ ln -s "${nativepath}/${b}" "${b}"
+ else
+ ewarn "skipping ${b} (not in ${nativepath})"
+ fi
+ done
+
+ # post fix for Darwin's ranlib (doesn't like it when its called other than
+ # that, as libtool and ranlib are one tool)
+ # on macOS Big Sur, all tools except ld require to be called plainly as well
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ [[ ${CHOST##*-darwin} -lt 20 ]] && what="ranlib"
+ for b in ${what} ; do
+ [[ ${what} == ld ]] && continue
+ rm -f ${b}
+ cat <<-EOF > ${b}
+ #!/usr/bin/env bash
+ exec ${nativepath}/${b} "\$@"
+ EOF
+ chmod 755 ${b}
+ done
+ fi
+
+ exeinto ${BINPATH}
+ local wrapper source target
+ for wrapper in "${wrappers[@]}" ; do
+ source=${wrapper#*=}
+ target=${wrapper%%=*}
+ rm -f "${target}"
+ newexe "${source}" "${target}" || die
+ done
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CHOST}"
+ VER="native-${PV}"
+ LIBPATH="${EPREFIX}/${LIBPATH}"
+ FAKE_TARGETS="${CHOST}"
+ EOF
+ newins "${T}"/env.d ${CHOST}-native-${PV}
+}
+
+pkg_postinst() {
+ binutils-config ${CHOST}-native-${PV}
+}