extra/lensfun to 0.3.4-2

This commit is contained in:
Kevin Mihelich 2023-07-13 23:42:22 +00:00
parent 26c6054e5f
commit bffc0663c9
2 changed files with 7 additions and 66 deletions

View file

@ -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
}

View file

@ -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;
}