summaryrefslogtreecommitdiff
path: root/pcr/gcc-gcj/PKGBUILD
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2012-11-19 16:36:33 -0200
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2012-11-19 16:36:33 -0200
commiteb742544b8af9e99209dcf3fac82916df504a5b4 (patch)
tree1e7c8290c9a7a95045398a30a2702ebbfbbb72c4 /pcr/gcc-gcj/PKGBUILD
parent1c468b79b50fc6c3de26dd08d05010303fadada6 (diff)
parentb8de81d47176637dfd7b9dca164ceea8afe52b56 (diff)
downloadabslibre-eb742544b8af9e99209dcf3fac82916df504a5b4.tar.gz
abslibre-eb742544b8af9e99209dcf3fac82916df504a5b4.tar.bz2
abslibre-eb742544b8af9e99209dcf3fac82916df504a5b4.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/gcc-gcj/PKGBUILD')
-rw-r--r--pcr/gcc-gcj/PKGBUILD83
1 files changed, 83 insertions, 0 deletions
diff --git a/pcr/gcc-gcj/PKGBUILD b/pcr/gcc-gcj/PKGBUILD
new file mode 100644
index 000000000..7ed03b889
--- /dev/null
+++ b/pcr/gcc-gcj/PKGBUILD
@@ -0,0 +1,83 @@
+# Contributor: Renan Manola <rmanola@gmail.com>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Based on a modified version of the gcc PKGBUILD
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=gcc-gcj
+pkgver=4.7.2
+pkgrel=2
+pkgdesc="The GNU Compiler for Java"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL')
+url="http://gcc.gnu.org"
+depends=("gcc=$pkgver" 'gtk2' 'file' 'zip' 'libsm' 'libxtst' 'alsa-lib' 'libart-lgpl')
+makedepends=('binutils>=2.20.1' 'mpfr>=2.4.2-2' 'cloog>=0.16.2-1' 'elfutils'
+ 'libmpc>=0.8.2-2' 'jack')
+options=('!libtool')
+install=$pkgname.install
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 libjava-sjlj.dpatch gcc_pure64.patch)
+md5sums=('cc308a0891e778cfda7a151ab8a6e762'
+ 'afe3541abf5ce163223f94ccdbc66e30'
+ 'ced48436c1b3c981d721a829f1094de1')
+
+build() {
+ cd ${srcdir}/gcc-${pkgver}
+
+ # Do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ chmod +x ${srcdir}/*.dpatch
+ ${srcdir}/libjava-sjlj.dpatch -patch
+
+ echo ${pkgver} > gcc/BASE-VER
+
+ [ -d build ] || mkdir build
+ if [ "${CARCH}" = "x86_64" ]; then
+ patch -p1 < $srcdir/gcc_pure64.patch
+ fi
+ cd build
+
+ ../configure --prefix=/usr --enable-shared --enable-languages=java \
+ --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info \
+ --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib \
+ --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch \
+ --with-tune=generic --enable-java-awt=gtk --with-java-home="$JAVA_HOME" \
+ --enable-libgcj-multifile --disable-plugin --with-system-zlib
+ make
+}
+
+package() {
+ cd ${srcdir}/gcc-${pkgver}/build
+ make -j1 DESTDIR=${pkgdir} install-target-libjava
+
+ cd gcc
+ make -j1 DESTDIR=${pkgdir} java.install-common java.install-man
+
+ install -m755 jc1 ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/
+ install -m755 jvgenmain ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/
+
+ # Remove files which belong to the base gcc package
+ rm -f ${pkgdir}/usr/bin/{c,g}++
+ if [ "${CARCH}" = "x86_64" ]; then
+ rm -f ${pkgdir}/usr/bin/x86_64-unknown-linux-gnu-{c,g}++
+ else
+ rm -f ${pkgdir}/usr/bin/i686-pc-linux-gnu-{c,g}++
+ fi
+ rm -f ${pkgdir}/usr/man/man1/g++.*
+ # Rename two files to not conflict to classpath
+ mv ${pkgdir}/usr/share/info/cp-tools.info ${pkgdir}/usr/share/info/cp-tools-gcj.info
+ rm ${pkgdir}/usr/share/info/dir
+ mv ${pkgdir}/usr/share/man/man1/gjdoc.1 ${pkgdir}/usr/share/man/man1/gjdoc.gcj.1
+
+ find ${pkgdir}/usr/lib -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
+
+ linkdir=`basename $pkgdir/usr/lib/gcj-${pkgver}*`
+ ln -sf $linkdir ${pkgdir}/usr/lib/gcj-${pkgver%.?}
+ ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-${pkgver%.?}.jar
+ ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj.jar
+ ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools-${pkgver%.?}.jar
+ ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools.jar
+}