aboutsummaryrefslogtreecommitdiffstats
path: root/math/oleo/Makefile
blob: b53ee32ba89aa9ec8f540565e3f9b9246996cbad (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
# Created by: mr
# $FreeBSD$

PORTNAME=   oleo
PORTVERSION=    1.99.16
PORTREVISION=   7
CATEGORIES= math
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= gahr@FreeBSD.org
COMMENT=    The GNU spreadsheet for X11 and terminals

USE_PERL5_BUILD=    yes
USE_BISON=  build
USE_AUTOTOOLS=  autoconf213
CONFIGURE_ENV=  LIBS="-L${LOCALBASE}/lib"
CPPFLAGS+=  -I${LOCALBASE}/include
CONFIGURE_ARGS= --with-x --without-xlt --without-SciPlot

INFO=       oleo
PORTDOCS=   AUTHORS FAQ

OPTIONS_DEFINE= MOTIF NLS

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMOTIF}
LIB_DEPENDS+=   plot:${PORTSDIR}/graphics/plotutils \
        Xbae:${PORTSDIR}/x11-toolkits/xbae \
        XmHTML:${PORTSDIR}/x11-toolkits/xmhtml
USE_MOTIF=  yes
CONFIGURE_ARGS+=    --with-motif
.else
USE_XORG=   xt ice sm
CONFIGURE_ARGS+=    --without-motif
.endif

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

post-patch:
    @${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
        's|malloc\.h|stdlib.h|g'
.for pof in en fr nl
    @${REINPLACE_CMD} -e "s|CHARSET|ISO-8859-1|;s|ENCODING|8bit|"   \
        ${WRKSRC}/po/${pof}.po
.endfor
.if defined(NOPORTDOCS)
    @${REINPLACE_CMD} -e "s|am: install-docDATA|am:|" ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} -e "s|install-info-am install-htmlDATA|install-info-am|" \
        ${WRKSRC}/doc/Makefile.in
.endif

pre-build:
.for file in src/io-term.c
    cd ${WRKSRC} && ${MV} ${file} ${file}.pre_iconv \
        && iconv -c -t ascii ${file}.pre_iconv > ${file} || ${TRUE}
.endfor

.include <bsd.port.mk>