update pdfium git to branch chromium/2697

This commit is contained in:
Diego Sogari
2016-04-02 12:03:34 -03:00
parent c6931761eb
commit 8602996d9f
2 changed files with 357 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
_realname=pdfium
pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
_basever=2681
pkgver=2681.r2604.30410ce
_basever=2697
pkgver=2697.r2682.b33dfdf
pkgrel=1
pkgdesc="Chromes PDF rendering engine (mingw-w64)"
arch=('any')
@@ -18,11 +18,11 @@ makedepends=("git" "gyp-git" "python2"
source=("${_realname}::git+https://pdfium.googlesource.com/pdfium.git#branch=chromium/${_basever}"
"${gtestdir}.tar.gz::https://codeload.github.com/google/googletest/tar.gz/release-1.7.0"
"${gmockdir}.tar.gz::https://codeload.github.com/google/googlemock/tar.gz/release-1.7.0"
"${_realname}-${pkgver}.patch")
"${_realname}-${_basever}.patch")
sha256sums=('SKIP'
'f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc'
'3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232'
'd70b6287126d2e148711e3a0c47d70fbc183c3eab0b578c4a0f88bcd7927f1ee')
'ccb46661713cac137a2ff364cd929362c4d596f7b35bff7575e83bbb241cead0')
pkgver() {
cd "${srcdir}/${_realname}"
@@ -33,7 +33,7 @@ prepare() {
cd "${srcdir}/${_realname}"
mv -f "../${gtestdir}" ./testing/gtest
mv -f "../${gmockdir}" ./testing/gmock
patch -Np1 -i "../${_realname}-${pkgver}.patch"
patch -Np1 -i "../${_realname}-${_basever}.patch"
}
build() {

View File

@@ -0,0 +1,352 @@
diff -c -r pdfium.orig/core/fxcrt/fx_basic_util.cpp pdfium/core/fxcrt/fx_basic_util.cpp
*** pdfium.orig/core/fxcrt/fx_basic_util.cpp 2016-04-02 10:39:35.000000000 -0300
--- pdfium/core/fxcrt/fx_basic_util.cpp 2016-04-02 11:54:03.570816600 -0300
***************
*** 170,176 ****
return bNegative ? -value : value;
}
! #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
void FXSYS_snprintf(char* str,
size_t size,
_Printf_format_string_ const char* fmt,
--- 170,176 ----
return bNegative ? -value : value;
}
! #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 && !defined(__MINGW32__)
void FXSYS_snprintf(char* str,
size_t size,
_Printf_format_string_ const char* fmt,
***************
*** 186,192 ****
str[size - 1] = 0;
}
}
! #endif // _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
class CFindFileData {
--- 186,192 ----
str[size - 1] = 0;
}
}
! #endif // _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 && !defined(__MINGW32__)
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
class CFindFileData {
diff -c -r pdfium.orig/core/fxcrt/include/fx_system.h pdfium/core/fxcrt/include/fx_system.h
*** pdfium.orig/core/fxcrt/include/fx_system.h 2016-04-02 10:39:35.000000000 -0300
--- pdfium/core/fxcrt/include/fx_system.h 2016-04-02 11:54:03.570816600 -0300
***************
*** 111,117 ****
// NOTE: prevent use of the return value from snprintf() since some platforms
// have different return values (e.g. windows _vsnprintf()), and provide
// versions that always NUL-terminate.
! #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
void FXSYS_snprintf(char* str,
size_t size,
_Printf_format_string_ const char* fmt,
--- 111,117 ----
// NOTE: prevent use of the return value from snprintf() since some platforms
// have different return values (e.g. windows _vsnprintf()), and provide
// versions that always NUL-terminate.
! #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 && !defined(__MINGW32__)
void FXSYS_snprintf(char* str,
size_t size,
_Printf_format_string_ const char* fmt,
diff -c -r pdfium.orig/core/fxge/win32/fx_win32_dwrite.cpp pdfium/core/fxge/win32/fx_win32_dwrite.cpp
*** pdfium.orig/core/fxge/win32/fx_win32_dwrite.cpp 2016-04-02 10:39:35.000000000 -0300
--- pdfium/core/fxge/win32/fx_win32_dwrite.cpp 2016-04-02 11:54:03.586440700 -0300
***************
*** 12,17 ****
--- 12,23 ----
#include "core/fxge/win32/dwrite_int.h"
#include "core/include/fxge/fx_ge_win32.h"
+ #ifdef __MINGW32__
+ #define __in
+ #define __out
+ #define __in_opt
+ #endif
+
typedef HRESULT(__stdcall* FuncType_DWriteCreateFactory)(
__in DWRITE_FACTORY_TYPE,
__in REFIID,
diff -c -r pdfium.orig/core/fxge/win32/fx_win32_gdipext.cpp pdfium/core/fxge/win32/fx_win32_gdipext.cpp
*** pdfium.orig/core/fxge/win32/fx_win32_gdipext.cpp 2016-04-02 10:39:35.000000000 -0300
--- pdfium/core/fxge/win32/fx_win32_gdipext.cpp 2016-04-02 11:54:03.586440700 -0300
***************
*** 691,697 ****
return;
}
for (int i = 0; i < sizeof g_GdipFuncNames / sizeof(LPCSTR); i++) {
! m_Functions[i] = GetProcAddress(m_hModule, g_GdipFuncNames[i]);
if (!m_Functions[i]) {
m_hModule = NULL;
return;
--- 691,697 ----
return;
}
for (int i = 0; i < sizeof g_GdipFuncNames / sizeof(LPCSTR); i++) {
! m_Functions[i] = (void *)GetProcAddress(m_hModule, g_GdipFuncNames[i]);
if (!m_Functions[i]) {
m_hModule = NULL;
return;
***************
*** 706,714 ****
return;
}
m_pGdiAddFontMemResourceEx =
! GetProcAddress(m_GdiModule, "AddFontMemResourceEx");
m_pGdiRemoveFontMemResourseEx =
! GetProcAddress(m_GdiModule, "RemoveFontMemResourceEx");
}
CGdiplusExt::~CGdiplusExt() {}
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, uint32_t size) {
--- 706,714 ----
return;
}
m_pGdiAddFontMemResourceEx =
! (void *)GetProcAddress(m_GdiModule, "AddFontMemResourceEx");
m_pGdiRemoveFontMemResourseEx =
! (void *)GetProcAddress(m_GdiModule, "RemoveFontMemResourceEx");
}
CGdiplusExt::~CGdiplusExt() {}
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, uint32_t size) {
diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
*** pdfium.orig/pdfium.gyp 2016-04-02 10:39:35.000000000 -0300
--- pdfium/pdfium.gyp 2016-04-02 11:55:17.645195600 -0300
***************
*** 106,112 ****
},
'targets': [
{
! 'target_name': 'pdfium',
'type': 'static_library',
'dependencies': [
'third_party/third_party.gyp:bigint',
--- 106,112 ----
},
'targets': [
{
! 'target_name': 'pdfium_static',
'type': 'static_library',
'dependencies': [
'third_party/third_party.gyp:bigint',
***************
*** 206,211 ****
--- 206,311 ----
},
},
{
+ 'target_name': 'pdfium',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'third_party/third_party.gyp:bigint',
+ 'third_party/third_party.gyp:pdfium_base',
+ 'fdrm',
+ 'fpdfdoc',
+ 'fpdfapi',
+ 'fpdftext',
+ 'formfiller',
+ 'fxcodec',
+ 'fxcrt',
+ 'fxedit',
+ 'fxge',
+ 'javascript',
+ 'pdfwindow',
+ ],
+ 'sources': [
+ 'fpdfsdk/include/fsdk_actionhandler.h',
+ 'fpdfsdk/include/fsdk_annothandler.h',
+ 'fpdfsdk/include/fsdk_baseannot.h',
+ 'fpdfsdk/include/fsdk_baseform.h',
+ 'fpdfsdk/fpdfdoc.cpp',
+ 'fpdfsdk/fpdfeditimg.cpp',
+ 'fpdfsdk/fpdfeditpage.cpp',
+ 'fpdfsdk/fpdfformfill.cpp',
+ 'fpdfsdk/fpdfppo.cpp',
+ 'fpdfsdk/fpdfsave.cpp',
+ 'fpdfsdk/fpdftext.cpp',
+ 'fpdfsdk/fpdfview.cpp',
+ 'fpdfsdk/fpdf_dataavail.cpp',
+ 'fpdfsdk/fpdf_ext.cpp',
+ 'fpdfsdk/fpdf_flatten.cpp',
+ 'fpdfsdk/fpdf_progressive.cpp',
+ 'fpdfsdk/fpdf_searchex.cpp',
+ 'fpdfsdk/fpdf_sysfontinfo.cpp',
+ 'fpdfsdk/fpdf_transformpage.cpp',
+ 'fpdfsdk/fsdk_actionhandler.cpp',
+ 'fpdfsdk/fsdk_annothandler.cpp',
+ 'fpdfsdk/fsdk_baseannot.cpp',
+ 'fpdfsdk/fsdk_baseform.cpp',
+ 'fpdfsdk/fsdk_mgr.cpp',
+ 'fpdfsdk/fsdk_rendercontext.cpp',
+ 'public/fpdf_dataavail.h',
+ 'public/fpdf_doc.h',
+ 'public/fpdf_edit.h',
+ 'public/fpdf_ext.h',
+ 'public/fpdf_flatten.h',
+ 'public/fpdf_formfill.h',
+ 'public/fpdf_fwlevent.h',
+ 'public/fpdf_ppo.h',
+ 'public/fpdf_progressive.h',
+ 'public/fpdf_save.h',
+ 'public/fpdf_searchex.h',
+ 'public/fpdf_sysfontinfo.h',
+ 'public/fpdf_text.h',
+ 'public/fpdf_transformpage.h',
+ 'public/fpdfview.h',
+ ],
+ 'conditions': [
+ ['pdf_enable_xfa==1', {
+ 'dependencies': [
+ 'fpdfxfa',
+ ],
+ }],
+ ['bundle_freetype==1', {
+ 'dependencies': [
+ 'third_party/third_party.gyp:fx_freetype',
+ ],
+ }, {
+ 'link_settings': {
+ 'libraries': [
+ '-lfreetype',
+ ],
+ },
+ }],
+ ],
+ 'all_dependent_settings': {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'advapi32.lib',
+ 'gdi32.lib',
+ 'user32.lib',
+ ],
+ },
+ },
+ 'conditions': [
+ ['OS=="mac"', {
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
+ '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+ ],
+ },
+ }],
+ ],
+ },
+ },
+ {
'target_name': 'fdrm',
'type': 'static_library',
'sources': [
***************
*** 618,634 ****
'core/fxcrt/fxcrt_windows.cpp',
'core/fxcrt/fxcrt_windows.h',
'core/fxcrt/include/cfx_retain_ptr.h',
! 'core/include/fxcrt/fx_basic.h',
! 'core/include/fxcrt/fx_bidi.h',
! 'core/include/fxcrt/fx_coordinates.h',
! 'core/include/fxcrt/fx_ext.h',
! 'core/include/fxcrt/fx_memory.h',
! 'core/include/fxcrt/fx_safe_types.h',
! 'core/include/fxcrt/fx_stream.h',
! 'core/include/fxcrt/fx_string.h',
! 'core/include/fxcrt/fx_system.h',
! 'core/include/fxcrt/fx_ucd.h',
! 'core/include/fxcrt/fx_xml.h',
'core/fxcrt/plex.h',
'core/fxcrt/xml_int.h',
],
--- 718,733 ----
'core/fxcrt/fxcrt_windows.cpp',
'core/fxcrt/fxcrt_windows.h',
'core/fxcrt/include/cfx_retain_ptr.h',
! 'core/fxcrt/include/fx_basic.h',
! 'core/fxcrt/include/fx_coordinates.h',
! 'core/fxcrt/include/fx_ext.h',
! 'core/fxcrt/include/fx_memory.h',
! 'core/fxcrt/include/fx_safe_types.h',
! 'core/fxcrt/include/fx_stream.h',
! 'core/fxcrt/include/fx_string.h',
! 'core/fxcrt/include/fx_system.h',
! 'core/fxcrt/include/fx_ucd.h',
! 'core/fxcrt/include/fx_xml.h',
'core/fxcrt/plex.h',
'core/fxcrt/xml_int.h',
],
***************
*** 892,898 ****
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest_main',
'<(DEPTH)/testing/gtest.gyp:gtest',
! 'pdfium',
'test_support',
],
'sources': [
--- 991,997 ----
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest_main',
'<(DEPTH)/testing/gtest.gyp:gtest',
! 'pdfium_static',
'test_support',
],
'sources': [
***************
*** 944,950 ****
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
! 'pdfium',
'test_support',
],
'sources': [
--- 1043,1049 ----
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
! 'pdfium_static',
'test_support',
],
'sources': [
diff -c -r pdfium.orig/samples/samples.gyp pdfium/samples/samples.gyp
*** pdfium.orig/samples/samples.gyp 2016-04-02 10:39:35.000000000 -0300
--- pdfium/samples/samples.gyp 2016-04-02 11:54:03.602067000 -0300
***************
*** 40,46 ****
'target_name': 'pdfium_test',
'type': 'executable',
'dependencies': [
! '../pdfium.gyp:pdfium',
'../pdfium.gyp:test_support',
# Regardless of whether the library ships against system freetype,
# always link this binary against the bundled one for consistency
--- 40,46 ----
'target_name': 'pdfium_test',
'type': 'executable',
'dependencies': [
! '../pdfium.gyp:pdfium_static',
'../pdfium.gyp:test_support',
# Regardless of whether the library ships against system freetype,
# always link this binary against the bundled one for consistency
***************
*** 80,86 ****
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
! '../pdfium.gyp:pdfium',
'../third_party/third_party.gyp:pdfium_base',
],
'sources': [
--- 80,86 ----
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
! '../pdfium.gyp:pdfium_static',
'../third_party/third_party.gyp:pdfium_base',
],
'sources': [