From 136b379c553a72fbaf778333ada759ee75fc203a Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Sun, 3 May 2020 08:16:03 -0700 Subject: libraries/podofo: Updated for version 0.9.6 Signed-off-by: Larry Hajali Signed-off-by: Willy Sudiarto Raharjo --- libraries/podofo/XRefStrParObj-deprecated.patch | 61 +++++++++++++++++++++++++ libraries/podofo/podofo-0.9.4_build.patch | 12 ----- libraries/podofo/podofo.SlackBuild | 10 ++-- libraries/podofo/podofo.info | 6 +-- 4 files changed, 69 insertions(+), 20 deletions(-) create mode 100644 libraries/podofo/XRefStrParObj-deprecated.patch delete mode 100644 libraries/podofo/podofo-0.9.4_build.patch (limited to 'libraries') diff --git a/libraries/podofo/XRefStrParObj-deprecated.patch b/libraries/podofo/XRefStrParObj-deprecated.patch new file mode 100644 index 0000000000..d2a74b68b5 --- /dev/null +++ b/libraries/podofo/XRefStrParObj-deprecated.patch @@ -0,0 +1,61 @@ +diff -Naur podofo-0.9.6.orig/src/base/PdfXRefStreamParserObject.h podofo-0.9.6/src/base/PdfXRefStreamParserObject.h +--- podofo-0.9.6.orig/src/base/PdfXRefStreamParserObject.h 2014-06-06 22:13:22.000000000 +0000 ++++ podofo-0.9.6/src/base/PdfXRefStreamParserObject.h 2020-05-03 02:26:01.119538387 +0000 +@@ -47,8 +47,11 @@ + * an XRef stream object. + * + * It is mainly here to make PdfParser more modular. ++ * This is only marked PODOFO_API for the benefit of the tests, ++ * the class is for internal use only. It is deprecated, so ++ * don't ever rely on it (i.e. externally or in PoDoFo tools). + */ +-class PdfXRefStreamParserObject : public PdfParserObject { ++class PODOFO_DEPRECATED PODOFO_API PdfXRefStreamParserObject : public PdfParserObject { + public: + + /** Parse the object data from the given file handle starting at +diff -Naur podofo-0.9.6.orig/src/base/podofoapi.h podofo-0.9.6/src/base/podofoapi.h +--- podofo-0.9.6.orig/src/base/podofoapi.h 2017-10-27 06:38:19.000000000 +0000 ++++ podofo-0.9.6/src/base/podofoapi.h 2020-05-03 02:27:03.874537513 +0000 +@@ -173,9 +173,22 @@ + + /* Set up some other compiler-specific but not platform-specific macros */ + +-#if defined(__GNUC__) +- /* gcc will issue a warning if a function or variable so annotated is used */ +- #define PODOFO_DEPRECATED __attribute__((deprecated)) ++#ifdef __GNU__ ++ #define PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED 1 ++#elif defined(__has_attribute) ++ #if __has_attribute(__deprecated__) ++ #define PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED 1 ++ #endif ++#endif ++ ++#ifdef PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED ++ /* gcc (or compat. clang) will issue a warning if a function or variable so annotated is used */ ++ #define PODOFO_DEPRECATED __attribute__((__deprecated__)) ++#else ++ #define PODOFO_DEPRECATED ++#endif ++ ++#ifdef __GNU__ + /* gcc can do some additional optimisations on functions annotated as pure. + * See the documentation on __attribute__((pure)) in the gcc docs. */ + #define PODOFO_PURE_FUNCTION __attribute__((pure)) +@@ -185,9 +198,12 @@ + * (see CODINGSTYLE.txt) .*/ + #define PODOFO_NOTHROW __attribute__((nothrow)) + #else +- #define PODOFO_DEPRECATED +- #define PODOFO_PURE_FUNCTION +- #define PODOFO_NOTHROW __declspec(nothrow) ++ #define PODOFO_PURE_FUNCTION ++ #ifdef _MSC_VER ++ #define PODOFO_NOTHROW __declspec(nothrow) ++ #else ++ #define PODOFO_NOTHROW ++ #endif + #endif + + // Peter Petrov 27 April 2008 diff --git a/libraries/podofo/podofo-0.9.4_build.patch b/libraries/podofo/podofo-0.9.4_build.patch deleted file mode 100644 index 3c4b72a751..0000000000 --- a/libraries/podofo/podofo-0.9.4_build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN podofo-0.9.4/test/unit/EncryptTest.h podofo-0.9.4-new/test/unit/EncryptTest.h ---- podofo-0.9.4/test/unit/EncryptTest.h 2012-12-12 23:55:46.000000000 +0100 -+++ podofo-0.9.4-new/test/unit/EncryptTest.h 2016-09-18 10:41:30.476635230 +0200 -@@ -83,7 +83,7 @@ class EncryptTest : public CppUnit::Test - - private: - char* m_pEncBuffer; -- long m_lLen; -+ PoDoFo::pdf_long m_lLen; - int m_protection; - - }; diff --git a/libraries/podofo/podofo.SlackBuild b/libraries/podofo/podofo.SlackBuild index 926b5372d3..fcc3723ad3 100644 --- a/libraries/podofo/podofo.SlackBuild +++ b/libraries/podofo/podofo.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for podofo -# Copyright 2009-2017 Larry Hajali +# Copyright 2009-2020 Larry Hajali # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=podofo -VERSION=${VERSION:-0.9.5} +VERSION=${VERSION:-0.9.6} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} @@ -71,8 +71,8 @@ find -L . \ # Fix mandir directory. sed -i 's|share/man|man|' CMakeLists.txt -# Fix building podofo on x86 with cppunit. -patch -p1 < $CWD/podofo-0.9.4_build.patch +# Ref: https://sourceforge.net/p/podofo/tickets/28/ +patch -p1 < $CWD/XRefStrParObj-deprecated.patch mkdir build cd build @@ -92,7 +92,7 @@ cd build make install DESTDIR=$PKG cd - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG/usr/man -type f -exec gzip -9 {} \; diff --git a/libraries/podofo/podofo.info b/libraries/podofo/podofo.info index 411003ffcd..5a97ef24ef 100644 --- a/libraries/podofo/podofo.info +++ b/libraries/podofo/podofo.info @@ -1,8 +1,8 @@ PRGNAM="podofo" -VERSION="0.9.5" +VERSION="0.9.6" HOMEPAGE="http://podofo.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/podofo/podofo-0.9.5.tar.gz" -MD5SUM="4751a6cf41250bea550a73ff960b7228" +DOWNLOAD="http://downloads.sourceforge.net/podofo/podofo-0.9.6.tar.gz" +MD5SUM="46336fc4c4ce4be814bb5fbb4d918334" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -- cgit v1.2.3