update to 0.5.0

This commit is contained in:
Tom Callaway 2013-12-03 15:25:47 -05:00
parent 9681500308
commit 3c7c6ec03b
4 changed files with 101 additions and 34 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
libvisual-0.4.0.tar.gz
/libvisual-0.5.0-7e4bc9a.tar.gz

View File

@ -0,0 +1,70 @@
diff -up libvisual/libvisual/lv_cpu.c.altivec-detection libvisual/libvisual/lv_cpu.c
--- libvisual/libvisual/lv_cpu.c.altivec-detection 2013-08-23 09:34:16.000000000 -0400
+++ libvisual/libvisual/lv_cpu.c 2013-12-03 14:50:24.922718258 -0500
@@ -59,8 +59,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>
@@ -170,6 +181,46 @@ static void check_os_altivec_support (vo
if (err == 0)
if (has_vu != 0)
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)
+ 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,20 +1,21 @@
%define smallversion 0.4
%define smallversion 0.5
%global commit 7e4bc9ab9b54f94b399e193e5850276bfc2f55a5
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: libvisual
Version: 0.4.0
Release: 14%{?dist}
Version: 0.5.0
Release: 0.1.git%{shortcommit}%{?dist}
Summary: Abstraction library for audio visualisation plugins
Group: Applications/Multimedia
License: LGPLv2+
URL: http://libvisual.sf.net
Source0: http://dl.sf.net/libvisual/libvisual-0.4.0.tar.gz
URL: http://github.com/Libvisual/libvisual
Source0: https://github.com/Libvisual/libvisual/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: xorg-x11-proto-devel
BuildRequires: xorg-x11-proto-devel, orc-devel, cmake
# https://bugzilla.redhat.com/show_bug.cgi?id=435771
Patch0: libvisual-0.4.0-better-altivec-detection.patch
Patch1: libvisual-0.4.0-inlinedefineconflict.patch
Patch0: libvisual-0.5.0-better-altivec-detection.patch
%description
@ -33,7 +34,7 @@ anywhere he wants.
%package devel
Summary: Development files for libvisual
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Libvisual is an abstraction library that comes between applications and
@ -42,50 +43,45 @@ audio visualisation plugins.
This package contains the files needed to build an application with libvisual.
%prep
%setup -q
%setup -qn %{name}-%{commit}
pushd libvisual
%patch0 -p1 -b .altivec-detection
%patch1 -p1 -b .inlinedefineconflict
popd
%build
%ifarch i386
export CFLAGS="${RPM_OPT_FLAGS} -mmmx"
%endif
%configure
make %{?_smp_mflags}
pushd libvisual
%cmake -DOPT_C_FLAGS="%{optflags}"
make %{?_smp_mflags}
# CXX_FLAGS+="%{optflags}"
popd
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
%find_lang %{name}-%{smallversion}
%clean
rm -rf $RPM_BUILD_ROOT
pushd libvisual
make install DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}-%{smallversion}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%files
%doc libvisual/AUTHORS libvisual/COPYING libvisual/ChangeLog libvisual/NEWS libvisual/README libvisual/TODO
%{_bindir}/lv-tool
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%doc README NEWS TODO AUTHORS
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}-%{smallversion}
%changelog
* Tue Dec 03 2013 Tom Callaway <spot@fedoraproject.org> - 0.5.0-0.1.git7e4bc9a
- Update to 0.5.0 (git)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

View File

@ -1 +1 @@
f4e78547c79ea8a8ad111cf8b85011bb libvisual-0.4.0.tar.gz
8e1829eb40b0e1d18db4bb4de5a4a0e8 libvisual-0.5.0-7e4bc9a.tar.gz