From d41fcd6ff7d181bf589b84c9973e9819984fec0f Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Mon, 30 Oct 2006 18:32:55 +0000 Subject: [PATCH] auto-import xine-lib-1.1.2-17 on branch devel from xine-lib-1.1.2-17.src.rpm --- .cvsignore | 1 + sources | 1 + xine-lib-1.1.1-configure-no-mcpu-march.patch | 13 + xine-lib-1.1.1-deepbind-939.patch | 20 ++ xine-lib-1.1.1-multilib-devel.patch | 40 +++ xine-lib-cleanup-sources.sh | 65 +++++ xine-lib.spec | 262 +++++++++++++++++++ 7 files changed, 402 insertions(+) create mode 100644 xine-lib-1.1.1-configure-no-mcpu-march.patch create mode 100644 xine-lib-1.1.1-deepbind-939.patch create mode 100644 xine-lib-1.1.1-multilib-devel.patch create mode 100755 xine-lib-cleanup-sources.sh create mode 100644 xine-lib.spec diff --git a/.cvsignore b/.cvsignore index e69de29..7d987ff 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +xine-lib-1.1.2.tar.bz2 diff --git a/sources b/sources index e69de29..b512d76 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d1afb34d2335f8c9ded4d9a2b741251e xine-lib-1.1.2.tar.bz2 diff --git a/xine-lib-1.1.1-configure-no-mcpu-march.patch b/xine-lib-1.1.1-configure-no-mcpu-march.patch new file mode 100644 index 0000000..4b6ba9e --- /dev/null +++ b/xine-lib-1.1.1-configure-no-mcpu-march.patch @@ -0,0 +1,13 @@ +--- m4/optimizations.m4.orig 2005-11-27 01:20:08.000000000 +0100 ++++ m4/optimizations.m4 2005-11-27 01:22:56.000000000 +0100 +@@ -161,10 +161,6 @@ + ;; + + esac +- if test x"$archopt_val" != x; then +- CFLAGS="$sarchopt=$archopt_val $CFLAGS" +- DEBUG_CFLAGS="$sarchopt=$archopt_val $DEBUG_CFLAGS" +- fi + fi + else + dnl we have the Intel compiler diff --git a/xine-lib-1.1.1-deepbind-939.patch b/xine-lib-1.1.1-deepbind-939.patch new file mode 100644 index 0000000..b04400b --- /dev/null +++ b/xine-lib-1.1.1-deepbind-939.patch @@ -0,0 +1,20 @@ +--- xine-lib-1.1.1/src/xine-engine/load_plugins.c.~1~ 2005-09-19 09:14:02.000000000 -0700 ++++ xine-lib-1.1.1/src/xine-engine/load_plugins.c 2006-04-22 23:07:33.000000000 -0700 +@@ -591,7 +591,7 @@ static void collect_plugins(xine_t *this + printf("load_plugins: %s not cached\n", str); + #endif + +- if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL)) == NULL) { ++ if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)) == NULL) { + const char *error = dlerror(); + /* too noisy -- but good to catch unresolved references */ + xprintf(this, XINE_VERBOSITY_LOG, +@@ -649,7 +649,7 @@ static int _load_plugin_class(xine_t *th + /* load the dynamic library if needed */ + if (!node->file->lib_handle) { + lprintf("dlopen %s\n", filename); +- if ((lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL)) == NULL) { ++ if ((lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)) == NULL) { + const char *error = dlerror(); + + xine_log (this, XINE_LOG_PLUGIN, diff --git a/xine-lib-1.1.1-multilib-devel.patch b/xine-lib-1.1.1-multilib-devel.patch new file mode 100644 index 0000000..ff0c549 --- /dev/null +++ b/xine-lib-1.1.1-multilib-devel.patch @@ -0,0 +1,40 @@ +--- misc/xine-config.in~ 2005-09-05 20:02:57.000000000 +0300 ++++ misc/xine-config.in 2006-06-13 01:43:55.000000000 +0300 +@@ -2,8 +2,8 @@ + # + # + +-prefix=@XINE_CONFIG_PREFIX@ +-exec_prefix=@exec_prefix@ ++prefix=$(pkg-config libxine --variable=prefix) ++exec_prefix=$(pkg-config libxine --variable=exec_prefix) + exec_prefix_set=no + + usage() +@@ -54,7 +54,7 @@ + echo_exec_prefix=yes + ;; + --version) +- echo @XINE_MAJOR@.@XINE_MINOR@.@XINE_SUB@ ++ pkg-config libxine --modversion + ;; + --acflags) + echo_acflags=yes +@@ -100,14 +100,14 @@ + fi + + if test "$echo_cflags" = "yes"; then +- echo -I@includedir@ @THREAD_CPPFLAGS@ ++ pkg-config libxine --cflags + fi + + if test "$echo_libs" = "yes"; then +- echo -L@libdir@ -lxine @ZLIB_LIBS@ @NET_LIBS@ @THREAD_LIBS@ @LIBICONV@ @RT_LIBS@ ++ pkg-config libxine --libs + fi + if test "$echo_plugindir" = "yes"; then +- echo "@XINE_PLUGINPATH@" ++ echo "$(pkg-config libxine --variable=libdir)/xine/plugins/$(pkg-config libxine --modversion)" + fi + if test "$echo_datadir" = "yes"; then + echo "@XINE_DATADIR@" diff --git a/xine-lib-cleanup-sources.sh b/xine-lib-cleanup-sources.sh new file mode 100755 index 0000000..dfa3ef4 --- /dev/null +++ b/xine-lib-cleanup-sources.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +if [ -z "$1" -o $# -ne 1 ]; then + echo "Usage: $0 " + exit 2 +fi + +version=$1 +tarball="xine-lib-$version.tar.bz2" +dir="xine-lib-$version" + + +if [ ! -f $tarball ]; then + echo "Can't find $tarball !" + exit 1 +fi + +echo "Uncompressing $tarball..." +rm -rf $dir +tar -xjf $tarball +cd $dir + +# Main libraries +for remove in libfaad libffmpeg libmad libmpeg2 dxr3 libspudec libxineadec libspucmml libspucc liba52 libdts; do + echo "removing src/$remove..." + rm -rf src/$remove + sed -i -e "/$remove/d" src/Makefile.am + sed -i -e "/^src\/$remove/d" configure.ac +done +# Input plugin libraries +for remove in libdvdnav vcd; do + echo "removing src/input/$remove..." + rm -rf src/input/$remove + sed -i -e "s/SUBDIRS = \(.*\)${remove}\(.*\)/SUBDIRS = \1\2/g" src/input/Makefile.am + sed -i -e "/^src\/input\/$remove/d" configure.ac +done +# Input plugins +for p in dvd vcd mms; do + echo "removing $p input plugin..." + # Remove sources + for sourcefile in `awk '/^xineplug_inp_'$p'_la_SOURCES/ { $1=""; $2=""; print $0}' src/input/Makefile.am`; do + if [ "`grep -c $sourcefile src/input/Makefile.am`" -le 1 ]; then # if this file is only used for this plugin + rm -f src/input/$sourcefile + fi + done + # Remove from Makefile + sed -i -e "/xineplug_inp_$p/d" src/input/Makefile.am +done +# Demuxers +for p in mpeg mpeg_block mpeg_ts mpeg_elem mpeg_pes yuv4mpeg2; do + echo "removing $p demuxer..." + [ -f src/demuxers/demux_$p.c ] && rm -f src/demuxers/demux_$p.c + sed -i -e "/xineplug_dmx_$p/d" src/demuxers/Makefile.am +done +echo "removing planar and deinterlace postprocessors..." +sed -i -e 's/planar//g;s/deinterlace//g' src/post/Makefile.am # fails to build + +# All clean ! + +cd .. +echo "Generating $tarball..." +rm -f $tarball.orig +mv $tarball $tarball.orig +tar -cjf $tarball $dir +rm -rf $dir diff --git a/xine-lib.spec b/xine-lib.spec new file mode 100644 index 0000000..faf767c --- /dev/null +++ b/xine-lib.spec @@ -0,0 +1,262 @@ +# TODO, sometime, maybe: +# - libstk: http://www.libstk.net/ +# - polypaudio + +%define codecdir %{_libdir}/codecs +#%define vdrver 0.7.9 + +Summary: Xine library +Name: xine-lib +Version: 1.1.2 +Release: 17%{?dist} +License: GPL +Group: System Environment/Libraries +URL: http://xinehq.de/ +# The tarball is generated from the upstream tarball using +# the script in SOURCE1. It prunes potentially patented code +Source0: http://dl.sourceforge.net/xine/xine-lib-1.1.2.tar.bz2 +Source1: xine-lib-cleanup-sources.sh +Patch1: xine-lib-1.1.1-configure-no-mcpu-march.patch +Patch6: xine-lib-1.1.1-deepbind-939.patch +Patch7: xine-lib-1.1.1-multilib-devel.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +# X11 +BuildRequires: libX11-devel libXv-devel libXinerama-devel libXvMC-devel libGLU-devel +# Video +BuildRequires: freetype-devel SDL-devel libtheora-devel libmng-devel +BuildRequires: aalib-devel >= 1.4 libcaca-devel +# Audio +BuildRequires: libogg-devel libvorbis-devel flac-devel libmodplug-devel +BuildRequires: esound-devel speex-devel arts-devel alsa-lib-devel >= 0.9.0 +# CDs +BuildRequires: libcdio-devel +# Other +BuildRequires: pkgconfig gnome-vfs2-devel gtk2-devel +BuildRequires: libtool >= 1.4.0 /usr/bin/automake-1.9 samba-common + +%if 0%{?_with_directfb:1} +BuildRequires: directfb-devel +%endif +%if 0%{!?_without_imagemagick:1} +BuildRequires: ImageMagick-devel >= 6.2.4.6-1 +%endif +#Provides: %{name}(vdr) = %{vdrver} + +%package devel +Summary: Xine library development files +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig zlib-devel +#Requires: %{name}(vdr) = %{vdrver} +#Provides: %{name}-devel(vdr) = %{vdrver} + + +%description +This package contains the Xine library. Xine is a free multimedia player. +It can play back various media. It also decodes multimedia files from local +disk drives, and displays multimedia streamed over the Internet. It +interprets many of the most common multimedia formats available - and some +of the most uncommon formats, too. Non-default rpmbuild options: +--without imagemagick: Disable ImageMagick support +--with directfb: Enable DirectFB support + +%description devel +This package contains development files for xine-lib. + + +%prep +%setup -q +%patch1 -p0 -b .nomcpu +###cp -p debian/changelog ChangeLog.vdr +# Patch6 needed at least when compiling with external ffmpeg, #939. +%patch6 -p1 -b .deepbind +%patch7 -p0 -b .multilib-devel + +find . -name "*.[hc]" | xargs chmod -c -x + +aclocal-1.9 -I m4 +libtoolize --force +autoheader +automake-1.9 --gnu --add-missing +autoconf + +# Avoid standard rpaths on lib64 archs: +sed -i -e 's|"/lib /usr/lib\b|"/%{_lib} %{_libdir}|' configure + + +%build +FFMPEG_CPPFLAGS=" "; FFMPEG_LIBS=" "; export FFMPEG_CPPFLAGS FFMPEG_LIBS +%configure --disable-dependency-tracking \ + --with-xv-path=%{_libdir} \ + --with-w32-path=%{codecdir} \ + --with-external-ffmpeg \ + --enable-ipv6 \ +%if 0%{?_with_directfb:1} + --enable-directfb \ +%endif +%if 0%{?_without_imagemagick:1} + --disable-imagemagick \ +%endif + --disable-rte \ + --disable-libfame \ + --disable-ffmpegtest \ + --disable-faad \ + --disable-mad \ + --disable-asf \ + --disable-vcd \ + --disable-a52dec \ + --with-external-dvdnav --disable-dvdnavtest + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT __docs +make install DESTDIR=$RPM_BUILD_ROOT +%find_lang libxine1 +cp -pR $RPM_BUILD_ROOT%{_docdir}/xine __docs +rm -rf $RPM_BUILD_ROOT%{_docdir}/xine + +# Removing useless files +rm -Rf $RPM_BUILD_ROOT%{_libdir}/libxine.la __docs/README \ + __docs/README.{freebsd,irix,solaris,MINGWCROSS,WIN32} \ + __docs/README.{dxr3,network_dvd} + +# Directory for binary codecs +mkdir -p $RPM_BUILD_ROOT%{codecdir} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + + +%files -f libxine1.lang +%defattr(-,root,root,-) +%doc AUTHORS COPYING CREDITS ChangeLog* README TODO __docs/README.* __docs/faq +%dir %{codecdir} +%{_datadir}/xine +%{_libdir}/libxine.so.* +%{_mandir}/man5/xine.5* +%dir %{_libdir}/xine/ +%dir %{_libdir}/xine/plugins/ +%dir %{_libdir}/xine/plugins/%{version}/ +# I list all the plugins because I don't want a non-free plugin +# to sneak into a future version +# these plugins do not have legal problems according to the SuSE RPM +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_alsa.so +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_oss.so +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_none.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_fb.so +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_file.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_none.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_opengl.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_xshm.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_xv.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_dvb.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_v4l.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_file.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_http.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_net.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_pnm.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_cdda.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_smb.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_stdin_fifo.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_rtsp.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_pvr.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_rtp.so +#%{_libdir}/xine/plugins/%{version}/xineplug_inp_vdr.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_bitplane.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_rgb.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_vorbis.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_yuv.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_lpcm.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_real.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_real_audio.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_speex.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_theora.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_spudvb.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_mpc.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_yuv_frames.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_real.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_audio.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_iff.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_avi.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_flv.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_image.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_matroska.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_ogg.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_fli.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_nsv.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_mng.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_pva.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_qt.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_rawdv.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_sputext.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_games.so +%{_libdir}/xine/plugins/%{version}/xineplug_dmx_slave.so +%{_libdir}/xine/plugins/%{version}/xineplug_flac.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_sputext.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_gdk_pixbuf.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_caca.so +%ifarch %ix86 +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_vidix.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_qt.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_w32dll.so +%endif +%ifnarch ppc64 s390 s390x +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_xxmc.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_xvmc.so +%endif +%{_libdir}/xine/plugins/%{version}/post/ +%{_libdir}/xine/plugins/%{version}/vidix/ +# Put it in a xine-lib-extras package one day ? +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_arts.so +%{_libdir}/xine/plugins/%{version}/xineplug_ao_out_esd.so +%{_libdir}/xine/plugins/%{version}/xineplug_inp_gnome_vfs.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_sdl.so +%{_libdir}/xine/plugins/%{version}/xineplug_vo_out_aa.so +%{_libdir}/xine/plugins/%{version}/xineplug_decode_image.so + + +%files devel +%defattr(-,root,root,-) +%doc __docs/hackersguide/* +%{_bindir}/xine-config +%{_datadir}/aclocal/xine.m4 +%{_includedir}/xine.h +%{_includedir}/xine/ +%{_libdir}/libxine.so +%{_libdir}/pkgconfig/libxine.pc +%{_mandir}/man1/xine-config.1* + +# -------------------------------------------------------------------- + +%changelog +* Wed Oct 18 2006 Aurelien Bompard 1.1.2-17 +- cleanup docs +- remove mms +- delete more source files in the cleanup script +- drop patch3 (affecting mms) + +* Tue Oct 17 2006 Aurelien Bompard 1.1.2-16 +- fix files list +- add BR gtk2-devel +- remove xineplug_decode_gdk_pixbuf.so from x86-only + +* Mon Oct 16 2006 Aurelien Bompard 1.1.2-15 +- removed libdts +- drop dxr patch (it's removed from tarball) +- list xineplug_decode_gdk_pixbuf.so and xineplug_vo_out_vidix.so only on x86 + +* Sun Oct 15 2006 Aurelien Bompard 1.1.2-14 +- update SOURCE1 to remove liba52 from tarball (patented) + +* Tue Sep 12 2006 Aurelien Bompard 1.1.2-13 +- drop patches 2 and 4 + +* Fri Sep 08 2006 Aurelien Bompard 1.1.2-12 +- initial Fedora Extras package