lensfun-0.3.3
This commit is contained in:
parent
3adb342e14
commit
49618b699a
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
/lensfun-0.3.0.tar.bz2
|
/lensfun-0.3.0.tar.bz2
|
||||||
/lensfun-0.3.1.tar.gz
|
/lensfun-0.3.1.tar.gz
|
||||||
/lensfun-0.3.2.tar.gz
|
/lensfun-0.3.2.tar.gz
|
||||||
|
/lensfun-0.3.3.tar.gz
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,263 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
21
lensfun.spec
21
lensfun.spec
@ -4,21 +4,15 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: lensfun
|
Name: lensfun
|
||||||
Version: 0.3.2
|
Version: 0.3.3
|
||||||
Summary: Library to rectify defects introduced by photographic lenses
|
Summary: Library to rectify defects introduced by photographic lenses
|
||||||
Release: 38%{?dist}
|
Release: 1%{?dist}
|
||||||
|
|
||||||
License: LGPLv3 and CC-BY-SA
|
License: LGPLv3 and CC-BY-SA
|
||||||
URL: https://lensfun.github.io/
|
URL: https://lensfun.github.io/
|
||||||
Source0: https://github.com/lensfun/lensfun/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/lensfun/lensfun/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
## upstream patches
|
## 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
|
|
||||||
|
|
||||||
## upstream patches (master branch)
|
## upstream patches (master branch)
|
||||||
Patch866: 0866-Pull-isnan-into-std-namespace-include-cmath-not-math.patch
|
Patch866: 0866-Pull-isnan-into-std-namespace-include-cmath-not-math.patch
|
||||||
@ -27,7 +21,7 @@ Patch866: 0866-Pull-isnan-into-std-namespace-include-cmath-not-math.patch
|
|||||||
# install manpages only when INSTALL_HELPER_SCRIPTS=ON
|
# install manpages only when INSTALL_HELPER_SCRIPTS=ON
|
||||||
Patch200: lensfun-0.3.2-INSTALL_HELPER_SCRIPTS.patch
|
Patch200: lensfun-0.3.2-INSTALL_HELPER_SCRIPTS.patch
|
||||||
|
|
||||||
BuildRequires: cmake >= 2.8
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -81,12 +75,6 @@ Obsoletes: python34-lensfun < %{version}-%{release}
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch1 -p1 -b .0001
|
|
||||||
%patch38 -p1 -b .0038
|
|
||||||
%patch58 -p1 -b .0058
|
|
||||||
%patch59 -p1 -b .0059
|
|
||||||
%patch60 -p1 -b .0060
|
|
||||||
%patch113 -p1 -b .0113
|
|
||||||
|
|
||||||
%patch866 -p1 -b .0866
|
%patch866 -p1 -b .0866
|
||||||
|
|
||||||
@ -166,6 +154,9 @@ export CTEST_OUTPUT_ON_FAILURE=1
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 04 2022 Rex Dieter <rdieter@fedoraproject.org> 0.3.3-1
|
||||||
|
- lensfun-0.3.3
|
||||||
|
|
||||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-38
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-38
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user