On Sat, Apr 27, 2013 at 04:30:08PM +0200, Martin Natano wrote:
> On Sat, Apr 27, 2013 at 11:58:20AM +0200, Antoine Jacoutot wrote:
> > On Sat, Apr 27, 2013 at 11:37:06AM +0200, Martin Natano wrote:
> > > Pdfshuffler tries to call page.render_to_pixbuf which is removed by the
> > > patch (and in poppler>0.18).
> > > I tried to bump pdfshuffler 0.6.0 to see if it is fixed there, but that
> > > version just dies with "Abort trap". The cause for that seeme to be in
> > > gtk.gdk.threads_init().
> > 
> > It's probably missing gdk.threads_enter() / gdk.threads_leave() calls.
> > 
> Yes, adding both calls makes pdfshuffler usable again.
> 
> The following patch updates pdfshuffler to 0.6.0. Note that Kili's patch
> for py-poppler is a prerequisite for this update to work correctly.
> 
> natano
> 
> 
> Bump pdfshuffler to 0.6.0
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/print/pdfshuffler/Makefile,v
> retrieving revision 1.6
> diff -u -p -u -r1.6 Makefile
> --- Makefile  26 Apr 2013 21:27:30 -0000      1.6
> +++ Makefile  27 Apr 2013 14:23:43 -0000
> @@ -1,8 +1,7 @@
>  # $OpenBSD: Makefile,v 1.6 2013/04/26 21:27:30 kili Exp $
>  
>  COMMENT =            merge, split, rotate and crop PDF documents
> -DISTNAME =           pdfshuffler-0.5.1
> -REVISION =           3
> +DISTNAME =           pdfshuffler-0.6.0
>  CATEGORIES =         print
>  
>  HOMEPAGE =           http://sourceforge.net/projects/pdfshuffler/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/print/pdfshuffler/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -u -r1.1.1.1 distinfo
> --- distinfo  22 May 2011 19:37:04 -0000      1.1.1.1
> +++ distinfo  27 Apr 2013 14:23:43 -0000
> @@ -1,5 +1,2 @@
> -MD5 (pdfshuffler-0.5.1.tar.gz) = pj5ON8gi5r05Mq7VOtPgcA==
> -RMD160 (pdfshuffler-0.5.1.tar.gz) = UvWpLiP6K31igAXJjVEYtxZ7oms=
> -SHA1 (pdfshuffler-0.5.1.tar.gz) = zV2xoIfJ2KMEv8IdOAodbE/GG0s=
> -SHA256 (pdfshuffler-0.5.1.tar.gz) = 
> ff0bfyMESEi2m8zwuc8B45xFTAwoSkNFs/HlTmnizgw=
> -SIZE (pdfshuffler-0.5.1.tar.gz) = 39538
> +SHA256 (pdfshuffler-0.6.0.tar.gz) = 
> 3zYptaC6kf2mtwPd97Pm8iSgHVzft2pd531nYVRm71g=
> +SIZE (pdfshuffler-0.6.0.tar.gz) = 48071
> cvs server: Diffing patches
> Index: patches/patch-pdfshuffler_pdfshuffler_py
> ===================================================================
> RCS file: patches/patch-pdfshuffler_pdfshuffler_py
> diff -N patches/patch-pdfshuffler_pdfshuffler_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-pdfshuffler_pdfshuffler_py  27 Apr 2013 14:23:43 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +--- pdfshuffler/pdfshuffler.py.orig  Sat Apr 28 16:15:17 2012
> ++++ pdfshuffler/pdfshuffler.py       Sat Apr 27 15:51:15 2013
> +@@ -1081,8 +1081,10 @@ def main():
> +     """This function starts PdfShuffler"""
> +     gtk.gdk.threads_init()
> +     gobject.threads_init()
> ++    gtk.gdk.threads_enter()
> +     PdfShuffler()
> +     gtk.main()
> ++    gtk.gdk.threads_leave()
> + 
> + if __name__ == '__main__':
> +     main()
> Index: patches/patch-setup_py
> ===================================================================
> RCS file: /cvs/ports/print/pdfshuffler/patches/patch-setup_py,v
> retrieving revision 1.1.1.1
> diff -u -p -u -r1.1.1.1 patch-setup_py
> --- patches/patch-setup_py    22 May 2011 19:37:04 -0000      1.1.1.1
> +++ patches/patch-setup_py    27 Apr 2013 14:23:43 -0000
> @@ -1,12 +1,12 @@
>  $OpenBSD: patch-setup_py,v 1.1.1.1 2011/05/22 19:37:04 landry Exp $
> ---- setup.py.orig    Sun May 15 21:03:31 2011
> -+++ setup.py Sun May 15 21:03:39 2011
> -@@ -25,7 +25,7 @@ import re
> - from distutils.core import setup
> +--- setup.py.orig    Sat Apr 27 15:39:43 2013
> ++++ setup.py Sat Apr 27 15:39:58 2013
> +@@ -27,7 +27,7 @@ from distutils.core import setup
>   
> - data_files=[('share/applications/', ['data/pdfshuffler.desktop']),
> + data_files=[('share/pdfshuffler', ['data/pdfshuffler.ui']),
> +             ('share/applications', ['data/pdfshuffler.desktop']),
>  -            ('share/man/man1', ['doc/pdfshuffler.1']),
>  +            ('man/man1', ['doc/pdfshuffler.1']),
> -             ('share/pixmaps/', ['data/pdfshuffler.svg']),
> -             ('share/pixmaps/', ['data/pdfshuffler.png']) ]
> - 
> +             ('share/pixmaps', ['data/pdfshuffler.png']),
> +             ('share/pdfshuffler/icons/hicolor/scalable',
> +                 ['data/pdfshuffler.svg']) ]
> cvs server: Diffing pkg
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/print/pdfshuffler/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -u -p -u -r1.1.1.1 PLIST
> --- pkg/PLIST 22 May 2011 19:37:04 -0000      1.1.1.1
> +++ pkg/PLIST 27 Apr 2013 14:23:43 -0000
> @@ -1,6 +1,13 @@
>  @comment $OpenBSD: PLIST,v 1.1.1.1 2011/05/22 19:37:04 landry Exp $
>  bin/pdfshuffler
> -lib/python${MODPY_VERSION}/site-packages/pdfshuffler-0.5-py${MODPY_VERSION}.egg-info
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/
> +lib/python${MODPY_VERSION}/site-packages/${FULLPKGNAME}-py${MODPY_VERSION}.egg-info

You don't want to use FULLPKGNAME here, it'll break as soon as REVISION is 
bumped.
"make plist" is not 100% reliable.

> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/__init__.py
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/__init__.pyc
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/pdfshuffler.py
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/pdfshuffler.pyc
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/pdfshuffler_iconview.py
> +lib/python${MODPY_VERSION}/site-packages/pdfshuffler/pdfshuffler_iconview.pyc
>  @man man/man1/pdfshuffler.1
>  share/applications/pdfshuffler.desktop
>  share/locale/cs/LC_MESSAGES/pdfshuffler.mo
> @@ -8,9 +15,17 @@ share/locale/de/LC_MESSAGES/pdfshuffler.
>  share/locale/el/LC_MESSAGES/pdfshuffler.mo
>  share/locale/es/LC_MESSAGES/pdfshuffler.mo
>  share/locale/fr/LC_MESSAGES/pdfshuffler.mo
> +share/locale/hu/LC_MESSAGES/pdfshuffler.mo
>  share/locale/it/LC_MESSAGES/pdfshuffler.mo
> +share/locale/ja/LC_MESSAGES/pdfshuffler.mo
> +share/locale/zh_CN/LC_MESSAGES/pdfshuffler.mo
> +share/pdfshuffler/
> +share/pdfshuffler/icons/
> +share/pdfshuffler/icons/hicolor/
> +share/pdfshuffler/icons/hicolor/scalable/
> +share/pdfshuffler/icons/hicolor/scalable/pdfshuffler.svg
> +share/pdfshuffler/pdfshuffler.ui
>  share/pixmaps/
>  share/pixmaps/pdfshuffler.png
> -share/pixmaps/pdfshuffler.svg
>  @exec %D/bin/update-desktop-database
>  @unexec-delete %D/bin/update-desktop-database
> 

-- 
Antoine

Reply via email to