mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
podofo: fix build, use libpng16
This commit is contained in:
84
app-text/podofo/patches/podofo-0.9.3.patchset
Normal file
84
app-text/podofo/patches/podofo-0.9.3.patchset
Normal file
@@ -0,0 +1,84 @@
|
||||
From c537c5b2da742f916739bacf1b9bbd6672ca4e9f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
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<JOCTET*>(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 <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
-#include <strstream>
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user