[packages/vlc] - added libcaca patch (fixes build with 0.99.beta20), reenabled caca
qboosh
qboosh at pld-linux.org
Sun Jan 30 20:17:10 CET 2022
commit b2f663f058a2e70393c1e4653a436f1ad960f523
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 30 20:18:25 2022 +0100
- added libcaca patch (fixes build with 0.99.beta20), reenabled caca
vlc-libcaca.patch | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
vlc.spec | 10 +++---
2 files changed, 103 insertions(+), 4 deletions(-)
---
diff --git a/vlc.spec b/vlc.spec
index b6e9e2b..907221a 100644
--- 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_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)
@@ -88,6 +88,7 @@ Patch8: qt-5.15.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
@@ -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_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
@@ -357,7 +358,7 @@ Requires: Qt5X11Extras >= %{qt_ver}
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
@@ -433,6 +434,7 @@ Akcje klienta VLC dla Solid.
%patch9 -p1
%patch10 -p1
%patch11 -p1
+%patch12 -p1
%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}
-# 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
diff --git a/vlc-libcaca.patch b/vlc-libcaca.patch
new file mode 100644
index 0000000..56cbd57
--- /dev/null
+++ b/vlc-libcaca.patch
@@ -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);
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vlc.git/commitdiff/b2f663f058a2e70393c1e4653a436f1ad960f523
More information about the pld-cvs-commit
mailing list