Kaydet (Commit) a6e9bb4c authored tarafından Peter Foley's avatar Peter Foley Kaydeden (comit) Tor Lillqvist

fdo#38878 upgrade xpdf to poppler

Change-Id: Ib908a3acba1faabeb411b4d1459968a362ee8029
Reviewed-on: https://gerrit.libreoffice.org/1036Reviewed-by: 's avatarTor Lillqvist <tml@iki.fi>
Tested-by: 's avatarTor Lillqvist <tml@iki.fi>
üst a2b3ee4a
......@@ -137,6 +137,7 @@ openldap\
package\
packimages\
padmin\
poppler\
postgresql\
psprint_config\
pyuno\
......@@ -239,7 +240,6 @@ redland\
setup_native\
stlport\
sysui\
xpdf\
export gb_TAILBUILDTARGET=all slowcheck
......
......@@ -126,6 +126,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
$(call gb_Helper_optional,OPENLDAP,openldap) \
package \
padmin \
$(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
psprint_config \
$(call gb_Helper_optional,PYUNO,pyuno) \
......
......@@ -1579,21 +1579,20 @@ endef
else # !SYSTEM_POPPLER
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
fofi \
Goo \
xpdf \
poppler \
))
define gb_LinkTarget__use_poppler
$(call gb_LinkTarget_set_include,$(1),\
-I$(OUTDIR)/inc/xpdf \
-I$(call gb_UnpackedTarball_get_dir,poppler) \
-I$(call gb_UnpackedTarball_get_dir,poppler/poppler) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_use_package,$(1),poppler)
$(call gb_LinkTarget_use_static_libraries,$(1),\
fofi \
Goo \
xpdf \
poppler \
)
ifeq ($(OS),MACOSX)
......
......@@ -494,6 +494,7 @@ export PLATFORMID=@PLATFORMID@
export PNG_TARBALL=@PNG_TARBALL@
export POPPLER_CFLAGS=$(gb_SPACE)@POPPLER_CFLAGS@
export POPPLER_LIBS=$(gb_SPACE)@POPPLER_LIBS@
export POPPLER_TARBALL=@POPPLER_TARBALL@
export POSTGRESQL_INC=@POSTGRESQL_INC@
export POSTGRESQL_LIB=@POSTGRESQL_LIB@
export POSTGRESQL_TARBALL=@POSTGRESQL_TARBALL@
......@@ -704,7 +705,6 @@ export WPS_LIBS=$(gb_SPACE)@WPS_LIBS@
export WPS_TARBALL=@WPS_TARBALL@
export XINERAMA_LINK=@XINERAMA_LINK@
export XMLLINT=@XMLLINT@
export XPDF_TARBALL=@XPDF_TARBALL@
export XRANDR_CFLAGS=$(gb_SPACE)@XRANDR_CFLAGS@
export XRANDR_DLOPEN=@XRANDR_DLOPEN@
export XRANDR_LIBS=$(gb_SPACE)@XRANDR_LIBS@
......
......@@ -9834,8 +9834,8 @@ if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" !=
else
AC_MSG_RESULT([internal])
SYSTEM_POPPLER=NO
XPDF_TARBALL="599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz"
BUILD_TYPE="$BUILD_TYPE XPDF"
POPPLER_TARBALL="8a80ae83eb7a327b031808d09ee1d54d-poppler-0.20.5.tar.gz"
BUILD_TYPE="$BUILD_TYPE POPPLER"
fi
else
AC_MSG_RESULT([no])
......@@ -9846,7 +9846,7 @@ AC_SUBST(ENABLE_PDFIMPORT)
AC_SUBST(SYSTEM_POPPLER)
AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
AC_SUBST(XPDF_TARBALL)
AC_SUBST(POPPLER_TARBALL)
if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
......@@ -11420,7 +11420,7 @@ dnl Test whether to build cairo or rely on the system version
dnl ===================================================================
SYSTEM_CAIRO=""
SYSTEM_CAIRO="NO"
if test "$test_cairo" = "yes" ; then
AC_MSG_CHECKING([whether to use the system cairo])
......
......@@ -83,7 +83,7 @@ c441926f3a552ed3e5b274b62e86af16-STLport-4.0.tar.gz
@WPD_TARBALL@
@WPG_TARBALL@
@WPS_TARBALL@
@XPDF_TARBALL@
@POPPLER_TARBALL@
@XSLTML_TARBALL@
@ZLIB_TARBALL@
http://dev-www.libreoffice.org/extern
......
# -*- 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:
# -*- 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:
# -*- 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:
# -*- 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:
# -*- 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:
# -*- 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:
/* 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 */
/* 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 */
--- misc/xpdf-3.02/xpdf/SecurityHandler.cc 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/SecurityHandler.cc 2011-02-03 16:41:49.000000000 +0100
--- 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);
......@@ -38,7 +38,7 @@
+ return gFalse;
+ if( authData )
+ {
+ GString* ownerPassword = ((StandardAuthData *)authData)->ownerPassword;
+ GooString* ownerPassword = ((StandardAuthData *)authData)->ownerPassword;
+ if( ownerPassword )
+ {
+ const char* pStr = ownerPassword->getCString();
......@@ -70,8 +70,8 @@
#ifdef ENABLE_PLUGINS
//------------------------------------------------------------------------
--- misc/xpdf-3.02/xpdf/SecurityHandler.h 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/SecurityHandler.h 2011-02-03 16:26:17.000000000 +0100
--- 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; }
......
pop poppler : NULL
pop poppler nmake - all pop_poppler NULL
......@@ -34,13 +34,10 @@ $(eval $(call gb_Executable_use_packages,xpdfimport,\
$(eval $(call gb_Executable_use_externals,xpdfimport,\
poppler \
fontconfig \
zlib \
))
$(eval $(call gb_Executable_set_include,xpdfimport,\
$$(INCLUDE) \
))
$(eval $(call gb_Executable_add_exception_objects,xpdfimport,\
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl \
sdext/source/pdfimport/xpdfwrapper/pnghelper \
......
......@@ -34,9 +34,6 @@
#include "Link.h"
#include "Object.h"
#include "OutputDev.h"
#ifndef SYSTEM_POPPLER
# include "parseargs.h"
#endif
#include "GlobalParams.h"
#include "PDFDoc.h"
......@@ -52,16 +49,11 @@
class GfxPath;
class GfxFont;
class PDFDoc;
#ifndef SYSTEM_POPPLER
#define POPPLER_CHECK_VERSION(major,minor,micro) (0)
typedef GString GooString;
#else
#include <cpp/poppler-version.h>
#define POPPLER_CHECK_VERSION(major,minor,micro) \
(POPPLER_VERSION_MAJOR > (major) || \
(POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR > (minor)) || \
(POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR == (minor) && POPPLER_VERSION_MICRO >= (micro)))
#endif
namespace pdfi
{
......
......@@ -25,33 +25,12 @@
FILE* g_binary_out=stderr;
#ifndef SYSTEM_POPPLER
static char ownerPassword[33] = "\001";
static char userPassword[33] = "\001";
static char outputFile[256] = "\001";
static ArgDesc argDesc[] = {
{(char*)"-f", argString, outputFile, sizeof(outputFile),
(char*)"output file for binary streams"},
{(char*)"-opw", argString, ownerPassword, sizeof(ownerPassword),
(char*)"owner password (for encrypted files)"},
{(char*)"-upw", argString, userPassword, sizeof(userPassword),
(char*)"user password (for encrypted files)"},
{NULL, argString, NULL, 0, NULL }
};
#else
static const char *ownerPassword = "\001";
static const char *userPassword = "\001";
static const char *outputFile = "\001";
#endif
int main(int argc, char **argv)
{
#ifndef SYSTEM_POPPLER
// parse args; initialize to defaults
if( !parseArgs(argDesc, &argc, argv) )
return 1;
#else
int k = 0;
while (k < argc)
{
......@@ -78,19 +57,15 @@ int main(int argc, char **argv)
}
++k;
}
#endif
if( argc < 2 )
return 1;
// read config file
globalParams = new GlobalParams(
#ifndef SYSTEM_POPPLER
(char*)""
#endif
);
globalParams->setErrQuiet(gTrue);
#if !defined(SYSTEM_POPPLER) || defined(_MSC_VER)
#if _MSC_VER
globalParams->setupBaseFonts(NULL);
#endif
......
tb tail_build : BERKELEYDB:berkeleydb CAIRO:cairo CPPUNIT:cppunit EXPAT:expat ICU:icu JPEG:jpeg LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
tb tail_build : BERKELEYDB:berkeleydb CAIRO:cairo CPPUNIT:cppunit EXPAT:expat ICU:icu JPEG:jpeg LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland ZLIB:zlib external solenv soltools NULL
tb tail_build\prj nmake - all tb_prj NULL
PDF-viewer library from [http://www.foolabs.com/xpdf/].
This code is -used by [[sdext/source/pdfimport]] to implement the PDF
import functionality, that allows PDF's to be edited.
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
# dmake create_clean -- just unpacks
# dmake patch -- unpacks and applies patch file
# dmake create_patch -- creates a patch file
PRJ=.
PRJNAME=xpdf
TARGET=xpdflib
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
.IF "$(SYSTEM_POPPLER)" == "YES"
dummy:
@echo "An already available installation of poppler should exist on your system."
@echo "Therefore xpdf provided here does not need to be built in addition."
.ENDIF
# --- Files --------------------------------------------------------
TARFILE_NAME=xpdf-3.02
TARFILE_MD5=599dc4cc65a07ee868cf92a667a913d2
PATCH_FILES=$(TARFILE_NAME).patch xpdf-3.02-ooopwd.patch xpdf-3.02-gfxColorMaxComps.patch xpdf-no-writable-literals.patch
CONFIGURE_DIR=
BUILD_DIR=$(CONFIGURE_DIR)
.IF "$(SYSBASE)"!=""
.IF "$(EXTRA_CFLAGS)"!=""
CFLAGS:=$(EXTRA_CFLAGS)
CXXFLAGS:=$(EXTRA_CFLAGS)
.EXPORT : CFLAGS CXXFLAGS
.ENDIF # "$(EXTRA_CFLAGS)"!=""
.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
CFLAGS:=$(EXTRA_CDEFS)
CXXFLAGS+:=$(EXTRA_CDEFS)
.EXPORT: CFLAGS CXXFLAGS
.ENDIF
.IF "$(GUI)"=="UNX"
.IF "$(OS)"=="SOLARIS"
CFLAGS:=-O $(ARCH_FLAGS)
.IF "$(COM)$(CPU)" == "C52I"
CXXFLAGS:=-O2 $(ARCH_FLAGS)
.ELSE
CXXFLAGS:=-O $(ARCH_FLAGS)
.ENDIF
.IF "$(SYSBASE)" != ""
CXXFLAGS +:= -I$(SYSBASE)/usr/include
.END
LDFLAGS:=$(ARCH_FLAGS)
.EXPORT : CFLAGS CXXFLAGS LDFLAGS
.ENDIF
CONFIGURE_ACTION=configure
CONFIGURE_FLAGS+=--without-x --without-libpaper-library --without-t1-library --enable-multithreaded --enable-exceptions
.IF "$(OS)" == "MACOSX"
CONFIGURE_FLAGS += \
--prefix=/@.__________________________________________________$(EXTRPATH)
.END
.IF "$(CROSS_COMPILING)"=="YES"
CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
.ENDIF
.IF "$(OS)$(CPU)"=="MACOSXP"
CXXFLAGS+=-malign-natural
.EXPORT: CXXFLAGS
.ENDIF
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
.ELSE
.IF "$(COM)"=="GCC"
LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2
.EXPORT : LDFLAGS
CONFIGURE_ACTION=./configure
CONFIGURE_FLAGS+=--without-x --enable-multithreaded --enable-exceptions LIBS=-lgdi32
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
.ELSE
CONFIGURE_ACTION=
BUILD_ACTION= cmd.exe /d /c ms_make.bat
.ENDIF
.ENDIF
CONVERTFILES=ms_make.bat
BUILD_FLAGS=
OUT2INC= \
fofi$/*.h \
goo$/*.h \
xpdf$/*.h \
aconf.h \
aconf2.h
.IF "$(GUI)"=="UNX"
OUT2LIB= \
fofi$/lib*.a \
goo$/lib*.a \
xpdf$/lib*.a
.ELSE
.IF "$(COM)"=="GCC"
OUT2LIB= \
fofi$/lib*.a \
goo$/lib*.a \
xpdf$/lib*.a
.ELSE
OUT2LIB= \
fofi$/*.lib \
goo$/*.lib \
xpdf$/*.lib
.ENDIF
.ENDIF
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
xp xpdf : solenv soltools NULL
xp xpdf nmake - all xp_xpdf NULL
mkdir: %_DEST%\inc\xpdf
..\%__SRC%\inc\*.h %_DEST%\inc\xpdf\*.h
..\%__SRC%\lib\lib*.a %_DEST%\lib
..\%__SRC%\lib\*.lib %_DEST%\lib
..\%__SRC%\bin\*.dll %_DEST%\bin
--- misc/xpdf-3.02/xpdf/GfxState.cc 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/GfxState.cc 2011-05-18 20:08:45.003807128 +0200
@@ -2678,7 +2678,7 @@
double x[16], y[16];
Guint xi, yi;
GfxColorComp c[4][gfxColorMaxComps];
- Guint ci[4];
+ Guint ci[gfxColorMaxComps];
GfxShadingBitBuf *bitBuf;
Object obj1, obj2;
int i, j;
--- misc/xpdf-3.02/xpdf/GfxState.h 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/GfxState.h 2011-05-18 20:13:26.973936566 +0200
@@ -393,8 +393,8 @@
int nComps; // number of color components (1, 3, or 4)
GfxColorSpace *alt; // alternate color space
- double rangeMin[4]; // min values for each component
- double rangeMax[4]; // max values for each component
+ double rangeMin[gfxColorMaxComps]; // min values for each component
+ double rangeMax[gfxColorMaxComps]; // max values for each component
Ref iccProfileStream; // the ICC profile
};
This diff is collapsed.
--- misc/xpdf-3.02/xpdf/Error.h.sav 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/Error.h 2012-10-09 23:24:12.002455791 +0200
@@ -18,6 +18,6 @@
#include <stdio.h>
#include "config.h"
-extern void CDECL error(int pos, char *msg, ...);
+extern void CDECL error(int pos, const char *msg, ...);
#endif
--- misc/build/xpdf-3.02/xpdf/Error.cc.sav 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/Error.cc 2012-10-09 23:24:27.813569809 +0200
@@ -18,7 +18,7 @@
#include "GlobalParams.h"
#include "Error.h"
-void CDECL error(int pos, char *msg, ...) {
+void CDECL error(int pos, const char *msg, ...) {
va_list args;
// NB: this can be called before the globalParams object is created
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment