Monday, May 01, 2023

Re: update: graphics/lensfun to 0.3.3

I confirm latest patch still works for me.

Tested in rawtherapee + NEF file + NIKON D5600 + AF-S DX Nikkor 18-300mm
f/3.5-6.3G ED VR
distortion gets automatically corrected with the patch.

Thanks to all!

On Mon, May 1, 2023 at 3:42 PM Omar Polo <op@omarpolo.com> wrote:

> On 2023/05/01 19:51:45 +0100, Stuart Henderson <stu@spacehopper.org>
> wrote:
> > On 2023/04/30 17:35, Omar Polo wrote:
> > It's because it's using "setup.py install" at all - that is deprecated,
> > python software is supposed to be moving to pep517 installers.
>
> thanks for checking. I haven't compared the build with the previous
> version ^^"
>
> > Probably too much hassle to fix in a cmake port, I think I'd ignore it
> > for now.
>
> If you're fine with it then so am I :)
>
> > It does however need a BUILD_DEPENDS on py-setuptools (otherwise
> > different files are produced and packaging fails).
>
> ah, haven't spotted that. thanks! updated diff below
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/graphics/lensfun/Makefile,v
> retrieving revision 1.31
> diff -u -p -r1.31 Makefile
> --- Makefile 11 Mar 2022 19:22:39 -0000 1.31
> +++ Makefile 1 May 2023 21:18:06 -0000
> @@ -1,11 +1,12 @@
> COMMENT= library to adjust for photographic lens characteristics
> -DISTNAME= lensfun-0.3.2
> -REVISION= 4
> +GH_ACCOUNT= lensfun
> +GH_PROJECT= lensfun
> +GH_TAGNAME= v0.3.3
>
> -SHARED_LIBS= lensfun 2.0
> +SHARED_LIBS= lensfun 2.1
>
> CATEGORIES= graphics
> -HOMEPAGE= http://lensfun.sourceforge.net/
> +HOMEPAGE= https://lensfun.github.io/
>
> # library LGPLv3, lens db CC-BY-SA, build infrastructure/applications
> GPLv3
> PERMIT_PACKAGE= Yes
> @@ -14,12 +15,12 @@ WANTLIB += c glib-2.0 m png ${COMPILER_L
>
> COMPILER = base-clang ports-gcc base-gcc
>
> -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lensfun/}
> -
> MODULES= devel/cmake \
> lang/python
>
> MODPY_RUNDEP= No
> +
> +BUILD_DEPENDS= devel/py-setuptools${MODPY_FLAVOR}
>
> LIB_DEPENDS= devel/glib2 \
> graphics/png
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/graphics/lensfun/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 31 Jan 2017 09:58:35 -0000 1.4
> +++ distinfo 30 Apr 2023 15:14:38 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lensfun-0.3.2.tar.gz) =
> rovK1GYUykf1vaZbAK9KJXqVZKYXJd+cdMsmDaVE0zE=
> -SIZE (lensfun-0.3.2.tar.gz) = 784825
> +SHA256 (lensfun-0.3.3.tar.gz) =
> V7paA3fySUiXIznhi+lGrxLtoit8cH6w3dJlhjcPZ2U=
> +SIZE (lensfun-0.3.3.tar.gz) = 992432
> Index: patches/patch-cmake_modules_FindGLIB2_cmake
> ===================================================================
> RCS file:
> /home/cvs/ports/graphics/lensfun/patches/patch-cmake_modules_FindGLIB2_cmake,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-cmake_modules_FindGLIB2_cmake
> --- patches/patch-cmake_modules_FindGLIB2_cmake 11 Mar 2022 19:22:39
> -0000 1.2
> +++ patches/patch-cmake_modules_FindGLIB2_cmake 30 Apr 2023 15:10:56 -0000
> @@ -1,11 +1,12 @@
> Avoid messing up between paths found by pkg-config and CMake itself.
> ---- cmake/modules/FindGLIB2.cmake.orig Sun Nov 15 18:07:26 2015
> -+++ cmake/modules/FindGLIB2.cmake Sun Jan 29 10:12:03 2017
> +Index: cmake/modules/FindGLIB2.cmake
> +--- cmake/modules/FindGLIB2.cmake.orig
> ++++ cmake/modules/FindGLIB2.cmake
> @@ -1,6 +1,6 @@
> IF (NOT MSVC)
> INCLUDE(FindPkgConfig)
> -- PKG_SEARCH_MODULE( GLIB2 REQUIRED glib-2.0 )
> -+ PKG_SEARCH_MODULE(PC_GLIB2 REQUIRED glib-2.0 )
> +- PKG_SEARCH_MODULE( GLIB2 glib-2.0 )
> ++ PKG_SEARCH_MODULE(PC_GLIB2 glib-2.0 )
> IF(WIN32 AND NOT BUILD_STATIC)
> FIND_FILE(GLIB2_DLL
> NAMES glib-2.dll glib-2-vs9.dll libglib-2.0-0.dll
> Index: patches/patch-tests_test_modifier_cpp
> ===================================================================
> RCS file:
> /home/cvs/ports/graphics/lensfun/patches/patch-tests_test_modifier_cpp,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-tests_test_modifier_cpp
> --- patches/patch-tests_test_modifier_cpp 11 Mar 2022 19:22:39
> -0000 1.2
> +++ patches/patch-tests_test_modifier_cpp 30 Apr 2023 15:10:56 -0000
> @@ -3,7 +3,7 @@ Fix c++11-narrowing with clang6
> Index: tests/test_modifier.cpp
> --- tests/test_modifier.cpp.orig
> +++ tests/test_modifier.cpp
> -@@ -77,8 +77,8 @@ void test_mod_projection_center(lfFixture* lfFix, gcon
> +@@ -78,8 +78,8 @@ void test_mod_projection_center(lfFixture* lfFix, gcon
> // check if output becomes NaN when processing geometry conversion
> void test_mod_projection_borders(lfFixture* lfFix, gconstpointer data)
> {
> @@ -14,3 +14,28 @@ Index: tests/test_modifier.cpp
> float res[2] = {0, 0};
>
> lfLensType geom_types [] = {LF_RECTILINEAR, LF_PANORAMIC,
> LF_EQUIRECTANGULAR, LF_FISHEYE_STEREOGRAPHIC, LF_FISHEYE,
> LF_FISHEYE_EQUISOLID, LF_FISHEYE_ORTHOGRAPHIC, LF_FISHEYE_THOBY,
> LF_UNKNOWN};
> +@@ -102,18 +102,18 @@ void test_mod_projection_borders(lfFixture* lfFix,
> gco
> + LF_MODIFY_GEOMETRY, false);
> +
> + if (lfFix->mod->ApplyGeometryDistortion(0,0,1,1,res)) {
> +- g_assert_false(std::isnan(res[0]));
> +- g_assert_false(std::isnan(res[1]));
> ++ g_assert_false(isnan(res[0]));
> ++ g_assert_false(isnan(res[1]));
> + }
> +
> + if
> (lfFix->mod->ApplyGeometryDistortion(in[0],in[1],1,1,res)) {
> +- g_assert_false(std::isnan(res[0]));
> +- g_assert_false(std::isnan(res[1]));
> ++ g_assert_false(isnan(res[0]));
> ++ g_assert_false(isnan(res[1]));
> + }
> +
> + if
> (lfFix->mod->ApplyGeometryDistortion(in2[0],in2[1],1,1,res)) {
> +- g_assert_false(std::isnan(res[0]));
> +- g_assert_false(std::isnan(res[1]));
> ++ g_assert_false(isnan(res[0]));
> ++ g_assert_false(isnan(res[1]));
> + }
> +
> + delete lfFix->mod;
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/graphics/lensfun/pkg/PLIST,v
> retrieving revision 1.10
> diff -u -p -r1.10 PLIST
> --- pkg/PLIST 11 Mar 2022 19:22:39 -0000 1.10
> +++ pkg/PLIST 30 Apr 2023 15:20:55 -0000
> @@ -6,6 +6,7 @@ include/lensfun/
> include/lensfun/lensfun.h
> @lib lib/liblensfun.so.${LIBlensfun_VERSION}
> lib/pkgconfig/lensfun.pc
>
> +lib/python${MODPY_VERSION}/site-packages/lensfun-0.3.3-py${MODPY_VERSION}.egg
> share/doc/lensfun/
> share/doc/lensfun/README.md
> share/doc/lensfun/cc-by-sa-3.0.txt
> @@ -33,6 +34,7 @@ share/lensfun/version_1/contax.xml
> share/lensfun/version_1/generic.xml
> share/lensfun/version_1/mil-canon.xml
> share/lensfun/version_1/mil-fujifilm.xml
> +share/lensfun/version_1/mil-leica.xml
> share/lensfun/version_1/mil-nikon.xml
> share/lensfun/version_1/mil-olympus.xml
> share/lensfun/version_1/mil-panasonic.xml
> @@ -42,6 +44,7 @@ share/lensfun/version_1/mil-samyang.xml
> share/lensfun/version_1/mil-sigma.xml
> share/lensfun/version_1/mil-sony.xml
> share/lensfun/version_1/mil-tamron.xml
> +share/lensfun/version_1/mil-tokina.xml
> share/lensfun/version_1/mil-zeiss.xml
> share/lensfun/version_1/misc.xml
> share/lensfun/version_1/rf-leica.xml
>

No comments:

Post a Comment