Add lensfun package version 0.3.2 (#4111)

* lensfun: appease linter
* lensfun: use https instead of http
* lensfun: drop fedora specific bits
* lensfun: license: add entry
* lensfun: drop obsoletes tag

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
Muhammad Falak R Wani 2022-12-19 16:44:31 +05:30 коммит произвёл GitHub
Родитель 20413feb1b
Коммит 30d61cd6c3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 919 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,38 @@
From 75a845abfe4823837e3f07274911dc275150f5a4 Mon Sep 17 00:00:00 2001
From: seebk <mail@sebastiankraft.net>
Date: Sat, 21 Nov 2015 09:48:41 +0000
Subject: [PATCH 001/113] Only require glib 2.40 when tests are build, without
tests glib 2.26 is sufficient
---
CMakeLists.txt | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ceac8fc..21f082b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,10 +85,16 @@ IF(WIN32)
ENDIF()
ENDIF()
-# find dependencies
-# NOTE: must be one of the macros listed in https://developer.gnome.org/glib/stable/glib-Version-Information.html
-SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_40")
-FIND_PACKAGE(GLIB2 REQUIRED 2.40)
+
+IF (BUILD_TESTS)
+ # automatic tests need at least glib version 2.40
+ # NOTE: must be one of the macros listed in https://developer.gnome.org/glib/stable/glib-Version-Information.html
+ SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_40")
+ FIND_PACKAGE(GLIB2 REQUIRED)
+ELSE()
+ SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_26")
+ FIND_PACKAGE(GLIB2 REQUIRED)
+ENDIF()
INCLUDE_DIRECTORIES(SYSTEM ${GLIB2_INCLUDE_DIRS})
--
2.7.4

Просмотреть файл

@ -0,0 +1,263 @@
From d2c6003ca5b0116fc18505b4fd34b211484e41ca Mon Sep 17 00:00:00 2001
From: Sebastian Kraft <mail@sebastiankraft.net>
Date: Sat, 19 Dec 2015 20:08:24 +0100
Subject: [PATCH 038/113] Only use proper C++ new and delete syntax for object
creation in tests and lenstool
---
apps/lenstool/lenstool.cpp | 16 ++++++++--------
tests/test_database.cpp | 4 ++--
tests/test_modifier.cpp | 8 +++++---
tests/test_modifier_color.cpp | 4 ++--
tests/test_modifier_coord_distortion.cpp | 4 ++--
tests/test_modifier_coord_geometry.cpp | 4 ++--
tests/test_modifier_coord_scale.cpp | 4 ++--
tests/test_modifier_subpix.cpp | 4 ++--
8 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/apps/lenstool/lenstool.cpp b/apps/lenstool/lenstool.cpp
index 0aab056..399195e 100644
--- a/apps/lenstool/lenstool.cpp
+++ b/apps/lenstool/lenstool.cpp
@@ -360,7 +360,7 @@ int main (int argc, char **argv)
lfDatabase *ldb = new lfDatabase ();
if (ldb->Load () != LF_NO_ERROR) {
- ldb->Destroy();
+ delete ldb;
g_print ("\rERROR: Database could not be loaded\n");
return -1;
}
@@ -410,7 +410,7 @@ int main (int argc, char **argv)
// nothing to process, so lets quit here
if (!opts.Input) {
- ldb->Destroy();
+ delete ldb;
return 0;
}
@@ -441,22 +441,22 @@ int main (int argc, char **argv)
if (!img->Open (opts.Input)) {
g_print ("\rERROR: failed to open file `%s'\n", opts.Input);
delete img;
- ldb->Destroy();
+ delete ldb;
return -1;
}
if (!img->LoadPNG ()) {
g_print ("\rERROR: failed to parse PNG data from file `%s'\n", opts.Input);
delete img;
- ldb->Destroy();
+ delete ldb;
return -1;
}
g_print ("done.\n~ Image size [%ux%u].\n", img->width, img->height);
- lfModifier *mod = lfModifier::Create (lens, opts.Crop, img->width, img->height);
+ lfModifier *mod = new lfModifier (lens, opts.Crop, img->width, img->height);
if (!mod) {
g_print ("\rWarning: failed to create modifier\n");
delete img;
- ldb->Destroy();
+ delete ldb;
return -1;
}
int modflags = mod->Initialize (
@@ -491,13 +491,13 @@ int main (int argc, char **argv)
clock_t et = clock ();
g_print ("done (%.3g secs)\n", double (et - st) / CLOCKS_PER_SEC);
- mod->Destroy ();
+ delete mod;
g_print ("~ Save output as `%s'...", opts.Output);
bool ok = img->SavePNG (opts.Output);
delete img;
- ldb->Destroy ();
+ delete ldb;
if (ok) {
g_print (" done\n");
diff --git a/tests/test_database.cpp b/tests/test_database.cpp
index d64984a..45dc38f 100644
--- a/tests/test_database.cpp
+++ b/tests/test_database.cpp
@@ -9,14 +9,14 @@ typedef struct {
void db_setup(lfFixture *lfFix, gconstpointer data)
{
- lfFix->db = lf_db_new ();
+ lfFix->db = new lfDatabase ();
lfFix->db->Load();
}
void db_teardown(lfFixture *lfFix, gconstpointer data)
{
- lfFix->db->Destroy();
+ delete lfFix->db;
}
diff --git a/tests/test_modifier.cpp b/tests/test_modifier.cpp
index 3d091a4..f794638 100644
--- a/tests/test_modifier.cpp
+++ b/tests/test_modifier.cpp
@@ -31,7 +31,6 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
void mod_teardown(lfFixture *lfFix, gconstpointer data)
{
- lfFix->mod->Destroy();
delete lfFix->lens;
}
@@ -55,7 +54,7 @@ void test_mod_projection_center(lfFixture* lfFix, gconstpointer data)
if(g_test_verbose())
g_print(" ~ Conversion from %s -> %s \n", geom_names[j], geom_names[i]);
- lfFix->mod = lfModifier::Create (lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier (lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize (
lfFix->lens, LF_PF_U8, 12.0f,
6.7f, 2.0f, 1.0f, geom_types[i],
@@ -68,6 +67,8 @@ void test_mod_projection_center(lfFixture* lfFix, gconstpointer data)
g_assert_cmpfloat(in[0],==,res[0]);
g_assert_cmpfloat(in[1],==,res[1]);
}
+
+ delete lfFix->mod;
i++;
}
j++;
@@ -94,7 +95,7 @@ void test_mod_projection_borders(lfFixture* lfFix, gconstpointer data)
if(g_test_verbose())
g_print(" ~ Conversion from %s -> %s \n", geom_names[j], geom_names[i]);
- lfFix->mod = lfModifier::Create (lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier (lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize (
lfFix->lens, LF_PF_U8, 12.0f,
6.7f, 2.0f, 1.0f, geom_types[i],
@@ -115,6 +116,7 @@ void test_mod_projection_borders(lfFixture* lfFix, gconstpointer data)
g_assert_false(isnan(res[1]));
}
+ delete lfFix->mod;
i++;
}
j++;
diff --git a/tests/test_modifier_color.cpp b/tests/test_modifier_color.cpp
index 4c5e2dc..6327232 100644
--- a/tests/test_modifier_color.cpp
+++ b/tests/test_modifier_color.cpp
@@ -107,7 +107,7 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
lfFix->img_height = 300;
lfFix->img_width = 300;
- lfFix->mod = lfModifier::Create(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize(
lfFix->lens, cTypeToLfPixelFormat<T>(),
@@ -134,7 +134,7 @@ void mod_teardown(lfFixture *lfFix, gconstpointer data)
else
lf_free_align(lfFix->image);
- lfFix->mod->Destroy();
+ delete lfFix->mod;
delete lfFix->lens;
}
diff --git a/tests/test_modifier_coord_distortion.cpp b/tests/test_modifier_coord_distortion.cpp
index 6fd6773..f463350 100644
--- a/tests/test_modifier_coord_distortion.cpp
+++ b/tests/test_modifier_coord_distortion.cpp
@@ -51,7 +51,7 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
lfFix->img_height = 300;
lfFix->img_width = 300;
- lfFix->mod = lfModifier::Create(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize(
lfFix->lens, LF_PF_F32,
@@ -76,7 +76,7 @@ void mod_teardown(lfFixture *lfFix, gconstpointer data)
else
lf_free_align(lfFix->coordBuff);
- lfFix->mod->Destroy();
+ delete lfFix->mod;
delete lfFix->lens;
}
diff --git a/tests/test_modifier_coord_geometry.cpp b/tests/test_modifier_coord_geometry.cpp
index 6805b7d..d626ba8 100644
--- a/tests/test_modifier_coord_geometry.cpp
+++ b/tests/test_modifier_coord_geometry.cpp
@@ -51,7 +51,7 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
lfFix->img_height = 300;
lfFix->img_width = 300;
- lfFix->mod = lfModifier::Create(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize(
lfFix->lens, LF_PF_F32,
@@ -76,7 +76,7 @@ void mod_teardown(lfFixture *lfFix, gconstpointer data)
else
lf_free_align(lfFix->coordBuff);
- lfFix->mod->Destroy();
+ delete lfFix->mod;
delete lfFix->lens;
}
diff --git a/tests/test_modifier_coord_scale.cpp b/tests/test_modifier_coord_scale.cpp
index c155ff8..84a4286 100644
--- a/tests/test_modifier_coord_scale.cpp
+++ b/tests/test_modifier_coord_scale.cpp
@@ -48,7 +48,7 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
lfFix->img_height = 300;
lfFix->img_width = 300;
- lfFix->mod = lfModifier::Create(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize(
lfFix->lens, LF_PF_F32,
@@ -73,7 +73,7 @@ void mod_teardown(lfFixture *lfFix, gconstpointer data)
else
lf_free_align(lfFix->coordBuff);
- lfFix->mod->Destroy();
+ delete lfFix->mod;
delete lfFix->lens;
}
diff --git a/tests/test_modifier_subpix.cpp b/tests/test_modifier_subpix.cpp
index d04f36d..fa29cf6 100644
--- a/tests/test_modifier_subpix.cpp
+++ b/tests/test_modifier_subpix.cpp
@@ -51,7 +51,7 @@ void mod_setup(lfFixture *lfFix, gconstpointer data)
lfFix->img_height = 300;
lfFix->img_width = 300;
- lfFix->mod = lfModifier::Create(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
+ lfFix->mod = new lfModifier(lfFix->lens, 1.0f, lfFix->img_width, lfFix->img_height);
lfFix->mod->Initialize(
lfFix->lens, LF_PF_F32,
@@ -76,7 +76,7 @@ void mod_teardown(lfFixture *lfFix, gconstpointer data)
else
lf_free_align(lfFix->coordBuff);
- lfFix->mod->Destroy();
+ delete lfFix->mod;
delete lfFix->lens;
}
--
2.7.4

Просмотреть файл

@ -0,0 +1,45 @@
From 3f74b78e4ee9f1d400ebbf2b9093a0f9c48c6307 Mon Sep 17 00:00:00 2001
From: Sebastian Kraft <mail@sebastiankraft.net>
Date: Sat, 9 Jan 2016 20:48:16 +0100
Subject: [PATCH 058/113] Use database in source directory while running tests.
Fixes bug #46.
---
tests/CMakeLists.txt | 4 ++--
tests/test_database.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b79fda6..4056072 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
ADD_EXECUTABLE(test_database test_database.cpp)
TARGET_LINK_LIBRARIES(test_database lensfun ${COMMON_LIBS})
-ADD_TEST(Database test_database)
+ADD_TEST(NAME Database WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND test_database)
ADD_EXECUTABLE(test_modifier test_modifier.cpp)
TARGET_LINK_LIBRARIES(test_modifier lensfun ${COMMON_LIBS})
@@ -30,4 +30,4 @@ TARGET_LINK_LIBRARIES(test_modifier_coord_geometry lensfun ${COMMON_LIBS})
ADD_TEST(Modifier_coord_geometry test_modifier_coord_geometry)
FIND_PACKAGE(PythonInterp REQUIRED)
-ADD_TEST(NAME Database_integrity COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/check_database/check_database.py ../../data/db)
+ADD_TEST(NAME Database_integrity COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/check_database/check_database.py ${CMAKE_SOURCE_DIR}/data/db)
diff --git a/tests/test_database.cpp b/tests/test_database.cpp
index 45dc38f..49a2644 100644
--- a/tests/test_database.cpp
+++ b/tests/test_database.cpp
@@ -10,7 +10,7 @@ typedef struct {
void db_setup(lfFixture *lfFix, gconstpointer data)
{
lfFix->db = new lfDatabase ();
- lfFix->db->Load();
+ lfFix->db->LoadDirectory("data/db");
}
--
2.7.4

Просмотреть файл

@ -0,0 +1,24 @@
From 9ec857bb403accc262a9b5a9c2921b5c064fc9c8 Mon Sep 17 00:00:00 2001
From: Sebastian Kraft <mail@sebastiankraft.net>
Date: Sat, 9 Jan 2016 20:55:21 +0100
Subject: [PATCH 059/113] Patch #47: respect DESTDIR when installing python
stuff
---
apps/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 70c77fd..2f6f8f1 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -42,5 +42,5 @@ IF(PYTHON)
IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
ENDIF()
- INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX})")
+ INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
ENDIF(PYTHON)
--
2.7.4

Просмотреть файл

@ -0,0 +1,85 @@
From bba9aa37c899999fca01101a8ed271a3aa9d82b7 Mon Sep 17 00:00:00 2001
From: Sebastian Kraft <mail@sebastiankraft.net>
Date: Sat, 16 Jan 2016 15:42:57 +0100
Subject: [PATCH 060/113] Various CMake patches from the mailing list
- Add GLIB2 libray path to link directories
- Enable -msseX compiler switch for Clang
- Set -mseeX switch only for files with SSE code
- Do not enable SSE optimizations on non-x86 hardware by default
---
CMakeLists.txt | 19 +++++++++++++------
libs/lensfun/CMakeLists.txt | 5 +++++
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21f082b..b85656c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,12 +31,18 @@ IF(NOT HAVE_REGEX_H)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libs/regex)
ENDIF()
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "[XxIi][0-9]?86|[Aa][Mm][Dd]64")
+ SET(X86_ON ON)
+else()
+ SET(X86_ON OFF)
+ENDIF()
+
# options controlling the build process
OPTION(BUILD_STATIC "Build static library" OFF)
OPTION(BUILD_TESTS "Build test suite" OFF)
OPTION(BUILD_LENSTOOL "Build the lenstool (requires libpng)" OFF)
-OPTION(BUILD_FOR_SSE "Build with support for SSE" ON)
-OPTION(BUILD_FOR_SSE2 "Build with support for SSE2" ON)
+OPTION(BUILD_FOR_SSE "Build with support for SSE" ${X86_ON})
+OPTION(BUILD_FOR_SSE2 "Build with support for SSE2" ${X86_ON})
OPTION(BUILD_DOC "Build documentation with doxygen" OFF)
OPTION(INSTALL_HELPER_SCRIPTS "Install various helper scripts" ON)
@@ -62,14 +68,14 @@ ENDIF()
IF(BUILD_FOR_SSE)
SET(VECTORIZATION_SSE 1)
- IF(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
+ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ SET(VECTORIZATION_SSE_FLAGS "-msse")
ENDIF()
ENDIF()
IF(BUILD_FOR_SSE2)
SET(VECTORIZATION_SSE2 1)
- IF(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ SET(VECTORIZATION_SSE2_FLAGS "-msse2")
ENDIF()
ENDIF()
@@ -97,6 +103,7 @@ ELSE()
ENDIF()
INCLUDE_DIRECTORIES(SYSTEM ${GLIB2_INCLUDE_DIRS})
+LINK_DIRECTORIES(${GLIB2_LIBRARY_DIRS})
IF(BUILD_STATIC)
diff --git a/libs/lensfun/CMakeLists.txt b/libs/lensfun/CMakeLists.txt
index 6beadec..b0ca638 100644
--- a/libs/lensfun/CMakeLists.txt
+++ b/libs/lensfun/CMakeLists.txt
@@ -9,6 +9,11 @@ IF(WIN32)
LIST(APPEND LENSFUN_SRC windows/auxfun.cpp)
ENDIF()
+SET_SOURCE_FILES_PROPERTIES(mod-color-sse.cpp mod-coord-sse.cpp
+ PROPERTIES COMPILE_FLAGS "${VECTORIZATION_SSE_FLAGS}")
+SET_SOURCE_FILES_PROPERTIES(mod-color-sse2.cpp
+ PROPERTIES COMPILE_FLAGS "${VECTORIZATION_SSE2_FLAGS}")
+
IF(BUILD_STATIC)
ADD_LIBRARY(lensfun STATIC ${LENSFUN_SRC})
ELSE()
--
2.7.4

Просмотреть файл

@ -0,0 +1,42 @@
From f400d8bfb7ea754ea75128ba14d9c7a23eb0527b Mon Sep 17 00:00:00 2001
From: Torsten Bronger <bronger@physik.rwth-aachen.de>
Date: Sat, 15 Oct 2016 15:02:04 +0200
Subject: [PATCH 113/113] Added "std" namespace to "isnan".
Fixes bug #68.
---
tests/test_modifier.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test_modifier.cpp b/tests/test_modifier.cpp
index f794638..5a2ed0d 100644
--- a/tests/test_modifier.cpp
+++ b/tests/test_modifier.cpp
@@ -102,18 +102,18 @@ void test_mod_projection_borders(lfFixture* lfFix, gconstpointer data)
LF_MODIFY_GEOMETRY, false);
if (lfFix->mod->ApplyGeometryDistortion(0,0,1,1,res)) {
- g_assert_false(isnan(res[0]));
- g_assert_false(isnan(res[1]));
+ g_assert_false(std::isnan(res[0]));
+ g_assert_false(std::isnan(res[1]));
}
if (lfFix->mod->ApplyGeometryDistortion(in[0],in[1],1,1,res)) {
- g_assert_false(isnan(res[0]));
- g_assert_false(isnan(res[1]));
+ g_assert_false(std::isnan(res[0]));
+ g_assert_false(std::isnan(res[1]));
}
if (lfFix->mod->ApplyGeometryDistortion(in2[0],in2[1],1,1,res)) {
- g_assert_false(isnan(res[0]));
- g_assert_false(isnan(res[1]));
+ g_assert_false(std::isnan(res[0]));
+ g_assert_false(std::isnan(res[1]));
}
delete lfFix->mod;
--
2.7.4

Просмотреть файл

@ -0,0 +1,26 @@
From 034ff1bfd7c97acd793132c8a50c099af656fb15 Mon Sep 17 00:00:00 2001
From: Matthias Andree <matthias.andree@gmx.de>
Date: Sat, 29 Oct 2016 13:38:27 +0200
Subject: [PATCH 0866/1096] Pull isnan() into std:: namespace, #include
<cmath>, not <math.h>.
---
tests/test_modifier.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_modifier.cpp b/tests/test_modifier.cpp
index 9c6def6..f087917 100644
--- a/tests/test_modifier.cpp
+++ b/tests/test_modifier.cpp
@@ -3,7 +3,7 @@
#ifdef _MSC_VER
#define _USE_MATH_DEFINES
#endif
-#include <math.h>
+#include <cmath>
#include "lensfun.h"
typedef struct {
--
1.8.3.1

Просмотреть файл

@ -0,0 +1,16 @@
diff -up lensfun-0.3.2/docs/CMakeLists.txt.INSTALL_HELPER_SCRIPTS lensfun-0.3.2/docs/CMakeLists.txt
--- lensfun-0.3.2/docs/CMakeLists.txt.INSTALL_HELPER_SCRIPTS 2016-01-03 11:43:52.326346877 -0600
+++ lensfun-0.3.2/docs/CMakeLists.txt 2016-01-03 11:44:51.628838749 -0600
@@ -22,6 +22,7 @@ ADD_CUSTOM_TARGET(doc
# install documentation
INSTALL(DIRECTORY ${CMAKE_DOC_OUT}/ DESTINATION ${CMAKE_INSTALL_DOCDIR})
+IF(INSTALL_HELPER_SCRIPTS)
# create and install man pages
FIND_PROGRAM(RST2MAN_EXECUTABLE NAMES rst2man rst2man.py rst2man2 rst2man2.py)
ADD_CUSTOM_TARGET(man ALL)
@@ -39,3 +40,4 @@ INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)
+ENDIF(INSTALL_HELPER_SCRIPTS)

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"lensfun-0.3.2.tar.gz": "ae8bcad46614ca47f5bda65b00af4a257a9564a61725df9c74cb260da544d331"
}
}

Просмотреть файл

@ -0,0 +1,363 @@
Summary: Library to rectify defects introduced by photographic lenses
Name: lensfun
Version: 0.3.2
Release: 26%{?dist}
License: LGPLv3 AND CC-BY-SA
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://lensfun.sourceforge.net/
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
## upstream patches
Patch1: 0001-Only-require-glib-2.40-when-tests-are-build-without-.patch
Patch38: 0038-Only-use-proper-C-new-and-delete-syntax-for-object-c.patch
Patch58: 0058-Use-database-in-source-directory-while-running-tests.patch
Patch59: 0059-Patch-47-respect-DESTDIR-when-installing-python-stuf.patch
Patch60: 0060-Various-CMake-patches-from-the-mailing-list.patch
Patch113: 0113-Added-std-namespace-to-isnan.patch
## upstreamable patches
# install manpages only when INSTALL_HELPER_SCRIPTS=ON
Patch200: lensfun-0.3.2-INSTALL_HELPER_SCRIPTS.patch
## upstream patches (master branch)
Patch866: 0866-Pull-isnan-into-std-namespace-include-cmath-not-math.patch
# for rst2man, if INSTALL_HELPER_SCRIPTS != OFF
BuildRequires: %{_bindir}/rst2man
BuildRequires: cmake >= 2.8
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
BuildRequires: python3
BuildRequires: python3-devel
%description
The lensfun library provides an open source database of photographic lenses and
their characteristics. It not only provides a way to read and search the
database, but also provides a set of algorithms for correcting images based on
detailed knowledge of lens properties. Right now lensfun is designed to correct
distortion, transversal (also known as lateral) chromatic aberrations,
vignetting and color contribution of a lens.
%package devel
Summary: Development toolkit for %{name}
License: LGPLv3
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains library and header files needed to build applications
using lensfun.
%package tools
Summary: Tools for managing %{name} data
License: LGPLv3
Requires: python3-lensfun = %{version}-%{release}
%description tools
This package contains tools to fetch lens database updates and manage lens
adapters in lensfun.
%package -n python3-lensfun
Summary: Python3 lensfun bindings
License: LGPLv3 AND CC-BY-SA
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-lensfun
%{summary}.
%prep
%autosetup -p1
%if 0%{?python3:1}
sed -i.shbang \
-e "s|^#!%{_bindir}/env python3$|#!python3|g" \
apps/lensfun-add-adapter \
apps/lensfun-update-data
%endif
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%cmake .. \
-DBUILD_DOC:BOOL=ON \
%if %{with_check}
-DBUILD_TESTS:BOOL=ON\
%else
-DBUILD_TESTS:BOOL=OFF\
%endif
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_pkgdocdir} \
%{?!python3:-DINSTALL_HELPER_SCRIPTS:BOOL=OFF}
popd
%make_build -C %{_target_platform}
make doc -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
# create/own /var/lib/lensfun-updates
mkdir -p %{buildroot}%{_sharedstatedir}/lensfun-updates
## unpackaged files
# omit g-lensfun-update-data because it needs gksudo which we don't ship
rm -fv %{buildroot}%{_bindir}/g-lensfun-update-data \
%{buildroot}%{_mandir}/man1/g-lensfun-update-data.*
%check
pushd %{_target_platform}
export CTEST_OUTPUT_ON_FAILURE=1
ctest -vv
popd
%ldconfig_scriptlets
%files
%doc README.md
%license docs/cc-by-sa-3.0.txt docs/lgpl-3.0.txt
%{_datadir}/lensfun/
%{_libdir}/liblensfun.so.%{version}
%{_libdir}/liblensfun.so.1*
%dir %{_sharedstatedir}/lensfun-updates/
%files devel
%{_pkgdocdir}/*.css
%{_pkgdocdir}/*.html
%{_pkgdocdir}/*.js
%{_pkgdocdir}/*.png
%{_pkgdocdir}/*.svg
%{_includedir}/lensfun/
%{_libdir}/liblensfun.so
%{_libdir}/pkgconfig/lensfun.pc
%if 0%{?python3:1}
%files tools
%{_bindir}/lensfun-add-adapter
%{_bindir}/lensfun-update-data
%{_mandir}/man1/lensfun-add-adapter.1*
%{_mandir}/man1/lensfun-update-data.1*
%files -n python3-lensfun
%{python3_sitelib}/lensfun/
%{python3_sitelib}/lensfun*.egg-info
%endif
%changelog
* Thu Oct 20 2022 Muhammad Falak R Wani <mwani@microsoft.com> - 0.3.2-26
- Switch to https for source url
- Drop fedora specific bits
- License verified
* Wed Jul 07 2021 Muhammad Falak R Wani <mwani@microsoft.com> - 0.3.2-25
- Initial CBL-Mariner import from Fedora 31 (license: MIT).
- Fix usage of %{python3} macro. Use python3 instead of %{python3}.
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-24
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-23
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 17 2019 Kalev Lember <klember@redhat.com> - 0.3.2-21
- Avoid using the bindir macro in BuildRequires
* Wed Jun 19 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-20
- use %%python3_pkgversion
- epel7: Obsoletes: python34-lensfun (#1721810)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-18
- BR: %_bindir/rst2man (#1604549)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-16
- use %%make_build %%ldconfig_scriptlets (#1600022)
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-15
- Rebuilt for Python 3.7
* Tue Feb 20 2018 Nils Philippsen <nils@tiptoe.de> 0.3.2-14
- require gcc, gcc-c++ for building
* Mon Feb 12 2018 Rex Dieter <rdieter@fedoraproject.org> 0.3.2-13
- -tools: make buildable on epel7/python34
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.2-12
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jun 29 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-9
- epel7 compatibility (#1454359)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 03 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-7
- lensfun-tools package should depend on python3-lensfun (#1409893)
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-6
- Rebuild for Python 3.6
* Thu Dec 01 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-5
- more upstream fixes... from the right branch (0.3)
* Thu Dec 01 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-4
- support BUILD_FOR_SSE/SSE2 on %%ix86/x86_64 (#1400481)
- enable/fix python bindings
- pull in upstream fixes (tests, buildsys)
* Tue Nov 15 2016 Germano Massullo <germano.massullo@gmail.com> - 0.3.2-3
- Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Jan 03 2016 Rex Dieter <rdieter@fedoraproject.org> 0.3.2-1
- lensfun-0.3.2 (#1295216), %%check: enable tests
* Tue Jul 14 2015 Rex Dieter <rdieter@fedoraproject.org> 0.3.1-3
- lensfun-update-data: Root privileges needed (#1242826)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed May 13 2015 Nils Philippsen <nils@redhat.com> - 0.3.1-1
- version 0.3.1 (with API/ABI changes)
- fix source URL (no tar.bz2 available)
- update patches
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3.0-5
- Rebuilt for GCC 5 C++11 ABI change
* Wed Nov 19 2014 Nils Philippsen <nils@redhat.com> 0.3.0-4
- reenable helper scripts
- install man pages into their correct place
- correct typo
* Mon Nov 17 2014 Rex Dieter <rdieter@fedoraproject.org> 0.3.0-3
- enable sse only in %%ix86 x86_64, sse2 on x86_64, disable elsewhere
* Mon Nov 17 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.3.0-2
- -DINSTALL_HELPER_SCRIPTS=OFF (with patch)
- -DCMAKE_BUILD_TYPE=Release (defaults to Debug otherwise)
- disable SSE2 on %%ix86 (fedora base i686 platform doesn't support it)
- use %%buildroot consistently
* Mon Nov 17 2014 Nils Philippsen <nils@redhat.com> - 0.3.0-1
- version 0.3.0
* Tue Nov 04 2014 Nils Philippsen <nils@redhat.com> - 0.3.0-1
- Lensfun moved from Berlios to SourceForge (#1159993)
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Jan 06 2014 Rex Dieter <rdieter@fedoraproject.org> 0.2.8-1
- 0.2.8 (#1048784)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Mar 19 2013 Rex Dieter <rdieter@fedoraproject.org> 0.2.7-1
- 0.2.7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 25 2012 Nils Philippsen <nils@redhat.com> - 0.2.6-3
- pkgconfig: fix cflags so lensfun.h is found
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jun 28 2012 Rex Dieter <rdieter@fedoraproject.org>
- 0.2.6-1
- lensfun-0.2.6 (#836156)
- use cmake
- use pkgconfig-style deps
* Thu Jun 21 2012 Nils Philippsen <nils@redhat.com> - 0.2.5-8
- don't modify doxygen configuration anymore as doxygen carries fixes now
(#831399)
* Fri Jun 15 2012 Nils Philippsen <nils@redhat.com> - 0.2.5-7
- multilib: don't embed creation dates in generated docs (#831399)
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.2.5-6
- rebuild for gcc 4.7
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Sep 29 2010 jkeating - 0.2.5-4
- Rebuilt for gcc bug 634757
* Mon Sep 20 2010 Nils Philippsen <nils@redhat.com> 0.2.5-3
- backport cpuid fixes (#631674)
* Mon Jul 26 2010 Dan Horák <dan[at]danny.cz> 0.2.5-2
- disable SSE vectorization on non x86 arches
* Mon Jun 07 2010 Nils Philippsen <nils@redhat.com> 0.2.5-1
- lensfun-0.2.5
- add CC-BY-SA to main package license tag for lens data
- don't ship GPLv3 text as nothing is licensed under it currently
- mark documentation files as such
- shorten summaries, expand package descriptions
* Sun Oct 18 2009 Rex Dieter <rdieter@fedoraproject.orG> 0.2.4-1
- lensfun-0.2.4 (#529506)
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Dec 12 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.3-3
- rebuild for pkgconfig deps
* Mon Nov 10 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.3-2
- -devel: Requires: pkgconfig
* Mon Nov 10 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.3-1
- lensfun-0.2.3
- fix SOURCE Url
- configure --target=..generic
* Mon Oct 13 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.2b-3
- BR: doxygen
* Mon Oct 13 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.2b-2
- fix subpkg deps
* Sun Sep 28 2008 Rex Dieter <rdieter@fedoraproject.org> 0.2.2b-1
- adapt for fedora
* Tue Jun 24 2008 Helio Chissini de Castro <helio@mandriva.com> 0.2.2b-1mdv2009.0
+ Revision: 228769
- Added missing buildrequires
- import lensfun

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -528,6 +528,7 @@
"ldns",
"leatherman",
"ledmon",
"lensfun",
"leveldb",
"lftp",
"libabw",

Просмотреть файл

@ -7856,6 +7856,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "lensfun",
"version": "0.3.2",
"downloadUrl": "https://downloads.sourceforge.net/lensfun/lensfun-0.3.2.tar.gz"
}
}
},
{
"component": {
"type": "other",