rebuilt by autoport with build requirements: libpodofo-devel>=0.10.2-1mamba [release 5.0.2-2mamba;Thu Nov 09 2023]
This commit is contained in:
parent
1d14d96701
commit
f2f5a32257
96
krename-5.0.2-podofo-0.10.patch
Normal file
96
krename-5.0.2-podofo-0.10.patch
Normal file
@ -0,0 +1,96 @@
|
||||
diff --git a/cmake/modules/FindPoDoFo.cmake b/cmake/modules/FindPoDoFo.cmake
|
||||
index 34c1422..b7ded90 100644
|
||||
--- a/cmake/modules/FindPoDoFo.cmake
|
||||
+++ b/cmake/modules/FindPoDoFo.cmake
|
||||
@@ -15,15 +15,8 @@
|
||||
# SPDX-FileCopyrightText: 2016 Pino Toscano <pino@kde.org>
|
||||
|
||||
|
||||
-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)
|
||||
@@ -40,17 +33,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)
|
||||
@@ -63,4 +58,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 68d34d8..b74e65c 100644
|
||||
--- a/src/podofoplugin.cpp
|
||||
+++ b/src/podofoplugin.cpp
|
||||
@@ -47,6 +47,25 @@ QString PodofoPlugin::processFile(BatchRenamer *b, int index, const QString &fil
|
||||
try {
|
||||
PdfMemDocument doc;
|
||||
doc.Load(filename.toUtf8().data());
|
||||
+#if (PODOFO_VERSION_MINOR>=10 || PODOFO_VERSION_MAJOR>=1)
|
||||
+ const PdfInfo *info = doc.GetInfo();
|
||||
+
|
||||
+ if (token == "pdfauthor") {
|
||||
+ return info->GetAuthor().has_value() ? QString::fromUtf8(info->GetAuthor()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdfcreator") {
|
||||
+ return info->GetCreator().has_value() ? QString::fromUtf8(info->GetCreator()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdfkeywords") {
|
||||
+ return info->GetKeywords().has_value() ? QString::fromUtf8(info->GetKeywords()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdfsubject") {
|
||||
+ return info->GetSubject().has_value() ? QString::fromUtf8(info->GetSubject()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdftitle") {
|
||||
+ return info->GetTitle().has_value() ? QString::fromUtf8(info->GetTitle()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdfproducer") {
|
||||
+ return info->GetProducer().has_value() ? QString::fromUtf8(info->GetProducer()->GetString().c_str()) : QString();
|
||||
+ } else if (token == "pdfpages") {
|
||||
+ return QString::number(doc.GetPages().GetCount());
|
||||
+ }
|
||||
+#else
|
||||
PdfInfo *info = doc.GetInfo();
|
||||
|
||||
if (token == "pdfauthor") {
|
||||
@@ -64,6 +83,7 @@ QString PodofoPlugin::processFile(BatchRenamer *b, int index, const QString &fil
|
||||
} else if (token == "pdfpages") {
|
||||
return QString::number(doc.GetPageCount());
|
||||
}
|
||||
+#endif
|
||||
} catch (PdfError &error) {
|
||||
return QString::fromUtf8(error.what());
|
||||
}
|
13
krename.spec
13
krename.spec
@ -1,6 +1,6 @@
|
||||
Name: krename
|
||||
Version: 5.0.2
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: krename offers an easy way to rename hundreds of files in one go
|
||||
Group: Graphical Desktop/Applications/Utilities
|
||||
Vendor: openmamba
|
||||
@ -12,6 +12,7 @@ Patch0: krename-4.0.9-libfreetype-2.4.11.patch
|
||||
Patch1: krename-4.0.9-cmake.patch
|
||||
Patch2: krename-4.0.9-libpodofo-0.9.3.patch
|
||||
Patch3: krename-4.0.9-gcc-6.1.0.patch
|
||||
Patch4: krename-5.0.2-podofo-0.10.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -44,7 +45,7 @@ BuildRequires: libtag-devel
|
||||
BuildRequires: libz-devel
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: libpodofo-devel >= 0:0.9.8-1mamba
|
||||
BuildRequires: libpodofo-devel >= 0.10.2-1mamba
|
||||
BuildRequires: libtag-devel >= 1.9
|
||||
|
||||
%description
|
||||
@ -52,8 +53,13 @@ Krename offers an easy way to rename hundreds of files in one go, giving you as
|
||||
You can use parts of the old filename, information like the current date or even an mp3 tag or the colour depth of an image.
|
||||
Krename integrates into the Konqueror or Krusader filemanager.
|
||||
|
||||
%define _default_patch_fuzz 2
|
||||
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch 4 -p1 -b .podofo-0.10
|
||||
|
||||
%build
|
||||
%cmake_kde5 -d build
|
||||
@ -80,6 +86,9 @@ Krename integrates into the Konqueror or Krusader filemanager.
|
||||
%doc AUTHORS COPYING TODO
|
||||
|
||||
%changelog
|
||||
* Thu Nov 09 2023 Automatic Build System <autodist@mambasoft.it> 5.0.2-2mamba
|
||||
- rebuilt by autoport with build requirements: libpodofo-devel>=0.10.2-1mamba
|
||||
|
||||
* Tue Sep 06 2022 Automatic Build System <autodist@mambasoft.it> 5.0.2-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user