sources/gdc/PKGBUILD
author Anders Bergh <anders1@gmail.com>
Fri, 21 Dec 2007 09:29:05 +0100
changeset 11 664cc1efa89d
permissions -rw-r--r--
add gdc (but it's not really working) add llvm add dmd.conf to backup array in libphobos remove ./configure from luafilsystem
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     1
# Contributor: Anders Bergh <anders1@gmail.com>
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     2
pkgname=gdc
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     3
pkgver=0.24
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     4
_gccver=4.1.2
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     5
pkgrel=1
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     6
pkgdesc="The D programming language - GCC frontend"
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     7
arch=('i686' 'x86_64')
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     8
url="http://dgcc.sourceforge.net/"
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
     9
license=('GPL')
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    10
groups=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    11
depends=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    12
makedepends=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    13
provides=('d-gdc' 'd-compiler')
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    14
conflicts=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    15
replaces=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    16
backup=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    17
options=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    18
install=
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    19
source=(http://downloads.sourceforge.net/dgcc/$pkgname-$pkgver-src.tar.bz2
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    20
        ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_gccver}/gcc-core-${_gccver}.tar.bz2
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    21
        gcc_pure64.patch)
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    22
noextract=()
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    23
md5sums=() #generate with 'makepkg -g'
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    24
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    25
build() {
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    26
  cd "$startdir/src/gcc-${_gccver}"
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    27
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    28
  cp -r "$startdir/src/d" gcc
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    29
  ./gcc/d/setup-gcc.sh || return 1
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    30
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    31
  # gcc 4.1.x doesn't support -mtune=
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    32
  CFLAGS=$(echo $CFLAGS|sed 's/-mtune=\S*//')
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    33
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    34
  # lib64->lib
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    35
  if [ "${CARCH}" = "x86_64" ]; then
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    36
    patch -Np1 -i ../gcc_pure64.patch || return 1
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    37
  fi
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    38
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    39
  # Don't run fixincludes
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    40
  sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    41
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    42
  ./configure --prefix=/usr --enable-languages=d  \
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    43
    --libdir=/usr/lib/gdc --includedir=/usr/include/d/${_gccver} \
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    44
    --with-gxx-include-dir=/usr/include/d/${_gccver} \
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    45
    --libexecdir=/usr/lib/gdc --with-system-zlib \
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    46
    --disable-nls --disable-multilib --disable-shared --with-local-prefix=/usr \
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    47
    --disable-libssp --disable-libiberty --disable-libmudflap
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    48
  make || return 1
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    49
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    50
  cd host-$CHOST/gcc
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    51
  make DESTDIR=$startdir/pkg lang.install-normal lang.install-common lang.install-man
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    52
  install -Dm 755 cc1d $startdir/pkg/usr/lib/gcc/${CHOST}/${_gccver}
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    53
}
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    54
664cc1efa89d add gdc (but it's not really working)
Anders Bergh <anders1@gmail.com>
parents:
diff changeset
    55
# vim:set ts=2 sw=2 et: