sys-devel/kgcc64: restore valid ebuild
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 14 Mar 2020 10:04:17 +0000 (10:04 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 14 Mar 2020 10:04:36 +0000 (10:04 +0000)
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/712454
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
sys-devel/kgcc64/kgcc64-9.3.0-r1.ebuild [new file with mode: 0644]
sys-devel/kgcc64/kgcc64-9.3.0.ebuild [deleted file]

diff --git a/sys-devel/kgcc64/kgcc64-9.3.0-r1.ebuild b/sys-devel/kgcc64/kgcc64-9.3.0-r1.ebuild
new file mode 100644 (file)
index 0000000..9f78de9
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+case ${CHOST} in
+       hppa*)    CTARGET=hppa64-${CHOST#*-};;
+       mips*)    CTARGET=${CHOST/mips/mips64};;
+       powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
+       s390*)    CTARGET=${CHOST/s390/s390x};;
+       sparc*)   CTARGET=${CHOST/sparc/sparc64};;
+       i?86*)    CTARGET=x86_64-${CHOST#*-};;
+esac
+export CTARGET
+TOOLCHAIN_ALLOWED_LANGS="c"
+GCC_TARGET_NO_MULTILIB=true
+
+PATCH_VER="1"
+inherit toolchain
+
+DESCRIPTION="64bit kernel compiler"
+
+# Works on hppa and mips; all other archs, refer to bug #228115
+KEYWORDS="~hppa ~mips"
+
+# unlike every other target, hppa has not unified the 32/64 bit
+# ports in binutils yet
+DEPEND="
+       hppa? ( sys-devel/binutils-hppa64 )
+       !sys-devel/gcc-hppa64
+       !sys-devel/gcc-mips64
+       !sys-devel/gcc-powerpc64
+       !sys-devel/gcc-sparc64"
+
+pkg_postinst() {
+       toolchain_pkg_postinst
+
+       cd "${ROOT}"/usr/bin
+       local x
+       for x in gcc cpp ; do
+               cat <<-EOF >${CTARGET%%-*}-linux-${x}
+               #!/bin/sh
+               exec ${CTARGET}-${x} "\$@"
+               EOF
+               chmod a+rx ${CTARGET%%-*}-linux-${x}
+       done
+}
diff --git a/sys-devel/kgcc64/kgcc64-9.3.0.ebuild b/sys-devel/kgcc64/kgcc64-9.3.0.ebuild
deleted file mode 100644 (file)
index ecdde41..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 1999-2020 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 ~sh ~sparc ~x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-       elibc_glibc? ( >=sys-libs/glibc-2.13 )
-       >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
-       PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi