summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Phillips <rphillips@gentoo.org>2005-05-07 19:38:54 +0000
committerRyan Phillips <rphillips@gentoo.org>2005-05-07 19:38:54 +0000
commit731f08fff742bdffc316b52912d3e9fc1fb4f089 (patch)
tree86c6c214a290bcd8a2ff43c5d2688ed42ccffe32 /x11-libs/fox-wrapper
parentAdded Yaakov Selkowitz's eclass based fox ebuilds for testing. (diff)
downloadgentoo-2-731f08fff742bdffc316b52912d3e9fc1fb4f089.tar.gz
gentoo-2-731f08fff742bdffc316b52912d3e9fc1fb4f089.tar.bz2
gentoo-2-731f08fff742bdffc316b52912d3e9fc1fb4f089.zip
Added Yaakov Selkowitz's eclass based fox ebuilds for testing.
Fixes #88924 (Portage version: 2.0.51.19)
Diffstat (limited to 'x11-libs/fox-wrapper')
-rw-r--r--x11-libs/fox-wrapper/ChangeLog10
-rw-r--r--x11-libs/fox-wrapper/files/digest-fox-wrapper-10
-rw-r--r--x11-libs/fox-wrapper/files/fox-wrapper-1.sh76
-rw-r--r--x11-libs/fox-wrapper/fox-wrapper-1.ebuild24
4 files changed, 110 insertions, 0 deletions
diff --git a/x11-libs/fox-wrapper/ChangeLog b/x11-libs/fox-wrapper/ChangeLog
new file mode 100644
index 000000000000..4ee286e7b23d
--- /dev/null
+++ b/x11-libs/fox-wrapper/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for x11-libs/fox-wrapper
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox-wrapper/ChangeLog,v 1.1 2005/05/07 19:38:54 rphillips Exp $
+
+*fox-wrapper-1 (07 May 2005)
+
+ 07 May 2005; <rphillips@gentoo.org> +fox-wrapper-1.ebuild:
+ Added Yaakov Selkowitz's eclass based fox ebuilds for testing.
+ Fixes #88924
+
diff --git a/x11-libs/fox-wrapper/files/digest-fox-wrapper-1 b/x11-libs/fox-wrapper/files/digest-fox-wrapper-1
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/x11-libs/fox-wrapper/files/digest-fox-wrapper-1
diff --git a/x11-libs/fox-wrapper/files/fox-wrapper-1.sh b/x11-libs/fox-wrapper/files/fox-wrapper-1.sh
new file mode 100644
index 000000000000..17a3f1a97025
--- /dev/null
+++ b/x11-libs/fox-wrapper/files/fox-wrapper-1.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox-wrapper/files/fox-wrapper-1.sh,v 1.1 2005/05/07 19:38:54 rphillips Exp $
+
+# Based on the am-wrapper.sh script (sys-devel/automake-wrapper-1-r1)
+#
+# Executes the correct fox-config version, based on the value of WANT_FOX.
+# All versions of fox after 1.0.x ship with a fox-config script
+#
+#
+# Stable branches first, in descending order, then unstable branches.
+# After a new stable branch, prepend the new version and bump (or remove)
+# the last unstable branch
+#
+vers="1.4 1.2 1.5"
+bindir=/usr/bin
+
+if [ "${0##*/}" = "fox-wrapper.sh" ] ; then
+ echo "fox-wrapper: Don't call this script directly, use fox-config instead" >&2
+ exit 1
+fi
+
+if [ -z "${WANT_FOX}" ] ; then
+ echo "fox-wrapper: Set the WANT_FOX variable to the desired version of fox, e.g.:" >&2
+ echo " WANT_FOX=\"1.2\" fox-config $@"
+ exit 1
+fi
+
+for v in ${vers} ; do
+ eval binary_${v/./_}="fox-${v}-config"
+done
+
+#
+# Check the WANT_FOX setting
+#
+for v in ${vers} x ; do
+ if [ "${v}" = "x" ] ; then
+ echo "fox-wrapper: WANT_FOX was set to an invalid version ${WANT_FOX}" >&2
+ echo " Valid values of WANT_FOX are: ${vers// /, }"
+ exit 1
+ fi
+
+ if [ "${WANT_FOX}" = "${v}" ] ; then
+ binary="binary_${v/./_}"
+ binary="${!binary}"
+ break
+ fi
+done
+
+if [ "${WANT_FOXWRAPPER_DEBUG}" ] ; then
+ echo "fox-wrapper: DEBUG: WANT_FOX is set to ${WANT_FOX}" >&2
+ echo "fox-wrapper: DEBUG: will execute <$binary>" >&2
+fi
+
+#
+# for further consistency
+#
+for v in ${vers} ; do
+ mybin="binary_${v/./_}"
+ if [ "${binary}" = "${!mybin}" ] ; then
+ export WANT_FOX="${v}"
+ fi
+done
+
+#
+# Now try to run the binary
+#
+if [ ! -x "${bindir}/${binary}" ] ; then
+ echo "fox-wrapper: $binary is missing or not executable." >&2
+ echo " Please try emerging the correct version of fox, i.e.:" >&2
+ echo " emerge '=x11-libs/${binary/-config/}*'" >&2
+ exit 1
+fi
+
+"$binary" "$@"
diff --git a/x11-libs/fox-wrapper/fox-wrapper-1.ebuild b/x11-libs/fox-wrapper/fox-wrapper-1.ebuild
new file mode 100644
index 000000000000..4407a0a8e705
--- /dev/null
+++ b/x11-libs/fox-wrapper/fox-wrapper-1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox-wrapper/fox-wrapper-1.ebuild,v 1.1 2005/05/07 19:38:54 rphillips Exp $
+
+DESCRIPTION="wrapper for fox-config to manage multiple versions"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~alpha ~hppa ~ppc ~ppc64 ~sparc"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+src_install() {
+ exeinto /usr/lib/misc
+ newexe ${FILESDIR}/fox-wrapper-${PV}.sh fox-wrapper.sh || die
+
+ dodir /usr/bin
+ dosym ../lib/misc/fox-wrapper.sh /usr/bin/fox-config
+}