changeset 2609:dcc2a7e93901

update package poppler
author Mark Brand <mabrand@mabrand.nl>
date Thu, 14 Jun 2012 17:25:04 +0200
parents a7c9c96d5be2
children aa9b01174b60
files index.html src/poppler-1-win32.patch src/poppler.mk
diffstat 3 files changed, 47 insertions(+), 130 deletions(-) [+]
line wrap: on
line diff
--- a/index.html	Thu Jun 14 15:11:31 2012 +0200
+++ b/index.html	Thu Jun 14 17:25:04 2012 +0200
@@ -1725,7 +1725,7 @@
     </tr>
     <tr>
         <td id="poppler-package">poppler</td>
-        <td id="poppler-version">0.18.4</td>
+        <td id="poppler-version">0.20.1</td>
         <td id="poppler-website"><a href="http://poppler.freedesktop.org/">poppler</a></td>
     </tr>
     <tr>
--- a/src/poppler-1-win32.patch	Thu Jun 14 15:11:31 2012 +0200
+++ b/src/poppler-1-win32.patch	Thu Jun 14 17:25:04 2012 +0200
@@ -1,151 +1,39 @@
 This file is part of MXE.
 See index.html for further information.
 
-From 991d23243522e1ae2bd8efd279032792681f3789 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com>
-Date: Sat, 21 Apr 2012 09:29:25 +0200
-Subject: [PATCH 1/4] Fix Standard-14 fallback fonts
-
-wingding.ttf is totally different from ZapfDingbats. symbol.ttf is only a lousy fallback for Symbol.
-Based on patch provided by Jonathan Kew.
-Proposed upstream at https://bugs.freedesktop.org/show_bug.cgi?id=49037
----
- poppler/GlobalParamsWin.cc |    6 +++++-
- 1 files changed, 5 insertions(+), 1 deletions(-)
-
-diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
-index f989fb8..b15773f 100644
---- a/poppler/GlobalParamsWin.cc
-+++ b/poppler/GlobalParamsWin.cc
-@@ -73,13 +73,17 @@ static struct {
-     {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf"},
-     {"Helvetica-Oblique",     "n019023l.pfb", "ariali.ttf"},
-     // TODO: not sure if "symbol.ttf" is right
-+    // "symbol.ttf" can be used as a fallback, but some symbols are differently
-+    // encoded (e.g., the glyphs for 'f', 'j', 'v'), while most other glyphs
-+    // have a fairly different appearance
-     {"Symbol",                "s050000l.pfb", "symbol.ttf"},
-     {"Times-Bold",            "n021004l.pfb", "timesbd.ttf"},
-     {"Times-BoldItalic",      "n021024l.pfb", "timesbi.ttf"},
-     {"Times-Italic",          "n021023l.pfb", "timesi.ttf"},
-     {"Times-Roman",           "n021003l.pfb", "times.ttf"},
-     // TODO: not sure if "wingding.ttf" is right
--    {"ZapfDingbats",          "d050000l.pfb", "wingding.ttf"},
-+    // No, the symbol sets are totally different
-+    {"ZapfDingbats",          "d050000l.pfb", NULL},
- 
-     // those seem to be frequently accessed by PDF files and I kind of guess
-     // which font file do the refer to
--- 
-1.7.5.4
-
-
-From 482782fa1951c8c75636918fb45c90f3f329bf86 Mon Sep 17 00:00:00 2001
+From 5aede813b0cfdf672241f925bc34b766cf567a0f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com>
 Date: Sat, 21 Apr 2012 09:34:46 +0200
-Subject: [PATCH 2/4] Only check for Type1 fonts in custom directory if path
+Subject: [PATCH 1/3] Only check for Type1 fonts in custom directory if path
  is non-NULL
 
 Otherwise, programs using poppler may crash
 Proposed upstream at https://bugs.freedesktop.org/show_bug.cgi?id=49037
 ---
  poppler/GlobalParamsWin.cc |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
-index b15773f..f68577f 100644
+index b77ac4f..f660224 100644
 --- a/poppler/GlobalParamsWin.cc
 +++ b/poppler/GlobalParamsWin.cc
-@@ -243,7 +243,7 @@ void GlobalParams::setupBaseFonts(char * dir)
-         if (displayFonts->lookup(fontName))
+@@ -423,7 +423,7 @@ void GlobalParams::setupBaseFonts(char * dir)
+         if (fontFiles->lookup(fontName))
              continue;
  
 -        if (dir) {
 +        if (dir && displayFontTab[i].t1FileName) {
              GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName);
-             if (FileExists(fontPath->getCString())) {
-                 AddFont(displayFonts, fontName, fontPath, displayFontT1);
+             if (FileExists(fontPath->getCString()) ||
+                 FileExists(replaceSuffix(fontPath, ".pfb", ".pfa")->getCString())) {
 -- 
-1.7.5.4
+1.7.10.4
 
 
-From 7f01e803b134d01a72f6912d088d7887eba0df08 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com>
-Date: Sat, 21 Apr 2012 11:57:02 +0200
-Subject: [PATCH 3/4] Allow custom substitution fonts on Windows
-
-Standard-compliant PDF viewers must be able to handle 14 standard fonts even if they are not embedded. For the Symbol and ZapfDingbats fonts, there is no suitable alternative available on Windows by default, so they must be provided separately (and poppler must find them).
-
-The search path is share/fonts/type1/gsfonts (relative to poppler) similar to *nix systems and the search path for poppler-data.
-Proposed upstream at https://bugs.freedesktop.org/show_bug.cgi?id=49037
----
- poppler/GlobalParams.cc    |   31 +++++++++++++++++++++++++++++++
- poppler/GlobalParamsWin.cc |    2 +-
- 2 files changed, 32 insertions(+), 1 deletions(-)
-
-diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
-index 687fd25..eea60be 100644
---- a/poppler/GlobalParams.cc
-+++ b/poppler/GlobalParams.cc
-@@ -214,6 +214,37 @@ get_poppler_datadir (void)
- 
- #ifdef _WIN32
- 
-+static char *
-+get_poppler_fontdir (void)
-+{
-+#if !ENABLE_RELOCATABLE
-+  static HMODULE hmodule = 0;
-+#endif
-+  static char retval[MAX_PATH];
-+  static int beenhere = 0;
-+
-+  unsigned char *p;
-+
-+  if (beenhere)
-+    return retval;
-+
-+  if (!GetModuleFileName (hmodule, (CHAR *) retval, sizeof(retval) - 32))
-+    return NULL;
-+
-+  p = _mbsrchr ((unsigned char *) retval, '\\');
-+  *p = '\0';
-+  p = _mbsrchr ((unsigned char *) retval, '\\');
-+  if (p) {
-+    if (stricmp ((const char *) (p+1), "bin") == 0)
-+      *p = '\0';
-+  }
-+  strcat (retval, "\\share\\fonts\\type1\\gsfonts");
-+
-+  beenhere = 1;
-+
-+  return retval;
-+}
-+
- //------------------------------------------------------------------------
- // WinFontInfo
- //------------------------------------------------------------------------
-diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
-index f68577f..3ee75e4 100644
---- a/poppler/GlobalParamsWin.cc
-+++ b/poppler/GlobalParamsWin.cc
-@@ -281,7 +281,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
- 
-     if (!fontName) return NULL;
-     lockGlobalParams;
--    setupBaseFonts(NULL);
-+    setupBaseFonts(get_poppler_fontdir());
-     dfp = (DisplayFontParam *)displayFonts->lookup(fontName);
-     if (!dfp) {
-         substFontName = findSubstituteName(fontName->getCString());
--- 
-1.7.5.4
-
-
-From e000aafa7dec5441d072158814fa35631c5a9c52 Mon Sep 17 00:00:00 2001
+From 944b910b4ede55c0b1dca5169960068fb9d1d0a4 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com>
 Date: Sat, 21 Apr 2012 13:19:54 +0200
-Subject: [PATCH 4/4] Don't use dllimport/dllexport
+Subject: [PATCH 2/3] Don't use dllimport/dllexport
 
 Otherwise static linking fails
 MXE workaround for https://bugs.freedesktop.org/show_bug.cgi?id=49038 (presumably would break shared linking!)
@@ -153,7 +41,7 @@
  cpp/poppler-global.h     |    5 -----
  poppler/XpdfPluginAPI.h  |   18 ------------------
  qt4/src/poppler-export.h |    5 -----
- 3 files changed, 0 insertions(+), 28 deletions(-)
+ 3 files changed, 28 deletions(-)
 
 diff --git a/cpp/poppler-global.h b/cpp/poppler-global.h
 index 5650182..6c3e01b 100644
@@ -174,10 +62,10 @@
  #if defined(poppler_cpp_EXPORTS)
  #  define POPPLER_CPP_EXPORT LIB_EXPORT
 diff --git a/poppler/XpdfPluginAPI.h b/poppler/XpdfPluginAPI.h
-index 22540f7..290aa63 100644
+index b0165c0..5a10595 100644
 --- a/poppler/XpdfPluginAPI.h
 +++ b/poppler/XpdfPluginAPI.h
-@@ -28,19 +28,11 @@ extern "C" {
+@@ -42,19 +42,11 @@ extern "C" {
   */
  #define xpdfPluginAPIVersion 1
  
@@ -197,7 +85,7 @@
  
  /*------------------------------------------------------------------------
   * Plugin setup/cleanup
-@@ -285,22 +277,12 @@ void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler);
+@@ -281,22 +273,12 @@ void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler);
  
  } XpdfPluginVecTable;
  
@@ -239,5 +127,33 @@
  #ifdef poppler_qt4_EXPORTS
  # define POPPLER_QT4_EXPORT LIB_EXPORT
 -- 
-1.7.5.4
+1.7.10.4
+
+
+From 66acb0dedae6564d1975d652abca10b18ab4eb46 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 14 Jun 2012 17:08:58 +0200
+Subject: [PATCH 3/3] fix typo
+
+taken from
+https://bugs.freedesktop.org/show_bug.cgi?id=51079
+---
+ poppler/GlobalParamsWin.cc |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
+index f660224..0e691eb 100644
+--- a/poppler/GlobalParamsWin.cc
++++ b/poppler/GlobalParamsWin.cc
+@@ -573,7 +573,7 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
+     *type = fi->type;
+     *fontNum = fi->fontNum;
+     if (substituteFontName)
+-      substituteFontName.Set(fi->substituteName->getCString());
++      substituteFontName->Set(fi->substituteName->getCString());
+   } else {
+     GooString *substFontName = new GooString(findSubstituteName(font, fontFiles,
+                                                                 substFiles,
+-- 
+1.7.10.4
+
--- a/src/poppler.mk	Thu Jun 14 15:11:31 2012 +0200
+++ b/src/poppler.mk	Thu Jun 14 17:25:04 2012 +0200
@@ -3,7 +3,7 @@
 
 PKG             := poppler
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := 3753caecba71afaf29f097e0b9c52e0f83a10a59
+$(PKG)_CHECKSUM := a2b09ffe216dbe5f259d71e81327e00edf8c1229
 $(PKG)_SUBDIR   := poppler-$($(PKG)_VERSION)
 $(PKG)_FILE     := poppler-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://poppler.freedesktop.org/$($(PKG)_FILE)
@@ -22,6 +22,7 @@
     #       undefined)
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
+        --build="`config.guess`" \
         --prefix='$(PREFIX)/$(TARGET)' \
         --disable-silent-rules \
         --disable-shared \