aboutsummaryrefslogtreecommitdiffstats
path: root/editors/ne/Makefile
blob: 8c06f9da404da06774b5cfd7e6778a684fe1f3ee (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
# New ports collection makefile for:    ne
# Date created:     2005-07-21
# Whom:         Andrej Zverev <az@inec.ru>
#
# $FreeBSD$
#

PORTNAME=   ne
PORTVERSION=    2.1
CATEGORIES= editors
MASTER_SITES=   http://ne.dsi.unimi.it/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Nice and powerfull editor

BUILD_WRKSRC=   ${WRKSRC}/src

USE_PERL5_BUILD=yes
USE_GMAKE=  yes
MAKEFILE=   makefile
ALL_TARGET= ${PORTNAME}
MAKE_ARGS=  CC="${CC}" \
        CFLAGS="${CFLAGS}" \
        LDFLAGS="-lgnuregex" \
        NE_GLOBAL_DIR="${DATADIR}"
MAKE_JOBS_SAFE= yes

MAN1=       ${PORTNAME}.1
INFO=       ${PORTNAME}
PORTDOCS=   ${PORTNAME}.txt
PLIST_FILES=    bin/${PORTNAME} \
        %%DATADIR%%/default.keys \
        %%DATADIR%%/default.menus
PLIST_DIRS= %%DATADIR%%

.if !defined(WITH_DEBUG)
CFLAGS+=    -DNODEBUG
.endif

post-patch:
.for file in actions.c
    @${REINPLACE_CMD} -e 's|tmpnam(|mkstemp(|g' ${BUILD_WRKSRC}/${file}
.endfor
.for file in ne.c search.c
    @${REINPLACE_CMD} -e 's|"regex\.h"|<gnu/regex.h>|g' ${BUILD_WRKSRC}/${file}
.endfor
.for file in makefile
    @${REINPLACE_CMD} -e '/[[:space:]]regex.o/d ; \
         s|regex.h||g' ${BUILD_WRKSRC}/${file}
.endfor

post-build:
    cd ${WRKSRC}/doc && makeinfo ${PORTNAME}.texinfo

do-install:
    ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${MANPREFIX}/man/man1
    ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.info ${PREFIX}/${INFO_PATH}
    @${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/default.keys ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/default.menus ${DATADIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.txt ${DOCSDIR}
.endif

.include <bsd.port.mk>