summaryrefslogtreecommitdiff
path: root/patches/source/xpdf
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 15:10:50 -0700
commit329684b59b8d55dd403c2c59f76d37210ba2f517 (patch)
tree10421c6ee3bf179d50915cc00d4c15c1b83cb77a /patches/source/xpdf
parentb76270bf9e6dd375e495fec92140a79a79415d27 (diff)
downloadcurrent-329684b59b8d55dd403c2c59f76d37210ba2f517.tar.gz
Fri May 25 23:29:36 UTC 201813.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack13.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/xpdf')
-rw-r--r--patches/source/xpdf/doinst.sh19
-rw-r--r--patches/source/xpdf/lang/xpdf-arabic.diff7
-rw-r--r--patches/source/xpdf/lang/xpdf-chinese-simplified.diff19
-rw-r--r--patches/source/xpdf/lang/xpdf-chinese-traditional.diff17
-rw-r--r--patches/source/xpdf/lang/xpdf-cyrillic.diff9
-rw-r--r--patches/source/xpdf/lang/xpdf-greek.diff9
-rw-r--r--patches/source/xpdf/lang/xpdf-hebrew.diff9
-rw-r--r--patches/source/xpdf/lang/xpdf-japanese.diff55
-rw-r--r--patches/source/xpdf/lang/xpdf-korean.diff15
-rw-r--r--patches/source/xpdf/lang/xpdf-latin2.diff7
-rw-r--r--patches/source/xpdf/lang/xpdf-thai.diff9
-rw-r--r--patches/source/xpdf/lang/xpdf-turkish.diff7
-rw-r--r--patches/source/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff55
-rw-r--r--patches/source/xpdf/patches/xpdf.XPDFViewer.diff11
-rw-r--r--patches/source/xpdf/patches/xpdfrc.diff43
-rw-r--r--patches/source/xpdf/slack-desc19
-rwxr-xr-xpatches/source/xpdf/xpdf.SlackBuild151
-rw-r--r--patches/source/xpdf/xpdf.desktop98
18 files changed, 559 insertions, 0 deletions
diff --git a/patches/source/xpdf/doinst.sh b/patches/source/xpdf/doinst.sh
new file mode 100644
index 00000000..03a6ae85
--- /dev/null
+++ b/patches/source/xpdf/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/xpdfrc.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/patches/source/xpdf/lang/xpdf-arabic.diff b/patches/source/xpdf/lang/xpdf-arabic.diff
new file mode 100644
index 00000000..006e836a
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-arabic.diff
@@ -0,0 +1,7 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.102417270 -0500
+@@ -1,3 +1,3 @@
+ #----- begin Arabic support package (2011-aug-15)
+-unicodeMap ISO-8859-6 /usr/local/share/xpdf/arabic/ISO-8859-6.unicodeMap
++unicodeMap ISO-8859-6 /usr/share/xpdf/arabic/ISO-8859-6.unicodeMap
+ #----- end Arabic support package
diff --git a/patches/source/xpdf/lang/xpdf-chinese-simplified.diff b/patches/source/xpdf/lang/xpdf-chinese-simplified.diff
new file mode 100644
index 00000000..bec5e25b
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-chinese-simplified.diff
@@ -0,0 +1,19 @@
+--- ./add-to-xpdfrc.orig 2011-09-02 17:24:44.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:45:42.020412765 -0500
+@@ -1,9 +1,9 @@
+ #----- begin Chinese Simplified support package (2011-sep-02)
+-cidToUnicode Adobe-GB1 /usr/local/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
+-unicodeMap ISO-2022-CN /usr/local/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
+-unicodeMap EUC-CN /usr/local/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
+-unicodeMap GBK /usr/local/share/xpdf/chinese-simplified/GBK.unicodeMap
+-cMapDir Adobe-GB1 /usr/local/share/xpdf/chinese-simplified/CMap
+-toUnicodeDir /usr/local/share/xpdf/chinese-simplified/CMap
+-#fontFileCC Adobe-GB1 /usr/..../gkai00mp.ttf
++cidToUnicode Adobe-GB1 /usr/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
++unicodeMap ISO-2022-CN /usr/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
++unicodeMap EUC-CN /usr/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
++unicodeMap GBK /usr/share/xpdf/chinese-simplified/GBK.unicodeMap
++cMapDir Adobe-GB1 /usr/share/xpdf/chinese-simplified/CMap
++toUnicodeDir /usr/share/xpdf/chinese-simplified/CMap
++fontFileCC Adobe-GB1 /usr/share/fonts/TTF/wqy-zenhei.ttc
+ #----- end Chinese Simplified support package
diff --git a/patches/source/xpdf/lang/xpdf-chinese-traditional.diff b/patches/source/xpdf/lang/xpdf-chinese-traditional.diff
new file mode 100644
index 00000000..24857f46
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-chinese-traditional.diff
@@ -0,0 +1,17 @@
+--- ./add-to-xpdfrc.orig 2011-09-02 17:24:44.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:46:03.285412085 -0500
+@@ -1,8 +1,8 @@
+ #----- begin Chinese Traditional support package (2011-sep-02)
+-cidToUnicode Adobe-CNS1 /usr/local/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
+-unicodeMap Big5 /usr/local/share/xpdf/chinese-traditional/Big5.unicodeMap
+-unicodeMap Big5ascii /usr/local/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
+-cMapDir Adobe-CNS1 /usr/local/share/xpdf/chinese-traditional/CMap
+-toUnicodeDir /usr/local/share/xpdf/chinese-traditional/CMap
+-#fontFileCC Adobe-CNS1 /usr/..../bkai00mp.ttf
++cidToUnicode Adobe-CNS1 /usr/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
++unicodeMap Big5 /usr/share/xpdf/chinese-traditional/Big5.unicodeMap
++unicodeMap Big5ascii /usr/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
++cMapDir Adobe-CNS1 /usr/share/xpdf/chinese-traditional/CMap
++toUnicodeDir /usr/share/xpdf/chinese-traditional/CMap
++fontFileCC Adobe-CNS1 /usr/share/fonts/TTF/wqy-zenhei.ttc
+ #----- end Chinese Traditional support package
diff --git a/patches/source/xpdf/lang/xpdf-cyrillic.diff b/patches/source/xpdf/lang/xpdf-cyrillic.diff
new file mode 100644
index 00000000..c453271a
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-cyrillic.diff
@@ -0,0 +1,9 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.115417270 -0500
+@@ -1,4 +1,4 @@
+ #----- begin Cyrillic support package (2011-aug-15)
+-nameToUnicode /usr/local/share/xpdf/cyrillic/Bulgarian.nameToUnicode
+-unicodeMap KOI8-R /usr/local/share/xpdf/cyrillic/KOI8-R.unicodeMap
++nameToUnicode /usr/share/xpdf/cyrillic/Bulgarian.nameToUnicode
++unicodeMap KOI8-R /usr/share/xpdf/cyrillic/KOI8-R.unicodeMap
+ #----- end Cyrillic support package
diff --git a/patches/source/xpdf/lang/xpdf-greek.diff b/patches/source/xpdf/lang/xpdf-greek.diff
new file mode 100644
index 00000000..2e846160
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-greek.diff
@@ -0,0 +1,9 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.116417270 -0500
+@@ -1,4 +1,4 @@
+ #----- begin Greek support package (2011-aug-15)
+-nameToUnicode /usr/local/share/xpdf/greek/Greek.nameToUnicode
+-unicodeMap ISO-8859-7 /usr/local/share/xpdf/greek/ISO-8859-7.unicodeMap
++nameToUnicode /usr/share/xpdf/greek/Greek.nameToUnicode
++unicodeMap ISO-8859-7 /usr/share/xpdf/greek/ISO-8859-7.unicodeMap
+ #----- end Greek support package
diff --git a/patches/source/xpdf/lang/xpdf-hebrew.diff b/patches/source/xpdf/lang/xpdf-hebrew.diff
new file mode 100644
index 00000000..2c27bb6f
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-hebrew.diff
@@ -0,0 +1,9 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.117417269 -0500
+@@ -1,4 +1,4 @@
+ #----- begin Hebrew support package (2011-aug-15)
+-unicodeMap ISO-8859-8 /usr/local/share/xpdf/hebrew/ISO-8859-8.unicodeMap
+-unicodeMap Windows-1255 /usr/local/share/xpdf/hebrew/Windows-1255.unicodeMap
++unicodeMap ISO-8859-8 /usr/share/xpdf/hebrew/ISO-8859-8.unicodeMap
++unicodeMap Windows-1255 /usr/share/xpdf/hebrew/Windows-1255.unicodeMap
+ #----- end Hebrew support package
diff --git a/patches/source/xpdf/lang/xpdf-japanese.diff b/patches/source/xpdf/lang/xpdf-japanese.diff
new file mode 100644
index 00000000..ff0c6e98
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-japanese.diff
@@ -0,0 +1,55 @@
+--- ./add-to-xpdfrc.orig 2013-03-29 14:49:00.000000000 +0900
++++ ./add-to-xpdfrc 2013-03-29 15:00:17.000000000 +0900
+@@ -1,9 +1,45 @@
+ #----- begin Japanese support package (2011-sep-02)
+-cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
+-unicodeMap ISO-2022-JP /usr/local/share/xpdf/japanese/ISO-2022-JP.unicodeMap
+-unicodeMap EUC-JP /usr/local/share/xpdf/japanese/EUC-JP.unicodeMap
+-unicodeMap Shift-JIS /usr/local/share/xpdf/japanese/Shift-JIS.unicodeMap
+-cMapDir Adobe-Japan1 /usr/local/share/xpdf/japanese/CMap
+-toUnicodeDir /usr/local/share/xpdf/japanese/CMap
+-#fontFileCC Adobe-Japan1 /usr/..../kochi-mincho.ttf
++cidToUnicode Adobe-Japan1 /usr/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
++unicodeMap ISO-2022-JP /usr/share/xpdf/japanese/ISO-2022-JP.unicodeMap
++unicodeMap EUC-JP /usr/share/xpdf/japanese/EUC-JP.unicodeMap
++unicodeMap Shift-JIS /usr/share/xpdf/japanese/Shift-JIS.unicodeMap
++cMapDir Adobe-Japan1 /usr/share/xpdf/japanese/CMap
++toUnicodeDir /usr/share/xpdf/japanese/CMap
++### use Sazanami by default
++fontFileCC Adobe-Japan1 /usr/share/fonts/TTF/sazanami-mincho.ttf
++### use Sazanami (Sazanami Gothic) if gothic font is required
++fontFileCC ShinGo-Bold /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC ShinGo-regular /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC MidashiGo-MB31 /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC FutoGoB101-Bold /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC HeiseiKakuGo-W5 /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC HeiseiKakuGo-W9 /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC HeiseiMaruGo-W4 /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC MS-Gothic /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC HG-GothicB /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC Kochi-Gothic /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC GothicBBB-Medium-H /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC GothicBBB-Medium /usr/share/fonts/TTF/sazanami-gothic.ttf
++fontFileCC Ryumin-Light-H /usr/share/fonts/TTF/sazanami-mincho.ttf
++fontFileCC Ryumin-Light /usr/share/fonts/TTF/sazanami-mincho.ttf
++### make default font name to "Ryumin-Light" when converted to PostScript
++psResidentFontCC Adobe-Japan1 H Ryumin-Light-H ISO-2022-JP
++psResidentFontCC Adobe-Japan1 V Ryumin-Light-V ISO-2022-JP
++# use "Gothic-BBB-Medium" if gothic font is required
++psResidentFont16 MidashiGo-MB31 H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 MidashiGo-MB31 V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 FutoGoB101-Bold H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 FutoGoB101-Bold V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 HeiseiKakuGo-W5 H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 HeiseiKakuGo-W5 V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 HeiseiKakuGo-W9 H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 HeiseiKakuGo-W9 V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 HeiseiMaruGo-W4 H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 HeiseiMaruGo-W4 V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 MS-Gothic H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 MS-Gothic V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 HG-GothicB H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 HG-GothicB V GothicBBB-Medium-V ISO-2022-JP
++psResidentFont16 Kochi-Gothic H GothicBBB-Medium-H ISO-2022-JP
++psResidentFont16 Kochi-Gothic V GothicBBB-Medium-V ISO-2022-JP
+ #----- end Japanese support package
diff --git a/patches/source/xpdf/lang/xpdf-korean.diff b/patches/source/xpdf/lang/xpdf-korean.diff
new file mode 100644
index 00000000..531ad629
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-korean.diff
@@ -0,0 +1,15 @@
+--- ./add-to-xpdfrc.orig 2011-09-02 17:24:45.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.119417269 -0500
+@@ -1,8 +1,8 @@
+ #----- begin Korean support package (2011-sep-02)
+-cidToUnicode Adobe-Korea1 /usr/local/share/xpdf/korean/Adobe-Korea1.cidToUnicode
+-unicodeMap ISO-2022-KR /usr/local/share/xpdf/korean/ISO-2022-KR.unicodeMap
+-cMapDir Adobe-Korea1 /usr/local/share/xpdf/korean/CMap
+-toUnicodeDir /usr/local/share/xpdf/korean/CMap
++cidToUnicode Adobe-Korea1 /usr/share/xpdf/korean/Adobe-Korea1.cidToUnicode
++unicodeMap ISO-2022-KR /usr/share/xpdf/korean/ISO-2022-KR.unicodeMap
++cMapDir Adobe-Korea1 /usr/share/xpdf/korean/CMap
++toUnicodeDir /usr/share/xpdf/korean/CMap
+ #fontFileCC Adobe-Korea1 /usr/..../batang.ttf"
+ #fontFileCC Unidocs-Korea1 /usr/..../batang.ttf"
+ #----- end Korean support package
diff --git a/patches/source/xpdf/lang/xpdf-latin2.diff b/patches/source/xpdf/lang/xpdf-latin2.diff
new file mode 100644
index 00000000..cf88fa02
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-latin2.diff
@@ -0,0 +1,7 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.120417269 -0500
+@@ -1,3 +1,3 @@
+ #----- begin Latin2 support package (2011-aug-15)
+-unicodeMap Latin2 /usr/local/share/xpdf/latin2/Latin2.unicodeMap
++unicodeMap Latin2 /usr/share/xpdf/latin2/Latin2.unicodeMap
+ #----- end Latin2 support package
diff --git a/patches/source/xpdf/lang/xpdf-thai.diff b/patches/source/xpdf/lang/xpdf-thai.diff
new file mode 100644
index 00000000..30c480ef
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-thai.diff
@@ -0,0 +1,9 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.121417269 -0500
+@@ -1,4 +1,4 @@
+ #----- begin Thai support package (2011-aug-15)
+-nameToUnicode /usr/local/share/xpdf/thai/Thai.nameToUnicode
+-unicodeMap TIS-620 /usr/local/share/xpdf/thai/TIS-620.unicodeMap
++nameToUnicode /usr/share/xpdf/thai/Thai.nameToUnicode
++unicodeMap TIS-620 /usr/share/xpdf/thai/TIS-620.unicodeMap
+ #----- end Thai support package
diff --git a/patches/source/xpdf/lang/xpdf-turkish.diff b/patches/source/xpdf/lang/xpdf-turkish.diff
new file mode 100644
index 00000000..81a79cff
--- /dev/null
+++ b/patches/source/xpdf/lang/xpdf-turkish.diff
@@ -0,0 +1,7 @@
+--- ./add-to-xpdfrc.orig 2011-08-15 16:24:29.000000000 -0500
++++ ./add-to-xpdfrc 2013-03-28 15:43:21.122417269 -0500
+@@ -1,3 +1,3 @@
+ #----- begin Turkish support package (2011-aug-15)
+-unicodeMap ISO-8859-9 /usr/local/share/xpdf/turkish/ISO-8859-9.unicodeMap
++unicodeMap ISO-8859-9 /usr/share/xpdf/turkish/ISO-8859-9.unicodeMap
+ #----- end Turkish support package
diff --git a/patches/source/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff b/patches/source/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff
new file mode 100644
index 00000000..891c41fd
--- /dev/null
+++ b/patches/source/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff
@@ -0,0 +1,55 @@
+From 3945969e0072217c143fefa3044512a31ac2afa8 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Sun, 11 Aug 2013
+Subject: CVE-2012-2142
+
+Filter stuff that might end up in the shell to address CVE-2012-2142.
+This code was adapted from the Poppler project.
+---
+ Error.cc | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+--- a/xpdf/Error.cc 2013-08-11
++++ b/xpdf/Error.cc 2013-08-11
+@@ -43,7 +43,7 @@ void setErrorCallback(void (*cbk)(void *
+
+ void CDECL error(ErrorCategory category, int pos, const char *msg, ...) {
+ va_list args;
+- GString *s;
++ GString *s, *sanitized;
+
+ // NB: this can be called before the globalParams object is created
+ if (!errorCbk && globalParams && globalParams->getErrQuiet()) {
+@@ -52,17 +52,28 @@ void CDECL error(ErrorCategory category,
+ va_start(args, msg);
+ s = GString::formatv(msg, args);
+ va_end(args);
++
++ sanitized = new GString ();
++ for (int i = 0; i < s->getLength(); ++i) {
++ const char c = s->getChar(i);
++ if (c < (char)0x20 || c >= (char)0x7f) {
++ sanitized->appendf("<{0:02x}>", c & 0xff);
++ } else {
++ sanitized->append(c);
++ }
++ }
++
+ if (errorCbk) {
+- (*errorCbk)(errorCbkData, category, pos, s->getCString());
++ (*errorCbk)(errorCbkData, category, pos, sanitized->getCString());
+ } else {
+ if (pos >= 0) {
+ fprintf(stderr, "%s (%d): %s\n",
+- errorCategoryNames[category], pos, s->getCString());
++ errorCategoryNames[category], pos, sanitized->getCString());
+ } else {
+ fprintf(stderr, "%s: %s\n",
+- errorCategoryNames[category], s->getCString());
++ errorCategoryNames[category], sanitized->getCString());
+ }
+ fflush(stderr);
+ }
+- delete s;
++ delete sanitized;
+ }
diff --git a/patches/source/xpdf/patches/xpdf.XPDFViewer.diff b/patches/source/xpdf/patches/xpdf.XPDFViewer.diff
new file mode 100644
index 00000000..0aa4455d
--- /dev/null
+++ b/patches/source/xpdf/patches/xpdf.XPDFViewer.diff
@@ -0,0 +1,11 @@
+--- ./xpdf/XPDFViewer.cc.orig 2011-08-15 16:08:53.000000000 -0500
++++ ./xpdf/XPDFViewer.cc 2013-03-28 15:35:31.589432279 -0500
+@@ -1803,7 +1803,7 @@
+ menuPane = XmCreatePulldownMenu(toolBar, "zoomMenuPane", args, n);
+ for (i = 0; i < nZoomMenuItems; ++i) {
+ n = 0;
+- s = XmStringCreateLocalized(zoomMenuInfo[i].label);
++ s = XmStringCreateLocalized((char *)zoomMenuInfo[i].label);
+ XtSetArg(args[n], XmNlabelString, s); ++n;
+ XtSetArg(args[n], XmNuserData, (XtPointer)i); ++n;
+ sprintf(buf, "zoom%d", i);
diff --git a/patches/source/xpdf/patches/xpdfrc.diff b/patches/source/xpdf/patches/xpdfrc.diff
new file mode 100644
index 00000000..c136f997
--- /dev/null
+++ b/patches/source/xpdf/patches/xpdfrc.diff
@@ -0,0 +1,43 @@
+--- ./doc/sample-xpdfrc.orig 2013-03-28 15:29:16.957444255 -0500
++++ ./doc/sample-xpdfrc 2013-03-28 15:32:11.413438678 -0500
+@@ -29,20 +29,20 @@
+ # installed in a "standard" location, xpdf will find them
+ # automatically.)
+
+-#fontFile Times-Roman /usr/local/share/ghostscript/fonts/n021003l.pfb
+-#fontFile Times-Italic /usr/local/share/ghostscript/fonts/n021023l.pfb
+-#fontFile Times-Bold /usr/local/share/ghostscript/fonts/n021004l.pfb
+-#fontFile Times-BoldItalic /usr/local/share/ghostscript/fonts/n021024l.pfb
+-#fontFile Helvetica /usr/local/share/ghostscript/fonts/n019003l.pfb
+-#fontFile Helvetica-Oblique /usr/local/share/ghostscript/fonts/n019023l.pfb
+-#fontFile Helvetica-Bold /usr/local/share/ghostscript/fonts/n019004l.pfb
+-#fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
+-#fontFile Courier /usr/local/share/ghostscript/fonts/n022003l.pfb
+-#fontFile Courier-Oblique /usr/local/share/ghostscript/fonts/n022023l.pfb
+-#fontFile Courier-Bold /usr/local/share/ghostscript/fonts/n022004l.pfb
+-#fontFile Courier-BoldOblique /usr/local/share/ghostscript/fonts/n022024l.pfb
+-#fontFile Symbol /usr/local/share/ghostscript/fonts/s050000l.pfb
+-#fontFile ZapfDingbats /usr/local/share/ghostscript/fonts/d050000l.pfb
++fontFile Times-Roman /usr/share/ghostscript/fonts/n021003l.pfb
++fontFile Times-Italic /usr/share/ghostscript/fonts/n021023l.pfb
++fontFile Times-Bold /usr/share/ghostscript/fonts/n021004l.pfb
++fontFile Times-BoldItalic /usr/share/ghostscript/fonts/n021024l.pfb
++fontFile Helvetica /usr/share/ghostscript/fonts/n019003l.pfb
++fontFile Helvetica-Oblique /usr/share/ghostscript/fonts/n019023l.pfb
++fontFile Helvetica-Bold /usr/share/ghostscript/fonts/n019004l.pfb
++fontFile Helvetica-BoldOblique /usr/share/ghostscript/fonts/n019024l.pfb
++fontFile Courier /usr/share/ghostscript/fonts/n022003l.pfb
++fontFile Courier-Oblique /usr/share/ghostscript/fonts/n022023l.pfb
++fontFile Courier-Bold /usr/share/ghostscript/fonts/n022004l.pfb
++fontFile Courier-BoldOblique /usr/share/ghostscript/fonts/n022024l.pfb
++fontFile Symbol /usr/share/ghostscript/fonts/s050000l.pfb
++fontFile ZapfDingbats /usr/share/ghostscript/fonts/d050000l.pfb
+
+ # If you need to display PDF files that refer to non-embedded fonts,
+ # you should add one or more fontDir options to point to the
+@@ -89,4 +89,4 @@
+ # clicked.
+
+ #launchCommand viewer-script
+-#urlCommand "netscape -remote 'openURL(%s)'"
++#urlCommand "firefox -remote 'openURL(%s)'"
diff --git a/patches/source/xpdf/slack-desc b/patches/source/xpdf/slack-desc
new file mode 100644
index 00000000..58072776
--- /dev/null
+++ b/patches/source/xpdf/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xpdf: xpdf (PDF viewer for X)
+xpdf:
+xpdf: Xpdf is a viewer for Portable Document Format (PDF) files.
+xpdf:
+xpdf: xpdf was written by Derek B. Noonburg.
+xpdf:
+xpdf:
+xpdf:
+xpdf:
+xpdf:
+xpdf:
diff --git a/patches/source/xpdf/xpdf.SlackBuild b/patches/source/xpdf/xpdf.SlackBuild
new file mode 100755
index 00000000..b4493f62
--- /dev/null
+++ b/patches/source/xpdf/xpdf.SlackBuild
@@ -0,0 +1,151 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=3.03
+PATCHLEVEL=
+BUILD=${BUILD:-1_slack13.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-xpdf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf xpdf-$VERSION
+tar xvf $CWD/xpdf-$VERSION.tar.?z || exit 1
+cd xpdf-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/patches/xpdfrc.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/xpdf.XPDFViewer.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/xpdf-3.03-CVE-2012-2142.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --with-freetype2-includes=/usr/include/freetype2 \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+chmod 0755 $PKG/usr/bin/*
+gzip -9 $PKG/usr/man/man?/*
+
+# We'll use the versions of these from the poppler derived work (if they exist here):
+( cd $PKG/usr/bin
+ rm -f pdfinfo pdftops pdftoppm pdftohtml pdftotext pdfimages pdffonts
+ cd $PKG/usr/man/man1
+ for file in pdfinfo pdftops pdftoppm pdftohtml pdftotext pdfimages pdffonts ; do
+ rm -f ${file}.1.gz
+ done
+)
+
+# Don't clobber /etc/xpdfrc
+mkdir -p $PKG/etc
+cat doc/sample-xpdfrc > $PKG/etc/xpdfrc
+mv $PKG/etc/xpdfrc $PKG/etc/xpdfrc.new
+
+# Add desktop menu entry and icon
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/xpdf.desktop > $PKG/usr/share/applications/xpdf.desktop
+cat xpdf/xpdfIcon.xpm > $PKG/usr/share/pixmaps/xpdfIcon.xpm
+
+# Add additional language support:
+for language in xpdf-arabic xpdf-chinese-simplified xpdf-chinese-traditional xpdf-cyrillic xpdf-greek xpdf-hebrew xpdf-japanese xpdf-korean xpdf-latin2 xpdf-thai xpdf-turkish ; do
+ rm -rf ${language}
+ tar xf $CWD/lang/${language}*.tar.gz
+ ( cd ${language}
+ echo "Patching for ${language}:"
+ zcat $CWD/lang/${language}.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+ chown -R root:root .
+ find . -type f -exec chmod 644 {} \;
+ cat add-to-xpdfrc >> $PKG/etc/xpdfrc.new
+ mkdir -p $PKG/usr/share/xpdf/$(echo ${language} | cut -f2- -d -)
+ cp -a * $PKG/usr/share/xpdf/$(echo ${language} | cut -f2- -d -)
+ ) || exit 1
+done
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/xpdf-$VERSION
+cp -a \
+ ANNOUNCE CHANGES COPYING INSTALL README \
+ $PKG/usr/doc/xpdf-$VERSION
+chmod 0644 $PKG/usr/doc/xpdf-$VERSION/*
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/xpdf-${VERSION}${PATCHLEVEL}-$ARCH-$BUILD.txz
+
diff --git a/patches/source/xpdf/xpdf.desktop b/patches/source/xpdf/xpdf.desktop
new file mode 100644
index 00000000..51d1a5a6
--- /dev/null
+++ b/patches/source/xpdf/xpdf.desktop
@@ -0,0 +1,98 @@
+[Desktop Entry]
+Name=X PDF
+Name[bn]=এক্স পি-ডি-এফ
+Name[de]=X-PDF
+Name[eo]=XPDF
+Name[es]=PDF para X
+Name[fr]=XPDF
+Name[hi]=एक्स पीडीएफ
+Name[ko]=X용 PDF
+Name[mn]=X-PDF
+Name[nds]=X-PDF
+Name[te]=ఎక్స్ పిడిఎఫ్
+MimeType=application/pdf;
+GenericName=PDF Viewer
+GenericName[af]=Pdf Aansig
+GenericName[ar]=عارض الملفات PDF
+GenericName[az]=PDF Nümayişçisi
+GenericName[be]=Праглядальнік PDF
+GenericName[bg]=Преглед на PDF документи
+GenericName[bn]=পি-ডি-এফ প্রদর্শক
+GenericName[br]=Gweler PDF
+GenericName[bs]=Preglednik PDF dokumenata
+GenericName[ca]=Visor PDF
+GenericName[cs]=Prohlížeč PDF souborů
+GenericName[csb]=Przezérnik PDF
+GenericName[cy]=Gwelydd PDF
+GenericName[da]=PDF-fremviser
+GenericName[de]=PDF-Betrachter
+GenericName[el]=Προβολέας PDF
+GenericName[eo]=PDF-rigardilo
+GenericName[es]=Visor de documentos PDF
+GenericName[et]=PDF failide vaatamine
+GenericName[eu]=PDF ikustailua
+GenericName[fa]=مشاهده‌گر PDF
+GenericName[fi]=PDF-näytin
+GenericName[fo]=PDF-vísari
+GenericName[fr]=Afficheur PDF
+GenericName[fy]=PDF-werjefteprogramma
+GenericName[ga]=Amharcán PDF
+GenericName[gl]=Visualizador de PDF
+GenericName[he]=מציג קבצי PDF
+GenericName[hi]=पीडीएफ प्रदर्शक
+GenericName[hr]=Preglednik PDF dokumenata
+GenericName[hu]=PDF-nézegető
+GenericName[id]=Viewer PDF
+GenericName[is]=PDF-sjá
+GenericName[it]=Visualizzatore PDF
+GenericName[ja]=PDF ビューア
+GenericName[kk]=PDF қарау құралы
+GenericName[km]=កម្មវិធី​មើល PDF
+GenericName[ko]=PDF 보기
+GenericName[lo]=ສະແດງຜົນPDF
+GenericName[lt]=PDF Žiūriklis
+GenericName[lv]=PDF Skatītājs
+GenericName[mk]=Прегледувач на PDF
+GenericName[mn]=PDF-Харагч
+GenericName[ms]=Pemapar PDF
+GenericName[mt]=Werrej PDF
+GenericName[nb]=PDF-leser
+GenericName[nds]=Kieker för PDF-Dateien
+GenericName[ne]=PDF दर्शक
+GenericName[nl]=PDF-weergaveprogramma
+GenericName[nn]=PDF-lesar
+GenericName[nso]=Molebeledi wa PDF
+GenericName[oc]=Visualisor PDF
+GenericName[pa]=PDF ਦਰਸ਼ਕ
+GenericName[pl]=Przeglądarka plików PDF
+GenericName[pt]=Visualizador de PDFs
+GenericName[pt_BR]=Visualizador de arquivos PDF
+GenericName[ro]=Vizualizor de documente PDF
+GenericName[ru]=Просмотр PDF
+GenericName[rw]=Mugaragaza PDF
+GenericName[se]=PDF-logan
+GenericName[sk]=Prehliadač PDF súborov
+GenericName[sl]=Pregledovalnik datotek PDF
+GenericName[sr]=PDF приказивач
+GenericName[sr@Latn]=PDF prikazivač
+GenericName[ss]=Sibuki se PDF
+GenericName[sv]=PDF-visare
+GenericName[ta]=PDF காட்சி
+GenericName[tg]=Намоишгари PDF
+GenericName[th]=ตัวแสดงผล PDF
+GenericName[tr]=PDF Görüntüleyici
+GenericName[tt]=PDF Kürsätkeç
+GenericName[uk]=Переглядач PDF
+GenericName[uz]=PDF кўрувчи
+GenericName[ven]=Tshivhoni tsha PDF
+GenericName[vi]=Trình xem PDF
+GenericName[wa]=Håyneu di documints PDF
+GenericName[zh_CN]=PDF 查看器
+GenericName[zh_TW]=PDF 檢視程式
+GenericName[zu]=Umbukisi we-PDF
+Exec=xpdf
+Icon=xpdfIcon
+Type=Application
+Terminal=false
+X-KDE-StartupNotify=false
+Categories=Graphics;