Hi everyone, new to this list. :-)
I compiled podofo 0.9.2 on OS X 10.9 Mavericks and had to apply the following patches. Contrary to other similar reports on this list, this does not refer to using something like Homebrew or MacPorts, but instead refers to compiling the podofo 0.9.2 source code as is (podofo-0.9.2.tar.gz download), with the newest versions of all required libraries installed. Some of the patches I found on the net, others I added myself. The patches are colleted in the file podofo.patch. To apply the patches, use [podofo-0.9.2]% patch -p1 <podofo.patch Hope that helps people who also want to compile podofo from scratch. Uli ######## podofo.patch ######### diff -rupN a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt 2012-12-12 23:55:46.000000000 +0100 +++ b/CMakeLists.txt 2014-03-23 04:00:04.000000000 +0100 @@ -12,7 +12,7 @@ PROJECT(PoDoFo) SET(PODOFO_VERSION_MAJOR "0" CACHE STRING "Major part of PoDoFo version number") SET(PODOFO_VERSION_MINOR "9" CACHE STRING "Minor part of PoDoFo version number") -SET(PODOFO_VERSION_PATCH "1" CACHE STRING "Patchlevel part of PoDoFo version number") +SET(PODOFO_VERSION_PATCH "3" CACHE STRING "Patchlevel part of PoDoFo version number") SET(PODOFO_SOVERSION "${PODOFO_VERSION_MAJOR}.${PODOFO_VERSION_MINOR}.${PODOFO_VERSION_PATCH}") SET(PODOFO_LIBVERSION "${PODOFO_SOVERSION}") @@ -372,6 +372,10 @@ FIND_PACKAGE(OpenSSL) FIND_PACKAGE(FREETYPE REQUIRED) MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIR}") +FIND_PACKAGE(BZip2 REQUIRED) +MESSAGE("Found bzip2 library at ${BZIP2_LIBRARIES}, headers ${BZIP2_INCLUDE_DIR}") + + FIND_PACKAGE(LIBSTLPORT) SET(stlport_libraries_if_use_stlport) IF(USE_STLPORT) @@ -392,7 +396,9 @@ IF(WANT_FONTCONFIG) SET(PODOFO_HAVE_FONTCONFIG TRUE) SET(PODOFO_LIB_FONTCONFIG:STRING fontconfig) IF(FONTCONFIG_FOUND) - MESSAGE("Found fontconfig headers in ${FONTCONFIG_INCLUDE_DIR}, library at ${FONTCONFIG_LIBRARIES}") + MESSAGE("Found fontconfig library at ${FONTCONFIG_LIBRARIES}, headers ${FONTCONFIG_INCLUDE_DIR}") + FIND_PACKAGE(EXPAT REQUIRED) + MESSAGE("Found expat library at ${EXPAT_LIBRARIES}, headers ${EXPAT_INCLUDE_DIRS}") ELSE(FONTCONFIG_FOUND) MESSAGE("Could not find fontconfig.") ENDIF(FONTCONFIG_FOUND) @@ -467,6 +473,7 @@ INCLUDE_DIRECTORIES( ${PoDoFo_SOURCE_DIR} ${PoDoFo_SOURCE_DIR}/src ${FREETYPE_INCLUDE_DIR} + ${BZIP2_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${EXTRA_INCLUDES} ) @@ -488,13 +495,14 @@ SET(PODOFO_LIB_DEPENDS ${PLATFORM_SYSTEM_LIBRARIES} ${stlport_libraries_if_use_stlport} ${FREETYPE_LIBRARIES} + ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ) IF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) - SET(PODOFO_LIB_DEPENDS ${FONTCONFIG_LIBRARIES} ${PODOFO_LIB_DEPENDS}) - INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR}) + SET(PODOFO_LIB_DEPENDS ${FONTCONFIG_LIBRARIES} ${EXPAT_LIBRARIES} ${PODOFO_LIB_DEPENDS}) + INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS}) ENDIF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) SET(PODOFO_LIB diff -rupN a/cmake/modules/FindFREETYPE.cmake b/cmake/modules/FindFREETYPE.cmake --- a/cmake/modules/FindFREETYPE.cmake 2012-12-12 23:55:14.000000000 +0100 +++ b/cmake/modules/FindFREETYPE.cmake 2014-03-17 15:42:50.000000000 +0100 @@ -12,28 +12,56 @@ SET(FREETYPE_FIND_QUIETLY 1) +# first we try to find ft2build.h in the new location as +# of freetype 2.5.1 FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h - /usr/include/ - /usr/local/include/ - /usr/X11/include/ + /usr/include/freetype2 + /usr/local/include/freetype2 + /usr/X11/include/freetype2 NO_CMAKE_SYSTEM_PATH ) -FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h +# in case we couldn't find it in the new location +# we check the old location +IF (NOT FREETYPE_INCLUDE_DIR_FT2BUILD) + FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h + /usr/include + /usr/local/include + /usr/X11/include + NO_CMAKE_SYSTEM_PATH + ) +ENDIF (NOT FREETYPE_INCLUDE_DIR_FT2BUILD) + +# now try to find ftheader.h in the new location first +FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER config/ftheader.h /usr/include/freetype2 /usr/local/include/freetype2 /usr/X11/include/freetype2 ${FREETYPE_INCLUDE_DIR_FT2BUILD} - ${FREETYPE_INCLUDE_DIR_FT2BUILD}/freetype2 NO_CMAKE_SYSTEM_PATH ) +# in case we couldn't find it in the new location +# we check the old location +IF (NOT FREETYPE_INCLUDE_DIR_FTHEADER) + FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h + /usr/include/freetype2 + /usr/local/include/freetype2 + /usr/X11/include/freetype2 + ${FREETYPE_INCLUDE_DIR_FT2BUILD} + ${FREETYPE_INCLUDE_DIR_FT2BUILD}/freetype2 + NO_CMAKE_SYSTEM_PATH + ) +ENDIF (NOT FREETYPE_INCLUDE_DIR_FTHEADER) + IF ( FREETYPE_INCLUDE_DIR_FTHEADER AND FREETYPE_INCLUDE_DIR_FT2BUILD ) SET(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR_FTHEADER} ${FREETYPE_INCLUDE_DIR_FT2BUILD}) ENDIF ( FREETYPE_INCLUDE_DIR_FTHEADER AND FREETYPE_INCLUDE_DIR_FT2BUILD ) +LIST(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIR) + IF(NOT FREETYPE_FIND_QUIETLY) MESSAGE("FREETYPE_INCLUDE_DIR_FT2BUILD ${FREETYPE_INCLUDE_DIR_FT2BUILD}") MESSAGE("FREETYPE_INCLUDE_DIR_FTHEADER ${FREETYPE_INCLUDE_DIR_FTHEADER}") diff -rupN a/src/base/PdfEncrypt.cpp b/src/base/PdfEncrypt.cpp --- a/src/base/PdfEncrypt.cpp 2012-12-12 23:55:46.000000000 +0100 +++ b/src/base/PdfEncrypt.cpp 2014-03-22 15:23:25.000000000 +0100 @@ -45,7 +45,8 @@ #ifdef __APPLE__ #define COMMON_DIGEST_FOR_OPENSSL -#include <CommonCrypto/CommonCrypto.h> +#include <CommonCrypto/CommonCryptor.h> +#include <CommonCrypto/CommonDigest.h> #else // __APPLE__ #include <openssl/md5.h> #include <openssl/evp.h> diff -rupN a/src/base/PdfInputDevice.h b/src/base/PdfInputDevice.h --- a/src/base/PdfInputDevice.h 2010-10-21 19:09:00.000000000 +0200 +++ b/src/base/PdfInputDevice.h 2014-03-22 15:23:25.000000000 +0100 @@ -22,6 +22,7 @@ #define _PDF_INPUT_DEVICE_H_ #include <istream> +#include <ios> #include "PdfDefines.h" #include "PdfLocale.h" diff -rupN a/src/base/PdfLocale.h b/src/base/PdfLocale.h --- a/src/base/PdfLocale.h 2010-10-25 19:19:15.000000000 +0200 +++ b/src/base/PdfLocale.h 2014-03-22 15:23:25.000000000 +0100 @@ -1,7 +1,7 @@ #ifndef PODOFO_PDFLOCALE_H #define PODOFO_PDFLOCALE_H -namespace std { class ios_base; }; +#include <ios> namespace PoDoFo { diff -rupN a/tools/podofocolor/luaconverter.cpp b/tools/podofocolor/luaconverter.cpp --- a/tools/podofocolor/luaconverter.cpp 2010-12-29 19:08:31.000000000 +0100 +++ b/tools/podofocolor/luaconverter.cpp 2014-03-22 16:23:06.000000000 +0100 @@ -44,7 +44,7 @@ using namespace PoDoFo; LuaMachina::LuaMachina() { /* Init the Lua interpreter */ - L = lua_open(); + L = luaL_newstate(); 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 = lua_rawlen( m_machina.State(), -1 ); // Lua 5.1 only //len = lua_objlen( m_machina.State(), -1 ); diff -rupN a/tools/podofoimpose/planreader_lua.cpp b/tools/podofoimpose/planreader_lua.cpp --- a/tools/podofoimpose/planreader_lua.cpp 2011-06-18 13:52:58.000000000 +0200 +++ b/tools/podofoimpose/planreader_lua.cpp 2014-03-22 16:23:06.000000000 +0100 @@ -23,7 +23,7 @@ LuaMachina::LuaMachina() { /* Init the Lua interpreter */ - L = lua_open(); + L = luaL_newstate(); if (!L) { throw std::runtime_error("Whoops! Failed to open lua!"); ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users