update Sun Sep 13 06:37:00 PDT 2009
[pkgsrc.git] / graphics / graphviz / options.mk
1 # $NetBSD: options.mk,v 1.10 2009/09/13 11:17:30 sno Exp $
2
3 PKG_OPTIONS_VAR=        PKG_OPTIONS.graphviz
4 PKG_SUPPORTED_OPTIONS=  gd ghostscript x11 pangocairo gtk rsvg guile lua ocaml tcl perl
5 PKG_SUGGESTED_OPTIONS=  gd x11 pangocairo gtk lua tcl perl
6 # Explanation of consquence of options, to help those trying to slim down:
7 #   guild ocaml lua tcl perl: extension language support
8 #   x11: Omits all linking with x11, which means x11 graphics supports as
9 #     well as x11 frontend support.
10 #   pangocairo: basic ps/pdf support.
11 #   gtk: basic graphic format support (in addition to gd, which isn't maintained
12 #     anymore)
13 #   rsvg: Omitting loses svg support. librsvg has large dependencies
14 #     including some Gnome libs.
15 #   gd: basic graphic format support, especially gif
16 #   ghostscript: provides better ps/pdf-support, plus eps
17
18 .include "../../mk/bsd.options.mk"
19
20 PLIST_VARS+=            gd ghostscript x11 pangocairo rsvg gtk guile lua ocaml tcl perl
21
22 .if !empty(PKG_OPTIONS:Mx11)
23 .include "../../x11/libXp/buildlink3.mk"
24 .include "../../mk/xaw.buildlink3.mk"
25 CONFIGURE_ENV+=         X11PREFIX=${X11PREFIX} X11BASE=${X11BASE}
26 PLIST.x11=              yes
27
28 .if !empty(PKG_OPTIONS:Mpangocairo)
29 .include "../../devel/pango/buildlink3.mk"
30 .include "../../graphics/cairo/buildlink3.mk"
31 PLIST.pangocairo=       yes
32
33 .if !empty(PKG_OPTIONS:Mghostscript)
34 .include "../../print/ghostscript/buildlink3.mk"
35 PLIST.ghostscript=      yes
36 .else
37 CONFIGURE_ARGS+=        --without-ghostscript
38 .endif
39
40 .if !empty(PKG_OPTIONS:Mgtk)
41 .include "../../x11/gtk2/buildlink3.mk"
42 PLIST.gtk=              yes
43 .else
44 CONFIGURE_ARGS+=        --without-gdk-pixbuf
45 CONFIGURE_ARGS+=        --without-gtk
46 CONFIGURE_ARGS+=        --without-gnomeui
47 .endif
48
49 .if !empty(PKG_OPTIONS:Mrsvg)
50 .include "../../graphics/librsvg/buildlink3.mk"
51 PLIST.rsvg=             yes
52 .else
53 CONFIGURE_ARGS+=        --without-rsvg
54 .endif
55
56 .else
57 CONFIGURE_ARGS+=        --without-pangocairo
58
59 .if !empty(PKG_OPTIONS:Mghostscript)
60 PKG_FAIL_REASON+=       "option ghostscript needs option pangocairo"
61 .endif
62 CONFIGURE_ARGS+=        --without-ghostscript
63
64 .if !empty(PKG_OPTIONS:Mgtk)
65 PKG_FAIL_REASON+=       "option gtk needs option pangocairo"
66 .endif
67 CONFIGURE_ARGS+=        --without-gdk-pixbuf
68 CONFIGURE_ARGS+=        --without-gtk
69 CONFIGURE_ARGS+=        --without-gnomeui
70
71 .if !empty(PKG_OPTIONS:Mrsvg)
72 PKG_FAIL_REASON+=       "option rsvg needs option pangocairo"
73 .endif
74 CONFIGURE_ARGS+=        --without-rsvg
75 .endif
76
77 .else
78 CONFIGURE_ARGS+=        --without-x
79
80 .if !empty(PKG_OPTIONS:Mpangocairo)
81 PKG_FAIL_REASON+=       "option pangocairo needs option x11"
82 .endif
83 CONFIGURE_ARGS+=        --without-pangocairo
84
85 .if !empty(PKG_OPTIONS:Mghostscript)
86 PKG_FAIL_REASON+=       "option ghostscript needs option pangocairo and x11"
87 .endif
88 CONFIGURE_ARGS+=        --without-ghostscript
89
90 .if !empty(PKG_OPTIONS:Mgtk)
91 PKG_FAIL_REASON+=       "option gtk needs option pangocairo and x11"
92 .endif
93 CONFIGURE_ARGS+=        --without-gdk-pixbuf
94 CONFIGURE_ARGS+=        --without-gtk
95 CONFIGURE_ARGS+=        --without-gnomeui
96
97 .if !empty(PKG_OPTIONS:Mrsvg)
98 PKG_FAIL_REASON+=       "option rsvg needs option pangocairo and x11"
99 .endif
100 CONFIGURE_ARGS+=        --without-rsvg
101 .endif
102
103 .if !empty(PKG_OPTIONS:Mgd)
104 .include "../../graphics/gd/buildlink3.mk"
105 PLIST.gd=               yes
106 .else
107 CONFIGURE_ARGS+=        --without-libgd
108 CONFIGURE_ARGS+=        --without-mylibgd
109 .endif
110
111 .if !empty(PKG_OPTIONS:Mlua)
112 USING_SWIG=     yes
113 .include "../../lang/lua/buildlink3.mk"
114 PLIST.lua=              yes
115 .else
116 CONFIGURE_ARGS+=        --disable-lua
117 .endif
118
119 USING_SWIG=     no
120
121 .if !empty(PKG_OPTIONS:Mocaml)
122 USING_SWIG=     yes
123 .include "../../lang/ocaml/buildlink3.mk"
124 PLIST.ocaml=            yes
125 .else
126 CONFIGURE_ARGS+=        --disable-ocaml
127 .endif
128
129 .if !empty(PKG_OPTIONS:Mtcl)
130 USING_SWIG=     yes
131 .include "../../x11/tk/buildlink3.mk"
132 CONFIGURE_ENV+=         TCLCONFIG=${TCLCONFIG_SH:Q}
133 CONFIGURE_ENV+=         TKCONFIG=${TKCONFIG_SH:Q}
134 PLIST.tcl=              yes
135 .else
136 CONFIGURE_ARGS+=        --disable-tcl
137 .endif
138
139 .if !empty(PKG_OPTIONS:Mguile)
140 USING_SWIG=     yes
141 .include "../../lang/guile/buildlink3.mk"
142 CONFIGURE_ARGS+=        --enable-guile
143 PLIST.guile=            yes
144 .else
145 CONFIGURE_ARGS+=        --disable-guile
146 .endif
147
148 .if !empty(PKG_OPTIONS:Mperl)
149 USING_SWIG=     yes
150 .include "../../lang/perl5/buildlink3.mk"
151 CONFIGURE_ARGS+=        --enable-perl
152 PLIST.perl=             yes
153 USE_TOOLS+=perl
154 .else
155 CONFIGURE_ARGS+=        --disable-perl
156 .endif
157
158 .if !empty(USING_SWIG:Myes)
159 .include "../../devel/swig/buildlink3.mk"
160 .else
161 CONFIGURE_ARGS+=        --disable-swig
162 .endif