[arch-commits] Commit in lensfun/repos/extra-x86_64 (3 files)

Antonio Rojas arojas at archlinux.org
Sat May 16 10:21:18 UTC 2020


    Date: Saturday, May 16, 2020 @ 10:21:17
  Author: arojas
Revision: 384088

archrelease: copy trunk to extra-x86_64

Added:
  lensfun/repos/extra-x86_64/PKGBUILD
    (from rev 384087, lensfun/trunk/PKGBUILD)
  lensfun/repos/extra-x86_64/lensfun-segfault.patch
    (from rev 384087, lensfun/trunk/lensfun-segfault.patch)
Deleted:
  lensfun/repos/extra-x86_64/PKGBUILD

------------------------+
 PKGBUILD               |   61 +++++++++++++++++++++++++--------------------
 lensfun-segfault.patch |   63 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 27 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-16 10:21:07 UTC (rev 384087)
+++ PKGBUILD	2020-05-16 10:21:17 UTC (rev 384088)
@@ -1,27 +0,0 @@
-# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-
-pkgname=lensfun
-pkgver=0.3.95
-pkgrel=1
-pkgdesc="Database of photographic lenses and a library that allows advanced access to the database"
-arch=(x86_64)
-url="https://lensfun.sourceforge.net"
-license=('LGPL3')
-depends=('glib2')
-makedepends=('python' 'libpng' 'doxygen' 'cmake')
-optdepends=('python: for lensfun-update-data and lensfun-add-adapter')
-source=("https://sourceforge.net/projects/lensfun/files/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('82c29c833c1604c48ca3ab8a35e86b7189b8effac1b1476095c0529afb702808')
-
-build() {
-    cd $pkgname-$pkgver
-    cmake . \
-      -DCMAKE_INSTALL_PREFIX=/usr \
-      -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fno-delete-null-pointer-checks"
-    make all
-}
-
-package() {
-    cd $pkgname-$pkgver
-    make DESTDIR="$pkgdir" install
-}

Copied: lensfun/repos/extra-x86_64/PKGBUILD (from rev 384087, lensfun/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-05-16 10:21:17 UTC (rev 384088)
@@ -0,0 +1,34 @@
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=lensfun
+pkgver=0.3.95
+pkgrel=2
+pkgdesc="Database of photographic lenses and a library that allows advanced access to the database"
+arch=(x86_64)
+url="https://lensfun.github.io/"
+license=('LGPL3')
+depends=('glib2')
+makedepends=('python' 'libpng' 'doxygen' 'cmake')
+optdepends=('python: for lensfun-update-data and lensfun-add-adapter')
+source=("https://sourceforge.net/projects/lensfun/files/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+         lensfun-segfault.patch)
+sha256sums=('82c29c833c1604c48ca3ab8a35e86b7189b8effac1b1476095c0529afb702808'
+            '090804382c134b813693770383d21289a74f2b7e221127f2634abf3d24b003da')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i ../lensfun-segfault.patch # Fix null pointer dereference # https://github.com/lensfun/lensfun/issues/1132
+}
+
+build() {
+    cd $pkgname-$pkgver
+    cmake . \
+      -DCMAKE_INSTALL_PREFIX=/usr \
+      -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fno-delete-null-pointer-checks"
+    make all
+}
+
+package() {
+    cd $pkgname-$pkgver
+    make DESTDIR="$pkgdir" install
+}

Copied: lensfun/repos/extra-x86_64/lensfun-segfault.patch (from rev 384087, lensfun/trunk/lensfun-segfault.patch)
===================================================================
--- lensfun-segfault.patch	                        (rev 0)
+++ lensfun-segfault.patch	2020-05-16 10:21:17 UTC (rev 384088)
@@ -0,0 +1,63 @@
+diff --git a/libs/lensfun/lens.cpp b/libs/lensfun/lens.cpp
+index 52b76658..b8430609 100644
+--- a/libs/lensfun/lens.cpp
++++ b/libs/lensfun/lens.cpp
+@@ -66,9 +66,10 @@ lfLens::lfLens (const lfLens &other)
+     Mounts = NULL;
+     MountNames.clear();
+     const char* const* otherMounts = other.GetMountNames();
+-    for (int i = 0; otherMounts[i]; i++)
+-        AddMount(otherMounts[i]);
+-
++    if (otherMounts) {
++        for (int i = 0; otherMounts[i]; i++)
++            AddMount(otherMounts[i]);
++    }
+     for (auto *calibset : other.Calibrations)
+         Calibrations.push_back(new lfLensCalibrationSet(*calibset));
+ 
+@@ -96,9 +97,10 @@ lfLens &lfLens::operator = (const lfLens &other)
+     Mounts = NULL;
+     MountNames.clear();
+     const char* const* otherMounts = other.GetMountNames();
+-    for (int i = 0; otherMounts[i]; i++)
+-        AddMount(otherMounts[i]);
+-
++    if (otherMounts) {
++        for (int i = 0; otherMounts[i]; i++)
++            AddMount(otherMounts[i]);
++    }
+     for (auto *calibset : Calibrations)
+         delete calibset;
+     Calibrations.clear();
+diff --git a/libs/lensfun/mount.cpp b/libs/lensfun/mount.cpp
+index bd875baa..86f667cb 100644
+--- a/libs/lensfun/mount.cpp
++++ b/libs/lensfun/mount.cpp
+@@ -28,8 +28,10 @@ lfMount::lfMount (const lfMount &other)
+ 
+     MountCompat.clear();
+     const char* const* otherMounts = other.GetCompats();
+-    for (int i = 0; otherMounts[i]; i++)
+-        AddCompat(otherMounts[i]);
++    if (otherMounts) {
++        for (int i = 0; otherMounts[i]; i++)
++            AddCompat(otherMounts[i]);
++    }
+ }
+ 
+ lfMount &lfMount::operator = (const lfMount &other)
+@@ -40,9 +42,10 @@ lfMount &lfMount::operator = (const lfMount &other)
+ 
+     MountCompat.clear();
+     const char* const* otherMounts = other.GetCompats();
+-    for (int i = 0; otherMounts[i]; i++)
+-        AddCompat(otherMounts[i]);
+-
++    if (otherMounts) {
++        for (int i = 0; otherMounts[i]; i++)
++            AddCompat(otherMounts[i]);
++    }
+     return *this;
+ }
+ 



More information about the arch-commits mailing list