1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/print/a2ps/Makefile
Baptiste Daroussin 4a4ec28d37 Convert all :U to :tu and :L to :tl
Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a
replacement for :U and :L (which has been marked as deprecated)

bmake which is the default on FreeBSD 10+ only support by default
:tu/:tl a hack has been added at the time to support :U and :L to ease
migration. This hack is now not necessary anymore

Note that this makes the ports tree incompatible with make(1) from
FreeBSD 8.3 or earlier

With hat:	portmgr
2014-05-05 09:45:36 +00:00

96 lines
2.6 KiB
Makefile

# Created by: Chuck Robey <chuckr@FreeBSD.org>
# $FreeBSD$
PORTNAME= a2ps
PORTVERSION= 4.13b
PORTREVISION= 5
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_GNU} \
${MASTER_SITE_LOCAL:S/$/:i18n/}
MASTER_SITE_SUBDIR= ${PORTNAME} hrs/a2ps/:i18n
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Formats an ASCII file for printing on a postscript printer
LICENSE= GPLv2
LIB_DEPENDS= libpaper.so:${PORTSDIR}/print/libpaper
PORTSCOUT= skipv:4.14
USES= perl5
USE_CSTD= gnu89
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
INFO= a2ps ogonkify regex
WRKSRC= ${WRKDIR}/${PORTNAME}-4.13
I18N_PACKAGE= i18n-fonts-0.1
STRIP=
CONFIGURE_ARGS= --with-medium=libpaper --sharedstatedir=${PREFIX}/share \
--sysconfdir=${PREFIX}/etc --datadir=${PREFIX}/share \
--localstatedir=${PREFIX}/share
CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib"
PAPERSIZE?=
.if ${PAPERSIZE:tl} == a4
RUN_DEPENDS+= ${LOCALBASE}/etc/papersize:${PORTSDIR}/print/papersize-default-a4
.endif
OPTIONS_DEFINE=NLS I18N EMACS
OPTIONS_DEFAULT=NLS
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_USE= EMACS=yes
EMACS_CONFIGURE_ON= --with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR}
.include <bsd.port.options.mk>
.if ! ${PORT_OPTIONS:MEMACS}
CONFIGURE_ENV+= EMACS=no
.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:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/a2ps
.if ${PORT_OPTIONS:MEMACS}
${MKDIR} ${STAGEDIR}${PREFIX}/lib/xemacs/site-lisp
${LN} -sf ${PREFIX}/share/emacs/site-lisp/a2ps-print.el \
${STAGEDIR}${PREFIX}/lib/xemacs/site-lisp/a2ps-print.el
${LN} -sf ${PREFIX}/share/emacs/site-lisp/a2ps.el \
${STAGEDIR}${PREFIX}/lib/xemacs/site-lisp/a2ps.el
.endif
cd ${WRKSRC}/doc && \
${SETENV} ${MAKE_ENV} ${MAKE} ${.MAKEFLAGS} ${MAKE_ARGS} ${INSTALL_TARGET}
${RM} -f ${STAGEDIR}${PREFIX}/lib/liba2ps.la
.include <bsd.port.mk>