aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dtools/APKBUILD
blob: e1f804cc7182646e112120973a5b47697a29fa2a (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
# Contributor: Mathias LANG <pro.mathias.lang@gmail.com>
# Maintainer: Mathias LANG <pro.mathias.lang@gmail.com>
pkgname=dtools
pkgver=2.088.1
pkgrel=0
pkgdesc="Ancillary tools for the D programming language compiler"
url="https://github.com/dlang/tools"
arch="x86_64"
license="BSL-1.0"
makedepends="ldc ldc-static"
subpackages="$pkgname-ddemangle $pkgname-rdmd"
source="tools-$pkgver.tar.gz::https://github.com/dlang/tools/archive/v$pkgver.tar.gz"
builddir="$srcdir/tools-$pkgver/"

build() {
	ldmd2 -O -release "$builddir/ddemangle.d" -od"$builddir" -ofddemangle
	ldmd2 -O -release "$builddir/rdmd.d" -od"$builddir" -ofrdmd
}

check() {
	ldmd2 -run "$builddir/rdmd_test.d" --rdmd-default-compiler=ldmd2 "$builddir/rdmd"
}

package() {
	depends="$pkgname-ddemangle $pkgname-rdmd"

	install -s -D "$builddir/ddemangle" "$pkgdir/usr/bin/ddemangle"
	install -s -D "$builddir/rdmd" "$pkgdir/usr/bin/rdmd"
}

ddemangle() {
	mkdir -p "$subpkgdir/usr/bin/"
	mv "$pkgdir/usr/bin/ddemangle" "$subpkgdir/usr/bin/ddemangle"
}

rdmd() {
	mkdir -p "$subpkgdir/usr/bin/"
	mv "$pkgdir/usr/bin/rdmd" "$subpkgdir/usr/bin/rdmd"
}

sha512sums="288739656404e345e683e6692a6478a03af8455d3e3ad56d3ba22e1d7d9cb1e5156f70116e4444138c798bfa28cf4b38263b6cd32a8d2483417e8ae51192ea65  tools-2.088.1.tar.gz"