[libinline-java-perl] 292/398: Changes to reorganize make sequence
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:15 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 7ce66616ef1b6c6ac7a6181a7bd3fb473c1e4288
Author: patrick_leb <>
Date: Sat Feb 28 14:21:29 2004 +0000
Changes to reorganize make sequence
---
Java/Makefile.PL | 18 ++++++++++++++++--
META.yml | 2 +-
Makefile.PL | 43 ++++++++++++++++++++++++++++++-------------
3 files changed, 47 insertions(+), 16 deletions(-)
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index 79e83b0..1ec9906 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -3,7 +3,6 @@ use File::Find ;
use strict ;
use File::Spec ;
-use Config ;
require "Portable.pm" ;
# The file we just produced in the parent Makefile.PL
@@ -129,10 +128,25 @@ if (($build_jni || AskYN("Do you wish to build the JNI extension?", 'y'))){
Inline::Java::Portable::portable('SUB_FIX_MAKE_QUOTES',
"-L" . $files->{$jvm_lib}->{selected})) ;
+ my $DIR = [] ;
+ print <<TXT;
+The PerlNatives extension allows for callbacks to be defined as native
+Java methods. It is still EXPERIMENTAL and may not build or work properly
+on all platforms. See documentation for more details.
+Note: PerlNatives requires J2SDK 1.4 or greater.
+TXT
+ if (AskYN("Do you wish to build the PerlNatives extension?", 'n')){
+ push @{$DIR}, 'Natives' ;
+ }
+
+ # Not quite yet...
+ # push @{$DIR}, 'PerlInterpreter' ;
+
+ print "\n" ;
WriteMakefile(
NAME => 'Inline::Java::JNI',
VERSION_FROM => 'JNI.pm',
- DIR => ['Natives'],
+ DIR => $DIR,
PMLIBDIRS => [File::Spec->catdir('sources', 'org', 'perl', 'inline', 'java')],
INC => join(' ', @main::I),
LIBS => [join(' ', @main::L) . " -ljvm"],
diff --git a/META.yml b/META.yml
index ca4c909..b3e67c3 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Inline-Java
-version: 0.46
+version: 0.47
version_from: Java.pm
installdirs: site
requires:
diff --git a/Makefile.PL b/Makefile.PL
index 61d18a1..a761c8c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,8 +2,8 @@ use ExtUtils::MakeMaker ;
use strict ;
use File::Spec ;
-use Config ;
use Cwd ;
+use Config ;
require "Java/Portable.pm" ;
@@ -15,6 +15,7 @@ for (my $i = 0 ; $i < scalar(@ARGV) ; $i++){
if ($ARGV[$i] =~ /^J2SDK=(.+)$/){
$jdk_dir = $1 ;
splice(@ARGV, $i, 1) ;
+ $i-- ;
}
}
@@ -126,24 +127,22 @@ java ::
MAKE
# Used for PerlNatives
- $INSTALLSITEARCH = $this->{INSTALLSITEARCH} ;
- $INSTALLSITEARCH =~ s/\\/\\\\/g ;
-
- $INST_ARCHLIB = $this->{INST_ARCHLIB} ;
- $INST_ARCHLIB =~ s/\\/\\\\/g ;
+ $INSTALLSITEARCH = expand_macros($this, 'INSTALLSITEARCH') ;
+ $INST_ARCHLIB = expand_macros($this, 'INST_ARCHLIB') ;
return $make ;
}
-# Skip the tests for the Java directory
-sub MY::test {
- my $this = shift ;
+sub expand_macros {
+ my $mm = shift ;
+ my $var = shift ;
+
+ my $val = $mm->{var} ;
+ while ($val =~ s/\$\((.*?)\)/$mm->{$1}/){}
+ $val =~ s/\\/\\\\/g ;
- my $hold = delete $this->{DIR} ;
- my $ret = $this->MM::test(@_) ;
- $this->{DIR} = $hold if defined($hold) ;
- return $ret ;
+ return $val ;
}
@@ -173,6 +172,21 @@ my $install_natives_so = File::Spec->catfile($INSTALLSITEARCH, @natives_so_parts
$install_natives_so =~ s/\\/\\\\/g ;
my $test_natives_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @natives_so_parts)) ;
$test_natives_so =~ s/\\/\\\\/g ;
+
+my @perlinterpreter_so_parts = ("auto", "Inline", "Java", "PerlInterpreter",
+ "PerlInterpreter." . Inline::Java::Portable::portable('SO_EXT')) ;
+my $install_perlinterpreter_so = File::Spec->catfile($INSTALLSITEARCH, @perlinterpreter_so_parts) ;
+$install_perlinterpreter_so =~ s/\\/\\\\/g ;
+my $test_perlinterpreter_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @perlinterpreter_so_parts)) ;
+$test_perlinterpreter_so =~ s/\\/\\\\/g ;
+
+my $libperl = $Config{libperl} ;
+my $dlext = $Config{dlext} ;
+my $libperl_so = '' ;
+if ($libperl =~ /\.$dlext$/){
+ $libperl_so = File::Spec->catfile($Config{installarchlib}, 'CORE', $libperl) ;
+}
+
my $prop = File::Spec->catfile($obj_dir, 'InlineJava.properties') ;
open(PROP, ">$prop") or
die("Can't open '$prop' for writing: $!") ;
@@ -180,6 +194,9 @@ print PROP <<PROP;
# This file is created by the Makefile.PL for Inline::Java
inline_java_natives_so_install = $install_natives_so
inline_java_natives_so_test = $test_natives_so
+inline_java_perlinterpreter_so_install = $install_perlinterpreter_so
+inline_java_perlinterpreter_so_test = $test_perlinterpreter_so
+inline_java_libperl_so = $libperl_so
PROP
close(PROP) ;
--
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