diff options
author | Peter Foley <pefoley2@verizon.net> | 2012-11-10 15:16:14 -0500 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-13 07:29:34 +0000 |
commit | a6e9bb4c7bad649cb44efaeef67fa18090348c53 (patch) | |
tree | 9988224bcfa074fd8665d19052fe145800474742 /poppler | |
parent | a2b3ee4abf39e47037fa9adbf44a8742379098f7 (diff) |
fdo#38878 upgrade xpdf to poppler
Change-Id: Ib908a3acba1faabeb411b4d1459968a362ee8029
Reviewed-on: https://gerrit.libreoffice.org/1036
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'poppler')
-rw-r--r-- | poppler/ExternalPackage_poppler.mk | 17 | ||||
-rw-r--r-- | poppler/ExternalProject_poppler.mk | 29 | ||||
-rw-r--r-- | poppler/Makefile | 7 | ||||
-rw-r--r-- | poppler/Module_poppler.mk | 28 | ||||
-rwxr-xr-x | poppler/StaticLibrary_poppler.mk | 105 | ||||
-rw-r--r-- | poppler/UnpackedTarball_poppler.mk | 23 | ||||
-rwxr-xr-x | poppler/config.h | 250 | ||||
-rwxr-xr-x | poppler/poppler-config.h | 184 | ||||
-rw-r--r-- | poppler/poppler-ooopwd.patch | 101 | ||||
-rw-r--r-- | poppler/prj/build.lst | 2 | ||||
-rw-r--r-- | poppler/prj/d.lst | 0 |
11 files changed, 746 insertions, 0 deletions
diff --git a/poppler/ExternalPackage_poppler.mk b/poppler/ExternalPackage_poppler.mk new file mode 100644 index 000000000000..db8fe3438d3b --- /dev/null +++ b/poppler/ExternalPackage_poppler.mk @@ -0,0 +1,17 @@ +# -*- 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)) + +ifneq ($(COM),MSC) +$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libpoppler.a,poppler/.libs/libpoppler.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..bc5fc5aeec9d --- /dev/null +++ b/poppler/ExternalProject_poppler.mk @@ -0,0 +1,29 @@ +# -*- 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_unpacked,poppler,poppler)) + +$(eval $(call gb_ExternalProject_register_targets,poppler,\ + build \ +)) + +$(call gb_ExternalProject_get_state_target,poppler,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --without-x --disable-shared --disable-introspection \ + --disable-libopenjpeg --disable-libtiff --disable-libjpeg --disable-libpng --disable-splash-output \ + --disable-cairo-output --disable-poppler-glib --disable-poppler-qt4 --disable-poppler-cpp --disable-gtk-test \ + --disable-utils --disable-cms \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\ + $(if $(filter NO,$(SYSTEM_CAIRO)),CAIRO_CFLAGS="-I$(OUTDIR)/inc/cairo")\ + && $(MAKE) \ + && touch $@ + +# 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..95a9eb6fcc5d --- /dev/null +++ b/poppler/Module_poppler.mk @@ -0,0 +1,28 @@ +# -*- 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,\ + UnpackedTarball_poppler \ + ExternalPackage_poppler \ +)) +ifeq ($(COM),MSC) +$(eval $(call gb_Module_add_targets,poppler,\ + StaticLibrary_poppler \ +)) +else +$(eval $(call gb_Module_add_targets,poppler,\ + ExternalProject_poppler \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/poppler/StaticLibrary_poppler.mk b/poppler/StaticLibrary_poppler.mk new file mode 100755 index 000000000000..6c5778807159 --- /dev/null +++ b/poppler/StaticLibrary_poppler.mk @@ -0,0 +1,105 @@ +# -*- 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_StaticLibrary_StaticLibrary,poppler)) + +$(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,poppler)) + +$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,poppler,cc)) + +$(eval $(call gb_StaticLibrary_add_defs,poppler,\ + -Dsnprintf=_snprintf \ + -UNOMINMAX \ +)) + +$(eval $(call gb_StaticLibrary_set_include,poppler,\ + $$(INCLUDE) \ + -I$(call gb_UnpackedTarball_get_dir,poppler) \ + -I$(call gb_UnpackedTarball_get_dir,poppler/poppler) \ + -I$(call gb_UnpackedTarball_get_dir,poppler/goo) \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cxxobjects,poppler,\ + UnpackedTarball/poppler/poppler/Annot \ + UnpackedTarball/poppler/poppler/Array \ + UnpackedTarball/poppler/poppler/BuiltinFont \ + UnpackedTarball/poppler/poppler/BuiltinFontTables \ + UnpackedTarball/poppler/poppler/CachedFile \ + UnpackedTarball/poppler/poppler/Catalog \ + UnpackedTarball/poppler/poppler/CharCodeToUnicode \ + UnpackedTarball/poppler/poppler/CMap \ + UnpackedTarball/poppler/poppler/DateInfo \ + UnpackedTarball/poppler/poppler/Decrypt \ + UnpackedTarball/poppler/poppler/Dict \ + UnpackedTarball/poppler/poppler/Error \ + UnpackedTarball/poppler/poppler/FileSpec \ + UnpackedTarball/poppler/poppler/FontEncodingTables \ + UnpackedTarball/poppler/poppler/Form \ + UnpackedTarball/poppler/poppler/FontInfo \ + UnpackedTarball/poppler/poppler/Function \ + UnpackedTarball/poppler/poppler/Gfx \ + UnpackedTarball/poppler/poppler/GfxFont \ + UnpackedTarball/poppler/poppler/GfxState \ + UnpackedTarball/poppler/poppler/GlobalParams \ + UnpackedTarball/poppler/poppler/Hints \ + UnpackedTarball/poppler/poppler/JArithmeticDecoder \ + UnpackedTarball/poppler/poppler/JBIG2Stream \ + UnpackedTarball/poppler/poppler/Lexer \ + UnpackedTarball/poppler/poppler/Linearization \ + UnpackedTarball/poppler/poppler/Link \ + UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \ + UnpackedTarball/poppler/poppler/Movie \ + UnpackedTarball/poppler/poppler/NameToCharCode \ + UnpackedTarball/poppler/poppler/Object \ + UnpackedTarball/poppler/poppler/OptionalContent \ + UnpackedTarball/poppler/poppler/Outline \ + UnpackedTarball/poppler/poppler/OutputDev \ + UnpackedTarball/poppler/poppler/Page \ + UnpackedTarball/poppler/poppler/PageTransition \ + UnpackedTarball/poppler/poppler/Parser \ + UnpackedTarball/poppler/poppler/PDFDoc \ + UnpackedTarball/poppler/poppler/PDFDocEncoding \ + UnpackedTarball/poppler/poppler/PDFDocFactory \ + UnpackedTarball/poppler/poppler/PopplerCache \ + UnpackedTarball/poppler/poppler/ProfileData \ + UnpackedTarball/poppler/poppler/PreScanOutputDev \ + UnpackedTarball/poppler/poppler/PSTokenizer \ + UnpackedTarball/poppler/poppler/Rendition \ + UnpackedTarball/poppler/poppler/StdinCachedFile \ + UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \ + UnpackedTarball/poppler/poppler/Stream \ + UnpackedTarball/poppler/poppler/UnicodeMap \ + UnpackedTarball/poppler/poppler/UnicodeTypeTable \ + UnpackedTarball/poppler/poppler/ViewerPreferences \ + UnpackedTarball/poppler/poppler/XRef \ + UnpackedTarball/poppler/poppler/PSOutputDev \ + UnpackedTarball/poppler/poppler/PageLabelInfo \ + UnpackedTarball/poppler/poppler/SecurityHandler \ + UnpackedTarball/poppler/poppler/Sound \ + UnpackedTarball/poppler/poppler/XpdfPluginAPI \ + UnpackedTarball/poppler/poppler/JPXStream \ + UnpackedTarball/poppler/goo/GooString \ + UnpackedTarball/poppler/goo/GooList \ + UnpackedTarball/poppler/goo/GooHash \ + UnpackedTarball/poppler/goo/GooTimer \ + UnpackedTarball/poppler/goo/gmem \ + UnpackedTarball/poppler/goo/gfile \ + UnpackedTarball/poppler/goo/gstrtod \ + UnpackedTarball/poppler/fofi/FoFiIdentifier \ + UnpackedTarball/poppler/fofi/FoFiType1 \ + UnpackedTarball/poppler/fofi/FoFiType1C \ + UnpackedTarball/poppler/fofi/FoFiTrueType \ + UnpackedTarball/poppler/fofi/FoFiBase \ + UnpackedTarball/poppler/fofi/FoFiEncodings \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/poppler/UnpackedTarball_poppler.mk b/poppler/UnpackedTarball_poppler.mk new file mode 100644 index 000000000000..65b5b5c68edf --- /dev/null +++ b/poppler/UnpackedTarball_poppler.mk @@ -0,0 +1,23 @@ +# -*- 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))) + +ifeq ($(COM),MSC) +$(eval $(call gb_UnpackedTarball_add_file,poppler,config.h,poppler/config.h)) +$(eval $(call gb_UnpackedTarball_add_file,poppler,poppler/poppler-config.h,poppler/poppler-config.h)) +endif + +$(eval $(call gb_UnpackedTarball_add_patches,poppler,\ + poppler/poppler-ooopwd.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/poppler/config.h b/poppler/config.h new file mode 100755 index 000000000000..0d1fc0c716bd --- /dev/null +++ b/poppler/config.h @@ -0,0 +1,250 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Build against libcurl. */ +/* #undef ENABLE_LIBCURL */ + +/* Use libjpeg instead of builtin jpeg decoder. */ +/* #undef ENABLE_LIBJPEG */ + +/* Use libopenjpeg instead of builtin jpeg2000 decoder. */ +/* #undef ENABLE_LIBOPENJPEG */ + +/* Build against libpng. */ +/* #undef ENABLE_LIBPNG */ + +/* Build against libtiff. */ +/* #undef ENABLE_LIBTIFF */ + +/* Do not hardcode the library location */ +/* #undef ENABLE_RELOCATABLE */ + +/* Use zlib instead of builtin zlib decoder. */ +/* #undef ENABLE_ZLIB */ + +/* Use cairo for rendering. */ +#define HAVE_CAIRO 1 + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_DIRENT_H */ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Have FreeType2 include files */ +#define HAVE_FREETYPE_H 1 + +/* Define to 1 if you have the `fseek64' function. */ +/* #undef HAVE_FSEEK64 */ + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +/* #undef HAVE_FSEEKO */ + +/* Define to 1 if you have the `ftell64' function. */ +/* #undef HAVE_FTELL64 */ + +/* Defines if gettimeofday is available on your system */ +/* #undef HAVE_GETTIMEOFDAY */ + +/* Defines if gmtime_r is available on your system */ +/* #undef HAVE_GMTIME_R */ + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the <inttypes.h> header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define to 1 if you have the `tiff' library (-ltiff). */ +/* #undef HAVE_LIBTIFF */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Defines if localtime_r is available on your system */ +/* #undef HAVE_LOCALTIME_R */ + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkstemp' function. */ +/* #undef HAVE_MKSTEMP */ + +/* Define to 1 if you have the `mkstemps' function. */ +/* #undef HAVE_MKSTEMPS */ + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the <openjpeg.h> header file. */ +/* #undef HAVE_OPENJPEG_H */ + +/* Define to 1 if you have the `popen' function. */ +/* #undef HAVE_POPEN */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef HAVE_PTHREAD */ + +/* Use splash for rendering. */ +#define HAVE_SPLASH 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/mman.h> header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <tiffio.h> header file. */ +/* #undef HAVE_TIFFIO_H */ + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the <zlib.h> header file. */ +/* #undef HAVE_ZLIB_H */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Enable multithreading support. */ +#define MULTITHREADED 1 + +/* Generate OPI comments in PS output. */ +#define OPI_SUPPORT 1 + +/* Name of package */ +#define PACKAGE "poppler" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=poppler" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "poppler 0.20.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.20.5" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" + +/* Support for curl based doc builder is compiled in. */ +/* #undef POPPLER_HAS_CURL_SUPPORT */ + +/* Defines the poppler version */ +#define POPPLER_VERSION "0.20.5" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable word list support. */ +#define TEXTOUT_WORD_LIST 1 + +/* Defines if use cms */ +/* #undef USE_CMS */ + +/* Use fixed point arithmetic in the Splash backend */ +/* #undef USE_FIXEDPOINT */ + +/* Use single precision arithmetic in the Splash backend */ +/* #undef USE_FLOAT */ + +/* Defines if use lcms1 */ +/* #undef USE_LCMS1 */ + +/* Version number of package */ +#define VERSION "0.20.5" + +/* Use fontconfig font configuration backend */ +/* #undef WITH_FONTCONFIGURATION_FONTCONFIG */ + +/* Use win32 font configuration backend */ +#define WITH_FONTCONFIGURATION_WIN32 1 + +/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag. */ +/* #undef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +#define X_DISPLAY_MISSING 1 + +/* + * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system + * headers and I'm too lazy to write a configure test as long as only + * unixware is related + */ +#ifdef _UNIXWARE +#define HAVE_BOOLEAN +#endif + + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ diff --git a/poppler/poppler-config.h b/poppler/poppler-config.h new file mode 100755 index 000000000000..1a986791e471 --- /dev/null +++ b/poppler/poppler-config.h @@ -0,0 +1,184 @@ +/* poppler/poppler-config.h. Generated from poppler-config.h.in by configure. */ +//================================================= -*- mode: c++ -*- ==== +// +// poppler-config.h +// +// Copyright 1996-2011 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef POPPLER_CONFIG_H +#define POPPLER_CONFIG_H + +// We duplicate some of the config.h #define's here since they are +// used in some of the header files we install. The #ifndef/#endif +// around #undef look odd, but it's to silence warnings about +// redefining those symbols. + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION +#define POPPLER_VERSION "0.20.5" +#endif + +/* Enable multithreading support. */ +#ifndef MULTITHREADED +#define MULTITHREADED 1 +#endif + +/* Use fixedpoint. */ +#ifndef USE_FIXEDPOINT +/* #undef USE_FIXEDPOINT */ +#endif + +/* Use single precision arithmetic in the Splash backend */ +#ifndef USE_FLOAT +/* #undef USE_FLOAT */ +#endif + +/* Include support for OPI comments. */ +#ifndef OPI_SUPPORT +#define OPI_SUPPORT 1 +#endif + +/* Enable word list support. */ +#ifndef TEXTOUT_WORD_LIST +#define TEXTOUT_WORD_LIST 1 +#endif + +/* Use fontconfig font configuration backend */ +#ifndef WITH_FONTCONFIGURATION_FONTCONFIG +/* #undef WITH_FONTCONFIGURATION_FONTCONFIG */ +#endif + +/* Use win32 font configuration backend */ +#ifndef WITH_FONTCONFIGURATION_WIN32 +#define WITH_FONTCONFIGURATION_WIN32 1 +#endif + +/* Support for curl is compiled in. */ +#ifndef POPPLER_HAS_CURL_SUPPORT +/* #undef POPPLER_HAS_CURL_SUPPORT */ +#endif + +/* Use libjpeg instead of builtin jpeg decoder. */ +#ifndef ENABLE_LIBJPEG +/* #undef ENABLE_LIBJPEG */ +#endif + +/* Build against libtiff. */ +#ifndef ENABLE_LIBTIFF +/* #undef ENABLE_LIBTIFF */ +#endif + +/* Build against libpng. */ +#ifndef ENABLE_LIBPNG +/* #undef ENABLE_LIBPNG */ +#endif + +/* Use zlib instead of builtin zlib decoder. */ +#ifndef ENABLE_ZLIB +/* #undef ENABLE_ZLIB */ +#endif + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_DIRENT_H +/* #undef HAVE_DIRENT_H */ +#endif + +/* Defines if gettimeofday is available on your system */ +#ifndef HAVE_GETTIMEOFDAY +/* #undef HAVE_GETTIMEOFDAY */ +#endif + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#ifndef HAVE_NDIR_H +/* #undef HAVE_NDIR_H */ +#endif + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_DIR_H +/* #undef HAVE_SYS_DIR_H */ +#endif + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_NDIR_H +/* #undef HAVE_SYS_NDIR_H */ +#endif + +/* Have FreeType2 include files */ +#ifndef HAVE_FREETYPE_H +#define HAVE_FREETYPE_H 1 +#endif + +/* Defines if use cms */ +#ifndef USE_CMS +/* #undef USE_CMS */ +#endif + +// Also, there are preprocessor symbols in the header files +// that are used but never defined when building poppler using configure +// or cmake: DISABLE_OUTLINE, DEBUG_MEM, SPLASH_CMYK, HAVE_T1LIB_H, +// ENABLE_PLUGINS, DEBUG_FORMS, HAVE_FREETYPE_FREETYPE_H + +//------------------------------------------------------------------------ +// version +//------------------------------------------------------------------------ + +// copyright notice +#define popplerCopyright "Copyright 2005-2012 The Poppler Developers - http://poppler.freedesktop.org" +#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC" + +//------------------------------------------------------------------------ +// popen +//------------------------------------------------------------------------ + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define popen _popen +#define pclose _pclose +#endif + +#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS) +#define POPEN_READ_MODE "rb" +#else +#define POPEN_READ_MODE "r" +#endif + +//------------------------------------------------------------------------ +// Win32 stuff +//------------------------------------------------------------------------ + +#if defined(_WIN32) && !defined(_MSC_VER) +#include <windef.h> +#else +#define CDECL +#endif + +#if defined(_WIN32) +#ifdef _MSC_VER +#define strtok_r strtok_s +#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION) +char * strtok_r (char *s, const char *delim, char **save_ptr); +#endif +#endif + +//------------------------------------------------------------------------ +// Compiler +//------------------------------------------------------------------------ + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ + __attribute__((__format__(__printf__, fmt_index, va_index))) +#else +#define GCC_PRINTF_FORMAT(fmt_index, va_index) +#endif + +#if defined(_MSC_VER) +#define fmax(a, b) max(a, b) +#define fmin(a, b) min(a, b) +#endif + + +#endif /* POPPLER_CONFIG_H */ diff --git a/poppler/poppler-ooopwd.patch b/poppler/poppler-ooopwd.patch new file mode 100644 index 000000000000..b5083de52fb7 --- /dev/null +++ b/poppler/poppler-ooopwd.patch @@ -0,0 +1,101 @@ +--- misc/xpdf-3.02/poppler/SecurityHandler.cc 2007-02-27 23:05:52.000000000 +0100 ++++ misc/build/xpdf-3.02/poppler/SecurityHandler.cc 2011-02-03 16:41:49.000000000 +0100 +@@ -40,7 +40,7 @@ + + encryptDictA->dictLookup("Filter", &filterObj); + if (filterObj.isName("Standard")) { +- secHdlr = new StandardSecurityHandler(docA, encryptDictA); ++ secHdlr = new OOoImportSecurityhandler(docA, encryptDictA); + } else if (filterObj.isName()) { + #ifdef ENABLE_PLUGINS + if ((xsh = globalParams->getSecurityHandler(filterObj.getName()))) { +@@ -310,6 +310,60 @@ + return gTrue; + } + ++//------------------------------------------------------------------------ ++// OOoImportSecurityhandler ++//------------------------------------------------------------------------ ++ ++OOoImportSecurityhandler::~OOoImportSecurityhandler() ++{ ++} ++ ++inline Guchar toNum( Guchar digit ) ++{ ++ return (digit >= '0') && digit <= '9' ++ ? digit - '0' ++ : (digit >= 'A' && digit <= 'F') ++ ? digit - 'A' + 10 ++ : (digit >= 'a' && digit <= 'f') ++ ? digit - 'a' + 10 ++ : Guchar(0xff); ++} ++ ++GBool OOoImportSecurityhandler::authorize(void* authData) ++{ ++ if( !ok ) ++ return gFalse; ++ if( authData ) ++ { ++ GooString* ownerPassword = ((StandardAuthData *)authData)->ownerPassword; ++ if( ownerPassword ) ++ { ++ const char* pStr = ownerPassword->getCString(); ++ if( strncmp( pStr, "_OOO_pdfi_Credentials_", 22 ) == 0 ) ++ { ++ // a hex encoded byte sequence should follow until end of string ++ // the length must match fileKeyLength ++ // if this is the case we can assume that the password checked out ++ // and the file key is valid ++ // max len is 16 (the size of the fileKey array) ++ pStr += 22; ++ size_t i = 0; ++ while( pStr[0] && pStr[1] && i < sizeof( fileKey ) ) ++ { ++ fileKey[i++] = (toNum( *pStr++ ) << 4) ++ | (toNum( *pStr++ )); ++ } ++ if( i == size_t(fileKeyLength) ) ++ { ++ ownerPasswordOk = gTrue; ++ return gTrue; ++ } ++ } ++ } ++ } ++ return StandardSecurityHandler::authorize( authData ); ++} ++ + #ifdef ENABLE_PLUGINS + + //------------------------------------------------------------------------ +--- misc/xpdf-3.02/poppler/SecurityHandler.h 2007-02-27 23:05:52.000000000 +0100 ++++ misc/build/xpdf-3.02/poppler/SecurityHandler.h 2011-02-03 16:26:17.000000000 +0100 +@@ -103,7 +103,7 @@ + virtual int getEncVersion() { return encVersion; } + virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; } + +-private: ++protected: + + int permFlags; + GBool ownerPasswordOk; +@@ -119,6 +119,17 @@ + GBool ok; + }; + ++class OOoImportSecurityhandler : public StandardSecurityHandler ++{ ++public: ++ OOoImportSecurityhandler( PDFDoc* docA, Object* encryptDictA ) ++ : StandardSecurityHandler( docA, encryptDictA ) ++ {} ++ virtual ~OOoImportSecurityhandler(); ++ ++ virtual GBool authorize(void* authData); ++}; ++ + #ifdef ENABLE_PLUGINS + //------------------------------------------------------------------------ + // ExternalSecurityHandler diff --git a/poppler/prj/build.lst b/poppler/prj/build.lst new file mode 100644 index 000000000000..f45ffdb5b330 --- /dev/null +++ b/poppler/prj/build.lst @@ -0,0 +1,2 @@ +pop poppler : NULL +pop poppler nmake - all pop_poppler NULL diff --git a/poppler/prj/d.lst b/poppler/prj/d.lst new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/poppler/prj/d.lst |