aboutsummaryrefslogtreecommitdiffstats
path: root/community/dtools/APKBUILD
blob: 11d39e9b7889b1fc78fb61d4d1b648057faaf607 (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
# Contributor: Mathias LANG <pro.mathias.lang@gmail.com>
# Maintainer: Mathias LANG <pro.mathias.lang@gmail.com>
#
# There are 4 'public' tools in the repository as of v2.098.0
# In addition, there are a few 'build' tools which could be
# useful (and can be trivially added if needed).
#
# Out of those 4 public tools, only 'dman' has heavy dependencies,
# as it rely on building dlang.org (and by extension DMD & co),
# so it is excluded from this package.
pkgname=dtools
pkgver=2.104.2
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="chrpath dmd"
source="tools-$pkgver.tar.gz::https://github.com/dlang/tools/archive/v$pkgver.tar.gz"
builddir="$srcdir/tools-$pkgver/"
options="!check" # todo

build() {
	msg "building rdmd"
	dmd -v -of=dtools-rdmd -L=--build-id rdmd.d

	for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
		msg "building $tool"
		./dtools-rdmd -v --compiler=dmd --build-only -of=dtools-"$(basename $tool)" $tool.d
	done
}

package() {
	for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
		install -Dm755 $pkgname-$tool -t "$pkgdir"/usr/bin
	done
	ln -s dtools-rdmd "$pkgdir"/usr/bin/rdmd
	ln -s dtools-dustmite "$pkgdir"/usr/bin/dustmite
	ln -s dtools-ddemangle "$pkgdir"/usr/bin/ddemangle
	chrpath -d "$pkgdir"/usr/bin/*
}

sha512sums="
a2dcece4a68e0f8791a04b5fc431e240f5052c66e0fc732bc52bbb0345e46d40dba83451123c8ea07ef517121b1831acb1e4e7e4bf501fc320382632bbb543db  tools-2.104.2.tar.gz
"