aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts/fntsample/Makefile
blob: 3d8b715ac9a24cea5b4fe5075a71ae596af0d894 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# New ports collection makefile for:    fntsample
# Date created:     22 January 2007
# Whom:         Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME?=  fntsample
PORTVERSION=    3.0
PORTREVISION?=  0
CATEGORIES?=    x11-fonts
MASTER_SITES=   SF http://unicode.org/Public/5.1.0/ucd/:unidata
MASTER_SITE_SUBDIR= fntsample
DISTNAME=   fntsample-${PORTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} Blocks.txt:unidata
EXTRACT_ONLY=   ${DISTFILES:M*gz}

MAINTAINER= ports@FreeBSD.org
COMMENT?=   Show Unicode coverage of a font

USE_PERL5_RUN=  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

MAN1=       ${PORTNAME}.1
PLIST_FILES=    bin/${PORTNAME}
.else
BUILD_DEPENDS=  gawk:${PORTSDIR}/lang/gawk
RUN_DEPENDS=    pdfoutline:${PORTSDIR}/textproc/pdfoutline

USE_GNOME=  pango
USE_GETTEXT=    yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-unicode-blocks=${WRKSRC}/Blocks.txt

MAN1=       ${PORTNAME}.1
PLIST_FILES=    bin/${PORTNAME} share/locale/uk/LC_MESSAGES/${PORTNAME}.mo
.endif

post-extract:
.if !defined(PDFOUTLINE)
    @${CP} ${DISTDIR}/${DIST_SUBDIR}/Blocks.txt ${WRKSRC}
.endif

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

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

.include <bsd.port.mk>