blob: 8b058f679ca1c1a37abe3b8bd441ba6770e59291 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# 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.3 2006/01/28 13:45:24 blubb 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://wiki.kde.org/icecream"
SRC_URI="ftp://ftp.suse.com/pub/projects/icecream/${PN}-0.6-20040829.tar.bz2
mirror://gentoo/${PN}-${PV}.nokde.patch.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
RDEPEND="virtual/libc
kde? ( kde-base/kdelibs )"
DEPEND="${RDEPEND}"
IUSE="kde"
src_compile() {
cd ${WORKDIR}/icecream
epatch ${FILESDIR}/icecream_disable.patch || die "error patching icecream"
if ! use kde ; then
epatch $DISTDIR/${PN}-${PV}.nokde.patch.bz2 || die "error patching icecream"
fi
mv client/create-env client/create-env.orig
sed -e 's/^LD_ASSUME_KERNEL/#LD_ASSUME_KERNEL/' -e 's/^export LD_ASSUME/#export LD_ASSUME/' client/create-env.orig >client/create-env || die "error patching create-env"
mv configure.in configure.in.orig
sed -e 's/^CFLAGS=/#CFLAGS=/' -e 's/^CXXFLAGS=/#CXXFLAGS=/' configure.in.orig >configure.in || die "error patching configure.in"
use amd64 && export CFLAGS="${CFLAGS} -fPIC -DPIC"
use amd64 && export CXXFLAGS="${CXXFLAGS} -fPIC -DPIC"
./configure --prefix=/opt/icecream
if use kde ; then
emake || die "error compiling"
else
# I was too lazy to check how to replace KDE_CREATE_SUBDIRSLIST in configure.in
cd minilzo; emake || die "error compiling"
cd ../services; emake || die "error compiling"
cd ../client; emake || die "error compiling"
cd ../daemon; emake || die "error compiling"
fi
}
src_install() {
cd ${WORKDIR}/icecream
if use kde ; then
make DESTDIR=${D} install || die "error installing"
else
cd minilzo; make DESTDIR=${D} install || die "error installing"
cd ../services; make DESTDIR=${D} install || die "error installing"
cd ../client; make DESTDIR=${D} install || die "error installing"
cd ../daemon; make DESTDIR=${D} install || die "error installing"
fi
mkdir -p ${D}etc/env.d
# We are using kicecream to get it included after the kde-env
# which ignores a previous KDEDIRS
cp ${FILESDIR}/99icecream ${D}etc/env.d/99kicecream
mkdir -p ${D}etc/init.d
cp ${FILESDIR}/icecreamdaemon ${D}etc/init.d
cp ${FILESDIR}/icecreamscheduler ${D}etc/init.d
}
pkg_postinst() {
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 "To use icecream with gentoo/ebuild use"
einfo " PREROOTPATH=/opt/icecream/bin"
einfo " (e.g. add this line in your /etc/make.conf)."
einfo "To use it with normal make use"
einfo ' PATH=/opt/icecream/bin:$PATH'
einfo "Right now it doesn't work with ccache without some special work."
}
|