diff options
Diffstat (limited to 'community/dmd/APKBUILD')
-rw-r--r-- | community/dmd/APKBUILD | 92 |
1 files changed, 42 insertions, 50 deletions
diff --git a/community/dmd/APKBUILD b/community/dmd/APKBUILD index ef0f9c88fce..824ae0c0d0f 100644 --- a/community/dmd/APKBUILD +++ b/community/dmd/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Mathias LANG <pro.mathias.lang@gmail.com> # Maintainer: Mathias LANG <pro.mathias.lang@gmail.com> pkgname=dmd -pkgver=2.098.0 -pkgrel=0 +pkgver=2.104.2 +pkgrel=1 pkgdesc="D Programming Language reference compiler" url="https://github.com/dlang/dmd" # TODO: Enable on x86 once LDC-1.20.1 is out (and enabled on x86) @@ -10,76 +10,68 @@ arch="x86_64" license="BSL-1.0" depends="llvm-libunwind-dev tzdata" makedepends="chrpath ldc" -checkdepends="bash diffutils gdb grep" +subpackages="$pkgname-doc" source="dmd-$pkgver.tar.gz::https://github.com/dlang/dmd/archive/v$pkgver.tar.gz - druntime-$pkgver.tar.gz::https://github.com/dlang/druntime/archive/v$pkgver.tar.gz - phobos-$pkgver.tar.gz::https://github.com/dlang/phobos/archive/v$pkgver.tar.gz + phobos-$pkgver.tar.gz::https://github.com/dlang/phobos/archive/v$pkgver.tar.gz - dmd-install-config.conf - 10-dmd-musl.patch - - 0008-Remove-failing-tests-with-llvm-libunwind.patch - " + dmd-install-config.conf + lfs64.patch + 10-dmd-musl.patch + " +builddir="$srcdir" +options="!check" # todo prepare() { # The Makefiles make some assumption about the directory structure ln -s "$srcdir/dmd-$pkgver/" "$srcdir/dmd" - ln -s "$srcdir/druntime-$pkgver/" "$srcdir/druntime" ln -s "$srcdir/phobos-$pkgver/" "$srcdir/phobos" - builddir="$srcdir" default_prepare } build() { - # Note: The CI was running into OOM while building this package - # See community/ldc and keep in sync with it - case "$CARCH" in x86*) - export MAKEFLAGS="$MAKEFLAGS -j$((JOBS<4 ? JOBS : 4))" - export DFLAGS="$DFLAGS -lowmem" - ;; - esac - - # Compile with the host compiler - make -C "$srcdir/dmd/" -f posix.mak HOST_DMD=ldmd2 ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install - make -C "$srcdir/druntime/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install - make -C "$srcdir/phobos/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install - - # Stage 2: Self-compile - Avoid depending on the exact LDC version used to compile this - make -C "$srcdir/dmd/" -f posix.mak HOST_DMD="$srcdir/stage1/linux/bin64/dmd" ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install - make -C "$srcdir/druntime/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install - make -C "$srcdir/phobos/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install + export HOST_DMD="ldmd2" - # Strip redundant rpath to avoid warnings in the builder - chrpath -d "$srcdir/install/linux/bin64/dmd" -} + local generated="$builddir"/dmd/generated + + cd "$builddir"/dmd + mkdir generated + ldmd2 -ofgenerated/build -g compiler/src/build.d -release -O + generated/build BUILD=release HOST_DMD="$HOST_DMD" CXX="c++" ENABLE_RELEASE=1 DFLAGS="$DFLAGS" dmd -v $MAKEFLAGS + + cd "$builddir"/dmd/druntime + make -f posix.mak DMD="$generated"/linux/release/*/dmd BUILD=release ENABLE_RELEASE=1 PIC=1 -check() { - export HOST_DMD=ldmd2 - ldmd2 -run "$srcdir/dmd/src/build.d" test -# TODO: This currently does not pass - Some Druntime work needed -# make -C "$srcdir/druntime-$pkgver/" -f posix.mak unittest -# make -C "$srcdir/phobos-$pkgver/" -f posix.mak unittest + cd "$builddir"/phobos + make -f posix.mak DMD="$generated"/linux/release/*/dmd BUILD=release ENABLE_RELEASE=1 PIC=1 + + cd "$builddir"/dmd/compiler + make -C docs DMD="$HOST_DMD" + + # Strip redundant rpath to avoid warnings in the builder + chrpath -d "$builddir"/dmd/generated/linux/release/64/dmd } package() { - mkdir -p "$pkgdir/usr/bin/" "$pkgdir/usr/lib/" "$pkgdir/etc/" "$pkgdir/usr/include/dmd/" + mkdir -p "$pkgdir"/usr/lib/ "$pkgdir"/usr/include/dmd/phobos/ + + install -Dm755 dmd/generated/linux/release/64/dmd -t "$pkgdir"/usr/bin/ + install -Dm644 dmd-install-config.conf "$pkgdir"/etc/dmd.conf - mv "$srcdir"/install/linux/bin64/dmd "$pkgdir"/usr/bin/dmd - cp "$srcdir"/dmd-install-config.conf "$pkgdir"/etc/dmd.conf - mv "$srcdir"/install/linux/lib64/* "$pkgdir"/usr/lib/ + install -Dm644 dmd/generated/docs/man/man1/dmd.1 -t "$pkgdir"/usr/share/man/man1/ + install -Dm644 dmd/generated/docs/man/man5/* -t "$pkgdir"/usr/share/man/man5/ - mv "$srcdir"/install/src/druntime/import/ "$pkgdir"/usr/include/dmd/druntime - mv "$srcdir"/install/src/phobos/ "$pkgdir"/usr/include/dmd/phobos/ + install -Dm755 phobos/generated/linux/release/64/*.so* -t "$pkgdir"/usr/lib/ + install -Dm755 phobos/generated/linux/release/64/*.a -t "$pkgdir"/usr/lib/ - chmod +x "$pkgdir"/usr/bin/dmd + cp -r phobos/etc phobos/std phobos/*.d "$pkgdir"/usr/include/dmd/phobos/ + cp -r dmd/druntime/import "$pkgdir"/usr/include/dmd/druntime } sha512sums=" -9d232e2b7b006c6ac20c16aeef95658301bec76a93f82bb8555235b8d4911bc1947b0d57709739c1945dc7a3921e11a0fbe7970b455bd84add9245906058b4fc dmd-2.098.0.tar.gz -183f95eb972e43f52b39d3f51fcdbf8a20006244ecb213a09886a18e9b3dd658625f5d0fc95cc86e7a343ab5d96298de4ff11320715879da01af203199c1749f druntime-2.098.0.tar.gz -fd59f4214ab4100726b22192b8b5a68a0438f0d8f39c1ad4c27419efb3e6f660dfd0751d414572f198eec94781e4ea30769aeb47a27e9577942537ff3201ff1f phobos-2.098.0.tar.gz +1da67bdce9cf27e99e39803fb78e48c86f74b1b881d8a903e37e615331cc988a01ab2026a03350858f98335f518ba2ee0eaa337488cf8c380ef66635f367fa09 dmd-2.104.2.tar.gz +e04691f917267e3d9aa91b2a4a242bd969e572cb598e256a78d4f34e946097d4b97a87d7d2f30a480491d1a2c6eed40c6a138b95d3a4250d9e8267b5811ba789 phobos-2.104.2.tar.gz 123ec0f256a73030a5e5b4b87a7f2e0752320777b7fcd175a221807ec2917f5d6d88776c3448eab077eb7a2211dd4a3d64e3a556053b0f183eb058da437bc5da dmd-install-config.conf -3e0c33114c27b570a992fb6a9cbab8a4b4acf394a6fb9012c66d5bb9573e1d20c97f76ccfc1eda9cb750ed27372c71b40a7b4247eaa51f8a24b59a1b9f06e37c 10-dmd-musl.patch -54246e757487244a7131072d484fbf4c31ca76546f867124466b98f2c3b4d2c82dff1ce53a0fbd94614d1ccac4be4903d14d461f9b267cf8060fcb08ddd675a9 0008-Remove-failing-tests-with-llvm-libunwind.patch +c8e7de8bc9c43f4ae488cfc35355db2e6cff4278749016631acb2a8c1a2594f8d7ffb9c9a8a6cc2b64e006e9e51d865db3f3a78d05bbdb487f75e415f309d2b8 lfs64.patch +928874c8a6acc593f2ac54b785ff551bc16b53ec647c4c7e19b5f19d609f02b200e550d1ee3d024bf969ef417b705c3448ce590adbe9a113a03e9372718a0f55 10-dmd-musl.patch " |