summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich Oslage <bluebird@gentoo.org>2008-08-02 15:12:13 +0000
committerFriedrich Oslage <bluebird@gentoo.org>2008-08-02 15:12:13 +0000
commit9b2e3d6ae186e5afd760b9c56df1b1d961bc261b (patch)
tree2c4283fe116f4f2f8c74617bb82e26813832d3f3 /sys-devel
parent- Remove p.masking per request (diff)
downloadgentoo-2-9b2e3d6ae186e5afd760b9c56df1b1d961bc261b.tar.gz
gentoo-2-9b2e3d6ae186e5afd760b9c56df1b1d961bc261b.tar.bz2
gentoo-2-9b2e3d6ae186e5afd760b9c56df1b1d961bc261b.zip
Add helper script to make cross-compiling easier, remove old.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/icecream/ChangeLog13
-rw-r--r--sys-devel/icecream/files/0.9.0-conf.d-verbosity.patch19
-rw-r--r--sys-devel/icecream/files/0.9.0-create-env-multilib.patch30
-rw-r--r--sys-devel/icecream/files/0.9.0-dont-create-symlinks.patch14
-rw-r--r--sys-devel/icecream/files/0.9.0-run-march-native-locally.patch16
-rw-r--r--sys-devel/icecream/files/icecream-create-env112
-rw-r--r--sys-devel/icecream/icecream-0.9.0-r1.ebuild127
-rw-r--r--sys-devel/icecream/icecream-0.9.1-r1.ebuild (renamed from sys-devel/icecream/icecream-0.9.1.ebuild)4
8 files changed, 127 insertions, 208 deletions
diff --git a/sys-devel/icecream/ChangeLog b/sys-devel/icecream/ChangeLog
index 2e6378da5e28..81fb0c9fda92 100644
--- a/sys-devel/icecream/ChangeLog
+++ b/sys-devel/icecream/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-devel/icecream
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/ChangeLog,v 1.18 2008/06/29 07:51:55 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/ChangeLog,v 1.19 2008/08/02 15:12:12 bluebird Exp $
+
+*icecream-0.9.1-r1 (02 Aug 2008)
+
+ 02 Aug 2008; Friedrich Oslage <bluebird@gentoo.org>
+ -files/0.9.0-create-env-multilib.patch,
+ -files/0.9.0-dont-create-symlinks.patch,
+ -files/0.9.0-conf.d-verbosity.patch,
+ -files/0.9.0-run-march-native-locally.patch, +files/icecream-create-env,
+ -icecream-0.9.0-r1.ebuild, -icecream-0.9.1.ebuild,
+ +icecream-0.9.1-r1.ebuild:
+ Add helper script to make cross-compiling easier, remove old.
29 Jun 2008; Torsten Veller <tove@gentoo.org> icecream-0.9.0-r1.ebuild,
icecream-0.9.1.ebuild:
diff --git a/sys-devel/icecream/files/0.9.0-conf.d-verbosity.patch b/sys-devel/icecream/files/0.9.0-conf.d-verbosity.patch
deleted file mode 100644
index 8e68a898eb7f..000000000000
--- a/sys-devel/icecream/files/0.9.0-conf.d-verbosity.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -urN icecream.orig/suse/sysconfig.icecream icecream/suse/sysconfig.icecream
---- icecream.orig/suse/sysconfig.icecream
-+++ icecream/suse/sysconfig.icecream
-@@ -39,6 +39,15 @@
- #
- ## Type: string
- ## Path: Applications/icecream
-+## Defaut: -v
-+#
-+# icecream's level of verbosity ([-v[v[v]]])
-+#
-+ICECREAM_VERBOSITY="-v"
-+
-+#
-+## Type: string
-+## Path: Applications/icecream
- ## Defaut: ""
- #
- # Identification for the network the scheduler and daemon run on.
diff --git a/sys-devel/icecream/files/0.9.0-create-env-multilib.patch b/sys-devel/icecream/files/0.9.0-create-env-multilib.patch
deleted file mode 100644
index 643b8790545c..000000000000
--- a/sys-devel/icecream/files/0.9.0-create-env-multilib.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -urN icecream.orig/icecc-create-env icecream/icecc-create-env
---- icecream.orig/client/icecc-create-env
-+++ icecream/client/icecc-create-env
-@@ -11,6 +11,16 @@
- is_darwin=1
- fi
-
-+lib_is_symlink=0
-+if test -L /lib; then
-+ lib_is_symlink=1
-+ real_libdir="`readlink /lib`"
-+ if [[ "`readlink /usr/lib`" != "$real_libdir" ]]; then
-+ echo "Hmmm, /lib is a symlink to $real_libdir but /usr/lib is not...this doesn't look sane!"
-+ exit 1
-+ fi
-+fi
-+
- is_contained ()
- {
- case " $target_files " in
-@@ -55,6 +65,9 @@
- # and prefer that on the assumption that it is a more generic one.
- local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
- test -f "$baselib" && lib=$baselib
-+ if test "$lib_is_symlink" = 1; then
-+ lib="${lib/\/lib\///$real_libdir/}"
-+ fi
- add_file "$lib"
- done
- fi
diff --git a/sys-devel/icecream/files/0.9.0-dont-create-symlinks.patch b/sys-devel/icecream/files/0.9.0-dont-create-symlinks.patch
deleted file mode 100644
index 5f9daa5f7e18..000000000000
--- a/sys-devel/icecream/files/0.9.0-dont-create-symlinks.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -urN icecream.orig/client/Makefile.am icecream/client/Makefile.am
---- icecream.orig/client/Makefile.am
-+++ icecream/client/Makefile.am
-@@ -17,10 +17,6 @@
-
- install-exec-local:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-- for link in g++ gcc c++ cc; do \
-- rm -f $(DESTDIR)$(bindir)/$$link ;\
-- $(LN_S) icecc $(DESTDIR)$(bindir)/$$link ;\
-- done
-
- uninstall-local:
- for link in g++ gcc c++ cc; do \
diff --git a/sys-devel/icecream/files/0.9.0-run-march-native-locally.patch b/sys-devel/icecream/files/0.9.0-run-march-native-locally.patch
deleted file mode 100644
index fe89637b61cc..000000000000
--- a/sys-devel/icecream/files/0.9.0-run-march-native-locally.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -urN icecream.orig/client/arg.cpp icecream/client/arg.cpp
---- icecream.orig/client/arg.cpp
-+++ icecream/client/arg.cpp
-@@ -182,6 +182,12 @@
- #endif
- always_local = true;
- args.append(a, Arg_Local);
-+ } else if (!strcmp(a, "-march=native") || !strcmp(a, "-mcpu=native") || !strcmp(a, "-mtune=native")) {
-+#if CLIENT_DEBUG
-+ log_info() << "-{march,mpcu,mtune}=native optimizes for local machine; must be local" << endl;
-+#endif
-+ always_local = true;
-+ args.append(a, Arg_Local);
- } else if (!strcmp(a, "-c")) {
- seen_c = true;
- } else if (str_startswith("-o", a)) {
diff --git a/sys-devel/icecream/files/icecream-create-env b/sys-devel/icecream/files/icecream-create-env
new file mode 100644
index 000000000000..801f07afc6c4
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-create-env
@@ -0,0 +1,112 @@
+#!/bin/bash
+#
+# icecream-create-env - helper script to create icecc environments(mostly for cross-compiling)
+#
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Please note, this script has been designed to work with Gentoo's crossdev, it may or may
+# not work with cross-toolchains that were build differently.
+#
+#
+# Usage: "./icecream-create-env" creates a native environment(similar to icecc --build-native)
+# "./icecream-create-env CHOST" creates a cross-compile environment using the cross-toolchain created by crossdev
+# Example:
+# "emerge crossdev && crossdev -t sparc-unknown-linux-gnu && icecream-create-env sparc-unknown-linux"
+
+if [ `id -u` -ne 0 ]
+then
+ echo "Only the superuser can execute this script."
+ exit 1
+fi
+
+# param 1 = CHOST
+prefix="${1}"
+
+if [ -z "${prefix}" ]
+then
+ prefix="`gcc -dumpmachine`"
+fi
+
+gccbin=`which ${prefix}-gcc 2>/dev/null`
+if [ ! -e "${gccbin}" ]
+then
+ echo "Can't find ${prefix}-gcc!"
+ exit 1
+fi
+
+version="`${prefix}-gcc -dumpversion`"
+
+tmpdir=`mktemp -d`
+tmpfile=`mktemp`
+
+echo "Creating icecc environment for ${prefix}..."
+
+mkdir -p ${tmpdir}/usr/bin
+
+echo "Adding `which ${prefix}-as`... as /usr/bin/as"
+cp -p `which ${prefix}-as` ${tmpdir}/usr/bin/as
+
+if [ "`gcc -dumpmachine`" = "${prefix}" ]
+then
+ echo "Adding /usr/${prefix}/gcc-bin/${version}/g++ as /usr/bin/g++..."
+ cp -p /usr/${prefix}/gcc-bin/${version}/g++ ${tmpdir}/usr/bin
+ echo "Adding /usr/${prefix}/gcc-bin/${version}/gcc as /usr/bin/gcc..."
+ cp -p /usr/${prefix}/gcc-bin/${version}/gcc ${tmpdir}/usr/bin
+else
+ echo "Adding /usr/${CHOST}/${prefix}/gcc-bin/${version}/${prefix}-g++ as /usr/bin/g++..."
+ cp -p /usr/${CHOST}/${prefix}/gcc-bin/${version}/${prefix}-g++ ${tmpdir}/usr/bin/g++
+ echo "Adding /usr/${CHOST}/${prefix}/gcc-bin/${version}/${prefix}-gcc as /usr/bin/gcc..."
+ cp -p /usr/${CHOST}/${prefix}/gcc-bin/${version}/${prefix}-gcc ${tempdir}/usr/bin/gcc
+fi
+
+echo "Adding /usr/libexec/gcc/${prefix}/${version}/cc1 as /usr/bin/cc1..."
+cp -p /usr/libexec/gcc/${prefix}/${version}/cc1 ${tmpdir}/usr/bin/
+
+echo "Adding /usr/libexec/gcc/${prefix}/${version}/cc1plus as /usr/bin/cc1plus.."
+cp -p /usr/libexec/gcc/${prefix}/${version}/cc1plus ${tmpdir}/usr/bin/
+
+# binaries are there, now copy libs
+for binary in `ls ${tmpdir}/usr/bin/`
+do
+ for library in `ldd ${tmpdir}/usr/bin/${binary} | tr '=>' ' ' | awk '{print $1" "$2}'`
+ do
+ if [ ! -e "${tmpdir}/${library}" ] && [ -e "${library}" ]
+ then
+ echo "Adding ${library}..."
+ cp --parents "${library}" ${tmpdir}/
+ fi
+ done
+done
+
+# rebuild ld.so.cache
+echo "Creating /etc/ld.so.cache..."
+cp --parents /etc/ld.so.conf ${tmpdir}/
+ldconfig -r ${tmpdir}
+rm ${tmpdir}/etc/ld.so.conf
+
+echo "Testing icecc environment..."
+touch ${tmpdir}/empty.c
+chroot ${tmpdir}/ /usr/bin/gcc -c /empty.c
+tested=${?}
+rm ${tmpdir}/empty.c
+
+if [ "${tested}" -ne 0 ]
+then
+ echo ""
+ echo "Creating icecc environment failed. Please see error message(s) above! The temporary directory is: ${tmpdir}/"
+else
+ # pack
+ echo "Compressing files..."
+ tar -c -z -C ${tmpdir} -f ${tmpfile} `ls ${tmpdir}/`
+
+ newname="`md5sum ${tmpfile} | awk '{print $1}'`.tar.gz"
+ mv ${tmpfile} ${newname}
+
+ # cleanup
+ rm -rf ${tmpdir}
+
+ echo ""
+ echo "Icecc environment has been created. It has been saved as ${newname}!"
+fi
+
diff --git a/sys-devel/icecream/icecream-0.9.0-r1.ebuild b/sys-devel/icecream/icecream-0.9.0-r1.ebuild
deleted file mode 100644
index 4bc960a97b2b..000000000000
--- a/sys-devel/icecream/icecream-0.9.0-r1.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/icecream-0.9.0-r1.ebuild,v 1.2 2008/06/29 07:51:55 tove Exp $
-
-inherit autotools eutils flag-o-matic
-
-MY_P="icecc-${PV}"
-
-DESCRIPTION="icecc is a program for distributed compiling of C(++) code across several machines; based on distcc"
-HOMEPAGE="http://en.opensuse.org/Icecream"
-SRC_URI="ftp://ftp.suse.com/pub/projects/${PN}/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="doc"
-
-RDEPEND="virtual/libc"
-DEPEND="${RDEPEND}
- doc? ( =kde-base/kdelibs-3.5* )"
-
-S="${WORKDIR}/${MY_P}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch "${FILESDIR}/${PV}-dont-create-symlinks.patch"
- epatch "${FILESDIR}/${PV}-conf.d-verbosity.patch"
- epatch "${FILESDIR}/${PV}-run-march-native-locally.patch"
- epatch "${FILESDIR}/${PV}-create-env-multilib.patch"
-
- use amd64 && append-flags -fPIC -DPIC
-
- eautoreconf
-}
-
-src_compile() {
- econf
- emake || die "compiling icecc failed"
-
- # compile manpages...yeah, we need meinproc, ergo kdelibs for this :(
- if use doc; then
- cd doc
- for docfile in *.docbook; do
- outputfile="${docfile/man-/}"
- outputfile="${outputfile/.docbook/}"
-
- meinproc \
- --stylesheet /usr/kde/3.5/share/apps/ksgmltools2/customization/kde-man.xsl \
- "${docfile}" && \
- mv manpage.troff "${outputfile}" || \
- die "compiling manpages failed"
- done
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "install failed"
-
- dosbin "${FILESDIR}"/icecream-config || die "install failed"
-
- newconfd suse/sysconfig.icecream icecream || die "install failed"
- doinitd "${FILESDIR}"/icecream || die "install failed"
-
- diropts -m0755
- keepdir /usr/lib/icecc/bin
-
- if use doc; then
- cd doc
- doman icecc.1 iceccd.1 icecream.7 scheduler.1 || die "doman failed"
- fi
-}
-
-pkg_postinst() {
- enewgroup icecream || die "Problem creating icecream group"
-
- #are we doing bootstrap with has no useradd?
- if [ -x /usr/sbin/useradd ]; then
- enewuser icecream -1 -1 /var/cache/icecream icecream || die "Problem adding icecream user"
- else
- ewarn "You do not have useradd (bootstrap) from shadow so I didn't"
- ewarn "install the icecream user. Note that attempting to start the daemon"
- ewarn "will fail. Please install shadow and re-emerge icecream."
- ebeep 2
- fi
-
- if [[ "${ROOT}" = "/" ]] ; then
- einfo "Scanning for compiler front-ends..."
- /usr/sbin/icecream-config --install-links
- /usr/sbin/icecream-config --install-links "${CHOST}"
- else
- ewarn "Install is incomplete; you must run the following command:"
- ewarn " # icecream-config --install-links \"${CHOST}\""
- ewarn "after booting or chrooting to \"${ROOT}\" to complete installation."
- fi
-
- elog
- elog "If you have compiled binutils/gcc/glibc with processor-specific flags"
- elog "(as normal using Gentoo), there is a greater chance that your compiler"
- elog "won't work on other machines. The best would be to build gcc, glibc and"
- elog "binutils without those flags and then copy the needed files into your"
- elog "tarball for distribution to other machines. This tarball can be created"
- elog "by running /usr/bin/icecc --build-native, and used by setting"
- elog "ICECC_VERSION in /etc/conf.d/icecream"
- elog ' ICECC_VERSION=<filename_of_archive_containing_your_environment>'
- elog
- elog "To use icecream with portage add the following line to /etc/make.conf"
- elog ' PREROOTPATH=/usr/lib/icecc/bin'
- elog
- elog "To use icecream with normal make use (e.g. in /etc/profile)"
- elog ' PATH=/usr/lib/icecc/bin:$PATH'
- elog
- elog "N.B. To use icecream with ccache, the ccache PATH should come first:"
- elog ' PATH=/usr/lib/ccache/bin:/usr/lib/icecc/bin:$PATH'
- elog
- elog "Don't forget to open the following ports in your firewall(s):"
- elog " TCP/10245 on the daemon computers (required)"
- elog " TCP/8765 for the the scheduler computer (required)"
- elog " TCP/8766 for the telnet interface to the scheduler (optional)"
- elog " UDP/8765 for broadcast to find the scheduler (optional)"
- elog
- elog "Further usage instructions: http://www.opensuse.org/icecream"
- elog
- elog "The icecream monitor is no longer included in this package."
- elog "See http://bugs.gentoo.org/show_bug.cgi?id=139432 for more info."
-}
diff --git a/sys-devel/icecream/icecream-0.9.1.ebuild b/sys-devel/icecream/icecream-0.9.1-r1.ebuild
index eacdc7c8cad0..0e0a3f81eadf 100644
--- a/sys-devel/icecream/icecream-0.9.1.ebuild
+++ b/sys-devel/icecream/icecream-0.9.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/icecream-0.9.1.ebuild,v 1.2 2008/06/29 07:51:55 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/icecream-0.9.1-r1.ebuild,v 1.1 2008/08/02 15:12:12 bluebird Exp $
inherit autotools eutils flag-o-matic
@@ -58,6 +58,8 @@ src_install() {
dosbin "${FILESDIR}"/icecream-config || die "install failed"
+ dosbin "${FILESDIR}"/icecream-create-env || die "install failed"
+
newconfd suse/sysconfig.icecream icecream || die "install failed"
doinitd "${FILESDIR}"/icecream || die "install failed"