diff options
author | jlam <jlam@pkgsrc.org> | 2004-07-30 21:05:41 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-07-30 21:05:41 +0000 |
commit | b460ce1ab51a88c8a15737b9aaf78a949fe6f32e (patch) | |
tree | 90f33a51019f85b91b5f29838193d07638327f1c /www | |
parent | 85306a83480ca871311e350b3814452b76f3b8a2 (diff) | |
download | pkgsrc-b460ce1ab51a88c8a15737b9aaf78a949fe6f32e.tar.gz |
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).
Diffstat (limited to 'www')
-rw-r--r-- | www/apache/Makefile | 22 | ||||
-rw-r--r-- | www/lynx/Makefile | 59 | ||||
-rw-r--r-- | www/lynx/Makefile.options | 77 | ||||
-rw-r--r-- | www/php4/Makefile.php | 23 |
4 files changed, 119 insertions, 62 deletions
diff --git a/www/apache/Makefile b/www/apache/Makefile index 664db6e6fee..0bf03c2152a 100644 --- a/www/apache/Makefile +++ b/www/apache/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.147 2004/07/17 12:44:28 tron Exp $ +# $NetBSD: Makefile,v 1.148 2004/07/30 21:05:42 jlam Exp $ # # This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of # code hooks that allow mod_ssl to be compiled separately later, if desired). @@ -60,7 +60,23 @@ BUILD_DEFS+= APACHE_USER APACHE_GROUP CONFIGURE_ARGS+= --server-uid=${APACHE_USER} CONFIGURE_ARGS+= --server-gid=${APACHE_GROUP} -.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES +# Global and legacy options +.if defined(APACHE_PERF_TUNING) || defined(APACHE_SUEXEC) +. if !defined(PKG_OPTIONS.apache) +. if defined(APACHE_PERF_TUNING) && !empty(APACHE_PERF_TUNING:M[yY][eE][sS]) +PKG_OPTIONS.apache+= perf-tuning +. endif +. if defined(APACHE_SUEXEC) && !empty(APACHE_SUEXEC:M[yY][eE][sS]) +PKG_OPTIONS.apache+= suexec +. endif +. endif +.endif + +PKG_OPTIONS_VAR= PKG_OPTIONS.apache +PKG_SUPPORTED_OPTIONS= perf-tuning suexec +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Msuexec) APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin APACHE_SUEXEC_CONFIGURE_ARGS+= \ @@ -91,7 +107,7 @@ CONFIGURE_ARGS+= ${_ENABLE_MOD}=define # from mod_ssl pkg.addon APACHE_CUSTOM_CFLAGS?= # empty -.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == "YES" +.if !empty(PKG_OPTIONS:Mperf-tuning) APACHE_CUSTOM_CFLAGS+= -DBUFFERED_LOGS APACHE_CUSTOM_CFLAGS+= ${COMPILER_PERFTUNE_FLAGS} LDFLAGS+= ${COMPILER_PERFTUNE_FLAGS} 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 diff --git a/www/php4/Makefile.php b/www/php4/Makefile.php index de4a3763e7a..058a92e64c7 100644 --- a/www/php4/Makefile.php +++ b/www/php4/Makefile.php @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.php,v 1.15 2004/07/14 08:03:16 jdolecek Exp $ +# $NetBSD: Makefile.php,v 1.16 2004/07/30 21:05:43 jlam Exp $ .include "../../www/php4/Makefile.common" @@ -42,8 +42,21 @@ CONFIGURE_ARGS+= ${PHP4_CONFIGURE_ARGS} CONFIGURE_ENV+= ac_cv_lib_pam_pam_start=no CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" -BUILD_DEFS+= USE_SSL -.if defined(USE_SSL) && !empty(USE_SSL:M[Yy][Ee][Ss]) -PHP4_CONFIGURE_ARGS+= --with-openssl -.include "../../security/openssl/buildlink3.mk" +PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[^-]*$//} + +# Global and legacy options +.if defined(USE_SSL) +. if !defined(${PKG_OPTIONS_VAR}) +. if defined(USE_SSL) && !empty(USE_SSL:M[Yy][Ee][Ss]) +${PKG_OPTIONS_VAR}+= ssl +. endif +. endif +.endif + +PKG_SUPPORTED_OPTIONS+= ssl +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mssl) +. include "../../security/openssl/buildlink3.mk" +CONFIGURE_ARGS+= --with-openssl .endif |