]> git.pld-linux.org Git - packages/vlc.git/commitdiff
- added libcaca patch (fixes build with 0.99.beta20), reenabled caca
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Jan 2022 19:18:25 +0000 (20:18 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Jan 2022 19:18:25 +0000 (20:18 +0100)
vlc-libcaca.patch [new file with mode: 0644]
vlc.spec

diff --git a/vlc-libcaca.patch b/vlc-libcaca.patch
new file mode 100644 (file)
index 0000000..56cbd57
--- /dev/null
@@ -0,0 +1,97 @@
+--- vlc-3.0.16/modules/video_output/caca.c.orig        2017-11-24 16:29:18.000000000 +0100
++++ vlc-3.0.16/modules/video_output/caca.c     2022-01-30 19:43:25.433547548 +0100
+@@ -74,9 +74,9 @@ static void Place(vout_display_t *, vout
+ /* */
+ struct vout_display_sys_t {
+-    cucul_canvas_t *cv;
++    caca_canvas_t *cv;
+     caca_display_t *dp;
+-    cucul_dither_t *dither;
++    caca_dither_t *dither;
+     picture_pool_t *pool;
+     vout_display_event_thread_t *et;
+@@ -153,9 +153,9 @@ static int Open(vlc_object_t *object)
+     if (!sys)
+         goto error;
+-    sys->cv = cucul_create_canvas(0, 0);
++    sys->cv = caca_create_canvas(0, 0);
+     if (!sys->cv) {
+-        msg_Err(vd, "cannot initialize libcucul");
++        msg_Err(vd, "cannot initialize libcaca");
+         goto error;
+     }
+@@ -209,11 +209,11 @@ error:
+         if (sys->pool)
+             picture_pool_Release(sys->pool);
+         if (sys->dither)
+-            cucul_free_dither(sys->dither);
++            caca_free_dither(sys->dither);
+         if (sys->dp)
+             caca_free_display(sys->dp);
+         if (sys->cv)
+-            cucul_free_canvas(sys->cv);
++            caca_free_canvas(sys->cv);
+         free(sys);
+     }
+@@ -235,9 +235,9 @@ static void Close(vlc_object_t *object)
+     if (sys->pool)
+         picture_pool_Release(sys->pool);
+     if (sys->dither)
+-        cucul_free_dither(sys->dither);
++        caca_free_dither(sys->dither);
+     caca_free_display(sys->dp);
+-    cucul_free_canvas(sys->cv);
++    caca_free_canvas(sys->cv);
+ #if defined(_WIN32)
+     FreeConsole();
+@@ -266,7 +266,7 @@ static void Prepare(vout_display_t *vd,
+     if (!sys->dither) {
+         /* Create the libcaca dither object */
+-        sys->dither = cucul_create_dither(32,
++        sys->dither = caca_create_dither(32,
+                                             vd->source.i_visible_width,
+                                             vd->source.i_visible_height,
+                                             picture->p[0].i_pitch,
+@@ -284,12 +284,12 @@ static void Prepare(vout_display_t *vd,
+     vout_display_place_t place;
+     Place(vd, &place);
+-    cucul_set_color_ansi(sys->cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK);
+-    cucul_clear_canvas(sys->cv);
++    caca_set_color_ansi(sys->cv, CACA_DEFAULT, CACA_BLACK);
++    caca_clear_canvas(sys->cv);
+     const int crop_offset = vd->source.i_y_offset * picture->p->i_pitch +
+                             vd->source.i_x_offset * picture->p->i_pixel_pitch;
+-    cucul_dither_bitmap(sys->cv, place.x, place.y,
++    caca_dither_bitmap(sys->cv, place.x, place.y,
+                         place.width, place.height,
+                         sys->dither,
+                         &picture->p->p_pixels[crop_offset]);
+@@ -328,7 +328,7 @@ static int Control(vout_display_t *vd, i
+     case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
+         if (sys->dither)
+-            cucul_free_dither(sys->dither);
++            caca_free_dither(sys->dither);
+         sys->dither = NULL;
+         return VLC_SUCCESS;
+@@ -366,8 +366,8 @@ static void Place(vout_display_t *vd, vo
+     vout_display_PlacePicture(place, &vd->source, vd->cfg, false);
+-    const int canvas_width   = cucul_get_canvas_width(sys->cv);
+-    const int canvas_height  = cucul_get_canvas_height(sys->cv);
++    const int canvas_width   = caca_get_canvas_width(sys->cv);
++    const int canvas_height  = caca_get_canvas_height(sys->cv);
+     const int display_width  = caca_get_display_width(sys->dp);
+     const int display_height = caca_get_display_height(sys->dp);
index b6e9e2b51b85073726c9d6007010950a3620791c..907221a9ff52f7d94a81b146c753427fbd4ea339 100644 (file)
--- a/vlc.spec
+++ b/vlc.spec
@@ -21,7 +21,7 @@
 %bcond_without alsa            # ALSA access/audio output plugins
 %bcond_without bonjour         # bonjour service discovery plugin
 %bcond_without bpg             # BPG files support
 %bcond_without alsa            # ALSA access/audio output plugins
 %bcond_without bonjour         # bonjour service discovery plugin
 %bcond_without bpg             # BPG files support
-%bcond_with    caca            # caca video output plugin
+%bcond_without caca            # caca video output plugin
 %bcond_without crystalhd       # crystalhd codec plugin
 %bcond_with    daala           # daala codec plugin (experimental)
 %bcond_with    decklink        # Blackmagic DeskLink output support (BR: proprietary SDK)
 %bcond_without crystalhd       # crystalhd codec plugin
 %bcond_with    daala           # daala codec plugin (experimental)
 %bcond_with    decklink        # Blackmagic DeskLink output support (BR: proprietary SDK)
@@ -88,6 +88,7 @@ Patch8:               qt-5.15.patch
 Patch9:                %{name}-live.patch
 Patch10:       %{name}-srt.patch
 Patch11:       opencv4.patch
 Patch9:                %{name}-live.patch
 Patch10:       %{name}-srt.patch
 Patch11:       opencv4.patch
+Patch12:       %{name}-libcaca.patch
 URL:           http://www.videolan.org/vlc/
 %{?with_decklink:BuildRequires:        Blackmagic_DeckLink_SDK}
 # 1.0 for X11 or GLESv1, 1.1 for GLESv2
 URL:           http://www.videolan.org/vlc/
 %{?with_decklink:BuildRequires:        Blackmagic_DeckLink_SDK}
 # 1.0 for X11 or GLESv1, 1.1 for GLESv2
@@ -144,7 +145,7 @@ BuildRequires:      libass-devel >= 0.9.8
 %{?with_dv:BuildRequires:      libavc1394-devel >= 0.5.3}
 BuildRequires: libbluray-devel >= 0.6.2
 %{?with_bpg:BuildRequires:     libbpg-devel}
 %{?with_dv:BuildRequires:      libavc1394-devel >= 0.5.3}
 BuildRequires: libbluray-devel >= 0.6.2
 %{?with_bpg:BuildRequires:     libbpg-devel}
-%{?with_caca:BuildRequires:    libcaca-devel >= 0.99-0.beta14}
+%{?with_caca:BuildRequires:    libcaca-devel >= 0.99-0.beta20}
 BuildRequires: libcddb-devel >= 0.9.5
 BuildRequires: libcdio-devel >= 0.78.2
 BuildRequires: libchromaprint-devel >= 0.6.0
 BuildRequires: libcddb-devel >= 0.9.5
 BuildRequires: libcdio-devel >= 0.78.2
 BuildRequires: libchromaprint-devel >= 0.6.0
@@ -357,7 +358,7 @@ Requires:   Qt5X11Extras >= %{qt_ver}
 Requires:      desktop-file-utils
 Requires:      hicolor-icon-theme
 Suggests:      dbus-x11 >= 1.6.0
 Requires:      desktop-file-utils
 Requires:      hicolor-icon-theme
 Suggests:      dbus-x11 >= 1.6.0
-%{?with_caca:Suggests: libcaca > 0.99-0.beta14.1}
+%{?with_caca:Suggests: libcaca > 0.99-0.beta20}
 Obsoletes:     vlc-gnome
 Obsoletes:     vlc-gtk
 
 Obsoletes:     vlc-gnome
 Obsoletes:     vlc-gtk
 
@@ -433,6 +434,7 @@ Akcje klienta VLC dla Solid.
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 %build
 %{__libtoolize}
 
 %build
 %{__libtoolize}
@@ -1257,7 +1259,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/vlc/plugins/video_output/libaa_plugin.so
 %endif
 %if %{with caca}
 %attr(755,root,root) %{_libdir}/vlc/plugins/video_output/libaa_plugin.so
 %endif
 %if %{with caca}
-# R: libcaca >= 0.99-0.beta14
+# R: libcaca >= 0.99-0.beta20
 %attr(755,root,root) %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so
 %endif
 # R: EGL, xorg-lib-libX11
 %attr(755,root,root) %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so
 %endif
 # R: EGL, xorg-lib-libX11
This page took 0.384206 seconds and 4 git commands to generate.