aboutsummaryrefslogtreecommitdiffstats
path: root/misc/pinfo/Makefile
blob: 3cc4dc2588f32cd3d5cd2c58195294b07ff5cf08 (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
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   pinfo
PORTVERSION=    0.6.10
CATEGORIES= misc
MASTER_SITES=   GENTOO/distfiles \
        http://alioth.debian.org/frs/download.php/file/3351/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Ncurses based, lynx style info documentation browser

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

USES=       makeinfo ncurses tar:bzip2
USE_AUTOTOOLS=  libtoolize aclocal autoheader automake autoconf
LIBTOOLIZE_ARGS=--force
ACLOCAL_ARGS=   -I macros
AUTOMAKE_ARGS=  --add-missing --force-missing
CONFIGURE_ARGS= --with-localedir=${PREFIX}/share/locale

CFLAGS+=    -DHAVE_LOCALE_H
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

INFO=       pinfo
PLIST_FILES=    bin/pinfo etc/pinforc man/man1/pinfo.1.gz

OPTIONS_DEFINE= READLINE NLS
OPTIONS_DEFAULT=READLINE
READLINE_USES=  readline
READLINE_CONFIGURE_WITH=    readline

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
.for lang in cs de eu ja nl pl pt_BR ro ru sv vi
PLIST_FILES+=   share/locale/${lang}/LC_MESSAGES/pinfo.mo
.endfor
.else
USES+=      gettext:build
CONFIGURE_ARGS+=--disable-nls
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|@MKINSTALLDIRS@|$$(top_srcdir)/tools/install-sh -d|' \
        ${WRKSRC}/po/Makefile.in.in

pre-configure:
    @${MKDIR} ${WRKSRC}/tools
    @${LN} -sf ${LOCALBASE}/share/gettext/config.rpath ${WRKSRC}/tools

.include <bsd.port.mk>