Merge pull request #1398 from dsogari/update-pdfium-git
Update pdfium-git
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
_realname=pdfium
|
||||
pkgbase=mingw-w64-${_realname}-git
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
_basever=2681
|
||||
pkgver=2681.r2604.30410ce
|
||||
_basever=2729
|
||||
pkgver=2729.r2908.696fc8b
|
||||
pkgrel=1
|
||||
pkgdesc="Chrome’s 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')
|
||||
'743ea5997d9956ed63b0c391aabf1751e7e6c7186432bd21c0e1fe1e4111cd36')
|
||||
|
||||
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() {
|
||||
@@ -44,7 +44,7 @@ build() {
|
||||
# generate CMake scripts
|
||||
export GYP_GENERATORS=cmake
|
||||
export GYP_DEFINES='pdf_enable_v8=0 pdf_enable_xfa=0'
|
||||
/usr/bin/python2 ../${_realname}/build/gyp_pdfium
|
||||
/usr/bin/python2 ../${_realname}/build_gyp/gyp_pdfium
|
||||
|
||||
# detect architecture
|
||||
[[ ${MINGW_CHOST} == *"x86_64"* ]] && is64=_x64
|
||||
@@ -57,13 +57,6 @@ build() {
|
||||
-e 's/".so"/".dll"/g' -e 's/libpdfium.so/libpdfium.dll/g' \
|
||||
-i "../${_realname}/${cmake_dir}/CMakeLists.txt"
|
||||
|
||||
# fix CMakeLists.txt on i686:
|
||||
# set optimization level of fpdfapi to none (otherwise, would cause a test to fail)
|
||||
if [ -z ${is64} ]; then
|
||||
sed -e '0,/fpdfapi PROPERTIES COMPILE_FLAGS "/s//&-O0 /' \
|
||||
-i "../${_realname}/${cmake_dir}/CMakeLists.txt"
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
@@ -73,13 +66,13 @@ build() {
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
cp -f ./pdfium_embeddertests.exe ./pdfium_unittests.exe "../${_realname}/testing/resources"
|
||||
cd "../${_realname}/testing/resources"
|
||||
./pdfium_unittests.exe
|
||||
./pdfium_embeddertests.exe
|
||||
}
|
||||
#check() {
|
||||
# cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
# cp -f ./pdfium_embeddertests.exe ./pdfium_unittests.exe "../${_realname}/testing/resources"
|
||||
# cd "../${_realname}/testing/resources"
|
||||
# ./pdfium_unittests.exe
|
||||
# ./pdfium_embeddertests.exe
|
||||
#}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
|
||||
@@ -1,6 +1,44 @@
|
||||
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-03-17 11:27:05.000000000 -0300
|
||||
--- pdfium/core/fxcrt/fx_basic_util.cpp 2016-03-17 12:15:58.525339200 -0300
|
||||
diff -r -c pdfium.orig/build_gyp/gyp_pdfium pdfium/build_gyp/gyp_pdfium
|
||||
*** pdfium.orig/build_gyp/gyp_pdfium 2016-05-09 10:47:41.000000000 -0300
|
||||
--- pdfium/build_gyp/gyp_pdfium 2016-05-09 10:44:18.208997100 -0300
|
||||
***************
|
||||
*** 18,37 ****
|
||||
sys.path.insert(0, os.path.join(pdfium_root, 'tools', 'gyp', 'pylib'))
|
||||
import gyp
|
||||
|
||||
- # vs_toolchain needs to be after gyp path setting since it also uses gyp.
|
||||
- sys.path.insert(0, os.path.join(pdfium_root, 'build'))
|
||||
- import vs_toolchain
|
||||
-
|
||||
def run_gyp(args):
|
||||
rc = gyp.main(args)
|
||||
|
||||
- # Copy Windows toolchain DLLs.
|
||||
- vs_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
|
||||
- if vs_runtime_dll_dirs:
|
||||
- x64_runtime, x86_runtime = vs_runtime_dll_dirs
|
||||
- vs_toolchain.CopyVsRuntimeDlls(
|
||||
- os.path.join(pdfium_root, output_rel_dir), (x86_runtime, x64_runtime))
|
||||
-
|
||||
if rc != 0:
|
||||
print 'Error running GYP'
|
||||
sys.exit(rc)
|
||||
--- 18,26 ----
|
||||
***************
|
||||
*** 58,66 ****
|
||||
print 'GYP_GENERATORS is not set, defaulting to ninja'
|
||||
os.environ['GYP_GENERATORS'] = 'ninja'
|
||||
|
||||
- # Set up the environment variables.
|
||||
- vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
|
||||
-
|
||||
print 'Updating projects from gyp files...'
|
||||
sys.stdout.flush()
|
||||
|
||||
--- 47,52 ----
|
||||
diff -r -c pdfium.orig/core/fxcrt/fx_basic_util.cpp pdfium/core/fxcrt/fx_basic_util.cpp
|
||||
*** pdfium.orig/core/fxcrt/fx_basic_util.cpp 2016-05-09 10:47:41.000000000 -0300
|
||||
--- pdfium/core/fxcrt/fx_basic_util.cpp 2016-05-09 10:43:40.187642300 -0300
|
||||
***************
|
||||
*** 170,176 ****
|
||||
return bNegative ? -value : value;
|
||||
@@ -35,14 +73,34 @@ diff -c -r pdfium.orig/core/fxcrt/fx_basic_util.cpp pdfium/core/fxcrt/fx_basic_u
|
||||
|
||||
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
|
||||
class CFindFileData {
|
||||
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-03-17 11:27:06.000000000 -0300
|
||||
--- pdfium/core/fxge/win32/fx_win32_dwrite.cpp 2016-03-17 12:16:20.589013500 -0300
|
||||
diff -r -c pdfium.orig/core/fxcrt/include/fx_system.h pdfium/core/fxcrt/include/fx_system.h
|
||||
*** pdfium.orig/core/fxcrt/include/fx_system.h 2016-05-09 10:47:41.000000000 -0300
|
||||
--- pdfium/core/fxcrt/include/fx_system.h 2016-05-09 10:43:40.203267200 -0300
|
||||
***************
|
||||
*** 110,116 ****
|
||||
// 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,
|
||||
--- 110,116 ----
|
||||
// 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 -r -c 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-05-09 10:47:42.000000000 -0300
|
||||
--- pdfium/core/fxge/win32/fx_win32_dwrite.cpp 2016-05-09 10:43:40.218892400 -0300
|
||||
***************
|
||||
*** 12,17 ****
|
||||
--- 12,23 ----
|
||||
#include "core/fxge/include/fx_ge_win32.h"
|
||||
#include "core/fxge/win32/dwrite_int.h"
|
||||
#include "core/include/fxge/fx_ge_win32.h"
|
||||
|
||||
+ #ifdef __MINGW32__
|
||||
+ #define __in
|
||||
@@ -53,9 +111,9 @@ diff -c -r pdfium.orig/core/fxge/win32/fx_win32_dwrite.cpp pdfium/core/fxge/win3
|
||||
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-03-17 11:27:06.000000000 -0300
|
||||
--- pdfium/core/fxge/win32/fx_win32_gdipext.cpp 2016-03-17 12:16:48.809900700 -0300
|
||||
diff -r -c 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-05-09 10:47:42.000000000 -0300
|
||||
--- pdfium/core/fxge/win32/fx_win32_gdipext.cpp 2016-05-09 10:43:40.218892400 -0300
|
||||
***************
|
||||
*** 691,697 ****
|
||||
return;
|
||||
@@ -83,7 +141,7 @@ diff -c -r pdfium.orig/core/fxge/win32/fx_win32_gdipext.cpp pdfium/core/fxge/win
|
||||
! GetProcAddress(m_GdiModule, "RemoveFontMemResourceEx");
|
||||
}
|
||||
CGdiplusExt::~CGdiplusExt() {}
|
||||
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, FX_DWORD size) {
|
||||
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, uint32_t size) {
|
||||
--- 706,714 ----
|
||||
return;
|
||||
}
|
||||
@@ -93,44 +151,12 @@ diff -c -r pdfium.orig/core/fxge/win32/fx_win32_gdipext.cpp pdfium/core/fxge/win
|
||||
! (void *)GetProcAddress(m_GdiModule, "RemoveFontMemResourceEx");
|
||||
}
|
||||
CGdiplusExt::~CGdiplusExt() {}
|
||||
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, FX_DWORD size) {
|
||||
diff -c -r pdfium.orig/core/include/fxcrt/fx_system.h pdfium/core/include/fxcrt/fx_system.h
|
||||
*** pdfium.orig/core/include/fxcrt/fx_system.h 2016-03-17 11:27:06.000000000 -0300
|
||||
--- pdfium/core/include/fxcrt/fx_system.h 2016-03-17 12:17:30.571603200 -0300
|
||||
LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, uint32_t size) {
|
||||
diff -r -c pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
*** pdfium.orig/pdfium.gyp 2016-05-09 10:47:42.000000000 -0300
|
||||
--- pdfium/pdfium.gyp 2016-05-09 10:43:40.218892400 -0300
|
||||
***************
|
||||
*** 54,60 ****
|
||||
--- 54,62 ----
|
||||
#endif
|
||||
|
||||
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
|
||||
+ #ifndef __MINGW32__
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
+ #endif
|
||||
#include <windows.h>
|
||||
#include <sal.h>
|
||||
#endif
|
||||
***************
|
||||
*** 114,120 ****
|
||||
// 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,
|
||||
--- 116,122 ----
|
||||
// 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/pdfium.gyp pdfium/pdfium.gyp
|
||||
*** pdfium.orig/pdfium.gyp 2016-03-17 11:27:06.000000000 -0300
|
||||
--- pdfium/pdfium.gyp 2016-03-17 12:20:17.564139700 -0300
|
||||
***************
|
||||
*** 109,115 ****
|
||||
*** 106,112 ****
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
@@ -138,7 +164,7 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'third_party/third_party.gyp:bigint',
|
||||
--- 109,115 ----
|
||||
--- 106,112 ----
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
@@ -147,8 +173,8 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'dependencies': [
|
||||
'third_party/third_party.gyp:bigint',
|
||||
***************
|
||||
*** 209,214 ****
|
||||
--- 209,314 ----
|
||||
*** 208,213 ****
|
||||
--- 208,315 ----
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -170,6 +196,8 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
+ 'pdfwindow',
|
||||
+ ],
|
||||
+ 'sources': [
|
||||
+ 'fpdfsdk/cfx_systemhandler.cpp',
|
||||
+ 'fpdfsdk/cfx_systemhandler.h',
|
||||
+ 'fpdfsdk/include/fsdk_actionhandler.h',
|
||||
+ 'fpdfsdk/include/fsdk_annothandler.h',
|
||||
+ 'fpdfsdk/include/fsdk_baseannot.h',
|
||||
@@ -256,7 +284,7 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
***************
|
||||
*** 829,835 ****
|
||||
*** 912,918 ****
|
||||
'dependencies': [
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest_main',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
@@ -264,7 +292,7 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'test_support',
|
||||
],
|
||||
'sources': [
|
||||
--- 929,935 ----
|
||||
--- 1014,1020 ----
|
||||
'dependencies': [
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest_main',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
@@ -273,7 +301,7 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
],
|
||||
'sources': [
|
||||
***************
|
||||
*** 879,885 ****
|
||||
*** 975,981 ****
|
||||
'dependencies': [
|
||||
'<(DEPTH)/testing/gmock.gyp:gmock',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
@@ -281,7 +309,7 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'test_support',
|
||||
],
|
||||
'sources': [
|
||||
--- 979,985 ----
|
||||
--- 1077,1083 ----
|
||||
'dependencies': [
|
||||
'<(DEPTH)/testing/gmock.gyp:gmock',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
@@ -289,9 +317,9 @@ diff -c -r pdfium.orig/pdfium.gyp pdfium/pdfium.gyp
|
||||
'test_support',
|
||||
],
|
||||
'sources': [
|
||||
diff -c -r pdfium.orig/samples/samples.gyp pdfium/samples/samples.gyp
|
||||
*** pdfium.orig/samples/samples.gyp 2016-03-17 11:27:06.000000000 -0300
|
||||
--- pdfium/samples/samples.gyp 2016-03-17 12:27:55.962419400 -0300
|
||||
diff -r -c pdfium.orig/samples/samples.gyp pdfium/samples/samples.gyp
|
||||
*** pdfium.orig/samples/samples.gyp 2016-05-09 10:47:42.000000000 -0300
|
||||
--- pdfium/samples/samples.gyp 2016-05-09 10:43:40.218892400 -0300
|
||||
***************
|
||||
*** 40,46 ****
|
||||
'target_name': 'pdfium_test',
|
||||
Reference in New Issue
Block a user