summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-10 03:52:51 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-10 03:52:51 +0000
commit7c12c5ada21de680323a79e8b7be7420803df334 (patch)
tree48c95639bb577ec51804fa9d8056ae37671e974c /sys-devel
parentstable x86; I tried ruby, but I didn't find any shiny rubies :( (diff)
downloadhistorical-7c12c5ada21de680323a79e8b7be7420803df334.tar.gz
historical-7c12c5ada21de680323a79e8b7be7420803df334.tar.bz2
historical-7c12c5ada21de680323a79e8b7be7420803df334.zip
Add support for dirs in /etc/portage #143367 by Ryan Neufeld.
Package-Manager: portage-2.1.1_pre4
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/crossdev/ChangeLog8
-rw-r--r--sys-devel/crossdev/crossdev-0.9.15-r2.ebuild20
-rwxr-xr-xsys-devel/crossdev/files/crossdev51
-rw-r--r--sys-devel/crossdev/files/digest-crossdev-0.9.15-r21
4 files changed, 65 insertions, 15 deletions
diff --git a/sys-devel/crossdev/ChangeLog b/sys-devel/crossdev/ChangeLog
index 92696be59183..734a7de5ae33 100644
--- a/sys-devel/crossdev/ChangeLog
+++ b/sys-devel/crossdev/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/crossdev
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.35 2006/05/09 06:52:25 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.36 2006/08/10 03:52:50 vapier Exp $
+
+*crossdev-0.9.15-r2 (10 Aug 2006)
+
+ 10 Aug 2006; Mike Frysinger <vapier@gentoo.org> files/crossdev,
+ -crossdev-0.9.15-r1.ebuild, +crossdev-0.9.15-r2.ebuild:
+ Add support for dirs in /etc/portage #143367 by Ryan Neufeld.
09 May 2006; Diego Pettenò <flameeyes@gentoo.org>
crossdev-0.9.15-r1.ebuild:
diff --git a/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild b/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild
new file mode 100644
index 000000000000..66d74220ccfd
--- /dev/null
+++ b/sys-devel/crossdev/crossdev-0.9.15-r2.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-r2.ebuild,v 1.1 2006/08/10 03:52:50 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 afcb42fac879..7eb0ab634214 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 /
@@ -222,10 +222,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
@@ -441,24 +445,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
@@ -490,7 +511,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}
diff --git a/sys-devel/crossdev/files/digest-crossdev-0.9.15-r2 b/sys-devel/crossdev/files/digest-crossdev-0.9.15-r2
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/sys-devel/crossdev/files/digest-crossdev-0.9.15-r2
@@ -0,0 +1 @@
+