print/texlive-base: Fix pdfjam regex issue

On FreeBSD >= 13.0 the pdfjam script throws an error:

pdfjam "input.pdf" 1-20 -o output.pdf
sed: 1: "/\\\usepackage{hyperref}/d": RE error: trailing backslash (\)
sed: 1: "/\\\hypersetup.*/d": RE error: trailing backslash (\)
sed: 1: "/\\\usepackage.*{geomet ...": RE error: trailing backslash (\)
sed: 1: "/\\\usepackage.*{color}/d": RE error: trailing backslash (\)

While here, pet portfmt.

PR:		255232
Reported by:	Gordon <gordon.friedman@hotmail.com>
MFH:		2022Q1

Approved by:	Hiroki Sato <hrs@FreeBSD.org> (maintainer timeout)
This commit is contained in:
Rainer Hurling 2022-01-17 22:00:34 +01:00
parent 33d3c043b0
commit 56f9e4aaa7
2 changed files with 30 additions and 3 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= texlive
PORTVERSION= 20150521
PORTREVISION= 76
PORTREVISION= 77
CATEGORIES= print
MASTER_SITES= TEX_CTAN/systems/texlive/Source/
PKGNAMESUFFIX= -base
@ -66,8 +66,6 @@ SHEBANG_FILES= texk/texlive/linked_scripts/accfonts/mkt1font \
texk/texlive/linked_scripts/urlbst/urlbst \
texk/texlive/linked_scripts/yplan/yplan
BINARY_ALIAS= freetype-config=true
# during build phase gnu configure is run a lot
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-native-texlive-build \
@ -105,7 +103,10 @@ MAKE_ENV= CONFIG_SITE=${CONFIG_SITE}
INSTALL_TARGET= install-strip
CONFLICTS_INSTALL= detex dvi2tty ps2eps texlive-texmf
BINARY_ALIAS= freetype-config=true
EXTRACT_AFTER_ARGS= ${EXCLUDE_FILES:S,^,--exclude ,}
INFO= dvipng tlbuild
PLIST_SUB= INSTALL_DATA="${INSTALL_DATA}"

View File

@ -0,0 +1,26 @@
--- texk/texlive/linked_scripts/pdfjam/pdfjam.orig 2013-03-12 00:01:41 UTC
+++ texk/texlive/linked_scripts/pdfjam/pdfjam
@@ -1143,19 +1143,19 @@ EndTemplate
) > $texFile
if test "$hyperref" = false; then ## we don't need hyperref
cp $texFile $tempFile
- sed '/\\\usepackage{hyperref}/d' $tempFile | \
- sed '/\\\hypersetup.*/d' > "${texFile}"
+ sed '/\\usepackage{hyperref}/d' $tempFile | \
+ sed '/\\hypersetup.*/d' > "${texFile}"
rm $tempFile
fi
if test -z "$geometry" ; then geometry=false ; fi
if test "$geometry" = false; then ## geometry package is not to be used
cp $texFile $tempFile
- cat $tempFile | sed '/\\\usepackage.*{geometry}/d' > $texFile
+ cat $tempFile | sed '/\\usepackage.*{geometry}/d' > $texFile
rm $tempFile
fi
if test -z "$pagecolor"; then ## color package is not needed
cp $texFile $tempFile
- cat $tempFile | sed '/\\\usepackage.*{color}/d' > $texFile
+ cat $tempFile | sed '/\\usepackage.*{color}/d' > $texFile
rm $tempFile
fi
##