blob: 374ba55eeea074317f546d53f323287e77d89037 (
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
|
# $NetBSD: options.mk,v 1.1.1.1 2008/09/14 12:25:30 ahoka Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.fricas
PKG_OPTIONS_REQUIRED_GROUPS= lisp
PKG_OPTIONS_GROUP.lisp= clisp sbcl ecl
PKG_SUPPORTED_OPTIONS+= x11
# We should use CLISP instead of ECL, but it became problematic
# in FriCAS 1.0.3:
PKG_SUGGESTED_OPTIONS+= ecl x11
.include "../../mk/bsd.options.mk"
# Select Lisp backend
.if !empty(PKG_OPTIONS:Mclisp)
FASL= fas
DEPENDS+= clisp>=2.41:../../lang/clisp
CONFIGURE_ARGS+= --with-lisp=clisp
.endif
.if !empty(PKG_OPTIONS:Msbcl)
FASL= fasl
DEPENDS+= sbcl-[0-9]*:../../lang/sbcl
CONFIGURE_ARGS+= --with-lisp=sbcl
.endif
.if !empty(PKG_OPTIONS:Mecl)
FASL= fas
CONFIGURE_ARGS+= --with-lisp=ecl
.include "../../lang/ecl/buildlink3.mk"
.endif
# Fix suffix for "fast load" files:
PLIST_SUBST+= FASL=${FASL:Q}
# Generalize "fast load" files
PRINT_PLIST_AWK+= {gsub(/\.${FASL}$$/, ".$${FASL}");}
.if !empty(PKG_OPTIONS:Mclisp)
# Handle CLISP-specific files
PRINT_PLIST_AWK+= {if ($$0 ~ /\.lib$$/) {$$0 = "$${clisp}" $$0;}}
.endif
# X11-only files:
.if !empty(PKG_OPTIONS:Mx11)
PRINT_PLIST_AWK+= {if ($$0 ~ /\.(bitmap|xbm|xbm.tiny|bm|bakmap|xpm|ht|pht|ps)$$/) {$$0 = "$${x11}" $$0;}}
.endif
# X11
.if !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --with-x=yes
CONFIGURE_ENV+= X_LIBS=${LDFLAGS:M*:Q}
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.else
CONFIGURE_ARGS+= --with-x=no
.endif
.for opt in clisp sbcl ecl x11
. if !empty(PKG_OPTIONS:M${opt})
PLIST_SUBST+= ${opt}=""
. else
PLIST_SUBST+= ${opt}="@comment "
. endif
.endfor
# Common for CLISP and SBCL:
.if !empty(PKG_OPTIONS:Mclisp) || !empty(PKG_OPTIONS:Msbcl)
PLIST_SUBST+= clisp-sbcl=""
.else
PLIST_SUBST+= clisp-sbcl="@comment "
.endif
|