diff options
author | Adrien Prost-Boucle | 2015-12-02 23:59:41 +0100 |
---|---|---|
committer | Adrien Prost-Boucle | 2015-12-02 23:59:41 +0100 |
commit | ef3e39e922420d09ad5ccff9e6aa4bef6bd38472 (patch) | |
tree | 1c4175e296b74e458e4528fa87a7588879e8757d | |
download | aur-ef3e39e922420d09ad5ccff9e6aa4bef6bd38472.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 130 | ||||
-rw-r--r-- | ghdl.install | 20 |
3 files changed, 177 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6f09be03c799 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = ghdl-gcc-git + pkgdesc = VHDL simulator - GCC flavour + pkgver = 0.34dev.git20151127 + pkgrel = 1 + url = http://sourceforge.net/projects/ghdl-updates/ + install = ghdl.install + arch = i686 + arch = x86_64 + license = GPLv2 + makedepends = gcc-ada + makedepends = git + provides = ghdl + conflicts = ghdl + conflicts = ghdl-hg + options = !emptydirs + options = staticlibs + source = ghdl::git://github.com/tgingold/ghdl.git + source = ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2 + source = http://isl.gforge.inria.fr/isl-0.12.2.tar.bz2 + source = http://www.bastoul.net/cloog/pages/download/cloog-0.18.1.tar.gz + md5sums = SKIP + md5sums = 4df8ee253b7f3863ad0b86359cd39c43 + md5sums = e039bfcfb6c2ab039b8ee69bf883e824 + md5sums = e34fca0540d840e5d0f6427e98c92252 + +pkgname = ghdl-gcc-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..434d8870570b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,130 @@ +# Maintainer: Adrien Prost-Boucle <adrien.prost-boucle@laposte.net> +# This PKGBUILD file is inspired from the package ghdl +# https://aur.archlinux.org/packages/ghdl/ + +pkgname=ghdl-gcc-git +pkgver=0.34dev.git20151127 +pkgrel=1 +arch=('i686' 'x86_64') +pkgdesc='VHDL simulator - GCC flavour' +url='http://sourceforge.net/projects/ghdl-updates/' +license=('GPLv2') + +provides=('ghdl') +conflicts=('ghdl' 'ghdl-hg') +makedepends=('gcc-ada' 'git') +install=ghdl.install +options=(!emptydirs staticlibs) + +_gccver=4.9.2 +_islver=0.12.2 +_cloogver=0.18.1 + +source=( + #"ghdl::git://git.code.sf.net/p/ghdl-updates/ghdl-updates.git" + "ghdl::git://github.com/tgingold/ghdl.git" + "ftp://ftp.gnu.org/gnu/gcc/gcc-${_gccver}/gcc-${_gccver}.tar.bz2" + "http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2" + "http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz" +) +md5sums=( + 'SKIP' + '4df8ee253b7f3863ad0b86359cd39c43' + 'e039bfcfb6c2ab039b8ee69bf883e824' + 'e34fca0540d840e5d0f6427e98c92252' +) + +pkgver() { + cd "${srcdir}/ghdl" + + # GHDL version (extracted from version.ads) + _distver=`sed -n -e 's/.*GHDL \([0-9.a-z]*\) (.*/\1/p' src/version.ads` + # Date of the last git commit + _gitver=`git log -n 1 --date=short | sed -n -e 's/.*Date:\s*\([0-9-]*\).*/\1/p' | tr -d -` + + echo $_distver.git$_gitver; +} + +prepare() { + # Note: Nothing to do in the ghdl directory + #cd "${srcdir}/ghdl" + + cd "${srcdir}/gcc-${_gccver}" + # link isl/cloog for in-tree builds + ln -sf ../isl-${_islver} isl + ln -sf ../cloog-${_cloogver} cloog + + # Do not run fixincludes - FIXME Why? + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # Arch Linux installs x86_64 libraries in /lib + [[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 +} + +build() { + cd "${srcdir}/ghdl" + + # FIXME Why should Fortify be disabled? + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + + # Using -pipe causes spurious test-suite failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 + CFLAGS=${CFLAGS/-pipe/} + CXXFLAGS=${CXXFLAGS/-pipe/} + + # Optional: Use makepkg config for debug mode (see your /etc/makepkg.conf) + #CFLAGS=${DEBUG_CFLAGS/-pipe/} + #CXXFLAGS=${DEBUG_CXXFLAGS/-pipe/} + + ./configure --prefix=/usr \ + --with-gcc="${srcdir}/gcc-${_gccver}" + + make copy-sources + + # Optional: remove all previously built stuff + rm -rf "${srcdir}/gcc-build" + + mkdir -p "${srcdir}/gcc-build" + cd "${srcdir}/gcc-build" + + "${srcdir}"/gcc-${_gccver}/configure --prefix=/usr \ + --libdir=/usr/lib --libexecdir=/usr/lib \ + --mandir=/usr/share/man --infodir=/usr/share/info \ + --disable-bootstrap \ + --enable-languages=vhdl \ + --enable-shared --enable-threads=posix \ + --with-system-zlib --enable-__cxa_atexit \ + --disable-libunwind-exceptions --enable-clocale=gnu \ + --disable-libstdcxx-pch --disable-libssp \ + --enable-gnu-unique-object --enable-linker-build-id \ + --enable-cloog-backend=isl \ + --enable-plugin --enable-install-libiberty \ + --with-linker-hash-style=gnu \ + --disable-multilib --disable-werror \ + --enable-checking=release \ + --enable-lto \ + #--without-cloog --without-isl + + make +} + +package() { + cd "${srcdir}/gcc-build" + + # Make a full install + make DESTDIR="${pkgdir}" install + + # Remove gcc-specific files, keep only what is related to ghdl + rm -rf "${pkgdir}"/usr/{share/{locale,gcc-${_gccver},man/man7},include} + find "${pkgdir}"/usr/lib \ + -maxdepth 1 -mindepth 1 -not -name 'gcc' \ + -exec rm -rf '{}' + + find "${pkgdir}"/usr/lib/gcc/$(./gcc/xgcc -dumpmachine)/${_gccver} \ + -maxdepth 1 -mindepth 1 -not -name 'vhdl' -not -name 'ghdl1' \ + -exec rm -rf '{}' + + find "${pkgdir}"/usr/bin \ + "${pkgdir}"/usr/share/man/man1 \ + "${pkgdir}"/usr/share/info \ + -maxdepth 1 -mindepth 1 -not -name 'ghdl*' \ + -exec rm -rf '{}' + +} diff --git a/ghdl.install b/ghdl.install new file mode 100644 index 000000000000..b7c5d1859405 --- /dev/null +++ b/ghdl.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(ghdl.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} |