[mlton] MLton is too big for polyml, so bootstrap arm, armhfp, ppc, ppc64 with mlton
Adam Goode
agoode at fedoraproject.org
Sat Apr 27 20:59:05 UTC 2013
commit f06493701d8e23a1f4a024d44bc548cd0625c84e
Author: Adam Goode <adam at spicenitz.org>
Date: Fri Apr 26 23:10:19 2013 -0400
MLton is too big for polyml, so bootstrap arm, armhfp, ppc, ppc64 with mlton
- Don't use htmldoc anymore, it often crashes
- Remove max-heap workaround
.gitignore | 4 +
mlton-20100608-generated.patch |25434 ----------------------------------------
mlton.spec | 52 +-
sources | 4 +
4 files changed, 43 insertions(+), 25451 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9a7145e..d8d4f54 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
/mlton-20100608.src.tgz
+/mlton-20100608.ppc.tar.xz
+/mlton-20100608.ppc64.tar.xz
+/mlton-20100608.arm.tar.xz
+/mlton-20100608.armhfp.tar.xz
diff --git a/mlton.spec b/mlton.spec
index 21f8dbf..1e6b053 100644
--- a/mlton.spec
+++ b/mlton.spec
@@ -1,4 +1,8 @@
+%ifarch %{arm} ppc ppc64
%global mlton_bootstrap 1
+%else
+%global mlton_bootstrap 0
+%endif
Name: mlton
Version: 20100608
@@ -17,16 +21,18 @@ Patch3: mlton-20100608-ppc64-platform.patch
BuildRequires: gmp-devel tex(latex)
-%if %{mlton_bootstrap}
-# generated from a system with mlton installed using ./generate-additional-mlton-source.sh
-Patch100: mlton-%{version}-generated.patch
-BuildRequires: polyml
-%else
+%if !%{mlton_bootstrap}
BuildRequires: mlton
%endif
Requires: gmp-devel gcc
+# bootstrap sources
+Source100: %{name}-%{version}.ppc.tar.xz
+Source101: %{name}-%{version}.ppc64.tar.xz
+Source102: %{name}-%{version}.arm.tar.xz
+Source103: %{name}-%{version}.armhfp.tar.xz
+
# filter out false dependencies
%{?filter_setup:
@@ -65,23 +71,34 @@ multiprecision library, and lots of useful libraries.
%patch3 -p1
%if %{mlton_bootstrap}
-# create bootstrap directory
-cd ..
-cp -av %{name}-%{version} %{name}-%{version}-bootstrap
+# unpack the architecture specific bootstrap binary
+
+%ifarch ppc
+%setup -T -D -q -a 100
+%endif
+
+%ifarch ppc64
+%setup -T -D -q -a 101
+%endif
+
+%if %{_target_cpu} == armv5tel
+%setup -T -D -q -a 102
+%endif
+
+%if %{_target_cpu} == armv7hl
+%setup -T -D -q -a 103
+%endif
-# add generated files
-cd %{name}-%{version}-bootstrap
-%patch100 -p1
+# replace lib variable with correct path
+sed -i 's/\(^lib=\).*$/\1\$MLTON_BOOTSTRAP_DIR\/%{_lib}\/mlton/g' \
+ usr/bin/mlton
%endif
%build
%if %{mlton_bootstrap}
-# build the polyml-based bootstrap!
-cd ../%{name}-%{version}-bootstrap
-make dirs runtime polyml-mlton basis-no-check script mlbpathmap constants libraries tools
-export PATH=$PATH:$(pwd)/build/bin
-cd ../%{name}-%{version}
+export MLTON_BOOTSTRAP_DIR=$(pwd)/usr
+export PATH="${PATH}":$MLTON_BOOTSTRAP_DIR/bin
%endif
make OPTFLAGS="$RPM_OPT_FLAGS"
@@ -104,7 +121,8 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/mlton/sml/ckit-lib/regression
%changelog
-* Thu Apr 25 2013 Adam Goode <adam at spicenitz.org> - 20100608-17
+* Sat Apr 27 2013 Adam Goode <adam at spicenitz.org> - 20100608-17
+- MLton is too big for polyml, so bootstrap arm, armhfp, ppc, ppc64 with mlton
- Don't use htmldoc anymore, it often crashes
- Remove max-heap workaround
diff --git a/sources b/sources
index 59227cc..c244d96 100644
--- a/sources
+++ b/sources
@@ -1 +1,5 @@
8c53b68492a8aa41de06d35dc0e9d8fa mlton-20100608.src.tgz
+87e3ced9fc2f0a896860bd63c232af4b mlton-20100608.ppc.tar.xz
+e86ad7f99c4215bafa514ec59b2feba8 mlton-20100608.ppc64.tar.xz
+92cec8e47a7088f623c71cfbd18a9f2a mlton-20100608.arm.tar.xz
+11b388835ce21da2ec70ee851f0d547a mlton-20100608.armhfp.tar.xz
More information about the scm-commits
mailing list