Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
e33de77a76
!25 [sync] PR-19: Add patch to respect environment LDFLAGS
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-08-15 04:06:39 +00:00
Funda Wang
b0c3f25fe4 Add patch to respect environment LDFLAGS
(cherry picked from commit 8d8e520c41bd238f6d0eceb42ed8f60cfeb317b2)
2024-08-05 09:01:55 +08:00
openeuler-ci-bot
3d5c2f7f59
!23 [sync] PR-18: fix build failure due to automake upgrade
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-08-05 01:00:40 +00:00
wangxiao65
43c382f463 fix build failure due to automake upgrade
(cherry picked from commit e140c87460ab10a750f6afe5d35e602918f29805)
2024-08-05 09:00:11 +08:00
openeuler-ci-bot
9a37a5ea68
!21 [sync] PR-17: add libvisual-0.4.2 sw64 arch patch
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-08-05 00:59:54 +00:00
wangshuo
168d934d72 add libvisual-0.4.2 sw64 arch patch
(cherry picked from commit b8b78d61e3b28e9500abac9670baa4ad4a1ed8d7)
2024-08-05 08:59:29 +08:00
openeuler-ci-bot
f556060494
!16 upgrade to 0.4.2
From: @zhangnaichuan 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-02-07 07:06:10 +00:00
zhangnaichuan
272b2d9df2 upgrade to 0.4.2
Signed-off-by: zhangnaichuan <zhangnaichuan@huawei.com>
2024-02-07 14:44:09 +08:00
openeuler-ci-bot
ed0ca25562
!11 版本升级至 0.4.1
From: @licihua 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-12-29 08:15:09 +00:00
licihua
377dc2be89 upgrade to 0.4.1 2022-12-29 11:49:26 +08:00
10 changed files with 206 additions and 226 deletions

View File

@ -1,69 +0,0 @@
--- libvisual-0.4.0/libvisual/lv_cpu.c.orig 2006-01-22 13:23:37.000000000 +0000
+++ libvisual-0.4.0/libvisual/lv_cpu.c 2008-03-11 16:00:56.000000000 +0000
@@ -50,8 +50,19 @@
#endif
#if defined(VISUAL_OS_LINUX)
+#if defined(VISUAL_ARCH_POWERPC)
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <linux/auxvec.h>
+#include <asm/cputable.h>
+#else /* VISUAL_ARCH_POWERPC */
#include <signal.h>
#endif
+#endif
#if defined(VISUAL_OS_WIN32)
#include <windows.h>
@@ -154,6 +165,46 @@ static void check_os_altivec_support( vo
if (err == 0)
if (has_vu != 0)
__lv_cpu_caps.hasAltiVec = 1;
+#elif defined (VISUAL_OS_LINUX)
+ static int available = -1;
+ int new_avail = 0;
+ char fname[64];
+ unsigned long buf[64];
+ ssize_t count;
+ pid_t pid;
+ int fd, i;
+
+ if (available != -1)
+ return;
+
+ pid = getpid();
+ snprintf(fname, sizeof(fname)-1, "/proc/%d/auxv", pid);
+
+ fd = open(fname, O_RDONLY);
+ if (fd < 0)
+ goto out;
+more:
+ count = read(fd, buf, sizeof(buf));
+ if (count < 0)
+ goto out_close;
+
+ for (i=0; i < (count / sizeof(unsigned long)); i += 2) {
+ if (buf[i] == AT_HWCAP) {
+ new_avail = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC);
+ goto out_close;
+ } else if (buf[i] == AT_NULL) {
+ goto out_close;
+ }
+ }
+
+ if (count == sizeof(buf))
+ goto more;
+out_close:
+ close(fd);
+out:
+ available = new_avail;
+ if (available)
+ __lv_cpu_caps.hasAltiVec = 1;
#else /* !VISUAL_OS_DARWIN */
/* no Darwin, do it the brute-force way */
/* this is borrowed from the libmpeg2 library */

View File

@ -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));
}
}

View File

@ -1,6 +1,18 @@
diff -ru libvisual-0.4.0.orig/libvisual/lv_cache.c libvisual-0.4.0/libvisual/lv_cache.c
--- libvisual-0.4.0.orig/libvisual/lv_cache.c 2009-03-07 17:17:38.000000000 +0000
+++ libvisual-0.4.0/libvisual/lv_cache.c 2009-03-07 17:25:26.000000000 +0000
From 54107a5d81ffaba6111fea2c98618109b6ddcde4 Mon Sep 17 00:00:00 2001
From: licihua <licihua@huawei.com>
Date: Thu, 29 Dec 2022 11:30:17 +0800
Subject: [PATCH 2/3] libvisual-0.4.0-inlinedefineconflict
---
libvisual/lv_cache.c | 4 ++--
libvisual/lv_defines.h | 2 ++
libvisual/lv_time.h | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libvisual/lv_cache.c b/libvisual/lv_cache.c
index f905d22..3f975aa 100644
--- a/libvisual/lv_cache.c
+++ b/libvisual/lv_cache.c
@@ -32,7 +32,7 @@
static int cache_dtor (VisObject *object);
static int cache_remove_list_entry (VisCache *cache, VisListEntry **le);
@ -10,7 +22,7 @@ diff -ru libvisual-0.4.0.orig/libvisual/lv_cache.c libvisual-0.4.0/libvisual/lv_
static int cache_dtor (VisObject *object)
{
@@ -74,7 +74,7 @@
@@ -74,7 +74,7 @@ static int cache_remove_list_entry (VisCache *cache, VisListEntry **le)
}
@ -19,29 +31,30 @@ diff -ru libvisual-0.4.0.orig/libvisual/lv_cache.c libvisual-0.4.0/libvisual/lv_
{
VisCacheEntry *centry;
diff -ru libvisual-0.4.0.orig/libvisual/lv_defines.h libvisual-0.4.0/libvisual/lv_defines.h
--- libvisual-0.4.0.orig/libvisual/lv_defines.h 2009-03-07 17:17:38.000000000 +0000
+++ libvisual-0.4.0/libvisual/lv_defines.h 2009-03-07 17:24:17.000000000 +0000
@@ -63,13 +63,13 @@
diff --git a/libvisual/lv_defines.h b/libvisual/lv_defines.h
index 0de91b6..2961d39 100644
--- a/libvisual/lv_defines.h
+++ b/libvisual/lv_defines.h
@@ -63,12 +63,14 @@
/* Compiler specific optimalization macros */
#if __GNUC__ >= 3
-# define inline inline __attribute__ ((always_inline))
+# define lv_inline inline __attribute__ ((always_inline))
# define __malloc __attribute__ ((malloc))
# define __packed __attribute__ ((packed))
# define VIS_LIKELY(x) __builtin_expect (!!(x), 1)
# define VIS_UNLIKELY(x) __builtin_expect (!!(x), 0)
#else
-# define inline /* no inline */
+# define lv_inline /* no inline */
# define inline /* no inline */
+# define lv_inline /* no lv_inline */
# define __malloc /* no malloc */
# define __packed /* no packed */
# define VIS_LIKELY(x) (x)
diff -ru libvisual-0.4.0.orig/libvisual/lv_time.h libvisual-0.4.0/libvisual/lv_time.h
--- libvisual-0.4.0.orig/libvisual/lv_time.h 2009-03-07 17:17:38.000000000 +0000
+++ libvisual-0.4.0/libvisual/lv_time.h 2009-03-07 17:25:15.000000000 +0000
@@ -101,7 +101,7 @@
diff --git a/libvisual/lv_time.h b/libvisual/lv_time.h
index 885448a..665af4a 100644
--- a/libvisual/lv_time.h
+++ b/libvisual/lv_time.h
@@ -101,7 +101,7 @@ int visual_timer_has_passed_by_values (VisTimer *timer, long sec, long usec);
*
* @return Nothing.
*/
@ -50,7 +63,7 @@ diff -ru libvisual-0.4.0.orig/libvisual/lv_time.h libvisual-0.4.0/libvisual/lv_t
{
#if defined(VISUAL_ARCH_X86) || defined(VISUAL_ARCH_X86_64)
__asm __volatile
@@ -115,7 +115,7 @@
@@ -115,7 +115,7 @@ static inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
}
/* FIXME use uint64_t here, make sure type exists */
@ -59,3 +72,6 @@ diff -ru libvisual-0.4.0.orig/libvisual/lv_time.h libvisual-0.4.0/libvisual/lv_t
{
uint32_t lo, hi;
--
2.26.2

View File

@ -1,106 +0,0 @@
diff -Naur libvisual-0.4.0.org/aclocal.m4 libvisual-0.4.0.sw/aclocal.m4
--- libvisual-0.4.0.org/aclocal.m4 2022-03-11 06:16:49.382357080 +0000
+++ libvisual-0.4.0.sw/aclocal.m4 2022-03-11 06:19:02.902357080 +0000
@@ -9425,7 +9425,7 @@
[
# Guess based on the CPU.
case "$host_cpu" in
- alpha* | i[34567]86 | m68k | s390*)
+ sw_64* | alpha* | i[34567]86 | m68k | s390*)
gt_cv_int_divbyzero_sigfpe="guessing yes";;
*)
gt_cv_int_divbyzero_sigfpe="guessing no";;
diff -Naur libvisual-0.4.0.org/configure libvisual-0.4.0.sw/configure
--- libvisual-0.4.0.org/configure 2022-03-11 06:16:49.392357080 +0000
+++ libvisual-0.4.0.sw/configure 2022-03-11 06:20:36.342357080 +0000
@@ -2011,6 +2011,7 @@
lv_mips=no
lv_alpha=no
+lv_sw_64=no
lv_sparc=no
lv_ix86=no
lv_x86_64=no
@@ -2019,6 +2020,7 @@
case "$host_cpu" in
mips) lv_mips=yes;;
alpha) lv_alpha=yes;;
+ sw_64) lv_sw_64=yes;;
sparc) lv_sparc=yes;;
i*86) lv_ix86=yes;;
x86_64*) lv_x86_64=yes;;
@@ -27200,6 +27202,7 @@
lv_mips=$lv_mips
lv_alpha=$lv_alpha
+ lv_sw_64=$lv_sw_64
lv_sparc=$lv_sparc
lv_ix86=$lv_ix86
lv_powerpc=$lv_powerpc
@@ -28309,6 +28312,13 @@
_______EOF
fi
+ if test x$lv_sw_64 = xyes ; then
+ cat >>$outfile <<_______EOF
+
+#define VISUAL_ARCH_SW_64
+_______EOF
+ fi
+
if test x$lv_alpha = xyes ; then
cat >>$outfile <<_______EOF
diff -Naur libvisual-0.4.0.org/configure.ac libvisual-0.4.0.sw/configure.ac
--- libvisual-0.4.0.org/configure.ac 2022-03-11 06:16:49.382357080 +0000
+++ libvisual-0.4.0.sw/configure.ac 2022-03-11 06:21:41.452357080 +0000
@@ -26,6 +26,7 @@
lv_mips=no
lv_alpha=no
+lv_sw_64=no
lv_sparc=no
lv_ix86=no
lv_x86_64=no
@@ -34,6 +35,7 @@
case "$host_cpu" in
mips) lv_mips=yes;;
alpha) lv_alpha=yes;;
+ sw_64) lv_sw_64=yes;;
sparc) lv_sparc=yes;;
i*86) lv_ix86=yes;;
x86_64*) lv_x86_64=yes;;
@@ -562,6 +564,13 @@
_______EOF
fi
+ if test x$lv_sw_64 = xyes ; then
+ cat >>$outfile <<_______EOF
+
+#define VISUAL_ARCH_SW_64
+_______EOF
+ fi
+
if test x$lv_alpha = xyes ; then
cat >>$outfile <<_______EOF
@@ -778,6 +787,7 @@
lv_mips=$lv_mips
lv_alpha=$lv_alpha
+ lv_sw_64=$lv_sw_64
lv_sparc=$lv_sparc
lv_ix86=$lv_ix86
lv_powerpc=$lv_powerpc
diff -Naur libvisual-0.4.0.org/m4/intdiv0.m4 libvisual-0.4.0.sw/m4/intdiv0.m4
--- libvisual-0.4.0.org/m4/intdiv0.m4 2022-03-11 06:16:49.382357080 +0000
+++ libvisual-0.4.0.sw/m4/intdiv0.m4 2022-03-11 06:18:20.462357080 +0000
@@ -56,7 +56,7 @@
[
# Guess based on the CPU.
case "$host_cpu" in
- alpha* | i[34567]86 | m68k | s390*)
+ sw_64* | alpha* | i[34567]86 | m68k | s390*)
gt_cv_int_divbyzero_sigfpe="guessing yes";;
*)
gt_cv_int_divbyzero_sigfpe="guessing no";;

Binary file not shown.

View File

@ -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 \

97
libvisual-0.4.2-sw.patch Normal file
View File

@ -0,0 +1,97 @@
From b9a5b83804e13d2d18d805642bb71a28b75b1058 Mon Sep 17 00:00:00 2001
From: wangshuo <wangshuo@kylinos.cn>
Date: Tue, 27 Feb 2024 08:22:48 +0000
Subject: [PATCH] libvisual-0.4.2-sw.patch
---
configure | 10 ++++++++++
configure.ac | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/configure b/configure
index 492545e..b35422b 100755
--- a/configure
+++ b/configure
@@ -3986,6 +3986,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
lv_mips=no
lv_alpha=no
+lv_sw_64=no
lv_sparc=no
lv_ix86=no
lv_x86_64=no
@@ -3994,6 +3995,7 @@ lv_powerpc=no
case "$host_cpu" in
mips) lv_mips=yes;;
alpha) lv_alpha=yes;;
+ sw_64) lv_sw_64=yes;;
sparc) lv_sparc=yes;;
i*86) lv_ix86=yes;;
x86_64*) lv_x86_64=yes;;
@@ -22944,6 +22946,7 @@ fi
lv_mips=$lv_mips
lv_alpha=$lv_alpha
+ lv_sw_64=$lv_sw_64
lv_sparc=$lv_sparc
lv_ix86=$lv_ix86
lv_x86_64=$lv_x86_64
@@ -24597,6 +24600,13 @@ _______EOF
_______EOF
fi
+ if test x$lv_sw_64 = xyes ; then
+ cat >>$outfile <<_______EOF
+
+#define VISUAL_ARCH_SW_64
+_______EOF
+ fi
+
if test x$lv_sparc = xyes ; then
cat >>$outfile <<_______EOF
diff --git a/configure.ac b/configure.ac
index 75fb9ea..16c85c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_CANONICAL_HOST
lv_mips=no
lv_alpha=no
+lv_sw_64=no
lv_sparc=no
lv_ix86=no
lv_x86_64=no
@@ -34,6 +35,7 @@ lv_powerpc=no
case "$host_cpu" in
mips) lv_mips=yes;;
alpha) lv_alpha=yes;;
+ sw_64) lv_sw_64=yes;;
sparc) lv_sparc=yes;;
i*86) lv_ix86=yes;;
x86_64*) lv_x86_64=yes;;
@@ -602,6 +604,13 @@ _______EOF
_______EOF
fi
+ if test x$lv_sw_64 = xyes ; then
+ cat >>$outfile <<_______EOF
+
+#define VISUAL_ARCH_SW_64
+_______EOF
+ fi
+
if test x$lv_sparc = xyes ; then
cat >>$outfile <<_______EOF
@@ -811,6 +820,7 @@ echo >>$outfile
lv_mips=$lv_mips
lv_alpha=$lv_alpha
+ lv_sw_64=$lv_sw_64
lv_sparc=$lv_sparc
lv_ix86=$lv_ix86
lv_x86_64=$lv_x86_64
--
2.27.0

BIN
libvisual-0.4.2.tar.gz Normal file

Binary file not shown.

33
libvisual-c99.patch Normal file
View File

@ -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:
<https://github.com/Libvisual/libvisual/pull/220>
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 <gettext.h>
#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);

View File

@ -1,19 +1,20 @@
Name: libvisual
Version: 0.4.0
Release: 29
Version: 0.4.2
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
Patch0: libvisual-0.4.0-better-altivec-detection.patch
Patch1: libvisual-0.4.0-inlinedefineconflict.patch
Patch2: libvisual-0.4.0-format-security.patch
Patch3: libvisual-0.4.0-sw.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
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
@ -25,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
@ -38,32 +38,47 @@ libraries.
%autosetup -n %{name}-%{version} -p1
%build
%configure
make %{?_smp_mflags}
# doc file
#doxygen
#automake upgrade to 1.17 and autoconf upgrade to 2.72, but libvisual configure etc files also 1.16.5, so autoreconf
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*
%{_mandir}/man1/lv-tool*
%files devel
%{_includedir}/%{name}-0.4
%{_libdir}/libvisual*.so
%exclude %{_libdir}/libvisual*.*a
%{_libdir}/pkgconfig/*.pc
%changelog
* Fri Dec 2022 zhangzhixin <zhixin.zhang@i-soft.com.cn> - 1:0.4.0-29
* Mon Aug 05 2024 Funda Wang <fundawang@yeah.net> - 1:0.4.2-4
- Add patch to respect environment LDFLAGS
- C99 compatibility fixes
* Mon Jul 22 2024 wangxiao <wangxiao184@h-partners.com> - 1:0.4.2-3
- fix build failure due to automake upgrade
* Tue Feb 27 2024 wangshuo <wangshuo@kylinos.cn> - 1:0.4.2-2
- add libvisual-0.4.2 sw64 arch patch
* Tue Feb 6 2024 zhangnaichuan <zhangnaichuan@huawei.com> - 1:0.4.2-1
- upgrade to 0.4.2
* Thu Dec 29 2022 licihua <licihua@huawei.com> - 1:0.4.1-1
- upgrade to 0.4.1
* Fri Dec 16 2022 zhangzhixin <zhixin.zhang@i-soft.com.cn> - 1:0.4.0-29
- Add sw64 arch patch
* Fri Oct 28 2022 chenhaixiang <chenhaixiang3@huawei.com> - 1:0.4.0-28