summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-04-13 21:02:45 +0200
committerFabian Groffen <grobian@gentoo.org>2017-04-13 21:02:45 +0200
commit9a060082fff221957e4ab87a48a8757edeb8acc5 (patch)
treec827d23ade6ff310ff38db2a86ea6759eb885b15 /sys-devel/native-cctools
parentsys-apps/baselayout-prefix: drop unused patches (diff)
downloadgentoo-9a060082fff221957e4ab87a48a8757edeb8acc5.tar.gz
gentoo-9a060082fff221957e4ab87a48a8757edeb8acc5.tar.bz2
gentoo-9a060082fff221957e4ab87a48a8757edeb8acc5.zip
sys-devel/native-cctools: cleanup, convert from EAPI=3 to EAPI=6
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-devel/native-cctools')
-rw-r--r--sys-devel/native-cctools/native-cctools-1.ebuild107
-rw-r--r--sys-devel/native-cctools/native-cctools-2.ebuild107
-rw-r--r--sys-devel/native-cctools/native-cctools-4.ebuild6
3 files changed, 5 insertions, 215 deletions
diff --git a/sys-devel/native-cctools/native-cctools-1.ebuild b/sys-devel/native-cctools/native-cctools-1.ebuild
deleted file mode 100644
index 6a61a8cee23..00000000000
--- a/sys-devel/native-cctools/native-cctools-1.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="3"
-
-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"
-
-LD_AIX_V=1
-
-KEYWORDS="~ppc-aix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-IUSE=""
-
-DEPEND="sys-devel/binutils-config"
-RDEPEND="${DEPEND}"
-
-src_install() {
- LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
- BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
-
- keepdir ${LIBPATH} || die
- dodir ${BINPATH} || die
-
- # 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}/ld-aix-${LD_AIX_V}")
- ;;
- *-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)
- if [[ ${CHOST} == *-darwin* ]] ; then
- rm -f ranlib
- cat <<-EOF > ranlib
- #!/usr/bin/env bash
- exec ${nativepath}/ranlib "\$@"
- EOF
- chmod 755 ranlib
- fi
-
- exeinto ${BINPATH}
- local wrapper source target
- for wrapper in "${wrappers[@]}" ; do
- source=${wrapper#*=}
- target=${wrapper%%=*}
- 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}
-}
diff --git a/sys-devel/native-cctools/native-cctools-2.ebuild b/sys-devel/native-cctools/native-cctools-2.ebuild
deleted file mode 100644
index 5bb62c15c22..00000000000
--- a/sys-devel/native-cctools/native-cctools-2.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="3"
-
-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"
-
-LD_AIX_V=2
-
-KEYWORDS="~ppc-aix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-IUSE=""
-
-DEPEND="sys-devel/binutils-config"
-RDEPEND="${DEPEND}"
-
-src_install() {
- LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
- BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
-
- keepdir ${LIBPATH} || die
- dodir ${BINPATH} || die
-
- # 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}/ld-aix-${LD_AIX_V}")
- ;;
- *-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)
- if [[ ${CHOST} == *-darwin* ]] ; then
- rm -f ranlib
- cat <<-EOF > ranlib
- #!/usr/bin/env bash
- exec ${nativepath}/ranlib "\$@"
- EOF
- chmod 755 ranlib
- fi
-
- exeinto ${BINPATH}
- local wrapper source target
- for wrapper in "${wrappers[@]}" ; do
- source=${wrapper#*=}
- target=${wrapper%%=*}
- 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}
-}
diff --git a/sys-devel/native-cctools/native-cctools-4.ebuild b/sys-devel/native-cctools/native-cctools-4.ebuild
index 83b7b29a353..e94fdaa2f60 100644
--- a/sys-devel/native-cctools/native-cctools-4.ebuild
+++ b/sys-devel/native-cctools/native-cctools-4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="3"
+EAPI="6"
inherit eutils
@@ -21,6 +21,10 @@ 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}