aboutsummaryrefslogtreecommitdiffstats
path: root/editors/slime/Makefile
blob: 5acb7f90c6379d17e0f898c609bb4c1d9c108084 (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
# New ports collection makefile for:    slime
# Date created:     13 Nov 2004
# Whom:         Dominic Mitchell
#
# $FreeBSD$
#

PORTNAME=   slime
PORTVERSION=    20110714
PORTREVISION=   7
PORTEPOCH=  1
CATEGORIES= editors elisp
MASTER_SITES=   ftp://ftp.SpringDaemons.com/soft/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Superior Lisp Interaction Mode for Emacs

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_EMACS=  yes

SLIME_LISPDIR=  ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/slime

.if !defined(NOPORTDOCS)
INFO=       slime
PORTDOCS=   ChangeLog HACKING NEWS PROBLEMS README
.endif

do-build:
    cd ${WRKSRC}/doc && ${GMAKE} slime.info
    cd ${WRKSRC} && ${EMACS_CMD} -batch \
        -eval '(setq load-path (cons nil load-path))' \
        -f batch-byte-compile *.el

do-install:
    @${MKDIR} ${SLIME_LISPDIR}
    @${MKDIR} ${SLIME_LISPDIR}/contrib

    cd ${WRKSRC}/ && ${INSTALL_DATA} *.elc *.el *.lisp ${SLIME_LISPDIR}/
    cd ${WRKSRC}/contrib && ${INSTALL_DATA} *.el *.lisp \
        ${SLIME_LISPDIR}/contrib
    ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${SLIME_LISPDIR}/

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/slime.info ${PREFIX}/${INFO_PATH}
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/contrib/README ${DOCSDIR}/README-contrib
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/slime-refcard.pdf ${DOCSDIR}/
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/slime-small.pdf ${DOCSDIR}/
.endif

    @${ECHO_MSG}
    @${ECHO_MSG} "========================================================"
    @${ECHO_MSG} "To activate SLIME put the following code into ~/.emacs:"
    @${ECHO_MSG} '(setq inferior-lisp-program "PATH_TO_YOUR_LISP_BINARY")'
    @${ECHO_MSG} "(add-to-list 'load-path \"${SLIME_LISPDIR}\""
    @${ECHO_MSG} '  "${SLIME_LISPDIR}/contrib")'
    @${ECHO_MSG} "(require 'slime)"
    @${ECHO_MSG} "(slime-setup '(slime-repl))"
    @${ECHO_MSG} "========================================================"
    @${ECHO_MSG}

.include <bsd.port.mk>