1 # $NetBSD: options.mk,v 1.10 2009/09/13 11:17:30 sno Exp $
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
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
18 .include "../../mk/bsd.options.mk"
20 PLIST_VARS+= gd ghostscript x11 pangocairo rsvg gtk guile lua ocaml tcl perl
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}
28 .if !empty(PKG_OPTIONS:Mpangocairo)
29 .include "../../devel/pango/buildlink3.mk"
30 .include "../../graphics/cairo/buildlink3.mk"
33 .if !empty(PKG_OPTIONS:Mghostscript)
34 .include "../../print/ghostscript/buildlink3.mk"
35 PLIST.ghostscript= yes
37 CONFIGURE_ARGS+= --without-ghostscript
40 .if !empty(PKG_OPTIONS:Mgtk)
41 .include "../../x11/gtk2/buildlink3.mk"
44 CONFIGURE_ARGS+= --without-gdk-pixbuf
45 CONFIGURE_ARGS+= --without-gtk
46 CONFIGURE_ARGS+= --without-gnomeui
49 .if !empty(PKG_OPTIONS:Mrsvg)
50 .include "../../graphics/librsvg/buildlink3.mk"
53 CONFIGURE_ARGS+= --without-rsvg
57 CONFIGURE_ARGS+= --without-pangocairo
59 .if !empty(PKG_OPTIONS:Mghostscript)
60 PKG_FAIL_REASON+= "option ghostscript needs option pangocairo"
62 CONFIGURE_ARGS+= --without-ghostscript
64 .if !empty(PKG_OPTIONS:Mgtk)
65 PKG_FAIL_REASON+= "option gtk needs option pangocairo"
67 CONFIGURE_ARGS+= --without-gdk-pixbuf
68 CONFIGURE_ARGS+= --without-gtk
69 CONFIGURE_ARGS+= --without-gnomeui
71 .if !empty(PKG_OPTIONS:Mrsvg)
72 PKG_FAIL_REASON+= "option rsvg needs option pangocairo"
74 CONFIGURE_ARGS+= --without-rsvg
78 CONFIGURE_ARGS+= --without-x
80 .if !empty(PKG_OPTIONS:Mpangocairo)
81 PKG_FAIL_REASON+= "option pangocairo needs option x11"
83 CONFIGURE_ARGS+= --without-pangocairo
85 .if !empty(PKG_OPTIONS:Mghostscript)
86 PKG_FAIL_REASON+= "option ghostscript needs option pangocairo and x11"
88 CONFIGURE_ARGS+= --without-ghostscript
90 .if !empty(PKG_OPTIONS:Mgtk)
91 PKG_FAIL_REASON+= "option gtk needs option pangocairo and x11"
93 CONFIGURE_ARGS+= --without-gdk-pixbuf
94 CONFIGURE_ARGS+= --without-gtk
95 CONFIGURE_ARGS+= --without-gnomeui
97 .if !empty(PKG_OPTIONS:Mrsvg)
98 PKG_FAIL_REASON+= "option rsvg needs option pangocairo and x11"
100 CONFIGURE_ARGS+= --without-rsvg
103 .if !empty(PKG_OPTIONS:Mgd)
104 .include "../../graphics/gd/buildlink3.mk"
107 CONFIGURE_ARGS+= --without-libgd
108 CONFIGURE_ARGS+= --without-mylibgd
111 .if !empty(PKG_OPTIONS:Mlua)
113 .include "../../lang/lua/buildlink3.mk"
116 CONFIGURE_ARGS+= --disable-lua
121 .if !empty(PKG_OPTIONS:Mocaml)
123 .include "../../lang/ocaml/buildlink3.mk"
126 CONFIGURE_ARGS+= --disable-ocaml
129 .if !empty(PKG_OPTIONS:Mtcl)
131 .include "../../x11/tk/buildlink3.mk"
132 CONFIGURE_ENV+= TCLCONFIG=${TCLCONFIG_SH:Q}
133 CONFIGURE_ENV+= TKCONFIG=${TKCONFIG_SH:Q}
136 CONFIGURE_ARGS+= --disable-tcl
139 .if !empty(PKG_OPTIONS:Mguile)
141 .include "../../lang/guile/buildlink3.mk"
142 CONFIGURE_ARGS+= --enable-guile
145 CONFIGURE_ARGS+= --disable-guile
148 .if !empty(PKG_OPTIONS:Mperl)
150 .include "../../lang/perl5/buildlink3.mk"
151 CONFIGURE_ARGS+= --enable-perl
155 CONFIGURE_ARGS+= --disable-perl
158 .if !empty(USING_SWIG:Myes)
159 .include "../../devel/swig/buildlink3.mk"
161 CONFIGURE_ARGS+= --disable-swig