From aa2d73a2761dff76f383931b95c3369a154cb8d0 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sun, 11 Jan 2015 02:35:06 +0000
Subject: [PATCH] extra/lensfun to 0.3.0-1

---
 extra/lensfun/PKGBUILD                     | 33 ++++++++--------------
 extra/lensfun/lensfun-0.2.8-make-4.0.patch | 11 --------
 2 files changed, 12 insertions(+), 32 deletions(-)
 delete mode 100644 extra/lensfun/lensfun-0.2.8-make-4.0.patch

diff --git a/extra/lensfun/PKGBUILD b/extra/lensfun/PKGBUILD
index 1ff1b1075..2212dd7e9 100644
--- a/extra/lensfun/PKGBUILD
+++ b/extra/lensfun/PKGBUILD
@@ -1,40 +1,31 @@
-# $Id: PKGBUILD 162692 2012-06-28 10:33:24Z tpowa $
+# $Id$
 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
 
 # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
-#  - disable vectorization, ensure our cflags get used to build
+#  - disable sse, sse2
 
 pkgname=lensfun
-pkgver=0.2.8
+pkgver=0.3.0
 pkgrel=1
 pkgdesc="Database of photographic lenses and a library that allows advanced access to the database"
 arch=(i686 x86_64)
-url="http://lensfun.berlios.de/"
+url="http://lensfun.sourceforge.net"
 license=('LGPL3')
 depends=('glibc' 'glib2')
-makedepends=('python2' 'libpng' 'doxygen')
-source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
-         lensfun-0.2.8-make-4.0.patch)
-
-prepare() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-    sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' configure
-    # fix configure script for make 4.0
-    patch -Np0 -i "${srcdir}/lensfun-0.2.8-make-4.0.patch"
-}
+makedepends=('libpng' 'doxygen' 'cmake')
+source=("http://sourceforge.net/projects/lensfun/files/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('60e2bf3a6a2f495076db1d88778a00d358cf0b69')
 
 build() {
     cd "${srcdir}/${pkgname}-${pkgver}"
-   ./configure \
-        --prefix=/usr \
-        --libdir=/usr/lib \
-        --vectorization='' --cflags="${CFLAGS}" --cxxflags="${CXXFLAGS}"
+    cmake -DLENSFUN_INSTALL_PREFIX=/usr \
+      -DBUILD_FOR_SSE=off \
+      -DBUILD_FOR_SSE2=off\
+      .
     make all
 }
 
 package() {
     cd "${srcdir}/${pkgname}-${pkgver}"
-    make INSTALL_PREFIX="$pkgdir" install
+    make DESTDIR="$pkgdir" install
 }
-md5sums=('db2988505e7432c6b331aa597789c639'
-         '9464d933a5e4ccefed7fc38656a9ec18')
diff --git a/extra/lensfun/lensfun-0.2.8-make-4.0.patch b/extra/lensfun/lensfun-0.2.8-make-4.0.patch
deleted file mode 100644
index c7694457d..000000000
--- a/extra/lensfun/lensfun-0.2.8-make-4.0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.old	2013-12-06 16:55:09.098654166 +0100
-+++ configure	2013-12-06 16:55:20.298676545 +0100
-@@ -45,7 +45,7 @@
-     }
- 
- # Check for tools
--tibs.check_program ("GNU Make", "make --version", ".*?([0-9\.]+).*", "3.81", True)
-+tibs.check_program ("GNU Make", "make --version", ".*?([0-9\.]+).*", "4.0", True)
- if tibs.check_program ("makedep", "makedep -V", ".*Version.*?([0-9\.]+).*", "0.1.0"):
-     tibs.add_config_mak ("MAKEDEP", "makedep")
-     makedep = "yes"