From 07a45f18ef181d9b5d7451f6aa15ee370d400fd4 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 6 Jan 2016 14:06:09 +0000 Subject: [PATCH] podofo: fix build, use libpng16 --- app-text/podofo/patches/podofo-0.9.3.patchset | 84 +++++++++++++++++++ app-text/podofo/podofo-0.9.3.recipe | 5 +- 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 app-text/podofo/patches/podofo-0.9.3.patchset diff --git a/app-text/podofo/patches/podofo-0.9.3.patchset b/app-text/podofo/patches/podofo-0.9.3.patchset new file mode 100644 index 000000000..2375a703e --- /dev/null +++ b/app-text/podofo/patches/podofo-0.9.3.patchset @@ -0,0 +1,84 @@ +From c537c5b2da742f916739bacf1b9bbd6672ca4e9f Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Wed, 6 Jan 2016 13:57:24 +0000 +Subject: haiku patch + + +diff --git a/src/base/PdfFiltersPrivate.cpp b/src/base/PdfFiltersPrivate.cpp +index 24c86a2..4ebc1c6 100644 +--- a/src/base/PdfFiltersPrivate.cpp ++++ b/src/base/PdfFiltersPrivate.cpp +@@ -877,7 +877,7 @@ void PdfDCTFilter::EndDecodeImpl() + + jpeg_memory_src ( &m_cinfo, reinterpret_cast(m_buffer.GetBuffer()), m_buffer.GetSize() ); + +- if( jpeg_read_header(&m_cinfo, TRUE) <= 0 ) ++ if( jpeg_read_header(&m_cinfo, (boolean)TRUE) <= 0 ) + { + (void) jpeg_destroy_decompress(&m_cinfo); + +@@ -1004,7 +1004,7 @@ fill_input_buffer (j_decompress_ptr cinfo) + src->pub.next_input_byte = src->eoi_buffer; + src->pub.bytes_in_buffer = 2; + +- return TRUE; ++ return (boolean)TRUE; + } + + /* +diff --git a/src/doc/PdfImage.cpp b/src/doc/PdfImage.cpp +index 89902b3..04a6059 100644 +--- a/src/doc/PdfImage.cpp ++++ b/src/doc/PdfImage.cpp +@@ -316,7 +316,7 @@ void PdfImage::LoadFromJpegHandle( PdfFileInputStream* pInStream ) + jpeg_stdio_src(&cinfo, pInStream->GetHandle()); + #endif // PODOFO_JPEG_RUNTIME_COMPATIBLE + +- if( jpeg_read_header(&cinfo, TRUE) <= 0 ) ++ if( jpeg_read_header(&cinfo, (boolean)TRUE) <= 0 ) + { + (void) jpeg_destroy_decompress(&cinfo); + +@@ -382,7 +382,7 @@ void PdfImage::LoadFromJpegData(const unsigned char* pData, pdf_long dwLen) + + jpeg_memory_src(&cinfo, pData, dwLen); + +- if( jpeg_read_header(&cinfo, TRUE) <= 0 ) ++ if( jpeg_read_header(&cinfo, (boolean)TRUE) <= 0 ) + { + (void) jpeg_destroy_decompress(&cinfo); + +diff --git a/src/doc/PdfTilingPattern.cpp b/src/doc/PdfTilingPattern.cpp +index 13189b8..e8bf453 100644 +--- a/src/doc/PdfTilingPattern.cpp ++++ b/src/doc/PdfTilingPattern.cpp +@@ -36,7 +36,6 @@ + #include + #include + #include +-#include + + namespace PoDoFo { + +@@ -165,7 +164,7 @@ void PdfTilingPattern::Init( EPdfTilingPatternType eTilingType, + this->GetObject()->GetDictionary().AddKey( PdfName("Matrix"), array ); + } + +- std::ostrstream out; ++ std::ostringstream out; + out.flags( std::ios_base::fixed ); + out.precision( 1L /* clPainterDefaultPrecision */ ); + PdfLocaleImbue(out); +@@ -236,7 +235,8 @@ void PdfTilingPattern::Init( EPdfTilingPatternType eTilingType, + TVecFilters vecFlate; + vecFlate.push_back( ePdfFilter_FlateDecode ); + +- PdfMemoryInputStream stream(out.str(), out.pcount()); ++ std::string str = out.str(); ++ PdfMemoryInputStream stream(str.c_str(), str.length()); + + this->GetObject()->GetStream()->Set(&stream, vecFlate); + } +-- +2.2.2 + diff --git a/app-text/podofo/podofo-0.9.3.recipe b/app-text/podofo/podofo-0.9.3.recipe index 06dbe6a4a..1b6f1350c 100644 --- a/app-text/podofo/podofo-0.9.3.recipe +++ b/app-text/podofo/podofo-0.9.3.recipe @@ -15,9 +15,10 @@ GNU LGPL v2.1 " SOURCE_URI="http://sourceforge.net/projects/podofo/files/podofo/$portVersion/podofo-$portVersion.tar.gz" CHECKSUM_SHA256="ec261e31e89dce45b1a31be61e9c6bb250532e631a02d68ec5bb849ef0a222d8" -REVISION="1" +REVISION="2" ARCHITECTURES="!x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86" +PATCHES="podofo-$portVersion.patchset" if [ $targetArchitecture != x86_gcc2 ]; then commandSuffix= @@ -60,7 +61,7 @@ BUILD_REQUIRES=" devel:libfontconfig$secondaryArchSuffix devel:libfreetype$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix - devel:libpng15$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix devel:libssl$secondaryArchSuffix devel:libtiff$secondaryArchSuffix devel:libz$secondaryArchSuffix