summaryrefslogtreecommitdiff
path: root/dev-lang/mlton
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
commit5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch)
tree66e860a5099bcad013f1cf667255dc372a7c11b3 /dev-lang/mlton
parent7218e1b46bceac05841e90472501742d905fb3fc (diff)
gentoo resync : 20.03.2021
Diffstat (limited to 'dev-lang/mlton')
-rw-r--r--dev-lang/mlton/Manifest9
-rw-r--r--dev-lang/mlton/files/mlton-20070826-no-execmem.patch29
-rw-r--r--dev-lang/mlton/files/mlton-20130715-no-PIE.patch66
-rw-r--r--dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch11
-rw-r--r--dev-lang/mlton/mlton-20130715.ebuild119
-rw-r--r--dev-lang/mlton/mlton-20180207.ebuild13
6 files changed, 9 insertions, 238 deletions
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest
index 08c659755b81..2ea39c405493 100644
--- a/dev-lang/mlton/Manifest
+++ b/dev-lang/mlton/Manifest
@@ -1,13 +1,6 @@
-AUX mlton-20070826-no-execmem.patch 1236 BLAKE2B 1d708bba547f8ea3076bdd494a5e45f8352430b9a852c45296258b6371fd2bee07a7d2d9cb224bc426e8c364b07d8d37b92d98d6fc186b0217b0650ac961e128 SHA512 d6f323bc181656fbdfdf25e0472e7e13e93b565f3ba64ea9cc81fbcb6c935580c1811f783035a5b1c45be082a38f157610666276aad9fb36d3fdb009fe7ce1c9
-AUX mlton-20130715-no-PIE.patch 2399 BLAKE2B a0af01c4eea65a38d788744f593303d8732a754de19230ce13ce14ce6368058840e9076934311385bed7951d94f1daed878847a57e70ac9330f4af575f35c1bf SHA512 ef0d675acfcbe05c1f810da2b9d684b4412a0f283e6025930c13d80912036ffc650972664f5a4fdd955e4c78c3564c751c1ba9bf279f738eca96801eeb57f0b2
-AUX mlton-20130715-split-make-for-pax-mark.patch 556 BLAKE2B a98f9a6b01edfc19723ef20eaeb0e9046162e179f3c63c69f59d07a39e0b723c4b429c3f10adb6099f912340431e8ea7b06a63d397cb8feff46d3d7d256a0e22 SHA512 9d334c930abe38f222bdd16c7dbdb0b1e0a70955aa8832fd441c9443c53f9d66c3ec49c06f59de501c014a66c6265a6df64269e0534c0ffdae0115718febb694
AUX mlton-20180207-bootstrap.patch 980 BLAKE2B 4128d0d3aae1e30c6b234e9cc3e0d91ee6de7338e2f8d4e8da7bb5b63ea62138db3148f8ec9ab16966983587dac7c9040a52aea80d21409d5d8fdbb020d13f7f SHA512 7657185d7f4c4e9bff4fd44f3991cd3d115ea0e1e4f6c3b702ecba74a3b2fcb7c1c0c47a814dc26bd3af7a523a92aac50df4d4ddb873eba938c2689ac6b5cf0b
AUX mlton-20180207-paxmark.patch 728 BLAKE2B 05bb27260dc8007a815ce74276a537a48127b4c336472afca571c39b0e29368be5be79ae03c21940dde6bd37f79613817adc8f22d986d570fab4cb184051b141 SHA512 78526ab383f481663cc892938f74ad1783aa7a2b1fcfd7032a67c4489daa5d141877806fb16232b8f0843e7b4e001d3f76a9a171a8da6413cd921688f493f7f9
-DIST mlton-20130715-1.amd64-linux.tgz 19512324 BLAKE2B 972688dcf6fc6ec17146e2597e6f5dab3b5df4e894697a98c68de61cf4728bf7e2e3ef1cee96befae90f9b555bed0b09cef846912225f8b770d20782fa833212 SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf
-DIST mlton-20130715-1.x86-linux.tgz 18065793 BLAKE2B d05ca4f46fb35b0b819e2678f282943fc9cd8f701bdf2a20da68b285db4618401b4138a227352e8aacef9f604528c7fafc0973631115954cfd91e01e9dd01a9d SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859
-DIST mlton-20130715.src.tgz 25606142 BLAKE2B 3fa3e8cf4991faef98e23ae4cbe9e0db5cae2e46ce27be57b784a81b576eeed17a179018e8b70d1264cb9595a3467900f034a2b4a7c114d1bac74025450741e1 SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1
DIST mlton-20180207-1.amd64-linux.tgz 18772644 BLAKE2B 7fe2d9db7edfb2d3e301be88e90b7dffe1441ff315ddac1464ef42fb436be1a9dc4e2c03fdb93880779360aed04cb7662a1a5a733f2d4158082d228f718d8b93 SHA512 74ab847ff567cde365a113f8819bae69cc18df20c441a6c6666b600980d2687faf143311f42be21a261b2493dc5c45fbecb4737c599cf767c3680afec06c2e0c
DIST mlton-20180207.src.tgz 25003695 BLAKE2B 8cddfe83c76e05fda446917ddc85035b3d74534fe4bc597a839cd13cb59a15538f40a3f68bb8f7136f9cf8cb27a582e88ca0d14b8f7a4582a202b3bd075f3c9a SHA512 3599159950e857d257abce92abf5c548dd9c0b0cdc4ba0d7cdf9badb5d997f73386cd1ff79f563221b394dd831cb344e287927f90683b0715678edb3ca0ae15a
-EBUILD mlton-20130715.ebuild 3920 BLAKE2B 327347ad498c3b70d8d108c9ee2decf54fa3812bbec0bbc8d7eb0802edcb52b0881e8e538763334a853296e63fdc6b70c3adb23616f6b6a1a7bd95bfe789dfb3 SHA512 f5d40634f59e41015970599b3c6bf8812acb92aa21411a0a692cdef9bb6eb0de01c0bd079060c7b86a5922d9fbb4335f4ff132741b13eeba5c3aa71a9f7475c4
-EBUILD mlton-20180207.ebuild 7017 BLAKE2B 53c358f730da457736d81529dbc905fbe94823e38458ea10c11cc634f60c9d317b20a9dc7529f7acc0068631a4638a8f24c6b5df1085b5b985fe6d3c21c618b4 SHA512 d63023ea41b2c5cf97bd5b19698221349163e3083f898a67739b691df19ebed7db63214f321d8de436b027f5fb35ff837589530885b6710032a074dd54023f23
+EBUILD mlton-20180207.ebuild 7013 BLAKE2B f5619b234c8ab703370cf446db52fa05adf9a32c4a8cce94ac906029e8bf2353f73bf0d88e287343562a45e7f36a6ab7d888e43d46af6fbc9122edc10b53f6a0 SHA512 f4548995a8860ca5b05c4b9937f311c7d8db1e5951c057a9b77cc1799b50c296cae9adf0f0e9894029af14848c71cb49bcf475032c0975f2631a0d34db37d0c1
MISC metadata.xml 672 BLAKE2B 1fd22f7212a973039a94dc14bc3f2853a7b56968d3b4a106605018ec53b45926b11cd8ee6b9ea187ea863ad5a43f8a094dc9baced81cdc57927d213ee587af6e SHA512 fa72f182a62140658bdbcc67268fd42ffe979d8370473af755fd691a156b3027002e3a80f341a4d9c2a8840d99e5140b8d4f6efb604c99bed2d6042ac811cfcf
diff --git a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
deleted file mode 100644
index f4d4bdf540bf..000000000000
--- a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 544930de3b1c754fa8803169902a63bce7cc02ba Mon Sep 17 00:00:00 2001
-From: Adam Goode <adam@spicenitz.org>
-Date: Wed, 6 Feb 2008 20:17:51 -0500
-Subject: [PATCH] Remove PROT_EXEC from mprotect
-
-It looks like mprotect is used here as part of signal handling.
-There doesn't seems to be a reason to have the area of memory
-marked as executable. In fact, on Fedora 9, this causes MLton
-compiled binaries (including MLton itself) to fail.
----
- runtime/platform/mmap-protect.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/runtime/platform/mmap-protect.c b/runtime/platform/mmap-protect.c
-index f0dea49..df42215 100644
---- a/runtime/platform/mmap-protect.c
-+++ b/runtime/platform/mmap-protect.c
-@@ -7,7 +7,7 @@ void *GC_mmapAnon_safe_protect (void *start, size_t length,
- if (mprotect (low, dead_low, PROT_NONE))
- diee ("mprotect failed");
- result = (void*)((pointer)low + dead_low);
-- if (mprotect (result, length, PROT_READ | PROT_WRITE | PROT_EXEC))
-+ if (mprotect (result, length, PROT_READ | PROT_WRITE))
- diee ("mprotect failed");
- high = (void*)((pointer)result + length);
- if (mprotect (high, dead_high, PROT_NONE))
---
-1.5.4
-
diff --git a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
deleted file mode 100644
index a059b1598bec..000000000000
--- a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- mlton-20130715-orig/bin/upgrade-basis 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/bin/upgrade-basis 2013-12-17 18:17:24.165889500 +1100
-@@ -28,7 +28,7 @@
- tmp="$$.sml"
-
- echo "val () = print \"I work\"" >"$tmp"
--if ! mlton "$tmp" 1>&2; then
-+if ! mlton -link-opt -fno-PIE "$tmp" 1>&2; then
- die "Error: cannot upgrade basis because the compiler doesn't work"
- fi
-
---- mlton-20130715-orig/mlton/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlton/Makefile 2013-12-17 23:35:06.137421195 +1100
-@@ -106,7 +106,7 @@
- rm -f control/version.sml
- $(MAKE) control/version.sml
- @echo 'Compiling mlton (takes a while)'
-- mlton $(FLAGS) $(FILE)
-+ mlton $(FLAGS) -link-opt -fno-PIE $(FILE)
-
- .PHONY: def-use
- def-use: mlton.def-use
---- mlton-20130715-orig/mllex/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mllex/Makefile 2013-12-18 07:03:29.592171611 +1100
-@@ -21,7 +21,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- "$(MLTON)" $(FLAGS) $(NAME).mlb
-+ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- html/index.html: $(TEX_FILES)
- mkdir -p html
---- mlton-20130715-orig/mlnlffigen/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlnlffigen/Makefile 2013-12-18 11:55:33.590660407 +1100
-@@ -22,7 +22,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- $(MLTON) $(FLAGS) $(NAME).mlb
-+ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- .PHONY: clean
- clean:
---- mlton-20130715-orig/mlprof/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlprof/Makefile 2013-12-20 14:02:50.292677796 +1100
-@@ -21,7 +21,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- $(MLTON) $(FLAGS) $(NAME).mlb
-+ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- .PHONY: clean
- clean:
---- mlton-20130715-orig/mlyacc/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlyacc/Makefile 2013-12-20 15:01:26.567775876 +1100
-@@ -41,7 +41,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- "$(MLTON)" $(FLAGS) $(NAME).mlb
-+ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- src/yacc.lex.sml: src/yacc.lex
- rm -f src/yacc.lex.sml && \
diff --git a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
deleted file mode 100644
index 3286d44e3522..000000000000
--- a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mlton-20130715-orig/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/Makefile 2013-12-27 13:29:35.259563131 +1100
-@@ -58,7 +58,7 @@
-
- .PHONY: all-no-docs
- all-no-docs:
-- $(MAKE) dirs runtime compiler basis-no-check script mlbpathmap constants libraries tools
-+ $(MAKE) basis-no-check script mlbpathmap constants libraries tools
- # Remove $(AOUT) so that the $(MAKE) compiler below will remake MLton.
- # We also want to re-run the just-built tools (mllex and mlyacc)
- # because they may be better than those that were used for the first
diff --git a/dev-lang/mlton/mlton-20130715.ebuild b/dev-lang/mlton/mlton-20130715.ebuild
deleted file mode 100644
index 1e3533a37670..000000000000
--- a/dev-lang/mlton/mlton-20130715.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit check-reqs eutils pax-utils
-
-DESCRIPTION="Standard ML optimizing compiler and libraries"
-BASE_URI="mirror://sourceforge/${PN}"
-SRC_URI="!binary? ( ${BASE_URI}/${P}.src.tgz )
- binary? ( amd64? ( ${BASE_URI}/${P}-1.amd64-linux.tgz )
- x86? ( ${BASE_URI}/${P}-1.x86-linux.tgz ) )"
-
-HOMEPAGE="http://www.mlton.org"
-
-LICENSE="HPND MIT"
-SLOT="0/${PV}"
-# there is support for ppc64 and ia64, but no
-# binaries are provided and there is no native
-# code generation for these platforms
-KEYWORDS="-* ~amd64 ~x86"
-IUSE="binary doc"
-
-DEPEND="dev-libs/gmp:*
- doc? ( virtual/latex-base )"
-RDEPEND="dev-libs/gmp:*"
-
-QA_PRESTRIPPED="binary? (
- usr/bin/mlnlffigen
- usr/bin/mllex
- usr/bin/mlprof
- usr/bin/mlyacc
- usr/lib/mlton/mlton-compile
-)"
-
-# The resident set size of mlton-compile is 10GB on amd64
-CHECKREQS_MEMORY="4G"
-
-pkg_pretend() {
- if use !binary; then
- check-reqs_pkg_pretend
- fi
-}
-
-src_unpack() {
- if use !binary; then
- unpack ${A}
- else
- mkdir -p "${S}" || die "Could not create ${S} directory"
- pushd "${S}" || die "Could not cd to ${S}"
- unpack ${A}
- popd
- fi
-}
-
-src_prepare() {
- if use !binary; then
- # The patch removing executable permissions from mmap'd memory regions is not upstreamed:
- # http://pkgs.fedoraproject.org/cgit/mlton.git/tree/mlton-20070826-no-execmem.patch
- epatch "${FILESDIR}/${PN}-20070826-no-execmem.patch"
- # PIE in hardened requires executables to be linked with -fPIC. mlton by default tries
- # to link executables against the non PIC objects in libmlton.a. We may be bootstrapping
- # with an old mlton install, if we tried to patch it (to link with libmlton-pic.a) we would
- # need a patched binary.
- # http://mlton.org/MLtonWorld says Executables that save and load worlds are incompatible
- # with address space layout randomization (ASLR) of the executable.
- epatch "${FILESDIR}/${PN}-20130715-no-PIE.patch"
- # Remove dirs runtime compiler from all-no-docs to avoid repeating these steps.
- # As we need to pax-mark the mlton-compiler executable.
- epatch "${FILESDIR}/${PN}-20130715-split-make-for-pax-mark.patch"
- fi
-}
-
-src_compile() {
- if use !binary; then
- has_version dev-lang/mlton || die "emerge with binary use flag first"
-
- # Fix location in which to install man pages
- sed -i 's@^MAN_PREFIX_EXTRA :=.*@MAN_PREFIX_EXTRA := /share@' \
- Makefile || die 'sed Makefile failed'
-
- emake -j1 dirs runtime compiler CFLAGS="${CFLAGS}"
- pax-mark m "${S}/mlton/mlton-compile"
- pax-mark m "${S}/build/lib/mlton-compile"
-
- # Does not support parallel make
- emake -j1 all-no-docs CFLAGS="${CFLAGS}"
- if use doc; then
- export VARTEXFONTS="${T}/fonts"
- emake docs
- fi
- fi
-}
-
-src_install() {
- if use binary; then
- # Fix location in which to install man pages
- mv "${S}/usr/man" "${S}/usr/share" || die "mv man failed"
- pax-mark m "${S}/usr/lib/mlton/mlton-compile"
- pax-mark m "${S}/usr/bin/mllex"
- pax-mark m "${S}/usr/bin/mlyacc"
- mv "${S}/usr" "${D}" || die "mv failed"
- else
- emake DESTDIR="${D}" install-no-docs
- use doc && emake DESTDIR="${D}" TDOC="${D}"/usr/share/doc/${P} install-docs
- fi
-}
-
-pkg_postinst() {
- # There are PIC objects in libmlton-pic.a. -link-opt -lmlton-pic does not help as mlton
- # specifies -lmlton before -lmlton-pic. It appears that it would be necessary to patch mlton
- # to convince mlton to use the lib*-pic.a libraries when linking an executable.
- ewarn 'PIE in Gentoo hardened requires executables to be linked with -fPIC. mlton by default links'
- ewarn 'executables against the non PIC objects in libmlton.a. http://mlton.org/MLtonWorld notes:'
- ewarn 'Executables that save and load worlds are incompatible with address space layout'
- ewarn 'randomization (ASLR) of the executable.'
- ewarn 'To suppress the generation of position-independent executables.'
- ewarn '-link-opt -fno-PIE'
-}
diff --git a/dev-lang/mlton/mlton-20180207.ebuild b/dev-lang/mlton/mlton-20180207.ebuild
index dc132ad34edc..f55bb40d5a14 100644
--- a/dev-lang/mlton/mlton-20180207.ebuild
+++ b/dev-lang/mlton/mlton-20180207.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit check-reqs eutils multibuild pax-utils
+inherit check-reqs multibuild pax-utils
DESCRIPTION="Standard ML optimizing compiler and libraries"
BASE_URI="mirror://sourceforge/${PN}"
@@ -147,12 +147,15 @@ mlton_create_bin_stubs() {
src_prepare() {
if ! use binary; then
# For Gentoo hardened: paxmark the mlton-compiler, mllex and mlyacc executables
- epatch "${FILESDIR}/${PN}-20180207-paxmark.patch"
+ eapply "${FILESDIR}/${PN}-20180207-paxmark.patch"
# Fix the bootstrap-smlnj and bootstrap-polyml Makefile targets
- epatch "${FILESDIR}/${PN}-20180207-bootstrap.patch"
+ eapply "${FILESDIR}/${PN}-20180207-bootstrap.patch"
fi
+
default
+
$(mlton_create_bin_stubs)
+
if use binary; then
pax-mark m "${R}/lib/${PN}/mlton-compile"
pax-mark m "${R}/bin/mllex"