diff options
author | mva <mva@FreeBSD.org> | 2013-01-13 07:09:01 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2013-01-13 07:09:01 +0800 |
commit | a3b1b6919aaacc90043c68dc5d1a866c803605ce (patch) | |
tree | 9f2c75f88aad2054f2807762240bbae607620af3 /graphics/xournal | |
parent | 656b021dc7c3a3f3c710e706e8e66a137dd1c20a (diff) | |
download | freebsd-ports-gnome-a3b1b6919aaacc90043c68dc5d1a866c803605ce.tar.gz freebsd-ports-gnome-a3b1b6919aaacc90043c68dc5d1a866c803605ce.tar.zst freebsd-ports-gnome-a3b1b6919aaacc90043c68dc5d1a866c803605ce.zip |
- Update to 0.4.7
- Convert to new options framework
- Strip Makefile header
- Drop LIB_DEPENDS ABI versions
- Move LIB_DEPENDS after LICENSE to pet portlint
PR: ports/175066
Submitted by: Jan Henrik Sylvester <me@janh.de> (maintainer)
Diffstat (limited to 'graphics/xournal')
-rw-r--r-- | graphics/xournal/Makefile | 25 | ||||
-rw-r--r-- | graphics/xournal/distinfo | 4 | ||||
-rw-r--r-- | graphics/xournal/files/patch-poppler-0.18 | 136 | ||||
-rw-r--r-- | graphics/xournal/pkg-plist | 64 |
4 files changed, 45 insertions, 184 deletions
diff --git a/graphics/xournal/Makefile b/graphics/xournal/Makefile index a4a78ec94715..62b538ab857c 100644 --- a/graphics/xournal/Makefile +++ b/graphics/xournal/Makefile @@ -1,23 +1,18 @@ -# New ports collection makefile for: xournal -# Date created: 21 Jan 2011 -# Whom: Jan Henrik Sylvester <me@janh.de> -# +# Created by: Jan Henrik Sylvester <me@janh.de> # $FreeBSD$ -# PORTNAME= xournal -PORTVERSION= 0.4.5 -PORTREVISION= 3 +PORTVERSION= 0.4.7 CATEGORIES= graphics MASTER_SITES= SF MAINTAINER= me@janh.de COMMENT= A notetaking application that can annotate PDFs -LIB_DEPENDS= poppler-glib.8:${PORTSDIR}/graphics/poppler-glib - LICENSE= GPLv2 +LIB_DEPENDS= poppler-glib:${PORTSDIR}/graphics/poppler-glib + MAKE_JOBS_SAFE= yes USE_GNOME= desktopfileutils libgnomecanvas GNU_CONFIGURE= yes @@ -25,11 +20,13 @@ CONFIGURE_ARGS= --docdir="${DOCSDIR}" INSTALLS_ICONS= yes INSTALL_TARGET= install desktop-install -OPTIONS= GHOSTSCRIPT "Install ghostscript (PS/PDF as bitmap bg)" on +OPTIONS_DEFINE= GHOSTSCRIPT +GHOSTSCRIPT_DESC= Install ghostscript (PS/PDF as bitmap bg) +OPTIONS_DEFAULT= GHOSTSCRIPT -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if !defined(WITHOUT_GHOSTSCRIPT) +.if ${PORT_OPTIONS:MGHOSTSCRIPT} USE_GHOSTSCRIPT_RUN= yes .endif @@ -40,8 +37,8 @@ post-patch: ${WRKSRC}/Makefile.in post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @(cd ${WRKSRC} && ${MAKE} install-doc-local) .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/xournal/distinfo b/graphics/xournal/distinfo index 399877a944c6..6bedbd13e602 100644 --- a/graphics/xournal/distinfo +++ b/graphics/xournal/distinfo @@ -1,2 +1,2 @@ -SHA256 (xournal-0.4.5.tar.gz) = a7d7c2cb544451939779276e6e5ee5acc756bd0efb5253de15dc00bfe07755d1 -SIZE (xournal-0.4.5.tar.gz) = 425062 +SHA256 (xournal-0.4.7.tar.gz) = d1ceb9c3a0b0172f7c2389bfe188a13cdc9f9f4c3ddc30095d635edf1367ac89 +SIZE (xournal-0.4.7.tar.gz) = 553391 diff --git a/graphics/xournal/files/patch-poppler-0.18 b/graphics/xournal/files/patch-poppler-0.18 deleted file mode 100644 index 61c757fc74ad..000000000000 --- a/graphics/xournal/files/patch-poppler-0.18 +++ /dev/null @@ -1,136 +0,0 @@ ---- src/xo-misc.c 2010/10/18 18:45:36 1.23 -+++ src/xo-misc.c 2011/07/21 22:07:33 1.24 -@@ -2197,3 +2197,93 @@ - if(GTK_IS_CONTAINER(w)) - gtk_container_forall(GTK_CONTAINER(w), install_focus_hooks, data); - } -+ -+// wrapper for missing poppler functions (defunct poppler-gdk api) -+ -+static void -+wrapper_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++; -+ } -+ } -+} -+ -+void -+wrapper_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) -+{ -+ 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); -+ -+ 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); -+ -+ wrapper_copy_cairo_surface_to_pixbuf (surface, pixbuf); -+ cairo_surface_destroy (surface); -+} ---- src/xo-misc.h 2009/09/28 06:14:17 1.15 -+++ src/xo-misc.h 2011/07/21 22:07:33 1.16 -@@ -107,6 +107,15 @@ - gboolean intercept_activate_events(GtkWidget *w, GdkEvent *ev, gpointer data); - void install_focus_hooks(GtkWidget *w, gpointer data); - -+// wrapper for a function no longer provided by poppler 0.17+ -+void -+wrapper_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); -+ - // defines for paper rulings - - #define RULING_MARGIN_COLOR 0xff0080ff ---- src/xo-file.c 2010/10/20 22:22:36 1.23 -+++ src/xo-file.c 2011/07/21 22:07:33 1.24 -@@ -1031,7 +1031,7 @@ - scaled_height = (int) (req->dpi * height/72); - pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, - FALSE, 8, scaled_width, scaled_height); -- poppler_page_render_to_pixbuf( -+ wrapper_poppler_page_render_to_pixbuf( - pdfpage, 0, 0, scaled_width, scaled_height, - req->dpi/72, 0, pixbuf); - g_object_unref(pdfpage); ---- src/xo-print.c 2009/11/15 05:06:00 1.13 -+++ src/xo-print.c 2011/07/21 22:07:33 1.14 -@@ -728,7 +728,7 @@ - width = (int) (PDFTOPPM_PRINTING_DPI * pgwidth/72.0); - height = (int) (PDFTOPPM_PRINTING_DPI * pgheight/72.0); - pix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, width, height); -- poppler_page_render_to_pixbuf( -+ wrapper_poppler_page_render_to_pixbuf( - pdfpage, 0, 0, width, height, PDFTOPPM_PRINTING_DPI/72.0, 0, pix); - g_object_unref(pdfpage); - } diff --git a/graphics/xournal/pkg-plist b/graphics/xournal/pkg-plist index c4ff3b0c691f..d39c64c8f9c9 100644 --- a/graphics/xournal/pkg-plist +++ b/graphics/xournal/pkg-plist @@ -9,38 +9,38 @@ share/mimelnk/application/x-xoj.desktop %%PORTDOCS%%%%DOCSDIR%%/pixmaps %%PORTDOCS%%%%DOCSDIR%%/screenshot.png %%PORTDOCS%%@dirrm %%DOCSDIR%% -share/xournal/pixmaps/black.png -share/xournal/pixmaps/blue.png -share/xournal/pixmaps/default-pen.png -share/xournal/pixmaps/eraser.png -share/xournal/pixmaps/fullscreen.png -share/xournal/pixmaps/gray.png -share/xournal/pixmaps/green.png -share/xournal/pixmaps/hand.png -share/xournal/pixmaps/highlighter.png -share/xournal/pixmaps/lasso.png -share/xournal/pixmaps/lightblue.png -share/xournal/pixmaps/lightgreen.png -share/xournal/pixmaps/magenta.png -share/xournal/pixmaps/medium.png -share/xournal/pixmaps/orange.png -share/xournal/pixmaps/pencil.png -share/xournal/pixmaps/rect-select.png -share/xournal/pixmaps/recycled.png -share/xournal/pixmaps/red.png -share/xournal/pixmaps/ruler.png -share/xournal/pixmaps/shapes.png -share/xournal/pixmaps/stretch.png -share/xournal/pixmaps/text-tool.png -share/xournal/pixmaps/thick.png -share/xournal/pixmaps/thin.png -share/xournal/pixmaps/white.png -share/xournal/pixmaps/xoj.svg -share/xournal/pixmaps/xournal.png -share/xournal/pixmaps/xournal.svg -share/xournal/pixmaps/yellow.png -@dirrm share/xournal/pixmaps -@dirrm share/xournal +%%DATADIR%%/pixmaps/black.png +%%DATADIR%%/pixmaps/blue.png +%%DATADIR%%/pixmaps/default-pen.png +%%DATADIR%%/pixmaps/eraser.png +%%DATADIR%%/pixmaps/fullscreen.png +%%DATADIR%%/pixmaps/gray.png +%%DATADIR%%/pixmaps/green.png +%%DATADIR%%/pixmaps/hand.png +%%DATADIR%%/pixmaps/highlighter.png +%%DATADIR%%/pixmaps/lasso.png +%%DATADIR%%/pixmaps/lightblue.png +%%DATADIR%%/pixmaps/lightgreen.png +%%DATADIR%%/pixmaps/magenta.png +%%DATADIR%%/pixmaps/medium.png +%%DATADIR%%/pixmaps/orange.png +%%DATADIR%%/pixmaps/pencil.png +%%DATADIR%%/pixmaps/rect-select.png +%%DATADIR%%/pixmaps/recycled.png +%%DATADIR%%/pixmaps/red.png +%%DATADIR%%/pixmaps/ruler.png +%%DATADIR%%/pixmaps/shapes.png +%%DATADIR%%/pixmaps/stretch.png +%%DATADIR%%/pixmaps/text-tool.png +%%DATADIR%%/pixmaps/thick.png +%%DATADIR%%/pixmaps/thin.png +%%DATADIR%%/pixmaps/white.png +%%DATADIR%%/pixmaps/xoj.svg +%%DATADIR%%/pixmaps/xournal.png +%%DATADIR%%/pixmaps/xournal.svg +%%DATADIR%%/pixmaps/yellow.png +@dirrm %%DATADIR%%/pixmaps +@dirrm %%DATADIR%% @exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true @unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true @exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime |