summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-12-20 16:53:54 +0100
committerFabian Groffen <grobian@gentoo.org>2020-12-20 17:05:43 +0100
commit2e0d0499f41d0d01e121260c3166546cd92a708b (patch)
tree9c2cd9dea939d8d9e672478f5d5d8d21eb82396b /sys-devel/binutils-apple
parentnet-dns/unbound: add missing multilib dep (diff)
downloadgentoo-2e0d0499f41d0d01e121260c3166546cd92a708b.tar.gz
gentoo-2e0d0499f41d0d01e121260c3166546cd92a708b.tar.bz2
gentoo-2e0d0499f41d0d01e121260c3166546cd92a708b.zip
sys-devel/binutils-apple-8.2.1-r100: revbump darwin-xtools based version
darwin-xtools compiles with FSF GCC, and supports ppc and ppc64 targets TAPI support needs validation, this seems to work fine on non-TAPI macOS releases, e.g. ppc-macos. Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-devel/binutils-apple')
-rw-r--r--sys-devel/binutils-apple/Manifest1
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r100.ebuild89
2 files changed, 90 insertions, 0 deletions
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
index 9b9dc9158183..98b29403dd59 100644
--- a/sys-devel/binutils-apple/Manifest
+++ b/sys-devel/binutils-apple/Manifest
@@ -22,6 +22,7 @@ DIST cctools-877.8.tar.gz 1720708 BLAKE2B 97bce69d7c88a917ad1351635b4bd0ebd3273f
DIST cctools-886.tar.gz 1731850 BLAKE2B c206ad8c94fa3d132726db8cbc60ed09b6f1f7aa8118a99b1e7ed350323c11b729d68c912ba7648cf900cc2a26cbff12a03072afe92efe09c8974be280448731 SHA512 49f14e165da3a9fcf16614a810b8a2a68907348bd27a60b268b330e416a0bc070fb6445e1e6b80d849026bd6ce7de4459623ab86168e2d63bb492d1ba6680c5b
DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126
DIST cctools-949.0.1.tar.gz 1968671 BLAKE2B b38fbae5d2ec011a94c2e4ec299c1ecd173f2c2516664cf925b06aaa078e234b59068158ea29dfcbf763ca98c73bc1806a507fbbe49a8d4d0a2fd4e602f401ce SHA512 13c493a48852c980d2829d28616c18640ad5ebfe6acd55143c4c948665e0b65377a459560667074fdac5e69bb6360fea13d988303c49fd3dd4a58e9b5c54ebcb
+DIST darwin-xtools-8.2.1-r100.tar.gz 2934997 BLAKE2B d0324d47d3aa0afd0007fbbd16c74e046c643c645744cc7ef0535eeed275c2d61763a1c6708b3a0a796f0fc83e62b5e5fe907c62553b439bea750353cfac2f73 SHA512 7000bca61b1dc63d1d08a9bcf104dace4376c2656af0faddc28a7d6c3718dbe54713da96136091a2024a644eaf90758714d1e4eb3cfeec2df0e412d847f59c30
DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f
DIST dyld-195.6.tar.gz 412518 BLAKE2B f525aac0020baa69c5d7c42a7027b0d2fdef9fa3c2e5d3831101989eab20f2eb7932c99355ca34e6e0b988b9808013739d452592e0b8832e1306cc6027cc5d0f SHA512 58a9ea27efc02e66f9d99bfa250af1d90326385385431e5279386bbd9ab53366bf7e8236543296908b7214c33523c8f60098a6298a7393b3180e2a6bce18e7c5
DIST dyld-353.2.1.tar.gz 510036 BLAKE2B 6f355bcb87d6136d3c29b2766146303ecf092fb407296a0a93412598276ea88c4f826da75d20cc5d3e2bfac750a62c413b117ee95dd710eac83b647786fb109b SHA512 a9488620499f682e245b55b7e0e4ec02fc0bcf03bd8a70d4a4ee0ba762067ade2f41c188990c101727476d41c19368b4cc89cccf2df40231da1c777742c7391f
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r100.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r100.ebuild
new file mode 100644
index 000000000000..5b7cd7f56ab0
--- /dev/null
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r100.ebuild
@@ -0,0 +1,89 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR=emake # keep dependencies down
+
+inherit cmake toolchain-funcs
+
+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="~ppc-macos ~x64-macos ~x86-macos"
+IUSE="tapi"
+
+DEPEND="sys-devel/binutils-config
+ app-arch/xar
+ tapi? ( sys-libs/tapi )"
+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}
+ 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*) 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_LTO_SUPPORT=NO
+ -DXTOOLS_TAPI_SUPPORT=$(use tapi && echo ON || echo OFF)
+ -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
+
+ dodir "${LIBPATH}"
+ local as
+ for as in "${ED}${BINPATH}"/*/as ; do
+ as=${as%/as}
+ mv "${as}" "${ED}${LIBPATH}"/ || die
+ done
+
+ 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}
+}