1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Add NLS option

- Support STAGEDIR
- Reformat pkg-descr
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2014-02-16 17:09:22 +00:00
parent ff20808b9d
commit 9e3dfacb98
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344611
2 changed files with 27 additions and 53 deletions

View File

@ -1,73 +1,47 @@
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$
PORTNAME?= fntsample
PORTNAME= fntsample
PORTVERSION= 3.2
PORTREVISION?= 1
CATEGORIES?= x11-fonts
MASTER_SITES= SF/fntsample/fntsample/${PORTVERSION} http://unicode.org/Public/6.0.0/ucd/:unidata
DISTNAME= fntsample-${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} Blocks.txt:unidata
EXTRACT_ONLY= ${DISTFILES:M*gz}
PORTREVISION= 1
CATEGORIES= x11-fonts
MASTER_SITES= SF/fntsample/fntsample/${PORTVERSION} \
http://unicode.org/Public/6.0.0/ucd/:unidata
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
Blocks.txt:unidata
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT?= Show Unicode coverage of a font
COMMENT= Show Unicode coverage of a font
LICENSE= GPLv3
USE_PERL5= run
USES= perl5 pkgconfig
BUILD_DEPENDS= ${LOCALBASE}/bin/gawk:${PORTSDIR}/lang/gawk
RUN_DEPENDS= ${LOCALBASE}/bin/pdfoutline:${PORTSDIR}/textproc/pdfoutline
MAN1= ${PORTNAME}.1
OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
.if defined(PDFOUTLINE)
RUN_DEPENDS+= p5-Locale-libintl>=0:${PORTSDIR}/devel/p5-Locale-libintl \
p5-PDF-API2>=0:${PORTSDIR}/textproc/p5-PDF-API2
NO_BUILD= yes
PLIST_FILES= bin/${PORTNAME}
.else
BUILD_DEPENDS+= gawk:${PORTSDIR}/lang/gawk
RUN_DEPENDS+= pdfoutline:${PORTSDIR}/textproc/pdfoutline
CONFIGURE_ARGS+=--disable-silent-rules \
CONFIGURE_ARGS= --disable-silent-rules \
--with-unicode-blocks=${WRKSRC}/Blocks.txt
GNU_CONFIGURE= yes
USE_GNOME= pango
USES+= gettext
USE_PERL5= run
USES= gettext perl5 pkgconfig
PLIST_FILES= bin/${PORTNAME} share/locale/uk/LC_MESSAGES/${PORTNAME}.mo
.endif
PLIST_FILES= bin/${PORTNAME} \
man/man1/${PORTNAME}.1.gz \
%%NLS%%share/locale/uk/LC_MESSAGES/${PORTNAME}.mo
NO_STAGE= yes
post-extract:
.if !defined(PDFOUTLINE)
@${CP} ${DISTDIR}/${DIST_SUBDIR}/Blocks.txt ${WRKSRC}
.endif
@${CP} ${DISTDIR}/${DIST_SUBDIR}/Blocks.txt ${WRKSRC}/
post-patch:
.if defined(PDFOUTLINE)
@${SED} -e 's|##PACKAGE##|fntsample|g ; \
s|##LOCALEDIR##|${PREFIX}/share/locale|g' \
${WRKSRC}/${PORTNAME}.pl > ${WRKSRC}/${PORTNAME}
@${SED} -e 's|@DATE@|2008-10-22|g' \
${WRKSRC}/${PORTNAME}.1.in > ${WRKSRC}/${PORTNAME}.1
.else
@${REINPLACE_CMD} -e \
's|^bin_SCRIPTS|#bin_SCRIPTS|g' ${WRKSRC}/Makefile.in
.endif
@${REINPLACE_CMD} -e '/^bin_SCRIPTS/d' ${WRKSRC}/Makefile.in
do-install:
.if defined(PDFOUTLINE)
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1
.else
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1
@${MKDIR} ${PREFIX}/share/locale/uk/LC_MESSAGES
${INSTALL_DATA} ${WRKSRC}/po/uk.gmo \
${PREFIX}/share/locale/uk/LC_MESSAGES/${PORTNAME}.mo
.endif
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1/
${INSTALL_DATA} ${WRKSRC}/po/uk.gmo ${STAGEDIR}${PREFIX}/share/locale/uk/LC_MESSAGES/${PORTNAME}.mo
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
A program for making font samples that show Unicode coverage of the
font and are similar in appearance to Unicode charts. Samples can be
saved as PDF or PostScript files.
A program for making font samples that show Unicode coverage of the font and are
similar in appearance to Unicode charts. Samples can be saved as PDF or
PostScript files.
WWW: http://fntsample.sourceforge.net/