From bffc0663c97e80f05823ad94d25650731b34c2ea Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 13 Jul 2023 23:42:22 +0000 Subject: [PATCH] extra/lensfun to 0.3.4-2 --- extra/lensfun/PKGBUILD | 10 +++-- extra/lensfun/lensfun-segfault.patch | 63 ---------------------------- 2 files changed, 7 insertions(+), 66 deletions(-) delete mode 100644 extra/lensfun/lensfun-segfault.patch diff --git a/extra/lensfun/PKGBUILD b/extra/lensfun/PKGBUILD index fe8d882cb..5cd4db839 100644 --- a/extra/lensfun/PKGBUILD +++ b/extra/lensfun/PKGBUILD @@ -5,14 +5,14 @@ pkgname=lensfun pkgver=0.3.4 -pkgrel=1 +pkgrel=2 epoch=1 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-setuptools libpng doxygen cmake) +makedepends=(python-setuptools python-build python-installer python-wheel libpng doxygen cmake) optdepends=('python: for lensfun-update-data and lensfun-add-adapter') source=(https://github.com/lensfun/lensfun/archive/v$pkgver/$pkgname-$pkgver.tar.gz) sha256sums=('dafb39c08ef24a0e2abd00d05d7341b1bf1f0c38bfcd5a4c69cf5f0ecb6db112') @@ -23,9 +23,13 @@ build() { -DCMAKE_CXX_FLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" \ -DBUILD_FOR_SSE=off \ -DBUILD_FOR_SSE2=off - cmake --build build + cmake --build build + cd build/apps + python -m build --wheel --no-isolation } package() { DESTDIR="$pkgdir" cmake --install build + cd build/apps + python -m installer --destdir="$pkgdir" dist/*.whl } diff --git a/extra/lensfun/lensfun-segfault.patch b/extra/lensfun/lensfun-segfault.patch deleted file mode 100644 index df47f9aa4..000000000 --- a/extra/lensfun/lensfun-segfault.patch +++ /dev/null @@ -1,63 +0,0 @@ -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; - } -