Hi,

pdfjam tries to detect the paper size by using `locale -k`, which
OpenBSD doesn't have, and we have no other way to detect paper size.

Although paper size detection fails, pdfjam continues, just it prints a
confusing error message. I'm not sure if this is important enough to
consider for the release, but then again, it is a simple change.

(This was brought to my attention by Laurie Tratt. He also proposed the
patch)

Thoughts?

Index: Makefile
===================================================================
RCS file: /cvs/ports/print/texlive/texmf/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile    2 Sep 2020 10:42:03 -0000       1.60
+++ Makefile    27 Sep 2020 10:16:17 -0000
@@ -15,7 +15,7 @@ COMMENT-buildset =    smallest texlive texm
 DISTNAME =             texlive-${DIST_V}-texmf
 REVISION-context =     0
 REVISION-docs =                0
-REVISION-full =                0
+REVISION-full =                1
 REVISION-main =                0
 REVISION-buildset =    0
 
Index: patches/patch-texmf-dist_scripts_pdfjam_pdfjam
===================================================================
RCS file: patches/patch-texmf-dist_scripts_pdfjam_pdfjam
diff -N patches/patch-texmf-dist_scripts_pdfjam_pdfjam
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-texmf-dist_scripts_pdfjam_pdfjam      27 Sep 2020 10:31:08 
-0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Index: texmf-dist/scripts/pdfjam/pdfjam
+--- texmf-dist/scripts/pdfjam/pdfjam.orig
++++ texmf-dist/scripts/pdfjam/pdfjam
+@@ -386,24 +386,7 @@ suffix='pdfjam'            ##  Default filename suffix
+ ##                           not specified in a --batch call.
+ ##
+ preamble=''                ##  Default LaTeX preamble string.
+-##
+-##  Guess default paper size from locale if possible, otherwise A4
+-##
+-if command -v locale >/dev/null ; then
+-    paperheight=$(locale -k LC_PAPER | sed -e '1!d' -e 's/.*=//') ;
+-    case $paperheight in
+-      297)
+-          paper='a4paper' ;
+-          ;;
+-      279)
+-          paper='letterpaper' ;
+-          ;;
+-      *)
+-          paper='a4paper' ;
+-          ;;
+-    esac
+-else paper='a4paper' ;  ## fallback paper size is ISO A4
+-fi
++paper='a4paper'
+ ##
+ ##  END OF SETTINGS MADE DIRECTLY WITHIN THE SCRIPT
+ ##

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply via email to