summaryrefslogtreecommitdiff
path: root/www/w3m/options.mk
diff options
context:
space:
mode:
authoruebayasi <uebayasi@pkgsrc.org>2005-06-03 13:43:29 +0000
committeruebayasi <uebayasi@pkgsrc.org>2005-06-03 13:43:29 +0000
commitbd9030cced0b5852d2ad094f2e2f3d8617ae474b (patch)
tree0cd53e875f831cea9c1fc0bf77885b91bf571ea8 /www/w3m/options.mk
parent0cdd69527c35c9bfeb6035d39b37c2df7bda9f1c (diff)
downloadpkgsrc-bd9030cced0b5852d2ad094f2e2f3d8617ae474b.tar.gz
Let users select an imaging library for w3m-img among from gdk-pixbuf,
imlib, and imlib2. No default change expected, no revision bump.
Diffstat (limited to 'www/w3m/options.mk')
-rw-r--r--www/w3m/options.mk33
1 files changed, 32 insertions, 1 deletions
diff --git a/www/w3m/options.mk b/www/w3m/options.mk
index acd97f14000..d659c6d5655 100644
--- a/www/w3m/options.mk
+++ b/www/w3m/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2005/06/02 18:24:18 wiz Exp $
+# $NetBSD: options.mk,v 1.2 2005/06/03 13:43:29 uebayasi Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.w3m
PKG_SUPPORTED_OPTIONS= w3m-lynx-key w3m-m17n w3m-unicode
@@ -7,6 +7,13 @@ PKG_OPTIONS_LEGACY_VARS+= W3M_USE_LYNX_KEY:w3m-lynx-key
PKG_OPTIONS_LEGACY_VARS+= W3M_USE_M17N:w3m-m17n
PKG_OPTIONS_LEGACY_VARS+= W3M_USE_UNICODE:w3m-unicode
+_W3M_SUPPORTED_IMAGELIBS= w3m-image-gdk-pixbuf w3m-image-imlib \
+ w3m-image-imlib2
+_W3M_IMAGELIB_DEFAULT= w3m-image-gdk-pixbuf
+.if ${_W3M_USE_IMAGE} == "YES"
+PKG_SUPPORTED_OPTIONS+= ${_W3M_SUPPORTED_IMAGELIBS}
+.endif
+
# Memo about W3m configuration:
#
# * pkgsrc should export only user configurable build options that can't
@@ -42,3 +49,27 @@ CONFIGURE_ARGS+= --enable-keymap=lynx
.else
CONFIGURE_ARGS+= --enable-keymap=w3m
.endif
+
+.if ${_W3M_USE_IMAGE} == "YES"
+. undef _W3M_IMAGELIB
+. for _imagelib in ${_W3M_SUPPORTED_IMAGELIBS}
+. if !empty(PKG_OPTIONS:M${_imagelib})
+. if !empty(_W3M_IMAGELIB)
+PKG_FAIL_REASON+= "Can't enable multiple image libraries."
+. endif
+_W3M_IMAGELIB= ${_imagelib:C|^w3m-image-||}
+. endif
+. endfor
+
+. if !defined(_W3M_IMAGELIB)
+_W3M_IMAGELIB= ${_W3M_IMAGELIB_DEFAULT:C|^w3m-image-||}
+. endif
+
+USE_X11= YES
+CONFIGURE_ARGS+= --enable-image=x11 --with-imagelib=${_W3M_IMAGELIB}
+PLIST_SUBST+= USE_IMAGE=''
+. include "../../graphics/${_W3M_IMAGELIB}/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-image
+PLIST_SUBST+= USE_IMAGE='@comment '
+.endif