[arch-commits] Commit in lensfun/trunk (2 files)

Tobias Powalowski tpowa at archlinux.org
Wed Aug 17 07:00:23 UTC 2011


    Date: Wednesday, August 17, 2011 @ 03:00:23
  Author: tpowa
Revision: 135661

upgpkg: lensfun 0.2.5-2

	fix segfault

Added:
  lensfun/trunk/runtime.cpu.detection.fix.backport.patch
Modified:
  lensfun/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |   25 +++++++---
 runtime.cpu.detection.fix.backport.patch |   68 +++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-08-17 06:53:34 UTC (rev 135660)
+++ PKGBUILD	2011-08-17 07:00:23 UTC (rev 135661)
@@ -3,19 +3,30 @@
 
 pkgname=lensfun
 pkgver=0.2.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Database of photographic lenses and a library that allows advanced access to the database"
 arch=(i686 x86_64)
 url="http://lensfun.berlios.de/"
 license=('LGPL3')
 depends=('glibc' 'glib2')
-makedepends=('python' 'libpng')
-source=(http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2) 
+makedepends=('python' 'libpng' 'doxygen')
+source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+        "runtime.cpu.detection.fix.backport.patch")
 
 build() {
     cd "${srcdir}/${pkgname}-${pkgver}"
-    ./configure --prefix=/usr --libdir=/usr/lib || return 1
-    make all || return 1
-    make INSTALL_PREFIX="$pkgdir" install || return 1
+    sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' configure
+    patch -p0 -i "${srcdir}/runtime.cpu.detection.fix.backport.patch"
+    ./configure \
+        --prefix=/usr \
+        --libdir=/usr/lib
+    make all
 }
-md5sums=('a10438dffae68a5988fc54b0393a3755')
+
+package() {
+    cd "${srcdir}/${pkgname}-${pkgver}"
+    make INSTALL_PREFIX="$pkgdir" install
+}
+
+md5sums=('a10438dffae68a5988fc54b0393a3755'
+         'a2033928f263db319de78182ab12fb7d')

Added: runtime.cpu.detection.fix.backport.patch
===================================================================
--- runtime.cpu.detection.fix.backport.patch	                        (rev 0)
+++ runtime.cpu.detection.fix.backport.patch	2011-08-17 07:00:23 UTC (rev 135661)
@@ -0,0 +1,68 @@
+--- libs/lensfun/cpuid.cpp.bak	2011-07-07 00:13:34.227910367 -0400
++++ libs/lensfun/cpuid.cpp	2011-07-07 03:27:39.676452438 -0400
+@@ -25,17 +25,14 @@
+ guint _lf_detect_cpu_features ()
+ {
+ #define cpuid(cmd) \
+-    asm ( \
++    __asm volatile ( \
+         "push %%"R_BX"\n" \
+         "cpuid\n" \
+         "pop %%"R_BX"\n" \
+        : "=a" (ax), "=c" (cx),  "=d" (dx) \
+        : "0" (cmd))
+ 
+-    register __SIZE_TYPE__ ax asm (R_AX);
+-    register __SIZE_TYPE__ bx asm (R_BX);
+-    register __SIZE_TYPE__ dx asm (R_DX);
+-    register __SIZE_TYPE__ cx asm (R_CX);
++    __SIZE_TYPE__ ax, cx, dx, tmp;
+     static GStaticMutex lock = G_STATIC_MUTEX_INIT;
+     static guint cpuflags = -1;
+ 
+@@ -45,7 +42,7 @@
+         cpuflags = 0;
+ 
+         /* Test cpuid presence by checking bit 21 of eflags */
+-        asm (
++        __asm volatile (
+             "pushf\n"
+             "pop     %0\n"
+             "mov     %0, %1\n"
+@@ -57,7 +54,7 @@
+             "cmp     %0, %1\n"
+             "setne   %%al\n"
+             "movzb   %%al, %0\n"
+-            : "=r" (ax), "=r" (bx));
++            : "=r" (ax), "=r" (tmp));
+ 
+         if (ax)
+         {
+@@ -88,12 +85,12 @@
+                     cpuflags |= LF_CPU_FLAG_SSE4_2;
+             }
+ 
+-            /* Is there extensions */
++            /* Are there extensions? */
+             cpuid (0x80000000);
+ 
+             if (ax)
+             {
+-                /* Request for extensions */
++                /* Ask extensions */
+                 cpuid (0x80000001);
+ 
+                 if (dx & 0x80000000)
+@@ -112,12 +109,4 @@
+ #undef cpuid
+ }
+ 
+-#else
+-
+-guint
+-rs_detect_cpu_features()
+-{
+-    return 0;
+-}
+-
+ #endif /* __i386__ || __x86_64__ */




More information about the arch-commits mailing list