forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update ebuild to reflect the build-system - enable choice between gcc (default) and clang (use clang) - enable use of either MoarVM or JavaVM or both as backend (use java +moar) - inherit java-pkg-2.eclass - enable testing (use test) - abort when rakudo is already installed and JVM backend is wanted (known bug) - update to EAPI6 - add tomboy64 as secondary maintainer Package-Manager: portage-2.2.28
- Loading branch information
Showing
3 changed files
with
116 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff -Naur a/tools/build/Makefile-Moar.in b/tools/build/Makefile-Moar.in | ||
--- a/tools/build/Makefile-Moar.in 2016-02-02 14:27:13.000000000 +0100 | ||
+++ b/tools/build/Makefile-Moar.in 2016-04-22 15:01:35.338534944 +0200 | ||
@@ -87,11 +87,11 @@ | ||
$(M_CC) @moar::ccswitch@ @moar::ccshared@ $(M_CFLAGS) -I$(PREFIX)/include/libatomic_ops \ | ||
-I$(PREFIX)/include/dyncall -I$(PREFIX)/include/moar \ | ||
-I$(PREFIX)/include/sha1 -I$(PREFIX)/include/tinymt -I$(PREFIX)/include/libtommath \ | ||
- -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::ccout@$(M_PERL6_OPS_OBJ) $(M_PERL6_OPS_SRC) | ||
+ -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::cincludes@ @moar::ccout@$(M_PERL6_OPS_OBJ) $(M_PERL6_OPS_SRC) | ||
$(M_CC) @moar::ccswitch@ @moar::ccshared@ $(M_CFLAGS) -I$(PREFIX)/include/libatomic_ops \ | ||
-I$(PREFIX)/include/dyncall -I$(PREFIX)/include/moar \ | ||
-I$(PREFIX)/include/sha1 -I$(PREFIX)/include/tinymt -I$(PREFIX)/include/libtommath \ | ||
- -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::ccout@$(M_PERL6_CONT_OBJ) $(M_PERL6_CONT_SRC) | ||
+ -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::cincludes@ @moar::ccout@$(M_PERL6_CONT_OBJ) $(M_PERL6_CONT_SRC) | ||
$(M_LD) @moar::ldswitch@ -L@moar::libdir@ @moar::ldshared@ $(M_LDFLAGS) @moar::ldout@$(M_PERL6_OPS_DLL) $(M_PERL6_OPS_OBJ) $(M_PERL6_CONT_OBJ) -lmoar @moarimplib@ | ||
|
||
$(PERL6_ML_MOAR): src/Perl6/ModuleLoader.nqp src/vm/moar/ModuleLoaderVMConfig.nqp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Patrick Lauer</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Perl Project</name> | ||
</maintainer> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Patrick Lauer</name> | ||
</maintainer> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Matthew Brewer</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Perl Project</name> | ||
</maintainer> | ||
<use> | ||
<flag name="clang">Use Clang to compile the MoarVM backend</flag> | ||
<flag name="moar">Use the MoarVM as backend</flag> | ||
</use> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
inherit java-pkg-2 | ||
|
||
DESCRIPTION="A compiler for the Perl 6 programming language" | ||
HOMEPAGE="http://rakudo.org" | ||
|
||
if [[ ${PV} == "9999" ]]; then | ||
EGIT_REPO_URI="https://github.com/rakudo/${PN}.git" | ||
inherit git-r3 | ||
KEYWORDS="" | ||
else | ||
SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz" | ||
KEYWORDS="~amd64 ~x86" | ||
fi | ||
|
||
LICENSE="Artistic-2" | ||
SLOT="0" | ||
# TODO: add USE="javascript" once that's usable in nqp | ||
IUSE="clang java +moar test" | ||
|
||
RDEPEND="~dev-lang/nqp-${PV}:=[java=,moar=,clang=]" | ||
DEPEND="${RDEPEND} | ||
clang? ( sys-devel/clang ) | ||
>=dev-lang/perl-5.10" | ||
|
||
REQUIRED_USE="|| ( java moar )" | ||
PATCHES=( "${FILESDIR}/${PN}-2016.04-Makefile.in.patch" ) | ||
|
||
pkg_pretend() { | ||
if has_version dev-lang/rakudo && use java; then | ||
die "Rakudo is known to fail compilation with the jvm backend if it's already installed." | ||
fi | ||
} | ||
|
||
pkg_setup() { | ||
use java && java-pkg-2_pkg_setup | ||
} | ||
|
||
src_prepare() { | ||
eapply "${PATCHES[@]}" | ||
|
||
# yup, this is ugly. but emake doesn't respect DESTDIR. | ||
for i in Moar JVM; do | ||
echo "DESTDIR = ${D}" > "${T}/Makefile-${i}.in" || die | ||
cat "${S}/tools/build/Makefile-${i}.in" >> "${T}/Makefile-${i}.in" || die | ||
mv "${T}/Makefile-${i}.in" "${S}/tools/build/Makefile-${i}.in" || die | ||
done | ||
|
||
eapply_user | ||
use java && java-pkg-2_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local backends | ||
use java && backends+="jvm," | ||
use moar && backends+="moar," | ||
local myargs=( "--prefix=/usr" | ||
"--sysroot=/" | ||
"--sdkroot=/" | ||
"--make-install" | ||
"--sdkroot=/" | ||
"--backends=${backends}" | ||
) | ||
perl Configure.pl "${myargs[@]}" | ||
} | ||
|
||
src_compile() { | ||
emake DESTDIR="${D}" | ||
} | ||
|
||
src_test() { | ||
export RAKUDO_PRECOMP_PREFIX=$(mktemp -d) | ||
default | ||
} | ||
|
||
src_install() { | ||
emake DESTDIR="${D}" install | ||
} |