summaryrefslogtreecommitdiffstats
path: root/media-sound/xmms/xmms-1.2.11-r3.ebuild
blob: f0d38eb0f42a6ac17d0a64d8e1539de5ffac39bf (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit flag-o-matic eutils libtool gnuconfig

PATCH_VER="2.3.0.1"
M4_VER="1.1"

PATCHDIR="${WORKDIR}/patches"

DESCRIPTION="X MultiMedia System"
HOMEPAGE="http://www.xmms.org/"
SRC_URI="http://www.xmms.org/files/1.2.x/${P}.tar.bz2
	mirror://gentoo/gentoo_ice-xmms-0.2.tar.bz2
	http://dside.dyndns.org/files/rusxmms/${PN}-1.2.10-gentoo-m4-${M4_VER}.tar.bz2
	http://dside.dyndns.org/files/rusxmms/${P}-gentoo-patches-${PATCH_VER}.tar.bz2
	http://dside.dyndns.org/files/rusxmms/gnomexmms.xpm
	http://dside.dyndns.org/files/rusxmms/RusXMMS2-csa43.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
IUSE="nls mmx vorbis 3dnow mikmod directfb alsa oss arts jack sndfile lirc flac mp3 rcc"

DEPEND="=x11-libs/gtk+-1.2*
	rcc? ( app-i18n/librcc )"

RDEPEND="${DEPEND}
	directfb? ( dev-libs/DirectFB )
	app-arch/unzip"

#We want these things in DEPEND only
DEPEND="${DEPEND}
	>=sys-devel/automake-1.7
	>=sys-devel/autoconf-2.5
	sys-devel/libtool
	nls? ( dev-util/intltool
	       dev-lang/perl
	       sys-devel/gettext )"

# USE flags pull in xmms plugins
PDEPEND="lirc? ( media-plugins/xmms-lirc )

	 flac? ( media-libs/flac )
	 mikmod? ( media-plugins/xmms-mikmod )
	 mp3? ( >=media-plugins/xmms-mpg123-1.2.11 )
	 vorbis? ( >=media-plugins/xmms-vorbis-1.2.11 )
	 sndfile? ( media-plugins/xmms-sndfile )

	 alsa? ( media-plugins/xmms-alsa )
	 arts? ( media-plugins/xmms-arts )
	 jack? ( media-plugins/xmms-jack )
	 oss? ( media-plugins/xmms-oss )"

src_unpack() {
	if ! has_version '>=sys-devel/gettext-0.14.1'; then
		eerror "Sorry, you seem to have USE=-nls with an old version of gettext"
		eerror "on your system.  Unfortunately, that will cause xmms to fail emerging."
		eerror "Please either remove gettext or upgrade to version 0.14.1."
	fi

	unpack ${A}
	cd ${S}

#SDS
	use rcc && ../RusXMMS2/apply.sh
#EDS
	
	EPATCH_SUFFIX="patch"
	epatch ${PATCHDIR}


#	export WANT_AUTOMAKE=1.7
#	export WANT_AUTOCONF=2.5

	sed -i 's:Output Input Effect General Visualization::' Makefile.am

	for dir in . libxmms; do
		cd ${S}/${dir}
		rm acinclude.m4
		libtoolize --force --copy || die "libtoolize --force --copy failed"
		[ ! -f ltmain.sh ] && ln -s ../ltmain.sh
		aclocal -I ${WORKDIR}/m4 || die "aclocal failed"
		autoheader || die "autoheader failed"
		automake --gnu --add-missing --include-deps --force-missing --copy || die "automake failed"
		autoconf || die "autoconf failed"
	done

	if use nls; then
		cd ${S}/po
		cp ${FILESDIR}/po-update.pl update.pl
		perl update.pl --pot
	fi

	cd ${S}
	gnuconfig_update
}

src_compile() {
	export EGREP="grep -E"
	filter-flags -fforce-addr -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE

	local myconf=""

	if use !amd64 && { use 3dnow || use mmx; }; then
		myconf="${myconf} --enable-simd"
	else
		myconf="${myconf} --disable-simd"
	fi

	# Please see Bug 58092 for details
	use ppc64 && replace-flags "-O[2-9]" "-O1"

	econf `use_enable nls` ${myconf} || die

	# For some reason, gmake doesn't export this for libtool's consumption
	emake -j1 || die
}

src_install() {
	export EGREP="grep -E"
	make DESTDIR="${D}" install || die

	dodoc AUTHORS ChangeLog FAQ NEWS README TODO
	newdoc ${PATCHDIR}/README README.patches
	newdoc ${PATCHDIR}/ChangeLog ChangeLog.patches

	keepdir /usr/share/xmms/Skins
	insinto /usr/share/pixmaps/
	newins ${DISTDIR}/gnomexmms.xpm xmms.xpm
	doins xmms/xmms_logo.xpm
	insinto /usr/share/pixmaps/mini
	doins xmms/xmms_mini.xpm

	insinto /etc/X11/wmconfig
	donewins xmms/xmms.wmconfig xmms

	insinto /usr/share/applications
	doins ${FILESDIR}/xmms.desktop

	# Add the sexy Gentoo Ice skin
	insinto /usr/share/xmms/Skins/gentoo_ice
	doins ${WORKDIR}/gentoo_ice/*
	docinto gentoo_ice
	dodoc ${WORKDIR}/README

	insinto /usr/include/xmms/libxmms
	doins ${S}/libxmms/*.h

	insinto /usr/include/xmms
	doins ${S}/xmms/i18n.h
}

pkg_postinst() {
	einfo "media-sound/xmms now just provides the xmms binary and libxmms."
	einfo "All plugins that were packaged with xmms are now provided by other"
	einfo "packages in media-plugins.  Some of these are automatically pulled in"
	einfo "based on USE flags.  Others you will need to emerge manually.  The"
	einfo "following is a list of packages which were previously provided by"
	einfo "media-sound/xmms that are not automatically emerged:"
	einfo "media-plugins/xmms-blur-scope"
	einfo "media-plugins/xmms-cdaudio"
	einfo "media-plugins/xmms-disk-writer"
	einfo "media-plugins/xmms-echo"
	einfo "media-plugins/xmms-ir"
	einfo "media-plugins/xmms-joystick"
	einfo "media-plugins/xmms-opengl-spectrum"
	einfo "media-plugins/xmms-sanalyzer"
	einfo "media-plugins/xmms-song-change"
	einfo "media-plugins/xmms-stereo"
	einfo "media-plugins/xmms-tonegen"
	einfo "media-plugins/xmms-voice"
	einfo "media-plugins/xmms-wav"
}