Merge from vendor branch TNF:
[pkgsrcv2.git] / archivers / gsharutils / Makefile
1 # $NetBSD: Makefile,v 1.43 2009/02/09 23:53:52 joerg Exp $
2
3 DISTNAME=       sharutils-4.2.1
4 PKGNAME=        g${DISTNAME}
5 PKGREVISION=    11
6 CATEGORIES=     archivers
7 MASTER_SITES=   ${MASTER_SITE_GNU:=sharutils/}
8
9 MAINTAINER=     pkgsrc-users@NetBSD.org
10 HOMEPAGE=       http://www.gnu.org/software/sharutils/sharutils.html
11 COMMENT=        Allow packing and unpacking of shell archives
12
13 BROKEN_GETTEXT_DETECTION=       yes
14
15 PKG_INSTALLATION_TYPES= overwrite pkgviews
16 PKG_DESTDIR_SUPPORT=    user-destdir
17
18 USE_PKGLOCALEDIR=       yes
19 GNU_CONFIGURE=          yes
20
21 INSTALL_TARGET=         install install-man
22 INFO_FILES=             yes
23 USE_TOOLS+=             makeinfo msgfmt sh:run mktemp:run perl:run
24
25 REPLACE_PERL=           src/remsync.in
26
27 CONFIGURE_ARGS+=        --disable-uucode
28 CONFIGURE_ENV+=         SH=${TOOLS_SH:Q}
29
30 .include "../../mk/bsd.prefs.mk"
31
32 # gettext 0.11+ has renamed internal symbols, and gsharutils is
33 # being a very bad neighbor by using them directly.  To fix, force
34 # use of gettext >= 0.11, and rename the symbol in gsharutils.  -tv
35 #
36 .if ${OPSYS} != "Linux"
37 # XXX ...but don't do this on Linux, where glibc-internalized gettext
38 # always uses the non-prefixed symbols.
39 #
40 BUILDLINK_API_DEPENDS.gettext+= gettext-lib>=0.11
41 CPPFLAGS+=              -D_nl_default_dirname=libintl_nl_default_dirname
42 .endif
43
44 .if defined(GNU_PROGRAM_PREFIX)
45 CONFIGURE_ARGS+=        --program-prefix=${GNU_PROGRAM_PREFIX:Q}
46 .endif
47 PLIST_SUBST+=           GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX:Q}
48 BUILD_DEFS+=            GNU_PROGRAM_PREFIX
49
50 post-patch:
51         ${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/po/sharutils.pot
52
53 .include "../../devel/gettext-lib/buildlink3.mk"
54 .include "../../mk/bsd.pkg.mk"