diff --git a/print/a2ps/Makefile b/print/a2ps/Makefile index 918c0770cb35..0f87796cda36 100644 --- a/print/a2ps/Makefile +++ b/print/a2ps/Makefile @@ -1,87 +1,87 @@ # Created by: Chuck Robey PORTNAME= a2ps PORTVERSION= 4.13b -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= print MASTER_SITES= GNU LOCAL/hrs/a2ps/:i18n MAINTAINER= dinoex@FreeBSD.org COMMENT= Formats an ASCII file for printing on a postscript printer LICENSE= GPLv2 LIB_DEPENDS= libpaper.so:print/libpaper PORTSCOUT= skipv:4.14 USES= perl5 cpe USE_CSTD= gnu89 GNU_CONFIGURE= yes USE_LDCONFIG= yes INFO= a2ps ogonkify regex WRKSRC= ${WRKDIR}/${PORTNAME}-4.13 I18N_PACKAGE= i18n-fonts-0.1 CPE_VENDOR= gnu CONFIGURE_ARGS= --with-medium=libpaper --sharedstatedir=${PREFIX}/share \ --sysconfdir=${PREFIX}/etc --datadir=${PREFIX}/share \ --localstatedir=${PREFIX}/share LIBS+= -L${LOCALBASE}/lib PAPERSIZE?= .if ${PAPERSIZE:tl} == a4 RUN_DEPENDS+= ${LOCALBASE}/etc/papersize:print/papersize-default-a4 .endif OPTIONS_DEFINE=NLS I18N EMACS NO_OPTIONS_SORT=yes OPTIONS_SUB= yes EMACS_DESC=Enable Emacs support I18N_DESC=Enable I18N support NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls EMACS_USES= emacs:build EMACS_CONFIGURE_ON= --with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR} .include .if ! ${PORT_OPTIONS:MEMACS} CONFIGURE_ENV+= EMACS=no .endif .if ${OPSYS} == FreeBSD && ${OSVERSION} > 1300512 CFLAGS+= -DHAVE_MEMPCPY .endif post-patch: ${REINPLACE_CMD} -e 's|^DESTDIR|#DESTDIR|' \ `${FIND} ${WRKSRC} -name "Makefile.in"` .if ${PORT_OPTIONS:MI18N} #DISTFILES+= ${I18N_PACKAGE}${EXTRACT_SUFX}:i18n DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${I18N_PACKAGE}${EXTRACT_SUFX}:i18n pre-configure: cd ${WRKDIR}/${I18N_PACKAGE}/afm && \ ${ECHO_CMD} *.afm > afms.lst && \ ${MV} *.afm ${WRKSRC}/afm cd ${WRKDIR}/${I18N_PACKAGE}/fonts && \ ${MV} *.pfb ${WRKSRC}/fonts post-configure: @cd ${WRKSRC}/fonts && { ${ECHO_CMD} ''; \ ${ECHO_CMD} "pfb_fonts =" *.pfb; } >> Makefile && \ ${REINPLACE_CMD} 's,^\(fonts_DATA = .*\),\1 $$(pfb_fonts),' Makefile @cd ${WRKSRC}/afm && { ${ECHO_CMD} ''; \ ${ECHO_CMD} "i18n_afms =" `cat ${WRKDIR}/${I18N_PACKAGE}/afm/afms.lst`; } >> Makefile && \ ${REINPLACE_CMD} 's,^\(all_afms = .*\),\1 $$(i18n_afms),' Makefile .endif post-install: cd ${WRKSRC}/doc && \ ${SETENV} ${MAKE_ENV} ${MAKE} ${.MAKEFLAGS} ${MAKE_ARGS} ${INSTALL_TARGET} ${RM} ${STAGEDIR}${PREFIX}/lib/liba2ps.la .include diff --git a/print/a2ps/files/patch-contrib-tmpdircreation b/print/a2ps/files/patch-contrib-tmpdircreation index 6c1e8059a985..b975735d7df3 100644 --- a/print/a2ps/files/patch-contrib-tmpdircreation +++ b/print/a2ps/files/patch-contrib-tmpdircreation @@ -1,116 +1,96 @@ diff -ru contrib.orig/card.in contrib/card.in --- contrib.orig/card.in 2000-01-27 00:42:36 UTC +++ contrib/card.in @@ -38,7 +38,7 @@ LC_ALL="${LC_ALL-C}" export LC_ALL print_form_feeds=: RM="/bin/rm -rf" -tmp_dir=${TMPDIR-/tmp}/$program.$$ +tmp_dir=$(mktemp -d -t ${program}) || exit 1 tmp_file=$tmp_dir/card success=false verbose=: @@ -190,7 +190,6 @@ # Create a tmp dir and be ready to clean up trap "$RM $tmp_dir" 0 1 2 15 -(umask 077 && mkdir $tmp_dir) || exit 1 case $LC_ALL in fr) footer="Engendré par $version_short" ;; -diff -ru contrib.orig/fixps.in contrib/fixps.in ---- contrib.orig/fixps.in 2000-02-21 08:16:15 UTC -+++ contrib/fixps.in -@@ -38,7 +38,7 @@ - run_gs=0 - # What action to perform: fixps, cat, check, and gs - task=fixps --tmpdir=/tmp/$program.$$ -+tmpdir=$(mktemp -d -t ${program}) || exit 1 - verbose=echo - - # The version/usage strings -@@ -191,7 +191,6 @@ - trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15 - fi - --mkdir $tmpdir - fixps_sed=$tmpdir/fixps.sed - - # If printing from stdin, save into a tmp file diff -ru contrib.orig/pdiff.in contrib/pdiff.in --- contrib.orig/pdiff.in 1999-10-24 15:07:51 UTC +++ contrib/pdiff.in @@ -34,7 +34,7 @@ diff_options='-u' file= output= -tmpdir=/tmp/$program.$$ +tmpdir=$(mktemp -d -t ${program}) || exit 1 verbose=echo wdiff_prog=${WDIFF:-wdiff} wdiff_options='-w[wd- -x-wd] -y{wd+ -z+wd}' diff -ru contrib.orig/psmandup.in contrib/psmandup.in --- contrib.orig/psmandup.in 1999-10-24 13:06:42 UTC +++ contrib/psmandup.in @@ -36,7 +36,7 @@ message= psselect=${PSSELECT:-psselect} psset=${PSSET:-psset} -tmpdir=/tmp/$program.$$ +tmpdir=$(mktemp -d -t ${program}) || exit 1 # These two must be kept in synch. They are opposed. verbose=echo @@ -184,8 +184,6 @@ # Temp dir. Get ready not to leave junk (if not debugging) trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15 fi - -mkdir $tmpdir # If printing from stdin, save into a tmp file if test $file = '-'; then diff -ru contrib.orig/psset.in contrib/psset.in --- contrib.orig/psset.in 1999-10-24 12:41:46 UTC +++ contrib/psset.in @@ -33,7 +33,7 @@ output=- pagedevices= # `;' separated list of `key:value' quiet=: # i.e., verbose -tmpdir=${TMPDIR:-/tmp}/$program.$$ +tmpdir=$(mktemp -d -t ${program}) || exit 1 sedscript=$tmpdir/psset.sed # The version/usage strings @@ -185,8 +185,6 @@ echo "$help" 1>&2 exit 1;; esac - -mkdir $tmpdir if test -n "$debug"; then # Set -x now if debugging diff -ru contrib.orig/texi2dvi4a2ps contrib/texi2dvi4a2ps --- contrib.orig/texi2dvi4a2ps 2000-02-24 17:45:31 UTC +++ contrib/texi2dvi4a2ps @@ -91,7 +91,7 @@ quiet= # by default let the tools' message be displayed set_language= textra= -tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems. +tmpdir=$(mktemp -d -t ${program}) || exit 1 txincludes= # TEXINPUTS extensions txiprereq=19990129 # minimum texinfo.tex version to have macro expansion verbose=false # echo for verbose mode @@ -202,9 +202,6 @@ if test -z "$debug"; then trap "cd / && rm -rf $tmpdir" 0 1 2 15 fi - -# Create the temporary directory with strict rights -(umask 077 && mkdir $tmpdir) || exit 1 # Prepare the tools we might need. This may be extra work in some # cases, but improves the readibility of the script.