# Contributor: Mathias LANG # Maintainer: Mathias LANG pkgname=dub pkgver=1.33.1 pkgrel=2 pkgdesc="Package and build management system for D" url="https://code.dlang.org/" arch="x86_64 aarch64" license="MIT" depends="libcurl" makedepends="chrpath ldc bash curl-dev" subpackages="$pkgname-zsh-completion $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/dlang/dub/archive/v$pkgver.tar.gz" # pass on edge but fail on 3.16(edge) .. [ "$CARCH" = "aarch64" ] && options="$options !check" build() { # Default abuild.conf has '-Os' which gdmd doesn't support # Since we later build the man pages using dub, make it persistent export DFLAGS="" # The build script needs a DMD-like interface to pass its arguments, so use ldmd2 DMD=ldmd2 GITVER="v$pkgver" ldc2 -run "$builddir/build.d" # Build man pages "$builddir/bin/dub" --compiler=ldc2 --single scripts/man/gen_man.d # Remove redundant rpath chrpath -d "$builddir/bin/dub" } check() { bin/dub test } package() { install -s -D "$builddir/bin/dub" "$pkgdir/usr/bin/dub" install -Dm644 "$builddir/scripts/zsh-completion/_dub" "$pkgdir/usr/share/zsh/site-functions/_dub" mkdir -p "$pkgdir/usr/share/man/man1/" cp "$builddir"/scripts/man/*.1 "$pkgdir/usr/share/man/man1/" } sha512sums=" 8b380272244a9820b3c94545632c6125b2e51423a8832b25aed8f616c860bbcc42682c07cd84a08f3ac85c9a321b0cf70e35ab26d4f6d673b025f357912509ab dub-1.33.1.tar.gz "