aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gettext-tools/Makefile
blob: eac717ab7344fb3f98f865cf32cf5d9c23c383d4 (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
# $FreeBSD$

# NOTE: before committing to this port, contact portmgr to arrange for an
# experimental ports run.  Untested commits may be backed out at portmgr's
# discretion.

PORTNAME=   gettext-tools
PORTREVISION=   0

COMMENT=    GNU gettext development and translation tools

LICENSE=    GPLv3
LICENSE_FILE=   ${WRKSRC}/../COPYING

.include "${.CURDIR}/../gettext/Makefile.common"

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-csharp --disable-java --disable-openmp \
        --with-included-glib --with-included-libcroco \
        --with-included-libunistring --with-included-libxml \
        --without-emacs --without-git ac_cv_lib_rt_sched_yield=no
CPPFLAGS+=  -I${LOCALBASE}/include
LIBS+=      -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
PLIST_SUB=  VERSION=${PORTVERSION:R}
TEST_TARGET=    check
USES=       charsetfix cpe gettext-runtime iconv libtool tar:xz
USE_LDCONFIG=   yes
WRKSRC_SUBDIR=  gettext-tools

CPE_PRODUCT=    gettext
CPE_VENDOR= gnu

OPTIONS_DEFINE= DOCS THREADS
OPTIONS_DEFAULT=THREADS
OPTIONS_EXCLUDE_DragonFly=  THREADS

DOCS_INFO=  gettext

THREADS_CONFIGURE_ENABLE=   threads

post-patch-DOCS-off:
    @${REINPLACE_CMD} '/^SUBDIRS =/s/doc//' ${WRKSRC}/Makefile.in

post-patch:
# Exclude examples and gnulib-tests.
    @${REINPLACE_CMD} -E '/^SUBDIRS =/s/(examples|gnulib-tests)//g' \
        ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} \
        '/^install-data-am:/s/install-examplesbuildauxDATA//' \
        ${WRKSRC}/Makefile.in ${WRKSRC}/m4/Makefile.in
# Do not install html copies of manpages.
    @${REINPLACE_CMD} \
        -e '/^all-local:/s/html-local//' \
        -e '/^install-data-local:/s/install-html//' \
        -e '/^installdirs-local:/s/installdirs-html//' \
        ${WRKSRC}/man/Makefile.in
# Do not patch system float.h.
    @${REINPLACE_CMD} 's/FLOAT_H=float\.h//' \
        ${WRKSRC}/configure
# Use libintl installed by gettext-runtime.
    @${REINPLACE_CMD} '/^LDADD_no =/s,\.\./intl/libgnuintl.la,,' \
        ${WRKSRC}/tests/Makefile.in
# Use libasprintf installed by gettext-runtime.
    @${REINPLACE_CMD} 's,[^ ]*libasprintf.la,-lasprintf,' \
        ${WRKSRC}/tests/lang-c++

.include <bsd.port.mk>