summaryrefslogtreecommitdiffstats
path: root/lang/clisp/Makefile
blob: 0231c6c26dea68888fd9f06b213d4bb84e70b66b (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# New ports collection makefile for:    clisp
# Date created:         Feb  5 2000
# Whom:                 Jeff Brown <jabrown@caida.org>
#
# $FreeBSD$
#

PORTNAME=	clisp
PORTVERSION=	2.47
PORTREVISION=	1
CATEGORIES=	lang lisp
MASTER_SITES=	GNU/${PORTNAME}/release/${PORTVERSION}

MAINTAINER=	jsa@wickedmachine.net
COMMENT=	A Common Lisp implementation

BUILD_DEPENDS=	${LOCALBASE}/lib/libavcall.a:${PORTSDIR}/devel/ffcall
LIB_DEPENDS=	readline.6:${PORTSDIR}/devel/readline \
		sigsegv.0:${PORTSDIR}/devel/libsigsegv

USE_ICONV=	yes
USE_GHOSTSCRIPT_BUILD=	yes
WANT_GNOME=	yes
HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--prefix="${PREFIX}" --mandir="${MANPREFIX}/man" \
		--elispdir="${DATADIR}/emacs" --vimdir="${DATADIR}/vim" \
		--docdir="${DOCSDIR}"
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_TARGET=	${ARCH:S/amd64/x86_64/}-portbld-freebsd${OSREL}
# Complaints if the environment changes between build stages.
MAKE_ENV=	${CONFIGURE_ENV}
BUILD_WRKSRC=	${WRKSRC}/src
INSTALL_WRKSRC=	${BUILD_WRKSRC}
CPPFLAGS=	-I${LOCALBASE}/include
LDFLAGS=	-L${LOCALBASE}/lib

OPTIONS=	BDB "Build Berkeley Database module" off \
		CLX_MIT "Build X11 module (original MIT version)" off \
		CLX_NEW "Build X11 module (new faster version)" off \
		FASTCGI "Build FastCGI module" off \
		GDBM "Build GNU Database manager module" off \
		GTK2 "Build Gtk+2 module" off \
		ORACLE "Build Oracle database module" off \
		PARI "Build PARI (math and calc lib) module" off \
		PCRE "Build PCRE (Perl Compatible Regexp) module" off \
		PGSQL "Build PostgreSQL database module" off \
		RAWSOCK "Build Raw Socket Access module" on \
		SVM "Enable Support Vector Machines module" off \
		WILDCARD "Build wildcard matching module" on \
		ZLIB "Build ZLib interface module " off

MAN1=		clisp.1
SUB_FILES=	pkg-message

.include <bsd.port.pre.mk>

# Semgentation fault in amd64 when using 'mmap(2)', errno = EINVAL.
.if ${ARCH} == "amd64"
CONFIGURE_ARGS+=--disable-mmap
.endif

MODULES=	BDB CLX_MIT CLX_NEW FASTCGI GDBM GTK2 ORACLE PARI PCRE PGSQL \
		RAWSOCK SVM WILDCARD ZLIB

.for mod in ${MODULES}
.   if defined(WITH_${mod})
PLIST_SUB+=	${mod}=""
.   else
PLIST_SUB+=	${mod}="@comment "
.   endif
.endfor

.if !defined(WITHOUT_NLS)
USE_GETTEXT=		yes
PLIST_SUB+=		NLS=""
.else
CONFIGURE_ARGS+=	--disable-nls
PLIST_SUB+=		NLS="@comment "
.endif

.if defined(WITH_BDB)
USE_BDB=	43+
CONFIGURE_ARGS+=--with-module=berkeley-db
CPPFLAGS+=	-I${LOCALBASE}/include/db${BDB_VER}
LDFLAGS+=	-L${LOCALBASE}/lib/db${BDB_VER}
.endif

.if defined(WITH_CLX_MIT) && defined(WITH_CLX_NEW)
IGNORE=		selected different implementations of the same X11 module
.endif
.if defined(WITH_CLX_MIT) || defined(WITH_CLX_NEW)
USE_XORG=	x11
.endif
.if defined(WITH_CLX_MIT)
CONFIGURE_ARGS+=--with-module=clx/mit-clx
.endif
.if defined(WITH_CLX_NEW)
CONFIGURE_ARGS+=--with-module=clx/new-clx
.endif

.if defined(WITH_FASTCGI)
LIB_DEPENDS+=	fcgi.0:${PORTSDIR}/www/fcgi
CONFIGURE_ARGS+=--with-module=fastcgi
.endif

.if defined(WITH_GDBM)
LIB_DEPENDS+=	gdbm.3:${PORTSDIR}/databases/gdbm
CONFIGURE_ARGS+=--with-module=gdbm
.endif

.if defined(WITH_GTK2)
USE_GNOME=	gtk20 libglade2
CONFIGURE_ARGS+=--with-module=gtk2
.endif

.if defined(WITH_ORACLE)
BUILD_DEPENDS+=	${ORACLE_HOME}:${PORTSDIR}/databases/oracle8-client
CONFIGURE_ARGS+=--with-module=oracle
CPPFLAGS+=	-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public
LDFLAGS+=	-L${ORACLE_HOME}/lib
ORACLE_HOME?=	${LOCALBASE}/oracle8-client
.endif

.if defined(WITH_PARI)
LIB_DEPENDS+=	pari-gmp.2:${PORTSDIR}/math/pari
CONFIGURE_ARGS+=--with-module=pari
.endif

.if defined(WITH_PCRE)
LIB_DEPENDS+=	pcre.0:${PORTSDIR}/devel/pcre
CONFIGURE_ARGS+=--with-module=pcre
.endif

.if defined(WITH_PGSQL)
USE_PGSQL=	yes
CONFIGURE_ARGS+=--with-module=postgresql
.endif

.if defined(WITH_RAWSOCK)
CONFIGURE_ARGS+=--with-module=rawsock
.endif

.if defined(WITH_SVM)
RUN_DEPENDS+=	svm-predict:${PORTSDIR}/science/libsvm
CONFIGURE_ARGS+=--with-module=libsvm
.endif

.if defined(WITH_WILDCARD)
CONFIGURE_ARGS+=--with-module=wildcard
.endif

.if defined(WITH_ZLIB)
CONFIGURE_ARGS+=--with-module=zlib
.endif

post-patch:
.if defined(WITH_ORACLE)
	@${REINPLACE_CMD} -e 's|-ldl||; s|-lpthread|-lcompat ${PTHREAD_LIBS}|' \
		${WRKSRC}/modules/oracle/link.sh
.endif

post-install:
	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud