kde-frameworks/prison: metadata whitespace
[gentoo.git] / sys-devel / kgcc64 / kgcc64-5.4.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=4
5
6 case ${CHOST} in
7         hppa*)    CTARGET=hppa64-${CHOST#*-};;
8         mips*)    CTARGET=${CHOST/mips/mips64};;
9         powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
10         s390*)    CTARGET=${CHOST/s390/s390x};;
11         sparc*)   CTARGET=${CHOST/sparc/sparc64};;
12         i?86*)    CTARGET=x86_64-${CHOST#*-};;
13 esac
14 export CTARGET
15 TOOLCHAIN_ALLOWED_LANGS="c"
16 GCC_TARGET_NO_MULTILIB=true
17
18 PATCH_VER="1.0"
19 GCC_FILESDIR=${FILESDIR/${PN}/gcc}
20
21 inherit eutils toolchain
22
23 DESCRIPTION="64bit kernel compiler"
24
25 # Works on mips and sparc; all other archs, refer to bug #228115
26 KEYWORDS="hppa ~mips"
27
28 RDEPEND=">=dev-libs/gmp-4.3.2
29         >=dev-libs/mpfr-2.4.2
30         >=dev-libs/mpc-0.8.1
31         >=sys-devel/gcc-config-1.4"
32 # unlike every other target, hppa has not unified the 32/64 bit
33 # ports in binutils yet
34 DEPEND="${RDEPEND}
35         hppa? ( sys-devel/binutils-hppa64 )
36         !sys-devel/gcc-hppa64
37         !sys-devel/gcc-mips64
38         !sys-devel/gcc-powerpc64
39         !sys-devel/gcc-sparc64
40         >=sys-apps/texinfo-4.8
41         >=sys-devel/bison-1.875"
42
43 pkg_postinst() {
44         toolchain_pkg_postinst
45
46         cd "${ROOT}"/usr/bin
47         local x
48         for x in gcc cpp ; do
49                 cat <<-EOF >${CTARGET%%-*}-linux-${x}
50                 #!/bin/sh
51                 exec ${CTARGET}-${x} "\$@"
52                 EOF
53                 chmod a+rx ${CTARGET%%-*}-linux-${x}
54         done
55 }