From 89919ed94181c7ee8e32a5165b7d83b682833ffb Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 23 Apr 2014 19:55:10 +0000 Subject: add prefix support (bug #508438) (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2000586) --- app-admin/eselect-wxwidgets/ChangeLog | 8 +++- .../eselect-wxwidgets-20140423.ebuild | 54 ++++++++++++++++++++++ app-admin/eselect-wxwidgets/files/wx-config-1.4 | 41 ++++++++++++++++ app-admin/eselect-wxwidgets/files/wxrc-1.4 | 41 ++++++++++++++++ 4 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 app-admin/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild create mode 100755 app-admin/eselect-wxwidgets/files/wx-config-1.4 create mode 100755 app-admin/eselect-wxwidgets/files/wxrc-1.4 (limited to 'app-admin/eselect-wxwidgets') diff --git a/app-admin/eselect-wxwidgets/ChangeLog b/app-admin/eselect-wxwidgets/ChangeLog index 7c6f3e842023..b57008b08547 100644 --- a/app-admin/eselect-wxwidgets/ChangeLog +++ b/app-admin/eselect-wxwidgets/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/eselect-wxwidgets # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.68 2014/03/24 15:08:39 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.69 2014/04/23 19:55:09 ottxor Exp $ + +*eselect-wxwidgets-20140423 (23 Apr 2014) + + 23 Apr 2014; Christoph Junghans + +eselect-wxwidgets-20140423.ebuild, +files/wx-config-1.4, +files/wxrc-1.4: + add prefix support (bug #508438) 24 Mar 2014; Agostino Sarubbo eselect-wxwidgets-20131230.ebuild: diff --git a/app-admin/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild b/app-admin/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild new file mode 100644 index 000000000000..7e73d7504651 --- /dev/null +++ b/app-admin/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild,v 1.1 2014/04/23 19:55:09 ottxor Exp $ + +EAPI="5" + +inherit multilib + +WXWRAP_VER=1.4 + +DESCRIPTION="Eselect module and wrappers for wxWidgets" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="http://dev.gentoo.org/~ottxor/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="" + +RDEPEND="app-admin/eselect" + +src_prepare() { + cp "${FILESDIR}"/{wx-config,wxrc}-${WXWRAP_VER} . || die + sed \ + -e "/^LIBDIR=/s:lib:$(get_libdir):" \ + -e "/^EPREFIX=/s:'':'${EPREFIX}':" \ + -i {wx-config,wxrc}-${WXWRAP_VER} || die +} + +src_install() { + insinto /usr/share/eselect/modules + doins wxwidgets.eselect + + insinto /usr/share/aclocal + newins "${FILESDIR}"/wxwin.m4-3.0 wxwin.m4 + + newbin wx-config-${WXWRAP_VER} wx-config + newbin wxrc-${WXWRAP_VER} wxrc + + keepdir /var/lib/wxwidgets + keepdir /usr/share/bakefile/presets +} + +pkg_postinst() { + if [[ ! -e ${EROOT}/var/lib/wxwidgets/current ]]; then + echo 'WXCONFIG="none"' > "${EROOT}"/var/lib/wxwidgets/current + fi + + echo + elog "This eselect module only controls the version of wxGTK used when" + elog "building packages outside of portage. If you are not doing development" + elog "with wxWidgets or bakefile you will never need to use it." + echo +} diff --git a/app-admin/eselect-wxwidgets/files/wx-config-1.4 b/app-admin/eselect-wxwidgets/files/wx-config-1.4 new file mode 100755 index 000000000000..30080aca3418 --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wx-config-1.4 @@ -0,0 +1,41 @@ +#!/bin/sh - +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-1.4,v 1.1 2014/04/23 19:55:10 ottxor Exp $ +# +# /usr/bin/wx-config +# +# a lame wx-config wrapper (bugs to wxwidgets@gentoo.org) + +EPREFIX='' +LIBDIR="lib" + +_wxerror() { + cat >&2 <<- EOF + An error occurred while calling wx-config: + + ${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} "$@" + 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}" "$@" + else + _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" + fi + exit 0 +fi + diff --git a/app-admin/eselect-wxwidgets/files/wxrc-1.4 b/app-admin/eselect-wxwidgets/files/wxrc-1.4 new file mode 100755 index 000000000000..b9434de47b0b --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wxrc-1.4 @@ -0,0 +1,41 @@ +#!/bin/sh - +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxrc-1.4,v 1.1 2014/04/23 19:55:10 ottxor Exp $ +# +# /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 + -- cgit v1.2.3-65-gdbad