From 2ed473961e81c5392c2956f2be824886ccdd7348 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 10 Aug 2006 11:00:26 +0000 Subject: Updates from vapier's one merged svn path=/; revision=49 --- sys-devel/crossdev/crossdev-0.9.15-r2.ebuild | 20 ----------- sys-devel/crossdev/crossdev-0.9.15-r3.ebuild | 20 +++++++++++ sys-devel/crossdev/files/crossdev | 51 ++++++++++++++++++++-------- 3 files changed, 57 insertions(+), 34 deletions(-) delete mode 100644 sys-devel/crossdev/crossdev-0.9.15-r2.ebuild create mode 100644 sys-devel/crossdev/crossdev-0.9.15-r3.ebuild diff --git a/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild b/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild deleted file mode 100644 index 1e6e1c0..0000000 --- a/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-0.9.15-r1.ebuild,v 1.3 2006/06/25 01:28:25 vapier Exp $ - -DESCRIPTION="Gentoo Cross-toolchain generator" -HOMEPAGE="http://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" -IUSE="" - -RDEPEND=">=sys-apps/portage-2.1 - app-shells/bash" - -src_install() { - dosbin "${FILESDIR}"/crossdev || die - dosed "s:GENTOO_PV:${PV}:" /usr/sbin/crossdev -} diff --git a/sys-devel/crossdev/crossdev-0.9.15-r3.ebuild b/sys-devel/crossdev/crossdev-0.9.15-r3.ebuild new file mode 100644 index 0000000..1e6e1c0 --- /dev/null +++ b/sys-devel/crossdev/crossdev-0.9.15-r3.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-0.9.15-r1.ebuild,v 1.3 2006/06/25 01:28:25 vapier Exp $ + +DESCRIPTION="Gentoo Cross-toolchain generator" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="" + +RDEPEND=">=sys-apps/portage-2.1 + app-shells/bash" + +src_install() { + dosbin "${FILESDIR}"/crossdev || die + dosed "s:GENTOO_PV:${PV}:" /usr/sbin/crossdev +} diff --git a/sys-devel/crossdev/files/crossdev b/sys-devel/crossdev/files/crossdev index 7f7f5a6..67fa11f 100755 --- a/sys-devel/crossdev/files/crossdev +++ b/sys-devel/crossdev/files/crossdev @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.68 2006/06/27 08:08:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.69 2006/08/10 03:52:50 vapier Exp $ cd / @@ -233,10 +233,14 @@ uninstall() { [[ -d ${PORTDIR_OVERLAY}/cross-${CTARGET} ]] \ && rm -r ${PORTDIR_OVERLAY}/cross-${CTARGET} - for f in package.{mask,keywords,use} categories ; do + sed -i -e "/^cross-${CTARGET}$/d" /etc/portage/categories + for f in package.{mask,keywords,use} ; do f="/etc/portage/${f}" - [[ ! -e ${f} ]] && continue - sed -i -e "/cross-${CTARGET}\//d" "${f}" + if [[ -d ${f} ]] ; then + rm -f "${f}"/cross-${CTARGET} + elif [[ -f ${f} ]] ; then + sed -i -e "/cross-${CTARGET}\//d" "${f}" + fi done if [[ ! -d /var/db/pkg/cross-${CTARGET} ]] ; then @@ -452,24 +456,41 @@ emerge --info >> ${PORT_LOGDIR}/cross-${CTARGET}-info.log ### Fix up portage files / paths ### set_keywords() { - local pkg=$1 ver=$2 + local pkg=$1 ver=$2 output [[ -z ${pkg} ]] && return 0 - sed -i -e "/^cross-${CTARGET}\/${pkg} /d" package.keywords + if [[ -f package.keywords ]] ; then + output="package.keywords" + sed -i -e "/^cross-${CTARGET}\/${pkg} /d" ${output} + else + output="package.keywords/cross-${CTARGET}" + rm -f ${output} + fi if [[ ${ver} == "[latest]" ]] || [[ -z ${ver} ]] ; then - echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> package.keywords + echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> ${output} else - sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.mask - echo ">cross-${CTARGET}/${pkg}-${ver}" >> package.mask - echo "cross-${CTARGET}/${pkg} * ~* -*" >> package.keywords + echo "cross-${CTARGET}/${pkg} * ~* -*" >> ${output} + if [[ -f package.mask ]] ; then + output="package.mask" + sed -i -e "/cross-${CTARGET}\/${pkg}/d" ${output} + else + output="package.mask/cross-${CTARGET}" + rm -f ${output} + fi + echo ">cross-${CTARGET}/${pkg}-${ver}" >> ${output} fi } set_use() { - local pkg=$1 + local pkg=$1 output shift local use=$@ [[ -z ${use} ]] && return 0 - sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.use - echo "cross-${CTARGET}/${pkg} ${use}" >> package.use + if [[ -f package.use ]] ; then + output="package.use" + sed -i -e "/cross-${CTARGET}\/${pkg}/d" ${output} + else + output="package.use/cross-${CTARGET}" + fi + echo "cross-${CTARGET}/${pkg} ${use}" >> ${output} } set_links() { local cat=$1 pkg=$2 @@ -501,7 +522,9 @@ grep -qs "^cross-${CTARGET}$" /etc/portage/categories \ || echo cross-${CTARGET} >> /etc/portage/categories mkdir -p "${PORTDIR_OVERLAY}"/cross-${CTARGET} cd /etc/portage -touch package.{keywords,mask,use} +for f in package.{keywords,mask,use} ; do + [[ ! -e ${f} ]] && mkdir ${f} +done set_portage ${BCAT} ${BPKG} ${BVER} set_portage ${GCAT} ${GPKG} ${GVER} -- cgit v1.2.3-65-gdbad