[arch-commits] Commit in mlton/trunk (PKGBUILD)

Alexander Rødseth arodseth at gemini.archlinux.org
Wed Nov 3 20:09:00 UTC 2021


    Date: Wednesday, November 3, 2021 @ 20:09:00
  Author: arodseth
Revision: 1035651

upgpkg: mlton 20210117-2

Modified:
  mlton/trunk/PKGBUILD

----------+
 PKGBUILD |   38 ++++++++++++--------------------------
 1 file changed, 12 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-03 19:42:51 UTC (rev 1035650)
+++ PKGBUILD	2021-11-03 20:09:00 UTC (rev 1035651)
@@ -1,4 +1,4 @@
-# Maintainer: Alexander F Rødseth <xyproto at archlinux.org>
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
 # Contributor: Michael Koloberdin <koloberdin at gmail.com>
 # Contributor: tochiro at no.spam.mail.berlios.de
 # Contributor: Andreas W. Hauser <andy-aur at splashground.de>
@@ -6,7 +6,7 @@
 
 pkgname=mlton
 pkgver=20210117
-pkgrel=1
+pkgrel=2
 pkgdesc='Whole-program, optimizing Standard ML compiler'
 arch=(x86_64)
 # no HTTPS available
@@ -13,38 +13,24 @@
 url='http://mlton.org/'
 license=(BSD LGPL MIT)
 depends=(gmp)
-makedepends=(git mlton)
+makedepends=(git mlton setconf)
 options=(staticlibs)
-source=("git+https://github.com/MLton/mlton#tag=on-$pkgver-release")
-b2sums=('SKIP')
+source=("git+https://github.com/MLton/mlton#commit=b1f1f0f0916d28c0d183fba85549d5bf96f1fa41") # tag: on-20210117-release
+b2sums=(SKIP)
 
-# Make dependencies for bootstrapping mlton on x86_64:
-#makedepends_x86_64=('smlnj' 'setconf')
-
 prepare() {
   cd $pkgname
-
-  sed 's/_BSD_SOURCE/_DEFAULT_SOURCE/g' -i runtime/cenv.h
-
-  # For bootstrapping mlton on x86_64
-  #if [ $CARCH = 'x86_64' ]; then
-  #  find . -name Makefile -type f -exec setconf {} CFLAGS "$CFLAGS -fPIC" \;
-  #fi
+  setconf Makefile.config RELEASE true
+  make MLTON_VERSION="$pkgver" version
 }
 
 build() {
-  export CFLAGS="$CFLAGS -fPIC"
-  export COMPILE_ARGS="-codegen c -cc-opt '-fPIC'"
+  make -C $pkgname
+}
 
-  # For bootstrapping mlton on x86_64
-  #if [ "$CARCH" = 'x86_64' ]; then
-  #  # Bootstrap with SML-NJ on x86_64
-  #  make -C "$pkgname" -j1 smlnj-mlton all-no-docs
-  #else
-  #  make -C "$pkgname" -j1 all-no-docs
-  #fi
-
-  make -C $pkgname -j1
+check() {
+  echo 'print("42");' > test.sml
+  $pkgname/build/bin/mlton test.sml && x=$(./test) && test $x -eq 42
 }
 
 package() {



More information about the arch-commits mailing list