summaryrefslogtreecommitdiffstats
path: root/main/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'main/gcc')
-rw-r--r--main/gcc/APKBUILD61
1 files changed, 39 insertions, 22 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index ae6af04ba..5d05b5a2f 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -7,7 +7,7 @@ _specs_gcc_ver=4.4.3
_uclibc_abiver=0.9.32
-pkgrel=1
+pkgrel=2
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
@@ -15,33 +15,40 @@ license="GPL LGPL"
depends="binutils libgcc libgomp libobjc"
makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip
cloog-dev"
-subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp $pkgname-go
- libgo"
+subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp"
replaces="libstdc++"
if [ -n "$BOOTSTRAP" ]; then
LANG_OBJC=off
LANG_JAVA=off
+ LANG_FORTRAN=off
fi
+_languages=c,c++
if [ "$LANG_OBJC" != "off" ]; then
subpackages="$subpackages libobjc"
+ _languages="$_languages,objc"
fi
if [ "$LANG_JAVA" != "off" ]; then
subpackages="$subpackages $pkgname-java libgcj"
makedepends="$makedepends paxctl"
+ _languages="$_languages,java"
fi
if [ "$LANG_GO" != "off" ]; then
+ subpackages="$subpackages $pkgname-go libgo"
_languages="$_languages,go"
- fi
-
-
+fi
+if [ "$LANG_FORTRAN" != "off" ]; then
+ subpackages="$subpackages gfortran libgfortran"
+ _languages="$_languages,fortran"
+fi
source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-g++-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-java-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-fortran-$pkgver.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-4.6.1-piepatches-v${_piepatchver}.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-$_specs_gcc_ver-specs-$_specs_ver.tar.bz2
ftp://sourceware.org/pub/java/ecj-latest.jar
@@ -124,7 +131,7 @@ prepare() {
}
build() {
- local _languages= _dynamic_linker=
+ local _dynamic_linker=
cd "$_gccdir"
export CFLAGS="-fno-stack-protector"
[ -z "$CBUILD" ] && CBUILD="$CHOST"
@@ -141,21 +148,6 @@ build() {
;;
esac
- _languages=c,c++
- # we can disable OBJC with LANG_OBJC=off
- if [ "$LANG_OBJC" != "off" ]; then
- _languages=$_languages,objc
- fi
-
- # and disable java with LANG_JAVA=off
- if [ "$LANG_JAVA" != "off" ]; then
- _languages="$_languages,java"
- fi
-
- if [ "$LANG_GO" != "off" ]; then
- _languages="$_languages,go"
- fi
-
# --enable-target-optspace is broken on powerpc
if [ "$CARCH" != "powerpc" ]; then
_target_optspace="--enable-target-optspace"
@@ -356,11 +348,36 @@ go() {
"$subpkgdir"/usr/lib/ || return 1
}
+libgfortran() {
+ pkgdesc="Fortran runtime library for GCC"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
+}
+
+gfortran() {
+ pkgdesc="GNU Fortran Compiler"
+ local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
+ local gcclibs=usr/lib/gcc/${CHOST:-$_chost}/$pkgver
+ mkdir -p "$subpkgdir"/$libexec \
+ "$subpkgdir"/$gcclibs \
+ "$subpkgdir"/usr/lib \
+ "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/usr/lib/libgfortran.a \
+ "$pkgdir"/usr/lib/libgfortran.so \
+ "$subpkgdir"/usr/lib/ || return 1
+ mv "$pkgdir"/$libexec/f951 \
+ "$subpkgdir"/$libexec
+ mv "$pkgdir"/$gcclibs/libgfortranbegin.a \
+ "$subpkgdir"/$gcclibs
+}
+
md5sums="780f614ab18c7a9066dec6387d7490b2 gcc-core-4.6.2.tar.bz2
87ecd60431e41096419dd8a10f76e46b gcc-g++-4.6.2.tar.bz2
94043cc0d08394eddebed73f30ecad89 gcc-objc-4.6.2.tar.bz2
52de580642d7092b7b2790d9a81ab7a6 gcc-java-4.6.2.tar.bz2
0b7bdd9bd3096075f035fa9def33c314 gcc-go-4.6.2.tar.bz2
+216ecc8dbf99a562e837c48b5c4e7979 gcc-fortran-4.6.2.tar.bz2
5dc7efd84b526801b94fed21462aea62 gcc-4.6.1-piepatches-v0.4.5.tar.bz2
441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar