summaryrefslogtreecommitdiff
path: root/external/poppler
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-11-03 20:21:01 +0200
committerDavid Tardon <dtardon@redhat.com>2013-11-04 02:31:25 -0600
commit40276b4ceb72f1d070bb1457ed5b403b35ca4deb (patch)
treed3853c906a5732c5d4de226f727cb4a38e58d80a /external/poppler
parentfde2065b0f3266fc7ee9e1b85733e3ddcf1c9e03 (diff)
fdo#70393: move poppler to a subdir of external
Change-Id: I399df92d2b6907c129e18f3a55afeadf02783c14 Reviewed-on: https://gerrit.libreoffice.org/6548 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/poppler')
-rw-r--r--external/poppler/ExternalProject_poppler.mk45
-rw-r--r--external/poppler/Makefile7
-rw-r--r--external/poppler/Module_poppler.mk21
-rw-r--r--external/poppler/README1
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk21
-rw-r--r--external/poppler/poppler-mac-fake.patch.113
-rw-r--r--external/poppler/poppler-nochecknew.patch.111
-rw-r--r--external/poppler/poppler-notests.patch.111
-rw-r--r--external/poppler/poppler-snprintf.patch.150
9 files changed, 180 insertions, 0 deletions
diff --git a/external/poppler/ExternalProject_poppler.mk b/external/poppler/ExternalProject_poppler.mk
new file mode 100644
index 000000000000..d1cfde8d9513
--- /dev/null
+++ b/external/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 MACOSX,$(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/external/poppler/Makefile b/external/poppler/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/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/external/poppler/Module_poppler.mk b/external/poppler/Module_poppler.mk
new file mode 100644
index 000000000000..910145a138f0
--- /dev/null
+++ b/external/poppler/Module_poppler.mk
@@ -0,0 +1,21 @@
+# -*- 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_POPPLER),NO)
+
+$(eval $(call gb_Module_add_targets,poppler,\
+ ExternalProject_poppler \
+ UnpackedTarball_poppler \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/README b/external/poppler/README
new file mode 100644
index 000000000000..35a640264618
--- /dev/null
+++ b/external/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/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
new file mode 100644
index 000000000000..93c8fa19a772
--- /dev/null
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -0,0 +1,21 @@
+# -*- 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),,poppler))
+
+$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
+ external/poppler/poppler-notests.patch.1 \
+ external/poppler/poppler-snprintf.patch.1 \
+ external/poppler/poppler-mac-fake.patch.1 \
+ external/poppler/poppler-nochecknew.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/poppler-mac-fake.patch.1 b/external/poppler/poppler-mac-fake.patch.1
new file mode 100644
index 000000000000..d0b1936658ca
--- /dev/null
+++ b/external/poppler/poppler-mac-fake.patch.1
@@ -0,0 +1,13 @@
+diff -ur poppler.org/poppler/GlobalParams.cc poppler/poppler/GlobalParams.cc
+--- poppler.org/poppler/GlobalParams.cc 2013-07-09 06:24:38.000000000 -0500
++++ poppler/poppler/GlobalParams.cc 2013-07-09 06:25:18.000000000 -0500
+@@ -1327,7 +1327,7 @@
+ return path;
+ }
+
+-#elif WITH_FONTCONFIGURATION_WIN32
++#elif WITH_FONTCONFIGURATION_WIN32 && defined(_WIN32)
+ #include "GlobalParamsWin.cc"
+
+ GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) {
+
diff --git a/external/poppler/poppler-nochecknew.patch.1 b/external/poppler/poppler-nochecknew.patch.1
new file mode 100644
index 000000000000..1e4890fe758f
--- /dev/null
+++ b/external/poppler/poppler-nochecknew.patch.1
@@ -0,0 +1,11 @@
+--- poppler-0.22.5/configure
++++ poppler-0.22.5/configure
+@@ -24014,7 +24014,7 @@
+ fi
+ case "$enable_compile_warnings" in
+ no) ;;
+- yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS";
++ yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-common $CXXFLAGS";
+ CFLAGS="-Wall $CFLAGS" ;;
+ kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \
+ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \
diff --git a/external/poppler/poppler-notests.patch.1 b/external/poppler/poppler-notests.patch.1
new file mode 100644
index 000000000000..7fcfee95ab2b
--- /dev/null
+++ b/external/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/external/poppler/poppler-snprintf.patch.1 b/external/poppler/poppler-snprintf.patch.1
new file mode 100644
index 000000000000..389a5b0fc97e
--- /dev/null
+++ b/external/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