From a36064a1d96ede0dc2b14b7089773321afa2ef5f Mon Sep 17 00:00:00 2001 From: Ryan Hill Date: Thu, 13 Dec 2007 02:15:28 +0000 Subject: Version bump to push out changes. (Portage version: 2.1.4_rc9) --- app-admin/eselect-wxwidgets/ChangeLog | 10 +- .../eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild | 41 ---- .../eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild | 41 ++++ .../files/digest-eselect-wxwidgets-0.5 | 0 .../files/digest-eselect-wxwidgets-0.6 | 0 app-admin/eselect-wxwidgets/files/wx-config-0.5 | 36 ---- app-admin/eselect-wxwidgets/files/wx-config-0.6 | 36 ++++ app-admin/eselect-wxwidgets/files/wxrc-0.5 | 34 ---- app-admin/eselect-wxwidgets/files/wxrc-0.6 | 34 ++++ .../eselect-wxwidgets/files/wxwidgets.eselect-0.5 | 222 --------------------- .../eselect-wxwidgets/files/wxwidgets.eselect-0.6 | 222 +++++++++++++++++++++ 11 files changed, 342 insertions(+), 334 deletions(-) delete mode 100644 app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild create mode 100644 app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild delete mode 100644 app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5 create mode 100644 app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6 delete mode 100755 app-admin/eselect-wxwidgets/files/wx-config-0.5 create mode 100755 app-admin/eselect-wxwidgets/files/wx-config-0.6 delete mode 100755 app-admin/eselect-wxwidgets/files/wxrc-0.5 create mode 100755 app-admin/eselect-wxwidgets/files/wxrc-0.6 delete mode 100644 app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 create mode 100644 app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 diff --git a/app-admin/eselect-wxwidgets/ChangeLog b/app-admin/eselect-wxwidgets/ChangeLog index c4a10763ce2e..027c300e9d76 100644 --- a/app-admin/eselect-wxwidgets/ChangeLog +++ b/app-admin/eselect-wxwidgets/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-admin/eselect-wxwidgets # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.10 2007/12/13 02:01:18 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.11 2007/12/13 02:15:27 dirtyepic Exp $ + +*eselect-wxwidgets-0.6 (13 Dec 2007) + + 13 Dec 2007; Ryan Hill -files/wx-config-0.5, + -files/wxrc-0.5, -files/wxwidgets.eselect-0.5, +files/wx-config-0.6, + +files/wxrc-0.6, +files/wxwidgets.eselect-0.6, + -eselect-wxwidgets-0.5.ebuild, +eselect-wxwidgets-0.6.ebuild: + Version bump to push out changes. 13 Dec 2007; Ryan Hill files/wxrc-0.5, files/wxwidgets.eselect-0.5: diff --git a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild deleted file mode 100644 index f1edb4cd7fd9..000000000000 --- a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild,v 1.6 2007/12/12 03:47:30 dirtyepic Exp $ - -DESCRIPTION="Manage the system default for wxWidgets packages." -HOMEPAGE="http://www.gentoo.org" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc64 ~sparc ~x86" -IUSE="" - -DEPEND="!<=x11-libs/wxGTK-2.6.4.0-r1" -RDEPEND="app-admin/eselect" - -src_install() { - insinto /usr/share/eselect/modules - newins "${FILESDIR}"/wxwidgets.eselect-${PV} wxwidgets.eselect \ - || die "Failed installing module" - - newbin "${FILESDIR}"/wx-config-${PV} wx-config - newbin "${FILESDIR}"/wxrc-${PV} wxrc - - keepdir /var/lib/wxwidgets -} - -pkg_postinst() { - if [[ ! -e ${ROOT}/var/lib/wxwidgets/current ]]; then - echo 'WXCONFIG="none"' > "${ROOT}"/var/lib/wxwidgets/current - fi - - echo - elog "By default your system wxWidgets profile is set to \"none\"." - elog - elog "You will need to select a profile using \`eselect wxwidgets\` to" - elog "use wxGTK outside of portage. If you do not plan on building" - elog "packages or doing development work with wxGTK outside of portage" - elog "then you can safely leave this set to \"none\"." - echo -} diff --git a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild new file mode 100644 index 000000000000..c4beb8db654a --- /dev/null +++ b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild,v 1.1 2007/12/13 02:15:27 dirtyepic Exp $ + +DESCRIPTION="Manage the system default for wxWidgets packages." +HOMEPAGE="http://www.gentoo.org" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc64 ~sparc ~x86" +IUSE="" + +DEPEND="!<=x11-libs/wxGTK-2.6.4.0-r1" +RDEPEND="app-admin/eselect" + +src_install() { + insinto /usr/share/eselect/modules + newins "${FILESDIR}"/wxwidgets.eselect-${PV} wxwidgets.eselect \ + || die "Failed installing module" + + newbin "${FILESDIR}"/wx-config-${PV} wx-config + newbin "${FILESDIR}"/wxrc-${PV} wxrc + + keepdir /var/lib/wxwidgets +} + +pkg_postinst() { + if [[ ! -e ${ROOT}/var/lib/wxwidgets/current ]]; then + echo 'WXCONFIG="none"' > "${ROOT}"/var/lib/wxwidgets/current + fi + + echo + elog "By default your system wxWidgets profile is set to \"none\"." + elog + elog "You will need to select a profile using \`eselect wxwidgets\` to" + elog "use wxGTK outside of portage. If you do not plan on building" + elog "packages or doing development work with wxGTK outside of portage" + elog "then you can safely leave this set to \"none\"." + echo +} diff --git a/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5 b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5 deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6 b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6 new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/app-admin/eselect-wxwidgets/files/wx-config-0.5 b/app-admin/eselect-wxwidgets/files/wx-config-0.5 deleted file mode 100755 index f9e1f2721b5e..000000000000 --- a/app-admin/eselect-wxwidgets/files/wx-config-0.5 +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# -# /usr/bin/wx-config -# -# a lame wx-config wrapper by dirtyepic@gentoo.org - -_wxerror() { - echo "An error occurred while calling wx-config:" - echo - echo " ${1}" - echo - echo "Please use \`eselect wxwidgets\` to select an available profile and try again." - exit 1 -} - -if [[ -n ${WX_ECLASS_CONFIG} ]]; then - ${WX_ECLASS_CONFIG} "$@" - exit 0 -else - if [[ -e /var/lib/wxwidgets/current ]]; then - source /var/lib/wxwidgets/current - else - _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )" - fi - - [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected" - - if [[ -f /usr/lib/wx/config/${WXCONFIG} \ - && -x /usr/lib/wx/config/${WXCONFIG} ]]; then - /usr/lib/wx/config/${WXCONFIG} "$@" - else - _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" - fi - exit 0 -fi - diff --git a/app-admin/eselect-wxwidgets/files/wx-config-0.6 b/app-admin/eselect-wxwidgets/files/wx-config-0.6 new file mode 100755 index 000000000000..f9e1f2721b5e --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wx-config-0.6 @@ -0,0 +1,36 @@ +#!/bin/bash - +# +# /usr/bin/wx-config +# +# a lame wx-config wrapper by dirtyepic@gentoo.org + +_wxerror() { + echo "An error occurred while calling wx-config:" + echo + echo " ${1}" + echo + echo "Please use \`eselect wxwidgets\` to select an available profile and try again." + exit 1 +} + +if [[ -n ${WX_ECLASS_CONFIG} ]]; then + ${WX_ECLASS_CONFIG} "$@" + exit 0 +else + if [[ -e /var/lib/wxwidgets/current ]]; then + source /var/lib/wxwidgets/current + else + _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )" + fi + + [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected" + + if [[ -f /usr/lib/wx/config/${WXCONFIG} \ + && -x /usr/lib/wx/config/${WXCONFIG} ]]; then + /usr/lib/wx/config/${WXCONFIG} "$@" + else + _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" + fi + exit 0 +fi + diff --git a/app-admin/eselect-wxwidgets/files/wxrc-0.5 b/app-admin/eselect-wxwidgets/files/wxrc-0.5 deleted file mode 100755 index f578f1104c09..000000000000 --- a/app-admin/eselect-wxwidgets/files/wxrc-0.5 +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# -# /usr/bin/wxrc -# a lame wrapper by dirtyepic@gentoo.org - -_wxerror() { - echo "An error occurred while calling wxrc:" - echo - echo " ${1}" - echo - echo "Please use \`eselect wxwidgets\` to select an available profile and try again." - exit 1 -} - -if [[ -n ${WX_ECLASS_CONFIG} ]]; then - ${WX_ECLASS_CONFIG} "$@" - exit 0 -else - if [[ -e /var/lib/wxwidgets/current ]]; then - source /var/lib/wxwidgets/current - else - _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )" - fi - - [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected" - - if [[ -f /usr/lib/wx/config/${WXCONFIG} \ - && -x /usr/lib/wx/config/${WXCONFIG} ]]; then - $(/usr/lib/wx/config/${WXCONFIG} --utility=wxrc) "$@" - else - _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" - fi - exit 0 -fi diff --git a/app-admin/eselect-wxwidgets/files/wxrc-0.6 b/app-admin/eselect-wxwidgets/files/wxrc-0.6 new file mode 100755 index 000000000000..f578f1104c09 --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wxrc-0.6 @@ -0,0 +1,34 @@ +#!/bin/sh - +# +# /usr/bin/wxrc +# a lame wrapper by dirtyepic@gentoo.org + +_wxerror() { + echo "An error occurred while calling wxrc:" + echo + echo " ${1}" + echo + echo "Please use \`eselect wxwidgets\` to select an available profile and try again." + exit 1 +} + +if [[ -n ${WX_ECLASS_CONFIG} ]]; then + ${WX_ECLASS_CONFIG} "$@" + exit 0 +else + if [[ -e /var/lib/wxwidgets/current ]]; then + source /var/lib/wxwidgets/current + else + _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )" + fi + + [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected" + + if [[ -f /usr/lib/wx/config/${WXCONFIG} \ + && -x /usr/lib/wx/config/${WXCONFIG} ]]; then + $(/usr/lib/wx/config/${WXCONFIG} --utility=wxrc) "$@" + else + _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" + fi + exit 0 +fi diff --git a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 deleted file mode 100644 index 548c824002d3..000000000000 --- a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v 1.4 2007/12/13 02:01:19 dirtyepic Exp $ - -inherit config - -DESCRIPTION="Manage the system default wxWidgets profile." -MAINTAINER="dirtyepic@gentoo.org" -VERSION=0.5 - -WXCONFFILE=/var/lib/wxwidgets/current -WXCONFDIR=/usr/lib/wx/config - -find_targets() { - local conf - for conf in ${WXCONFDIR}/*; do - [[ -f ${conf} && -x ${conf} ]] && basename ${conf} - done -} - -set_config() { - local target="${1}" targets - - # selected by number - if is_number "${target}"; then - targets=( $(find_targets) ) - [[ ${1} -ge 1 && ${1} -le ${#targets[@]} ]] \ - || die -q "Number out of range: ${1}" - target=${targets[$(( ${target} - 1 ))]} - fi - - if [[ ${target} == "none" ]]; then - # none is a special case - : - else - [[ ! -f ${WXCONFDIR}/${target} ]] && \ - die -q "\"${1}\" doesn't appear to be a valid profile name" - fi - - echo - echo "Setting wxWidgets profile to ${target}" - echo - store_config ${WXCONFFILE} WXCONFIG ${target} -} - -### show action ### - -describe_show() { - echo "Show the currently selected profile" -} - -do_show() { - [[ ${#@} -gt 0 ]] && die -q "Too many parameters" - - write_list_start "Current wxWidgets profile:" - if [[ -e ${WXCONFFILE} ]]; then - write_kv_list_entry "$(load_config ${WXCONFFILE} WXCONFIG)" "" - else - write_kv_list_entry "(none)" "" - fi -} - -### list action ### - -describe_list() { - echo "List available profiles" -} - -do_list() { - local i targets - # targets is an array containing names of available configs - targets=( $(find_targets) ) - - if [[ -n ${targets[@]} ]]; then - for (( i = 0; i < ${#targets[@]}; i++ )); do - if [[ -e ${WXCONFFILE} ]]; then - # highlight current version - [[ ${targets[${i}]} == $(load_config ${WXCONFFILE} WXCONFIG) ]] \ - && targets[${i}]="$(highlight ${targets[${i}]}) *" - fi - done - write_list_start "Available wxWidgets profiles:" - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi -} - -### set action ### - -describe_set() { - echo "Set the system wxWidgets profile" -} - -describe_set_options() { - echo "target: profile name or number (gotten from 'list')" -} - -describe_set_parameters() { - echo "" -} - -do_set() { - [[ ! ${#@} -eq 1 ]] \ - && die -q "You must specify a profile name or number" - - [[ -w "${ROOT}"/var/lib ]] \ - || die -q "You need proper write permissions. Please run as root." - - set_config "${1}" -} - -describe_update() { - echo "Check current profile and update it if invalid (internal use only)" -} - -do_update() { - [[ ! -e ${WXCONFFILE} ]] && do_set none - - currconf=$(load_config ${WXCONFFILE} WXCONFIG) - - # if current config is "none" leave it alone - [[ ${currconf} == none ]] && return 0 - - # if current config is valid leave it alone - [[ -e ${WXCONFDIR}/${currconf} ]] && return 0 - - # split the config string into components - OIFS=${IFS} - IFS=- - set -- ${currconf} - IFS=${OIFS} - - declare -a wxtoolkit wxchar wxdebug wxver - - # put selected components into the first element of the array - wxtoolkit=(${1}) - wxchar=(${2}) - wxdebug=(${3}) - wxver=(${4}) - - # put available components into next element(s) of array - local component toolkit char debug ver element opt - - for component in toolkit char debug ver; do - element=1 - case ${component} in - toolkit) - for opt in base gtk2; do - if [[ ${opt} == ${wxtoolkit[0]} ]]; then - continue - else - wxtoolkit[${element}]=${opt} - (( element++ )) - fi - done - ;; - - char) - for opt in ansi unicode; do - if [[ ${opt} == ${wxchar[0]} ]]; then - continue - else - wxchar[${element}]=${opt} - (( element++ )) - fi - done - ;; - - debug) - for opt in release debug; do - if [[ ${opt} == ${wxdebug[0]} ]]; then - continue - else - wxdebug[${element}]=${opt} - (( element++ )) - fi - done - ;; - - ver) - for opt in 2.10 2.8 2.6; do - if [[ ${opt} == ${wxver[0]} ]]; then - continue - else - wxver[${element}]=${opt} - (( element++ )) - fi - done - ;; - esac - done - - # Now we iterate through the installed wx-configs and find the closest match - # ( debug > char > toolkit > ver ) - - local d c t v checkconf foundconf - - for (( v = 0 ; v < ${#wxver[@]} ; v++ )); do - for (( t = 0 ; t < ${#wxtoolkit[@]} ; t++ )); do - for (( c = 0 ; c < ${#wxchar[@]} ; c++ )); do - for (( d = 0 ; d < ${#wxdebug[@]} ; d++ )); do - checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxdebug[$d]}-${wxver[$v]}" - [[ -e ${WXCONFDIR}/${checkconf} ]] || continue - foundconf=${checkconf} - break 4 - done - done - done - done - - [[ -z ${foundconf} ]] && foundconf="none" - - echo - write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" - write_warning_msg "is no longer available." - write_warning_msg - write_warning_msg "The closest matching profile: ( ${foundconf} )" - write_warning_msg "will be activated in its place." - - do_set ${foundconf} -} diff --git a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 new file mode 100644 index 000000000000..c5a696895563 --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 @@ -0,0 +1,222 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6,v 1.1 2007/12/13 02:15:28 dirtyepic Exp $ + +inherit config + +DESCRIPTION="Manage the system default wxWidgets profile." +MAINTAINER="dirtyepic@gentoo.org" +VERSION=0.5 + +WXCONFFILE=/var/lib/wxwidgets/current +WXCONFDIR=/usr/lib/wx/config + +find_targets() { + local conf + for conf in ${WXCONFDIR}/*; do + [[ -f ${conf} && -x ${conf} ]] && basename ${conf} + done +} + +set_config() { + local target="${1}" targets + + # selected by number + if is_number "${target}"; then + targets=( $(find_targets) ) + [[ ${1} -ge 1 && ${1} -le ${#targets[@]} ]] \ + || die -q "Number out of range: ${1}" + target=${targets[$(( ${target} - 1 ))]} + fi + + if [[ ${target} == "none" ]]; then + # none is a special case + : + else + [[ ! -f ${WXCONFDIR}/${target} ]] && \ + die -q "\"${1}\" doesn't appear to be a valid profile name" + fi + + echo + echo "Setting wxWidgets profile to ${target}" + echo + store_config ${WXCONFFILE} WXCONFIG ${target} +} + +### show action ### + +describe_show() { + echo "Show the currently selected profile" +} + +do_show() { + [[ ${#@} -gt 0 ]] && die -q "Too many parameters" + + write_list_start "Current wxWidgets profile:" + if [[ -e ${WXCONFFILE} ]]; then + write_kv_list_entry "$(load_config ${WXCONFFILE} WXCONFIG)" "" + else + write_kv_list_entry "(none)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available profiles" +} + +do_list() { + local i targets + # targets is an array containing names of available configs + targets=( $(find_targets) ) + + if [[ -n ${targets[@]} ]]; then + for (( i = 0; i < ${#targets[@]}; i++ )); do + if [[ -e ${WXCONFFILE} ]]; then + # highlight current version + [[ ${targets[${i}]} == $(load_config ${WXCONFFILE} WXCONFIG) ]] \ + && targets[${i}]="$(highlight ${targets[${i}]}) *" + fi + done + write_list_start "Available wxWidgets profiles:" + write_numbered_list "${targets[@]}" + else + write_kv_list_entry "(none found)" "" + fi +} + +### set action ### + +describe_set() { + echo "Set the system wxWidgets profile" +} + +describe_set_options() { + echo "target: profile name or number (gotten from 'list')" +} + +describe_set_parameters() { + echo "" +} + +do_set() { + [[ ! ${#@} -eq 1 ]] \ + && die -q "You must specify a profile name or number" + + [[ -w "${ROOT}"/var/lib ]] \ + || die -q "You need proper write permissions. Please run as root." + + set_config "${1}" +} + +describe_update() { + echo "Check current profile and update it if invalid (internal use only)" +} + +do_update() { + [[ ! -e ${WXCONFFILE} ]] && do_set none + + currconf=$(load_config ${WXCONFFILE} WXCONFIG) + + # if current config is "none" leave it alone + [[ ${currconf} == none ]] && return 0 + + # if current config is valid leave it alone + [[ -e ${WXCONFDIR}/${currconf} ]] && return 0 + + # split the config string into components + OIFS=${IFS} + IFS=- + set -- ${currconf} + IFS=${OIFS} + + declare -a wxtoolkit wxchar wxdebug wxver + + # put selected components into the first element of the array + wxtoolkit=(${1}) + wxchar=(${2}) + wxdebug=(${3}) + wxver=(${4}) + + # put available components into next element(s) of array + local component toolkit char debug ver element opt + + for component in toolkit char debug ver; do + element=1 + case ${component} in + toolkit) + for opt in base gtk2; do + if [[ ${opt} == ${wxtoolkit[0]} ]]; then + continue + else + wxtoolkit[${element}]=${opt} + (( element++ )) + fi + done + ;; + + char) + for opt in ansi unicode; do + if [[ ${opt} == ${wxchar[0]} ]]; then + continue + else + wxchar[${element}]=${opt} + (( element++ )) + fi + done + ;; + + debug) + for opt in release debug; do + if [[ ${opt} == ${wxdebug[0]} ]]; then + continue + else + wxdebug[${element}]=${opt} + (( element++ )) + fi + done + ;; + + ver) + for opt in 2.10 2.8 2.6; do + if [[ ${opt} == ${wxver[0]} ]]; then + continue + else + wxver[${element}]=${opt} + (( element++ )) + fi + done + ;; + esac + done + + # Now we iterate through the installed wx-configs and find the closest match + # ( debug > char > toolkit > ver ) + + local d c t v checkconf foundconf + + for (( v = 0 ; v < ${#wxver[@]} ; v++ )); do + for (( t = 0 ; t < ${#wxtoolkit[@]} ; t++ )); do + for (( c = 0 ; c < ${#wxchar[@]} ; c++ )); do + for (( d = 0 ; d < ${#wxdebug[@]} ; d++ )); do + checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxdebug[$d]}-${wxver[$v]}" + [[ -e ${WXCONFDIR}/${checkconf} ]] || continue + foundconf=${checkconf} + break 4 + done + done + done + done + + [[ -z ${foundconf} ]] && foundconf="none" + + echo + write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" + write_warning_msg "is no longer available." + write_warning_msg + write_warning_msg "The closest matching profile: ( ${foundconf} )" + write_warning_msg "will be activated in its place." + + do_set ${foundconf} +} -- cgit v1.2.3-65-gdbad