summaryrefslogtreecommitdiff
path: root/sys-devel/binutils-apple
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-29 15:17:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-29 15:17:30 +0100
commit662f71ae67cd775d7fbb79b5091676c0e07a992b (patch)
tree74c7cb80b79b8886cd7466cf262878d1e8b9d546 /sys-devel/binutils-apple
parentb2d3769042cfd3d8ceadaa52f6a5aafabb0d4114 (diff)
gentoo auto-resync : 29:05:2023 - 15:17:30
Diffstat (limited to 'sys-devel/binutils-apple')
-rw-r--r--sys-devel/binutils-apple/Manifest2
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r102.ebuild118
2 files changed, 120 insertions, 0 deletions
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
index dbda203a7c19..be4bbb4678a8 100644
--- a/sys-devel/binutils-apple/Manifest
+++ b/sys-devel/binutils-apple/Manifest
@@ -7,6 +7,7 @@ DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3f
DIST cctools-795.tar.gz 1993795 BLAKE2B dc0915f8647eecba5352e34dfc5752b679df39ead9a4734c49955a824d2cc127308eed46a614665dfe08a9d3036eb37f587e1b765a7df727facc42a33befacb0 SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254
DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126
DIST darwin-xtools-8.2.1-r101.tar.gz 3105898 BLAKE2B 3516cd252d4880b1e80c76365efef6f96830578bb5512befe33f86decdeb026fbad17fd3b27e9c3cf20d100897002e86ec08822041baa0291bb53e0b0ecf4d10 SHA512 f84cbde0853c14f03af40a124133d71d3e1710da021a593336eb4351c60edbca5753af0780f269ed4716cd194973f5437d428c5ff9615d9ce025dba3b7daef77
+DIST darwin-xtools-8.2.1-r102.tar.gz 3105944 BLAKE2B c60854e77afde1a109834e6bac2485f79387b37b871b00a83cfe42c8793685fc414a6a9fa8ef588badf824a9255478fd64c171015f22e848b41dc47d011e202a SHA512 e115e29b5b358cec5c254fc7e4f5d94567c6788f745fd48dfea464a69bd7f4e3a48bccf3334f9fbb26ca3a3cd1c4b366198e05f2f567c7fb43e81ea8f3bf151c
DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f
DIST dyld-421.2.tar.gz 625173 BLAKE2B 8f8325314861ae2ea10fbe78c74c7199b547973ac61a8e9cb76fb874a0e53395ea31c04e489f85ac7cfdb5715ae5051679453de75eb195e313113e7bbbc70340 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8
DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d
@@ -14,5 +15,6 @@ DIST ld64-97.17.tar.gz 421947 BLAKE2B 56820ef28490f2e0181d6e36b87506c6f00ae5759a
DIST libunwind-30.tar.gz 82811 BLAKE2B 26993d6afa6930931c01b579326964a66832ed7a6ffa26eff10016c8d6d175d3b671753cf8700dcdbae7f0a9c01b16e9cbd3c9fe86697608f1f08a8eceb64782 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f
EBUILD binutils-apple-3.2.6-r1.ebuild 6969 BLAKE2B 194a027f153a1d820c61bb249de57b25365cd2b94f4ecda063551990bae3e06b5d6ebf93aa57d0a295580a0d3b28030d4352ebb795026180b0ca5d750dce088f SHA512 86b264a87b816c7e34709605db5f2b5d5146290337a11591203b68acf397d2f8c88f02c2370c3f168a9f7f11372f303bcb584f716d0795c534eed599bc415d25
EBUILD binutils-apple-8.2.1-r101.ebuild 3298 BLAKE2B 4e5ed4c40442106e6df08ae03e1768daaca5ded22f57c31103516486c801268089817cd2be2ea865d2a2e908658bda1036c2c9154a7faf0fdeaeb51ccc6afb9c SHA512 cbc1582631eec56a8a1926c239de6a9b493f00c2f931331711e53205d452a9213f75b0d20b028d375a0d0e1412175f000c963cf9a406a7f703d143d70cfdca53
+EBUILD binutils-apple-8.2.1-r102.ebuild 3256 BLAKE2B a5a4c8893ec393e5e1f99e29f27d74245d3153e671083f0f4102a07a0ebf259f9c6b40c93b7d9eeb5e67f58bd0e96adb67c6e64c0ce9c23c758de10cc019e444 SHA512 b633b77914440ca260d6cbbd02229e90b783b813f653eb91bf7d302c002c06c461d397112ad6ed449d8989c185f0626879667dce79abd1e0c061646b1ae65370
EBUILD binutils-apple-8.2.1-r2.ebuild 12050 BLAKE2B 246cc8b1f678daa4838e0f1e7147b36448a4331fd26a92d294d847245dffc0d479d8c6b810bef83c383fc16ea006d531083350bbd7a819470c70d9155fa725ba SHA512 79e136bbc5507b289f8ec5286fccaf636733697a16799ec75d4ce47e098b25d9740e15717f85d2c921ce7600dc7355296f46b6f91ce36ef14181815f871f455f
MISC metadata.xml 436 BLAKE2B f120e4772814634938465022b29afcd08e96fe15150e5757a1b4f9e193bab557bd26a394d0cf67e2f58fdbf3d5e5c7156f6c19056eeeed2544fd102c1870bed2 SHA512 d8faccf2a0994f67be13f412a278c83250d234e9cda2657f1181d2a2865e5738c3caa488d69f27d2223d7043ba569d26bf62fccb718081f88136e69c96f77c26
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r102.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r102.ebuild
new file mode 100644
index 000000000000..d892d1c763d9
--- /dev/null
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r102.ebuild
@@ -0,0 +1,118 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR=emake # keep dependencies down
+
+inherit cmake
+
+DESCRIPTION="Darwin Xtools matching Xcode Tools ${PN}"
+HOMEPAGE="https://github.com/iains/darwin-xtools"
+SRC_URI="https://github.com/grobian/darwin-xtools/archive/gentoo-${PVR}.tar.gz -> darwin-xtools-${PVR}.tar.gz"
+
+LICENSE="APSL-2"
+SLOT="8"
+KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos"
+
+# xtools uses c++11 features, not available in gcc-apple, hence gcc/clang dep
+DEPEND="sys-devel/binutils-config
+ || ( sys-devel/gcc:* sys-devel/clang:* )
+ app-arch/xar
+ dev-libs/libyaml"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/darwin-xtools-gentoo-${PVR}"
+
+src_configure() {
+ CTARGET=${CTARGET:-${CHOST}}
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+ fi
+
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/xtools-${PV}
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/xtools-${PV}
+ if [[ ${CHOST} != ${CTARGET} ]] ; then
+ BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/xtools-${PV}
+ else
+ BINPATH=/usr/${CTARGET}/binutils-bin/xtools-${PV}
+ fi
+
+ is-host-64bit() {
+ case ${CTARGET} in
+ x86_64-*|powerpc64-*|arm64-*) echo YES ;;
+ *) echo NO ;;
+ esac
+ }
+
+ local mycmakeargs=(
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
+ -DPACKAGE_VERSION="Gentoo ${PN}-${PVR}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}${BINPATH%/*}" # cmake insists on /bin
+ -DCCTOOLS_LD_CLASSIC=NO # fails to link, and is useless anyway
+ -DXTOOLS_AS_USE_CLANG=YES # default to host as for unsupported targets
+ -DXTOOLS_AS_CLANG_USE_HOST=YES # search for arch/as-host iso clang
+ -DXTOOLS_AS_SUBDIR="${EPREFIX}${LIBPATH}/"
+ -DXTOOLS_LTO_SUPPORT=NO
+ -DXTOOLS_HAS_LIBPRUNETRIE=YES
+ -DXTOOLS_TAPI_SUPPORT=ON
+ -DXTOOLS_USE_TAPILITE=ON
+ -DXTOOLS_HOST_IS_64B=$(is-host-64bit)
+ -DXTOOLS_BUGURL="https://bugs.gentoo.org/"
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # cmake insists on installing in /bin, so move bins to the place we
+ # want them
+ mv "${ED}${BINPATH%/*}/bin" "${ED}${BINPATH}" || die
+
+ # move as impls into LIBPATH, such that binutils-config doesn't
+ # create links for this
+ dodir "${LIBPATH}"
+ local as
+ for as in "${ED}${BINPATH}"/*/as ; do
+ as=${as%/as}
+ mv "${as}" "${ED}${LIBPATH}"/ || die
+ done
+
+ # provide as-host wrappers, used on "unsupported" platforms: x86,
+ # x64, arm, arm64, the main reason here is missing support for
+ # instructions, e.g. the as works fine, until newer instruction sets
+ # are used like SSE4.1, AVX, etc.
+ local arch
+ for arch in i386 x86_64 arm arm64 ; do
+ mkdir -p "${ED}${LIBPATH}"/${arch}
+ as="${ED}${LIBPATH}"/${arch}/as-host
+ rm -f "${as}"
+ cat <<-EOF > "${as}"
+ #!/usr/bin/env bash
+ exec /usr/bin/as "\$@"
+ EOF
+ chmod 755 "${as}"
+ done
+
+ doman ld64/doc/man/man*/* cctools/man/*.[135]
+ dodir "${DATAPATH}"
+ mv "${ED}"/usr/share/man "${ED}/${DATAPATH}/" || die
+
+ cd "${S}"
+ insinto /etc/env.d/binutils
+ cat <<-EOF > env.d
+ TARGET="${CHOST}"
+ VER="xtools-${PV}"
+ FAKE_TARGETS="${CHOST}"
+ EOF
+ newins env.d ${CHOST}-xtools-${PV}
+}
+
+pkg_postinst() {
+ binutils-config ${CHOST}-xtools-${PV}
+}