summaryrefslogtreecommitdiff
blob: ff204f89647c1cba549504dd749e6aa7e4a831e5 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/liblastfm/liblastfm-0.3.3.ebuild,v 1.6 2013/03/02 21:44:51 hwoarang Exp $

EAPI="2"

inherit eutils multilib

DESCRIPTION="Collection of libraries to integrate Last.fm services"
HOMEPAGE="http://github.com/mxcl/liblastfm/"
SRC_URI="http://github.com/mxcl/${PN}/tarball/${PV} -> ${P}.tar.gz"

LICENSE="GPL-3"
KEYWORDS="amd64 ppc ~ppc64 x86"
SLOT="0"
IUSE=""

S="${WORKDIR}/mxcl-liblastfm-1c739eb"

COMMON_DEPEND="
	>=media-libs/libsamplerate-0.1.4
	sci-libs/fftw:3.0
	>=dev-qt/qtcore-4.5:4
	>=dev-qt/qtsql-4.5:4
"
DEPEND="${COMMON_DEPEND}
	dev-lang/ruby
	>=dev-qt/qttest-4.5:4
"
RDEPEND="${COMMON_DEPEND}
	!<media-libs/lastfmlib-0.4.0
"

src_prepare() {
	# Fix multilib paths
	find . -name *.pro -exec sed -i -e "/target.path/s/lib/$(get_libdir)/g" {} + \
		|| die "failed to fix multilib paths"

	# >=1.9 ruby compatibility
	case `ruby -e 'puts RUBY_VERSION'` in
		1.8.*) ;;
		*) sed -e "s/require 'ftools'//g" -i admin/* || die ;;
	esac

	epatch "${FILESDIR}/${P}-ruby-1.9-fix.patch" || die "Failed to apply patch to fix compilation with ruby-1.9"
}

src_configure() {
	./configure --prefix "${ROOT}usr" --no-strip --release || die "configure failed"
}

src_install() {
	emake DESTDIR="${D}${ROOT}" install || die "emake install failed"

	dodoc README || die "dodoc failed"
}