# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-devel/icecream/icecream-0.6.20040829.ebuild,v 1.2 2006/01/08 00:00:00 tantive Exp $ inherit eutils DESCRIPTION="Icecream is a program for distributed compiling of C(++) code across several machines based on ideas and code by distcc." HOMEPAGE="http://www.opensuse.org/icecream" SRC_URI="ftp://ftp.suse.com/pub/projects/icecream/${PN}-0.6-20050413.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ~amd64" RDEPEND="virtual/libc kde? ( kde-base/kdelibs )" DEPEND="${RDEPEND}" IUSE="arts kde" src_compile() { cd ${WORKDIR}/icecream epatch ${FILESDIR}/icecream-0.6-20050413-add-disable-option.patch || die "error patching icecream" if ! use kde ; then epatch ${FILESDIR}/${PN}-${PV}-no-kde.patch || die "error patching icecream" aclocal automake autoconf fi use amd64 && export CFLAGS="${CFLAGS} -fPIC -DPIC" use amd64 && export CXXFLAGS="${CXXFLAGS} -fPIC -DPIC" use !arts && local myconfig="--without-arts" ./configure --prefix=/opt/icecream --sbindir=/usr/sbin $myconfig emake || die "error compiling" } src_install() { cd ${WORKDIR}/icecream make DESTDIR=${D} install || die "error installing" insinto "/etc/env.d" doins "${FILESDIR}/99kicecream" cp suse/sysconfig.icecream icecream insinto "/etc/conf.d" doins "icecream" # We are using kicecream to get it included after the kde-env # which ignores a previous KDEDIRS newinitd ${FILESDIR}/icecream icecream } pkg_postinst() { enewgroup icecream || die "Problem creating icecream group" enewuser icecream -1 -1 /var/cache/icecream icecream || die "Problem adding icecream user" einfo "If you have compiled binutils/gcc/glibc with processor-specific flags" einfo "(as normal using Gentoo), there is a great chance that the chroot created" einfo "by icecc doesn't work with other machines. In that case it would be best" einfo "to install the appropriate icecream-chroot package." einfo "See http://www.opensuse.org/icecream for further details." einfo "To use icecream with gentoo/ebuild add the following line to your /etc/make.conf" einfo " PREROOTPATH=/opt/icecream/bin" einfo "To use it with normal make use (e.g. in /etc/profile)" einfo ' PATH=/opt/icecream/bin:$PATH' einfo "Right now it doesn't work with ccache without some special work." einfo "See http://en.opensuse.org/Icecream#How_to_combine_icecream_with_ccache" }