[libinline-java-perl] 269/398: added InlineJava.properties file - Not final..
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:13 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 e48fd72bb28f92235d9be7a82ac99a1d84ee216b
Author: patrick_leb <>
Date: Thu Jan 8 19:33:21 2004 +0000
added InlineJava.properties file
- Not final..
---
Makefile.PL | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 45 insertions(+), 12 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index fde6e5a..b67e92a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,26 +1,24 @@
use ExtUtils::MakeMaker ;
-# $Verbose = 2 ;
use strict ;
use File::Spec ;
use Config ;
+use Cwd ;
require "Java/Portable.pm" ;
+$main::build_jni = 'false' ;
+
print "\nWelcome to the Inline::Java installation procedure.\n\n" ;
# Grab the J2SDK argument
-my @new_args = () ;
my $jdk_dir = '' ;
-foreach my $arg (@ARGV){
- if ($arg =~ /^J2SDK=(.+)$/){
+for (my $i = 0 ; $i < scalar(@ARGV) ; $i++){
+ if ($ARGV[$i] =~ /^J2SDK=(.+)$/){
$jdk_dir = $1 ;
- }
- else {
- push @new_args, $_ ;
+ splice(@ARGV, $i, 1) ;
}
}
- at ARGV = @new_args ;
if (! $jdk_dir){
my $def_pl = File::Spec->catfile('Java', 'default_j2sdk.pl') ;
@@ -66,7 +64,7 @@ open(J2SDK, ">$def_jdk") or
die("Can't open '$def_jdk' for writing: $!") ;
print J2SDK <<J2SDK_PL;
# This file is created by the Makefile.PL for Inline::Java
-# You can modify it if you which
+# You can modify it if you wish
use strict ;
# The default J2SDK to use for Inline::Java. You can change
@@ -79,7 +77,6 @@ sub Inline::Java::get_default_j2sdk {
J2SDK_PL
close(J2SDK) ;
-my $ij_site_lib = File::Spec->catdir($Config{installsitelib}, 'Inline', 'Java') ;
print <<SAVE_J2SDK;
Default J2SDK for Inline:Java will be '$jdk_dir'.
See module documentation for information on how to use a different J2SDK
@@ -97,6 +94,12 @@ my $obj_dir = File::Spec->catdir('Java', 'classes') ;
my $server_arch = File::Spec->catfile('Java', 'InlineJavaServer.jar') ;
my $user_arch = File::Spec->catfile('Java', 'InlineJavaUser.jar') ;
+# Create the object diretory because later we need to put the properties
+# file inside it.
+if (! -e $obj_dir){
+ mkdir($obj_dir) or
+ die("Can't create object directory '$obj_dir': $!") ;
+}
sub MY::top_targets {
my $this = shift ;
@@ -110,6 +113,8 @@ MAKE
}
+my $INSTALLSITEARCH = '' ;
+my $INST_ARCHLIB = '' ;
sub MY::postamble {
my $this = shift ;
@@ -118,10 +123,17 @@ sub MY::postamble {
java ::
\@\$(MKPATH) $obj_dir
"$javac" -g -d $obj_dir $src
- "$jar" cf $server_arch -C $obj_dir org
+ "$jar" cf $server_arch -C $obj_dir org -C $obj_dir InlineJava.properties
"$jar" cf $user_arch -C $obj_dir InlineJavaUserClassLink.class
MAKE
+ # Used for PerlNatives
+ $INSTALLSITEARCH = $this->{INSTALLSITEARCH} ;
+ $INSTALLSITEARCH =~ s/\\/\\\\/g ;
+
+ $INST_ARCHLIB = $this->{INST_ARCHLIB} ;
+ $INST_ARCHLIB =~ s/\\/\\\\/g ;
+
return $make ;
}
@@ -156,6 +168,26 @@ WriteMakefile(
) ;
+# Create the properties that will be included in the jar.
+my @jni_so_parts = ("auto", "Inline", "Java", "JNI",
+ "JNI." . Inline::Java::Portable::portable('SO_EXT')) ;
+my $install_jni_so = File::Spec->catfile($INSTALLSITEARCH, @jni_so_parts) ;
+my $test_jni_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @jni_so_parts)) ;
+my $libperl_so = File::Spec->catfile($Config{installarchlib}, 'CORE',
+ Inline::Java::Portable::portable('LIBPERL')) ;
+my $prop = File::Spec->catfile($obj_dir, 'InlineJava.properties') ;
+open(PROP, ">$prop") or
+ die("Can't open '$prop' for writing: $!") ;
+print PROP <<PROP;
+# This file is created by the Makefile.PL for Inline::Java
+jni_so_built = $main::build_jni
+inline_java_jni_so_install = $install_jni_so
+inline_java_jni_so_test = $test_jni_so
+libperl_so = $libperl_so
+PROP
+close(PROP) ;
+
+
# Clean up the Makefile for Win95/98/Me
if (Inline::Java::Portable::portable('COMMAND_COM')){
print "\nFixing Makefile for Win95/98/Me...\n" ;
@@ -175,4 +207,5 @@ my $make = Inline::Java::Portable::portable('MAKE') ;
print "\nYou can continue the installation with the following commands:\n" ;
print " % $make java\n" ;
print " % $make\n" ;
-print " % $make test\n" ;
+print " % $make test\n" ;
+print " % $make install\n" ;
--
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