aboutsummaryrefslogtreecommitdiffstats
path: root/math/ess/Makefile
blob: 1d61e80b21677eee2b81bb4233392fa5961d691f (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: Christopher J. Ruwe
# $FreeBSD$

PORTNAME=   ess
DISTVERSION=    13.05
PORTREVISION=   1
CATEGORIES= math
MASTER_SITES=   http://ess.r-project.org/downloads/ess/
EXTRACT_SUFX=   .tgz

MAINTAINER= cjr@cruwe.de
COMMENT=    R support for Emacsen

LICENSE=    GPLv2

RUN_DEPENDS=    R:${PORTSDIR}/math/R

USE_EMACS=  yes
USE_GMAKE=  yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
INFO=   ess
.endif

post-patch: .SILENT
    ${REINPLACE_CMD} -e "\|^PREFIX=|d" -e "\|^INSTALL=|d" \
        -e "\|^EMACS=|s|=.*|=${EMACS_NAME}|" \
        -e "\|^ETCDIR=|s|=.*|=${PREFIX}/${EMACS_LIBDIR}/etc/ess|" \
        -e "\|^INFODIR=|s|=.*|=${PREFIX}/${INFO_PATH}|" \
        -e "\|^LISPDIR=|s|=.*|=${PREFIX}/${EMACS_SITE_LISPDIR}|" \
        ${WRKSRC}/Makeconf
    ${REINPLACE_CMD} -e "\|cd doc; \$$(MAKE) \$$@|d" \
        ${WRKSRC}/Makefile
    ${REINPLACE_CMD} -e "s|\$$(INSTALL)|${INSTALL_DATA}|g" \
        ${WRKSRC}/doc/Makefile ${WRKSRC}/etc/Makefile
    ${REINPLACE_CMD} -e "s|\$$(INSTALL)|${INSTALL_SCRIPT}|g" \
        ${WRKSRC}/lisp/Makefile

.if ${PORT_OPTIONS:MDOCS}
post-build:
    @(cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} \
        ${MAKE_ARGS} info)
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
    @(cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} \
        ${MAKE_ARGS} install-info)
.endif
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_MSG}

.include <bsd.port.mk>