[aur-general] gdc & gdc-svn

Tobias Kieslich tobias at justdreams.de
Tue May 6 16:42:02 EDT 2008


Okay it just built and finished okay, but as I said the pathes are effed
up. You also might wanna change the pkgver from the gcc to the gdc
version, and change the respecting variables in the PKGBUILD. However,
have fun with it :P

	-T
-------------- next part --------------
# Contributor: Tobias Kieslich [tobias.archlinux.org]

pkgname=gdc
pkgver=4.1.2
_gdcver=0.24
pkgrel=1
pkgdesc="The D Frontend for the GNU Compiler"
arch=(i686)
url="http://gcc.gnu.org"
license=('GPL')
# this is a bogus dependency but signals it builds with newer versions of gcc installed
depends=('gcc>=4.3.1')
provides=('d-gdc' 'd-compiler')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2 \
        http://dl.sourceforge.net/sourceforge/dgcc/${pkgname}-${_gdcver}-src.tar.bz2 \
       )
options=(!libtool !emptydirs)

build() {
  export MAKEFLAGS="-j1"
  cd ${startdir}/src/gcc-${pkgver}
  # prepare the d sources
  mv ../d ./gcc
  ./gcc/d/setup-gcc.sh || return 1


  # gcc 4.1.x doesn't support -mtune=
  CFLAGS=$(echo $CFLAGS|sed 's/-mtune=\S*//')

  # lib64->lib
  if [ "${CARCH}" = "x86_64" ]; then
    patch -Np1 -i ../gcc_pure64.patch || return 1
  fi

  # Don't install libiberty
  sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
  # Don't run fixincludes
  sed -i -e 's@\./fixinc\.sh at -c true@' gcc/Makefile.in

  mkdir build
  cd build
  ../configure --prefix=/usr --enable-languages=d \
    --libdir=/usr/lib --includedir=/usr/include/gdc \
    --with-gxx-include-dir=/usr/include/gdc \
    --libexecdir=/usr/lib --with-system-zlib --mandir=/usr/share/man \
    --disable-nls --disable-multilib --disable-shared --with-local-prefix=/usr \
    --disable-libssp --disable-libiberty --disable-libmudflap \
    --enable-threads=posix --enable-clocale=gnu

  make bootstrap || return 1
  make all-target-libphobos || return 1

  make DESTDIR=${startdir}/pkg install-target-libphobos
  cd gcc
  make DESTDIR=${startdir}/pkg lang.install-normal lang.install-common lang.install-man

  # isn't picked by the phobos make targets :(  ...
  install -Dm 755 cc1d ${startdir}/pkg/usr/lib/gcc/${CHOST}/${pkgver}/cc1d
}


More information about the aur-general mailing list