summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-devel/crossdev/ChangeLog9
-rw-r--r--sys-devel/crossdev/crossdev-0.9.1-r1.ebuild21
-rwxr-xr-xsys-devel/crossdev/files/crossdev63
-rw-r--r--sys-devel/crossdev/files/digest-crossdev-0.9.1-r10
4 files changed, 76 insertions, 17 deletions
diff --git a/sys-devel/crossdev/ChangeLog b/sys-devel/crossdev/ChangeLog
index 9c8384b6ce18..339e9a62d395 100644
--- a/sys-devel/crossdev/ChangeLog
+++ b/sys-devel/crossdev/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-devel/crossdev
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.11 2005/03/10 04:51:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.12 2005/03/10 22:49:08 vapier Exp $
+
+*crossdev-0.9.1-r1 (10 Mar 2005)
+
+ 10 Mar 2005; Mike Frysinger <vapier@gentoo.org> files/crossdev,
+ +crossdev-0.9.1-r1.ebuild:
+ Fix the set_use function to actually work, add an uninstall option, and make
+ sure the stage1-gcc is just a C compiler (no fortran/etc...).
*crossdev-0.9.1 (09 Mar 2005)
diff --git a/sys-devel/crossdev/crossdev-0.9.1-r1.ebuild b/sys-devel/crossdev/crossdev-0.9.1-r1.ebuild
new file mode 100644
index 000000000000..5ec955c808ca
--- /dev/null
+++ b/sys-devel/crossdev/crossdev-0.9.1-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-0.9.1-r1.ebuild,v 1.1 2005/03/10 22:49:08 vapier Exp $
+
+DESCRIPTION="Gentoo Cross-toolchain generator"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="sys-apps/portage
+ app-shells/bash
+ sys-apps/coreutils"
+
+src_install() {
+ dobin "${FILESDIR}"/crossdev || die
+ dosed "s:GENTOO_PV:${PV}:" /usr/bin/crossdev
+}
diff --git a/sys-devel/crossdev/files/crossdev b/sys-devel/crossdev/files/crossdev
index c155d94f6e0e..f4cf3e6e6e0f 100755
--- a/sys-devel/crossdev/files/crossdev
+++ b/sys-devel/crossdev/files/crossdev
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 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.8 2005/03/10 04:51:43 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.9 2005/03/10 22:49:08 vapier Exp $
source /sbin/functions.sh || exit 1
die() {
@@ -23,21 +23,18 @@ ${GOOD}Options${NORMAL}:
${GOOD}--g, --gcc${NORMAL} ver Specify version of gcc to use
${GOOD}--k, --kernel${NORMAL} ver Specify version of kernel headers to use
${GOOD}--l, --libc${NORMAL} ver Specify version of libc to use
- ${GOOD}-a, -b, -p, -v${NORMAL} Options to pass to emerge (see emerge(1))
${GOOD}-V, --version${NORMAL} Show crossdev version
+ ${GOOD}-C, --clean${NORMAL} target Uninstall specified target
+ ${GOOD}-a, -b, -p, -v${NORMAL} Options to pass to emerge (see emerge(1))
${GOOD}-s1, --stage1${NORMAL} Build a C compiler (no libc/C++)
${GOOD}-s2, --stage2${NORMAL} Build a C compiler & libc (no C++)
${GOOD}-s3, --stage3${NORMAL} Build a C/C++ compiler & libc [default]
${BRACKET}Target (-t)${NORMAL}:
- The target takes the form: ${BRACKET}ARCH-VENDOR-OS-LIBC${NORMAL}
- The default 'pc-linux-gnu' will be appended if only ARCH is specified.
- Examples:
- arm-unknown-linux-gnu sh4-pc-linux-uclibc mips-pc-linux-uclibc
-
-For more info, please see ${HILITE}crossdev${NORMAL}(8).
+ The target takes the form: ${BRACKET}ARCH-VENDOR-OS-LIBC${NORMAL}
+ Examples: arm-unknown-linux-gnu sh4-pc-linux-uclibc mips-pc-linux-uclibc
EOF
exit ${1:-0}
}
@@ -87,6 +84,41 @@ parse_target() {
CTARGET=${CPRE}
[[ -n ${CPOST} ]] && CTARGET=${CTARGET}-${CPOST}
}
+
+setup_portage_vars() {
+ PORTDIR_OVERLAY=$(portageq envvar PORTDIR_OVERLAY)
+ PORTDIR=$(portageq envvar PORTDIR)
+ PORT_LOGDIR=$(portageq envvar PORT_LOGDIR)
+ PORT_LOGDIR=${PORT_LOGDIR:-/var/log/portage}
+ PKGDIR=$(portageq envvar PKGDIR)/cross/${CTARGET}
+ [[ ! -d ${PORT_LOGDIR} ]] && mkdir -p ${PORT_LOGDIR}
+}
+
+uninstall() {
+ setup_portage_vars
+
+ [[ -d ${PORTDIR_OVERLAY}/cross-${CTARGET} ]] \
+ && rm -ri ${PORTDIR_OVERLAY}/cross-${CTARGET}
+ for f in mask keywords use ; do
+ f="/etc/portage/package.${f}"
+ [[ ! -e ${f} ]] && continue
+ sed -i -e "/cross-${CTARGET}\//d" ${f}
+ done
+
+ if [[ ! -d /var/db/pkg/cross-${CTARGET} ]] ; then
+ eerror "${CTARGET} is not installed."
+ exit 1
+ fi
+
+ cd /var/db/pkg
+ for p in cross-${CTARGET}/* ; do
+ emerge -C =${p}
+ done
+ [[ -d /usr/${CTARGET} ]] && rm -ri /usr/${CTARGET}
+
+ exit 0
+}
+
hr() {
local c=${COLUMNS:-0}
if [[ ${c} -eq 0 ]] ; then
@@ -124,6 +156,7 @@ while [[ $# -gt 0 ]] ; do
--g|--gcc) shift; GVER=$1;;
--k|--kernel) shift; KVER=$1;;
--l|--libc) shift; LVER=$1;;
+ -C|--clean) shift; parse_target $1; uninstall;;
-s?|--stage?) [[ ${STAGE} -eq 4 ]] && STAGE=${1:0-1};;
-a|-b|-p|-v) UOPTS="${UOPTS} $1";;
-h|--help) usage;;
@@ -152,12 +185,7 @@ fi
#####################
### do the emerge ###
-PORTDIR_OVERLAY=$(portageq envvar PORTDIR_OVERLAY)
-PORTDIR=$(portageq envvar PORTDIR)
-PORT_LOGDIR=$(portageq envvar PORT_LOGDIR)
-PORT_LOGDIR=${PORT_LOGDIR:-/var/log/portage}
-PKGDIR=$(portageq envvar PKGDIR)/cross/${CTARGET}
-[[ ! -d ${PORT_LOGDIR} ]] && mkdir -p ${PORT_LOGDIR}
+setup_portage_vars
(
hr
einfo "Host Portage ARCH: ${HARCH}"
@@ -197,7 +225,9 @@ set_keywords() {
fi
}
set_use() {
- local pkg=$1 use=$2
+ local pkg=$1
+ shift
+ local use=$@
[[ -z ${use} ]] && return
sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.use
echo "cross-${CTARGET}/${pkg} ${use}" >> package.use
@@ -236,7 +266,8 @@ doemerge() {
EOPTS="${UOPTS} -u --nodeps"
doemerge binutils
-USE=nocxx doemerge gcc gcc-stage1
+USE="-boundschecking -fortran -gcj -objc nocxx -static" \
+ doemerge gcc gcc-stage1
[[ ${STAGE} -gt 1 ]] || exit 0
doemerge linux-headers
USE=$TARCH doemerge ${LPKG}
diff --git a/sys-devel/crossdev/files/digest-crossdev-0.9.1-r1 b/sys-devel/crossdev/files/digest-crossdev-0.9.1-r1
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sys-devel/crossdev/files/digest-crossdev-0.9.1-r1