svn commit: r308598 - in head: . Mk

Bryan Drewery bdrewery at freebsd.org
Thu Dec 13 20:49:03 UTC 2012


On 12/13/2012 2:01 PM, Bryan Drewery wrote:
> On 12/10/2012 4:14 AM, Baptiste Daroussin wrote:
>> Author: bapt
>> Date: Mon Dec 10 10:14:05 2012
>> New Revision: 308598
>> URL: http://svnweb.freebsd.org/changeset/ports/308598
>>
>> Log:
>>   Extend the options framework providing 2 new macros:
>>   
>>   OPTIONS_RADIO: a more user friendly way to allow selecting only 0 or 1 options
>>                  among a list of options
>>   OPTIONS_GROUP: this macros should be used to group options by theme allowing the
>>                  user to select 0 or N options among a list of options
>>   
>>   With hat:	portmgr
>>   Reviewed by:	beat
>>
>> Modified:
>>   head/CHANGES
>>   head/Mk/bsd.options.mk
>>   head/Mk/bsd.port.mk
> 
> Hmm, this is not recording the options in ALL_OPTIONS, which means they
> don't get registered in pkgng packages.
> 
> - (~/freebsd/ports/ports-mgmt/portupgrade) $ make pretty-print-config
> +DOCS DB_OVERRIDE( +BDB4 -BDB1 )
> - (~/freebsd/ports/ports-mgmt/portupgrade) $ make -V ALL_OPTIONS
>  DOCS
> 
> PKGNG Package:
> 
> options: {DOCS: on}
> 
> This causes poudriere to rebuild the package every time:
> 
> ====>> Options changed, deleting: apr-1.4.6.1.4.1_2.txz
> ====>> Pkg:
> ====>> New: BDB DEVRANDOM GDBM IPV6 SSL THREADS
> ====>> Options changed, deleting: portupgrade-2.4.10.3,2.txz
> ====>> Pkg: DOCS
> ====>> New: BDB4 DOCS


Here's a patch:

http://people.freebsd.org/~bdrewery/patch-bsd.pkgng.mk-RADIO-GROUP.txt

# svn status
M       bsd.pkgng.mk

Index: bsd.pkgng.mk
===================================================================
--- bsd.pkgng.mk	(revision 308869)
+++ bsd.pkgng.mk	(working copy)
@@ -100,8 +100,28 @@
 .    endif
 .  endfor
 .endfor
+.for radio in ${OPTIONS_RADIO}
+.  for opt in ${OPTIONS_RADIO_${radio}}
+.    if empty(PORT_OPTIONS:M${opt})
+	@${ECHO_MSG} -n "${opt}: off, " >> ${MANIFESTF}
+.    else
+	@${ECHO_MSG} -n "${opt}: on, " >> ${MANIFESTF}
+.    endif
+.  endfor
+.endfor
+.for group in ${OPTIONS_GROUP}
+.  for opt in ${OPTIONS_GROUP_${group}}
+.    if empty(PORT_OPTIONS:M${opt})
+	@${ECHO_MSG} -n "${opt}: off, " >> ${MANIFESTF}
+.    else
+	@${ECHO_MSG} -n "${opt}: on, " >> ${MANIFESTF}
+.    endif
+.  endfor
+.endfor
 .undef multi
 .undef single
+.undef radio
+.undef group
 .undef opt
 	@${ECHO_CMD} "}" >> ${MANIFESTF}
 	@[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \

-- 
Regards,
Bryan Drewery
bdrewery at freenode/EFNet

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 896 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20121213/600a23ee/attachment.sig>


More information about the svn-ports-head mailing list