diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..0a80fdce31f59c062e2abba28776e9521eddff30 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..2c727c88eed738499363d8c9d78b6cbab2436c45 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/qpdf diff --git a/0001-Tune-QUtil-hex_encode.patch b/0001-Tune-QUtil-hex_encode.patch deleted file mode 100644 index a9ae8c61323b9715814692821a9f6ba37bfb0330..0000000000000000000000000000000000000000 --- a/0001-Tune-QUtil-hex_encode.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ae800361fefb6d30d054f5d90af310c85765b044 Mon Sep 17 00:00:00 2001 -From: m-holger -Date: Thu, 22 Sep 2022 20:13:51 +0100 -Subject: [PATCH] Tune QUtil::hex_encode - -Reference: https://github.com/qpdf/qpdf/commit/ae800361fefb6d30d054f5d90af310c85765b044 ---- - libqpdf/QUtil.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc -index 98a8f318..bcf4aa4e 100644 ---- a/libqpdf/QUtil.cc -+++ b/libqpdf/QUtil.cc -@@ -769,10 +769,12 @@ QUtil::make_unique_cstr(std::string const& str) - std::string - QUtil::hex_encode(std::string const& input) - { -+ static auto constexpr hexchars = "0123456789abcdef"; - std::string result; -- for (unsigned int i = 0; i < input.length(); ++i) { -- result += QUtil::int_to_string_base( -- QIntC::to_int(static_cast(input.at(i))), 16, 2); -+ result.reserve(2 * input.length()); -+ for (const char c: input) { -+ result += hexchars[static_cast(c) >> 4]; -+ result += hexchars[c & 0x0f]; - } - return result; - } --- -2.39.3 - diff --git a/qpdf-11.1.0.tar.gz b/qpdf-11.1.0.tar.gz deleted file mode 100644 index 7564c7eaaaf03eb80696804a6702ad9fe3672f88..0000000000000000000000000000000000000000 Binary files a/qpdf-11.1.0.tar.gz and /dev/null differ diff --git a/qpdf-11.10.1.tar.gz b/qpdf-11.10.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b1e53e190b6d9df3015d1d9388b0703dea4f6c9d --- /dev/null +++ b/qpdf-11.10.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:defca435cf57d26f8a0619864841aa21f5469fddc6eb5662f62d8443021c069d +size 19497326 diff --git a/qpdf.spec b/qpdf.spec index 795526eeacc716544aeffe72d194d4ac84b5b697..49509ec411b657747a8e5fc6475acc879b3a2479 100644 --- a/qpdf.spec +++ b/qpdf.spec @@ -1,12 +1,12 @@ +%undefine __cmake_in_source_build + Name: qpdf -Version: 11.1.0 -Release: 3 +Version: 11.10.1 +Release: 1 Summary: A command-line program to transform PDF files -License: (Artistic 2.0 or ASL 2.0) and MIT -URL: http://qpdf.sourceforge.net/ -Source0: http://downloads.sourceforge.net/sourceforge/qpdf/qpdf-%{version}.tar.gz - -Patch0001: 0001-Tune-QUtil-hex_encode.patch +License: Apache-2.0 OR Artistic-2.0 +URL: https://qpdf.sourceforge.io/ +Source0: https://github.com/qpdf/qpdf/releases/download/v%{version}/qpdf-%{version}.tar.gz BuildRequires: gcc gcc-c++ zlib-devel libjpeg-turbo-devel pcre-devel BuildRequires: perl-interpreter perl-generators perl(Digest::MD5) @@ -42,11 +42,7 @@ This package contains some man help and other files for %{name}. %autosetup -n %{name}-%{version} -p1 %build -export CFLAGS="${RPM_OPT_FLAGS}" -export CXXFLAGS="${RPM_OPT_FLAGS}" -export LDFLAGS="${RPM_LD_FLAGS}" - -cmake -S . -B build \ +%cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG \ -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG \ -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG \ @@ -57,24 +53,26 @@ cmake -S . -B build \ -DREQUIRE_CRYPTO_GNUTLS=1 \ -DUSE_IMPLICIT_CRYPTO=0 \ -DSHOW_FAILED_TEST_OUTPUT=1 \ - -DINSTALL_CMAKE_PACKAGE=0 -cmake --build build + -DINSTALL_EXAMPLES=OFF +%cmake_build %install -cmake --install build --prefix %{buildroot}/usr -rm -rf %{buildroot}/usr/lib64/cmake -rm -rf %{buildroot}/usr/lib64/libqpdf.a +%cmake_install -%delete_la +rm -f %{buildroot}%{_datadir}/doc/qpdf/*.txt -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +# install bash/zsh completions +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +mkdir -p %{buildroot}%{_datadir}/zsh/site-functions +install -m 0644 completions/bash/qpdf %{buildroot}%{_datadir}/bash-completion/completions/qpdf +install -m 0644 completions/zsh/_qpdf %{buildroot}%{_datadir}/zsh/site-functions/_qpdf %files -%doc README.md TODO ChangeLog -%license Artistic-2.0 +%doc README.md TODO.md ChangeLog +%license Artistic-2.0 LICENSE.txt NOTICE.md %{_bindir}/* +%{_datadir}/bash-completion/completions/qpdf +%{_datadir}/zsh/site-functions/_qpdf %{_libdir}/libqpdf.so.* %files devel @@ -82,12 +80,15 @@ rm -rf %{buildroot}/usr/lib64/libqpdf.a %{_includedir}/qpdf/ %{_libdir}/libqpdf.so %{_libdir}/pkgconfig/libqpdf.pc +%{_libdir}/cmake/qpdf %files help -%{_pkgdocdir} %{_mandir}/man1/* %changelog +* Fri Feb 28 2025 Funda Wang - 11.10.1-1 +- update to 11.10.1 + * Fri May 10 2024 lixiaoyong - 11.1.0-3 - Tune QUtil::hex_encode diff --git a/qpdf.yaml b/qpdf.yaml index f9a529fd60a20532ba954770213a06dd25a86cd4..25fd601325a80b4bebcd6e713fc50a04b3d9301e 100644 --- a/qpdf.yaml +++ b/qpdf.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: qpdf/qpdf tag_prefix: ^release-qpdf- -seperator: . +separator: .