summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2007-11-18 21:21:10 +0000
committerRyan Hill <rhill@gentoo.org>2007-11-18 21:21:10 +0000
commit7d2e39b188819de74ff90de470a557552997e2ac (patch)
tree653a44eea170287cf8742cf24f70188574494ed9 /app-admin
parentold (diff)
downloadhistorical-7d2e39b188819de74ff90de470a557552997e2ac.tar.gz
historical-7d2e39b188819de74ff90de470a557552997e2ac.tar.bz2
historical-7d2e39b188819de74ff90de470a557552997e2ac.zip
Initial revision.
Package-Manager: portage-2.1.3.19
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/eselect-wxwidgets/ChangeLog11
-rw-r--r--app-admin/eselect-wxwidgets/Manifest37
-rw-r--r--app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild32
-rw-r--r--app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.50
-rwxr-xr-xapp-admin/eselect-wxwidgets/files/wx-config-0.534
-rwxr-xr-xapp-admin/eselect-wxwidgets/files/wxrc-0.56
-rw-r--r--app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5234
-rw-r--r--app-admin/eselect-wxwidgets/metadata.xml5
8 files changed, 359 insertions, 0 deletions
diff --git a/app-admin/eselect-wxwidgets/ChangeLog b/app-admin/eselect-wxwidgets/ChangeLog
new file mode 100644
index 000000000000..660e1c157150
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/ChangeLog
@@ -0,0 +1,11 @@
+# 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.1 2007/11/18 21:21:09 dirtyepic Exp $
+
+*eselect-wxwidgets-0.5 (18 Nov 2007)
+
+ 18 Nov 2007; Ryan Hill <dirtyepic@gentoo.org> +files/wx-config-0.5,
+ +files/wxrc-0.5, +files/wxwidgets.eselect-0.5, +metadata.xml,
+ +eselect-wxwidgets-0.5.ebuild:
+ Initial revision.
+
diff --git a/app-admin/eselect-wxwidgets/Manifest b/app-admin/eselect-wxwidgets/Manifest
new file mode 100644
index 000000000000..ba62d3ab93ee
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/Manifest
@@ -0,0 +1,37 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX wx-config-0.5 626 RMD160 6347de57912591887e03f2cd06e9c008deae5f08 SHA1 5b7fe05060c555fdd031526fd776cae87ccf954f SHA256 6941fa32ffb7b2c9a8bfbc401f059bc8eaaa92660a816e38aab98a3b9d30be72
+MD5 cff579207e215d9959359fe6a4ef20f2 files/wx-config-0.5 626
+RMD160 6347de57912591887e03f2cd06e9c008deae5f08 files/wx-config-0.5 626
+SHA256 6941fa32ffb7b2c9a8bfbc401f059bc8eaaa92660a816e38aab98a3b9d30be72 files/wx-config-0.5 626
+AUX wxrc-0.5 118 RMD160 98b17ea2e9874c39ee8e005908e2e08e66c3e800 SHA1 bef472d71e11422086204675637366244702ef5f SHA256 d9bb5934f8b560ad9adf8e610f209d251f03df4370110ba8590b2c3799e7a2f6
+MD5 965b1679c3866d7d95b9303a8197468d files/wxrc-0.5 118
+RMD160 98b17ea2e9874c39ee8e005908e2e08e66c3e800 files/wxrc-0.5 118
+SHA256 d9bb5934f8b560ad9adf8e610f209d251f03df4370110ba8590b2c3799e7a2f6 files/wxrc-0.5 118
+AUX wxwidgets.eselect-0.5 5286 RMD160 910663793484fc99f35a3f6d7b92e292a01860e2 SHA1 d27e9b7266943a80a99af89078057ea885a1b0d9 SHA256 ae71a7474b6c048b83535f1a4fd3ac21ca8e1c2f0d33646b9b244d7e2300e40f
+MD5 c302385670e6df29d6d383893826fa33 files/wxwidgets.eselect-0.5 5286
+RMD160 910663793484fc99f35a3f6d7b92e292a01860e2 files/wxwidgets.eselect-0.5 5286
+SHA256 ae71a7474b6c048b83535f1a4fd3ac21ca8e1c2f0d33646b9b244d7e2300e40f files/wxwidgets.eselect-0.5 5286
+EBUILD eselect-wxwidgets-0.5.ebuild 861 RMD160 ce6f6a8d1e959bffc66517d80a879966d9d90764 SHA1 5d3c50b02f8e2b19bbae429c5883c0c60a545d02 SHA256 d9669e2095ee53a89c6cde605250c8e4bbc266aa2972ae5421e1dfaa6ec95cc9
+MD5 7df84ee8972b39012959d52a3bdae597 eselect-wxwidgets-0.5.ebuild 861
+RMD160 ce6f6a8d1e959bffc66517d80a879966d9d90764 eselect-wxwidgets-0.5.ebuild 861
+SHA256 d9669e2095ee53a89c6cde605250c8e4bbc266aa2972ae5421e1dfaa6ec95cc9 eselect-wxwidgets-0.5.ebuild 861
+MISC ChangeLog 456 RMD160 79d103fb1cce950719f7b08b4769fa66052510bd SHA1 f2549f9358a9a4c754ad2b8eebfc5c948c75bf8e SHA256 eef7fc3805b68d9d67a1400a7c05650af079134ec339a20269ad9da096306dd6
+MD5 47ececa2859b838a2f5083df25daa709 ChangeLog 456
+RMD160 79d103fb1cce950719f7b08b4769fa66052510bd ChangeLog 456
+SHA256 eef7fc3805b68d9d67a1400a7c05650af079134ec339a20269ad9da096306dd6 ChangeLog 456
+MISC metadata.xml 163 RMD160 f00b10701f46ce312c4e3056575ecdc7214b29b6 SHA1 8ca95681a55a91e5ed44e59ba5660d00bc9b5e0c SHA256 98e13cbe1b574224e90ac29486bdd82dfe1863029528af041f0a963cb01e8c74
+MD5 34a3c9a403196f569f63f0f608007f6e metadata.xml 163
+RMD160 f00b10701f46ce312c4e3056575ecdc7214b29b6 metadata.xml 163
+SHA256 98e13cbe1b574224e90ac29486bdd82dfe1863029528af041f0a963cb01e8c74 metadata.xml 163
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-wxwidgets-0.5 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-wxwidgets-0.5 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-wxwidgets-0.5 0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFHQKzSiqiDRvmkBmIRAqNSAJ90iWFq8xhn4W6ljuyN6AVHBK22sACfYh9f
+HtwFofKShWMUkM/SfQ5+2yM=
+=Be4r
+-----END PGP SIGNATURE-----
diff --git a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild
new file mode 100644
index 000000000000..63ae67e3fcf4
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.5.ebuild
@@ -0,0 +1,32 @@
+# 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.1 2007/11/18 21:21:09 dirtyepic Exp $
+
+DESCRIPTION="Manage the system default for wxWidgets packages."
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+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
+}
diff --git a/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5 b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.5
diff --git a/app-admin/eselect-wxwidgets/files/wx-config-0.5 b/app-admin/eselect-wxwidgets/files/wx-config-0.5
new file mode 100755
index 000000000000..278e696e4f26
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/files/wx-config-0.5
@@ -0,0 +1,34 @@
+#!/bin/bash -
+#
+# /usr/bin/wx-config
+#
+# a lame wx-config wrapper by dirtyepic@gentoo.org
+
+_wxerror() {
+ echo
+ echo "Cannot find the currently selected wxWidgets profile."
+ echo
+ echo "Please use \`eselect wxwidgets\` to select an available profile and try again."
+ echo
+ 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
+ fi
+
+ if [[ -f /usr/lib/wx/config/${WXCONFIG} \
+ && -x /usr/lib/wx/config/${WXCONFIG} ]]; then
+ /usr/lib/wx/config/${WXCONFIG} $@
+ else
+ _wxerror
+ fi
+ exit 0
+fi
+
diff --git a/app-admin/eselect-wxwidgets/files/wxrc-0.5 b/app-admin/eselect-wxwidgets/files/wxrc-0.5
new file mode 100755
index 000000000000..cfc0f0f50402
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/files/wxrc-0.5
@@ -0,0 +1,6 @@
+#!/bin/sh -
+#
+# /usr/bin/wxrc
+# another lame wrapper by dirtyepic@gentoo.org
+
+$(/usr/bin/wx-config --utility=wxrc) $@
diff --git a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
new file mode 100644
index 000000000000..76f645d998bc
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
@@ -0,0 +1,234 @@
+# 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.1 2007/11/18 21:21:10 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 "<target>"
+}
+
+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 the validity of the current profile and update it if invalid."
+}
+
+do_update() {
+ # the only way we'd be without a conffile is if the user deleted it
+ # easy enough to generate a new one though
+ if [[ ! -e ${WXCONFFILE} ]]; then
+ echo
+ write_warning_msg "Could not find a current wxWidgets profile."
+ write_warning_msg
+ write_warning_msg "Please use eselect wxwidgets to set one."
+ echo
+ return 1
+ fi
+
+ currconf=$(load_config ${WXCONFFILE} WXCONFIG)
+
+ # if current config is valid, leave it alone
+ if [[ -e ${WXCONFDIR}/${currconf} ]]; then
+ echo
+ echo "Current wxWidgets profile is valid."
+ echo
+ return 0
+ fi
+
+ # 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/metadata.xml b/app-admin/eselect-wxwidgets/metadata.xml
new file mode 100644
index 000000000000..ae688b820375
--- /dev/null
+++ b/app-admin/eselect-wxwidgets/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>wxwindows</herd>
+</pkgmetadata>