aboutsummaryrefslogtreecommitdiffstats
path: root/editors/nano/Makefile
blob: d5f9166459af2d414ed2f6e3cc453ff919349036 (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
# Created by: Philippe Lefebvre <nemesis@balistik.net>
# $FreeBSD$

PORTNAME=   nano
PORTVERSION=    2.2.6
CATEGORIES= editors
MASTER_SITES=   http://www.nano-editor.org/dist/v2.2/ \
        ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= eadler@FreeBSD.org
COMMENT=    Nano's ANOther editor, an enhanced free Pico clone

LICENSE=    GPLv3

CONFLICTS=  nano-devel-2*

GNU_CONFIGURE=  yes

CONFIGURE_ARGS= --docdir=${DOCSDIR}
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

OPTIONS_DEFINE= DOCS NLS

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if ${PORT_OPTIONS:MDOCS}
MAKE_ARGS+= install_htmlmanDATA=install-htmlmanDATA
.else
MAKE_ARGS+= install_htmlmanDATA=""
.endif

INFO=       nano

PORTSCOUT=  limitw:1,even

.include <bsd.port.pre.mk>

CONFIGURE_ARGS+=--enable-utf8

post-build:
    cd ${WRKSRC}/doc/man; ${REINPLACE_CMD} \
        -e 's:SYSCONFDIR:${PREFIX}/etc:g' \
        -e 's:EXAMPLESDIR:${EXAMPLESDIR}:g' \
        nano.1 rnano.1 nanorc.5 ${WRKSRC}/doc/texinfo/${INFO:=.info}
    ${REINPLACE_CMD} -e 's/\\</[[:<:]]/g' -e 's/\\>/[[:>:]]/g' \
        ${WRKSRC}/doc/syntax/*.nanorc

post-install:
    ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/nanorc.sample ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.post.mk>