Tweak math/qtiplot version 0.9.8.9_8
[dports.git] / math / ess / Makefile
1 # Created by: Christopher J. Ruwe
2 # $FreeBSD$
3
4 PORTNAME=       ess
5 DISTVERSION=    14.09
6 CATEGORIES=     math
7 MASTER_SITES=   http://ess.r-project.org/downloads/ess/
8 EXTRACT_SUFX=   .tgz
9
10 MAINTAINER=     cjr@cruwe.de
11 COMMENT=        R support for Emacsen
12
13 LICENSE=        GPLv2
14
15 RUN_DEPENDS=    R:${PORTSDIR}/math/R
16
17 USE_EMACS=      yes
18 USES=           gmake
19
20 OPTIONS_DEFINE= DOCS
21
22 DOCS_USES=      makeinfo
23 DOCS_INFO=      ess
24
25 .include <bsd.port.options.mk>
26
27 #attention, dirty hack: because 'ETCDIR =' is typed _with_ trailing
28 #space in Makefile, $STAGEDIR append fails without the additional
29 #space in the port
30 post-patch: .SILENT
31         ${REINPLACE_CMD} -e "\|^PREFIX=|d" -e "\|^INSTALL=|d" \
32                 -e "\|^EMACS=|s|=.*|=${EMACS_NAME}|" \
33                 -e "\|^ETCDIR\ =|s|=.*|=${STAGEDIR}${PREFIX}/${EMACS_LIBDIR}/etc/ess|" \
34                 -e "\|^INFODIR=|s|=.*|=${STAGEDIR}${PREFIX}/${INFO_PATH}|" \
35                 -e "\|^LISPDIR=|s|=.*|=${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}|" \
36                 -e "\|^SITELISP=|d" \
37                 ${WRKSRC}/Makeconf
38         ${REINPLACE_CMD} -e "\|cd doc; \$$(MAKE) \$$@|d" \
39                 ${WRKSRC}/Makefile
40         ${REINPLACE_CMD} -e "s|\$$(INSTALL)|${INSTALL_DATA}|g" \
41                 ${WRKSRC}/doc/Makefile ${WRKSRC}/etc/Makefile
42         ${REINPLACE_CMD} -e "s|\$$(INSTALL)|${INSTALL_SCRIPT}|g" \
43                 ${WRKSRC}/lisp/Makefile
44
45 post-build:
46 .if ${PORT_OPTIONS:MDOCS}
47         @(cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} \
48                 ${MAKE_ARGS} info)
49 .endif
50
51 post-install:
52 .if ${PORT_OPTIONS:MDOCS}
53         @(cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} \
54                 ${MAKE_ARGS} install-info)
55 .endif
56
57 .include <bsd.port.mk>