From 9ed8d35220efbcdfabf35604c73bcf2fec469265 Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Sun, 20 Nov 2022 09:02:39 +0000 Subject: [PATCH] p5-xml-libxslt: 2.001000 -> 2.002000 --- p5-xml-libxslt/.signature | 7 +- ...7c5f4103d33c352f8559da9654032cc8c44f.patch | 141 ++++++++++++++++++ p5-xml-libxslt/Pkgfile | 9 +- 3 files changed, 152 insertions(+), 5 deletions(-) create mode 100644 p5-xml-libxslt/59547c5f4103d33c352f8559da9654032cc8c44f.patch diff --git a/p5-xml-libxslt/.signature b/p5-xml-libxslt/.signature index 9c8b8ded0..0be5c51b8 100644 --- a/p5-xml-libxslt/.signature +++ b/p5-xml-libxslt/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3+bzENzq6OI9kP7Do42lUbPchdrFmZskatHDsWhbDPOeILBxIPuqYJa6hsqsrw+ESSf9cYMU83woaFchQORkIgs= -SHA256 (Pkgfile) = 22611d28525cb0d3ddee8426895ffad2dde37deefc8d5cd0ecd16f3080e5a446 +RWSagIOpLGJF33EozOyPQreUzx11QXTIYl6c4wTv2PQJc3GbsDAsKAfHQLOEyot3Ml9J+qaRyt5QhT4ujriLxVhz9psy6006EQs= +SHA256 (Pkgfile) = 1962908b993aabca656eed6d7fd4efd05020358f2ee4d9f2baefb9c4f981ba6f SHA256 (.footprint) = 89b7129b5b6919fdfc20885b15981e65fed9e4695d5ab6601291076cb6b12df0 -SHA256 (XML-LibXSLT-2.001000.tar.gz) = 26a1ce025d7e8f8259082061263cb8235ac1fbddafc72de143ee49154b64dcc8 +SHA256 (XML-LibXSLT-2.002000.tar.gz) = 4fd131c5a15f2f79e706810a70f3a5d08a6d1c946dcb39523f2c2ac948118a17 +SHA256 (59547c5f4103d33c352f8559da9654032cc8c44f.patch) = 4f39e24bb5a36283513372a9a2122f1a7efffbc969c527936ec4a0995dab92f8 diff --git a/p5-xml-libxslt/59547c5f4103d33c352f8559da9654032cc8c44f.patch b/p5-xml-libxslt/59547c5f4103d33c352f8559da9654032cc8c44f.patch new file mode 100644 index 000000000..5e3b8f01a --- /dev/null +++ b/p5-xml-libxslt/59547c5f4103d33c352f8559da9654032cc8c44f.patch @@ -0,0 +1,141 @@ +From 59547c5f4103d33c352f8559da9654032cc8c44f Mon Sep 17 00:00:00 2001 +From: Shlomi Fish +Date: Tue, 17 May 2022 17:20:25 +0300 +Subject: [PATCH] Refactoring / code cleanup. + +See: + +* https://en.wikipedia.org/wiki/Code_refactoring + +* https://www.refactoring.com/ + +* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/ + +Some small optimisations may have slipped in as well. +--- + Makefile.PL | 55 ++++++++++++++++++++++++++++++----------------------- + 1 file changed, 31 insertions(+), 24 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index d3ee9d1..079f8ea 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -105,7 +105,7 @@ EOF + $config{LIBS} = '-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm'; + $config{INC} = '-I/usr/local/include -I/usr/include'; + +- print < "Conftest", VERSION_FROM => "Conftest.pm", %config); + EOT + _write_utf8_file("test.pl", <<"EOT"); +-use Test; BEGIN { plan tests => 1; } END { ok(\$loaded) } +-use Conftest; \$loaded++; ++use Test::More tests => 1; ++use Conftest; ++++\$::loaded; ++ok(\$::loaded, "loaded") ; + EOT + xsystem($^X, 'Makefile.PL', map { "$_=$config{$_}" } keys %config); + xsystem($Config{make}, +@@ -432,8 +434,14 @@ sub try_link { + + sub have_library { + my ($lib, $func) = (@_, "blank"); +- printf("checking for %s() in -l%s... ", $func, $lib) if $func ne "blank"; +- printf("looking for -l%s... ", $lib) if $func eq "blank"; ++ if ($func eq "blank") ++ { ++ printf("looking for -l%s... ", $lib); ++ } ++ else ++ { ++ printf("checking for %s() in -l%s... ", $func, $lib); ++ } + + my $result; + if ($func) { +@@ -490,4 +498,3 @@ distruntest: distdir + + MAKE_FRAG + } +- diff --git a/p5-xml-libxslt/Pkgfile b/p5-xml-libxslt/Pkgfile index e76639e91..2af4c7740 100644 --- a/p5-xml-libxslt/Pkgfile +++ b/p5-xml-libxslt/Pkgfile @@ -4,12 +4,17 @@ # Depends on: libxslt p5-xml-libxml name=p5-xml-libxslt -version=2.001000 +version=2.002000 release=1 -source=(https://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-$version.tar.gz) +source=(https://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-$version.tar.gz + 59547c5f4103d33c352f8559da9654032cc8c44f.patch) build() { cd XML-LibXSLT-$version + + # latest change made the Makefile not find libxslt, so we revert that here + patch -Rp1 -i $SRC/59547c5f4103d33c352f8559da9654032cc8c44f.patch + perl Makefile.PL INSTALLDIRS=vendor make make DESTDIR=$PKG install