blob: 8d90cd7d22853d89117d35a180a6fb8d8f450e1b (
plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# New ports collection makefile for: gettext
# Date created: 16 March 1998
# Whom: Yukihiro Nakai <Nakai@technologist.com>
#
# $FreeBSD$
#
PORTNAME= gettext
PORTVERSION= 0.13.1
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gettext
MAINTAINER= ports@FreeBSD.org
COMMENT= GNU gettext package
LIB_DEPENDS= expat.5:${PORTSDIR}/textproc/expat2
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
USE_ICONV= yes
CONFIGURE_ENV= ACLOCAL="${TRUE}" \
AUTOCONF="${TRUE}" \
AUTOMAKE="${TRUE}" \
AUTOHEADER="${TRUE}" \
MAKEINFO="makeinfo --no-split" \
CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-libexpat-prefix=${LOCALBASE}/lib \
--mandir=${PREFIX}/man
INSTALLS_SHLIB= yes
OPTIONS= EXAMPLES "install example files" off \
HTMLMAN "install man pages in HTML format" off
PLIST= ${WRKDIR}/plist
PLISTU= ${WRKDIR}/plist-unsorted
PLIST_SUB= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
VERSION=${PORTVERSION}
MAN1= autopoint.1 gettext.1 gettextize.1 msgattrib.1 msgcat.1 \
msgcmp.1 msgcomm.1 msgconv.1 msgen.1 msgexec.1 \
msgfilter.1 msgfmt.1 msggrep.1 msginit.1 msgmerge.1 \
msgunfmt.1 msguniq.1 ngettext.1 xgettext.1 envsubst.1
MAN3= bind_textdomain_codeset.3 bindtextdomain.3 dcgettext.3 \
dcngettext.3 dgettext.3 dngettext.3 gettext.3 ngettext.3 \
textdomain.3
INFO= autosprintf gettext
.ifdef USE_GETTEXT
.error USE_GETTEXT is defined as an environment variable, or in the arguments \
to "make". Please unset it and restart the build.
.endif
.include <bsd.port.pre.mk>
pre-extract:
.if exists(${PREFIX}/bin/kaffe)
@${ECHO_MSG} "Gettext won't build with Kaffe's jar utility. Doing:"
${MV} ${PREFIX}/bin/jar ${PREFIX}/bin/jar.backup
@${ECHO_MSG} "Be sure to mv" ${PREFIX}/bin/jar.backup ${PREFIX}/bin/jar
@${ECHO_MSG} "if you abandon your attempt to build gettext.
@sleep 5
.endif
post-build:
.if exists(${PREFIX}/bin/kaffe)
${MV} ${PREFIX}/bin/jar.backup ${PREFIX}/bin/jar
@${ECHO_MSG}
@${ECHO_MSG} "Your" ${PREFIX}/bin/jar "has been restored."
@sleep 5
.endif
pre-install:
@${RM} -f ${PLISTU}
@${TOUCH} ${PLISTU}
.if !defined (NOPORTDOCS)
.for ii in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 foot toc
${ECHO_CMD} %%DOCSDIR%%/gettext_${ii}.html >> ${PLISTU}
.endfor
.endif
.if defined (WITH_HTMLMAN)
.for ii in ${MAN1} ${MAN3}
${ECHO_CMD} %%DOCSDIR%%/${ii}.html >> ${PLISTU}
.endfor
.endif
.if defined (WITH_EXAMPLES)
cd ${WRKSRC}/gettext-tools && \
${FIND} -s examples -type f | ${GREP} -vw examples/po | \
${GREP} -v ChangeLog | ${GREP} -v examples/Makefile | \
${GREP} -v examples/installpaths.in | \
${SED} 's:^:share/doc/gettext/:' > ${PLISTU} && \
${FIND} -d examples -type d | ${GREP} -v examples/po | \
${GREP} / | ${SED} -e 's:^:@dirrm share/doc/gettext/:' \
>> ${PLISTU}
.endif
@${CAT} ${.CURDIR}/pkg-plist ${PLISTU} | ${GREP} -v ^@ > ${PLIST}
@${SORT} -r ${.CURDIR}/pkg-plist ${PLISTU} | ${GREP} ^@dirrm >> ${PLIST}
@${GREP} -h ^@ ${.CURDIR}/pkg-plist ${PLISTU} | ${GREP} exec >> ${PLIST}
post-install:
.for f in po-compat.el po-mode.el
${INSTALL_DATA} ${WRKSRC}/gettext-tools/misc/${f} ${PREFIX}/share/emacs/site-lisp
.endfor
${MKDIR} ${X11BASE}/share/locale
cd ${WRKSRC}/gettext-tools/doc && make install-info-am
.if !defined (NOPORTDOCS)
cd ${WRKSRC}/gettext-runtime/doc && make install-data
cd ${WRKSRC}/gettext-tools/doc && make install-data-local
.endif
.if defined (WITH_EXAMPLES)
cd ${WRKSRC}/gettext-tools/examples && make install
.endif
.if !defined (WITH_HTMLMAN)
cd ${WRKSRC}/gettext-runtime/man && make uninstall-html
cd ${WRKSRC}/gettext-tools/man && make uninstall-html
.endif
.include <bsd.port.post.mk>
|