diff --git a/multimedia/graphics/lensfun/files/lensfun-segfault.patch b/multimedia/graphics/lensfun/files/lensfun-segfault.patch new file mode 100644 index 0000000000..df47f9aa4d --- /dev/null +++ b/multimedia/graphics/lensfun/files/lensfun-segfault.patch @@ -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; + } + diff --git a/multimedia/graphics/lensfun/pspec.xml b/multimedia/graphics/lensfun/pspec.xml index 95bb37988e..5d11ba6240 100644 --- a/multimedia/graphics/lensfun/pspec.xml +++ b/multimedia/graphics/lensfun/pspec.xml @@ -14,10 +14,11 @@ library A programming library for rectifying and simulating photographic lens distortions lensfun provides an open source database of photographic lenses and their characteristics. The library provides also the necessary set of algorithms for correcting images based on detailed knowledge of lens properties and calibration data. - https://sourceforge.net/projects/lensfun/files/0.3.2/lensfun-0.3.2.tar.gz + https://sourceforge.net/projects/lensfun/files/0.3.95/lensfun-0.3.95.tar.gz - upstream_Patch-47-respect-DESTDIR-when-installing-python-stuf.patch - upstream_Use-database-in-source-directory-while-running-tests.patch + + + lensfun-segfault.patch doxygen @@ -53,6 +54,13 @@ + + 2021-05-12 + 0.3.95 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2020-01-18 0.3.2