Compare commits
5 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 532facd88c | |||
|
|
5c75ecd5b3 | ||
|
|
2357b657cf | ||
| 572f4b061e | |||
|
|
52342de0a3 |
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7ba43ce740014a2ff6fce3053c8ae03707c39f678eb9fecd919895a290fa590
|
||||
size 4788748
|
||||
oid sha256:cd640cb3cc2fd6f1c2d9f35243c32dac514ed149754f6df425d1b39f611df5f4
|
||||
size 4837900
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: data
|
||||
version: master
|
||||
mtime: 1742564193
|
||||
commit: 44903722bcbb7d8c22e5712daa2ff7d5e0d9539e
|
||||
mtime: 1753959202
|
||||
commit: ef825b4d855567c3e7862ae5548aacf2348580d8
|
||||
|
||||
115
lensfun-pr2256-setuptools.patch
Normal file
115
lensfun-pr2256-setuptools.patch
Normal file
@@ -0,0 +1,115 @@
|
||||
From 7df6795e5d0fa768132dfce78148b363566de473 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Ott <git@jonas-ott.de>
|
||||
Date: Sun, 28 Jul 2024 21:54:37 +0200
|
||||
Subject: [PATCH 1/2] stop deprecated direct call of setup.py, install python
|
||||
build in workflows
|
||||
|
||||
|
||||
Index: lensfun-0.3.4/apps/CMakeLists.txt
|
||||
===================================================================
|
||||
--- lensfun-0.3.4.orig/apps/CMakeLists.txt
|
||||
+++ lensfun-0.3.4/apps/CMakeLists.txt
|
||||
@@ -1,14 +1,13 @@
|
||||
-IF(WIN32)
|
||||
- SET(COMMON_LIBS getopt)
|
||||
-ENDIF()
|
||||
-
|
||||
IF(BUILD_LENSTOOL)
|
||||
- FIND_PACKAGE(PNG REQUIRED)
|
||||
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
- INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
|
||||
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
|
||||
+ INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIRS})
|
||||
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
|
||||
ADD_EXECUTABLE(lenstool lenstool/lenstool.cpp lenstool/image.cpp)
|
||||
- TARGET_LINK_LIBRARIES(lenstool lensfun ${COMMON_LIBS} ${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
||||
+ TARGET_COMPILE_DEFINITIONS(lenstool PRIVATE -Dauxfun_EXPORTS)
|
||||
+ TARGET_LINK_LIBRARIES(lenstool lensfun ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
+ IF(WIN32)
|
||||
+ TARGET_LINK_LIBRARIES(lenstool getopt)
|
||||
+ ENDIF()
|
||||
INSTALL(TARGETS lenstool DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
ENDIF()
|
||||
|
||||
@@ -20,27 +19,42 @@ ENDIF(INSTALL_HELPER_SCRIPTS)
|
||||
|
||||
|
||||
# Inspired by http://bloerg.net/2012/11/10/cmake-and-distutils.html
|
||||
+IF(INSTALL_PYTHON_MODULE)
|
||||
+ FIND_PACKAGE (Python3 COMPONENTS Interpreter REQUIRED)
|
||||
+ # Windows has a dummy python.exe in the PATH which opens the Microsoft Store, so check if Python is real.
|
||||
+ EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} --version RESULT_VARIABLE PY_RESULT OUTPUT_QUIET)
|
||||
+ IF (NOT PY_RESULT EQUAL 0)
|
||||
+ MESSAGE(FATAL_ERROR "Python3 not found, it might be a dummy python.exe")
|
||||
+ ENDIF()
|
||||
|
||||
-FIND_PROGRAM(PYTHON "python3")
|
||||
-IF(PYTHON)
|
||||
- SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
|
||||
- SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
|
||||
- SET(DEPS_IN "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in")
|
||||
- SET(DEPS "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py")
|
||||
- SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
|
||||
+ SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
|
||||
+ SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
|
||||
+ SET(PYPROJECT_TOML_IN "${CMAKE_CURRENT_SOURCE_DIR}/pyproject.toml.in")
|
||||
+ SET(PYPROJECT_TOML "${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml")
|
||||
+ SET(DEPS_IN "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in")
|
||||
+ SET(DEPS "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py")
|
||||
+ SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
|
||||
|
||||
+ FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/build/")
|
||||
+ FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" PY_PACKAGE_DIR)
|
||||
CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
|
||||
+ CONFIGURE_FILE(${PYPROJECT_TOML_IN} ${PYPROJECT_TOML})
|
||||
CONFIGURE_FILE(${DEPS_IN} ${DEPS})
|
||||
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
|
||||
- COMMAND ${PYTHON} ${SETUP_PY} build
|
||||
+ COMMAND ${Python3_EXECUTABLE} -m pip wheel
|
||||
+ --no-build-isolation
|
||||
+ --use-pep517
|
||||
+ --wheel-dir ${CMAKE_CURRENT_BINARY_DIR}/build
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
|
||||
- DEPENDS ${DEPS_IN})
|
||||
+ DEPENDS ${PYPROJECT_TOML_IN} ${DEPS_IN})
|
||||
|
||||
ADD_CUSTOM_TARGET(python-package ALL DEPENDS ${OUTPUT})
|
||||
|
||||
- IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
|
||||
- SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
+ IF(NOT DEFINED PY_INSTALL_PREFIX)
|
||||
+ SET(PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
ENDIF()
|
||||
- INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
|
||||
-ENDIF(PYTHON)
|
||||
+ INSTALL(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install --no-build-isolation --prefix=\$ENV{DESTDIR}${PY_INSTALL_PREFIX} ${CMAKE_CURRENT_BINARY_DIR}/build/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}-py3-none-any.whl)")
|
||||
+
|
||||
+ENDIF()
|
||||
Index: lensfun-0.3.4/apps/pyproject.toml.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ lensfun-0.3.4/apps/pyproject.toml.in
|
||||
@@ -0,0 +1,10 @@
|
||||
+[build-system]
|
||||
+requires = ["setuptools"]
|
||||
+build-backend = "setuptools.build_meta"
|
||||
+
|
||||
+[project]
|
||||
+name = "lensfun"
|
||||
+version= "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}"
|
||||
+
|
||||
+[tool.setuptools]
|
||||
+packages = ["lensfun"]
|
||||
Index: lensfun-0.3.4/apps/setup.py.in
|
||||
===================================================================
|
||||
--- lensfun-0.3.4.orig/apps/setup.py.in
|
||||
+++ lensfun-0.3.4/apps/setup.py.in
|
||||
@@ -8,5 +8,4 @@ from setuptools import setup
|
||||
|
||||
setup(name="lensfun",
|
||||
version="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}",
|
||||
- package_dir={"": "${CMAKE_CURRENT_BINARY_DIR}"},
|
||||
packages=["lensfun"])
|
||||
25
lensfun-python314.patch
Normal file
25
lensfun-python314.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From aa8f9d008b9b06d357ebc2542d489a2132cc078e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Burdulis?= <sarunas.burdulis@yahoo.com>
|
||||
Date: Fri, 27 Jun 2025 10:58:40 -0400
|
||||
Subject: [PATCH] Add filter to TarFile.extract(). (#2476)
|
||||
|
||||
---
|
||||
apps/lensfun-update-data | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/apps/lensfun-update-data b/apps/lensfun-update-data
|
||||
index 01de313..14517f2 100755
|
||||
--- a/apps/lensfun-update-data
|
||||
+++ b/apps/lensfun-update-data
|
||||
@@ -85,7 +85,7 @@ class Location:
|
||||
def extract(self, directory):
|
||||
tar = tarfile.open(fileobj=urllib.request.urlopen(self.base_url + "version_{}.tar.bz2".format(self.version)),
|
||||
mode="r|*")
|
||||
- tar.extractall(directory)
|
||||
+ tar.extractall(directory,filter='data')
|
||||
tar.close()
|
||||
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 3 15:56:44 UTC 2026 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Remove specfile python package handling and use
|
||||
lensfun-pr2256-setuptools.patch instead.
|
||||
* Backported from gh#lensfun/lensfun#2256
|
||||
* Additionally, disable build isolation for offline build
|
||||
* Replace -m build with -m pip wheel and keep the setup.py for
|
||||
old distro compatibility (Also doesn't build again at install
|
||||
phase)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 2 20:56:13 UTC 2026 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Python Package updates:
|
||||
* Replace deprecated setup.py usage with PEP517 build
|
||||
* It is a pure python package, thus noarch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 5 09:23:51 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Add upstream change (boo#1247449)
|
||||
* lensfun-python314.patch
|
||||
- Update lens database
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 1 13:45:36 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
||||
30
lensfun.spec
30
lensfun.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package lensfun
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2026 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -28,6 +28,10 @@ Source0: https://github.com/lensfun/lensfun/archive/v%{version}.tar.gz#/%
|
||||
Source1: data-master.tar.xz
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch0: lensfun-cmake4.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: lensfun-python314.patch
|
||||
# PATCH-FIX-UPSTREAM lensfun-pr2256-setuptools.patch gh#lensfun/lensfun#2256 backported and without build isolation for offline build
|
||||
Patch2: lensfun-pr2256-setuptools.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
@@ -35,9 +39,11 @@ BuildRequires: gcc-c++
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-base
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
|
||||
@@ -91,6 +97,7 @@ Library files needed by the use the lensfun library/database.
|
||||
%package -n python3-lensfun
|
||||
Summary: Python3 lensfun bindings
|
||||
Requires: liblensfun%{sonum} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n python3-lensfun
|
||||
Lensfun bindings for Python 3
|
||||
@@ -107,6 +114,7 @@ adapters in lensfun.
|
||||
%package doc
|
||||
Summary: Documentation for lensfun
|
||||
Requires: lensfun-data
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation and manual files for the lensfun library/database.
|
||||
@@ -127,7 +135,10 @@ echo 'HTML_TIMESTAMP=NO' >> docs/doxyfile.in.cmake
|
||||
sed -i \
|
||||
-e "s|^#!/usr/bin/env python3$|#!/usr/bin/python3|g" \
|
||||
apps/lensfun-add-adapter \
|
||||
apps/lensfun-update-data \
|
||||
apps/lensfun-update-data
|
||||
# remove shebang from non-executable
|
||||
sed -i \
|
||||
-e '1 {/^#!/d}' \
|
||||
apps/lensfun/__init__.py.in
|
||||
|
||||
sed -i 's#/usr/bin/env sh#/usr/bin/sh#' apps/g-lensfun-update-data
|
||||
@@ -147,16 +158,7 @@ sed -i 's#/usr/bin/env sh#/usr/bin/sh#' apps/g-lensfun-update-data
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
pushd build/apps
|
||||
python3 setup.py install --root="%{buildroot}" --skip-build
|
||||
popd
|
||||
|
||||
# Unneeded
|
||||
%if 0%{?suse_version} > 1500
|
||||
rm %{buildroot}%{python3_sitelib}/lensfun-*.egg
|
||||
%endif
|
||||
|
||||
# Create udate folder for lensfun data
|
||||
# Create update folder for lensfun data
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/lensfun-updates
|
||||
|
||||
%fdupes %{buildroot}
|
||||
@@ -185,7 +187,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PA
|
||||
|
||||
%files -n python3-lensfun
|
||||
%{python3_sitelib}/lensfun/
|
||||
%{python3_sitelib}/lensfun-*.egg-info
|
||||
%{python3_sitelib}/lensfun-%{version}.dist-info
|
||||
|
||||
%files devel
|
||||
%{_includedir}/lensfun/
|
||||
|
||||
Reference in New Issue
Block a user