[gentoo-commits] repo/gentoo:master commit in: kde-misc/krename/files/, kde-misc/krename/
commit: ec7cf9f84477ba75203a7182ad5d720259d90874 Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Sep 21 18:38:09 2023 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Sep 21 18:42:32 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec7cf9f8 kde-misc/krename: Fix configure with >=app-text/podofo-0.10 Closes: https://bugs.gentoo.org/914497 Signed-off-by: Andreas Sturmlechner gentoo.org> .../krename/files/krename-5.0.2-podofo-0.10.patch | 319 + kde-misc/krename/krename-5.0.2-r1.ebuild | 5 +- 2 files changed, 323 insertions(+), 1 deletion(-) diff --git a/kde-misc/krename/files/krename-5.0.2-podofo-0.10.patch b/kde-misc/krename/files/krename-5.0.2-podofo-0.10.patch new file mode 100644 index ..3410e3f20c2d --- /dev/null +++ b/kde-misc/krename/files/krename-5.0.2-podofo-0.10.patch @@ -0,0 +1,319 @@ +From 0528606297a82aae46cb5e44a2bb406cbc033615 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Mon, 17 Jul 2023 20:29:37 + +Subject: [PATCH 1/2] Support podofo 0.10 + +Version 0.10 of podofo is a complete rewrite. krename's use of it is minimal, so porting is easy. + +Switch the cmake module to use pkgconfig, which is available since 0.9.5 (release in 2017). + +Unfortunately, the hack to find the version number is still needed, since the pc file is buggy and ships an empty "Version" field. +--- + cmake/modules/FindPoDoFo.cmake | 31 +++ + src/podofoplugin.cpp | 20 + 2 files changed, 35 insertions(+), 16 deletions(-) + +diff --git a/cmake/modules/FindPoDoFo.cmake b/cmake/modules/FindPoDoFo.cmake +index 3d044f0..c771149 100644 +--- a/cmake/modules/FindPoDoFo.cmake b/cmake/modules/FindPoDoFo.cmake +@@ -36,15 +36,8 @@ + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-find_path(PoDoFo_INCLUDE_DIRS +- NAMES podofo/podofo.h +-) +-find_library(PoDoFo_LIBRARIES +- NAMES libpodofo podofo +-) +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(PoDoFo DEFAULT_MSG PoDoFo_LIBRARIES PoDoFo_INCLUDE_DIRS) ++include(FindPkgConfig) ++pkg_search_module(PoDoFo libpodofo libpodofo-0) + + set(PoDoFo_DEFINITIONS) + if(PoDoFo_FOUND) +@@ -61,17 +54,19 @@ if(PoDoFo_FOUND) + endif() + endif() + +- # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public +- # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will +- # hopefully be released soon with 0.9.6. Note that krename doesn't use +- # OpenSSL in any way. +- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$") +- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$") +- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$") ++ find_file(PoDoFo_CONFIG podofo_config.h PATHS ${PoDoFo_INCLUDE_DIRS} PATH_SUFFIXES auxiliary base) ++ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$") ++ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$") ++ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MAJOR_VER "${PoDoFo_MAJOR_VER_LINE}") + string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MINOR_VER "${PoDoFo_MINOR_VER_LINE}") + string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+([0-9]+)$" "\\1" PoDoFo_PATCH_VER "${PoDoFo_PATCH_VER_LINE}") + set(PoDoFo_VERSION "${PoDoFo_MAJOR_VER}.${PoDoFo_MINOR_VER}.${PoDoFo_PATCH_VER}") ++ ++ # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public ++ # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will ++ # hopefully be released soon with 0.9.6. Note that krename doesn't use ++ # OpenSSL in any way. + if(PoDoFo_VERSION VERSION_EQUAL "0.9.5") + find_package(OpenSSL) + if (OpenSSL_FOUND) +@@ -84,4 +79,8 @@ if(PoDoFo_FOUND) + endif() + endif() + ++if(PoDoFo_VERSION VERSION_GREATER_EQUAL 0.10.0) ++ set(CMAKE_CXX_STANDARD 17) ++endif() ++ + mark_as_advanced(PoDoFo_INCLUDE_DIRS PoDoFo_LIBRARIES PoDoFo_DEFINITIONS) +diff --git a/src/podofoplugin.cpp b/src/podofoplugin.cpp +index 9bcce21..79fd735 100644 +--- a/src/podofoplugin.cpp b/src/podofoplugin.cpp +@@ -61,6 +61,25 @@ QString PodofoPlugin::processFile(BatchRenamer *b, int index, const QString &fil + try { + PdfMemDocument doc; + doc.Load(filename.toUtf8().data()); ++#if (
[gentoo-commits] repo/gentoo:master commit in: kde-misc/krename/files/, kde-misc/krename/
commit: 50d9a0b2d140eb64e955826acd7b30c31959d014 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun May 28 12:02:03 2023 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun May 28 12:44:06 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d9a0b2 kde-misc/krename: Fix build with >=exiv2-0.28 5.0.2-r0: Switch to patchset and cleanup slightly oversize patch. Closes: https://bugs.gentoo.org/906471 Signed-off-by: Andreas Sturmlechner gentoo.org> kde-misc/krename/Manifest | 1 + kde-misc/krename/files/krename-5.0.1-no-kjs.patch | 519 - ...rename-5.0.2.ebuild => krename-5.0.2-r1.ebuild} | 9 +- kde-misc/krename/krename-5.0.2.ebuild | 7 +- 4 files changed, 10 insertions(+), 526 deletions(-) diff --git a/kde-misc/krename/Manifest b/kde-misc/krename/Manifest index e7d89374b2cd..7df8124fb483 100644 --- a/kde-misc/krename/Manifest +++ b/kde-misc/krename/Manifest @@ -1 +1,2 @@ +DIST krename-5.0.2-patchset-1.tar.xz 6360 BLAKE2B 69e8b046885be27c77d5d315e994e8b2a31e76ed76f4ea6d030679b83133725cb0577d818841b1f41e566e757f4cbd4e08c1f479bc1d572a8391db47c4a26e8c SHA512 2de0ee19d29dadb50995b0d02e486e8efdbff3d3fda0a3a6ec69f4b5858b4c376b3d33d2018da0cf209fe8b4ea58f4de21f6d2864c2c22b60830b5ac9bcf DIST krename-5.0.2.tar.xz 337908 BLAKE2B 2fb7a96ca3f3f3b193d0924dd1131a7442b32149c1f62387734c47680077b6f77e3cf32b940b85d6f688d24f24af08ac39a8ccc86f10f5ec1d65b53fc9631108 SHA512 c065d6de90c43e5297db2773d8569279535b007d3b00b99a252329e78c90dc949678ecd2f2ecaa74e72394fa0e848b8774f6f387d4a7f367b367b1dd38405545 diff --git a/kde-misc/krename/files/krename-5.0.1-no-kjs.patch b/kde-misc/krename/files/krename-5.0.1-no-kjs.patch deleted file mode 100644 index f4b7eb786890.. --- a/kde-misc/krename/files/krename-5.0.1-no-kjs.patch +++ /dev/null @@ -1,519 +0,0 @@ -From 407b612a93128b9f935a686d5ff82c7ee06087f5 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Thu, 17 Dec 2020 13:19:56 +0100 -Subject: [PATCH 1/5] reduce nesting - -easier on the eyes - src/scriptplugin.cpp | 63 +++- - 1 file changed, 33 insertions(+), 30 deletions(-) - -diff --git a/src/scriptplugin.cpp b/src/scriptplugin.cpp -index 0790fd4..8f4b11e 100644 a/src/scriptplugin.cpp -+++ b/src/scriptplugin.cpp -@@ -175,36 +175,39 @@ void ScriptPlugin::initKRenameVars(const KRenameFile &file, int index) - file.srcDirectory()); - - // User definitions, set them only on first file --if (index == 0) { --for (int i = 0; i < m_widget->listVariables->topLevelItemCount(); i++) { --// TODO, we have to know the type of the variable! --QTreeWidgetItem *item = m_widget->listVariables->topLevelItem(i); --if (item) { --EVarType eVarType = static_cast(item->data(1, Qt::UserRole).toInt()); --const QString &name = item->text(0); --const QString &value = item->text(1); --switch (eVarType) { --default: --case eVarType_String: -- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), --name, value.toUtf8().data()); --break; --case eVarType_Int: -- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), --name, value.toInt()); --break; --case eVarType_Double: -- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), --name, value.toDouble()); --break; --case eVarType_Bool: -- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), --name, --(value.toLower() == "true" ? true : false)); --break; -- --} --} -+if (index != 0) { -+return; -+} -+ -+for (int i = 0; i < m_widget->listVariables->topLevelItemCount(); i++) { -+// TODO, we have to know the type of the variable! -+QTreeWidgetItem *item = m_widget->listVariables->topLevelItem(i); -+if (!item) { -+continue; -+} -+ -+EVarType eVarType = static_cast(item->data(1, Qt::UserRole).toInt()); -+const QString &name = item->text(0); -+const QString &value = item->text(1); -+switch (eVarType) { -+default: -+case eVarType_String: -+ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), -+name, value.toUtf8().data()); -+break; -+case eVarType_Int: -+ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), -+name, value.toInt()); -+
[gentoo-commits] repo/gentoo:master commit in: kde-misc/krename/files/, kde-misc/krename/
commit: 1ae704f776b6fa2a67376a920bdaf6635ec971b6 Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Dec 18 12:25:59 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Dec 18 13:43:56 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae704f7 kde-misc/krename: Backport upstream patch dropping kde-frameworks/kjs Upstream commit e0a93830d0ea0c71ab649b7e68af0238bd48eb10 Closes: https://bugs.gentoo.org/760543 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner gentoo.org> kde-misc/krename/files/krename-5.0.1-no-kjs.patch | 519 ++ kde-misc/krename/krename-5.0.1-r1.ebuild | 58 +++ 2 files changed, 577 insertions(+) diff --git a/kde-misc/krename/files/krename-5.0.1-no-kjs.patch b/kde-misc/krename/files/krename-5.0.1-no-kjs.patch new file mode 100644 index 000..f4b7eb78689 --- /dev/null +++ b/kde-misc/krename/files/krename-5.0.1-no-kjs.patch @@ -0,0 +1,519 @@ +From 407b612a93128b9f935a686d5ff82c7ee06087f5 Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Thu, 17 Dec 2020 13:19:56 +0100 +Subject: [PATCH 1/5] reduce nesting + +easier on the eyes +--- + src/scriptplugin.cpp | 63 +++- + 1 file changed, 33 insertions(+), 30 deletions(-) + +diff --git a/src/scriptplugin.cpp b/src/scriptplugin.cpp +index 0790fd4..8f4b11e 100644 +--- a/src/scriptplugin.cpp b/src/scriptplugin.cpp +@@ -175,36 +175,39 @@ void ScriptPlugin::initKRenameVars(const KRenameFile &file, int index) + file.srcDirectory()); + + // User definitions, set them only on first file +-if (index == 0) { +-for (int i = 0; i < m_widget->listVariables->topLevelItemCount(); i++) { +-// TODO, we have to know the type of the variable! +-QTreeWidgetItem *item = m_widget->listVariables->topLevelItem(i); +-if (item) { +-EVarType eVarType = static_cast(item->data(1, Qt::UserRole).toInt()); +-const QString &name = item->text(0); +-const QString &value = item->text(1); +-switch (eVarType) { +-default: +-case eVarType_String: +- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), +-name, value.toUtf8().data()); +-break; +-case eVarType_Int: +- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), +-name, value.toInt()); +-break; +-case eVarType_Double: +- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), +-name, value.toDouble()); +-break; +-case eVarType_Bool: +- m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), +-name, +-(value.toLower() == "true" ? true : false)); +-break; +- +-} +-} ++if (index != 0) { ++return; ++} ++ ++for (int i = 0; i < m_widget->listVariables->topLevelItemCount(); i++) { ++// TODO, we have to know the type of the variable! ++QTreeWidgetItem *item = m_widget->listVariables->topLevelItem(i); ++if (!item) { ++continue; ++} ++ ++EVarType eVarType = static_cast(item->data(1, Qt::UserRole).toInt()); ++const QString &name = item->text(0); ++const QString &value = item->text(1); ++switch (eVarType) { ++default: ++case eVarType_String: ++ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), ++name, value.toUtf8().data()); ++break; ++case eVarType_Int: ++ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), ++name, value.toInt()); ++break; ++case eVarType_Double: ++ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), ++name, value.toDouble()); ++break; ++case eVarType_Bool: ++ m_interpreter->globalObject().setProperty(m_interpreter->globalContext(), ++name, ++(value.toLower() == "true" ? true : false)); ++break; + } + } + } +-- +2.29.2 + + +From f80de4b81846da45c4cc16c585a159872dcc2c29 Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Thu, 17 Dec 2020 13:24:37 +0100 +Subject: [PATCH 2/5] don't needlessly use qpointer + +for one it has no value, scopedpointer might. we don't need a pointer +at all though, simply put qdialog on the stack and let the compiler +take care of it +--- + src/scriptplugin.cpp | 44 ++---
[gentoo-commits] repo/gentoo:master commit in: kde-misc/krename/files/, kde-misc/krename/
commit: 6c9ac5f10af7c87b21d9eb1276cb4692cb4d4932 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Dec 25 15:12:11 2018 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Dec 25 21:23:19 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c9ac5f1 kde-misc/krename: Backport >=exiv-0.27 support from master Instead of adding FindLibExiv2.cmake through the patch we will just bump minimum depend to FRAMEWORKS_MINIMAL=5.53.0. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner gentoo.org> .../krename/files/krename-5.0.0-exiv2-0.27.patch | 188 + kde-misc/krename/krename-5.0.0-r1.ebuild | 55 ++ 2 files changed, 243 insertions(+) diff --git a/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch b/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch new file mode 100644 index 000..fdc13a1815e --- /dev/null +++ b/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch @@ -0,0 +1,188 @@ +From ec90823494f5ec9bb2e8098f44209f383ef8c22a Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Tue, 20 Nov 2018 18:24:29 +0100 +Subject: Use #cmakedefine01 instead of macro_bool_to_01 + +--- + CMakeLists.txt| 13 + + config-krename.h.cmake| 10 +- + 3 files changed, 10 insertions(+), 33 deletions(-) + delete mode 100644 cmake/modules/MacroBoolTo01.cmake + +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -80,13 +80,10 @@ set_package_properties(Freetype PROPERTIES + + feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) + +- +-# Update configuration +-include(MacroBoolTo01) +-macro_bool_to_01(TAGLIB_FOUND HAVE_TAGLIB) +-macro_bool_to_01(EXIV2_FOUND HAVE_EXIV2) +-macro_bool_to_01(PoDoFo_FOUND HAVE_PODOFO) +-macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) ++set(HAVE_TAGLIB ${TAGLIB_FOUND}) ++set(HAVE_EXIV2 ${LibExiv2_FOUND}) ++set(HAVE_PODOFO ${PoDoFo_FOUND}) ++set(HAVE_FREETYPE ${FREETYPE_FOUND}) + configure_file(config-krename.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-krename.h) + + # Directories +--- a/config-krename.h.cmake b/config-krename.h.cmake +@@ -1,15 +1,15 @@ + /* config.h. Generated by cmake from config.h.cmake */ + + /* have TagLib */ +-#define HAVE_TAGLIB ${HAVE_TAGLIB} ++#cmakedefine01 HAVE_TAGLIB + + /* have Exiv2 */ +-#define HAVE_EXIV2 ${HAVE_EXIV2} ++#cmakedefine01 HAVE_EXIV2 + + /* have PoDoFo */ +-#define HAVE_PODOFO ${HAVE_PODOFO} ++#cmakedefine01 HAVE_PODOFO + + /* have Freetype */ +-#define HAVE_FREETYPE ${HAVE_FREETYPE} ++#cmakedefine01 HAVE_FREETYPE + +-#define VERSION "${KRENAME_VERSION}" ++#define VERSION "${krename_VERSION}" +-- +cgit v1.1 + +From b22de9135ba2a5abdbd2b275a60933a50f074010 Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Tue, 20 Nov 2018 18:26:47 +0100 +Subject: Fix building against exiv2-0.27 + +One neeeded part is to copy over the new FindLibExiv2 module from +ECM which has not appeared in a release yet (it will with 5.53.0). +I'll probably add that version as a requirement and remove the copy +again in the near future. +The other part includes raising the cmake version requirement to +3.7.0, which was released over 2 years ago. (The version comparison +could be easily solved differently and less elegantly, but let's see +if people with ancient cmakes complain). +--- + CMakeLists.txt | 15 ++--- + config-krename.h.cmake | 3 + + src/CMakeLists.txt | 8 +-- + src/exiv2plugin.cpp | 8 ++- + 6 files changed, 137 insertions(+), 91 deletions(-) + delete mode 100644 cmake/modules/FindExiv2.cmake + create mode 100644 cmake/modules/FindLibExiv2.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -1,4 +1,5 @@ +-project(krename) + +-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.7) ++ ++project(krename VERSION "5.0.0") + +@@ -39,10 +40,6 @@ add_definitions( + -DQT_STRICT_ITERATORS + ) + +-set(KRENAME_VERSION "5.0.0") +- +-include(FindGettext) +- + # Find taglib + set(TAGLIB_MIN_VERSION "1.5") + find_package(Taglib ${TAGLIB_MIN_VERSION}) +@@ -58,11 +55,12 @@ set_package_properties(Taglib PROPERTIES + TYPE OPTIONAL) + + # Find exiv2 +-find_package(Exiv2 0.13) # AccessMode was added in 0.13 +-set_package_properties(Exiv2 PROPERTIES +-DESCRIPTION "A library to access image metadata" +-URL "http://www.exiv2.org"; +-TYPE OPTIONAL) ++find_package(LibExiv2 0.13) # AccessMode was added in 0.13 ++set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL) ++ ++if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27") ++set(HAVE_LIBEXIV2_0_27 TRUE) ++endif() + + # Find podofo + find_package(PoDoFo) +--- a/config-krename.h.cmake b/config-krename.h.cmake +@@ -6,6 +6,9 @@ + /* have Exiv2 */ + #cmakedefine01 HAVE_EXIV2 + ++/* Defined if we have libexiv2 >= 0.27 */ ++#cmakedefine HAVE_LIBEXIV2_0_27 ++