From 9e3dfacb98d78d16b10963dcfeff4011b64505ba Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Sun, 16 Feb 2014 17:09:22 +0000 Subject: [PATCH] - Add NLS option - Support STAGEDIR - Reformat pkg-descr --- x11-fonts/fntsample/Makefile | 74 ++++++++++++----------------------- x11-fonts/fntsample/pkg-descr | 6 +-- 2 files changed, 27 insertions(+), 53 deletions(-) diff --git a/x11-fonts/fntsample/Makefile b/x11-fonts/fntsample/Makefile index 43e083788d78..ac1c3437471a 100644 --- a/x11-fonts/fntsample/Makefile +++ b/x11-fonts/fntsample/Makefile @@ -1,73 +1,47 @@ # Created by: Andrew Pantyukhin # $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 diff --git a/x11-fonts/fntsample/pkg-descr b/x11-fonts/fntsample/pkg-descr index fe6ac67aef0f..44b726b6b657 100644 --- a/x11-fonts/fntsample/pkg-descr +++ b/x11-fonts/fntsample/pkg-descr @@ -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/