summaryrefslogtreecommitdiff
path: root/graphics/graphviz/options.mk
blob: 5056d335d81ccacc506d36a7a8a45e033d7b50a8 (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
166
167
168
# $NetBSD: options.mk,v 1.21 2016/09/15 15:11:33 gdt Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.graphviz
PKG_SUPPORTED_OPTIONS=	gd ghostscript gtk guile lua ocaml pangocairo rsvg tcl x11 perl
PKG_SUGGESTED_OPTIONS=	gd gtk lua pangocairo perl tcl x11
# Explanation of consequence of options, to help those trying to slim down:
#   guile ocaml lua tcl perl: extension language support
#   x11: Omits all linking with x11, which means x11 graphics supports as
#     well as x11 frontend support.
#   pangocairo: basic ps/pdf support.
#   gtk: basic graphic format support (in addition to gd, which isn't
#     maintained anymore)
#   rsvg: Omitting loses svg support. librsvg has large dependencies
#     including some GNOME libs.
#   gd: basic graphic format support, especially gif
#   ghostscript: provides better ps/pdf-support, plus eps

.include "../../mk/bsd.options.mk"

PLIST_VARS+=		gd ghostscript gtk guile lua ocaml pangocairo perl rsvg tcl x11

.if !empty(PKG_OPTIONS:Mx11)
.include "../../mk/xaw.buildlink3.mk"
CONFIGURE_ENV+=		X11BASE=${X11BASE}
PLIST.x11=		yes

.  if !empty(PKG_OPTIONS:Mpangocairo)
.  include "../../devel/pango/buildlink3.mk"
.  include "../../graphics/cairo/buildlink3.mk"
PLIST.pangocairo=	yes

.    if !empty(PKG_OPTIONS:Mghostscript)
.    include "../../print/ghostscript/buildlink3.mk"
PLIST.ghostscript=	yes
.    else
CONFIGURE_ARGS+=	--without-ghostscript
.    endif

.    if !empty(PKG_OPTIONS:Mgtk)
.    include "../../x11/gtk2/buildlink3.mk"
PLIST.gtk=		yes
.    else
CONFIGURE_ARGS+=	--without-gdk-pixbuf
CONFIGURE_ARGS+=	--without-gtk
CONFIGURE_ARGS+=	--without-gnomeui
.    endif

.    if !empty(PKG_OPTIONS:Mrsvg)
.    include "../../graphics/librsvg/buildlink3.mk"
PLIST.rsvg=		yes
.    else
CONFIGURE_ARGS+=	--without-rsvg
.    endif

.  else
# + x11, -pangocairo
CONFIGURE_ARGS+=	--without-pangocairo

.    if !empty(PKG_OPTIONS:Mghostscript)
PKG_FAIL_REASON+=	"option ghostscript needs option pangocairo"
.    endif
CONFIGURE_ARGS+=	--without-ghostscript

.    if !empty(PKG_OPTIONS:Mgtk)
PKG_FAIL_REASON+=	"option gtk needs option pangocairo"
.    endif
CONFIGURE_ARGS+=	--without-gdk-pixbuf
CONFIGURE_ARGS+=	--without-gtk
CONFIGURE_ARGS+=	--without-gnomeui

.    if !empty(PKG_OPTIONS:Mrsvg)
PKG_FAIL_REASON+=	"option rsvg needs option pangocairo"
.    endif
CONFIGURE_ARGS+=	--without-rsvg
.  endif

.else
# - x11
CONFIGURE_ARGS+=	--without-x

.  if !empty(PKG_OPTIONS:Mpangocairo)
PKG_FAIL_REASON+=	"option pangocairo needs option x11"
.  endif
CONFIGURE_ARGS+=	--without-pangocairo

.  if !empty(PKG_OPTIONS:Mghostscript)
PKG_FAIL_REASON+=	"option ghostscript needs option pangocairo and x11"
.  endif
CONFIGURE_ARGS+=	--without-ghostscript

.  if !empty(PKG_OPTIONS:Mgtk)
PKG_FAIL_REASON+=	"option gtk needs option pangocairo and x11"
.  endif
CONFIGURE_ARGS+=	--without-gdk-pixbuf
CONFIGURE_ARGS+=	--without-gtk
CONFIGURE_ARGS+=	--without-gnomeui

.  if !empty(PKG_OPTIONS:Mrsvg)
PKG_FAIL_REASON+=	"option rsvg needs option pangocairo and x11"
.  endif
CONFIGURE_ARGS+=	--without-rsvg
.endif

.if !empty(PKG_OPTIONS:Mgd)
.include "../../graphics/gd/buildlink3.mk"
PLIST.gd=		yes
.else
CONFIGURE_ARGS+=	--without-libgd
CONFIGURE_ARGS+=	--without-mylibgd
.endif

USING_SWIG=	no

.if !empty(PKG_OPTIONS:Mlua)
USING_SWIG=	yes
.include "../../lang/lua/tool.mk"
.include "../../lang/lua/buildlink3.mk"
PLIST.lua=		yes
.else
CONFIGURE_ARGS+=	--disable-lua
.endif

.if !empty(PKG_OPTIONS:Mocaml)
USING_SWIG=	yes
.include "../../lang/ocaml/buildlink3.mk"
PLIST.ocaml=		yes
.else
CONFIGURE_ARGS+=	--disable-ocaml
.endif

.if !empty(PKG_OPTIONS:Mtcl)
USING_SWIG=	yes
.include "../../lang/tcl/Makefile.version"
.include "../../x11/tk/buildlink3.mk"
CONFIGURE_ENV+=		TCLCONFIG=${TCLCONFIG_SH:Q}
CONFIGURE_ENV+=		TKCONFIG=${TKCONFIG_SH:Q}
CONFIGURE_ARGS+=	--with-wish=${WISH}
CONFIGURE_ARGS+=	--with-tclsh=${TCLSH}
PLIST.tcl=		yes
PLIST_SUBST+=		TCL_BASEVER=${TCL_BASEVER}
.else
CONFIGURE_ARGS+=	--disable-tcl
.endif

.if !empty(PKG_OPTIONS:Mguile)
USING_SWIG=	yes
.include "../../lang/guile20/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-guile
PLIST.guile=		yes
.else
CONFIGURE_ARGS+=	--disable-guile
.endif

.if !empty(PKG_OPTIONS:Mperl)
USING_SWIG=	yes
.include "../../lang/perl5/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-perl
PLIST.perl=		yes
USE_TOOLS+=perl
.else
CONFIGURE_ARGS+=	--disable-perl
.endif

.if !empty(USING_SWIG:Myes)
.include "../../devel/swig/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-swig
.endif