Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions dev/import-perl5/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,15 @@ imports:
type: directory

# Test::Harness - Test harness for running tests (needed by CPAN make test)
# Protected because we filter out jar: paths from @INC for child processes
- source: perl5/cpan/Test-Harness/lib/Test/Harness.pm
target: src/main/perl/lib/Test/Harness.pm
protected: true

# TAP::Parser::Iterator::Process - Protected because we handle missing fork
- source: perl5/cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm
target: src/main/perl/lib/TAP/Parser/Iterator/Process.pm
protected: true

# TAP - Test Anything Protocol modules (required by Test::Harness)
- source: perl5/cpan/Test-Harness/lib/TAP
Expand Down Expand Up @@ -531,8 +538,10 @@ imports:
target: src/main/perl/lib/Getopt/Std.pm

# Pod::Perldoc - Look up Perl documentation (for jcpan -h)
# Protected because we added case-insensitive Pod/ directory search for JAR paths
- source: perl5/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm
target: src/main/perl/lib/Pod/Perldoc.pm
protected: true
- source: perl5/cpan/Pod-Perldoc/lib/Pod/Perldoc
target: src/main/perl/lib/Pod/Perldoc
type: directory
Expand Down Expand Up @@ -688,6 +697,46 @@ imports:
- source: perl5/pod
target: src/main/perl/lib/pod
type: directory
exclude:
# Build artifacts that shouldn't be copied
- .gitignore
- Makefile
- Makefile.SH
- buildtoc
- perlmodlib.PL
- rofftoc
- roffitall
- splitman
- splitpod
# Broken symlinks pointing to ../README.* (don't exist in target)
- perlaix.pod
- perlamiga.pod
- perlandroid.pod
- perlbs2000.pod
- perlcn.pod
- perlcygwin.pod
- perlfreebsd.pod
- perlhaiku.pod
- perlhpux.pod
- perlhurd.pod
- perlirix.pod
- perljp.pod
- perlko.pod
- perllinux.pod
- perlmacosx.pod
- perlopenbsd.pod
- perlos2.pod
- perlos390.pod
- perlos400.pod
- perlplan9.pod
- perlqnx.pod
- perlriscos.pod
- perlsolaris.pod
- perlsynology.pod
- perltru64.pod
- perltw.pod
- perlvos.pod
- perlwin32.pod

# Add more imports below as needed
# Example with minimal fields:
Expand Down
25 changes: 21 additions & 4 deletions dev/import-perl5/sync.pl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ sub parse_yaml {
elsif ($line =~ /^\s+protected:\s*(.+)/) {
$current_import->{protected} = ($1 =~ /true|yes|1/i) ? 1 : 0;
}
elsif ($line =~ /^\s+exclude:\s*$/) {
# Start of exclude list
$current_import->{exclude} = [];
}
elsif ($line =~ /^\s+-\s+(.+)/ && $current_import->{exclude}) {
# Exclude list item
push @{$current_import->{exclude}}, $1;
}
}
}
push @imports, $current_import if $current_import;
Expand All @@ -51,7 +59,8 @@ sub parse_yaml {
sub apply_patch {
my ($target, $patch_file) = @_;

my $cmd = "patch -p0 '$target' < '$patch_file'";
# --no-backup-if-mismatch prevents creating .orig files
my $cmd = "patch --no-backup-if-mismatch -p0 '$target' < '$patch_file'";
print " Applying patch: $patch_file\n";

my $result = system($cmd);
Expand All @@ -64,7 +73,7 @@ sub apply_patch {

# Copy a directory recursively using rsync
sub copy_directory {
my ($source, $target, $project_root, $protected_files) = @_;
my ($source, $target, $project_root, $protected_files, $exclude_patterns) = @_;

# Build rsync command with exclusions for protected files
my $cmd = "rsync -a";
Expand All @@ -88,6 +97,14 @@ sub copy_directory {
}
}

# Add explicit exclude patterns from config
if ($exclude_patterns && @$exclude_patterns) {
for my $pattern (@$exclude_patterns) {
$cmd .= " --exclude='$pattern'";
print " Excluding pattern: $pattern\n";
}
}

$cmd .= " '$source/' '$target/'";
print " Running: $cmd\n";

Expand Down Expand Up @@ -167,8 +184,8 @@ sub main {
};
}

# Copy directory using rsync (with protected file exclusions)
unless (copy_directory($source, $target, $project_root, \@protected_files)) {
# Copy directory using rsync (with protected file exclusions and explicit excludes)
unless (copy_directory($source, $target, $project_root, \@protected_files, $import->{exclude})) {
$error_count++;
next;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/perlonjava/core/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class Configuration {
* Automatically populated by Gradle/Maven during build.
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String gitCommitId = "6331b9337";
public static final String gitCommitId = "6b6a8bf44";

/**
* Git commit date of the build (ISO format: YYYY-MM-DD).
Expand Down
Loading