pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/w3m Let users select an imaging library for w3m-im...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d78acdff3f81
branches:  trunk
changeset: 495156:d78acdff3f81
user:      uebayasi <uebayasi%pkgsrc.org@localhost>
date:      Fri Jun 03 13:43:29 2005 +0000

description:
Let users select an imaging library for w3m-img among from gdk-pixbuf,
imlib, and imlib2.

No default change expected, no revision bump.

diffstat:

 www/w3m/Makefile.common |  16 +---------------
 www/w3m/options.mk      |  33 ++++++++++++++++++++++++++++++++-
 2 files changed, 33 insertions(+), 16 deletions(-)

diffs (95 lines):

diff -r c40da4302245 -r d78acdff3f81 www/w3m/Makefile.common
--- a/www/w3m/Makefile.common   Fri Jun 03 13:29:18 2005 +0000
+++ b/www/w3m/Makefile.common   Fri Jun 03 13:43:29 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.36 2005/06/02 18:24:18 wiz Exp $
+# $NetBSD: Makefile.common,v 1.37 2005/06/03 13:43:29 uebayasi Exp $
 #
 
 DISTNAME=      w3m-${W3M_VERS}
@@ -23,11 +23,6 @@
 .include "options.mk"
 
 _W3M_USE_IMAGE?=       NO
-.if ${_W3M_USE_IMAGE} == YES
-CONFIGURE_ARGS+=       --enable-image=x11
-.else
-CONFIGURE_ARGS+=       --disable-image
-.endif
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -57,12 +52,6 @@
 CONFIGURE_ARGS+=       --with-ssl=${SSLBASE}
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 
-.if ${_W3M_USE_IMAGE} == YES
-PLIST_SUBST+=          USE_IMAGE=''
-.else
-PLIST_SUBST+=          USE_IMAGE='@comment '
-.endif
-
 SUBST_CLASSES+=                man-ja
 SUBST_MESSAGE.man-ja=  "Fixing the path to Japanese manual pages."
 SUBST_STAGE.man-ja=    post-patch
@@ -87,9 +76,6 @@
 
 .include "../../devel/boehm-gc/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
-.if ${_W3M_USE_IMAGE} == YES
-.include "../../graphics/gdk-pixbuf/buildlink3.mk"
-.endif
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/x11.buildlink3.mk"
 
diff -r c40da4302245 -r d78acdff3f81 www/w3m/options.mk
--- a/www/w3m/options.mk        Fri Jun 03 13:29:18 2005 +0000
+++ b/www/w3m/options.mk        Fri Jun 03 13:43:29 2005 +0000
@@ -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_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 @@
 .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



Home | Main Index | Thread Index | Old Index