Make the ports tree use dialog4ports for make config.
dialog4ports has been contributed by Ilya A. Arkhipov. It extends dialog(3) to provide a mixed dialog widget allowing to represent all features provide by the new options framework. This allows the ports tree to not anymore depends on dialog(1) from base to configure the options and be able to improve if needed on all supported plateforms at the same time. Exp-run by: miwi
This commit is contained in:
@@ -10,6 +10,16 @@ in the release notes and/or placed into UPDATING.
|
||||
|
||||
All ports committers are allowed to commit to this file.
|
||||
|
||||
20130319:
|
||||
AUTHOR: bapt@FreeBSD.org
|
||||
|
||||
* The options framework now uses ports-mgmt/dialog4ports contributed by
|
||||
Ilya A. Arkhipov. It boostraps it if not present when one calls
|
||||
make config.
|
||||
|
||||
dialog4ports provides a new UI able to represent all the features
|
||||
provided by the new options framework.
|
||||
|
||||
20130315:
|
||||
AUTHOR: bdrewery@FreeBSD.org
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ CPIO?= /usr/bin/cpio
|
||||
CUT?= /usr/bin/cut
|
||||
DC?= /usr/bin/dc
|
||||
DIALOG?= /usr/bin/dialog
|
||||
DIALOG4PORTS?= ${LOCALBASE}/bin/dialog4ports
|
||||
DIFF?= /usr/bin/diff
|
||||
DIRNAME?= /usr/bin/dirname
|
||||
EGREP?= /usr/bin/egrep
|
||||
|
||||
+39
-27
@@ -2409,6 +2409,7 @@ COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
|
||||
|
||||
DESCR?= ${PKGDIR}/pkg-descr
|
||||
PLIST?= ${PKGDIR}/pkg-plist
|
||||
PKGHELP?= ${PKGDIR}/pkg-help
|
||||
PKGINSTALL?= ${PKGDIR}/pkg-install
|
||||
PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall
|
||||
PKGREQ?= ${PKGDIR}/pkg-req
|
||||
@@ -6077,47 +6078,45 @@ sanity-config: _check-config
|
||||
cd ${.CURDIR} && ${MAKE} config
|
||||
.endif
|
||||
.endif # sanity-config
|
||||
|
||||
.if !target(pre-config)
|
||||
pre-config:
|
||||
D4P_ENV= PKGNAME="${PKGNAME}" \
|
||||
PORT_OPTIONS="${PORT_OPTIONS}" \
|
||||
ALL_OPTIONS="${ALL_OPTIONS}" \
|
||||
OPTIONS_MULTI="${OPTIONS_MULTI}" \
|
||||
OPTIONS_SINGLE="${OPTIONS_SINGLE}" \
|
||||
OPTIONS_RADIO="${OPTIONS_RADIO}" \
|
||||
OPTIONS_GROUP="${OPTIONS_GROUP}"
|
||||
.if exists(${PKGHELP})
|
||||
.if !target(pre-config)
|
||||
pre-config:
|
||||
.for opt in ${ALL_OPTIONS}
|
||||
. if empty(PORT_OPTIONS:M${opt})
|
||||
DEFOPTIONS+= ${opt} ""${${opt}_DESC:Q} off
|
||||
D4P_ENV+= PKGHELP="${PKGHELP}"
|
||||
.endif
|
||||
.for opt in ${ALL_OPTIONS}
|
||||
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}""
|
||||
.endfor
|
||||
.for multi in ${OPTIONS_MULTI}
|
||||
.endfor
|
||||
.for multi in ${OPTIONS_MULTI}
|
||||
. for opt in ${OPTIONS_MULTI_${multi}}
|
||||
. if empty(PORT_OPTIONS:M${opt})
|
||||
DEFOPTIONS+= ${opt} "M(${multi}): "${${opt}_DESC:Q} off
|
||||
D4P_ENV+= OPTIONS_MULTI_${multi}="${OPTIONS_MULTI_${multi}}" \
|
||||
${multi}_DESC=""${${opt}_DESC:Q}""
|
||||
. for opt in ${OPTIONS_MULTI_${multi}}
|
||||
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}""
|
||||
. endfor
|
||||
.endfor
|
||||
.for single in ${OPTIONS_SINGLE}
|
||||
.endfor
|
||||
.for single in ${OPTIONS_SINGLE}
|
||||
. for opt in ${OPTIONS_SINGLE_${single}}
|
||||
. if empty(PORT_OPTIONS:M${opt})
|
||||
DEFOPTIONS+= ${opt} "S(${single}): "${${opt}_DESC:Q} off
|
||||
D4P_ENV+= OPTIONS_SINGLE_${single}="${OPTIONS_SINGLE_${single}}" \
|
||||
${single}_DESC=""${${single}_DESC:Q}""
|
||||
. for opt in ${OPTIONS_SINGLE_${single}}
|
||||
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}""
|
||||
. endfor
|
||||
.endfor
|
||||
.for radio in ${OPTIONS_RADIO}
|
||||
.endfor
|
||||
.for radio in ${OPTIONS_RADIO}
|
||||
. for opt in ${OPTIONS_RADIO_${radio}}
|
||||
. if empty(PORT_OPTIONS:M${opt})
|
||||
DEFOPTIONS+= ${opt} "R(${radio}): "${${opt}_DESC:Q} off
|
||||
D4P_ENV+= OPTIONS_RADIO_${radio}="${OPTIONS_RADIO_${radio}}" \
|
||||
${radio}_DESC=""${${radio}_DESC:Q}""
|
||||
. for opt in ${OPTIONS_RADIO_${radio}}
|
||||
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}""
|
||||
. endfor
|
||||
.endfor
|
||||
.for group in ${OPTIONS_GROUP}
|
||||
.endfor
|
||||
.for group in ${OPTIONS_GROUP}
|
||||
. for opt in ${OPTIONS_GROUP_${group}}
|
||||
. if empty(PORT_OPTIONS:M${opt})
|
||||
DEFOPTIONS+= ${opt} "G(${group}): "${${opt}_DESC:Q} off
|
||||
D4P_ENV+= OPTIONS_GROUP_${group}="${OPTIONS_GROUP_${group}}" \
|
||||
${group}_DESC=""${${group}_DESC:Q}""
|
||||
. for opt in ${OPTIONS_GROUP_${group}}
|
||||
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}""
|
||||
@@ -6144,7 +6143,7 @@ do-config:
|
||||
@(optionsdir=${OPTIONSFILE}; optionsdir=$${optionsdir%/*}; \
|
||||
${MKDIR} $${optionsdir} 2> /dev/null) || \
|
||||
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1)
|
||||
.endif
|
||||
.endif
|
||||
@TMPOPTIONSFILE=$$(mktemp -t portoptions); \
|
||||
trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \
|
||||
${SETENV} ${D4P_ENV} ${DIALOG4PORTS} > $${TMPOPTIONSFILE} || { \
|
||||
@@ -6180,8 +6179,21 @@ do-config:
|
||||
fi; \
|
||||
${RM} -f $${TMPOPTIONSFILE}
|
||||
@cd ${.CURDIR} && ${MAKE} sanity-config
|
||||
.endif
|
||||
.endif # do-config
|
||||
|
||||
.if !target(config-depend)
|
||||
config-depend:
|
||||
.if !exists(${DIALOG4PORTS})
|
||||
@echo -n "dialog4ports isn't installed, do you want to install it now? [Y/n] "; \
|
||||
read answer; \
|
||||
case $$answer in \
|
||||
[Nn]|[Nn][Oo]) \
|
||||
exit 0; \
|
||||
esac; \
|
||||
cd ${PORTSDIR}/ports-mgmt/dialog4ports; ${MAKE} install
|
||||
.endif
|
||||
.endif # do-config
|
||||
.endif
|
||||
|
||||
.if !target(config)
|
||||
config: pre-config config-depend do-config
|
||||
|
||||
Reference in New Issue
Block a user