diff options
-rw-r--r-- | user/gambit-c/APKBUILD | 56 | ||||
-rw-r--r-- | user/gambit-c/fix-incompatible-stat-usage.patch | 21 | ||||
-rw-r--r-- | user/gambit-c/remove-non-ascii-character-from-gambit-txi.patch | 22 | ||||
-rw-r--r-- | user/gambit-c/reproducibility.patch | 52 |
4 files changed, 151 insertions, 0 deletions
diff --git a/user/gambit-c/APKBUILD b/user/gambit-c/APKBUILD new file mode 100644 index 000000000..cdd97763b --- /dev/null +++ b/user/gambit-c/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Zach van Rijn <me@zv.io> +# Maintainer: Zach van Rijn <me@zv.io> +pkgname=gambit-c +pkgver=4.9.4 +_pkgver=$(printf "%s" "${pkgver}" | tr . _) +pkgrel=0 +pkgdesc="An efficient implementation of the Scheme programming language." +url="https://gambitscheme.org/" +arch="all" +license="Apache-2.0" +depends="" +makedepends="openssl-dev texinfo gnu-ghostscript" +subpackages="$pkgname-dev $pkgname-doc" +source="https://gambitscheme.org/$pkgver/gambit-v${_pkgver}.tgz + fix-incompatible-stat-usage.patch + remove-non-ascii-character-from-gambit-txi.patch + reproducibility.patch + " +builddir="$srcdir/gambit-$pkgver" + +build() { + # https://github.com/gambit/gambit/issues/249 + export CFLAGS="${CFLAGS} --param max-gcse-memory=300000000"; + + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --enable-single-host \ + --enable-c-opt \ + --enable-dynamic-clib \ + --enable-debug-c-backtrace \ + --enable-gcc-opts \ + --enable-shared \ + --enable-versioned-shared-libs \ + --disable-absolute-shared-libs \ + --enable-openssl + make + make modules +} + +check() { + make check +} + +package() { + make -j1 DESTDIR="$pkgdir" install +} + +sha512sums="3471062618949fe4e1eba19ca3170b8334065797d0c2f440050520ebca2af8bb6d57d9434b1756e5d67d4d4ec108c8e6a0c2900f01d8a35b71c979d776995ab1 gambit-v4_9_4.tgz +a878994ea7c40b301d30b4d05879c335ad42e1ca8c25387556691192b6945276d6d6ff017ff568302558b23c42c61f223bddb3596b8203fbee8edbf4fdd9b813 fix-incompatible-stat-usage.patch +45336179d3f61fa3d70c3517f368fd8ccd744b5981c4bbc2091ed0016e10940c1b24dd58ee4c8d59637d89865a4c6f0ea80dc49a8859b7a900331fdb0e1efe49 remove-non-ascii-character-from-gambit-txi.patch +133ef5442c1bfe51e57caecd509c12cdecd86cfb941114a5038fad2c3e2bda1770fde7e367561039d523db5ea9cba5cebae7a9ed9daca699863267e7224f1ad6 reproducibility.patch" diff --git a/user/gambit-c/fix-incompatible-stat-usage.patch b/user/gambit-c/fix-incompatible-stat-usage.patch new file mode 100644 index 000000000..ed046a88c --- /dev/null +++ b/user/gambit-c/fix-incompatible-stat-usage.patch @@ -0,0 +1,21 @@ +Illegal option 's'. + +diff -ur a/doc/makefile.in b/doc/makefile.in +--- a/doc/makefile.in 2022-12-01 12:16:24.110528979 -0600 ++++ b/doc/makefile.in 2022-12-01 12:41:45.384526329 -0600 +@@ -129,14 +129,7 @@ + version.txi: stamp.vti + + stamp.vti: gambit.txi $(rootfromhere)/configure.ac +- # we need this mess because "date" and "stat" +- # don't behave the same on Linux and BSD +- st_mtime="`stat -s gambit.txi | sed -e 's/.*st_mtime=//g' -e 's/ .*//g'`"; \ +- if [ "$$st_mtime" = "" ]; then \ +- mtime="`date -r gambit.txi '+%B %d, %Y'`"; \ +- else \ +- mtime="`date -r $$st_mtime '+%B %d, %Y'`"; \ +- fi; \ ++ mtime="`date -r gambit.txi '+%B %d, %Y'`"; + echo "@set EDITION $(PACKAGE_VERSION)" > version.tmp; \ + echo "@set UPDATED $$mtime" >> version.tmp; \ + echo "@set VERSION $(PACKAGE_VERSION)" >> version.tmp diff --git a/user/gambit-c/remove-non-ascii-character-from-gambit-txi.patch b/user/gambit-c/remove-non-ascii-character-from-gambit-txi.patch new file mode 100644 index 000000000..6bee6b2a1 --- /dev/null +++ b/user/gambit-c/remove-non-ascii-character-from-gambit-txi.patch @@ -0,0 +1,22 @@ +From 9c01e39351ae958541b983961851a2474dabeb8d Mon Sep 17 00:00:00 2001 +From: Marc Feeley <feeley@iro.umontreal.ca> +Date: Tue, 4 Jan 2022 09:19:32 -0500 +Subject: [PATCH] Remove non-ASCII character from gambit.txi + +--- + doc/gambit.txi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/gambit.txi b/doc/gambit.txi +index 56187714b..a6a4caa90 100644 +--- a/doc/gambit.txi ++++ b/doc/gambit.txi +@@ -6658,7 +6658,7 @@ For example: + $ @b{gsi github.com/gambit/hello/demo @r{@i{# auto-install of github.com/gambit/hello package}}} + People customarily greet each other when they meet. + In English you can say: hello Bob, nice to see you! +-In French you can say: bonjour Bob, je suis enchanté! ++In French you can say: bonjour Bob, je suis enchant@'e! + Demo source code: /Users/feeley/.gambit_userlib/github.com/gambit/hello/@@/demo.scm + $ @b{gsi github.com/feeley/roman/demo @r{@i{# no auto-install because not on whitelist}}} + *** ERROR IN ##main -- No such file or directory diff --git a/user/gambit-c/reproducibility.patch b/user/gambit-c/reproducibility.patch new file mode 100644 index 000000000..1fa480e78 --- /dev/null +++ b/user/gambit-c/reproducibility.patch @@ -0,0 +1,52 @@ +https://salsa.debian.org/abdelq/gambc/-/blob/ca233c8bd3c8279e755e34287417aafe3c649629/debian/patches/reproducibility.patch + +Workaround for reproducibility issues +--- a/doc/makefile.in ++++ b/doc/makefile.in +@@ -70,7 +70,7 @@ + + MAKEINFO = makeinfo + TEXI2DVI = texi2dvi +-TEXI2HTML = ./texi2html ++TEXI2HTML = PERL_HASH_SEED=0 ./texi2html + PDF2PS = pdf2ps + + .SUFFIXES: +--- a/doc/texi2html ++++ b/doc/texi2html +@@ -2520,7 +2520,7 @@ + print $fh <<EOT; + $DOCTYPE + <html> +-$Texi2HTML::THISDOC{'copying_comment'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} ++$Texi2HTML::THISDOC{'copying_comment'}<!-- Created by $Texi2HTML::THISDOC{program} + $Texi2HTML::THISDOC{program_authors}--> + <head> + <title>$longtitle</title> +@@ -2543,7 +2543,7 @@ + sub T2H_DEFAULT_program_string() + { + my $user = $Texi2HTML::THISDOC{'user'}; +- my $date = $Texi2HTML::THISDOC{'today'}; ++ #my $date = $Texi2HTML::THISDOC{'today'}; + $user = '' if (!defined($user)); + $date = '' if (!defined($date)); + if (($user ne '') and ($date ne '')) +@@ -3137,7 +3137,7 @@ + print $fh <<EOT; + $DOCTYPE + <html> +-<!-- Created on $Texi2HTML::THISDOC{'today'} by $Texi2HTML::THISDOC{'program'} --> ++<!-- Created by $Texi2HTML::THISDOC{'program'} --> + <!-- + $Texi2HTML::THISDOC{'program_authors'} + --> +@@ -7403,7 +7403,7 @@ + sub t2h_default_address($$) + { + my $user = shift; +- my $date = shift; ++ #my $date = shift; + $user = '' if (!defined($user)); + $date = '' if (!defined($date)); + if (($user ne '') and ($date ne '')) |