From b0c3f25fe4da298cc41640aca567449bd98e47a8 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 5 Aug 2024 01:52:59 +0800 Subject: [PATCH] Add patch to respect environment LDFLAGS (cherry picked from commit 8d8e520c41bd238f6d0eceb42ed8f60cfeb317b2) --- libvisual-0.4.0-format-security.patch | 17 ---------- ...al-0.4.2-respect-environment-ldflags.patch | 11 +++++++ libvisual-c99.patch | 33 +++++++++++++++++++ libvisual.spec | 32 +++++++++--------- 4 files changed, 60 insertions(+), 33 deletions(-) delete mode 100644 libvisual-0.4.0-format-security.patch create mode 100644 libvisual-0.4.2-respect-environment-ldflags.patch create mode 100644 libvisual-c99.patch diff --git a/libvisual-0.4.0-format-security.patch b/libvisual-0.4.0-format-security.patch deleted file mode 100644 index ab1e4d6..0000000 --- a/libvisual-0.4.0-format-security.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up libvisual-0.4.0/libvisual/lv_plugin.c.format-security libvisual-0.4.0/libvisual/lv_plugin.c ---- libvisual-0.4.0/libvisual/lv_plugin.c.format-security 2014-06-11 15:38:36.786199952 -0400 -+++ libvisual-0.4.0/libvisual/lv_plugin.c 2014-06-11 15:38:45.990132144 -0400 -@@ -442,11 +442,11 @@ VisList *visual_plugin_registry_filter ( - - visual_list_add (list, ref); - } else if (ret != FALSE) { -- visual_log (VISUAL_LOG_WARNING, visual_error_to_string (ret)); -+ visual_log (VISUAL_LOG_WARNING, "%s", visual_error_to_string (ret)); - } - } - else if (ret != FALSE) { /* FIXME XXX TODO, patch frmo duilio check how this works */ -- visual_log (VISUAL_LOG_WARNING, visual_error_to_string (ret)); -+ visual_log (VISUAL_LOG_WARNING, "%s", visual_error_to_string (ret)); - } - } - diff --git a/libvisual-0.4.2-respect-environment-ldflags.patch b/libvisual-0.4.2-respect-environment-ldflags.patch new file mode 100644 index 0000000..0c17931 --- /dev/null +++ b/libvisual-0.4.2-respect-environment-ldflags.patch @@ -0,0 +1,11 @@ +--- libvisual-0.4.2/libvisual/Makefile.am.orig 2023-03-20 10:04:17.000000000 +0800 ++++ libvisual-0.4.2/libvisual/Makefile.am 2024-08-05 01:23:43.261498400 +0800 +@@ -29,7 +29,7 @@ + AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libvisual \ + -I$(top_builddir) -I$(top_builddir)/libvisual + +-libvisual_@LIBVISUAL_VERSION_SUFFIX@_la_LDFLAGS = -export-dynamic -no-undefined ++libvisual_@LIBVISUAL_VERSION_SUFFIX@_la_LDFLAGS = $(LDFLAGS) -export-dynamic -no-undefined + + libvisual_@LIBVISUAL_VERSION_SUFFIX@_la_SOURCES = lv_actor.c lv_input.c lv_event.c \ + lv_bin.c lv_plugin.c lv_video.c lv_video_simd.c lv_mem.c \ diff --git a/libvisual-c99.patch b/libvisual-c99.patch new file mode 100644 index 0000000..9499ea7 --- /dev/null +++ b/libvisual-c99.patch @@ -0,0 +1,33 @@ +Include "lv_cpu.h" for the visual_cpu_initialize, visual_cpu_get_sse, +visual_cpu_get_3dnow functions. Add a prototype for +visual_transform_init, so that it can be called before it is defined. + +Submitted upstream to the 0.4.x branch: + + + +diff --git a/libvisual/lv_libvisual.c b/libvisual/lv_libvisual.c +index 8de03ebad7d499bb..e7ef768d421aa7fa 100644 +--- a/libvisual/lv_libvisual.c ++++ b/libvisual/lv_libvisual.c +@@ -30,6 +30,7 @@ + #include + + #include "lvconfig.h" ++#include "lv_cpu.h" + #include "lv_plugin.h" + #include "lv_actor.h" + #include "lv_input.h" +diff --git a/libvisual/lv_transform.c b/libvisual/lv_transform.c +index c763768c0fbb757a..58fe15fa57d2e783 100644 +--- a/libvisual/lv_transform.c ++++ b/libvisual/lv_transform.c +@@ -35,6 +35,8 @@ + #include "lv_transform.h" + #include "lv_mem.h" + ++int visual_transform_init (VisTransform *transform, const char *transformname); ++ + extern VisList *__lv_plugins_transform; + + static int transform_dtor (VisObject *object); diff --git a/libvisual.spec b/libvisual.spec index fb48d92..44409c0 100644 --- a/libvisual.spec +++ b/libvisual.spec @@ -1,17 +1,20 @@ Name: libvisual Version: 0.4.2 -Release: 3 +Release: 4 Epoch: 1 Summary: Audio Visualization Library -License: LGPLv2+ +License: LGPL-2.1-or-later URL: http://libvisual.org/ -Source0: http://dl.sf.net/libvisual/%{name}-%{version}.tar.gz +Source0: https://github.com/Libvisual/libvisual/releases/download/libvisual-%{version}/%{name}-%{version}.tar.gz Patch1: libvisual-0.4.0-inlinedefineconflict.patch Patch2: libvisual-0.4.2-sw.patch +Patch3: libvisual-0.4.2-respect-environment-ldflags.patch +Patch4: libvisual-c99.patch -BuildRequires: libtool gettext gcc-c++ xorg-x11-proto-devel doxygen SDL-devel autoconf-archive +BuildRequires: libtool gettext-devel gcc-c++ doxygen autoconf-archive automake +BuildRequires: pkgconfig(sdl) >= 1.2.0 %description Libvisual is a library that acts as a middle layer between applications @@ -23,7 +26,6 @@ visualizations. %package devel Summary: Development files for libvisual Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: pkgconfig %description devel Libvisual is a library that acts as a middle layer between applications @@ -37,35 +39,33 @@ libraries. %build #automake upgrade to 1.17 and autoconf upgrade to 2.72, but libvisual configure etc files also 1.16.5, so autoreconf -autoreconf -%configure -touch aclocal.m4 #Do not regenerate aclocal.m4, for ci check_build -make %{?_smp_mflags} -# doc file -#doxygen +autoreconf -f +%configure --disable-static +%make_build %install %make_install +%delete_la %find_lang %{name}-0.4 -%ldconfig_scriptlets - %files -f %{name}-0.4.lang -#%doc doc/html/* %doc ABOUT-NLS AUTHORS ChangeLog INSTALL NEWS README TODO %license COPYING %{_libdir}/libvisual*.so.* %{_bindir}/lv-tool* -%{_datadir}/man/man1/lv-tool* +%{_mandir}/man1/lv-tool* %files devel %{_includedir}/%{name}-0.4 %{_libdir}/libvisual*.so -%exclude %{_libdir}/libvisual*.*a %{_libdir}/pkgconfig/*.pc %changelog +* Mon Aug 05 2024 Funda Wang - 1:0.4.2-4 +- Add patch to respect environment LDFLAGS +- C99 compatibility fixes + * Mon Jul 22 2024 wangxiao - 1:0.4.2-3 - fix build failure due to automake upgrade -- Gitee