Date: Tue, 19 Jun 2012 08:34:29 +0000 From: scher@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r237943 - soc2012/scher/par_ports/head/Mk Message-ID: <20120619083429.B613F106566C@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: scher Date: Tue Jun 19 08:34:28 2012 New Revision: 237943 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237943 Log: Merge with CVS ports tree Modified: soc2012/scher/par_ports/head/Mk/bsd.options.mk soc2012/scher/par_ports/head/Mk/bsd.port.mk Modified: soc2012/scher/par_ports/head/Mk/bsd.options.mk ============================================================================== --- soc2012/scher/par_ports/head/Mk/bsd.options.mk Tue Jun 19 07:34:13 2012 (r237942) +++ soc2012/scher/par_ports/head/Mk/bsd.options.mk Tue Jun 19 08:34:28 2012 (r237943) @@ -1,5 +1,5 @@ #-*- tab-width: 4; -*- -# $FreeBSD: ports/Mk/bsd.options.mk,v 1.8 2012/06/02 09:13:13 bapt Exp $ +# $FreeBSD: ports/Mk/bsd.options.mk,v 1.13 2012/06/06 11:47:29 bapt Exp $ # Global options # @@ -17,7 +17,10 @@ .if !defined(NOPORTDOCS) PORT_OPTIONS+= DOCS .endif + +.if !defined(WITHOUT_NLS) PORT_OPTIONS+= NLS +.endif # Set the default values for the global options, as defined by portmgr .if !defined(NOPORTEXAMPLES) @@ -38,12 +41,16 @@ #XXX to kill when old option framework won't be used anymore .if defined(OPTIONS) +NO_OPTIONS_SORT= yes . undef optname . for O in ${OPTIONS:S|\#|\\\#|g} opt:= ${O} . if !defined(optname) optname:= ${O} ALL_OPTIONS+= ${O} +.if !defined(OPTIONS_DEFINE) || empty(OPTIONS_DEFINE:M${O}) +OPTIONS_DEFINE+= ${O} +.endif PORT_OPTIONS+= ${O} . elif !defined(optdesc) optdesc:= ${opt} @@ -96,13 +103,13 @@ . endfor ## Set the options specified per-port (set by user in make.conf) -. for opt in ${${UNIQUENAME:U}_SET} +. for opt in ${${UNIQUENAME}_SET} PORT_OPTIONS+= ${opt} . endfor PORT_OPTIONS:= ${PORT_OPTIONS:O:u} ## Unset the options excluded per-port (set by user in make.conf) -. for opt in ${${UNIQUENAME:U}_UNSET} +. for opt in ${${UNIQUENAME}_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} . endfor @@ -114,20 +121,16 @@ . include "${OPTIONSFILE}.local" . endif -# XXX(to be removed) -. if defined(OPTIONS) -. undef optname -. for O in ${OPTIONS:C/".*"//g} -. if defined(WITH_${O}) -PORT_OPTIONS+= ${O} +### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile +.for opt in ${ALL_OPTIONS} +.if defined(WITH_${opt}) +PORT_OPTIONS+= ${opt} PORT_OPTIONS:= ${PORT_OPTIONS:O:u} -. endif -. if defined(WITHOUT_${O}) -PORT_OPTIONS:= ${PORT_OPTIONS:N${O}} -. endif -. endfor -. endif -# XXX(end to be removed) +.endif +.if defined(WITHOUT_${opt}) +PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} +.endif +.endfor ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} @@ -180,4 +183,4 @@ .endif . undef opt .endfor -### +### \ No newline at end of file Modified: soc2012/scher/par_ports/head/Mk/bsd.port.mk ============================================================================== --- soc2012/scher/par_ports/head/Mk/bsd.port.mk Tue Jun 19 07:34:13 2012 (r237942) +++ soc2012/scher/par_ports/head/Mk/bsd.port.mk Tue Jun 19 08:34:28 2012 (r237943) @@ -3351,7 +3351,8 @@ # target or not. # ################################################################ -.if (!defined(OPTIONS) || defined(CONFIG_DONE_${UNIQUENAME:U}) || \ +.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ + || defined(CONFIG_DONE_${UNIQUENAME:U}) || \ defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes .endif @@ -4811,12 +4812,12 @@ .if !target(fetch-urlall-list) fetch-urlall-list: - @LISTALL=yes ${MAKE} fetch-url-list-int + @cd ${.CURDIR} && LISTALL=yes ${MAKE} fetch-url-list-int .endif .if !target(fetch-url-list) fetch-url-list: - @${MAKE} fetch-url-list-int + @cd ${.CURDIR} && ${MAKE} fetch-url-list-int .endif # Generates patches. @@ -6302,18 +6303,39 @@ .undef opt .endif #pre-check-config -.if !target(check-config) -check-config: pre-check-config +.if !target(_check-config) +_check-config: pre-check-config .for multi in ${OPTIONS_WRONG_MULTI} @${ECHO_MSG} "====> You must check at least one option in the ${multi} multi" - @exit 1 .endfor .for single in ${OPTIONS_WRONG_SINGLE} @${ECHO_MSG} "====> You must select one and only one option from the ${single} single" - @exit 1 .endfor +.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) +_CHECK_CONFIG_ERROR= true +.endif +.endif # _check-config + +.if !target(check-config) +check-config: _check-config +.if !empty(_CHECK_CONFIG_ERROR) + @exit 1 +.endif .endif # check-config +.if !target(sanity-config) +sanity-config: _check-config +.if !empty(_CHECK_CONFIG_ERROR) + @echo -n "Config is invalid. Re-edit? [Y/N] "; \ + read answer; \ + case $$answer in \ + [Nn]|[Nn][Oo]) \ + exit 0; \ + esac; \ + cd ${.CURDIR} && ${MAKE} config +.endif +.endif # sanity-config + .if !target(pre-config) pre-config: _COMPLETE_OPTIONS_LIST:= ${ALL_OPTIONS} @@ -6401,6 +6423,7 @@ ${CAT} $${TMPOPTIONSFILE} > ${OPTIONSFILE}; \ fi; \ ${RM} -f $${TMPOPTIONSFILE} + @cd ${.CURDIR} && ${MAKE} sanity-config .endif .endif # config @@ -6415,7 +6438,7 @@ .if !target(config-conditional) config-conditional: pre-config .if defined(_COMPLETE_OPTIONS_LIST) && !defined(NO_DIALOG) -. if ${_COMPLETE_OPTIONS_LIST} != "${_FILE_COMPLETE_OPTIONS_LIST}" +. if !defined(_FILE_COMPLETE_OPTIONS_LIST) || ${_COMPLETE_OPTIONS_LIST:O} != ${_FILE_COMPLETE_OPTIONS_LIST:O} @cd ${.CURDIR} && ${MAKE} config; . endif .endif @@ -6486,7 +6509,7 @@ .if !target(rmconfig) rmconfig: -.if defined(OPTIONS) && exists(${OPTIONSFILE}) +.if exists(${OPTIONSFILE}) -@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \ optionsdir=${OPTIONSFILE}; optionsdir=$${optionsdir%/*}; \ if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \ @@ -6496,7 +6519,7 @@ ${ECHO_MSG} "===> Returning to user credentials"; \ else \ ${RM} -f ${OPTIONSFILE}; \ - ${RMDIR} $${optionsdir} || return 0; \ + ${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ fi .else @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120619083429.B613F106566C>