mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
podofo: bump version.
* fix build on secondary arch x86.
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
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
|
||||
|
||||
53
app-text/podofo/patches/podofo-0.9.4.patchset
Normal file
53
app-text/podofo/patches/podofo-0.9.4.patchset
Normal file
@@ -0,0 +1,53 @@
|
||||
From a5ae4c10ce2eebf032782c3d8e43c26bec4cd3be 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 0a70eff..1d7b8b3 100644
|
||||
--- a/src/base/PdfFiltersPrivate.cpp
|
||||
+++ b/src/base/PdfFiltersPrivate.cpp
|
||||
@@ -908,7 +908,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);
|
||||
|
||||
@@ -1039,7 +1039,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 8b4638c..8a880ae 100644
|
||||
--- a/src/doc/PdfImage.cpp
|
||||
+++ b/src/doc/PdfImage.cpp
|
||||
@@ -368,7 +368,7 @@ void PdfImage::LoadFromJpegHandle( PdfFileInputStream* pInStream )
|
||||
|
||||
jpeg_stdio_src(&cinfo, pInStream->GetHandle());
|
||||
|
||||
- if( jpeg_read_header(&cinfo, TRUE) <= 0 )
|
||||
+ if( jpeg_read_header(&cinfo, (boolean)TRUE) <= 0 )
|
||||
{
|
||||
(void) jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
@@ -434,7 +434,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);
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -14,8 +14,8 @@ GNU GPL v2
|
||||
GNU LGPL v2.1
|
||||
"
|
||||
SOURCE_URI="http://sourceforge.net/projects/podofo/files/podofo/$portVersion/podofo-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="ec261e31e89dce45b1a31be61e9c6bb250532e631a02d68ec5bb849ef0a222d8"
|
||||
REVISION="2"
|
||||
CHECKSUM_SHA256="ccdf505fcb4904617e728b15729da8700ff38442c1dd2f24fbd52934287ff859"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
PATCHES="podofo-$portVersion.patchset"
|
||||
@@ -26,8 +26,8 @@ if [ $targetArchitecture != x86_gcc2 ]; then
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
podofo$secondaryArchSuffix = $portVersion compat >= 0.9
|
||||
lib:libpodofo$secondaryArchSuffix = $portVersion compat >= 0.9
|
||||
podofo$secondaryArchSuffix = $portVersion
|
||||
lib:libpodofo$secondaryArchSuffix = $portVersion
|
||||
cmd:podofobox
|
||||
cmd:podofocolor
|
||||
cmd:podofocountpages
|
||||
@@ -46,16 +46,23 @@ PROVIDES="
|
||||
cmd:podofouncompress
|
||||
cmd:podofoxmp
|
||||
"
|
||||
PROVIDES_devel="
|
||||
podofo${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libpodofo$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpng15$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtiff$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES_devel="
|
||||
podofo$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
@@ -76,23 +83,40 @@ BUILD_PREREQUIRES="
|
||||
|
||||
PATCH()
|
||||
{
|
||||
freetypeDir=$portPackageLinksDir/devel~libfreetype/develop/headers/freetype2
|
||||
headersDir=
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
headersDir=/$effectiveTargetArchitecture
|
||||
fi
|
||||
freetypeDir=$portPackageLinksDir/devel~libfreetype$secondaryArchSuffix/develop/headers$headersDir/freetype2
|
||||
sed -i -e s:/usr/include/freetype2:$freetypeDir: cmake/modules/FindFREETYPE.cmake
|
||||
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix .
|
||||
mkdir -p build; cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
|
||||
-DPODOFO_BUILD_SHARED=1 \
|
||||
..
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mkdir -p $(dirname $includeDir)
|
||||
mkdir -p $(dirname $includeDir) $manDir
|
||||
mv $prefix/include $includeDir
|
||||
mv $prefix/share/man/man1 $manDir
|
||||
rmdir $prefix/share/man $prefix/share
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
mv $prefix/lib $prefix/lib2
|
||||
mkdir -p $libDir
|
||||
mv $prefix/lib2/* $libDir
|
||||
rmdir $prefix/lib2
|
||||
fi
|
||||
|
||||
prepareInstalledDevelLibs libpodofo
|
||||
fixPkgconfig
|
||||
@@ -101,13 +125,3 @@ INSTALL()
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
|
||||
PROVIDES_devel="
|
||||
podofo${secondaryArchSuffix}_devel = $portVersion compat >= 0.9
|
||||
devel:libpodofo$secondaryArchSuffix = $portVersion compat >= 0.9
|
||||
"
|
||||
REQUIRES_devel="
|
||||
podofo$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
Reference in New Issue
Block a user