aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/lensfun')
-rw-r--r--media-libs/lensfun/Manifest7
-rw-r--r--media-libs/lensfun/files/lensfun-0.3.4-python-egg.patch11
-rw-r--r--media-libs/lensfun/files/lensfun-0.3.4-python.patch66
-rw-r--r--media-libs/lensfun/files/lensfun-0.3.4_rc1_python.patch27
-rw-r--r--media-libs/lensfun/lensfun-0.3.4.ebuild68
-rw-r--r--media-libs/lensfun/lensfun-0.3.4_rc1.ebuild8
6 files changed, 153 insertions, 34 deletions
diff --git a/media-libs/lensfun/Manifest b/media-libs/lensfun/Manifest
index ca0d5b0..3e63705 100644
--- a/media-libs/lensfun/Manifest
+++ b/media-libs/lensfun/Manifest
@@ -1,4 +1,7 @@
-AUX lensfun-0.3.4_rc1_python.patch 1243 BLAKE2B 1308911bd0d7ae50d187cda901ba68b5841b36e7e1f17edee7119e007108465262b0ad4475b7ac79e8c0c48c6b7135f325d405029ea08c258e1c5362b309f0ff SHA512 563a8bdb8b87abc1ddeffb4dcdb42c7a9ea1bddc9a3cd029ab75d94bcac0799657ae16791a14205670ff4edcb979d6e7a24356cb62bd6527ce06df4d5e79c710
+AUX lensfun-0.3.4-python-egg.patch 651 BLAKE2B f5de8795827c2ee51f48e29f1c82dbce2023821582759fb12e530e757b592c1b291083087ef3186b659b068e2c7ee6dfed25befd42449e45d5eff2db938fdd87 SHA512 e3fe20b9d713a2b2177072832b86814da67b75943b23251795811b3ec6a54c17504152be9ec79c2a3cca4fbb77c2f9df787489423156f8e087b206d3f930c052
+AUX lensfun-0.3.4-python.patch 3269 BLAKE2B 93a5837d44ccbf5f460d163a723cdcbd270eb9fd17e40fe93569fe3455972935df3abc452065d4b43b37a2fa7ba637538f1b602fadcad2fca440eb99a224077f SHA512 87726257a54be3666d77ba203abc0559c4893d9d6707875a879e51a739fa033a5eb9264e291ff64ef476dc68c669bbd2c9b7e90b96797d62b3e810a8f07bf1a2
+DIST lensfun-0.3.4.tar.gz 1058791 BLAKE2B e68cb72eb730a23c3e2dd691a49606ea92a8b89c4665d62dff126404010c8c7e1162d5906a69fce52eb8fb121da8930bb2e42d74bbd8bb6d2631ed4e97405fa3 SHA512 4db9a08d51ba50c7c2ff528d380bb28e34698b2bb5c40e5f3deeaa5544c888ac7e0f638bbc3f33a4f75dbb67e0425ca36ce6d8cd1d8c043a4173a2df47de08c6
DIST lensfun-0.3.4_rc1.tar.gz 1045616 BLAKE2B fee14b97dcda98be4e8a32443ff71347ba75e46192f8437be580cb6697f6ef2eca92ef57cfcb2de5bd87fe7ba96542a6b5551b12f50fec09a035c69d6f4b427f SHA512 0d034c6996e5650b022d33a7e00ef7e0e00dfa99155aa62c6c3ab48b9ac936e46f812ceea46e2070514e2c77150a1d7c827831686b1cf73e2acf88b6b3dfb6c5
-EBUILD lensfun-0.3.4_rc1.ebuild 1573 BLAKE2B 4c7bf7e2dc71f5deb56e702494584a28373f0a37bd8a1b34f092e5cb714997ecb8cae2ee71c2e2b2ea0929cb0a49eccf6ace3ba9a0c0c2581414cbce2ff0877b SHA512 52214d366dcd08398a5dfb9363b7eaffeca99458957ea8a4f901d3ea7f52a9e6a273831e16d58aedcad2c8d5dd7d1104923724b031c209f812d1c7caad2478b0
+EBUILD lensfun-0.3.4.ebuild 1658 BLAKE2B 04206b77401cf03f012c268bd7d1eb970e281c9a61a3a4edaacd58bd917f900fec0dce198abc97cbb2b513ca4922deba89a1c26a4b0c989ff91a4410121e2bda SHA512 a4b92f15a5b9875871f3403c8cde32bf03e9b6b65ef265faac85e4538bd8f41ec462da72b6c09534cdf57ae59aa5440776a23f73fa255b9bf67df64c6179875c
+EBUILD lensfun-0.3.4_rc1.ebuild 1479 BLAKE2B ca2ea014da376a2ae12395676aaa082c5c26144261728caab1251a364de8f34bdf6e54fc1e867fdfcaacb357fcc6d135b70e863144f49388e61b0fdd7af9aefc SHA512 2c7b244629e14ca9805f42e3b5a027529d15a20715a9bdb36e09d52d078b5af893cbdf748d0bd73a911bdc453c3e81eb917c092751fabeb3e48077faa14a3f01
MISC metadata.xml 716 BLAKE2B 866b92afec30235731857799268948cf0d63be654432c72bf6a93084d2e344d486d0156571e08accfce4c9323aee6e7f155620d2e7a72ebfe69ef27b39bb13cb SHA512 fa3c54e5ea453bcefb5e9b9c76c3a45fa74280ba52b713ac93aa5a95341dc0f9111130b1952bc0a4b3b7898d5d0bde46234e1b42453757ead0c42c002141e6c4
diff --git a/media-libs/lensfun/files/lensfun-0.3.4-python-egg.patch b/media-libs/lensfun/files/lensfun-0.3.4-python-egg.patch
new file mode 100644
index 0000000..292a0e4
--- /dev/null
+++ b/media-libs/lensfun/files/lensfun-0.3.4-python-egg.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/901997
+https://sources.debian.org/patches/lensfun/0.3.4-1/python-setuptools.diff/
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -48,5 +48,5 @@ IF(INSTALL_PYTHON_MODULE)
+ IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
+ SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ ENDIF()
+- INSTALL(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
++ INSTALL(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX} --single-version-externally-managed --root=\$ENV{DESTDIR})")
+ ENDIF()
diff --git a/media-libs/lensfun/files/lensfun-0.3.4-python.patch b/media-libs/lensfun/files/lensfun-0.3.4-python.patch
new file mode 100644
index 0000000..2520a99
--- /dev/null
+++ b/media-libs/lensfun/files/lensfun-0.3.4-python.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/901997
+https://github.com/lensfun/lensfun/commit/6e0e92b03f90a264d764f696ba02344ab96b5576
+https://github.com/lensfun/lensfun/commit/c54d9bfda1397d3b9deaac1e27d94b0231fdd26a
+https://github.com/lensfun/lensfun/commit/011de2e85813ff496a85404b30891352555de077
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+-# require at least cmake 2.8.12
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR )
++# require at least cmake 3.12
++CMAKE_MINIMUM_REQUIRED(VERSION 3.12 FATAL_ERROR)
+
+ # path for helper modules
+ set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake/modules")
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -20,27 +20,33 @@ 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")
+
++ FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" PY_PACKAGE_DIR)
+ CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
+ CONFIGURE_FILE(${DEPS_IN} ${DEPS})
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
+- COMMAND ${PYTHON} ${SETUP_PY} build
++ COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} build
+ COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
+- DEPENDS ${DEPS_IN})
++ DEPENDS ${SETUP_PY_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}")
+ 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} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
++ENDIF()
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -29,5 +29,5 @@ ADD_EXECUTABLE(test_modifier_coord_geometry test_modifier_coord_geometry.cpp)
+ 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 ${CMAKE_SOURCE_DIR}/data/db)
++FIND_PACKAGE(Python3 COMPONENTS Interpreter REQUIRED)
++ADD_TEST(NAME Database_integrity COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/check_database/check_database.py ${CMAKE_SOURCE_DIR}/data/db)
diff --git a/media-libs/lensfun/files/lensfun-0.3.4_rc1_python.patch b/media-libs/lensfun/files/lensfun-0.3.4_rc1_python.patch
deleted file mode 100644
index 17df4e0..0000000
--- a/media-libs/lensfun/files/lensfun-0.3.4_rc1_python.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -ru lensfun-0.3.4-RC1.orig/apps/CMakeLists.txt lensfun-0.3.4-RC1/apps/CMakeLists.txt
---- lensfun-0.3.4-RC1.orig/apps/CMakeLists.txt 2023-07-03 22:08:51.275590471 +0200
-+++ lensfun-0.3.4-RC1/apps/CMakeLists.txt 2023-07-03 22:09:35.124594218 +0200
-@@ -23,17 +23,13 @@
-
- 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")
-
-- CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
- CONFIGURE_FILE(${DEPS_IN} ${DEPS})
-
- ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
-- COMMAND ${PYTHON} ${SETUP_PY} build
- COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
- DEPENDS ${DEPS_IN})
-
-@@ -42,5 +38,4 @@
- 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=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
- ENDIF(PYTHON)
diff --git a/media-libs/lensfun/lensfun-0.3.4.ebuild b/media-libs/lensfun/lensfun-0.3.4.ebuild
new file mode 100644
index 0000000..d5a9492
--- /dev/null
+++ b/media-libs/lensfun/lensfun-0.3.4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit python-single-r1 cmake
+
+DESCRIPTION="Library for rectifying and simulating photographic lens distortions"
+HOMEPAGE="https://lensfun.github.io"
+SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV/_rc/-RC}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P/_rc/-RC}"
+
+LICENSE="LGPL-3 CC-BY-SA-3.0" # See README for reasoning.
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc cpu_flags_x86_sse cpu_flags_x86_sse2 test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/glib-2.40
+ media-libs/libpng:=
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? (
+ app-text/doxygen
+ dev-python/docutils
+ )
+"
+
+DOCS=( README.md docs/mounts.txt ChangeLog )
+
+PATCHES=(
+ "${FILESDIR}"/lensfun-0.3.4-python.patch
+ "${FILESDIR}"/lensfun-0.3.4-python-egg.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_DOCDIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DSETUP_PY_INSTALL_PREFIX=/usr
+ -DBUILD_LENSTOOL=ON
+ -DBUILD_STATIC=OFF
+ -DBUILD_DOC=$(usex doc)
+ -DBUILD_FOR_SSE=$(usex cpu_flags_x86_sse)
+ -DBUILD_FOR_SSE2=$(usex cpu_flags_x86_sse2)
+ -DBUILD_TESTS=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ mkdir -p "${T}/db/lensfun" || die
+ cp data/db/* "${T}/db/lensfun/" || die
+
+ XDG_DATA_HOME="${T}/db" cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+ python_fix_shebang "${ED}"/usr/bin
+ python_optimize
+}
diff --git a/media-libs/lensfun/lensfun-0.3.4_rc1.ebuild b/media-libs/lensfun/lensfun-0.3.4_rc1.ebuild
index 77c69c8..d6fb35d 100644
--- a/media-libs/lensfun/lensfun-0.3.4_rc1.ebuild
+++ b/media-libs/lensfun/lensfun-0.3.4_rc1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -28,17 +28,17 @@ RDEPEND="${PYTHON_DEPS}
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
- app-doc/doxygen
+ app-text/doxygen
dev-python/docutils
)
"
DOCS=( README.md docs/mounts.txt ChangeLog )
-PATCHES=( "${FILESDIR}/${P}_python.patch" )
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DOCDIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ -DSETUP_PY_INSTALL_PREFIX=/usr
-DBUILD_LENSTOOL=ON
-DBUILD_STATIC=OFF
-DBUILD_DOC=$(usex doc)
@@ -58,7 +58,5 @@ src_test() {
src_install() {
cmake_src_install
- python_moduleinto lensfun
- python_domodule "${BUILD_DIR}"/apps/lensfun/__init__.py
python_optimize
}