summaryrefslogtreecommitdiff
path: root/extra/xpdf
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-09-12 01:43:12 -0700
committerroot <root@rshg054.dnsready.net>2013-09-12 01:43:12 -0700
commit67c663ff9aaeee1572097ef4eceb39c039d91f42 (patch)
tree4d2b7879f5acbe2a2782593532b37a13c7a9c87b /extra/xpdf
parent2cfbbdcb041073ed1f9aff2f2fd630b24e039e6d (diff)
Thu Sep 12 01:42:53 PDT 2013
Diffstat (limited to 'extra/xpdf')
-rw-r--r--extra/xpdf/PKGBUILD67
-rw-r--r--extra/xpdf/char.patch12
-rw-r--r--extra/xpdf/desktop9
-rw-r--r--extra/xpdf/install11
-rw-r--r--extra/xpdf/sanitize.patch55
5 files changed, 0 insertions, 154 deletions
diff --git a/extra/xpdf/PKGBUILD b/extra/xpdf/PKGBUILD
deleted file mode 100644
index 5dbaf8468..000000000
--- a/extra/xpdf/PKGBUILD
+++ /dev/null
@@ -1,67 +0,0 @@
-# $Id: PKGBUILD 193958 2013-09-08 17:19:05Z bisson $
-# Maintainer: Gaetan Bisson <bisson@archlinux.org>
-# Contributor: tobias <tobias@archlinux.org>
-# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
-
-pkgname=xpdf
-#pkgver=3.03_pl1
-pkgver=3.03
-pkgrel=4
-pkgdesc='Viewer for Portable Document Format (PDF) files'
-url='http://www.foolabs.com/xpdf/'
-license=('GPL2')
-arch=('i686' 'x86_64')
-depends=('lesstif' 'gsfonts' 'libxt')
-optdepends=('poppler: tools that used to be included in xpdf'
- 'desktop-file-utils: for desktop environments')
-# "ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${pkgver%_*}pl1.patch"
-source=("ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${pkgver%_*}.tar.gz"
- 'sanitize.patch'
- 'char.patch'
- 'desktop')
-sha1sums=('499423e8a795e0efd76ca798239eb4d0d52fe248'
- '2face78a2f550fd15eeceb8a1ce47c566104f457'
- '5c471944685a6b24a2b0c0e000562d1a3263aeeb'
- '17ebbfe457cb92e97b12b7362e8ce961526012d9')
-
-install=install
-backup=('etc/xpdfrc')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver%_*}"
-
-# patch -p1 -i "../${pkgname}-${_srcver}pl1.patch"
- patch -p1 -i ../sanitize.patch
- patch -p1 -i ../char.patch
-
- sed -i 's:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/Type1:' xpdf/GlobalParams.cc
- sed -i 's:times-medium-r-normal--16:times-medium-r-normal--14:' xpdf/XPDFViewer.cc # FS#14217
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --enable-multithreaded \
- --enable-wordlist \
- --with-freetype2-library=/usr/lib \
- --with-freetype2-includes=/usr/include/freetype2 \
- --x-includes=/usr/include \
- --with-Xm-library=/usr/lib \
- --with-Xm-includes=/usr/include \
-
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver%_*}"
-
- make DESTDIR="${pkgdir}" install
-
- install -Dm644 ../desktop "${pkgdir}/usr/share/applications/xpdf.desktop"
- install -Dm644 xpdf/xpdfIcon.xpm "${pkgdir}/usr/share/pixmaps/xpdf.xpm"
-
- # stuff provided by poppler
- for tool in pdfdetach pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext; do
- rm "${pkgdir}/usr/bin/${tool}" "${pkgdir}/usr/share/man/man1/${tool}.1"
- done
-}
diff --git a/extra/xpdf/char.patch b/extra/xpdf/char.patch
deleted file mode 100644
index 8e49393a6..000000000
--- a/extra/xpdf/char.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -aur old/xpdf/XPDFViewer.cc new/xpdf/XPDFViewer.cc
---- old/xpdf/XPDFViewer.cc 2011-08-15 14:08:53.000000000 -0700
-+++ new/xpdf/XPDFViewer.cc 2011-08-17 11:05:55.739431215 -0700
-@@ -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/extra/xpdf/desktop b/extra/xpdf/desktop
deleted file mode 100644
index 956323427..000000000
--- a/extra/xpdf/desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=Xpdf
-Comment=Views Adobe PDF (acrobat) files
-Exec=xpdf %f
-Terminal=false
-Type=Application
-Icon=xpdf
-Categories=Office;
-MimeType=application/pdf;
diff --git a/extra/xpdf/install b/extra/xpdf/install
deleted file mode 100644
index c6cf149dd..000000000
--- a/extra/xpdf/install
+++ /dev/null
@@ -1,11 +0,0 @@
-post_install() {
- [[ -x /usr/bin/update-desktop-database ]] && update-desktop-database -q || true
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/extra/xpdf/sanitize.patch b/extra/xpdf/sanitize.patch
deleted file mode 100644
index 891c41fd3..000000000
--- a/extra/xpdf/sanitize.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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;
- }