blob: a3708534695edd619ffb0319879fa888ce745d38 (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# $Id: PKGBUILD 113509 2014-06-24 12:12:02Z dicebot $
# Maintainer: Mihails Strasuns <public@dicebot.lv>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgname=('ldc' 'liblphobos-devel')
groups=('dlang' 'dlang-ldc')
pkgver=0.13.0
epoch=1
pkgrel=1
pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2"
arch=('i686' 'x86_64')
url="https://github.com/ldc-developers/ldc"
license=('BSD')
depends=('libconfig')
makedepends=('git' 'cmake' 'llvm')
source=("git://github.com/ldc-developers/ldc.git#tag=v${pkgver}"
"ldc2.conf"
"ldc2.rebuild.conf"
)
sha1sums=('SKIP'
'e4e2c9656a24a2433cfb00f792abdc247a845b46'
'0e6e5e072ccc006a200a8fc918cb1ebeb2e12b7b'
)
build() {
cd $srcdir/ldc
git submodule update --init --recursive
mkdir build && cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINCLUDE_INSTALL_DIR=/usr/include/dlang/ldc \
..
make
}
package_ldc() {
depends=('liblphobos-devel')
backup=("etc/ldc2.conf"
"etc/ldc2.rebuild.conf"
)
provides=("d-compiler")
# binaries
install -D -m755 $srcdir/ldc/build/bin/ldmd2 $pkgdir/usr/bin/ldmd2
install -D -m755 $srcdir/ldc/build/bin/ldc2 $pkgdir/usr/bin/ldc2
# supplementaries
install -D -m644 $srcdir/ldc/bash_completion.d/ldc $pkgdir/usr/share/bash-completion/completions/ldc
# licenses
install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
# default configuration files
install -D -m644 $srcdir/ldc2.conf $pkgdir/etc/ldc2.conf
install -D -m644 $srcdir/ldc2.rebuild.conf $pkgdir/etc/ldc2.rebuild.conf
}
package_liblphobos-devel() {
provides=("d-runtime" "d-stdlib")
options=("staticlibs")
# libraries
install -D -m644 $srcdir/ldc/build/lib/libphobos-ldc.a $pkgdir/usr/lib/liblphobos.a
install -D -m644 $srcdir/ldc/build/lib/libphobos-ldc-debug.a $pkgdir/usr/lib/liblphobos-debug.a
# imports
mkdir -p $pkgdir/usr/include/dlang/ldc
cp -r $srcdir/ldc/build/import/* $pkgdir/usr/include/dlang/ldc/
cp -r $srcdir/ldc/runtime/phobos/std $pkgdir/usr/include/dlang/ldc/
cp -r $srcdir/ldc/runtime/phobos/etc $pkgdir/usr/include/dlang/ldc/
# licenses
install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
|