summaryrefslogtreecommitdiff
blob: b25a76e02071bd530e23f767a92da73439c7dd80 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/yiff/yiff-2.14.5.ebuild,v 1.7 2007/03/18 13:03:04 nixnut Exp $

inherit flag-o-matic eutils kde-functions

DESCRIPTION="high performance and stable sound server for UNIX games and apps"
HOMEPAGE="http://wolfpack.twu.net/YIFF/"
SRC_URI="ftp://wolfpack.twu.net/users/wolfpack/${P}.tar.bz2"
RESTRICT="strip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc sparc x86"
IUSE="alsa gtk kde"

DEPEND="gtk? ( =x11-libs/gtk+-1.2* )
	alsa? ( media-libs/alsa-lib )
	kde? ( || ( kde-base/kmid kde-base/kdemultimedia ) )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-build.patch
	if use kde; then
		set-kdedir
		sed -i "/^LIB =/s:$: -L${KDEDIR}/lib -lkmid:" yiff/Makefile.Linux
	fi
	sed -i \
		-e "/^YLIB_DIR/s:/lib:/$(get_libdir):" \
		-e '/LDCONFIG/s:=.*:=true:' \
		-e '/MAN_DIR/s:/man/:/share/man/:' \
		*/Makefile* || die
}

src_compile() {
	local pkgs="libY2 yiff yiffutils"
	use gtk && pkgs="${pkgs} yiffconfig"
	use kde && append-flags -DHAVE_LIBKMID -I${KDEDIR}/include
	use alsa && append-flags -DALSA_RUN_CONFORM
	append-flags -DOSS -DOSS_BUFFRAG -DYSHM_SUPPORT -D__USE_BSD
	emake linux \
		CFLAGS="${CFLAGS}" \
		LINUX_DIRS="${pkgs}" \
		|| die
}

src_install() {
	make install PREFIX="${D}"/usr || die
	dodoc AUTHORS README
}