diff options
Diffstat (limited to 'community/chez-scheme/APKBUILD')
-rw-r--r-- | community/chez-scheme/APKBUILD | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/community/chez-scheme/APKBUILD b/community/chez-scheme/APKBUILD new file mode 100644 index 00000000000..669a5a2a68f --- /dev/null +++ b/community/chez-scheme/APKBUILD @@ -0,0 +1,88 @@ +# Contributor: Will Sinatra <wpsinatra@gmail.com> +# Maintainer: Will Sinatra <wpsinatra@gmail.com> +pkgname=chez-scheme +# XXX: Upgrades require rebuilding community/idris2 & community/idris2-stage0 +pkgver=10.0.0 +_realver=${pkgver%%[a-z]} +pkgrel=0 +pkgdesc="Cisco R6RS Scheme Compiler" +url="https://github.com/cisco/ChezScheme" +arch="all" +license="Apache-2.0" +makedepends="util-linux-dev ncurses-dev libx11-dev zlib-dev lz4-dev" +subpackages="$pkgname-doc" +source="https://github.com/cisco/ChezScheme/releases/download/v$pkgver/csv$pkgver.tar.gz + check-expected::https://raw.githubusercontent.com/cisco/ChezScheme/v$pkgver/.github/workflows/summarytest-some-fast + + 0001-add-configuration-for-s390x-and-related-to-c-version.patch + 0002-configure-Fix-flags-handling-for-pb-little-endian-ta.patch + disable-iconv-tests.patch" +builddir="$srcdir"/csv$pkgver + +# Only run the testsuite on x86_64. +case "$CARCH" in +x86_64) ;; +*) options="!check" ;; +esac + +case "$CARCH" in + x86) _chez_host=ti3le ;; + x86_64) _chez_host=ta6le ;; + arm*) _chez_host=tarm32le ;; + aarch64) _chez_host=tarm64le ;; + riscv64) _chez_host=trv64le ;; + ppc64le) _chez_host=tpb64l ;; + s390x) _chez_host=tpb64b ;; +esac + +prepare() { + default_prepare + + # Ensure we don't use vendored zlib/lz4 versions. + rm -r zlib lz4 +} + +build() { + ./configure \ + --installprefix=/usr \ + --installman=/usr/share/man \ + --nogzip-man-pages \ + --temproot=$pkgdir \ + --machine=$_chez_host \ + --installschemename="chez" \ + --installscriptname="chez-script" \ + ZLIB="$(pkg-config --libs zlib)" LZ4="$(pkg-config --libs liblz4)" + make +} + +check() { + # Only run a subset of the test suite, otherwise the test + # take several hours to complete on some architectures. + make test-some-fast + + # The `make test` command does not exit with a non-zero exit + # status when test fail (see BUILDING). For this reason, we + # compare the summary file here. This is also the approach + # taken by ChezScheme for their GitHub CI configuration. + diff -q "$srcdir"/check-expected "$_chez_host"/mats/summary +} + +package() { + make install DESTDIR="$pkgdir" + + # Remove pre-compiled example programs (reduces package size). + rm -f "$pkgdir"/usr/lib/csv$_realver/examples/*.so + + # Move examples to -doc subpackage. + mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ + mv "$pkgdir"/usr/lib/csv$_realver/examples \ + "$pkgdir"/usr/share/doc/$pkgname/ +} + +sha512sums=" +094298744bd69033366305330d660299023c5bc5776df86f28af119f9f4cddc463366fc8f955084463137b6186843fcd34026d2714b932baa4841d6522a8dd92 csv10.0.0.tar.gz +cdf845795cf06506b7af21d68325cb4d72044b6179bf2f827c658a3668657da353fe6006a576db52bc1bd737adc9e8971aa08b8ffa81a28b4e7a3df8dadc32b0 check-expected +5ae1ed10d0640f39fce71fad9dfc7d0bec67876a5c3b93f903118de0e6535ff97091d6ad523b4886755733ac165aa150f277d064eb22c7cd27577e4c362e5d3b 0001-add-configuration-for-s390x-and-related-to-c-version.patch +ea5284028556de815c404143bf2106d4c373ed0c46f5f47a71257f39e52f3e82639b2721d8cdf56b0bc886c97dfcc2464efab326640abf885e57654828cb0a3f 0002-configure-Fix-flags-handling-for-pb-little-endian-ta.patch +c1177eedfd562593f2be664c4f0643b7cbe7d4ff0d9e994acbf226739f26f76d32f3b8f3024067e44536eb0e1edcff9a2daa3b61e05dfcd0e04b7430a3097503 disable-iconv-tests.patch +" |