Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 30th, 2011  |  syntax: None  |  size: 3.32 KB  |  views: 149  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Renan Manola <rmanola@gmail.com>
  2. # Based on a modified version of the gcc PKGBUILD
  3.  
  4. pkgname=('gcc-gcj')
  5. pkgver=4.6.2
  6. pkgrel=1
  7. pkgdesc="The GNU Compiler for Java"
  8. arch=('i686' 'x86_64')
  9. license=('GPL' 'LGPL')
  10. url="http://gcc.gnu.org"
  11. depends=('gcc=4.6.2' 'gtk2' 'file' 'zip' 'libsm' 'libxtst' 'alsa-lib' 'gcc-gcj-ecj'
  12.          'libart-lgpl')
  13. makedepends=('binutils>=2.20.1' 'mpfr>=2.4.2-2' 'cloog>=0.16.2-1' 'elfutils'
  14.              'libmpc>=0.8.2-2' 'jack')
  15. options=('!libtool')
  16. source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,java}-${pkgver}.tar.bz2
  17.         gcc_pure64.patch
  18.         gcc-hash-style-both.patch
  19.     libjava-disable-static.dpatch
  20.     libjava-sjlj.dpatch)
  21.  
  22. build() {
  23.   cd ${srcdir}/gcc-${pkgver}
  24.  
  25.   # Do not install libiberty
  26.   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
  27.  
  28.   # Do not run fixincludes
  29.   sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
  30.  
  31.   if [ "${CARCH}" = "x86_64" ]; then
  32.     patch -Np1 -i ../gcc_pure64.patch
  33.   fi
  34.   patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
  35.  
  36.   chmod +x ${srcdir}/*.dpatch
  37.   ${srcdir}/libjava-disable-static.dpatch -patch
  38.   ${srcdir}/libjava-sjlj.dpatch -patch
  39.  
  40.   echo ${pkgver} > gcc/BASE-VER
  41.  
  42.   [ -d build] || mkdir build
  43.  
  44.   cd build
  45.   ../configure --prefix=/usr --enable-shared \
  46.       --enable-languages=java \
  47.       --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info \
  48.       --enable-__cxa_atexit  --disable-multilib --libdir=/usr/lib \
  49.       --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch \
  50.       --with-tune=generic --enable-java-awt=gtk --with-java-home="$JAVA_HOME" \
  51.       --enable-libgcj-multifile --with-ecj-jar=/usr/share/java/eclipse-ecj.jar \
  52.       --disable-plugin --with-system-zlib
  53.   make
  54.   make -j1 DESTDIR=${pkgdir} install-target-libjava
  55.  
  56.   cd gcc
  57.   make -j1 DESTDIR=${pkgdir} java.install-common java.install-man
  58.  
  59.   install -m755 jc1 ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/
  60.   install -m755 jvgenmain ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/
  61.  
  62.   # Remove files which belong to the base gcc package
  63.   rm -f ${pkgdir}/usr/bin/{c,g}++
  64.   if [ "${CARCH}" = "x86_64" ]; then
  65.     rm -f ${pkgdir}/usr/bin/x86_64-unknown-linux-gnu-{c,g}++
  66.    else
  67.     rm -f ${pkgdir}/usr/bin/i686-pc-linux-gnu-{c,g}++
  68.   fi
  69.   rm -f ${pkgdir}/usr/man/man1/g++.*
  70.  
  71.   find ${pkgdir}/usr/lib -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
  72.  
  73.   linkdir=`basename $pkgdir/usr/lib/gcj-${pkgver}*`
  74.   ln -sf $linkdir ${pkgdir}/usr/lib/gcj-4.6
  75.   ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-4.6.jar
  76.   ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj.jar
  77.   ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools-4.6.jar
  78.   ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools.jar
  79. }
  80.  
  81. # I added the name of the files at the end of each filename #
  82.  
  83. md5sums=('780f614ab18c7a9066dec6387d7490b2' # gcc-core-4.6.2 #
  84.          '87ecd60431e41096419dd8a10f76e46b'  # gcc-g++-4.6.2 #
  85.          '52de580642d7092b7b2790d9a81ab7a6' # gcc-java-4.6.2 #
  86.          '4030ee1c08dd1e843c0225b772360e76'  # gcc_pure64.patch #
  87.          'dce3162ff4f4eafab0daccf01ad2d2de' # gcc-hash-style-both.patch#
  88.          'e5e13a1815b676b66e119c7f46550a90'  # libjava-disable-static.dpatch #
  89.          'afe3541abf5ce163223f94ccdbc66e30') # libjava-sjlj.dpatch #
  90.