[111650] trunk/dports/python

macsforever2000 at macports.org macsforever2000 at macports.org
Fri Sep 27 15:12:47 PDT 2013


Revision: 111650
          https://trac.macports.org/changeset/111650
Author:   macsforever2000 at macports.org
Date:     2013-09-27 15:12:47 -0700 (Fri, 27 Sep 2013)
Log Message:
-----------
py-poppler: New port. (#40080)

Added Paths:
-----------
    trunk/dports/python/py-poppler/
    trunk/dports/python/py-poppler/Portfile
    trunk/dports/python/py-poppler/files/
    trunk/dports/python/py-poppler/files/patch-poppler.defs.diff
    trunk/dports/python/py-poppler/files/patch-poppler.override.diff

Added: trunk/dports/python/py-poppler/Portfile
===================================================================
--- trunk/dports/python/py-poppler/Portfile	                        (rev 0)
+++ trunk/dports/python/py-poppler/Portfile	2013-09-27 22:12:47 UTC (rev 111650)
@@ -0,0 +1,51 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           python 1.0
+
+name                py-poppler
+version             0.12.1
+
+platforms           darwin
+supported_archs     noarch
+license             GPL-2
+maintainers         nomaintainer
+description         python bindings to the poppler library
+long_description    Python bindings for the Poppler PDF rendering library (glib).
+python.versions     26 27
+
+checksums           md5 1a89e5ed3042afc81bbd4d02e0cf640a \
+                    rmd160 d6c196d6bbbaa9ef96c2ea3a38eb6a89308bab15 \
+                    sha256 322f183d24798a056f3005d1ab8e3ac27d8cfbbf0982725b323bbfec1bab5355
+
+homepage            https://launchpad.net/poppler-python
+master_sites         ${homepage}/trunk/development/+download/
+distname            pypoppler-${version}
+
+patchfiles          patch-poppler.defs.diff \
+                    patch-poppler.override.diff
+
+
+
+if {$subport != $name} {
+    depends_build-append \
+                        port:pkgconfig
+    depends_lib-append  port:poppler
+
+    use_configure       yes
+    configure.cmd       ./configure
+    configure.pkg_config_path \
+        ${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${python.prefix}/lib/pkgconfig/
+    configure.pre_args  --prefix=${python.prefix}
+
+    build.cmd           make
+    build.target        all
+
+    use_parallel_build  no
+
+    destroot.cmd        make
+    destroot.destdir    DESTDIR=${destroot}
+
+    livecheck.type      none
+}


Property changes on: trunk/dports/python/py-poppler/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/python/py-poppler/files/patch-poppler.defs.diff
===================================================================
--- trunk/dports/python/py-poppler/files/patch-poppler.defs.diff	                        (rev 0)
+++ trunk/dports/python/py-poppler/files/patch-poppler.defs.diff	2013-09-27 22:12:47 UTC (rev 111650)
@@ -0,0 +1,69 @@
+--- poppler.defs.orig	2013-08-12 21:31:22.000000000 -0700
++++ poppler.defs	2013-08-13 00:38:46.000000000 -0700
+@@ -1646,57 +1646,6 @@
+   (return-type "GType")
+ )
+ 
+-(define-method render_to_pixbuf
+-  (of-object "PopplerPage")
+-  (c-name "poppler_page_render_to_pixbuf")
+-  (return-type "none")
+-  (parameters
+-    '("int" "src_x")
+-    '("int" "src_y")
+-    '("int" "src_width")
+-    '("int" "src_height")
+-    '("double" "scale")
+-    '("int" "rotation")
+-    '("GdkPixbuf*" "pixbuf")
+-  )
+-)
+-
+-(define-method render_to_pixbuf_for_printing
+-  (of-object "PopplerPage")
+-  (c-name "poppler_page_render_to_pixbuf_for_printing")
+-  (return-type "none")
+-  (parameters
+-    '("int" "src_x")
+-    '("int" "src_y")
+-    '("int" "src_width")
+-    '("int" "src_height")
+-    '("double" "scale")
+-    '("int" "rotation")
+-    '("GdkPixbuf*" "pixbuf")
+-  )
+-)
+-
+-(define-method get_thumbnail_pixbuf
+-  (of-object "PopplerPage")
+-  (c-name "poppler_page_get_thumbnail_pixbuf")
+-  (return-type "GdkPixbuf*")
+-)
+-
+-(define-method render_selection_to_pixbuf
+-  (of-object "PopplerPage")
+-  (c-name "poppler_page_render_selection_to_pixbuf")
+-  (return-type "none")
+-  (parameters
+-    '("gdouble" "scale")
+-    '("int" "rotation")
+-    '("GdkPixbuf*" "pixbuf")
+-    '("PopplerRectangle*" "selection")
+-    '("PopplerRectangle*" "old_selection")
+-    '("PopplerSelectionStyle" "style")
+-    '("GdkColor*" "glyph_color")
+-    '("GdkColor*" "background_color")
+-  )
+-)
+ 
+ (define-method render
+   (of-object "PopplerPage")
+@@ -1794,7 +1743,7 @@
+ 
+ (define-method get_text
+   (of-object "PopplerPage")
+-  (c-name "poppler_page_get_text")
++  (c-name "poppler_page_get_selected_text")
+   (return-type "char*")
+   (parameters
+     '("PopplerSelectionStyle" "style")

Added: trunk/dports/python/py-poppler/files/patch-poppler.override.diff
===================================================================
--- trunk/dports/python/py-poppler/files/patch-poppler.override.diff	                        (rev 0)
+++ trunk/dports/python/py-poppler/files/patch-poppler.override.diff	2013-09-27 22:12:47 UTC (rev 111650)
@@ -0,0 +1,13 @@
+--- poppler.override.orig	2009-09-26 11:31:23.000000000 -0700
++++ poppler.override		2013-08-12 09:33:31.000000000 -0700
+@@ -19,8 +19,10 @@
+ %%
+ headers
+ #include <Python.h>
++#define NO_IMPORT_PYGOBJECT
+ #include "pygobject.h"
+ #include <glib/poppler.h>
++#define NO_IMPORT_PYGTK
+ #include <pygtk/pygtk.h>
+ #include <pycairo.h>
+ #include <gdk/gdkregion.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130927/76156913/attachment.html>


More information about the macports-changes mailing list