forked from eine/ghdl-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
50 lines (44 loc) · 1.13 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pkgname=ghdl-llvm-git
pkgver=0.37dev.git20190907
pkgrel=1
arch=('any')
pkgdesc='open-source analyzer, compiler and simulator for VHDL (LLVM backend)'
url='https://github.com/ghdl/ghdl'
license=(['GPLv2', 'custom'])
provides=('ghdl')
conflicts=('ghdl' 'ghdl-mcode-git' 'ghdl-gcc-git' 'ghdl-mcode' 'ghdl-llvm' 'ghdl-gcc')
makedepends=('gcc-ada' 'git' 'llvm<9' 'clang<9')
depends=('gcc' 'llvm-libs<9')
source=(
"ghdl::git://github.com/ghdl/ghdl.git"
)
sha512sums=(
'SKIP'
)
pkgver() {
cd "${srcdir}/ghdl"
# Date of the last git commit
_verdate=`git log -1 --date=short --pretty=format:%cd`
if `git describe --exact-match > /dev/null 2>&1` ; then
echo "`git describe --tags`.$_verdate" | sed 's/-//g'
else
git describe --tags --abbrev=10 | sed "s/\([!-]*\)-\(.*\)/\1.$_verdate.\2/g" | sed 's/-//g'
fi;
}
prepare() {
cp -vr "${srcdir}/ghdl/testsuite" "${startdir}/"
}
build() {
mkdir "${srcdir}/builddir"
cd "${srcdir}/builddir"
../ghdl/configure \
--prefix=/usr/ \
--with-llvm-config \
--enable-libghdl \
--enable-synth
make GNATMAKE="gnatmake -j$(nproc)"
}
package() {
cd "${srcdir}/builddir"
make DESTDIR="${pkgdir}" install
}