PSUtils.pm calls paperconf -s. It seems that somewhen the output changed
and the regex no longer matches. For me paperconf -s output is:
        paperconf -s
        595.276 841.89

The following update seems to make psnup work again for me.

-- 
:wq Claudio

Index: Makefile
===================================================================
RCS file: /cvs/ports/print/psutils/Makefile,v
retrieving revision 1.55
diff -u -p -r1.55 Makefile
--- Makefile    28 Dec 2021 08:36:23 -0000      1.55
+++ Makefile    11 Mar 2022 09:28:05 -0000
@@ -5,6 +5,7 @@ PKG_ARCH=       *
 COMMENT=       utilities for manipulating PostScript documents
 
 V=             2.08
+REVISION=      0
 DISTNAME=      psutils-${V}
 
 CATEGORIES=    print
Index: patches/patch-PSUtils_pm
===================================================================
RCS file: /cvs/ports/print/psutils/patches/patch-PSUtils_pm,v
retrieving revision 1.7
diff -u -p -r1.7 patch-PSUtils_pm
--- patches/patch-PSUtils_pm    28 Dec 2021 08:36:23 -0000      1.7
+++ patches/patch-PSUtils_pm    11 Mar 2022 09:27:08 -0000
@@ -14,12 +14,14 @@ Index: PSUtils.pm
    my $out;
    run3 $cmd, undef, \$out, $silent ? \undef : undef, 
{return_if_system_error=>1};
    Die("could not run `paper' command") if $? == -1;
-@@ -73,7 +73,7 @@ sub paper {
+@@ -73,8 +73,8 @@ sub paper {
  sub paper_size {
    my ($paper_name) = @_;
    chomp($paper_name = paper([])) unless defined($paper_name);
 -  my $dimensions = paper(["--unit=pt", "$paper_name"], 1) or return;
+-  $dimensions =~ / ([.0-9]+)x([.0-9]+) pt$/;
 +  my $dimensions = paper(["-s", "$paper_name"], 1) or return;
-   $dimensions =~ / ([.0-9]+)x([.0-9]+) pt$/;
++  $dimensions =~ /^([.0-9]+) ([.0-9]+)$/;
    my $old_locale = setlocale(LC_ALL);
    setlocale(LC_ALL, "");
+   my ($w, $w_unparsed) = strtod($1);

Reply via email to