diff options
Diffstat (limited to 'sys-devel/crossdev')
-rw-r--r-- | sys-devel/crossdev/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/crossdev/crossdev-0.9.5.ebuild (renamed from sys-devel/crossdev/crossdev-0.9.1-r2.ebuild) | 2 | ||||
-rwxr-xr-x | sys-devel/crossdev/files/crossdev | 104 | ||||
-rw-r--r-- | sys-devel/crossdev/files/digest-crossdev-0.9.5 (renamed from sys-devel/crossdev/files/digest-crossdev-0.9.1-r2) | 0 |
4 files changed, 72 insertions, 43 deletions
diff --git a/sys-devel/crossdev/ChangeLog b/sys-devel/crossdev/ChangeLog index a7cc7395a47b..0d4cf1398ed1 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.13 2005/03/12 19:33:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.14 2005/03/16 23:26:34 vapier Exp $ + +*crossdev-0.9.5 (16 Mar 2005) + + 16 Mar 2005; Mike Frysinger <vapier@gentoo.org> files/crossdev, + -crossdev-0.9.1-r2.ebuild, +crossdev-0.9.5.ebuild: + Make binutils/gcc/linux-headers dynamic package names (to support + mips-headers). Add support for pulling in avr libc (thanks to Scott). *crossdev-0.9.1-r2 (12 Mar 2005) diff --git a/sys-devel/crossdev/crossdev-0.9.1-r2.ebuild b/sys-devel/crossdev/crossdev-0.9.5.ebuild index 8d93ce147265..64cef9bc9923 100644 --- a/sys-devel/crossdev/crossdev-0.9.1-r2.ebuild +++ b/sys-devel/crossdev/crossdev-0.9.5.ebuild @@ -1,6 +1,6 @@ # 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-r2.ebuild,v 1.2 2005/03/15 04:59:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-0.9.5.ebuild,v 1.1 2005/03/16 23:26:34 vapier Exp $ DESCRIPTION="Gentoo Cross-toolchain generator" HOMEPAGE="http://www.gentoo.org/" diff --git a/sys-devel/crossdev/files/crossdev b/sys-devel/crossdev/files/crossdev index 1c205e74c06b..f41b8b9cc519 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.11 2005/03/14 23:20:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.12 2005/03/16 23:26:34 vapier Exp $ source /sbin/functions.sh || exit 1 die() { @@ -26,7 +26,7 @@ ${GOOD}Options${NORMAL}: ${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}-b, -p, -v${NORMAL} Options to pass to emerge (see emerge(1)) ${GOOD}-s0, --stage0${NORMAL} Build just binutils ${GOOD}-s1, --stage1${NORMAL} Build a C compiler (no libc/C++) @@ -61,7 +61,7 @@ parse_target() { i?86*) TARCH=x86;; x86) TARCH=x86; CPRE="i386";; m68*) TARCH=m68k;; - mips*) TARCH=mips;; + mips*) TARCH=mips ; KPKG="mips-headers";; powerpc64*) TARCH=ppc64;; ppc64) TARCH=ppc64; CPRE="powerpc64";; powerpc*) TARCH=ppc;; @@ -74,14 +74,16 @@ parse_target() { ##################### ### other targets ### - avr*) TARCH=${HARCH}; - CPOST=""; STAGE=1; GUSE="-fortran -gtk nocxx -gcj -objc";; + avr*) TARCH=${HARCH}; CPOST=""; + KPKG="[none]"; STAGE="2"; + LCAT="dev-embedded"; LPKG="avr-libc"; + GUSE="-fortran -gtk nocxx -gcj -objc";; ####################### ### unknown targets ### *) usage 1;; esac - + CTARGET=${CPRE} [[ -n ${CPOST} ]] && CTARGET=${CTARGET}-${CPOST} } @@ -118,9 +120,13 @@ uninstall() { emerge -C =${p} done [[ -d /usr/${CTARGET} ]] && rm -ri /usr/${CTARGET} + rm -f /etc/env.d/{binutils,gcc}/config-${CTARGET} exit 0 } +is_s1() { [[ ${STAGE} -gt 0 ]] ; } +is_s2() { [[ ${STAGE} -gt 1 ]] ; } +is_s3() { [[ ${STAGE} -gt 2 ]] ; } hr() { local c=${COLUMNS:-0} @@ -130,7 +136,7 @@ hr() { && c=50 \ || c=${c##* } fi - local ext=${1:- -} br="" + local ext=${1:- _ - · -} br="" while [[ ${#br} -lt ${c} ]] ; do br=${br}${ext} done @@ -145,12 +151,11 @@ TARCH= HARCH=$(env -uARCH portageq envvar ARCH) CTARGET= STAGE=4 -STAGE_DISP=( "binutils" "gcc C-only" "libc" "gcc C/C++" ) -BVER="[latest]" ; BUSE="" -GVER="[latest]" ; GUSE="" -KVER="[latest]" ; KUSE="" -LPKG="glibc" -LVER="[latest]" ; LUSE="" +STAGE_DISP=( "binutils" "C compiler only" "C compiler & libc" "C/C++ compiler" ) +BCAT="sys-devel" ; BPKG="binutils" ; BVER="[latest]" ; BUSE="" +GCAT="sys-devel" ; GPKG="gcc" ; GVER="[latest]" ; GUSE="" +KCAT="sys-kernel" ; KPKG="linux-headers" ; KVER="[latest]" ; KUSE="" +LCAT="sys-libs" ; LPKG="glibc" ; LVER="[latest]" ; LUSE="" while [[ $# -gt 0 ]] ; do case $1 in @@ -162,7 +167,7 @@ while [[ $# -gt 0 ]] ; do --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";; + -b|-p|-v) UOPTS="${UOPTS} $1";; -h|--help) usage;; *) eerror "UNKNOWN OPTION: '$1'" ; usage 1;; esac @@ -170,6 +175,7 @@ while [[ $# -gt 0 ]] ; do done [[ -z ${CTARGET} ]] && usage 1 [[ ${CTARGET} == *-uclibc ]] && LPKG="uclibc" +[[ ${STAGE} -eq 4 ]] && STAGE=3 ##################### ### sanity checks ### @@ -197,12 +203,12 @@ einfo "Target Portage ARCH: ${TARCH}" einfo "Target System: ${CTARGET}" einfo "Stage: ${STAGE} (${STAGE_DISP[${STAGE}]})" echo -einfo "binutils: ${BVER}" -[[ ${STAGE} -gt 0 ]] && \ -einfo "gcc: ${GVER}" -[[ ${STAGE} -gt 1 ]] && \ -einfo "linux-headers: ${KVER}" && \ -einfo "libc: ${LPKG}${LVER}" +einfo "binutils: ${BPKG}-${BVER}" +is_s1 && \ +einfo "gcc: ${GPKG}-${GVER}" +is_s2 && \ +einfo "headers: ${KPKG}-${KVER}" && \ +einfo "libc: ${LPKG}-${LVER}" echo einfo "PORTDIR_OVERLAY: ${PORTDIR_OVERLAY}" einfo "PORT_LOGDIR: ${PORT_LOGDIR}" @@ -213,15 +219,12 @@ hr cat ${PORT_LOGDIR}/cross-${CTARGET}-info.log emerge info >> ${PORT_LOGDIR}/cross-${CTARGET}-info.log -################# -mkdir -p /etc/portage -[[ -z $(grep -s "^cross-${CTARGET}$" /etc/portage/categories) ]] \ - && echo cross-${CTARGET} >> /etc/portage/categories -mkdir -p "${PORTDIR_OVERLAY}"/cross-${CTARGET} +#################################### +### Fix up portage files / paths ### -cd /etc/portage set_keywords() { local pkg=$1 ver=$2 + [[ -z ${pkg} ]] && return 0 sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.keywords package.mask if [[ ${ver} == "[latest]" ]] ; then echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> package.keywords @@ -232,26 +235,45 @@ set_keywords() { } set_use() { local pkg=$1 + [[ -z ${pkg} ]] && return 0 shift local use=$@ [[ -z ${use} ]] && return sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.use echo "cross-${CTARGET}/${pkg} ${use}" >> package.use } +set_links() { + local cat=$1 pkg=$2 + ln -sf "${PORTDIR}"/${cat}/${pkg} "${PORTDIR_OVERLAY}"/cross-${CTARGET}/${pkg} +} +set_portage() { + local cat=$1 pkg=$2 ver=$3 + shift ; shift ; shift + local use=$@ + + [[ ${pkg} == "[none]" ]] && return 0 + + set_keywords ${pkg} ${ver} + set_use ${pkg} ${use} + set_links ${cat} ${pkg} +} + +mkdir -p /etc/portage +[[ -z $(grep -s "^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} -set_keywords binutils ${BVER} ; set_use binutils ${BUSE} -set_keywords gcc ${GVER} ; set_use gcc ${GUSE} -set_keywords linux-headers ${KVER} ; set_use linux-headers ${KUSE} -set_keywords ${LPKG} ${LVER} ; set_use ${LPKG} ${LUSE} -cd "${PORTDIR_OVERLAY}"/cross-${CTARGET} -ln -sf "${PORTDIR}"/sys-devel/binutils -ln -sf "${PORTDIR}"/sys-kernel/linux-headers -ln -sf "${PORTDIR}"/sys-devel/gcc -ln -sf "${PORTDIR}"/sys-libs/${LPKG} ${LPKG} + set_portage ${BCAT} ${BPKG} ${BVER} ${BUSE} +is_s1 && set_portage ${GCAT} ${GPKG} ${GVER} ${GUSE} +is_s2 && set_portage ${KCAT} ${KPKG} ${KVER} ${KUSE} +is_s2 && set_portage ${LCAT} ${LPKG} ${LVER} ${LUSE} ################# doemerge() { + [[ $1 == "[none]" ]] && return 0 + local logfile=${PORT_LOGDIR}/cross-${CTARGET} [[ -z $2 ]] \ && logfile=${logfile}-$1.log \ @@ -271,16 +293,16 @@ doemerge() { # we include the '-u' so that we don't re-emerge packages EOPTS="${UOPTS} -u --nodeps" -doemerge binutils -[[ ${STAGE} -gt 0 ]] || exit 0 +doemerge ${BPKG} +is_s1 || exit 0 USE="-boundschecking -fortran -gcj -objc nocxx -static" \ - doemerge gcc gcc-stage1 -[[ ${STAGE} -gt 1 ]] || exit 0 -doemerge linux-headers + doemerge ${GPKG} ${GPKG}-stage1 +is_s2 || exit 0 +doemerge ${KPKG} USE=$TARCH doemerge ${LPKG} [[ ${STAGE} -gt 2 ]] || exit 0 if ! type -p ${CTARGET}-g++ > /dev/null ; then EOPTS="${UOPTS} --nodeps" fi -doemerge gcc gcc-stage2 +doemerge ${GPKG} ${GPKG}-stage2 diff --git a/sys-devel/crossdev/files/digest-crossdev-0.9.1-r2 b/sys-devel/crossdev/files/digest-crossdev-0.9.5 index e69de29bb2d1..e69de29bb2d1 100644 --- a/sys-devel/crossdev/files/digest-crossdev-0.9.1-r2 +++ b/sys-devel/crossdev/files/digest-crossdev-0.9.5 |