summaryrefslogtreecommitdiff
blob: 0d881aad3c50f3d6a098cad8a22d78074c4e0b00 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/amarokfs/amarokfs-0.5.ebuild,v 1.2 2007/04/08 00:44:18 josejx Exp $

inherit qt3 kde-functions toolchain-funcs

need-kde 3

MY_PN="${PN/fs/FS}"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="A full screen frontend for Amarok."
HOMEPAGE="http://www.kde-apps.org/content/show.php?content=52641"
SRC_URI="http://www.kde-apps.org/CONTENT/content-files/52641-${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"

KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"

IUSE=""

RDEPEND="media-sound/amarok"
DEPEND=""

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}

	sed -i -e 's:/usr/local/:/usr/:' "${S}"/*.{pro,cpp} || die "sed for /usr/local failed."
	sed -i -e "s:Icon=.*:Icon=${MY_PN}:" "${S}/${MY_PN}.desktop" || die "fix desktop file failed."
	sed -i -e 's:/usr/share/icons/:\0hicolor/128x128/apps/:' "${S}/${MY_PN}-xml.pro" || die "fix icon installation failed"
	sed -i -e '/qDebug/s:" + \(func\|query\):%s", \1.data():' "${S}"/*.cpp || die "fix for qDebug() calls failed."
}

src_compile() {
	${QTDIR}/bin/qmake QMAKE="${QTDIR}/bin/qmake" || die "qmake failed"
	sed -i -e '/strip/d' Makefile || die "fix stripping failed."
	emake \
		CC="$(tc-getCC) ${CFLAGS}" \
		CXX="$(tc-getCXX) ${CXXFLAGS}" \
		LINK="$(tc-getCXX) ${LDFLAGS}" \
		|| die "emake failed"
}

src_install() {
	emake -j1 INSTALL_ROOT="${D}" install || die "emake install failed"
}