aboutsummaryrefslogtreecommitdiffstats
path: root/community/ldc/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ldc/APKBUILD')
-rw-r--r--community/ldc/APKBUILD107
1 files changed, 53 insertions, 54 deletions
diff --git a/community/ldc/APKBUILD b/community/ldc/APKBUILD
index 60cbc10cfd8..f949525012c 100644
--- a/community/ldc/APKBUILD
+++ b/community/ldc/APKBUILD
@@ -1,17 +1,32 @@
# Contributor: Mathias LANG <pro.mathias.lang@gmail.com>
# Maintainer: Mathias LANG <pro.mathias.lang@gmail.com>
pkgname=ldc
-pkgver=1.29.0
-pkgrel=1
-_llvmver=14
+pkgver=1.33.0
+pkgrel=0
+_llvmver=15
pkgdesc="The LLVM-based D Compiler"
url="https://github.com/ldc-developers/ldc"
# LDC does not support host compiling on most of the architecture Alpine supports
arch="x86_64 aarch64"
license="BSD-3-Clause AND BSL-1.0 AND ( Artistic-1.0 OR GPL-2.0-or-later ) AND NCSA AND MIT"
-depends="llvm-libunwind-dev tzdata $pkgname-static=$pkgver-r$pkgrel"
-makedepends="chrpath cmake curl-dev diffutils gdmd llvm$_llvmver-dev llvm$_llvmver-static
- libedit-dev samurai zlib-dev"
+depends="
+ $pkgname-static=$pkgver-r$pkgrel
+ llvm-libunwind-dev
+ tzdata
+ "
+makedepends="
+ chrpath
+ clang
+ cmake
+ curl-dev
+ diffutils
+ gdmd
+ libedit-dev
+ llvm$_llvmver-dev
+ llvm$_llvmver-static
+ samurai
+ zlib-dev
+ "
checkdepends="bash gdb grep llvm$_llvmver-test-utils"
# A user might want to install the '-runtime' subpackage when they have
# a dynamically-linked D program.
@@ -22,17 +37,19 @@ subpackages="
$pkgname-bash-completion
"
source="https://github.com/ldc-developers/ldc/releases/download/v$pkgver/ldc-$pkgver-src.tar.gz
- arm.patch
- musl.patch
+ lfs64.patch
"
builddir="$srcdir/ldc-$pkgver-src/"
build() {
- # Note: The CI was running into OOM while building this package
- # See https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/14364#note_122336
- case "$CARCH" in x86_64)
- export SAMUFLAGS="$SAMUFLAGS -j$((JOBS < 16 ? JOBS : 16))"
- export DFLAGS="$DFLAGS -lowmem"
+ # use less memory to not oom
+ export CC=clang
+ export CXX=clang++
+
+ case "$CARCH" in
+ aarch64)
+ export CFLAGS="${CFLAGS/-fstack-clash-protection}"
+ export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"
;;
esac
@@ -61,17 +78,9 @@ build() {
ninja
# Build the test runners
- # Use of `-L--export-dynamic` is needed so that exceptions work correctly
- # (namely: function names should be available without debug infos).
- ninja all-test-runners
-
- # CMake added the rpaths to the shared libs (of stage1!) - strip them
- chrpath -d "$builddir"/lib/*.so*
- chrpath -d \
- "$builddir"/bin/ldc2 \
- "$builddir"/bin/ldmd2 \
- "$builddir"/bin/ldc-build-runtime \
- "$builddir"/bin/ldc-prune-cache
+ if want_check; then
+ ninja all-test-runners
+ fi
}
check() {
@@ -79,18 +88,17 @@ check() {
export LD_LIBRARY_PATH="$builddir"/lib
case "$CARCH" in
- # Math & numeric related tests fail due to https://github.com/ldc-developers/ldc/issues/3270#issuecomment-613132406
- # druntime-test-thread fails due to https://github.com/ldc-developers/ldc/issues/3403
- aarch64)
- _tests_ignore="|core\.thread\.fiber|std.*math.*|std\.numeric.*|std\.format|std\.algorithm\.sorting.*|druntime-test-thread|std\.complex.*"
- ;;
- # https://github.com/ldc-developers/ldc/issues/3404
- x86)
- _tests_ignore="|druntime-test-thread"
- ;;
+ # Math & numeric related tests fail due to https://github.com/ldc-developers/ldc/issues/3270#issuecomment-613132406
+ # druntime-test-thread fails due to https://github.com/ldc-developers/ldc/issues/3403
+ aarch64)
+ _tests_ignore="|core\.thread\.fiber|std.*math.*|std\.numeric.*|std\.format|std\.algorithm\.sorting.*|druntime-test-thread|std\.complex.*"
+ ;;
+ # https://github.com/ldc-developers/ldc/issues/3404
+ x86)
+ _tests_ignore="|druntime-test-thread"
+ ;;
esac
-
# Note: The testsuite does not parallelize well, as the 'clean' target get run in parallel.
# Hence '-j${JOBS}' was left out on purpose
#
@@ -114,43 +122,34 @@ check() {
# Link: https://github.com/ldc-developers/druntime/blob/8e135b4e978975b24536e2a938801a29b39dc9f6/src/rt/lifetime.d#L1250
# However this unittest is AFAICS unrelated to the two tests,
# and either succeed or isn't run on its own.
- ctest --output-on-failure -E "dmd-testsuite|lit-tests|druntime-test-exceptions|druntime-test-shared|druntime-test-stdcpp|druntime-test-cycles|druntime-test-gc$_tests_ignore"
+ ctest --output-on-failure -E "std.datetime.timezone*|dmd-testsuite|lit-tests|druntime-test-exceptions|druntime-test-shared|druntime-test-stdcpp|druntime-test-cycles|druntime-test-gc$_tests_ignore"
}
package() {
- # Use -j1, the install is flaky with too many build jobs
- DESTDIR="$pkgdir" ninja -j1 install
+ DESTDIR="$pkgdir" cmake --install .
+
+ # CMake added the rpaths to the shared libs (of stage1!) - strip them
+ chrpath -d "$pkgdir"/usr/lib/*.so* "$pkgdir"/usr/bin/*
mkdir -p "$pkgdir"/usr/share/bash-completion
mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
}
runtime() {
- depends="libexecinfo-dev"
pkgdesc="Dynamic runtime library for D code compiled with $pkgname-$pkgver"
+ depends=
- mkdir -p "$subpkgdir/usr/lib/"
- for libn in "libdruntime" "libphobos2";
- do
- mv "$pkgdir"/usr/lib/$libn-ldc-shared.so* "$subpkgdir/usr/lib/"
+ for libn in libdruntime libphobos2; do
+ amove usr/lib/$libn-ldc-shared.so*
done
# As of LDC v1.28.0, JIT is not supported for LLVM >= 12
# https://github.com/ldc-developers/ldc/blob/v1.28.0/CMakeLists.txt#L452
#mv "$pkgdir"/usr/lib/libldc-jit.so* "$subpkgdir/usr/lib"
- mv "$pkgdir"/usr/lib/*.so* "$subpkgdir/usr/lib/"
-}
-
-static() {
- depends="libexecinfo-static"
- pkgdesc="$pkgdesc (static library)"
-
- mkdir -p "$subpkgdir/usr/lib/"
- mv "$pkgdir"/usr/lib/*.a "$subpkgdir/usr/lib/"
+ amove usr/lib/*.so*
}
sha512sums="
-f8a1e23150b84ef31d3616b9be8ca4c1a64df2b3f26fbedb1119a7d2d3dacad10cd86b6b9bf79728c8c725213f8f7ae88acdeb7a0d9e2f3f5068857f97c39a7e ldc-1.29.0-src.tar.gz
-6288960d2550a8561f37a698b01efb276503380ec2c6c2a6260637b8edf5816d4ce036b5911e7b0bf10fd34f162da2af040f628a12017a2321125e60f45319c5 arm.patch
-d3d01765e8a33e19604016f20957df712c72701ac222171fb57ca47b270cd27a056525a63da11abfdc0e2c76b8bdc3f322df5a98511ca04e1753fc1ae1aec97e musl.patch
+ef5a42934e24caf947b63ef29a62205b07b539a59292266877f2d5f5ecf06272e1fc3ca83772d02eda203e4b166fbcea788b804740b8780b07a4643e4b51bf70 ldc-1.33.0-src.tar.gz
+068ab2b4f2f4c43ca3b68a7b6adabefd7ee32e9ace272a5e0146d5afd4b37d90dd5d44f838bdb08313445de40b8701fbf19bf265e26c6c4f3a33a8cf3dbbeab1 lfs64.patch
"