From 2d9cadbd153c9afba177e249dfa852a13ed463e8a65904e6ea424fa72081b3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 3 Oct 2024 17:34:35 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main libvisual revision 0c527f2c1ecf72a7d5b5d4bb69fd9fa1 --- libvisual-c99.patch | 45 +++++++ libvisual-configure-c99.patch | 217 ++++++++++++++++++++++++++++++++++ libvisual.changes | 14 +++ libvisual.spec | 20 ++-- 4 files changed, 289 insertions(+), 7 deletions(-) create mode 100644 libvisual-c99.patch create mode 100644 libvisual-configure-c99.patch diff --git a/libvisual-c99.patch b/libvisual-c99.patch new file mode 100644 index 0000000..4e3b6b1 --- /dev/null +++ b/libvisual-c99.patch @@ -0,0 +1,45 @@ +Includ "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. + +Upstream has switched to C++, which does not support implicit +function declarations at all, so the issue has already been fixed +there. + +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_math.c b/libvisual/lv_math.c +index cfae316d0abc8c0d..f55c11854051f145 100644 +--- a/libvisual/lv_math.c ++++ b/libvisual/lv_math.c +@@ -29,6 +29,7 @@ + #include + + #include "lv_bits.h" ++#include "lv_cpu.h" + #include "lv_math.h" + + /* This file is getting big and bloated because of the large chunks of simd code. When all is in place we'll take a serious +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-configure-c99.patch b/libvisual-configure-c99.patch new file mode 100644 index 0000000..ba57527 --- /dev/null +++ b/libvisual-configure-c99.patch @@ -0,0 +1,217 @@ +Avoid implicit function declartions in the configure script, to +improve compatibility with future compilers. + +The “check_me != 42” part is not generic and would have to be +upstreamed, but upstream has switched to CMake and no longer uses +this test, it seems. + +diff --git a/aclocal.m4 b/aclocal.m4 +index 14cd8f3560139cbb..ab8170ee0185c72a 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1655,10 +1655,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -1672,7 +1668,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + }] + EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then +diff --git a/configure b/configure +index c4994911e224154f..3da8071a1c029507 100755 +--- a/configure ++++ b/configure +@@ -3408,7 +3408,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ +- '' \ ++ '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ +@@ -5060,8 +5060,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -9369,10 +9369,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -9386,7 +9382,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9467,10 +9463,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -9484,7 +9476,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -13163,10 +13155,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -13180,7 +13168,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -13261,10 +13249,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -13278,7 +13262,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -18926,10 +18910,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -18943,7 +18923,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -19024,10 +19004,6 @@ else + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -19041,7 +19017,7 @@ int main () + /* dlclose (self); */ + } + +- exit (status); ++ return status; + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -20546,8 +20522,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -24621,7 +24597,7 @@ int main() + void *ret; + pthread_create (&t, $defattr, func, 0); + pthread_join (t, &ret); +- exit (check_me != 42 || ret != &check_me); ++ return check_me != 42 || ret != &check_me; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +@@ -24671,7 +24647,7 @@ int main() + void *ret; + pthread_create (&t, $defattr, func, 0); + pthread_join (t, &ret); +- exit (check_me != 42 || ret != &check_me); ++ return check_me != 42 || ret != &check_me; + } + _ACEOF + rm -f conftest$ac_exeext +diff --git a/configure.ac b/configure.ac +index 71d577304a2e5c6f..8cc30b4483a05a48 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -173,7 +173,7 @@ int main() + void *ret; + pthread_create (&t, $1, func, 0); + pthread_join (t, &ret); +- exit (check_me != 42 || ret != &check_me); ++ return check_me != 42 || ret != &check_me; + }]) + + LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation diff --git a/libvisual.changes b/libvisual.changes index b1fb1b9..8dc14ec 100644 --- a/libvisual.changes +++ b/libvisual.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Jun 14 00:10:03 UTC 2024 - Yasuhiko Kamata + +- Imported C99 compatibility fixes from Fedora project: + https://src.fedoraproject.org/rpms/libvisual/c/bcffd8eddbbcab5b00f930805396be5fdb55c5a7?branch=rawhide + + it fixes build error when using GCC14 (boo#1225859) + (added libvisual-configure-c99.patch and libvisual-c99.patch). + +------------------------------------------------------------------- +Fri Mar 1 10:22:19 UTC 2024 - pgajdos@suse.com + +- Use %patch -P N instead of deprecated %patchN. + ------------------------------------------------------------------- Mon Nov 6 08:58:49 UTC 2023 - Dominique Leuenberger diff --git a/libvisual.spec b/libvisual.spec index 6647a98..a7fad45 100644 --- a/libvisual.spec +++ b/libvisual.spec @@ -1,7 +1,7 @@ # # spec file for package libvisual # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,6 +35,8 @@ Patch2: libvisual.visual_cpu_get_altivec.patch Patch3: %name-%{version}-unref-static.diff Patch4: libvisual-0.4.0-2.1-nmu.diff Patch5: libvisual-0.4.0-inlinedefineconflict.patch +Patch6: libvisual-configure-c99.patch +Patch7: libvisual-c99.patch BuildRequires: freeglut-devel BuildRequires: gcc-c++ BuildRequires: libdrm-devel @@ -71,12 +73,16 @@ This library is used by amaroK for example. %prep %setup -q -%patch0 -%patch1 -%patch2 -p1 -%patch3 -%patch4 -p1 -%patch5 -p1 +%patch -P 0 +%patch -P 1 +%patch -P 2 -p1 +%patch -P 3 +%patch -P 4 -p1 +%patch -P 5 -p1 +%patch -P 6 -p1 +%patch -P 7 -p1 +# Prevent re-building the autotools scripts. +touch -r aclocal.m4 configure* %build autoreconf -fiv