summaryrefslogtreecommitdiff
path: root/extra/xournal
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-20 11:12:20 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-20 11:12:20 -0300
commit5c0a5f2b9fa7f1683f279728342aa7f5f0cf90a3 (patch)
treea55da6178b48e7abe9508505d3e92cf02a03da52 /extra/xournal
parentc56b2c50f5748090efb9f10f2a021e57a2455764 (diff)
parent1a136cf48dd7f710f38ff998182508f5a0d41c35 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/comix/PKGBUILD community/geany/PKGBUILD community/gnome-do-docklets/PKGBUILD community/gnome-do-plugins/PKGBUILD community/gnome-system-tools/PKGBUILD community/gnustep-make/PKGBUILD community/gtweakui/PKGBUILD community/hwinfo/PKGBUILD community/kungfu/PKGBUILD community/liboauth/PKGBUILD community/liboobs/PKGBUILD community/lua-lzlib/PKGBUILD community/mcdp/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-runtime/PKGBUILD community/mplayer2/PKGBUILD community/pdf2svg/PKGBUILD community/perl-data-dumper/PKGBUILD community/perl-digest-md5/PKGBUILD community/perl-perlio-eol/PKGBUILD community/perl-xml-libxslt/PKGBUILD community/python-cherrypy/PKGBUILD community/python-pexpect/PKGBUILD community/python-pyro/PKGBUILD community/python2-cherrypy/PKGBUILD community/rexima/PKGBUILD community/shp2svg/PKGBUILD community/system-tools-backends/PKGBUILD community/tracker/PKGBUILD community/virtualbox/PKGBUILD core/bridge-utils/PKGBUILD extra/avidemux/PKGBUILD extra/beagle/PKGBUILD extra/bug-buddy/PKGBUILD extra/dssi/PKGBUILD extra/evolution-sharp/PKGBUILD extra/evolution-webcal/PKGBUILD extra/feh/PKGBUILD extra/ffmpeg/PKGBUILD extra/gnome-mag/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gnutls/PKGBUILD extra/gok/PKGBUILD extra/gpsd/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/hyphen/PKGBUILD extra/kdelibs/PKGBUILD extra/keytouch-editor/PKGBUILD extra/keytouch/PKGBUILD extra/koffice/PKGBUILD extra/krusader/PKGBUILD extra/libbeagle/PKGBUILD extra/libffi/PKGBUILD extra/libgnomeuimm/PKGBUILD extra/libreoffice/PKGBUILD extra/m17n-lib/PKGBUILD extra/mtr/PKGBUILD extra/openbabel/PKGBUILD extra/poppler/PKGBUILD extra/pulseaudio/PKGBUILD extra/rox/PKGBUILD extra/transmission/PKGBUILD extra/xf86-input-synaptics/PKGBUILD extra/xorg-server/PKGBUILD extra/xorg-xinit/PKGBUILD kde-unstable/calligra/PKGBUILD libre/icecat/PKGBUILD libre/linux-libre/PKGBUILD multilib/lib32-ncurses/PKGBUILD multilib/lib32-openssl/PKGBUILD multilib/lib32-talloc/PKGBUILD multilib/wine/PKGBUILD
Diffstat (limited to 'extra/xournal')
-rw-r--r--extra/xournal/PKGBUILD30
-rw-r--r--extra/xournal/install (renamed from extra/xournal/xournal.install)0
-rw-r--r--extra/xournal/poppler-api.patch158
3 files changed, 175 insertions, 13 deletions
diff --git a/extra/xournal/PKGBUILD b/extra/xournal/PKGBUILD
index 9337f08c5..76d0c7f1c 100644
--- a/extra/xournal/PKGBUILD
+++ b/extra/xournal/PKGBUILD
@@ -1,31 +1,35 @@
-# $Id: PKGBUILD 108182 2011-01-30 14:22:10Z ibiru $
-# Contributor:
-# Maintainer:
+# $Id: PKGBUILD 140585 2011-10-17 08:15:15Z jgc $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=xournal
pkgver=0.4.5
-pkgrel=4
+pkgrel=5
pkgdesc='Notetaking and sketching application'
arch=('i686' 'x86_64' 'mips64el')
url='http://xournal.sourceforge.net/'
license=('GPL')
depends=('libgnomecanvas' 'poppler-glib' 'shared-mime-info' 'desktop-file-utils' 'hicolor-icon-theme')
optdepends=('ghostscript: import PS/PDF files as bitmap backgrounds')
-install=xournal.install
source=("http://downloads.sourceforge.net/xournal/xournal-${pkgver}.tar.gz"
- 'pdf-export-64.patch')
+ 'pdf-export-64.patch'
+ 'poppler-api.patch')
sha1sums=('390cb275774469ed1b04b7268dd625bd456c895e'
- 'f23f53b9f69ba8a5773c53d7bca99abf9d8504f8')
+ 'f23f53b9f69ba8a5773c53d7bca99abf9d8504f8'
+ '5aedd5610b42df96e964bb889d4bf0831c2080bc')
+install=install
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 < ../pdf-export-64.patch # from xournal CVS, see FS#21693
- ./configure --prefix=/usr
- make
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p1 -i ../pdf-export-64.patch # from xournal CVS, see FS#21693
+ patch -p1 -i ../poppler-api.patch
+
+ ./configure --prefix=/usr
+ make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install desktop-install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install desktop-install
}
diff --git a/extra/xournal/xournal.install b/extra/xournal/install
index dfcb68374..dfcb68374 100644
--- a/extra/xournal/xournal.install
+++ b/extra/xournal/install
diff --git a/extra/xournal/poppler-api.patch b/extra/xournal/poppler-api.patch
new file mode 100644
index 000000000..9e33c7feb
--- /dev/null
+++ b/extra/xournal/poppler-api.patch
@@ -0,0 +1,158 @@
+diff -aur old/src/xo-file.c new/src/xo-file.c
+--- old/src/xo-file.c 2009-09-29 09:36:05.000000000 +1000
++++ new/src/xo-file.c 2011-10-06 03:11:17.307822836 +1100
+@@ -975,6 +975,140 @@
+ g_free(req);
+ }
+
++/*
++ * Copied from http://cgit.freedesktop.org/poppler/poppler/tree/glib/poppler-page.cc?h=poppler-0.16#n617
++ * as a temporary workaround to poppler removing depreciated functions while we wait for
++ * upstream to rewrite against cairo
++ */
++static void
++copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, GdkPixbuf *pixbuf)
++{
++ int cairo_width, cairo_height, cairo_rowstride;
++ unsigned char *pixbuf_data, *dst, *cairo_data;
++ int pixbuf_rowstride, pixbuf_n_channels;
++ unsigned int *src;
++ int x, y;
++
++ cairo_width = cairo_image_surface_get_width (surface);
++ cairo_height = cairo_image_surface_get_height (surface);
++ cairo_rowstride = cairo_image_surface_get_stride (surface);
++ cairo_data = cairo_image_surface_get_data (surface);
++
++ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
++ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
++ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
++
++ if (cairo_width > gdk_pixbuf_get_width (pixbuf))
++ cairo_width = gdk_pixbuf_get_width (pixbuf);
++ if (cairo_height > gdk_pixbuf_get_height (pixbuf))
++ cairo_height = gdk_pixbuf_get_height (pixbuf);
++ for (y = 0; y < cairo_height; y++)
++ {
++ src = (unsigned int *) (cairo_data + y * cairo_rowstride);
++ dst = pixbuf_data + y * pixbuf_rowstride;
++ for (x = 0; x < cairo_width; x++)
++ {
++ dst[0] = (*src >> 16) & 0xff;
++ dst[1] = (*src >> 8) & 0xff;
++ dst[2] = (*src >> 0) & 0xff;
++ if (pixbuf_n_channels == 4)
++ dst[3] = (*src >> 24) & 0xff;
++ dst += pixbuf_n_channels;
++ src++;
++ }
++ }
++}
++
++static void
++_poppler_page_render_to_pixbuf (PopplerPage *page,
++ int src_x, int src_y,
++ int src_width, int src_height,
++ double scale,
++ int rotation,
++ gboolean printing,
++ GdkPixbuf *pixbuf)
++{
++ cairo_t *cr;
++ cairo_surface_t *surface;
++
++ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
++ src_width, src_height);
++ cr = cairo_create (surface);
++ cairo_save (cr);
++ switch (rotation) {
++ case 90:
++ cairo_translate (cr, src_x + src_width, -src_y);
++ break;
++ case 180:
++ cairo_translate (cr, src_x + src_width, src_y + src_height);
++ break;
++ case 270:
++ cairo_translate (cr, -src_x, src_y + src_height);
++ break;
++ default:
++ cairo_translate (cr, -src_x, -src_y);
++ }
++
++ if (scale != 1.0)
++ cairo_scale (cr, scale, scale);
++
++ if (rotation != 0)
++ cairo_rotate (cr, rotation * G_PI / 180.0);
++
++ if (printing)
++ poppler_page_render_for_printing (page, cr);
++ else
++ poppler_page_render (page, cr);
++ cairo_restore (cr);
++
++ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
++ cairo_set_source_rgb (cr, 1., 1., 1.);
++ cairo_paint (cr);
++
++ cairo_destroy (cr);
++
++ copy_cairo_surface_to_pixbuf (surface, pixbuf);
++ cairo_surface_destroy (surface);
++}
++
++/**
++ * poppler_page_render_to_pixbuf:
++ * @page: the page to render from
++ * @src_x: x coordinate of upper left corner
++ * @src_y: y coordinate of upper left corner
++ * @src_width: width of rectangle to render
++ * @src_height: height of rectangle to render
++ * @scale: scale specified as pixels per point
++ * @rotation: rotate the document by the specified degree
++ * @pixbuf: pixbuf to render into
++ *
++ * First scale the document to match the specified pixels per point,
++ * then render the rectangle given by the upper left corner at
++ * (src_x, src_y) and src_width and src_height.
++ * This function is for rendering a page that will be displayed.
++ * If you want to render a page that will be printed use
++ * poppler_page_render_to_pixbuf_for_printing() instead
++ *
++ * Deprecated: 0.16
++ **/
++void
++poppler_page_render_to_pixbuf (PopplerPage *page,
++ int src_x, int src_y,
++ int src_width, int src_height,
++ double scale,
++ int rotation,
++ GdkPixbuf *pixbuf)
++{
++ g_return_if_fail (POPPLER_IS_PAGE (page));
++ g_return_if_fail (scale > 0.0);
++ g_return_if_fail (pixbuf != NULL);
++
++ _poppler_page_render_to_pixbuf (page, src_x, src_y,
++ src_width, src_height,
++ scale, rotation,
++ FALSE,
++ pixbuf);
++}
+ /* process a bg PDF request from the queue, and recurse */
+
+ gboolean bgpdf_scheduler_callback(gpointer data)
+diff -aur old/src/xo-file.h new/src/xo-file.h
+--- old/src/xo-file.h 2009-09-28 08:45:53.000000000 +1000
++++ new/src/xo-file.h 2011-10-06 03:11:17.311156160 +1100
+@@ -36,3 +36,10 @@
+ void init_config_default(void);
+ void load_config_from_file(void);
+ void save_config_to_file(void);
++
++void poppler_page_render_to_pixbuf (PopplerPage *page,
++ int src_x, int src_y,
++ int src_width, int src_height,
++ double scale,
++ int rotation,
++ GdkPixbuf *pixbuf);