diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-08 14:01:17 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-08 16:25:32 +0000 |
commit | eb276d11a652601f743d69ada7a38016bd97d73e (patch) | |
tree | 6cbbf7c8705bf7fd29ab2d3bed373977d657c7e2 /poppler | |
parent | 39f42b0b03489459540404dd218c38709853c021 (diff) |
fdo#38878: Upgrading internal xpdf -> poppler
Change-Id: I00aafb3fd275e6be3b5d0eb370320e5325110da5
Reviewed-on: https://gerrit.libreoffice.org/4770
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'poppler')
-rw-r--r-- | poppler/ExternalPackage_poppler.mk | 24 | ||||
-rw-r--r-- | poppler/ExternalProject_poppler.mk | 45 | ||||
-rw-r--r-- | poppler/Makefile | 7 | ||||
-rw-r--r-- | poppler/Module_poppler.mk | 22 | ||||
-rw-r--r-- | poppler/README | 1 | ||||
-rw-r--r-- | poppler/UnpackedTarball_poppler.mk | 19 | ||||
-rw-r--r-- | poppler/poppler-notests.patch.1 | 11 | ||||
-rw-r--r-- | poppler/poppler-snprintf.patch.1 | 50 |
8 files changed, 179 insertions, 0 deletions
diff --git a/poppler/ExternalPackage_poppler.mk b/poppler/ExternalPackage_poppler.mk new file mode 100644 index 000000000000..9e3e687ec09b --- /dev/null +++ b/poppler/ExternalPackage_poppler.mk @@ -0,0 +1,24 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,poppler,poppler)) + +$(eval $(call gb_ExternalPackage_use_external_project,poppler,poppler)) + +ifeq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/poppler.lib,poppler/.libs/libpoppler.lib)) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/fofi.lib,fofi/.libs/libfofi.lib)) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/goo.lib,goo/.libs/libgoo.lib)) +else +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libpoppler.a,poppler/.libs/libpoppler.a)) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libfofi.a,fofi/.libs/libfofi.a)) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libgoo.a,goo/.libs/libgoo.a)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/poppler/ExternalProject_poppler.mk b/poppler/ExternalProject_poppler.mk new file mode 100644 index 000000000000..42d4ea7a8ab8 --- /dev/null +++ b/poppler/ExternalProject_poppler.mk @@ -0,0 +1,45 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,poppler)) + +$(eval $(call gb_ExternalProject_use_autoconf,poppler,build)) + +$(eval $(call gb_ExternalProject_register_targets,poppler,\ + build \ +)) + +$(call gb_ExternalProject_get_state_target,poppler,build) : + $(call gb_ExternalProject_run,build,\ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)") \ + ./configure \ + --with-pic \ + --enable-static \ + --disable-shared \ + --enable-xpdf-headers \ + --disable-poppler-cpp \ + --disable-libopenjpeg \ + --disable-libtiff \ + --disable-libjpeg \ + --disable-libpng \ + --disable-zlib \ + --disable-libcurl \ + --disable-splash-output \ + --disable-cairo-output \ + --disable-poppler-glib \ + --disable-poppler-qt4 \ + --disable-gtk-test \ + --disable-utils \ + --disable-cms \ + $(if $(filter WNT,$(OS)),--with-font-configuration=win32,--with-font-configuration=fontconfig) \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && $(MAKE) \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/poppler/Makefile b/poppler/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/poppler/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/poppler/Module_poppler.mk b/poppler/Module_poppler.mk new file mode 100644 index 000000000000..01b0ed28cefe --- /dev/null +++ b/poppler/Module_poppler.mk @@ -0,0 +1,22 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,poppler)) + +ifeq ($(SYSTEM_WPD),NO) + +$(eval $(call gb_Module_add_targets,poppler,\ + ExternalProject_poppler \ + ExternalPackage_poppler \ + UnpackedTarball_poppler \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/poppler/README b/poppler/README new file mode 100644 index 000000000000..35a640264618 --- /dev/null +++ b/poppler/README @@ -0,0 +1 @@ +From [http://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base. diff --git a/poppler/UnpackedTarball_poppler.mk b/poppler/UnpackedTarball_poppler.mk new file mode 100644 index 000000000000..c7ee468b4a0d --- /dev/null +++ b/poppler/UnpackedTarball_poppler.mk @@ -0,0 +1,19 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler)) + +$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_patches,poppler,\ + poppler/poppler-notests.patch.1 \ + poppler/poppler-snprintf.patch.1 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/poppler/poppler-notests.patch.1 b/poppler/poppler-notests.patch.1 new file mode 100644 index 000000000000..7fcfee95ab2b --- /dev/null +++ b/poppler/poppler-notests.patch.1 @@ -0,0 +1,11 @@ +--- poppler-0.22.5/Makefile.in 2013-06-16 18:24:09.000000000 +0200 ++++ poppler-0.22.5/Makefile.in 2013-07-08 17:10:53.382213184 +0200 +@@ -456,7 +456,7 @@ + @BUILD_POPPLER_CPP_TRUE@cpp_subdir = cpp + @BUILD_POPPLER_CPP_TRUE@cpp_pc_file = poppler-cpp.pc + @BUILD_UTILS_TRUE@utils_subdir = utils +-SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) test $(qt4_subdir) $(cpp_subdir) ++SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) $(qt4_subdir) $(cpp_subdir) + + # Add CMake buildsystem files here so they get added on make dist + EXTRA_DIST = README-XPDF poppler.pc.in poppler-uninstalled.pc.in \ diff --git a/poppler/poppler-snprintf.patch.1 b/poppler/poppler-snprintf.patch.1 new file mode 100644 index 000000000000..389a5b0fc97e --- /dev/null +++ b/poppler/poppler-snprintf.patch.1 @@ -0,0 +1,50 @@ +--- poppler-0.22.5/poppler/Catalog.cc 2013-06-09 12:16:12.000000000 +0200 ++++ poppler-0.22.5/poppler/Catalog.cc 2013-07-08 16:54:30.712095880 +0200 +@@ -40,6 +40,14 @@ + + #include <stddef.h> + #include <stdlib.h> ++#ifdef _WIN32 ++# ifdef __MINGW32__ ++# define _SNPRINTF_DLLIMPORT ++# endif ++# ifdef _MSC_VER ++# include <systools/win32/snprintf.h> ++# endif ++#endif + #include "goo/gmem.h" + #include "Object.h" + #include "PDFDoc.h" +--- poppler-0.22.5/poppler/GlobalParams.cc 2013-03-25 22:48:34.000000000 +0100 ++++ poppler-0.22.5/poppler/GlobalParams.cc 2013-07-08 16:55:04.753303654 +0200 +@@ -57,6 +57,12 @@ + #ifdef _WIN32 + # include <shlobj.h> + # include <mbstring.h> ++# ifdef __MINGW32__ ++# define _SNPRINTF_DLLIMPORT ++# endif ++# ifdef _MSC_VER ++# include <systools/win32/snprintf.h> ++# endif + #endif + #include "goo/gmem.h" + #include "goo/GooString.h" +--- poppler-0.22.5/poppler/PageLabelInfo.cc 2013-03-25 22:48:34.000000000 +0100 ++++ poppler-0.22.5/poppler/PageLabelInfo.cc 2013-07-08 16:56:47.977901129 +0200 +@@ -17,6 +17,14 @@ + #include <stdlib.h> + #include <stdio.h> + #include <assert.h> ++#ifdef _WIN32 ++# ifdef __MINGW32__ ++# define _SNPRINTF_DLLIMPORT ++# endif ++# ifdef _MSC_VER ++# include <systools/win32/snprintf.h> ++# endif ++#endif + + #include "PageLabelInfo.h" + +Only in poppler-0.22.5: poppler-snprintf.patch.1 |