[vlc-commits] [Git][videolan/vlc][3.0.x] 8 commits: caca: fix to newer version
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat May 28 15:41:54 UTC 2022
Rémi Denis-Courmont pushed to branch 3.0.x at VideoLAN / VLC
Commits:
b689202d by Jean-Baptiste Kempf at 2022-05-28T14:54:35+00:00
caca: fix to newer version
Manual backport of 2c7b5e004f1a968077973b4105d7d65dca7539e9
- - - - -
da98390d by Steve Lhomme at 2022-05-28T14:54:35+00:00
contrib: caca: build without ncurses on Windows
That's what the bot does and it fails otherwise.
(cherry picked from commit 2ab65c0a35b8023a9b293241561f36c67140bbf5)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
a5336510 by Steve Lhomme at 2022-05-28T14:54:35+00:00
contrib: caca: fix ln -s calls on Windows
autoconf detects what the system should use to link files
(cherry picked from commit 85e51c1c769f46faa7e5ddb0ce332c8e85056cfb)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
bb9786f2 by Rémi Denis-Courmont at 2022-05-28T14:54:35+00:00
contrib: coloured ASCII art: disable GL support
Otherwise it is autodetected, which leads to nonreproducible builds:
depending if GLUT is available or not, OpenGL is enabled or not.
This also might fix #20543 (cannot be verified due to #17251).
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
(cherry picked from commit 33e119bf9fd223ca3f8bf1f4790d2a8f83be08a3)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
4e28a05f by Rémi Denis-Courmont at 2022-05-28T14:54:35+00:00
contrib: caca: disable ncurses on Linux
It does not compile.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
(cherry picked from commit 7330c600b04894a23c031f3850ee27103f7dd550)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
248ddd7e by Thomas Guillem at 2022-05-28T14:54:35+00:00
contrib: caca: call pkg_static
This fixes -lz that is not added in ldlib on linux.
Refs #17251
(cherry picked from commit a6534de9f64ae8801c14c6472a22006cf6e22946)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
649fb5fd by Thomas Guillem at 2022-05-28T14:54:35+00:00
contrib: caca: fix missing libs when linking
On linux, -lslang was not added on LDLIB
Fixes #17251
(cherry picked from commit 47b1670197fd74473ed31048529c4567ef0a27ce)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
cec83d0b by Alexandre Janniaux at 2022-05-28T14:54:35+00:00
caca: update contrib to 0.99.beta20
The new contrib fixes a bunch of reported CVE:
CVE-2021-30498 (tga export, not concerned)
CVE-2021-30499 (troff export, not concerned)
CVE-2021-3410 (canvas.c, v0.99.beta19)
CVE-2018-20546 (dither.c, v0.99.beta19)
CVE-2018-20547 (dither.c, v0.99.beta19)
CVE-2018-20545 (load_image, v0.99.beta19)
CVE-2018-20548 (load_image, v0.99.beta19)
CVE-2018-20549 (caca_file_read, 0.99.beta19, not concerned)
See release note[^1] on the github project.
It also allow to migrate the use of the new API instead of libcucul,
which has been merged into libcaca since 0.99.beta15:
commit f61816ceb7445f8bf818936151554ac060764b39
Author: Sam Hocevar <sam at hocevar.net>
Date: Sat Sep 27 13:12:46 2008 +0000
Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.
It was then completely wiped out by the following commit, which is part
of v0.99.beta20:
commit 5f0ec215f8c9915ed028324a8ecac8212f68e18d
Author: Sam Hocevar <sam at hocevar.net>
Date: Thu May 3 10:33:30 2018 +0200
Remove legacy code from 10 years ago.
Check NEWS for details:
\section news0_99_beta15 Changes between 0.99.beta15 and 0.99.beta14
- libcucul was merged back into libcaca for more clarity
[^1]: https://github.com/cacalabs/libcaca/releases/tag/v0.99.beta20
(cherry picked from commit 2d5974555729b0915e9280e822cf66c2dd3304f8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
6 changed files:
- contrib/src/caca/SHA512SUMS
- + contrib/src/caca/caca-fix-pkgconfig.patch
- â contrib/src/caca/caca-osx-sdkofourchoice.patch
- â contrib/src/caca/caca-win32-static.patch
- contrib/src/caca/rules.mak
- modules/video_output/caca.c
Changes:
=====================================
contrib/src/caca/SHA512SUMS
=====================================
@@ -1 +1 @@
-1d08a45a742cbda2c80810e753b49588cb9073ef545a1d47537745c4e62dc79748a25907903ffee58676d9aa5b75c5e0658666429cf028e10c09157d418c8d19 libcaca-0.99.beta17.tar.gz
+ab03e6c7d17fd152b2d5e9161799531f5e87322e174cb9d25874700f5bc1acfaf8bc2736e733998dad906f793c5a0304740dd39eec04a5e4c3d181bb109b4f23 libcaca-0.99.beta20.tar.gz
=====================================
contrib/src/caca/caca-fix-pkgconfig.patch
=====================================
@@ -0,0 +1,11 @@
+diff -Naur libcaca-0.99.beta17.a/caca/caca.pc.in libcaca-0.99.beta17.b/caca/caca.pc.in
+--- libcaca-0.99.beta17.a/caca/caca.pc.in 2009-11-17 16:58:37.000000000 +0100
++++ libcaca-0.99.beta17.b/caca/caca.pc.in 2019-10-09 09:04:48.297412878 +0200
+@@ -9,5 +9,5 @@
+ Requires:
+ Conflicts:
+ Libs: -L${libdir} -lcaca
+-Libs.private: @ZLIB_LIBS@
+-Cflags: -I${includedir}
++Libs.private: @ZLIB_LIBS@ @CACA_LIBS@
++Cflags: -DCACA_STATIC -I${includedir}
=====================================
contrib/src/caca/caca-osx-sdkofourchoice.patch deleted
=====================================
@@ -1,39 +0,0 @@
---- libcaca/configure.orig 2010-02-08 14:46:58.000000000 +0100
-+++ libcaca/configure 2010-08-09 17:46:59.000000000 +0200
-@@ -16785,33 +16785,9 @@
- done
-
- if test "${ac_cv_my_have_cocoa}" = "yes"; then
-- case x${target} in
-- xpowerpc*darwin*)
-- # 10.3 needed to link with X11
-- MACOSX_SDK="${MACOSX_SDK:-/Developer/SDKs/MacOSX10.3.9.sdk}"
-- GCC_VERSION="${GCC_VERSION:-3.3}"
-- ARCH="${ARCH:--arch ppc}"
-- MACOSX_SDK_CFLAGS="${MACOSX_SDK_CFLAGS:--nostdinc -isystem ${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOSX_SDK}/usr/include}"
-- MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CXXFLAGS:--nostdinc++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/ppc-darwin -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/backward}"
-- MACOSX_SDK_LDFLAGS="${MACOSX_SDK_LDFLAGS:--L${MACOSX_SDK}/usr/lib/gcc/darwin -L${MACOSX_SDK}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOSX_SDK}/usr/lib}"
-- ;;
-- x*86_64*darwin*)
-- MACOSX_SDK="${MACOSX_SDK:-/Developer/SDKs/MacOSX10.5.sdk}"
-- GCC_VERSION="${GCC_VERSION:-4.0}"
-- ARCH="${ARCH:--arch i386}"
-- MACOSX_SDK_CFLAGS="${MACOSX_SDK_CFLAGS:--isysroot ${MACOSX_SDK}}"
-- MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CXXFLAGS:-${MACOSX_SDK_CFLAGS}}"
-- ;;
-- x*86*darwin*)
-- MACOSX_SDK="${MACOSX_SDK:-/Developer/SDKs/MacOSX10.6.sdk}"
-- GCC_VERSION="${GCC_VERSION:-4.0}"
-- ARCH="${ARCH:--arch i386}"
-- MACOSX_SDK_CFLAGS="${MACOSX_SDK_CFLAGS:--isysroot ${MACOSX_SDK}}"
-- MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CXXFLAGS:-${MACOSX_SDK_CFLAGS}}"
-- ;;
-- esac
-- CC="${CC:-gcc-${GCC_VERSION}}"
-- CXX="${CXX:-g++-${GCC_VERSION}}"
-+ MACOSX_SDK=/Developer/SDKs/MacOSX10.5.sdk
-+ MACOSX_SDK_CFLAGS="-isysroot ${MACOSX_SDK}"
-+ MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CFLAGS}"
- MACOSX_SDK_FRAMEWORKS="${MACOSX_SDK_FRAMEWORKS:--F${MACOSX_SDK}/System/Library/Frameworks}"
- CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}"
- CFLAGS="${CFLAGS} ${MACOSX_SDK_CFLAGS}"
=====================================
contrib/src/caca/caca-win32-static.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- libcaca/caca/caca.h 2010-02-08 13:34:28.000000000 +0100
-+++ libcaca.new/caca/caca.h 2010-08-24 19:27:39.000000000 +0200
-@@ -31,7 +31,7 @@
- #if defined _DOXYGEN_SKIP_ME
- #elif defined _WIN32 && defined __LIBCACA__ && defined DLL_EXPORT
- # define __extern extern __declspec(dllexport)
--#elif defined _WIN32 && !defined __LIBCACA__
-+#elif defined _WIN32 && !defined __LIBCACA__ && defined __NULL
- # define __extern extern __declspec(dllimport)
- #else
- # define __extern extern
=====================================
contrib/src/caca/rules.mak
=====================================
@@ -1,6 +1,6 @@
# CACA
-CACA_VERSION := 0.99.beta17
-CACA_URL := http://caca.zoy.org/files/libcaca/libcaca-$(CACA_VERSION).tar.gz
+CACA_VERSION := 0.99.beta20
+CACA_URL := https://github.com/cacalabs/libcaca/releases/download/v$(CACA_VERSION)/libcaca-$(CACA_VERSION).tar.gz
ifndef HAVE_DARWIN_OS
ifndef HAVE_LINUX # see VLC Trac 17251
@@ -8,7 +8,7 @@ PKGS += caca
endif
endif
-ifeq ($(call need_pkg,"caca >= 0.99.beta14"),)
+ifeq ($(call need_pkg,"caca >= 0.99.beta19"),)
PKGS_FOUND += caca
endif
@@ -20,23 +20,44 @@ $(TARBALLS)/libcaca-$(CACA_VERSION).tar.gz:
caca: libcaca-$(CACA_VERSION).tar.gz .sum-caca
$(UNPACK)
$(APPLY) $(SRC)/caca/caca-fix-compilation-llvmgcc.patch
- $(APPLY) $(SRC)/caca/caca-llvm-weak-alias.patch
- $(APPLY) $(SRC)/caca/caca-osx-sdkofourchoice.patch
- $(APPLY) $(SRC)/caca/caca-win32-static.patch
+ $(APPLY) $(SRC)/caca/caca-fix-pkgconfig.patch
+ $(call pkg_static,"caca/caca.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
mv caca/config.sub caca/config.guess caca/.auto
CACA_CONF := \
+ --disable-gl \
--disable-imlib2 \
--disable-doc \
+ --disable-cppunit \
+ --disable-zzuf \
--disable-ruby \
--disable-csharp \
--disable-cxx \
- --disable-java
+ --disable-java \
+ --disable-python \
+ --disable-cocoa \
+ --disable-network \
+ --disable-vga \
+ --disable-imlib2
ifdef HAVE_MACOSX
CACA_CONF += --disable-x11
endif
+ifdef HAVE_WIN32
+CACA_CONF += --disable-ncurses \
+ ac_cv_func_vsnprintf_s=yes \
+ ac_cv_func_sprintf_s=yes
+endif
+ifdef HAVE_LINUX
+CACA_CONF += --disable-ncurses
+endif
+
+CACA_CONF += \
+ MACOSX_SDK=$(MACOSX_SDK) \
+ MACOSX_SDK_CFLAGS=" " \
+ MACOSX_SDK_CXXFLAGS=" " \
+ CPPFLAGS="$(CPPFLAGS) -DCACA_STATIC"
.caca: caca
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(CACA_CONF)
=====================================
modules/video_output/caca.c
=====================================
@@ -74,9 +74,9 @@ static void Place(vout_display_t *, vout_display_place_t *);
/* */
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, picture_t *picture, subpicture_t *subpic
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, picture_t *picture, subpicture_t *subpic
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, int query, va_list args)
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, vout_display_place_t *place)
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);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a11c2e35d2efbf395fed71fc085a1182067ffc48...cec83d0bc7a481762a88e6a6cd1629d7a5a1bdef
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a11c2e35d2efbf395fed71fc085a1182067ffc48...cec83d0bc7a481762a88e6a6cd1629d7a5a1bdef
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list