[arch-commits] Commit in xpdf/trunk (PKGBUILD xpdf-3.01-resizefix.patch xpdf.install)
Jan de Groot
jgc at archlinux.org
Sun Oct 12 13:37:25 UTC 2008
Date: Sunday, October 12, 2008 @ 09:37:24
Author: jgc
Revision: 15069
upgpkg: xpdf 3.02_pl2-2
Depend on gcc-libs, replace postinstall message by optdepend, depend on desktop-file-utils
Modified:
xpdf/trunk/PKGBUILD
xpdf/trunk/xpdf.install
Deleted:
xpdf/trunk/xpdf-3.01-resizefix.patch
---------------------------+
PKGBUILD | 44 +++++++++++++++++--------------
xpdf-3.01-resizefix.patch | 62 --------------------------------------------
xpdf.install | 20 +-------------
3 files changed, 26 insertions(+), 100 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2008-10-12 13:27:17 UTC (rev 15068)
+++ PKGBUILD 2008-10-12 13:37:24 UTC (rev 15069)
@@ -7,30 +7,34 @@
_patchlevel=pl2
pkgver=${_srcver}_${_patchlevel}
#pkgver=${_srcver}
-pkgrel=1
+pkgrel=2
pkgdesc="Xpdf is a viewer for Portable Document Format (PDF) files."
arch=(i686 x86_64)
license=('GPL')
-depends=('gcc>=4.1' 'lesstif' 't1lib' 'gsfonts')
+depends=('gcc-libs>=4.3.2' 'lesstif' 't1lib' 'gsfonts' 'desktop-file-utils')
+optdepends=('poppler: pdf tools that used to be included in xpdf')
backup=(etc/xpdfrc)
url="http://www.foolabs.com/xpdf/"
options=('force')
-install=${pkgname}.install
-source=(ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}.tar.gz \
- ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}pl1.patch \
- ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}${_patchlevel}.patch \
- ${pkgname}.desktop)
-md5sums=('599dc4cc65a07ee868cf92a667a913d2' '877118786dfe27d1b7aa5a6759cc6e45' \
- '3a5cb165ae66781e0b21e6219ae06795' '6c606eeca046cc9f32835f98f635c084')
+install=xpdf.install
+source=(ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}.tar.gz
+ ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}pl1.patch
+ ftp://ftp.foolabs.com/pub/${pkgname}/${pkgname}-${_srcver}${_patchlevel}.patch
+ xpdf.desktop)
+md5sums=('599dc4cc65a07ee868cf92a667a913d2'
+ '877118786dfe27d1b7aa5a6759cc6e45'
+ '3a5cb165ae66781e0b21e6219ae06795'
+ '6c606eeca046cc9f32835f98f635c084')
build() {
- cd ${startdir}/src/${pkgname}-${_srcver}
- patch -Np1 -i ../${pkgname}-${_srcver}pl1.patch || return 1
- patch -Np1 -i ../${pkgname}-${_srcver}${_patchlevel}.patch || return 1
+ cd "${srcdir}/${pkgname}-${_srcver}"
+ patch -Np1 -i "${srcdir}/${pkgname}-${_srcver}pl1.patch" || return 1
+ patch -Np1 -i "${srcdir}/${pkgname}-${_srcver}${_patchlevel}.patch" || return 1
sed -i 's:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/Type1:' xpdf/GlobalParams.cc || return 1
./configure \
--prefix=/usr \
--sysconfdir=/etc \
+ --mandir=/usr/share/man \
--enable-multithreaded --enable-wordlist \
--with-freetype2-library=/usr/lib \
--with-freetype2-includes=/usr/include/freetype2 \
@@ -38,16 +42,16 @@
--with-t1-includes=/usr/include \
--x-includes=/usr/include \
--with-Xm-library=/usr/lib \
- --with-Xm-includes=/usr/include
+ --with-Xm-includes=/usr/include || return 1
make || return 1
- make DESTDIR=${startdir}/pkg install
+ make DESTDIR="${pkgdir}" install
# remove some libs and manpages provided by poppler now
for tool in pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext ; do
- rm -f ${startdir}/pkg/usr/bin/${tool}
- rm -f ${startdir}/pkg/usr/man/man1/${tool}.1
+ rm -f "${pkgdir}/usr/bin/${tool}"
+ rm -f "${pkgdir}/usr/share/man/man1/${tool}.1"
done
- install -Dm644 ../${pkgname}.desktop \
- ${startdir}/pkg/usr/share/applications/${pkgname}.desktop
- install -Dm644 xpdf/xpdfIcon.xpm \
- ${startdir}/pkg/usr/share/pixmaps/xpdf.xpm
+ install -m755 -d ${pkgdir}/usr/share/applications
+ install -m644 "${srcdir}/xpdf.desktop" "${pkgdir}/usr/share/applications/" || return 1
+ install -m755 -d ${pkgdir}/usr/share/pixmaps
+ install -m644 xpdf/xpdfIcon.xpm ${pkgdir}/usr/share/pixmaps/xpdf.xpm || return 1
}
Deleted: xpdf-3.01-resizefix.patch
===================================================================
--- xpdf-3.01-resizefix.patch 2008-10-12 13:27:17 UTC (rev 15068)
+++ xpdf-3.01-resizefix.patch 2008-10-12 13:37:24 UTC (rev 15069)
@@ -1,62 +0,0 @@
-diff -u -r xpdf-3.01/fofi/FoFiType1.cc xpdf-3.01-resizefix/fofi/FoFiType1.cc
---- xpdf-3.01/fofi/FoFiType1.cc 2005-08-17 08:34:30.000000000 +0300
-+++ xpdf-3.01-resizefix/fofi/FoFiType1.cc 2006-10-15 14:04:13.000000000 +0300
-@@ -190,9 +190,14 @@
- }
- }
- } else {
-- if (strtok(buf, " \t") &&
-- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
-- break;
-+ p = strtok(buf, " \t\n\r");
-+ if (p)
-+ {
-+ if (!strcmp(p, "def")) break;
-+ if (!strcmp(p, "readonly")) break;
-+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
-+ p = strtok(buf, " \t\n\r");
-+ if (p && !strcmp(p, "def")) break;
- }
- }
- }
-diff -u -r xpdf-3.01/splash/Splash.cc xpdf-3.01-resizefix/splash/Splash.cc
---- xpdf-3.01/splash/Splash.cc 2005-08-17 08:34:30.000000000 +0300
-+++ xpdf-3.01-resizefix/splash/Splash.cc 2006-10-15 14:04:19.000000000 +0300
-@@ -822,6 +822,11 @@
- }
- xPath = new SplashXPath(path, state->flatness, gTrue);
- xPath->sort();
-+ if (!&xPath->segs[0])
-+ {
-+ delete xPath;
-+ return splashErrEmptyPath;
-+ }
- scanner = new SplashXPathScanner(xPath, eo);
-
- // get the min and max x and y values
-diff -u -r xpdf-3.01/xpdf/XPDFCore.cc xpdf-3.01-resizefix/xpdf/XPDFCore.cc
---- xpdf-3.01/xpdf/XPDFCore.cc 2005-08-17 08:34:31.000000000 +0300
-+++ xpdf-3.01-resizefix/xpdf/XPDFCore.cc 2006-10-15 14:03:47.000000000 +0300
-@@ -975,6 +975,9 @@
- XPDFCore *core = (XPDFCore *)ptr;
- XEvent event;
- Widget top;
-+ Window rootWin;
-+ int x1, y1;
-+ Guint w1, h1, bw1, depth1;
- Arg args[2];
- int n;
- Dimension w, h;
-@@ -990,7 +993,11 @@
- if (XCheckTypedWindowEvent(core->display, XtWindow(top),
- ConfigureNotify, &event)) {
- XPutBackEvent(core->display, &event);
-- return;
-+ XGetGeometry(core->display, event.xconfigure.window,
-+ &rootWin, &x1, &y1, &w1, &h1, &bw1, &depth1);
-+ if ((Guint)event.xconfigure.width != w1 ||
-+ (Guint)event.xconfigure.height != h1)
-+ return;
- }
-
- n = 0;
Modified: xpdf.install
===================================================================
--- xpdf.install 2008-10-12 13:27:17 UTC (rev 15068)
+++ xpdf.install 2008-10-12 13:37:24 UTC (rev 15069)
@@ -1,27 +1,11 @@
-# this is the scrollkeeper handling sample file
-
post_install() {
- cat << EOM
-
- --> the console based tools for pdf2* conversion are now in the poppler package
-
-EOM
- echo -n "update desktop mime database..."
update-desktop-database -q
- echo "done"
}
post_upgrade() {
- post_install $1
+ post_install
}
post_remove() {
- echo -n "update desktop mime database..."
- update-desktop-database -q
- echo "done"
+ post_install
}
-
-op=$1
-shift
-
-$op $*
More information about the arch-commits
mailing list