updated on Wed Jan 18 20:10:41 UTC 2012
[aur-mirror.git] / evince-gtk / PKGBUILD
blobbbe19d45b9465d8d384561c938345355f3782138
1 # Contributor: Alexander Fehr <pizzapunk gmail com>
2 # Maintainer: Auguste Pop <auguste [at] gmail [dot] com>
4 pkgname=evince-gtk
5 pkgver=3.2.1
6 _pkgalias=evince
7 pkgrel=2
8 pkgdesc="A document viewer, built without GConf and GNOME keyring support"
9 arch=('i686' 'x86_64')
10 url="http://projects.gnome.org/evince/"
11 license=('GPL')
12 depends=('dconf' 'gtk3' 'libsm' 'poppler-glib' 'hicolor-icon-theme'
13          'desktop-file-utils')
14 makedepends=('intltool')
15 optdepends=('libspectre: PostScript support'
16             'djvulibre: DJVU support'
17             'texlive-bin: DVI support'
18             'libgxps-git: XPS support')
19 provides=("$_pkgalias")
20 conflicts=("$_pkgalias")
21 install=$_pkgalias.install
22 source=("http://ftp.gnome.org/pub/GNOME/sources/evince/3.2/$_pkgalias-$pkgver.tar.xz")
23 md5sums=('8c01b6741709b8e32b800b71820648ac')
25 _ods=()
26 _tmpfile="$pkgdir/.tmp"
28 add_ods_pc()
30     pkg-config $1 && echo "$3" >> "$_tmpfile" || _ods=("${_ods[@]}" "$2")
33 add_ods_file()
35     [ -e "$1" ] && echo "$3" >> "$_tmpfile" || _ods=("${_ods[@]}" "$2")
38 unset_optdepend()
40     for _idx in ${!optdepends[@]}
41     do
42         if [[ "${optdepends[$_idx]}" =~ ^$1:* ]]
43         then
44             unset optdepends[$_idx]
45             break
46         fi
47     done
50 build()
52     cd "$srcdir/$_pkgalias-$pkgver"
54     sed -i 's/gnome-icon-theme//' configure.ac configure
55     sed -i '/NoDisplay/d' ./data/evince.desktop.in.in
57     rm -rf "$_tmpfile"
58     add_ods_pc libspectre '--disable-ps' libspectre
59     add_ods_pc ddjvuapi '--disable-djvu' djvulibre
60     add_ods_file '/usr/lib/libkpathsea.a' '--disable-dvi' texlive-bin
61     add_ods_pc libgxps '--disable-xps' libgxps-git
63     autoreconf --force --install
64     ./configure \
65         --prefix=/usr \
66         --libexecdir=/usr/lib/$_pkgalias \
67         --sysconfdir=/etc \
68         --localstatedir=/var \
69         --disable-maintainer-mode \
70         --disable-schemas-compile \
71         --disable-tests \
72         --disable-nautilus \
73         --disable-previewer \
74         --disable-introspection \
75         --enable-t1lib \
76         --enable-comics \
77         --disable-scrollkeeper \
78         --disable-help \
79         --disable-gtk-doc \
80         --without-keyring \
81         --with-smclient=xsmp "${_ods[@]}"
83     make
86 package()
88     cd $srcdir/$_pkgalias-$pkgver
89     make DESTDIR=$pkgdir install
91     while read _ch
92     do
93         if [ 1 -gt 0 ]; then depends=("${depends[@]}" "$_ch"); fi
94         unset_optdepend "$_ch"
95     done < "$_tmpfile"
96     optdepends=("${optdepends[@]}")
97     rm -rf "$_tmpfile"