Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 580732 | Differences between
and this patch

Collapse All | Expand All

(-)a/dev-lang/nqp/Manifest (+1 lines)
Lines 1-3 Link Here
1
DIST nqp-2016.01.tar.gz 5117110 SHA256 87875120af7167093643f2a35869d66a61f735220a9348627ba89cf294387c8b SHA512 e79668f7f5f3679fe3b93f63e1151da1eab109ef4acc6f8ae3da3d9e5c3da814440dd43279978b1a13f30647d7c52bda5575b02f366bd928965b06b47c6d6d91 WHIRLPOOL d2369417707332d8bc045f6f93da81e1301ec2599f197664d80e6edeefc1bc7a2147ad3b7e893eef0fb6b96adf2f68f5ab44b948801e266e68d99552253abeda
1
DIST nqp-2016.01.tar.gz 5117110 SHA256 87875120af7167093643f2a35869d66a61f735220a9348627ba89cf294387c8b SHA512 e79668f7f5f3679fe3b93f63e1151da1eab109ef4acc6f8ae3da3d9e5c3da814440dd43279978b1a13f30647d7c52bda5575b02f366bd928965b06b47c6d6d91 WHIRLPOOL d2369417707332d8bc045f6f93da81e1301ec2599f197664d80e6edeefc1bc7a2147ad3b7e893eef0fb6b96adf2f68f5ab44b948801e266e68d99552253abeda
2
DIST nqp-2016.02.tar.gz 5121833 SHA256 051ddd4bab8f73a688836d896340320ff7043a6ecbd5c53be099249e75e33b8d SHA512 9a3233e351ebdf73ed27d3eade2052936d1a49ea95d32a8176e426e7126c720e4a3f69dedc4067925272293329b08ab397f6a7523b9e4129952847fbd86fcf0d WHIRLPOOL 1bad2dc420d59f07c3d9b8d9dcc78d51a772ed2672419fc53e427c68e24fce5645a0dcfd4a4e138e6333f9e909297b49fafe190e6dc763cca8e52dce20309ec5
2
DIST nqp-2016.02.tar.gz 5121833 SHA256 051ddd4bab8f73a688836d896340320ff7043a6ecbd5c53be099249e75e33b8d SHA512 9a3233e351ebdf73ed27d3eade2052936d1a49ea95d32a8176e426e7126c720e4a3f69dedc4067925272293329b08ab397f6a7523b9e4129952847fbd86fcf0d WHIRLPOOL 1bad2dc420d59f07c3d9b8d9dcc78d51a772ed2672419fc53e427c68e24fce5645a0dcfd4a4e138e6333f9e909297b49fafe190e6dc763cca8e52dce20309ec5
3
DIST nqp-2016.03.tar.gz 5126687 SHA256 50731983cfc0800015bf73a2174000f5631ad09b551ff190153fba00a448067f SHA512 707701e22752cb43b0694c8c57ec834cfee3d2a50c2b6ae3ee36af5881728c94ae1d03d07c624367edb6cf58bba18abd26dcc18656b0483f4f979db5dd26a07e WHIRLPOOL 364abefc3d7b005b89fd3a3180e66971dbc56851377b93e38d2a8b2ed546121ec730628e0f93947f77e8f12346d64e60b4af8ffa720dc0a05810fae846b262a4
3
DIST nqp-2016.03.tar.gz 5126687 SHA256 50731983cfc0800015bf73a2174000f5631ad09b551ff190153fba00a448067f SHA512 707701e22752cb43b0694c8c57ec834cfee3d2a50c2b6ae3ee36af5881728c94ae1d03d07c624367edb6cf58bba18abd26dcc18656b0483f4f979db5dd26a07e WHIRLPOOL 364abefc3d7b005b89fd3a3180e66971dbc56851377b93e38d2a8b2ed546121ec730628e0f93947f77e8f12346d64e60b4af8ffa720dc0a05810fae846b262a4
4
DIST nqp-2016.04.tar.gz 5156494 SHA256 9176422eb2a99db24ab520bc78686f3a2c008ba73bf8c7091a790985f5061019 SHA512 5dcb685a90b26fee3e8dac3ca24da11bd967d034b5328232d18d9db37e27645b57259cabf54ef8e10b3ac508b1aa784072f0a9542d30168d3017f86e610c3cee WHIRLPOOL 0711e1471740b0ed181f9e4504f810a084056e74650c0ffb1c6c17e2976b2c1facb6a7e73df5d991d9ffe43f055fe844f0756dbd816375708b4d499a0f7a9162
(-)a/dev-lang/nqp/files/enable-external-jars.patch (+210 lines)
Line 0 Link Here
1
diff --git a/Configure.pl b/Configure.pl
2
index 2064ac8..73e2d27 100755
3
--- a/Configure.pl
4
+++ b/Configure.pl
5
@@ -34,6 +34,7 @@ MAIN: {
6
                'no-clean',
7
                'with-parrot=s', 'gen-parrot:s', 'parrot-config=s', 'parrot-option=s@',
8
                'with-moar=s', 'gen-moar:s', 'moar-option=s@',
9
+               'with-asm=s', 'with-asm-tree=s', 'with-jline=s', 'with-jna=s',
10
                'make-install!', 'makefile-timing!',
11
                'git-protocol=s',
12
                'git-depth=s', 'git-reference=s',);
13
@@ -50,6 +51,49 @@ MAIN: {
14
               "Use --prefix to specify a directory in which parrot is installed.";
15
     }
16
 
17
+    if ($options{'with-asm'}) {
18
+        if ($options{'with-asm'} ne '-') {
19
+            $config{'asm'} = $options{'with-asm'};
20
+        }
21
+    } else {
22
+        $config{'asm'} = "3rdparty/asm/asm-4.1.jar";
23
+    }
24
+    if ($options{'with-asm-tree'}) {
25
+        if ($options{'with-asm-tree'} ne '-') {
26
+            $config{'asmtree'} = $options{'with-asm-tree'};
27
+        }
28
+    } else {
29
+        $config{'asmtree'} = "3rdparty/asm/asm-tree-4.1.jar";
30
+    }
31
+    if ($options{'with-jline'}) {
32
+        if ($options{'with-jline'} ne '-') {
33
+            $config{'jline'} = $options{'with-jline'};
34
+        }
35
+    } else {
36
+        $config{'jline'} = "3rdparty/jline/jline-1.0.jar";
37
+    }
38
+    if ($options{'with-jna'}) {
39
+        if ($options{'with-jna'} ne '-') {
40
+            $config{'jna'} = $options{'with-jna'};
41
+        }
42
+    } else {
43
+        $config{'jna'} = "3rdparty/jna/jna.jar";
44
+    }
45
+
46
+    if ($^O eq 'MSWin32') {
47
+        $config{'asmfile'} = $config{'asm'} =~ s/.*\\//r;
48
+        $config{'jlinefile'} = $config{'jline'} =~ s/.*\\//r;
49
+    } else {
50
+        $config{'asmfile'} = $config{'asm'} =~ s/.*\///r;
51
+        $config{'jlinefile'} = $config{'jline'} =~ s/.*\///r;
52
+    }
53
+
54
+    fill_template_file(
55
+        'tools/build/install-jvm-runner.pl.in',
56
+        'tools/build/install-jvm-runner.pl',
57
+        %config,
58
+    );
59
+
60
     my $default_backend;
61
     my @backends;
62
     my %backends;
63
@@ -357,6 +401,11 @@ General Options:
64
     --gen-moar         Download and build a copy of MoarVM to use
65
     --moar-option='--option=value'
66
                        Options to pass to MoarVM configuration for --gen-moar
67
+    --with-asm='/path/to/jar'
68
+    --with-asm-tree='/path/to/jar'
69
+    --with-jline='/path/to/jar'
70
+    --with-jna='/path/to/jar'
71
+                       Provide paths to already installed jars
72
     --git-protocol={ssh,https,git}
73
                        Protocol to use for git clone. Default: https
74
     --make-install     Immediately run `MAKE install` after configuring
75
diff --git a/tools/build/Makefile-JVM.in b/tools/build/Makefile-JVM.in
76
index 27959ad..c19965a 100644
77
--- a/tools/build/Makefile-JVM.in
78
+++ b/tools/build/Makefile-JVM.in
79
@@ -2,7 +2,6 @@ BAT    = @bat@
80
 JAVA   = java
81
 JAVAC  = javac
82
 JAR    = jar
83
-ASM    = 3rdparty/asm/
84
 J_RUNNER = nqp-j$(BAT)
85
 
86
 NQP_JAR_DIR = $(NQP_LANG_DIR)/runtime
87
@@ -18,7 +17,11 @@ RUNTIME_JAVAS = \
88
 
89
 RUNTIME_JAR = nqp-runtime.jar
90
 
91
-THIRDPARTY_JARS = $(ASM)asm-4.1.jar@cpsep@$(ASM)asm-tree-4.1.jar@cpsep@3rdparty/jline/jline-1.0.jar@cpsep@3rdparty/jna/jna.jar
92
+ASM = @asm@
93
+ASMTREE = @asmtree@
94
+JLINE = @jline@
95
+JNA = @jna@
96
+THIRDPARTY_JARS = $(ASM)@cpsep@$(ASMTREE)@cpsep@$(JLINE)@cpsep@$(JNA)
97
 J_STAGE0 = src/vm/jvm/stage0
98
 J_STAGE1 = $(JVM_BUILD_DIR)/stage1
99
 J_STAGE2 = $(JVM_BUILD_DIR)/stage2
100
@@ -80,8 +83,8 @@ j-install: j-all
101
 	$(MKPATH) $(DESTDIR)$(BIN_DIR)
102
 	$(MKPATH) $(DESTDIR)$(NQP_JAR_DIR)
103
 	$(MKPATH) $(DESTDIR)$(NQP_LIB_DIR)
104
-	$(CP) 3rdparty/asm/asm-4.1.jar 3rdparty/asm/asm-tree-4.1.jar  $(DESTDIR)$(NQP_JAR_DIR)
105
-	$(CP) 3rdparty/jline/jline-1.0.jar 3rdparty/jna/jna.jar $(DESTDIR)$(NQP_JAR_DIR)
106
+	$(CP) $(ASM) $(ASMTREE) $(DESTDIR)$(NQP_JAR_DIR)
107
+	$(CP) $(JLINE) $(JNA) $(DESTDIR)$(NQP_JAR_DIR)
108
 	$(CP) $(RUNTIME_JAR) $(DESTDIR)$(NQP_JAR_DIR)
109
 	$(CP) $(NQP_MO_JAR) $(MODULE_LOADER_JAR) $(DESTDIR)$(NQP_LIB_DIR)
110
 	$(CP) $(CORE_SETTING_JAR) $(QASTNODE_JAR) $(QREGEX_JAR) $(DESTDIR)$(NQP_LIB_DIR)
111
diff --git a/tools/build/install-jvm-runner.pl b/tools/build/install-jvm-runner.pl
112
deleted file mode 100644
113
index 14541d6..0000000
114
--- a/tools/build/install-jvm-runner.pl
115
+++ /dev/null
116
@@ -1,44 +0,0 @@
117
-#!/usr/bin/perl
118
-# Copyright (C) 2013, The Perl Foundation.
119
-
120
-use strict;
121
-use warnings;
122
-use 5.008;
123
-use File::Spec;
124
-
125
-my ($destdir, $prefix) = @ARGV;
126
-my $realpath = $destdir.$prefix;
127
-
128
-unless (File::Spec->file_name_is_absolute($prefix)) {
129
-    $prefix = File::Spec->rel2abs($prefix);
130
-}
131
-
132
-if ($^O eq 'MSWin32') {
133
-    my $jar_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'runtime');
134
-    my $lib_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'lib');
135
-    my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j.bat');
136
-
137
-    open my $fh, ">", $install_to
138
-        or die "Could not open $install_to: $!";
139
-    print $fh '@java -Xss1m -Xmx512m -Xbootclasspath/a:' . $jar_dir . '\\nqp-runtime.jar;' .
140
-              "$jar_dir\\asm-4.1.jar;$jar_dir\\jline-1.0.jar;$lib_dir\\nqp.jar -cp $lib_dir nqp %*\n";
141
-    close $fh
142
-        or die "Could not close $install_to: $!";
143
-}
144
-else {
145
-    my $nqp_dir = File::Spec->catfile($prefix, qw/share nqp/);
146
-    my $jar_dir = File::Spec->catfile('${NQP_DIR}', 'runtime');
147
-    my $lib_dir = File::Spec->catfile('${NQP_DIR}', 'lib');
148
-    my $jars = "$jar_dir/nqp-runtime.jar:$jar_dir/asm-4.1.jar:$jar_dir/jline-1.0.jar:$lib_dir/nqp.jar";
149
-    my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j');
150
-
151
-    open my $fh, ">", $install_to
152
-        or die "Could not open $install_to: $!";
153
-    print $fh "#!/bin/sh\n";
154
-    print $fh ": \${NQP_DIR:=\"$nqp_dir\"}\n";
155
-    print $fh ": \${NQP_JARS:=\"$jars\"}\n";
156
-    print $fh "exec java -Xss1m -Xmx512m -Xbootclasspath/a:\${NQP_JARS} -cp $lib_dir nqp \"\$\@\"\n";
157
-    close $fh
158
-        or die "Could not close $install_to: $!";
159
-    chmod 0755, $install_to;
160
-}
161
diff --git a/tools/build/install-jvm-runner.pl.in b/tools/build/install-jvm-runner.pl.in
162
new file mode 100644
163
index 0000000..92a1109
164
--- /dev/null
165
+++ b/tools/build/install-jvm-runner.pl.in
166
@@ -0,0 +1,44 @@
167
+#!/usr/bin/perl
168
+# Copyright (C) 2013, The Perl Foundation.
169
+
170
+use strict;
171
+use warnings;
172
+use 5.008;
173
+use File::Spec;
174
+
175
+my ($destdir, $prefix) = @ARGV;
176
+my $realpath = $destdir.$prefix;
177
+
178
+unless (File::Spec->file_name_is_absolute($prefix)) {
179
+    $prefix = File::Spec->rel2abs($prefix);
180
+}
181
+
182
+if ($^O eq 'MSWin32') {
183
+    my $jar_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'runtime');
184
+    my $lib_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'lib');
185
+    my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j.bat');
186
+
187
+    open my $fh, ">", $install_to
188
+        or die "Could not open $install_to: $!";
189
+    print $fh '@java -Xss1m -Xmx512m -Xbootclasspath/a:' . $jar_dir . '\\nqp-runtime.jar;' .
190
+              "$jar_dir\\@asmfile@;$jar_dir\\@jlinefile@;$lib_dir\\nqp.jar -cp $lib_dir nqp %*\n";
191
+    close $fh
192
+        or die "Could not close $install_to: $!";
193
+}
194
+else {
195
+    my $nqp_dir = File::Spec->catfile($prefix, qw/share nqp/);
196
+    my $jar_dir = File::Spec->catfile('${NQP_DIR}', 'runtime');
197
+    my $lib_dir = File::Spec->catfile('${NQP_DIR}', 'lib');
198
+    my $jars = "$jar_dir/nqp-runtime.jar:$jar_dir/@asmfile@:$jar_dir/@jlinefile@:$lib_dir/nqp.jar";
199
+    my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j');
200
+
201
+    open my $fh, ">", $install_to
202
+        or die "Could not open $install_to: $!";
203
+    print $fh "#!/bin/sh\n";
204
+    print $fh ": \${NQP_DIR:=\"$nqp_dir\"}\n";
205
+    print $fh ": \${NQP_JARS:=\"$jars\"}\n";
206
+    print $fh "exec java -Xss1m -Xmx512m -Xbootclasspath/a:\${NQP_JARS} -cp $lib_dir nqp \"\$\@\"\n";
207
+    close $fh
208
+        or die "Could not close $install_to: $!";
209
+    chmod 0755, $install_to;
210
+}
(-)a/dev-lang/nqp/nqp-2016.04.ebuild (-1 / +72 lines)
Line 0 Link Here
0
- 
1
# Copyright 1999-2016 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
4
5
EAPI=6
6
7
inherit java-pkg-2
8
9
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
10
HOMEPAGE="http://rakudo.org/"
11
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
12
13
LICENSE="Artistic-2"
14
SLOT="0"
15
KEYWORDS="~x86 ~amd64"
16
IUSE="doc java +moar"
17
REQUIRED_USE="|| ( java moar )"
18
19
RDEPEND="
20
	java? ( >=virtual/jre-1.7:*
21
		dev-java/asm:4
22
		dev-java/jline:0 )
23
	moar? ( ~dev-lang/moarvm-${PV} )
24
	dev-libs/libffi"
25
DEPEND="${RDEPEND}
26
	java? ( >=virtual/jdk-1.7:* )
27
	dev-lang/perl"
28
S="${WORKDIR}/perl6-nqp"
29
PATCHES=( "${FILESDIR}/enable-external-jars.patch" )
30
31
pkg_setup() {
32
	use java && java-pkg-2_pkg_setup
33
}
34
35
src_prepare() {
36
	eapply "${PATCHES[@]}"
37
	eapply_user
38
	use java && java-pkg-2_src_prepare
39
}
40
41
src_unpack() {
42
	unpack ${A}
43
	mv "${WORKDIR}/perl6-nqp-"* "${WORKDIR}/perl6-nqp" || die
44
}
45
46
src_configure() {
47
	# 2016.04 doesn't like our jna-3.4.1
48
	local backends
49
	use java && backends+="jvm,"
50
	use moar && backends+="moar"
51
	local myconfargs=(
52
		"--backend=${backends}"
53
		"--with-asm=$(echo $(java-pkg_getjars asm-4) | tr : '\n' | grep '/asm\.jar$')"
54
		"--with-asm-tree=$(echo $(java-pkg_getjars asm-4) | tr : '\n' | grep '/asm-tree\.jar$')"
55
		"--with-jline=$(echo $(java-pkg_getjars jline) | tr : '\n' | grep '/jline\.jar$')"
56
		"--prefix=/usr" )
57
	perl Configure.pl "${myconfargs[@]}" || die
58
}
59
60
src_compile() {
61
	emake
62
}
63
64
src_install() {
65
	emake DESTDIR="${ED}" install || die
66
67
	dodoc CREDITS README.pod || die
68
69
	if use doc; then
70
		dodoc -r docs/* || die
71
	fi
72
}

Return to bug 580732