Update to 0.9.4

epel9
Sandro Mani 8 years ago
parent 1038ccd0c5
commit f94a067c0f

1
.gitignore vendored

@ -3,3 +3,4 @@ podofo-0.8.1.tar.gz
/podofo-0.8.4.tar.gz /podofo-0.8.4.tar.gz
/podofo-0.9.0.tar.gz /podofo-0.9.0.tar.gz
/podofo-0.9.1.tar.gz /podofo-0.9.1.tar.gz
/podofo-0.9.4.tar.gz

@ -1,23 +0,0 @@
diff -up podofo-0.9.1/CMakeLists.txt.freetype podofo-0.9.1/CMakeLists.txt
--- podofo-0.9.1/CMakeLists.txt.freetype 2011-04-26 20:02:47.000000000 +0200
+++ podofo-0.9.1/CMakeLists.txt 2014-06-10 13:53:44.563899433 +0200
@@ -351,8 +351,8 @@ ENDIF(CppUnit_FOUND)
FIND_PACKAGE(OpenSSL)
-FIND_PACKAGE(FREETYPE REQUIRED)
-MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIR}")
+FIND_PACKAGE(Freetype REQUIRED)
+MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIRS}")
FIND_PACKAGE(LIBSTLPORT)
SET(stlport_libraries_if_use_stlport)
@@ -448,7 +448,7 @@ INCLUDE_DIRECTORIES(
${PoDoFo_BINARY_DIR}
${PoDoFo_SOURCE_DIR}
${PoDoFo_SOURCE_DIR}/src
- ${FREETYPE_INCLUDE_DIR}
+ ${FREETYPE_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${EXTRA_INCLUDES}
)

@ -1,100 +0,0 @@
diff -up podofo-0.9.1/tools/podofocolor/lua_compat.h.lua52 podofo-0.9.1/tools/podofocolor/lua_compat.h
--- podofo-0.9.1/tools/podofocolor/lua_compat.h.lua52 2010-12-29 18:36:59.000000000 +0100
+++ podofo-0.9.1/tools/podofocolor/lua_compat.h 2013-08-20 16:23:00.356712464 +0200
@@ -11,14 +11,38 @@ extern "C" {
#define LUA_VERSION_NUM 0
#endif
-// Handle an API difference in the dofile call between
+// Handle an API difference in the lua_open call between
+// Lua 5.1 and Lua 5.2.
+#if LUA_VERSION_NUM >= 502
+inline lua_State* imp_lua_open(void) {
+ return luaL_newstate();
+}
+inline size_t imp_lua_objlen(lua_State *L, int index) {
+ return lua_rawlen(L, index);
+}
+#else
+inline lua_State* imp_lua_open(void) {
+ return lua_open();
+}
+inline size_t imp_lua_objlen(lua_State *L, int index) {
+ return lua_objlen(L, index);
+}
+#endif
+
+// Handle an API difference in the dofile and getn calls between
// Lua 5.0 and Lua 5.1.
#if LUA_VERSION_NUM >= 501
inline int imp_lua_dofile(lua_State* L, const char * path) {
return luaL_dofile(L, path);
}
+inline int imp_lua_getn(lua_State *L, int t) {
+ return imp_lua_objlen(L, t);
+}
#else
inline int imp_lua_dofile(lua_State* L, const char * path) {
return lua_dofile(L, path);
}
+inline int imp_lua_getn(lua_State *L, int t) {
+ return luaL_getn(L, t);
+}
#endif
diff -up podofo-0.9.1/tools/podofocolor/luaconverter.cpp.lua52 podofo-0.9.1/tools/podofocolor/luaconverter.cpp
--- podofo-0.9.1/tools/podofocolor/luaconverter.cpp.lua52 2010-12-29 19:08:31.000000000 +0100
+++ podofo-0.9.1/tools/podofocolor/luaconverter.cpp 2013-08-20 16:23:00.356712464 +0200
@@ -44,7 +44,7 @@ using namespace PoDoFo;
LuaMachina::LuaMachina()
{
/* Init the Lua interpreter */
- L = lua_open();
+ L = imp_lua_open();
if (!L)
{
throw std::runtime_error("Whoops! Failed to open lua!");
@@ -117,7 +117,7 @@ PdfColor LuaConverter::GetColorFromRetur
size_t len;
luaL_checktype(m_machina.State(), 1, LUA_TTABLE);
- len = luaL_getn( m_machina.State(), -1 );
+ len = imp_lua_getn( m_machina.State(), -1 );
// Lua 5.1 only
//len = lua_objlen( m_machina.State(), -1 );
diff -up podofo-0.9.1/tools/podofoimpose/lua_compat.h.lua52 podofo-0.9.1/tools/podofoimpose/lua_compat.h
--- podofo-0.9.1/tools/podofoimpose/lua_compat.h.lua52 2008-10-16 11:10:18.000000000 +0200
+++ podofo-0.9.1/tools/podofoimpose/lua_compat.h 2013-08-20 16:23:00.357712447 +0200
@@ -11,7 +11,19 @@ extern "C" {
#define LUA_VERSION_NUM 0
#endif
-// Handle an API difference in the dofile call between
+// Handle an API difference in the lua_open call between
+// Lua 5.1 and Lua 5.2.
+#if LUA_VERSION_NUM >= 502
+inline lua_State* imp_lua_open(void) {
+ return luaL_newstate();
+}
+#else
+inline lua_State* imp_lua_open(void) {
+ return lua_open();
+}
+#endif
+
+// Handle an API difference in the dofile and getn calls between
// Lua 5.0 and Lua 5.1.
#if LUA_VERSION_NUM >= 501
inline int imp_lua_dofile(lua_State* L, const char * path) {
diff -up podofo-0.9.1/tools/podofoimpose/planreader_lua.cpp.lua52 podofo-0.9.1/tools/podofoimpose/planreader_lua.cpp
--- podofo-0.9.1/tools/podofoimpose/planreader_lua.cpp.lua52 2013-08-20 16:23:00.357712447 +0200
+++ podofo-0.9.1/tools/podofoimpose/planreader_lua.cpp 2013-08-20 16:24:50.856848739 +0200
@@ -24,7 +24,7 @@ LuaMachina::LuaMachina()
{
int error;
/* Init the Lua interpreter */
- L = lua_open();
+ L = imp_lua_open();
if (!L)
{
throw std::runtime_error("Whoops! Failed to open lua!");

@ -1,11 +0,0 @@
diff -up podofo-0.9.1/test/unit/TestUtils.cpp.unistd podofo-0.9.1/test/unit/TestUtils.cpp
--- podofo-0.9.1/test/unit/TestUtils.cpp.unistd 2012-01-16 18:12:52.000000000 +0100
+++ podofo-0.9.1/test/unit/TestUtils.cpp 2012-01-16 18:13:00.000000000 +0100
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>

@ -0,0 +1,28 @@
diff -rupN podofo-0.9.4/src/base/PdfMemoryManagement.h podofo-0.9.4-new/src/base/PdfMemoryManagement.h
--- podofo-0.9.4/src/base/PdfMemoryManagement.h 2016-05-13 16:04:34.000000000 +0200
+++ podofo-0.9.4-new/src/base/PdfMemoryManagement.h 2016-09-23 20:19:54.435500447 +0200
@@ -34,6 +34,10 @@
#ifndef _PDF_MEMORY_MANAGEMENT_H_
#define _PDF_MEMORY_MANAGEMENT_H_
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+
#include "PdfDefines.h"
#include <stdlib.h>
diff -rupN podofo-0.9.4/src/base/PdfParser.h podofo-0.9.4-new/src/base/PdfParser.h
--- podofo-0.9.4/src/base/PdfParser.h 2016-05-08 19:03:27.000000000 +0200
+++ podofo-0.9.4-new/src/base/PdfParser.h 2016-09-23 20:19:54.435500447 +0200
@@ -34,6 +34,10 @@
#ifndef _PDF_PARSER_H_
#define _PDF_PARSER_H_
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+
#include "PdfDefines.h"
#include "PdfTokenizer.h"
#include "PdfVecObjects.h"

@ -1,26 +1,39 @@
Name: podofo Name: podofo
Version: 0.9.1 Version: 0.9.4
Release: 18%{?dist} Release: 1%{?dist}
Summary: Tools and libraries to work with the PDF file format Summary: Tools and libraries to work with the PDF file format
Group: Applications/Publishing # The library is licensed under the LGPL.
License: GPLv2+ # The tests and tools which are included in PoDoFo are licensed under the GPL.
# See the files COPYING and COPYING.LIB for details, see COPYING.exception.
License: GPLv2+ and LGPLv2+ with exceptions
URL: http://podofo.sourceforge.net URL: http://podofo.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: %{name}-0.9.1-unistd.patch # Fix failure to detect FreeType
Patch1: %{name}-0.9.1-lua52.patch Patch0: podofo-0.9.4-freetype.patch
Patch2: %{name}-0.9.1-freetype.patch # Fix build failure
Patch1: podofo-0.9.4_build.patch
# Fix undefined INT_MAX
Patch2: podofo-0.9.4-intmax.patch
BuildRequires: gcc-c++
%if %{?el7:1}%{!?el7:0}
BuildRequires: cmake3
%else
BuildRequires: cmake BuildRequires: cmake
BuildRequires: zlib-devel %endif
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: ghostscript
BuildRequires: libidn-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: freetype-devel BuildRequires: libtiff-devel
BuildRequires: fontconfig-devel
BuildRequires: cppunit-devel
BuildRequires: lua-devel BuildRequires: lua-devel
BuildRequires: doxygen BuildRequires: texlive-epstopdf-bin
BuildRequires: zlib-devel
%description %description
@ -39,7 +52,6 @@ your own application using PoDoFo.
%package libs %package libs
Summary: Runtime library for %{name} Summary: Runtime library for %{name}
Group: System Environment/Libraries
License: LGPLv2+ License: LGPLv2+
%description libs %description libs
@ -48,19 +60,15 @@ Runtime library for %{name}.
%package devel %package devel
Summary: Development files for %{name} library Summary: Development files for %{name} library
Group: Development/Libraries
License: LGPLv2+ License: LGPLv2+
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel %description devel
Development files and documentation for the %{name} library. Development files and documentation for the %{name} library.
%prep %prep
%setup -q %autosetup -p1
%patch0 -p1 -b .unistd
%patch1 -p1 -b .lua52
%patch2 -p1 -b .freetype
# disable timestamps in docs # disable timestamps in docs
echo "HTML_TIMESTAMP = NO" >> Doxyfile echo "HTML_TIMESTAMP = NO" >> Doxyfile
@ -71,12 +79,16 @@ rm cmake/modules/FindZLIB.cmake
%build %build
%if %{?el7:1}%{!?el7:0}
%cmake3 -DPODOFO_BUILD_SHARED=1 \
%else
%cmake -DPODOFO_BUILD_SHARED=1 \ %cmake -DPODOFO_BUILD_SHARED=1 \
%endif
%if 0%{?__isa_bits} == 64 %if 0%{?__isa_bits} == 64
-DWANT_LIB64=1 \ -DWANT_LIB64=1 \
%endif %endif
. .
make %{?_smp_mflags} %make_build
# build the docs # build the docs
doxygen doxygen
@ -86,7 +98,7 @@ find doc/html -exec touch -r %{SOURCE0} {} \;
%install %install
make install DESTDIR=$RPM_BUILD_ROOT %make_install
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -95,21 +107,25 @@ make install DESTDIR=$RPM_BUILD_ROOT
%files %files
%doc COPYING %license COPYING
%{_bindir}/%{name}* %{_bindir}/%{name}*
%{_mandir}/man1/%{name}*.1* %{_mandir}/man1/%{name}*.1*
%files libs %files libs
%doc AUTHORS COPYING.LIB ChangeLog FAQ.html README.html TODO %doc AUTHORS ChangeLog FAQ.html README.html TODO
%license COPYING.LIB COPYING.exception
%{_libdir}/*.so.* %{_libdir}/*.so.*
%files devel %files devel
%doc doc/html %doc doc/html examples
%{_includedir}/%{name} %{_includedir}/%{name}
%{_libdir}/*.so %{_libdir}/*.so
%changelog %changelog
* Fri Sep 23 2016 Sandro Mani <manisandro@gmail.com> - 0.9.4-1
- Update to 0.9.4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-18 * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

@ -1 +1 @@
cec586ab69f92bc88d38b5d4b8eee5a0 podofo-0.9.1.tar.gz 929c9d2bd367fb6cb1f178cd4eb93dd3 podofo-0.9.4.tar.gz

Loading…
Cancel
Save