diff options
Diffstat (limited to 'dev-lang/moarvm')
-rw-r--r-- | dev-lang/moarvm/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/moarvm/files/Configure-2016.04.patch | 145 | ||||
-rw-r--r-- | dev-lang/moarvm/metadata.xml | 27 | ||||
-rw-r--r-- | dev-lang/moarvm/moarvm-2016.04-r1.ebuild | 63 | ||||
-rw-r--r-- | dev-lang/moarvm/moarvm-2016.05.ebuild | 61 | ||||
-rw-r--r-- | dev-lang/moarvm/moarvm-9999.ebuild | 61 |
6 files changed, 359 insertions, 0 deletions
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest new file mode 100644 index 0000000..8d79641 --- /dev/null +++ b/dev-lang/moarvm/Manifest @@ -0,0 +1,2 @@ +DIST MoarVM-2016.04.tar.gz 3332850 SHA256 6fe9000daada59535747f2557cc73573241ba8a6044271caf1647aa37be33c6d SHA512 ef22145c9f7c32d7d12192cee63f286544500adff40fc2dbaad677d57108bc6efedc348fe8ddf460fe12d2c6b282e885bcb74fb3bcaa1e06b7719754175afe7d WHIRLPOOL e314f80cd785d31768630798647d7f445831bb29aaded88ef32326df3f4705a5d3fba2da00fce6888a2256b57aeb838922e94c3096250d30112f2be2bfacbb92 +DIST MoarVM-2016.05.tar.gz 3343486 SHA256 d59e3b366cd788a9e9aaa747dc0883dc6f41d97cb76a8fb2815bd565ef75498a SHA512 0cc946962b56cd9075013074228cee008c98b43da9bdaadd8ce91aa06d94510df1c4a2877d36945aff30dada01f3bf66c0ef1028c59967d09c0aec662aa87f99 WHIRLPOOL 1681538cb1a2919bfb49e51fe29877392ee0900d38daed1bbdae92d57332de84888f6ecae3bfbfba5b8132f186ebdfa3151a7cd038f10538e09c97ddae953adc diff --git a/dev-lang/moarvm/files/Configure-2016.04.patch b/dev-lang/moarvm/files/Configure-2016.04.patch new file mode 100644 index 0000000..6fd46c2 --- /dev/null +++ b/dev-lang/moarvm/files/Configure-2016.04.patch @@ -0,0 +1,145 @@ +diff --git a/Configure.pl b/Configure.pl +index 72a5dad..f829d5c 100755 +--- a/Configure.pl ++++ b/Configure.pl +@@ -32,7 +32,7 @@ GetOptions(\%args, qw( + os=s shell=s toolchain=s compiler=s + ar=s cc=s ld=s make=s has-sha has-libuv + static has-libtommath has-libatomic_ops +- has-dyncall has-libffi ++ has-dyncall has-libffi pkgconfig=s + build=s host=s big-endian jit! enable-jit lua=s has-dynasm + prefix=s bindir=s libdir=s mastdir=s make-install asan ubsan), + 'no-optimize|nooptimize' => sub { $args{optimize} = 0 }, +@@ -99,6 +99,7 @@ $config{config} = join ' ', map { / / ? "\"$_\"" : $_ } @args; + $config{osname} = $^O; + $config{osvers} = $Config{osvers}; + $config{lua} = $args{lua} // './3rdparty/dynasm/minilua@exe@'; ++$config{pkgconfig} = $args{pkgconfig} // '/usr/bin/pkg-config'; + + # set options that take priority over all others + my @keys = qw( ar cc ld make ); +@@ -164,12 +165,33 @@ if (-e '3rdparty/libuv/src/unix/threadpool' . $defaults{obj} + system($defaults{make}, 'realclean') + } + ++# test whether pkg-config works ++if (-e "$config{pkgconfig}") { ++ print("\nTesting pkgconfig ... "); ++ system("$config{pkgconfig}", "--version"); ++ if ( $? == 0 ) { ++ $config{pkgconfig_works} = 1; ++ } else { ++ $config{pkgconfig_works} = 0; ++ } ++} ++ + # conditionally set include dirs and install rules + $config{cincludes} //= ''; + $config{install} //= ''; + if ($args{'has-libuv'}) { + $defaults{-thirdparty}->{uv} = undef; + unshift @{$config{usrlibs}}, 'uv'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags libuv`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for libuv: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags libuv.\n"); ++ } ++ } + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libuv/include' +@@ -181,6 +203,16 @@ else { + if ($args{'has-libatomic_ops'}) { + $defaults{-thirdparty}->{lao} = undef; + unshift @{$config{usrlibs}}, 'atomic_ops'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags atomic_ops`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for atomic_ops: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags atomic_ops.\n"); ++ } ++ } + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libatomic_ops/src'; +@@ -216,7 +248,8 @@ if ($args{'has-libtommath'}) { + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libtommath'; +- $config{install} .= "\t\$(CP) 3rdparty/libtommath/*.h \$(DESTDIR)\$(PREFIX)/include/libtommath\n"; ++ $config{install} .= "\t\$(MKPATH) \$(DESTDIR)\$(PREFIX)/include/libtommath\n" ++ . "\t\$(CP) 3rdparty/libtommath/*.h \$(DESTDIR)\$(PREFIX)/include/libtommath\n"; + } + + if ($args{'has-dynasm'}) { +@@ -232,6 +265,16 @@ if ($args{'has-libffi'}) { + $config{nativecall_backend} = 'libffi'; + unshift @{$config{usrlibs}}, 'ffi'; + push @{$config{defs}}, 'HAVE_LIBFFI'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags libffi`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for libffi: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags libffi.\n"); ++ } ++ } + } + elsif ($args{'has-dyncall'}) { + unshift @{$config{usrlibs}}, 'dyncall_s', 'dyncallback_s', 'dynload_s'; +@@ -364,6 +407,7 @@ my $order = $config{be} ? 'big endian' : 'little endian'; + print "\n", <<TERM, "\n"; + make: $config{make} + compile: $config{cc} $config{cflags} ++ includes: $config{cincludes} + link: $config{ld} $config{ldflags} + libs: $config{ldlibs} + +@@ -873,6 +917,10 @@ Build and install MoarVM in addition to configuring it. + + =item --has-libffi + ++=item --pkgconfig=/path/to/pkgconfig/executable ++ ++Provide path to the pkgconfig executable. Default: /usr/bin/pkg-config ++ + =item --no-jit + + Disable JIT compiler, which is enabled by default to JIT-compile hot frames. +diff --git a/build/Makefile.in b/build/Makefile.in +index 56a4c8a..b94e847 100644 +--- a/build/Makefile.in ++++ b/build/Makefile.in +@@ -454,9 +454,6 @@ install: all + $(CP) src/strings/*.h $(DESTDIR)$(PREFIX)/include/moar/strings + $(CP) src/jit/*.h $(DESTDIR)$(PREFIX)/include/moar/jit + $(CP) src/instrument/*.h $(DESTDIR)$(PREFIX)/include/moar/instrument +- $(MKPATH) $(DESTDIR)$(PREFIX)/include/libuv +- $(MKPATH) $(DESTDIR)$(PREFIX)/include/libtommath +- $(CP) 3rdparty/libuv/include/*.h $(DESTDIR)$(PREFIX)/include/libuv + @install@ + + lib: @moar@ +diff --git a/build/setup.pm b/build/setup.pm +index 324cc88..c87d79e 100755 +--- a/build/setup.pm ++++ b/build/setup.pm +@@ -125,7 +125,7 @@ our %TC_POSIX = ( + ccshared => '-fPIC', + ldshared => '-shared @ccshared@', + moarshared => '', +- ldrpath => '-Wl,-rpath,@libdir@ -Wl,-rpath,@prefix@/share/perl6/site/lib', ++ ldrpath => '-Wl,-rpath,/@libdir@ -Wl,-rpath,@prefix@/share/perl6/site/lib', + + arflags => 'rcs', + arout => '', diff --git a/dev-lang/moarvm/metadata.xml b/dev-lang/moarvm/metadata.xml new file mode 100644 index 0000000..3e0f367 --- /dev/null +++ b/dev-lang/moarvm/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="person"> + <email>tomboy64@sina.cn</email> + <name>Matthew Brewer</name> + </maintainer> + <maintainer type="project"> + <email>perl@gentoo.org</email> + <name>Gentoo Perl Project</name> + </maintainer> + <use> + <flag name="asan">Enable clang's Address Sanitizer functionality. Expect longer compile time.</flag> + <flag name="clang">Use clang compiler instead of GCC</flag> + <flag name="jit">Enable Just-In-Time-Compiler. Has no effect except on AMD64 and Darwin.</flag> + <flag name="optimize">Enable optimization via CFLAGS</flag> + <flag name="system-libs">Link against the system's shared libraries</flag> + <flag name="ubsan">Enable clang's Undefined Behavior Sanitizer functionality. Expect longer compile time.</flag> + </use> + <upstream> + <remote-id type="github">MoarVM/MoarVM</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/moarvm/moarvm-2016.04-r1.ebuild b/dev-lang/moarvm/moarvm-2016.04-r1.ebuild new file mode 100644 index 0000000..30b7f13 --- /dev/null +++ b/dev-lang/moarvm/moarvm-2016.04-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" + +PATCHES=( "${FILESDIR}/Configure-2016.04.patch" ) +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} diff --git a/dev-lang/moarvm/moarvm-2016.05.ebuild b/dev-lang/moarvm/moarvm-2016.05.ebuild new file mode 100644 index 0000000..f6c45bd --- /dev/null +++ b/dev-lang/moarvm/moarvm-2016.05.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} diff --git a/dev-lang/moarvm/moarvm-9999.ebuild b/dev-lang/moarvm/moarvm-9999.ebuild new file mode 100644 index 0000000..f6c45bd --- /dev/null +++ b/dev-lang/moarvm/moarvm-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} |