aboutsummaryrefslogtreecommitdiffstats
path: root/converters/recode/Makefile
blob: 158e37a9ec4e4dc1dcc68a3c2de13554650479b5 (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
# New ports collection makefile for:    recode
# Date created:     14 Jul 1995
# Whom:         torstenb@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   recode
PORTVERSION=    3.6
CATEGORIES= converters
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= recode

MAINTAINER= demon@FreeBSD.org

LIB_DEPENDS=    intl.1:${PORTSDIR}/devel/gettext

USE_LIBTOOL=    yes
INSTALLS_SHLIB= yes
CONFIGURE_ENV=  CPPFLAGS=-I${LOCALBASE}/include \
        LDFLAGS=-L${LOCALBASE}/lib \
        LIBS=-lintl

MAN1=       recode.1

post-extract: copy-po-files remove-info-files

copy-po-files:
    @${CP} ${FILESDIR}/ru.po ${WRKSRC}/i18n

remove-info-files:
    @${RM} -f ${WRKSRC}/doc/${PORTNAME}.info*

post-patch: patch-po-files patch-configure patch-makeinfo

patch-po-files:
    @${PERL} -pi -e '\
        if (/Project-Id-Version/) { \
            s/3\.[45](r|\.[0-9])?/3.6/; \
            s/: (Free )?recode/: GNU recode/; \
        } \
    ' ${WRKSRC}/i18n/*.po

patch-configure:
    @${PERL} -pi -e 's|DATADIRNAME=lib|DATADIRNAME=share|g' \
        ${WRKSRC}/configure

patch-makeinfo:
    @${PERL} -pi.fbsd -e 's|\@MAKEINFO\@|\@MAKEINFO\@ --no-split|g' \
        ${WRKSRC}/doc/Makefile.in

.include <bsd.port.mk>