summaryrefslogtreecommitdiff
path: root/www/w3m
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2005-06-02 18:24:18 +0000
committerwiz <wiz@pkgsrc.org>2005-06-02 18:24:18 +0000
commitdc3a3e9242f708c968fe9858b9469b827ad3c9d0 (patch)
tree2aa02246bb9448042d2defc57c1e82815bcd949e /www/w3m
parent5fff88a4fc88f0718b32d4575a7147b7e7b0a927 (diff)
downloadpkgsrc-dc3a3e9242f708c968fe9858b9469b827ad3c9d0.tar.gz
Convert to options framework.
Diffstat (limited to 'www/w3m')
-rw-r--r--www/w3m/Makefile.common44
-rw-r--r--www/w3m/options.mk44
2 files changed, 48 insertions, 40 deletions
diff --git a/www/w3m/Makefile.common b/www/w3m/Makefile.common
index c71c06c928b..1c348bd3ab4 100644
--- a/www/w3m/Makefile.common
+++ b/www/w3m/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.35 2005/06/01 18:03:27 jlam Exp $
+# $NetBSD: Makefile.common,v 1.36 2005/06/02 18:24:18 wiz Exp $
#
DISTNAME= w3m-${W3M_VERS}
@@ -20,45 +20,7 @@ USE_PERL5= run
DOCDIR= share/doc/w3m
-.include "../../mk/bsd.prefs.mk"
-
-# Memo about W3m configuration:
-#
-# * pkgsrc should export only user configurable build options that can't
-# be configured at run-time.
-#
-# * As of 0.5, W3m is moving from English/Japanese (localized model) to
-# internationalized model. The set of its options are not well refined
-# nor tested yet. These configuration should be revisited later.
-#
-# * --enable-m17n enables multibyte encoding support, and
-# --enable-unicode adds UTF-7/UTF-8 support. W3m has a home-grown M17N
-# library (libwc) instead of using libc's I18N functions, that means
-# enabling M17N much increases the size of W3m binary. Additionary W3m
-# has a home-grown Unicode mapping table, which is huge too!
-#
-
-BUILD_DEFS+= W3M_USE_M17N
-BUILD_DEFS+= W3M_USE_UNICODE
-BUILD_DEFS+= W3M_USE_LYNX_KEY
-
-.if ${W3M_USE_M17N} == YES
-CONFIGURE_ARGS+= --enable-m17n
-.else
-CONFIGURE_ARGS+= --disable-m17n
-.endif
-
-.if ${W3M_USE_UNICODE} == YES
-CONFIGURE_ARGS+= --enable-unicode
-.else
-CONFIGURE_ARGS+= --disable-unicode
-.endif
-
-.if ${W3M_USE_LYNX_KEY} == YES
-CONFIGURE_ARGS+= --enable-keymap=lynx
-.else
-CONFIGURE_ARGS+= --enable-keymap=w3m
-.endif
+.include "options.mk"
_W3M_USE_IMAGE?= NO
.if ${_W3M_USE_IMAGE} == YES
@@ -67,6 +29,8 @@ CONFIGURE_ARGS+= --enable-image=x11
CONFIGURE_ARGS+= --disable-image
.endif
+.include "../../mk/bsd.prefs.mk"
+
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --with-termlib=curses
.elif ${OPSYS} == "Linux"
diff --git a/www/w3m/options.mk b/www/w3m/options.mk
new file mode 100644
index 00000000000..acd97f14000
--- /dev/null
+++ b/www/w3m/options.mk
@@ -0,0 +1,44 @@
+# $NetBSD: options.mk,v 1.1 2005/06/02 18:24:18 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.w3m
+PKG_SUPPORTED_OPTIONS= w3m-lynx-key w3m-m17n w3m-unicode
+PKG_SUGGESTED_OPTIONS= w3m-m17n
+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
+
+# Memo about W3m configuration:
+#
+# * pkgsrc should export only user configurable build options that can't
+# be configured at run-time.
+#
+# * As of 0.5, W3m is moving from English/Japanese (localized model) to
+# internationalized model. The set of its options are not well refined
+# nor tested yet. These configuration should be revisited later.
+#
+# * --enable-m17n enables multibyte encoding support, and
+# --enable-unicode adds UTF-7/UTF-8 support. W3m has a home-grown M17N
+# library (libwc) instead of using libc's I18N functions, that means
+# enabling M17N much increases the size of W3m binary. Additionary W3m
+# has a home-grown Unicode mapping table, which is huge too!
+#
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mw3m-m17n)
+CONFIGURE_ARGS+= --enable-m17n
+.else
+CONFIGURE_ARGS+= --disable-m17n
+.endif
+
+.if !empty(PKG_OPTIONS:Mw3m-unicode)
+CONFIGURE_ARGS+= --enable-unicode
+.else
+CONFIGURE_ARGS+= --disable-unicode
+.endif
+
+.if !empty(PKG_OPTIONS:Mw3m-lynx-key)
+CONFIGURE_ARGS+= --enable-keymap=lynx
+.else
+CONFIGURE_ARGS+= --enable-keymap=w3m
+.endif