summaryrefslogtreecommitdiff
path: root/extra/xpdf/PKGBUILD
blob: d5034ea6772b66e1a0e2437ec336737556be4513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $Id: PKGBUILD 135889 2011-08-20 02:28:50Z 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=1
pkgdesc='Viewer for Portable Document Format (PDF) files'
url='http://www.foolabs.com/xpdf/'
license=('GPL2')
arch=('i686' 'x86_64' 'mips64el')
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"
        'char.patch'
        'desktop')
sha1sums=('499423e8a795e0efd76ca798239eb4d0d52fe248'
          '5c471944685a6b24a2b0c0e000562d1a3263aeeb'
          '3b6fe01636253676ffa0efe1b237a75af4721f6d')

install=install
backup=('etc/xpdfrc')

build() {
	cd "${srcdir}/${pkgname}-${pkgver%_*}"

#	patch -p1 -i "../${pkgname}-${_srcver}pl1.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"

	# remove libs and manpages provided by poppler
	# pdfdetach should go there too once it is in poppler
	for tool in pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext ; do
		rm "${pkgdir}/usr/bin/${tool}"
		rm "${pkgdir}/usr/share/man/man1/${tool}.1"
	done
}