summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYichao Zhou2016-01-04 03:07:43 -0800
committerYichao Zhou2016-01-04 03:07:43 -0800
commit241d4901f590b857227cc18a16759cc39149f208 (patch)
treeca0d1f5ae14c9a5c01087c8b99115c1265daaaa6
downloadaur-241d4901f590b857227cc18a16759cc39149f208.tar.gz
Initial commit
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD42
-rw-r--r--evince-lcdfilter.install13
-rw-r--r--evince-poppler-subpixel.patch51
4 files changed, 150 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..578e0f7f6934
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,44 @@
+# Generated by mksrcinfo v8
+# Mon Jan 4 11:07:35 UTC 2016
+pkgbase = evince-lcdfilter
+ pkgdesc = Document viewer (PDF, Postscript, djvu, tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt))
+ pkgver = 3.18.2
+ pkgrel = 3
+ url = https://wiki.gnome.org/Apps/Evince
+ install = evince-lcdfilter.install
+ arch = i686
+ arch = x86_64
+ groups = gnome
+ license = GPL
+ makedepends = itstool
+ makedepends = libnautilus-extension
+ makedepends = texlive-bin
+ makedepends = intltool
+ makedepends = gobject-introspection
+ makedepends = docbook-xsl
+ makedepends = python
+ depends = gtk3
+ depends = libgxps
+ depends = libspectre
+ depends = gsfonts
+ depends = poppler-glib-lcdfilter
+ depends = djvulibre
+ depends = t1lib
+ depends = libsecret
+ depends = desktop-file-utils
+ depends = dconf
+ depends = gsettings-desktop-schemas
+ depends = gnome-desktop
+ depends = libarchive
+ optdepends = texlive-bin: DVI support
+ optdepends = gvfs: bookmark support and session saving
+ provides = evince=3.18.2
+ conflicts = evince
+ options = !emptydirs
+ source = http://ftp.gnome.org/pub/gnome/sources/evince/3.18/evince-3.18.2.tar.xz
+ source = evince-poppler-subpixel.patch
+ sha256sums = 42ad6c7354d881a9ecab136ea84ff867acb942605bcfac48b6c12e1c2d8ecb17
+ sha256sums = 4e5494e4a8d8b8a1656224df2e8989f2c6458a484d3b0cf500ba2f748c90e90f
+
+pkgname = evince-lcdfilter
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..34d689688e54
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Yichao Zhou <broken.zhou@gmail.com>
+
+_pkgname=evince
+pkgname=evince-lcdfilter
+pkgver=3.18.2
+pkgrel=3
+pkgdesc="Document viewer (PDF, Postscript, djvu, tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt))"
+url="https://wiki.gnome.org/Apps/Evince"
+arch=(i686 x86_64)
+license=(GPL)
+depends=(gtk3 libgxps libspectre gsfonts poppler-glib-lcdfilter djvulibre t1lib libsecret desktop-file-utils dconf gsettings-desktop-schemas gnome-desktop libarchive)
+makedepends=(itstool libnautilus-extension texlive-bin intltool gobject-introspection docbook-xsl python)
+optdepends=('texlive-bin: DVI support'
+ 'gvfs: bookmark support and session saving')
+provides=("evince=$pkgver")
+conflicts=("evince")
+groups=(gnome)
+install=evince-lcdfilter.install
+options=('!emptydirs')
+source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver:0:4}/$_pkgname-$pkgver.tar.xz
+ evince-poppler-subpixel.patch)
+sha256sums=('42ad6c7354d881a9ecab136ea84ff867acb942605bcfac48b6c12e1c2d8ecb17'
+ '4e5494e4a8d8b8a1656224df2e8989f2c6458a484d3b0cf500ba2f748c90e90f')
+
+build() {
+ cd $_pkgname-$pkgver
+ patch -Np1 -i ../evince-poppler-subpixel.patch
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --libexecdir=/usr/lib/evince \
+ --disable-static --enable-nautilus \
+ --enable-pdf --enable-tiff \
+ --enable-djvu --enable-dvi \
+ --enable-t1lib --enable-comics \
+ --disable-scrollkeeper --disable-schemas-compile \
+ --enable-introspection --disable-browser-plugin
+ make
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
diff --git a/evince-lcdfilter.install b/evince-lcdfilter.install
new file mode 100644
index 000000000000..1571179cae27
--- /dev/null
+++ b/evince-lcdfilter.install
@@ -0,0 +1,13 @@
+post_install() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/evince-poppler-subpixel.patch b/evince-poppler-subpixel.patch
new file mode 100644
index 000000000000..4f49d4514b75
--- /dev/null
+++ b/evince-poppler-subpixel.patch
@@ -0,0 +1,51 @@
+diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
+index f3a6510..747d7fd 100644
+--- a/backend/pdf/ev-poppler.cc
++++ b/backend/pdf/ev-poppler.cc
+@@ -393,11 +393,31 @@ pdf_page_render (PopplerPage *page,
+ cairo_t *cr;
+ double page_width, page_height;
+ double xscale, yscale;
++ gboolean subpixel_rendering;
++ cairo_font_options_t *fo;
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width, height);
+ cr = cairo_create (surface);
+
++ fo = cairo_font_options_create ();
++ cairo_get_font_options (cr, fo);
++ cairo_font_options_set_hint_style (fo, CAIRO_HINT_STYLE_SLIGHT);
++
++ subpixel_rendering = poppler_page_support_subpixel_rendering (page);
++ printf("subpixel_rendering: %d\n", subpixel_rendering);
++ printf("subpixel_rendering: %d\n", subpixel_rendering);
++ printf("subpixel_rendering: %d\n", subpixel_rendering);
++ if (subpixel_rendering) {
++ cairo_set_source_rgb (cr, 1., 1., 1.);
++ cairo_paint (cr);
++
++ cairo_font_options_set_antialias (fo, CAIRO_ANTIALIAS_SUBPIXEL);
++ cairo_font_options_set_subpixel_order (fo, CAIRO_SUBPIXEL_ORDER_RGB);
++ }
++ cairo_set_font_options (cr, fo);
++ cairo_font_options_destroy (fo);
++
+ switch (rc->rotation) {
+ case 90:
+ cairo_translate (cr, width, 0);
+@@ -420,9 +440,11 @@ pdf_page_render (PopplerPage *page,
+ cairo_rotate (cr, rc->rotation * G_PI / 180.0);
+ poppler_page_render (page, cr);
+
+- cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+- cairo_set_source_rgb (cr, 1., 1., 1.);
+- cairo_paint (cr);
++ if (!subpixel_rendering) {
++ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
++ cairo_set_source_rgb (cr, 1., 1., 1.);
++ cairo_paint (cr);
++ }
+
+ cairo_destroy (cr);
+