summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Prost-Boucle2016-11-27 22:37:42 +0100
committerAdrien Prost-Boucle2016-11-27 22:37:42 +0100
commit1e86cf8a79f64e43ab2480816785afb5451bed7b (patch)
treefeb8865973142329439abd25271341de9e0fa46a
parentc3d11487ffa4e5c3fb58f5b2b19bcdcec8d836d8 (diff)
downloadaur-1e86cf8a79f64e43ab2480816785afb5451bed7b.tar.gz
Fix compilation of VHDL libraries, which has changed upstream
-rw-r--r--.SRCINFO6
-rw-r--r--Makefile.patch20
-rw-r--r--PKGBUILD30
3 files changed, 50 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 78946df95b96..60c35036a44f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sun Oct 30 21:33:42 UTC 2016
+# Sun Nov 27 21:35:46 UTC 2016
pkgbase = ghdl-gcc-git
pkgdesc = VHDL simulator - GCC flavour
- pkgver = 0.34dev.git20161030
+ pkgver = 0.34dev.git20161119
pkgrel = 1
url = http://sourceforge.net/projects/ghdl-updates/
install = ghdl.install
@@ -21,10 +21,12 @@ pkgbase = ghdl-gcc-git
source = ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
source = ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.12.2.tar.bz2
source = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1.tar.gz
+ source = Makefile.patch
md5sums = SKIP
md5sums = 6f831b4d251872736e8e9cc09746f327
md5sums = e039bfcfb6c2ab039b8ee69bf883e824
md5sums = e34fca0540d840e5d0f6427e98c92252
+ md5sums = 5b0c20923b9fda2bd7f6caa6391bf125
pkgname = ghdl-gcc-git
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 000000000000..fa3b8bc0d210
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,20 @@
+--- Makefile
++++ Makefile
+@@ -331,7 +331,7 @@
+
+ ANALYZE_DEP:=ghdl_$(backend)$(EXEEXT)
+ GHDL=$(PWD)/$(ANALYZE_DEP)
+-ANALYZE_OPTS:=
++#ANALYZE_OPTS:=
+ ANALYZE:=$(GHDL) -a $(ANALYZE_OPTS) $(LIB_CFLAGS)
+
+ # TODO?: don't include, make it separate
+@@ -341,7 +341,7 @@
+ ifeq "$(backend)" "gcc"
+ # ghdl with gcc backend is already installed, no need to specify ghdl1
+ # (and we don't know where it is).
+- STD_GHDL_FLAGS=
++ #STD_GHDL_FLAGS=
+ else
+ # Specify ghdl1 path, as it is spawned by ghdl.
+ STD_GHDL_FLAGS=--GHDL1=$(PWD)/ghdl1-$(backend)$(EXEEXT)
diff --git a/PKGBUILD b/PKGBUILD
index d23f8d93e2e0..424165a2ed97 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# https://aur.archlinux.org/packages/ghdl/
pkgname=ghdl-gcc-git
-pkgver=0.34dev.git20161030
+pkgver=0.34dev.git20161119
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc='VHDL simulator - GCC flavour'
@@ -26,18 +26,20 @@ source=(
"ftp://ftp.gnu.org/gnu/gcc/gcc-${_gccver}/gcc-${_gccver}.tar.bz2"
"ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-${_islver}.tar.bz2"
"ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-${_cloogver}.tar.gz"
+ "Makefile.patch"
)
md5sums=(
'SKIP'
'6f831b4d251872736e8e9cc09746f327'
'e039bfcfb6c2ab039b8ee69bf883e824'
'e34fca0540d840e5d0f6427e98c92252'
+ '5b0c20923b9fda2bd7f6caa6391bf125'
)
pkgver() {
cd "${srcdir}/ghdl"
- # GHDL version (extracted from version.ads)
+ # GHDL version (extracted from version.in)
_distver=`sed -n -e 's/.*Ghdl_Ver .*"\(.*\)".*/\1/p' src/version.in | tr -d '-'`
# 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 -`
@@ -105,19 +107,39 @@ build() {
--enable-lto \
#--without-cloog --without-isl
+ # Build GHDL
make
+
+ # Some fixes to enable launching GHDL without installing it
+ cd "${srcdir}/ghdl"
+ patch -p0 -N -i "${startdir}"/Makefile.patch || true
+
+ # Build VHDL libraries
+ make \
+ GHDL="${srcdir}/gcc-build/gcc/ghdl" \
+ ANALYZE_OPTS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \
+ STD_GHDL_FLAGS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \
+ vhdl.libs.all libs.vhdl.standard
+
+ # Compile runtime stuff
+ make libgrt.a
}
package() {
+
+ # Install GHDL
cd "${srcdir}/gcc-build"
+ make DESTDIR="${pkgdir}" install
- # Make a full install
+ # Install VHDL libraries and runtime
+ cd "${srcdir}/ghdl"
make DESTDIR="${pkgdir}" install
# Remove gcc-specific files, keep only what is related to ghdl
+ cd "${srcdir}/gcc-build"
rm -rf "${pkgdir}"/usr/{share/{locale,gcc-${_gccver},man/man7},include}
find "${pkgdir}"/usr/lib \
- -maxdepth 1 -mindepth 1 -not -name 'gcc' \
+ -maxdepth 1 -mindepth 1 -not -name 'gcc' -not -name 'ghdl' \
-exec rm -rf '{}' +
find "${pkgdir}"/usr/lib/gcc/$(./gcc/xgcc -dumpmachine)/${_gccver} \
-maxdepth 1 -mindepth 1 -not -name 'vhdl' -not -name 'ghdl1' \