Jasper, ports@,
I'd like to backport to portroach in the ports tree
https://github.com/jasperla/portroach/pull/26
It should allow to catch some python packages which is missed right now.
Any objections? Ok?
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/misc/portroach/Makefile,v
diff -u -p -r1.41 Makefile
--- Makefile 10 Jan 2025 11:44:18 -0000 1.41
+++ Makefile 30 Oct 2026 11:29:31 -0000
@@ -3,7 +3,7 @@ COMMENT= OpenBSD ports distfile version
GH_ACCOUNT= jasperla
GH_PROJECT= portroach
GH_TAGNAME= 2.0.11
-REVISION= 8
+REVISION= 9
CATEGORIES= misc
Index: patches/patch-Portroach_SiteHandler_PyPI_pm
===================================================================
RCS file:
/home/cvs/ports/misc/portroach/patches/patch-Portroach_SiteHandler_PyPI_pm,v
diff -u -p -r1.4 patch-Portroach_SiteHandler_PyPI_pm
--- patches/patch-Portroach_SiteHandler_PyPI_pm 10 Jan 2025 11:44:18 -0000
1.4
+++ patches/patch-Portroach_SiteHandler_PyPI_pm 30 Oct 2026 11:29:09 -0000
@@ -10,3 +10,49 @@ Index: Portroach/SiteHandler/PyPI.pm
}
+@@ -115,6 +115,45 @@ sub GetFiles
+ $urls = $json->{urls};
+ foreach my $url (@$urls) {
+ push(@$files, $url->{filename});
++ }
++
++ if ($port->{ver} && $json->{releases} &&
$json->{releases}->{$port->{ver}}) {
++ my @distfiles = split ' ', ($port->{distfiles} || '');
++ my %seen = map { $_ => 1 } @distfiles;
++
++ foreach my $rel (@{$json->{releases}->{$port->{ver}}}) {
++ next unless ($rel->{packagetype} && $rel->{packagetype} eq
'sdist');
++ next unless ($rel->{filename});
++ next if ($seen{$rel->{filename}});
++ push @distfiles, $rel->{filename};
++ $seen{$rel->{filename}} = 1;
++ }
++
++ foreach my $distfile (@distfiles) {
++ next unless ($distfile =~ /^(.*?)\Q$port->{ver}\E(.*)$/);
++ my ($prefix, $suffix) = ($1, $2);
++ my ($name_prefix, $sep) = ($prefix, '');
++ if ($prefix =~ /^(.*?)([-_\.])$/) {
++ ($name_prefix, $sep) = ($1, $2);
++ }
++
++ my %alts;
++ foreach my $ch ('-', '_', '.') {
++ my $alt_prefix = $name_prefix;
++ $alt_prefix =~ s/[-_.]+/$ch/g;
++ $alts{$alt_prefix} = 1;
++ }
++
++ foreach my $alt_prefix (keys %alts) {
++ my $alt = $alt_prefix . $sep . $port->{ver} . $suffix;
++ next if ($alt eq $distfile);
++ next if ($seen{$alt});
++ push @distfiles, $alt;
++ $seen{$alt} = 1;
++ }
++ }
++
++ $port->{distfiles} = join ' ', @distfiles if (@distfiles);
+ }
+ } else {
+ _debug("GET failed: " . $resp->code);
--
wbr, Kirill