summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2022-02-15 20:38:30 +0100
committergregor herrmann <gregoa@debian.org>2022-02-15 20:38:30 +0100
commit42d1f816dc0cffc3296c1280dfa8e3f6281909c0 (patch)
treef8340fa6227fa3cdf561d462e89c14d864ee8174
parent8c91fbc27fdeb37e2e987d98436d979f6a7d81d3 (diff)
parent428d595ea6b58585f080b69e85700ae5b2de2f13 (diff)
New upstream version 0.67
-rw-r--r--.gitignore15
-rw-r--r--.travis.yml39
-rw-r--r--CHANGES5
-rw-r--r--MANIFEST2
-rw-r--r--MANIFEST.SKIP23
-rw-r--r--META.json58
-rw-r--r--META.yml29
-rw-r--r--Makefile.PL38
-rw-r--r--lib/Inline/Java.pm2
-rw-r--r--lib/Inline/Java/Portable.pm16
-rw-r--r--t/16_subclass.t4
-rw-r--r--xt/manifest.t9
12 files changed, 118 insertions, 122 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 690b328..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-MYMETA.*
-MANIFEST*.bak
-Makefile
-Makefile.old
-lib/Inline/Java/InlineJavaServer.jar
-lib/Inline/Java/InlineJavaUser.jar
-Java/classes/
-blib/
-java.ts
-pm_to_blib
-_Inline/
-lib/Inline/Java/default_j2sdk.pl
-*.bs
-*.c
-*.o
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3cc766d..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-language: java
-sudo: false
-jdk:
- - oraclejdk8
- - oraclejdk9
- - openjdk7
-matrix:
- include:
- - jdk: "oraclejdk8"
- env: AUTHOR_TESTING=1 RELEASE_TESTING=1
- - jdk: "oraclejdk8"
- env: COVERAGE=1
- - jdk: "oraclejdk9"
- env: PERL_INLINE_JAVA_JNI=1
-before_install:
- - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
- - source ~/travis-perl-helpers/init
- - local-lib cache
- - perl -V
- - build-dist
- - cp MANIFEST.SKIP $BUILD_DIR # so xt/manifest.t can work right
- - cd $BUILD_DIR # $BUILD_DIR is set by the build-dist command
-install:
- - cpan-install --deps # installs prereqs, including recommends
- - cpan-install --coverage # installs converage prereqs, if enabled
-before_script:
- - coverage-setup
-script:
- - make
- - prove -b t/01_init.t # set up config as parallel races and breaks
- - prove -b -j$(test-jobs) $(test-files) # parallel testing
-after_success:
- - coverage-report
-notifications:
- irc:
- channels:
- - "irc.perl.org#graphql-perl"
- on_failure: always
- skip_join: true
diff --git a/CHANGES b/CHANGES
index 10a05a0..146f08b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,6 @@
-Revision history for Perl extension Inline::Java
-------------------------------------------------
+0.67 2022-02-12
+- remove support for Win95/98/ME
+- append to CLASSPATH in test not set (#10, #11) - thanks @jlberner
0.66 Fri Apr 6 01:26:50 BST 2018
- Fix build on Cygwin [RT#119307] - thanks @mperry2!
diff --git a/MANIFEST b/MANIFEST
index 8089b78..ab6c136 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -91,3 +91,5 @@ t/types.java
TODO
xt/manifest.t
xt/pod_test.t
+META.yml Module YAML meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
deleted file mode 100644
index 334add1..0000000
--- a/MANIFEST.SKIP
+++ /dev/null
@@ -1,23 +0,0 @@
-#!include_default
-^Java/PerlInterpreter/_Inline/
-^Java/PerlInterpreter/MYMETA.*
-^\.git
-^\.travis\.yml$
-^_Inline
-MANIFEST.SKIP.*
-MANIFEST.bak
-Java/classes/InlineJava.properties
-Java/.*\.jar$
-Makefile\.old$
-Makefile$
-Java/default_j2sdk.pl
-Java/MYMETA.*
-java\.ts
-Java.*\.class$
-\.jdat$
-\.c$
-\.o$
-\.bs$
-\.obj$
-\.inl$
-\.swp$
diff --git a/META.json b/META.json
new file mode 100644
index 0000000..95a5c0c
--- /dev/null
+++ b/META.json
@@ -0,0 +1,58 @@
+{
+ "abstract" : "Write Perl classes in Java.",
+ "author" : [
+ "Patrick LeBoutillier <patl@cpan.org>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
+ "license" : [
+ "artistic_2"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : 2
+ },
+ "name" : "Inline-Java",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "7.30"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "7.30",
+ "File::Which" : "0"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Test::CheckManifest" : "0.9"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Inline" : "0.68",
+ "MIME::Base64" : "0",
+ "Test" : "1.13",
+ "perl" : "5.008"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/ingydotnet/Inline-Java",
+ "web" : "https://github.com/ingydotnet/Inline-Java"
+ }
+ },
+ "version" : "0.67",
+ "x_serialization_backend" : "JSON::PP version 4.04"
+}
diff --git a/META.yml b/META.yml
new file mode 100644
index 0000000..27a54a8
--- /dev/null
+++ b/META.yml
@@ -0,0 +1,29 @@
+---
+abstract: 'Write Perl classes in Java.'
+author:
+ - 'Patrick LeBoutillier <patl@cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: '7.30'
+configure_requires:
+ ExtUtils::MakeMaker: '7.30'
+ File::Which: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
+license: artistic_2
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Inline-Java
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ Inline: '0.68'
+ MIME::Base64: '0'
+ Test: '1.13'
+ perl: '5.008'
+resources:
+ repository: https://github.com/ingydotnet/Inline-Java
+version: '0.67'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
index f4ab2e4..1232159 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -78,13 +78,10 @@ $perl_jdk_dir =~ s/'/\'/g ;
# Check directory
my $jdk_bin = Inline::Java::Portable::portable("J2SDK_BIN") ;
my $ext = Inline::Java::Portable::portable('EXE_EXTENSION') ;
-foreach my $f ('javac', 'jar', 'java'){
- if (! -f File::Spec->catfile($jdk_dir, $jdk_bin, $f . $ext)){
- my $bf = File::Spec->catfile($jdk_bin, $f . $ext) ;
- print "Can't locate file '$bf' anywhere under '$jdk_dir'\n" ;
- }
-}
-
+$ENV{PATH} .= $Config{path_sep} . File::Spec->catdir($jdk_dir, $jdk_bin);
+require File::Which;
+print "Can't locate file '$_' in PATH\n"
+ for grep !File::Which::which($_), 'javac', 'jar', 'java';
# Now we have the J2SDK directory and it exists.
# We will create the default_j2sdk.pl file that
@@ -103,8 +100,6 @@ sub Inline::Java::get_default_j2sdk {
return '$perl_jdk_dir' ;
}
1 ;
-
-
J2SDK_PL
close(J2SDK) ;
@@ -115,10 +110,9 @@ or change this default value.
SAVE_J2SDK
-
# We will now add the building of our Java files to the Makefile.
-my $javac = File::Spec->catfile($jdk_dir, $jdk_bin, 'javac' . $ext) ;
-my $jar = File::Spec->catfile($jdk_dir, $jdk_bin, 'jar' . $ext) ;
+my $javac = File::Which::which('javac');
+my $jar = File::Which::which('jar');
my $src_dir = File::Spec->catdir('Java', 'sources', 'org', 'perl', 'inline', 'java') ;
my @src = glob File::Spec->catfile($src_dir, '*.java') ;
my $obj_dir = File::Spec->catdir('Java', 'classes') ;
@@ -136,7 +130,6 @@ my $INSTALLSITEARCH = '' ;
my $INST_ARCHLIB = '' ;
sub MY::postamble {
my $this = shift ;
-
my $java_src = join(' ', @src, File::Spec->catfile($obj_dir, 'InlineJava.properties')) ;
my $make = <<MAKE ;
@@ -191,6 +184,7 @@ WriteMakefile(
XSMULTI => 1,
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '7.30',
+ 'File::Which' => 0,
},
PREREQ_PM => {
Inline => 0.68,
@@ -239,13 +233,10 @@ print J2SDK <<J2SDK_PL;
) ;
}
-
1 ;
J2SDK_PL
close(J2SDK) ;
-
-
# Create the properties that will be included in the jar.
my @perlnatives_so_parts = ("auto", "Inline", "Java", "PerlNatives",
"PerlNatives." . Inline::Java::Portable::portable('SO_EXT')) ;
@@ -284,18 +275,3 @@ inline_java_perlinterpreter_so_test = $test_perlinterpreter_so
inline_java_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" ;
- open(MAKEFILE, "<Makefile") or die "Can't open Makefile for reading" ;
- my @lines = <MAKEFILE> ;
- close(MAKEFILE) ;
- open(MAKEFILE, ">Makefile") or die "Can't open Makefile for writing" ;
- foreach my $line (@lines){
- if ($line !~ /^\s*((\@\[)|(\]))\s*$/){
- print MAKEFILE $line ;
- }
- }
- close(MAKEFILE) ;
-}
diff --git a/lib/Inline/Java.pm b/lib/Inline/Java.pm
index 558b531..38d09d0 100644
--- a/lib/Inline/Java.pm
+++ b/lib/Inline/Java.pm
@@ -7,7 +7,7 @@ use base qw(Inline Exporter);
# Export the cast function if wanted
our @EXPORT_OK = qw(cast coerce study_classes caught jar j2sdk);
-our $VERSION = '0.66';
+our $VERSION = '0.67';
# DEBUG is set via the DEBUG config
our $DEBUG = 0 unless defined $DEBUG;
diff --git a/lib/Inline/Java/Portable.pm b/lib/Inline/Java/Portable.pm
index 3a0adde..31dd3f0 100644
--- a/lib/Inline/Java/Portable.pm
+++ b/lib/Inline/Java/Portable.pm
@@ -1,6 +1,4 @@
package Inline::Java::Portable ;
-@Inline::Java::Portable::ISA = qw(Exporter) ;
-
use strict ;
use Exporter ;
@@ -9,7 +7,8 @@ use Config ;
use File::Find ;
use File::Spec ;
-$Inline::Java::Portable::VERSION = '0.53_90' ;
+our @ISA = qw(Exporter) ;
+our $VERSION = '0.53_90' ;
# Here is some code to figure out if we are running on command.com
# shell under Windows.
@@ -168,7 +167,14 @@ my $map = {
PERL_PARSE_DUP_ENV => '-DPERL_PARSE_DUP_ENV',
BUILD_JNI_BY_DFLT => 1,
J2SDK_BIN => 'bin',
- DEFAULT_J2SDK_DIR => undef,
+ DEFAULT_J2SDK_DIR => sub {
+ # for Ubuntu
+ require File::Which;
+ my $javapath = File::Which::which('java');
+ $javapath = readlink $javapath while defined eval { readlink $javapath };
+ require File::Basename;
+ File::Basename::dirname(File::Basename::dirname($javapath));
+ },
OTHERLDFLAGS => '',
dynamic_lib => {}
},
@@ -266,11 +272,11 @@ sub portable {
my $val = undef ;
if ((defined($map->{$^O}))&&(defined($map->{$^O}->{$key}))){
$val = $map->{$^O}->{$key} ;
- $val = $val->() if ref($val) eq 'CODE' and $key !~ /^SUB_/;
}
else {
$val = $map->{_DEFAULT_}->{$key} ;
}
+ $val = $val->() if ref($val) eq 'CODE' and $key !~ /^SUB_/;
if ($key =~ /^SUB_/){
my $sub = $val ;
diff --git a/t/16_subclass.t b/t/16_subclass.t
index 113fd49..959d69a 100644
--- a/t/16_subclass.t
+++ b/t/16_subclass.t
@@ -6,9 +6,11 @@ use warnings;
package Hi3;
use strict;
use warnings;
+use Config;
+use File::Spec;
BEGIN {
- $ENV{CLASSPATH} .= "t/t16subclass.jar";
+ $ENV{CLASSPATH} = join $Config{path_sep}, grep defined, $ENV{CLASSPATH}, File::Spec->catfile(qw(t t16subclass.jar));
}
use Inline Java => 'STUDY', STUDY => ['t16subclass'];
diff --git a/xt/manifest.t b/xt/manifest.t
index 36b0180..a817ebc 100644
--- a/xt/manifest.t
+++ b/xt/manifest.t
@@ -1,13 +1,12 @@
use strict;
use warnings;
use Test::More;
+use ExtUtils::Manifest;
unless ( $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
+plan tests => 2;
-my $min_tcm = 0.9;
-eval "use Test::CheckManifest $min_tcm";
-plan skip_all => "Test::CheckManifest $min_tcm required" if $@;
-
-ok_manifest();
+is_deeply [ ExtUtils::Manifest::manicheck() ], [], 'missing';
+is_deeply [ ExtUtils::Manifest::filecheck() ], [], 'extra';