Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

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