|
Lines 1-6
Link Here
|
| 1 |
# Copyright 1999-2004 Gentoo Foundation |
1 |
# Copyright 1999-2004 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/www/www.gentoo.org/raw_cvs/gentoo-x86/media-libs/xine-lib/xine-lib-1.0.ebuild,v 1.2 2004/12/27 13:01:37 eradicator Exp $ |
3 |
# $Header: |
| 4 |
|
4 |
|
| 5 |
inherit eutils flag-o-matic gcc libtool |
5 |
inherit eutils flag-o-matic gcc libtool |
| 6 |
|
6 |
|
|
Lines 15-36
Link Here
|
| 15 |
LICENSE="GPL-2" |
15 |
LICENSE="GPL-2" |
| 16 |
SLOT="1" |
16 |
SLOT="1" |
| 17 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
17 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
| 18 |
IUSE="arts esd avi nls dvd aalib X directfb oggvorbis alsa gnome sdl speex |
18 |
IUSE="arts esd avi nls dvd aalib X directfb oggvorbis alsa gnome sdl speex theora ipv6 altivec opengl aac pic fb xvmc nvidia i8x0 libcaca samba dxr3 vidix png mng" |
| 19 |
theora ipv6 altivec opengl aac fb xv xvmc nvidia i8x0 libcaca |
|
|
| 20 |
samba dxr3 vidix png mng" |
| 21 |
|
19 |
|
| 22 |
RDEPEND="oggvorbis? ( media-libs/libvorbis ) |
20 |
RDEPEND="oggvorbis? ( media-libs/libvorbis ) |
| 23 |
!amd64? ( X? ( virtual/x11 ) ) |
21 |
!amd64? ( X? ( virtual/x11 ) ) |
| 24 |
amd64? ( X? ( || ( x11-base/xorg-x11 >=x11-base/xfree-4.3.0-r6 ) ) ) |
22 |
amd64? ( X? ( || ( x11-base/xorg-x11 >=x11-base/xfree-4.3.0-r6 ) ) ) |
| 25 |
avi? ( x86? ( >=media-libs/win32codecs-0.50 ) ) |
23 |
avi? ( x86? ( >=media-libs/win32codecs-0.50 ) ) |
| 26 |
esd? ( media-sound/esound ) |
24 |
esd? ( media-sound/esound ) |
| 27 |
dvd? ( >=media-libs/libdvdcss-1.2.7 ) |
25 |
dvd? ( >=media-libs/libdvdcss-1.2.8 ) |
| 28 |
arts? ( kde-base/arts ) |
26 |
arts? ( kde-base/arts ) |
| 29 |
alsa? ( media-libs/alsa-lib ) |
27 |
alsa? ( media-libs/alsa-lib ) |
| 30 |
aalib? ( media-libs/aalib ) |
28 |
aalib? ( media-libs/aalib ) |
| 31 |
directfb? ( >=dev-libs/DirectFB-0.9.9 dev-util/pkgconfig ) |
29 |
directfb? ( >=dev-libs/DirectFB-0.9.9 dev-util/pkgconfig ) |
| 32 |
gnome? ( >=gnome-base/gnome-vfs-2.0 |
30 |
gnome? ( >=gnome-base/gnome-vfs-2.0 dev-util/pkgconfig ) |
| 33 |
dev-util/pkgconfig ) |
|
|
| 34 |
>=media-libs/flac-1.0.4 |
31 |
>=media-libs/flac-1.0.4 |
| 35 |
sdl? ( >=media-libs/libsdl-1.1.5 ) |
32 |
sdl? ( >=media-libs/libsdl-1.1.5 ) |
| 36 |
>=media-libs/libfame-0.9.0 |
33 |
>=media-libs/libfame-0.9.0 |
|
Lines 41-55
Link Here
|
| 41 |
png? ( media-libs/libpng ) |
38 |
png? ( media-libs/libpng ) |
| 42 |
mng? ( media-libs/libmng )" |
39 |
mng? ( media-libs/libmng )" |
| 43 |
DEPEND="${RDEPEND} |
40 |
DEPEND="${RDEPEND} |
| 44 |
>=sys-devel/automake-1.7 |
|
|
| 45 |
>=sys-devel/autoconf-2.59 |
| 46 |
nls? ( sys-devel/gettext )" |
41 |
nls? ( sys-devel/gettext )" |
| 47 |
|
42 |
|
| 48 |
S=${WORKDIR}/${MY_P} |
43 |
S=${WORKDIR}/${MY_P} |
| 49 |
|
44 |
|
| 50 |
pkg_setup() { |
45 |
pkg_setup() { |
| 51 |
# Make sure that the older libraries are not installed (bug #15081). |
46 |
# Make sure that the older libraries are not installed (bug #15081). |
| 52 |
if [ `has_version =media-libs/xine-lib-0.9.13*` ] |
47 |
if [ `has_version =media-libs/xine-lib-0.9.*` ] |
| 53 |
then |
48 |
then |
| 54 |
eerror "Please uninstall older xine libraries."; |
49 |
eerror "Please uninstall older xine libraries."; |
| 55 |
eerror "The compilation cannot proceed."; |
50 |
eerror "The compilation cannot proceed."; |
|
Lines 64-98
Link Here
|
| 64 |
# plasmaroo: Kernel 2.6 headers patch |
59 |
# plasmaroo: Kernel 2.6 headers patch |
| 65 |
epatch ${FILESDIR}/${PN}-1_rc7-2.6.patch |
60 |
epatch ${FILESDIR}/${PN}-1_rc7-2.6.patch |
| 66 |
|
61 |
|
|
|
62 |
# force 32 bit userland |
| 63 |
[ ${ARCH} = "sparc" ] && epatch ${FILESDIR}/${PN}-1_rc8-configure-sparc.patch |
| 64 |
|
| 67 |
# fixes bad X11 directories |
65 |
# fixes bad X11 directories |
| 68 |
epatch ${FILESDIR}/${PN}-x11.patch |
66 |
epatch ${FILESDIR}/${PN}-x11.patch |
| 69 |
|
67 |
|
| 70 |
# Bad version included... may drop .so |
|
|
| 71 |
#libtoolize --copy --force |
| 72 |
|
| 73 |
# bug #40317 |
68 |
# bug #40317 |
| 74 |
elibtoolize |
69 |
elibtoolize |
| 75 |
|
70 |
|
| 76 |
# Fix building on amd64, #49569 |
71 |
use pic && epatch ${FILESDIR}/${PN}-1_rc7-pic.patch |
| 77 |
#use amd64 && epatch ${FILESDIR}/configure-64bit-define.patch |
|
|
| 78 |
|
| 79 |
epatch ${FILESDIR}/${PN}-1_rc7-pic.patch |
| 80 |
|
72 |
|
| 81 |
# Fix detection of hppa2.0 and hppa1.1 CHOST |
73 |
# Fix detection of hppa2.0 and hppa1.1 CHOST |
| 82 |
use hppa && sed -e 's/hppa-/hppa*-linux-/' -i ${S}/configure |
74 |
use hppa && sed -e 's/hppa-/hppa*-linux-/' -i ${S}/configure |
| 83 |
|
|
|
| 84 |
# Fix detection of sparc64 systems |
| 85 |
use sparc && epatch ${FILESDIR}/xine-lib-1_rc7-configure-sparc.patch |
| 86 |
|
| 87 |
# Makefile.ams and configure.ac get patched, so we need to rerun |
| 88 |
# autotools |
| 89 |
export WANT_AUTOCONF=2.5 |
| 90 |
export WANT_AUTOMAKE=1.7 |
| 91 |
aclocal -I m4 |
| 92 |
libtoolize --copy --force |
| 93 |
autoheader |
| 94 |
automake -a -f -c |
| 95 |
autoconf |
| 96 |
} |
75 |
} |
| 97 |
|
76 |
|
| 98 |
src_compile() { |
77 |
src_compile() { |
|
Lines 122-139
Link Here
|
| 122 |
local myconf |
101 |
local myconf |
| 123 |
|
102 |
|
| 124 |
# the win32 codec path should ignore $(get_libdir) and always use lib |
103 |
# the win32 codec path should ignore $(get_libdir) and always use lib |
| 125 |
use avi && use x86 \ |
104 |
use avi && use x86 && myconf="${myconf} --with-w32-path=/usr/$(get_libdir)/win32" || myconf="${myconf} --disable-asf" |
| 126 |
&& myconf="${myconf} --with-w32-path=/usr/$(get_libdir)/win32" \ |
|
|
| 127 |
|| myconf="${myconf} --disable-asf" |
| 128 |
|
105 |
|
| 129 |
use sparc \ |
106 |
use sparc && myconf="${myconf} --build=${CHOST}" |
| 130 |
&& myconf="${myconf} --build=${CHOST}" |
|
|
| 131 |
|
107 |
|
| 132 |
# enable/disable appropiate optimizations on sparc |
108 |
# enable/disable appropiate optimizations on sparc |
| 133 |
[ "${PROFILE_ARCH}" == "sparc64" -o "${ABI}" == "sparc64" ] \ |
109 |
[ "${PROFILE_ARCH}" == "sparc64" ] && myconf="${myconf} --enable-vis" |
| 134 |
&& myconf="${myconf} --enable-vis" |
110 |
[ "${PROFILE_ARCH}" == "sparc" ] && myconf="${myconf} --disable-vis" |
| 135 |
[ "${PROFILE_ARCH}" == "sparc" ] \ |
|
|
| 136 |
&& myconf="${myconf} --disable-vis" |
| 137 |
|
111 |
|
| 138 |
# Fix compilation-errors on PowerPC #45393 & #55460 & #68251 |
112 |
# Fix compilation-errors on PowerPC #45393 & #55460 & #68251 |
| 139 |
if use ppc || use ppc64 ; then |
113 |
if use ppc || use ppc64 ; then |
|
Lines 159-234
Link Here
|
| 159 |
myconf="${myconf} --with-caca-prefix=/tmp/non-existant" |
133 |
myconf="${myconf} --with-caca-prefix=/tmp/non-existant" |
| 160 |
fi |
134 |
fi |
| 161 |
|
135 |
|
| 162 |
if use xvmc; then |
136 |
use nvidia && xvmclib="XvMCNVIDIA" |
| 163 |
if use nvidia && use i8x0; then |
137 |
use i8x0 && xvmclib="I810XvMC" |
| 164 |
eerror "Invalid combination of USE flags" |
|
|
| 165 |
eerror "When building support for xvmc, you may only" |
| 166 |
eerror "include support for one video card:" |
| 167 |
eerror " nvidia, i8x0" |
| 168 |
eerror "" |
| 169 |
eerror "Emerge again with different USE flags" |
| 170 |
|
| 171 |
exit 1 |
| 172 |
elif use nvidia; then |
| 173 |
xvmclib="XvMCNVIDIA" |
| 174 |
elif use i8x0; then |
| 175 |
xvmclib="I810XvMC" |
| 176 |
else |
| 177 |
ewarn "You tried to build with xvmc support." |
| 178 |
ewarn "No supported graphics hardware was specified." |
| 179 |
ewarn "" |
| 180 |
ewarn "No xvmc support will be included." |
| 181 |
ewarn "Please one appropriate USE flag and re-emerge:" |
| 182 |
ewarn " nvidia or i8x0" |
| 183 |
fi |
| 184 |
|
| 185 |
if [ -n "${xvmclib}" ]; then |
| 186 |
if [ -f "${ROOT}/usr/$(get_libdir)/libXvMC.so" -o -f "${ROOT}/usr/$(get_libdir)/libXvMC.a" ]; then |
| 187 |
myconf="${myconf} --with-xvmc-path=${ROOT}/usr/$(get_libdir) --with-xxmc-path=${ROOT}/usr/$(get_libdir) --with-xvmc-lib=${xvmclib} --with-xxmc-lib=${xvmclib}" |
| 188 |
elif [ -f "${ROOT}/usr/X11R6/$(get_libdir)/libXvMC.so" -o -f "${ROOT}/usr/X11R6/$(get_libdir)/libXvMC.a" ]; then |
| 189 |
myconf="${myconf} --with-xvmc-path=${ROOT}/usr/X11R6/$(get_libdir) --with-xxmc-path=${ROOT}/usr/X11R6/$(get_libdir) --with-xvmc-lib=${xvmclib} --with-xxmc-lib=${xvmclib}" |
| 190 |
else |
| 191 |
ewarn "Couldn't find libXvMC. Disabling xvmc support." |
| 192 |
fi |
| 193 |
fi |
| 194 |
fi |
| 195 |
|
| 196 |
if use xv; then |
| 197 |
if [ -f "${ROOT}/usr/$(get_libdir)/libXv.so" ]; then |
| 198 |
myconf="${myconf} --enable-shared-xv --with-xv-path=${ROOT}/usr/$(get_libdir)" |
| 199 |
elif [ -f "${ROOT}/usr/$(get_libdir)/libXv.a" ]; then |
| 200 |
myconf="${myconf} --enable-static-xv --with-xv-path=${ROOT}/usr/$(get_libdir)" |
| 201 |
elif [ -f "${ROOT}/usr/X11R6/$(get_libdir)/libXv.so" ]; then |
| 202 |
myconf="${myconf} --enable-shared-xv --with-xv-path=${ROOT}/usr/X11R6/$(get_libdir)" |
| 203 |
elif [ -f "${ROOT}/usr/X11R6/$(get_libdir)/libXv.a" ]; then |
| 204 |
myconf="${myconf} --enable-static-xv --with-xv-path=${ROOT}/usr/X11R6/$(get_libdir)" |
| 205 |
else |
| 206 |
myconf="${myconf} --enable-shared-xv" |
| 207 |
fi |
| 208 |
fi |
| 209 |
|
138 |
|
|
|
139 |
use xvmc && myconf="${myconf} \ |
| 140 |
--with-xvmc-path=/usr/X11R6/$(get_libdir) \ |
| 141 |
--with-xxmc-path=/usr/X11R6/$(get_libdir) \ |
| 142 |
--with-xvmc-lib=$xvmclib \ |
| 143 |
--with-xxmc-lib=$xvmclib" |
| 144 |
|
| 145 |
( use xvmc && use nvidia && use i8x0 ) && { |
| 146 |
eerror "Invalid combination of USE flags" |
| 147 |
eerror "When building support for xvmc, you may only" |
| 148 |
eerror "include support for one video card:" |
| 149 |
eerror " nvidia, i8x0" |
| 150 |
eerror "" |
| 151 |
eerror "Emerge again with different USE flags" |
| 152 |
|
| 153 |
exit 1 |
| 154 |
} |
| 155 |
|
| 156 |
( use xvmc && ! use nvidia && ! use i8x0 ) && { |
| 157 |
ewarn "You tried to build with xvmc support." |
| 158 |
ewarn "No supported graphics hardware was specified." |
| 159 |
ewarn "" |
| 160 |
ewarn "No xvmc support will be included." |
| 161 |
ewarn "Please one appropriate USE flag and re-emerge:" |
| 162 |
ewarn " nvidia or i8x0" |
| 163 |
} |
| 210 |
|
164 |
|
| 211 |
econf \ |
165 |
econf \ |
| 212 |
$(use_enable nls) \ |
166 |
$(use_enable nls) \ |
| 213 |
$(use_enable X x11) $(use_with X x) \ |
167 |
$(use_enable X x11) \ |
|
|
168 |
$(use_with X x) \ |
| 214 |
$(use_enable vidix) \ |
169 |
$(use_enable vidix) \ |
| 215 |
$(use_enable dxr3) \ |
170 |
$(use_enable dxr3) \ |
| 216 |
$(use_with esd) --disable-esdtest \ |
171 |
$(use_with esd) --disable-esdtest \ |
| 217 |
$(use_enable alsa) --disable-alsatest \ |
172 |
$(use_enable alsa) --disable-alsatest \ |
| 218 |
$(use_with arts) --disable-artstest \ |
173 |
$(use_with arts) --disable-artstest \ |
| 219 |
$(use_with aalib) \ |
174 |
$(use_with aalib) \ |
| 220 |
$(use_with oggvorbis ogg) $(use_with oggvorbis vorbis) \ |
175 |
$(use_with oggvorbis ogg) \ |
|
|
176 |
$(use_with oggvorbis vorbis) \ |
| 221 |
$(use_enable ipv6) \ |
177 |
$(use_enable ipv6) \ |
| 222 |
$(use_enable directfb) $(use_enable fb) \ |
178 |
$(use_enable directfb) \ |
|
|
179 |
$(use_enable fb) \ |
| 180 |
$(use_enable macos macosx-video) \ |
| 181 |
$(use_enable macos coreaudio) \ |
| 223 |
$(use_enable opengl) \ |
182 |
$(use_enable opengl) \ |
| 224 |
$(use_enable aac faad) \ |
183 |
$(use_enable aac faad) \ |
| 225 |
${myconf} \ |
184 |
${myconf} \ |
|
|
185 |
--libdir=/usr/$(get_libdir) \ |
| 186 |
--with-xv-path=/usr/X11R6/$(get_libdir) \ |
| 187 |
--x-includes=/usr/X11R6/include \ |
| 188 |
--x-libraries=/usr/X11R6/$(get_libdir) \ |
| 226 |
--disable-sdltest || die "Configure failed" |
189 |
--disable-sdltest || die "Configure failed" |
| 227 |
|
190 |
|
| 228 |
#$(use_with ffmpeg external-ffmpeg) \ |
|
|
| 229 |
#$(use_with dvdnav external-dvdnav) \ |
| 230 |
#$(use_enable macos macosx-video) $(use_enable macos coreaudio) \ |
| 231 |
|
| 232 |
emake -j1 || die "Parallel make failed" |
191 |
emake -j1 || die "Parallel make failed" |
| 233 |
} |
192 |
} |
| 234 |
|
193 |
|