Advertisement
jorge_barroso

gdc-git PKGBUILD

Feb 28th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.34 KB | None | 0 0
  1. #! /bin/bash
  2. # Maintainer: Jorge Barroso <jorge.barroso.11@gmail.com>
  3. # Contributor: Shirakawasuna <Shirakawasuna@gmail.com>
  4.  
  5. pkgname=gdc-git
  6. pkgver=20130228
  7. pkgrel=1
  8. pkgdesc="GDC, Digital Mars D Programing Language (DMD) frontend for GCC"
  9. arch=('any')
  10. url="https://github.com/D-Programming-GDC/GDC"
  11. license=('GPL')
  12. depends=()
  13. makedepends=('git')
  14. provides=('gdc')
  15. replaces=('gdc-bin')
  16. conflicts=('gdc' 'gdc-tango' 'gdc1-tango-svn' 'gdc1-hg')
  17. source=()
  18. md5sums=()
  19.  
  20. _gitroot=git://github.com/D-Programming-GDC/GDC.git
  21. _gitname=gdc
  22.  
  23. build() {
  24.   cd "$srcdir"
  25.   msg "Connecting to GIT server...."
  26.  
  27.   if [[ -d "$_gitname" ]]; then
  28.     cd "$_gitname" && git pull origin
  29.     msg "The local files are updated."
  30.   else
  31.     git clone "$_gitroot" "$_gitname/dev" || return 1
  32.     cd $_gitname/dev
  33.     git checkout gdc-4.7 || return 1
  34.   fi
  35.  
  36.   msg "GIT checkout done or server timeout"
  37.   msg "Starting build..."
  38.   cd $srcdir/$_gitname
  39.   wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-4.7.2/gcc-4.7.2.tar.bz2
  40.   tar xvjf gcc-4.7.2.tar.bz2
  41.     cd dev
  42.     ./setup-gcc.sh ../gcc-4.7.2 || return 1
  43.     mkdir ../objdir
  44. cd ../objdir
  45. ../gcc-4.7.2/configure --prefix=/usr \
  46.       --libdir=/usr/lib --libexecdir=/usr/lib \
  47.       --mandir=/usr/share/man --infodir=/usr/share/info \
  48.       --with-bugurl=http://gdcproject.org/bugzilla \
  49.       --enable-languages=d \
  50.       --enable-shared --enable-threads=posix \
  51.       --with-system-zlib --enable-__cxa_atexit \
  52.       --disable-libunwind-exceptions --enable-clocale=gnu \
  53.       --disable-libstdcxx-pch --enable-libstdcxx-time \
  54.       --enable-gnu-unique-object --enable-linker-build-id \
  55.       --with-ppl --enable-cloog-backend=isl \
  56.       --disable-ppl-version-check --disable-cloog-version-check \
  57.       --enable-lto --enable-gold --enable-ld=default \
  58.       --enable-plugin --with-plugin-ld=ld.gold \
  59.       --with-linker-hash-style=gnu \
  60.       --disable-multilib --disable-libssp \
  61.       --disable-build-with-cxx --disable-build-poststage1-with-cxx \
  62.       --enable-nls \
  63.       --enable-checking=release \
  64.       --enable-checking=yes || return 1
  65. make -j2 2>&1 | tee build.log ||return 1                           # insert your number of cores in the -j argument
  66. }
  67.  
  68. package() {
  69.  
  70. make DESTDIR="$pkgdir/" install ||return 1
  71. export PATH=$PATH:/opt/gdc/bin
  72. }
  73.  
  74. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement