From 5981b73830e9dd6542bc4b5bd0a18ae5b8b8e443 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 7 Jan 2009 23:14:28 +0000 Subject: [PATCH] * Wed Jan 07 2009 Kevin Kofler - 1.1.16-1.1 - patch for old libcaca in F9- --- xine-lib-1.1.16-old-caca.patch | 27 +++++++++++++++++++++++++++ xine-lib.spec | 28 ++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 xine-lib-1.1.16-old-caca.patch diff --git a/xine-lib-1.1.16-old-caca.patch b/xine-lib-1.1.16-old-caca.patch new file mode 100644 index 0000000..5a149a9 --- /dev/null +++ b/xine-lib-1.1.16-old-caca.patch @@ -0,0 +1,27 @@ +--- src/video_out/video_out_caca.c Tue Nov 18 21:13:55 2008 +0100 ++++ src/video_out/video_out_caca.c Mon Nov 10 16:33:51 2008 +0100 +@@ -276,7 +276,6 @@ static int caca_redraw_needed (vo_driver + + static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *visual_gen) { + caca_class_t *class = (caca_class_t *) class_gen; +- caca_display_t *dp = (caca_display_t *)visual_gen; + caca_driver_t *this; + + this = calloc(1, sizeof (caca_driver_t)); +@@ -301,13 +300,8 @@ static vo_driver_t *open_plugin (video_d + this->yuv2rgb_factory = yuv2rgb_factory_init(MODE_32_RGB, 0, NULL); + this->yuv2rgb_factory->set_csc_levels(this->yuv2rgb_factory, 0, 128, 128); + +- if (dp) { +- this->cv = caca_get_canvas(dp); +- this->dp = dp; +- } else { +- this->cv = cucul_create_canvas(0, 0); +- this->dp = caca_create_display(this->cv); +- } ++ this->cv = cucul_create_canvas(0, 0); ++ this->dp = caca_create_display(this->cv); + + caca_refresh_display(this->dp); + return &this->vo_driver; + diff --git a/xine-lib.spec b/xine-lib.spec index 757046b..eaffe59 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -13,16 +13,18 @@ %define have_vidix 0 %endif # ix86 -%if 0%{?fedora} > 9 -%define _with_caca --with-caca +%if 0%{?fedora} <= 9 + %define old_caca 1 %endif %if 0%{?fedora} %define with_aalib %{?_without_aalib:0}%{!?_without_aalib:1} + %define with_caca %{?_without_caca:0}%{!?_without_caca:1} %define with_pa %{?_without_pulseaudio:0}%{!?_without_pulseaudio:1} %define with_xcb %{?_without_xcb:0}%{!?_without_xcb:1} %else %define with_aalib %{?_with_aalib:1}%{!?_with_aalib:0} + %define with_caca %{?_with_caca:1}%{!?_with_caca:0} %define with_pa %{?_with_pulseaudio:1}%{!?_with_pulseaudio:0} %define with_xcb %{?_with_xcb:1}%{!?_with_xcb:0} %endif # Fedora @@ -34,7 +36,7 @@ Summary: Xine library Name: xine-lib Version: 1.1.16 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ Group: System Environment/Libraries URL: http://xinehq.de/ @@ -50,6 +52,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch1: %{name}-1.1.4-optflags.patch Patch6: %{name}-1.1.1-deepbind-939.patch +Patch7: %{name}-1.1.16-old-caca.patch ## upstream patches Provides: xine-lib(plugin-abi) = %{abiver} @@ -69,8 +72,12 @@ BuildRequires: libmng-devel %if %{with_aalib} BuildRequires: aalib-devel >= 1.4 %endif # aalib -%if 0%{?_with_caca:1} -BuildRequires: libcaca-devel >= 0.99-0.5.beta16 +%if %{with_caca} +%if 0%{?old_caca} +BuildRequires: libcaca-devel >= 0.99 +%else +BuildRequires: libcaca-devel >= 0.99-0.5.beta16 +%endif %endif # caca %if 0%{!?_without_directfb:1} BuildRequires: directfb-devel @@ -170,7 +177,7 @@ This package contains extra plugins for xine-lib: %if %{with_aalib} - AA-lib %endif # aalib -%if 0%{?with_caca:1} +%if %{with_caca} - Libcaca %endif # caca %if 0%{!?_without_imagemagick:1} @@ -190,6 +197,9 @@ touch -r m4/optimizations.m4 m4/optimizations.m4.stamp touch -r m4/optimizations.m4.stamp m4/optimizations.m4 # Patch6 needed at least when compiling with external ffmpeg, #939. %patch6 -p1 -b .deepbind +%if 0%{?old_caca} +%patch7 -p0 -b .old-caca +%endif # Avoid standard rpaths on lib64 archs: (autotools patch should handle this, no? -- Rex ) #sed -i -e 's|"/lib /usr/lib\b|"/%{_lib} %{_libdir}|' configure @@ -227,7 +237,6 @@ export SDL_CFLAGS="$(sdl-config --cflags)" SDL_LIBS="$(sdl-config --libs)" %if 0%{?_without_imagemagick:1} --without-imagemagick \ %endif # imagemagick - %{?_with_caca} %{!?_with_caca:--without-caca} \ %{!?_without_arts:--with-arts} %{?_without_arts} \ --with-wavpack \ --with-real-codecs-path=%{codecdir} \ @@ -401,7 +410,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with_aalib} %{_libdir}/xine/plugins/%{abiver}/xineplug_vo_out_aa.so %endif # aalib -%if 0%{?_with_caca} +%if %{with_caca} %{_libdir}/xine/plugins/%{abiver}/xineplug_vo_out_caca.so %endif # caca %if 0%{!?_without_directfb:1} @@ -425,6 +434,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 07 2009 Kevin Kofler - 1.1.16-1.1 +- patch for old libcaca in F9- + * Wed Jan 07 2009 Rex Dieter - 1.1.16-1 - xine-lib-1.1.16, plugin ABI 1.25 - --with-external-libdvdnav, include mpeg demuxers (#213597)