aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gambit-c/Makefile
blob: 99dcfd3a4022163f543e663bd1560baf15a2bde3 (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
# New ports collection makefile for:    gambc
# Date created:                 28 December 2006
# Whom:                 Rob Zinkov
#
# $FreeBSD$
#

PORTNAME=   gambit-c
DISTVERSION=    v4_6_2
PORTEPOCH=  1
CATEGORIES= lang
MASTER_SITES=   http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/
DISTNAME=   gambc-${DISTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= pmn@bakarika.net
COMMENT=    Gambit programming system where the compiler generates portable C code

LICENSE=    ASL

MAN1=       gsi.1

USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS =--enable-single-host --enable-gcc-opts
CONFIGURE_ARGS+=--prefix=${PREFIX} --docdir=${PREFIX}/share/doc/gambit-c
CONFIGURE_ARGS+=--libdir=${PREFIX}/lib/gambit-c/ --includedir=${PREFIX}/include/gambit-c
CONFIGURE_ARGS+=--enable-interpreter-name=gsi-gambit  --enable-compiler-name=gsc-gambit

INFO=       gambit-c

MAKE_JOBS_SAFE= yes

USE_LDCONFIG=   ${PREFIX}/lib/gambit-c

PLIST_SUB+= GSI_INC=include/gambit-c
PLIST_SUB+= GSI_DOC=share/doc/gambit-c
PLIST_SUB+= GSI_LIB=lib/gambit-c

.include <bsd.port.pre.mk>

# This is needed because 4.2 < gcc -v < 4.4 has optimisations that make the
# build take more than 20Gb of virtual memory.
.if ${OSVERSION} >= 700042
CFLAGS+=    -fno-move-loop-invariants
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|^\(FLAGS_OBJ = \).*|\1 ${CFLAGS}|' ${WRKSRC}/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_DYN = \).*|\1 ${CFLAGS}|' ${WRKSRC}/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_OBJ = \).*|\1 ${CFLAGS}|' ${WRKSRC}/lib/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_DYN = \).*|\1 ${CFLAGS}|' ${WRKSRC}/lib/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_OBJ = \).*|\1 ${CFLAGS}|' ${WRKSRC}/gsi/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_DYN = \).*|\1 ${CFLAGS}|' ${WRKSRC}/gsi/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_OBJ = \).*|\1 ${CFLAGS}|' ${WRKSRC}/gsc/makefile.in
    @${REINPLACE_CMD} -e 's|^\(FLAGS_DYN = \).*|\1 ${CFLAGS}|' ${WRKSRC}/gsc/makefile.in

post-configure:
    @${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile

.include <bsd.port.post.mk>