From 3c7c6ec03b1b53c19f4ad390a5f02acaa3d8f57c Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 3 Dec 2013 15:25:47 -0500 Subject: [PATCH] update to 0.5.0 --- .gitignore | 1 + ...isual-0.5.0-better-altivec-detection.patch | 70 +++++++++++++++++++ libvisual.spec | 62 ++++++++-------- sources | 2 +- 4 files changed, 101 insertions(+), 34 deletions(-) create mode 100644 libvisual-0.5.0-better-altivec-detection.patch diff --git a/.gitignore b/.gitignore index 86db05a..d5182a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ libvisual-0.4.0.tar.gz +/libvisual-0.5.0-7e4bc9a.tar.gz diff --git a/libvisual-0.5.0-better-altivec-detection.patch b/libvisual-0.5.0-better-altivec-detection.patch new file mode 100644 index 0000000..f7da60a --- /dev/null +++ b/libvisual-0.5.0-better-altivec-detection.patch @@ -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 ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#else /* VISUAL_ARCH_POWERPC */ + #include + #endif ++#endif + + #if defined(VISUAL_OS_WIN32) + #include +@@ -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 */ diff --git a/libvisual.spec b/libvisual.spec index 18d5ad1..30cacab 100644 --- a/libvisual.spec +++ b/libvisual.spec @@ -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 - 0.5.0-0.1.git7e4bc9a +- Update to 0.5.0 (git) + * Sat Aug 03 2013 Fedora Release Engineering - 0.4.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 9d800c7..db5e858 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4e78547c79ea8a8ad111cf8b85011bb libvisual-0.4.0.tar.gz +8e1829eb40b0e1d18db4bb4de5a4a0e8 libvisual-0.5.0-7e4bc9a.tar.gz