Update lang/gambit-c to version v4.7.6,1
[dports.git] / lang / gambit-c / Makefile
1 # Created by: Rob Zinkov
2 # $FreeBSD$
3
4 PORTNAME=       gambit-c
5 DISTVERSION=    v4_7_6
6 PORTEPOCH=      1
7 CATEGORIES=     lang
8 MASTER_SITES=   http://www.iro.umontreal.ca/~gambit/download/gambit/v4.7/source/
9 DISTNAME=       gambc-${DISTVERSION}
10
11 MAINTAINER=     olgeni@FreeBSD.org
12 COMMENT=        Gambit programming system where the compiler generates portable C code
13
14 LICENSE=        APACHE20 LGPL21
15 LICENSE_COMB=   dual
16
17 USES=           compiler gmake tar:tgz
18 GNU_CONFIGURE=  yes
19 CONFIGURE_ARGS= --enable-single-host \
20                 --enable-gcc-opts \
21                 --docdir=${DOCSDIR} \
22                 --includedir=${PREFIX}/include/gambit-c \
23                 --libdir=${PREFIX}/lib/gambit-c \
24                 --enable-compiler-name=gsc-gambit \
25                 --enable-interpreter-name=gsi-gambit
26 MAKEFILE=       makefile
27 USE_LDCONFIG=   ${PREFIX}/lib/gambit-c
28
29 INFO=           gambit-c
30
31 OPTIONS_DEFINE= GCC
32 OPTIONS_DEFAULT=GCC
33
34 GCC_DESC=       Build with GCC
35
36 .include <bsd.port.pre.mk>
37
38 .if ${PORT_OPTIONS:MGCC}
39 USE_GCC=        any
40 .endif
41
42 .if ${COMPILER_TYPE} == gcc
43 # This is needed because 4.2 < gcc -v < 4.4 has optimisations that make the
44 # build take more than 20Gb of virtual memory.
45 CFLAGS+=        -fno-move-loop-invariants
46 .endif
47
48 post-patch:
49 .for i in makefile.in gsc/makefile.in gsi/makefile.in lib/makefile.in
50         @${REINPLACE_CMD} -e \
51                 's|^\(FLAGS_OBJ = \).*|\1 ${CFLAGS}| ; \
52                  s|^\(FLAGS_DYN = \).*|\1 ${CFLAGS}|' ${WRKSRC}/${i}
53 .endfor
54
55 post-install:
56         @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gs[ci]-gambit
57
58 .include <bsd.port.post.mk>