diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/mlton | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/mlton')
-rw-r--r-- | dev-lang/mlton/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/mlton/files/mlton-20070826-no-execmem.patch | 29 | ||||
-rw-r--r-- | dev-lang/mlton/files/mlton-20130715-no-PIE.patch | 66 | ||||
-rw-r--r-- | dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch | 11 | ||||
-rw-r--r-- | dev-lang/mlton/metadata.xml | 11 | ||||
-rw-r--r-- | dev-lang/mlton/mlton-20130715.ebuild | 120 |
6 files changed, 240 insertions, 0 deletions
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest new file mode 100644 index 000000000000..f3bcafd46ea5 --- /dev/null +++ b/dev-lang/mlton/Manifest @@ -0,0 +1,3 @@ +DIST mlton-20130715-1.amd64-linux.tgz 19512324 SHA256 f6f912009b0946b73af88ff5f3e713b6be63b871696e2697ccf1564b56e7d03b SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf WHIRLPOOL 50d265fbfabba1c9ed840a3393bf80f3b86a094a2a4ca5be323fc369bffcc3f5763a7ea3574b0f64be551396d9dea7365d1263629d8b14ef5fefad203544bfbe +DIST mlton-20130715-1.x86-linux.tgz 18065793 SHA256 92d89627cf760c56d0e9727f328b006341bf5be283fc7d616a6276c26d95b2cf SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859 WHIRLPOOL a010aca6ae07c1e824b1fbfabc9c00eca270422783715ed644b864916f604f77115d87130ab5c77f6163d1f24793aee4ca33cf425bde2b680563c03756ba44ec +DIST mlton-20130715.src.tgz 25606142 SHA256 215857ad11d44f8d94c27f75e74017aa44b2c9703304bcec9e38c20433143d6c SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1 WHIRLPOOL 0c899b0cb17251ca345b73764a86e160ea5bdde5d35f5eb36b1f72202c87dcc251cfb19563744ad7cfe2e10eb76963df79dca023801f858441d5c745046df5be diff --git a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch new file mode 100644 index 000000000000..f4d4bdf540bf --- /dev/null +++ b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch @@ -0,0 +1,29 @@ +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 new file mode 100644 index 000000000000..a059b1598bec --- /dev/null +++ b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch @@ -0,0 +1,66 @@ +--- 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 new file mode 100644 index 000000000000..3286d44e3522 --- /dev/null +++ b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch @@ -0,0 +1,11 @@ +--- 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/metadata.xml b/dev-lang/mlton/metadata.xml new file mode 100644 index 000000000000..60c86a1e2b36 --- /dev/null +++ b/dev-lang/mlton/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ml</herd> + <use> + <flag name="binary">install a binary version (need to do this once to bootstrap, until smlnj is supported)</flag> + </use> + <upstream> + <remote-id type="sourceforge">mlton</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/mlton/mlton-20130715.ebuild b/dev-lang/mlton/mlton-20130715.ebuild new file mode 100644 index 000000000000..3518cff6b50a --- /dev/null +++ b/dev-lang/mlton/mlton-20130715.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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}" || die + 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}" || die + if use doc; then + export VARTEXFONTS="${T}/fonts" + emake docs || die "failed to create documentation" + 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 || die + if use doc; then emake DESTDIR="${D}" TDOC="${D}"/usr/share/doc/${P} install-docs || die; fi + 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' +} |