summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2023-01-07 19:55:27 +0100
committerArsen Arsenović <arsen@aarsen.me>2023-01-07 19:55:27 +0100
commit04738deab707c82d393705b19ddbcb9cf347120c (patch)
tree7d58439fe9c67bfdc5a2aff2d431d4a0b0482709 /wxrc-1.4
parentwxwidgets.eselect: Update version number. (diff)
downloadeselect-wxwidgets-04738deab707c82d393705b19ddbcb9cf347120c.tar.gz
eselect-wxwidgets-04738deab707c82d393705b19ddbcb9cf347120c.tar.bz2
eselect-wxwidgets-04738deab707c82d393705b19ddbcb9cf347120c.zip
Check in wx-config, wxrc and wxwin.m4
Source: https://dev.gentoo.org/~mgorny/dist/eselect-wxwidgets-files.tar.bz2 DIST eselect-wxwidgets-files.tar.bz2 9126 BLAKE2B 47ec94aec721d325fc483ece28e84b48c35b103078415447b6e79e68ab44af9356955c960b9464713396f4cbbf663522e5a4493516414641aa5b99e7cdca0ac8 SHA512 c5aba3bf4bbb891534e0c7a444da6cb90a947dab407e436a1eccd13ddb33251816ce95b5fb6826aa9a64ec2b3d9be09c9852859597b0b8ce91cbaf0f6ed6da5e
Diffstat (limited to 'wxrc-1.4')
-rw-r--r--wxrc-1.440
1 files changed, 40 insertions, 0 deletions
diff --git a/wxrc-1.4 b/wxrc-1.4
new file mode 100644
index 0000000..8339ee5
--- /dev/null
+++ b/wxrc-1.4
@@ -0,0 +1,40 @@
+#!/bin/sh -
+#
+# /usr/bin/wxrc
+#
+# a lame wxrc wrapper (bugs to wxwidgets@gentoo.org)
+
+EPREFIX=''
+LIBDIR="lib"
+
+_wxerror() {
+ cat >&2 <<- EOF
+ An error occurred while calling wxrc:
+
+ ${1}
+
+ Please use \`eselect wxwidgets\` to select an available profile and try again.
+ EOF
+ exit 1
+}
+
+if [ -n "${WX_ECLASS_CONFIG}" ]; then
+ $(${WX_ECLASS_CONFIG} --utility=wxrc) "$@"
+ exit 0
+else
+ if [ -e "${EPREFIX}"/var/lib/wxwidgets/current ]; then
+ . "${EPREFIX}"/var/lib/wxwidgets/current
+ else
+ _wxerror "Cannot find the wxWidgets profile configuration ( ${EPREFIX}/var/lib/wxwidgets/current )"
+ fi
+
+ [ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected"
+
+ if [ -x "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" ]; then
+ $("${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" --utility=wxrc) "$@"
+ else
+ _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )"
+ fi
+ exit 0
+fi
+