From b460ce1ab51a88c8a15737b9aaf78a949fe6f32e Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 30 Jul 2004 21:05:41 +0000 Subject: Convert to use bsd.options.mk. The relevant options variable to set for each package can be determined by invoking: make show-var VARNAME=PKG_OPTIONS_VAR The old options are still supported unless the variable named in PKG_OPTIONS_VAR is set within make(1) (usually via /etc/mk.conf). --- www/lynx/Makefile | 59 +++--------------------------------- www/lynx/Makefile.options | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 54 deletions(-) create mode 100644 www/lynx/Makefile.options (limited to 'www/lynx') diff --git a/www/lynx/Makefile b/www/lynx/Makefile index c28080141e6..2776388ec36 100644 --- a/www/lynx/Makefile +++ b/www/lynx/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.73 2004/05/16 03:34:23 fredb Exp $ +# $NetBSD: Makefile,v 1.74 2004/07/30 21:05:42 jlam Exp $ # DISTNAME= lynx2.8.5 @@ -31,8 +31,6 @@ USE_GNU_TOOLS+= make INSTALL_TARGET= install-full install-lss MAKEFILE= makefile -BUILD_DEFS+= LYNX_SCREEN_LIB USE_SOCKS USE_INET6 - .include "../../mk/bsd.prefs.mk" # For nls/gettext @@ -65,53 +63,10 @@ CONFIGURE_ARGS+= --enable-nested-tables CONFIGURE_ARGS+= --enable-prettysrc CONFIGURE_ARGS+= --enable-read-eta -.if ${LYNX_SCREEN_LIB} == "slang" -. include "../../devel/libslang/buildlink3.mk" -.elif ${LYNX_SCREEN_LIB} == "ncurses" -USE_NCURSES= color -. include "../../devel/ncurses/buildlink3.mk" -CONFIGURE_ARGS+= --enable-color-style -.elif ${LYNX_SCREEN_LIB} == curses -. include "../../mk/curses.buildlink3.mk" -. if !empty(MACHINE_PLATFORM:MNetBSD-1.5*-i386) -CONFIGURE_ARGS+= --enable-color-style -. endif -.else -pre-configure: - @${ECHO} '****************************************************' - @${ECHO} '* Invalid value for LYNX_SCREEN_LIB. Please choose *' - @${ECHO} '* one of "slang", "ncurses", or "curses"! *' - @${ECHO} '****************************************************' - @${FALSE} - -.endif - -# Include SOCKS firewall support, if desired. -.if defined(USE_SOCKS) && (${USE_SOCKS} == 4 || ${USE_SOCKS} == 5) -.if (${LYNX_SCREEN_LIB} == slang) -pre-configure: - @${ECHO} '******************************************************' - @${ECHO} '* Socks may not be enabled together with the "slang" *' - @${ECHO} '* screen library. If socks support is desired, *' - @${ECHO} '* please also set LYNX_SCREEN_LIB to one of "curses" *' - @${ECHO} '* or "ncurses"! *' - @${ECHO} '******************************************************' - @${FALSE} - -.endif -.if ${USE_SOCKS} == 4 -CONFIGURE_ARGS+= --with-socks -. include "../../net/socks4/buildlink3.mk" -.else -CONFIGURE_ARGS+= --with-socks5 -. include "../../net/socks5/buildlink3.mk" -.endif -.endif - -# Do IPV6 on systems which can support it. -.if defined(USE_INET6) && ${USE_INET6} == YES -CONFIGURE_ARGS+= --enable-ipv6 -.endif +.include "Makefile.options" +.include "../../devel/gettext-lib/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" post-install: ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/lynx @@ -119,8 +74,4 @@ post-install: # patchless update ${RM} ${PREFIX}/share/lynx/lynx_doc/CHANGES.orig_dist -.include "../../devel/gettext-lib/buildlink3.mk" -.include "../../devel/zlib/buildlink3.mk" -.include "../../security/openssl/buildlink3.mk" - .include "../../mk/bsd.pkg.mk" diff --git a/www/lynx/Makefile.options b/www/lynx/Makefile.options new file mode 100644 index 00000000000..8a2eaf7e2ec --- /dev/null +++ b/www/lynx/Makefile.options @@ -0,0 +1,77 @@ +# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:42 jlam Exp $ + +# Global and legacy options +.if defined(LYNX_SCREEN_LIB) || defined(USE_SOCKS) || defined(USE_INET6) +. if !defined(PKG_OPTIONS.lynx) +. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mslang) +PKG_OPTIONS.lynx+= slang +. endif +. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mncurses) +PKG_OPTIONS.lynx+= ncurses +. endif +. if defined(LYNX_SCREEN_LIB) && !empty(LYNX_SCREEN_LIB:Mcurses) +PKG_OPTIONS.lynx+= curses +. endif +. if defined(USE_SOCKS) && (${USE_SOCKS} == 4) +PKG_OPTIONS.lynx+= socks4 +. endif +. if defined(USE_SOCKS) && (${USE_SOCKS} == 5) +PKG_OPTIONS.lynx+= socks5 +. endif +. if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS]) +PKG_OPTIONS.lynx+= inet6 +. endif +. endif +.endif + +PKG_OPTIONS_VAR= PKG_OPTIONS.lynx +PKG_SUPPORTED_OPTIONS= curses inet6 ncurses slang socks4 socks5 +.include "../../mk/bsd.options.mk" + +### +### We can't compile support for both the "slang" screen library and +### SOCKS support. +### +.if !empty(PKG_OPTIONS:Mslang) && !empty(PKG_OPTIONS:Msocks*) +PKG_FAIL_REASON+= "SOCKS may not be enabled together with the \"slang\"" \ + "screen library. If SOCKS support is desired," \ + "please change ${PKG_OPTIONS_VAR} to include" \ + "\"curses\" or \"ncurses\" instead." +.endif + +### +### Set the screen library to "slang", "ncurses", or plain "curses". +### +.if !empty(PKG_OPTIONS:Mslang) +. include "../../devel/libslang/buildlink3.mk" +.elif !empty(PKG_OPTIONS:Mncurses) +USE_NCURSES= color +. include "../../devel/ncurses/buildlink3.mk" +CONFIGURE_ARGS+= --enable-color-style +.elif !empty(PKG_OPTIONS:Mcurses) +. include "../../mk/curses.buildlink3.mk" +. if !empty(MACHINE_PLATFORM:MNetBSD-1.[56]*-i386) +CONFIGURE_ARGS+= --enable-color-style +. endif +.else +PKG_FAIL_REASON+= "${PKG_OPTIONS_VAR} must contain one of" \ + "one of \"slang\", \"ncurses\", or \"curses\"!" +.endif + +### +### SOCKS support +### +.if !empty(PKG_OPTIONS:Msocks4) +CONFIGURE_ARGS+= --with-socks +. include "../../net/socks4/buildlink3.mk" +.elif !empty(PKG_OPTIONS:Msocks5) +CONFIGURE_ARGS+= --with-socks5 +. include "../../net/socks5/buildlink3.mk" +.endif + +### +### IPv6 support +### +.if !empty(PKG_OPTIONS:Minet6) +CONFIGURE_ARGS+= --enable-ipv6 +.endif -- cgit v1.2.3