aboutsummaryrefslogtreecommitdiffstats
path: root/lang/spl/Makefile
blob: 4e945af361798704f5cdadc833f3a673ecb8c9c4 (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
# Created by: Hye-Shik Chang <perky@fallin.lv>
# $FreeBSD$

PORTNAME=   spl
PORTVERSION=    1.2.1
PORTREVISION=   4
CATEGORIES= lang
MASTER_SITES=   http://shakespearelang.sourceforge.net/download/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Shakespeare programming language

LICENSE=    GPLv2+
LICENSE_FILE=   ${WRKSRC}/COPYING

USES=       bison gmake

ALL_EXAMPLES=   Makefile fibonacci.spl fibonacci2.spl guess.spl hello.spl \
        primes.spl reverse.spl shakesbeer.spl

OPTIONS_DEFINE= EXAMPLES

post-patch:
.for f in . examples
    ${REINPLACE_CMD} -e 's,= gcc,?= gcc,' -e 's,^CCFLAGS.*,CFLAGS += -Wall,' \
        -e 's,CCFLAGS,CFLAGS,g' ${WRKSRC}/${f}/Makefile
.endfor
    ${REINPLACE_CMD} -e 's,\(#define STRING_LENGTH\).*,\1 25600,g' \
        -e 's,free(,//free(,g' ${WRKSRC}/makescanner.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/spl/bin/spl2c ${STAGEDIR}${PREFIX}/bin/
    ${INSTALL_DATA} ${WRKSRC}/spl/include/spl.h ${STAGEDIR}${PREFIX}/include/
    ${INSTALL_DATA} ${WRKSRC}/spl/lib/libspl.a ${STAGEDIR}${PREFIX}/lib/
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    (cd ${WRKSRC}/examples && \
        ${INSTALL_DATA} ${ALL_EXAMPLES} ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>