blob: f88b9ef4f51ddf70e5e51e1436fd8fbbbafa0ff0 (
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
77
78
79
80
81
82
83
84
85
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-3.5.4-r1.ebuild,v 1.7 2006/09/09 22:00:03 carlo Exp $
inherit subversion toolchain-funcs
DESCRIPTION="KDE libraries needed by all KDE programs."
HOMEPAGE="http://www.kde.org/"
#SRC_URI="mirror://kde/unstable/${PV}/src/${P}.tar.bz2"
ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs"
LICENSE="GPL-2 LGPL-2"
SLOT="4.0"
KEYWORDS="-*"
IUSE=""
# kde.eclass has kdelibs in DEPEND, and we can't have that in here.
# so we recreate the entire DEPEND from scratch.
RDEPEND="app-arch/bzip2
>=dev-libs/libxslt-1.1.15
>=dev-libs/libxml2-2.6.6
x11-libs/libX11
=x11-libs/qt-4*
cups? ( >=net-print/cups-1.1.19 )"
DEPEND="${RDEPEND}
>=dev-util/cmake-2.4.3
sys-devel/gettext
dev-util/pkgconfig"
pkg_setup() {
PREFIX="/usr/kde/4.0/"
}
cm_use_enable() {
if use $1 ; then
echo "-D$2=ON"
else
echo "-D$2=OFF"
fi
return 0
}
src_compile() {
mkdir build
cd build
cmake \
-D CMAKE_CXX_COMPILER:FILEPATH="$(tc-getCXX)" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-D CMAKE_C_COMPILER:FILEPATH="$(tc-getCC)" \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DQTDIR="/usr" \
$(cm_use_enable cups Cups) \
.. || die "cmake failed"
# removing files violates sandbox on Gentoo
sed -i -e "s:.*INCLUDE.*remove_files.*::" cmake/modules/cmake_install.cmake
# creating life symlinks fails in the syndbox
sed -i -e "s:.*create_symlink.*filesharelist.*::" \
kio/misc/make_fileshare_symlink.cmake
emake || die "emake failed"
}
src_install() {
cd build
emake DESTDIR="${D}" install || die "emake install failed"
dosym fileshareset ${PREFIX}/bin/filesharelist
# List all the multilib libdirs
local libdirs
for libdir in $(get_all_libdirs); do
libdirs="${libdirs}:${PREFIX}/${libdir}"
done
dodir /etc/env.d
# number goes down with version upgrade
# this is lower because it is experimental
cat <<EOF > ${D}/etc/env.d/45kdepaths-${SLOT}
PATH=${PREFIX}/bin
ROOTPATH=${PREFIX}/sbin:${PREFIX}/bin
LDPATH=${libdirs:1}
CONFIG_PROTECT="${PREFIX}/share/config ${PREFIX}/env ${PREFIX}/shutdown"
EOF
}
|