[libinline-java-perl] 306/398: added so_dirs shortcut
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit b876c03c83d5a41a39ee3c862c6a66878e719f2c
Author: patrick_leb <>
Date: Sun Mar 28 18:31:23 2004 +0000
added so_dirs shortcut
---
Java.pm | 6 ++++++
Java/Makefile.PL | 5 ++---
Makefile.PL | 25 ++++++++++++++++++++++++-
3 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/Java.pm b/Java.pm
index a0d1ee0..261ede5 100644
--- a/Java.pm
+++ b/Java.pm
@@ -91,6 +91,12 @@ sub import {
Inline::Java::get_default_j2sdk() . "'\n" ;
exit() ;
}
+ elsif ($a eq 'so_dirs'){
+ print portable('SO_LIB_PATH_VAR') . "=" .
+ join(portable('ENV_VAR_PATH_SEP'),
+ Inline::Java::get_default_j2sdk_so_dirs()) ;
+ exit() ;
+ }
}
Inline::Java->export_to_level(1, @_) ;
}
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index 34b29fb..711d55d 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -116,11 +116,10 @@ if (($build_jni || AskYN("Do you wish to build the JNI extension?", 'y'))){
"use the JNI configuration option or set the PERL_INLINE_JAVA_JNI environment\n" .
"variable to a true value. You will also need to add the following directories\n" .
"to your " . Inline::Java::Portable::portable('SO_LIB_PATH_VAR') . " environment variable:\n" ;
- map {print " $_\n"; } keys %so_dirs ;
+ @main::SO_DIRS = keys %so_dirs ;
+ map {print " $_\n"; } @main::SO_DIRS ;
print "See README.JNI for more information.\n\n" ;
- # Add these so_dirs to the default_j2sdk.pl file.
-
@main::I = (
Inline::Java::Portable::portable('SUB_FIX_MAKE_QUOTES',
"-I" . $files->{'jni.h'}->{selected}),
diff --git a/Makefile.PL b/Makefile.PL
index 89fc5cb..bc69a78 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -71,8 +71,9 @@ use strict ;
sub Inline::Java::get_default_j2sdk {
return '$perl_jdk_dir' ;
}
-
1 ;
+
+
J2SDK_PL
close(J2SDK) ;
@@ -167,6 +168,28 @@ WriteMakefile(
) ;
+# Add the so_dirs to the default_j2sdk.pl file.
+open(J2SDK, ">>$def_jdk") or
+ die("Can't open '$def_jdk' for appending: $!") ;
+print J2SDK <<J2SDK_PL;
+sub Inline::Java::get_default_j2sdk_so_dirs {
+ return (
+J2SDK_PL
+foreach my $d (@main::SO_DIRS){
+ $d =~ s/'/\'/g ;
+ print J2SDK "\t\t'$d',\n" ;
+}
+print J2SDK <<J2SDK_PL;
+ ) ;
+}
+
+
+1 ;
+J2SDK_PL
+close(J2SDK) ;
+
+
+
# Create the properties that will be included in the jar.
my @natives_so_parts = ("auto", "Inline", "Java", "Natives",
"Natives." . Inline::Java::Portable::portable('SO_EXT')) ;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list