[MacPorts] #33054: gtk3 @3.0.12 +introspection build failure
#33054: gtk3 @3.0.12 +introspection build failure ----------------------------------------+----------------------------------- Reporter: msm@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: gtk3 gobject-introspection | Port: gtk3 ----------------------------------------+----------------------------------- While attempting to install gtk3 with introspection on a fresh macports(OSX 10.7.2), I ran into several build errors pertaining to missing .gir files. It turns out that atk, gdk-pixbuf2, and pango need introspection enabled for gtk3 to build properly with introspection. I modified the Portfiles for atk, gdk-pixbuf2, and pango and then installed them again with +introspection, then gtk3 built just fine. Following the guide of the Portfile for gtk3 I produced a few patches to the other Portfiles. {{{ --- Portfile-atk.orig 2012-01-28 23:22:44.000000000 -0500 +++ Portfile-atk 2012-01-28 16:34:30.000000000 -0500 @@ -1,5 +1,5 @@ # -*- 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$ +# $Id: Portfile 87586 2011-11-27 08:37:54Z dports@macports.org $ PortSystem 1.0 PortGroup archcheck 1.0 @@ -40,6 +40,13 @@ configure.args --enable-static \ --disable-introspection + +variant introspection description {Enable introspection} { + depends_lib-append port:gobject-introspection+ configure .args-delete --disable-introspection + configure.args-append --enable-introspection +} + livecheck.type regex livecheck.url http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/ livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)} }}} {{{ --- Portfile-gdk-pixbuf2.orig 2012-01-28 23:23:36.000000000 -0500 +++ Portfile-gdk-pixbuf2 2012-01-28 16:32:31.000000000 -0500 @@ -1,5 +1,5 @@ # -*- 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$ +# $Id: Portfile 87587 2011-11-27 08:41:00Z dports@macports.org $ PortSystem 1.0 @@ -50,6 +50,12 @@ configure.args --with-libjasper \ --enable-introspection=no +variant introspection description {Enable introspection} { + depends_lib-append port:gobject-introspection + configure.args-delete --enable-introspection=no + configure.args-append --enable-introspection=yes +} + test.run yes test.target check }}} {{{ --- Portfile-pango.orig 2012-01-28 23:24:13.000000000 -0500 +++ Portfile-pango 2012-01-28 16:32:06.000000000 -0500 @@ -1,5 +1,5 @@ # -*- 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$ +# $Id: Portfile 87564 2011-11-25 20:53:28Z ryandesign@macports.org $ PortSystem 1.0 PortGroup archcheck 1.0 @@ -124,6 +124,12 @@ default_variants +x11 } +variant introspection description {Enable introspection} { + depends_lib-append port:gobject-introspection + configure.args-delete --disable-introspection + configure.args-append --enable-introspection +} + post-destroot { if {![variant_isset x11]} { xinstall -d ${destroot}${prefix}/etc/pango }}} hope this helps. -- Ticket URL: <https://trac.macports.org/ticket/33054> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure ----------------------------------------+----------------------------------- Reporter: msm@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: gtk3 gobject-introspection | Port: gtk3 ----------------------------------------+----------------------------------- Changes (by ryandesign@…): * cc: singingwolfboy, devans, ryandesign (removed) * cc: singingwolfboy@…, devans@…, ryandesign@… (added) Comment: The Cc field requires complete email addresses. -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Changes (by cal@…): * status: new => assigned * keywords: gtk3 gobject-introspection => * port: gtk3 => gtk3 gobject-introspection * owner: macports-tickets@… => cal@… -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Comment(by Deil.Christoph@…): I think I ran into the same problem: {{{ $ sudo port -d install gtk3 +introspection ... Couldn't find include 'GdkPixbuf-2.0.gir' (search path: ['../gdk', 'gir-1.0', '/opt/local/share/gir-1.0', '/usr/share/gir-1.0', '/opt/local/share/gir-1.0']) }}} I am new to GTK and would like to use it from python. This tutorial ( http ://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html ) uses {{{ from gi.repository import Gtk }}} Is this python GTK3 package available via Macports? Which port / variant to I have to install to get it? -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Comment(by msm@…): Replying to [comment:4 Deil.Christoph@…]:
I am new to GTK and would like to use it from python. This tutorial ( http://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html ) uses {{{ from gi.repository import Gtk }}}
Is this python GTK3 package available via Macports?
Which port / variant to I have to install to get it?
To get Gtk-3.0 working with Python you will need to build this port(Gtk3) with introspection enabled. I was able to get introspection enabled by applying the patches posted here and then building those ports. You will also need to install the gobject-introspection port and pygobject. Feel free to email me if you want to chat more about setting up Gtk3 with Python. -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Comment(by Deil.Christoph@…): Replying to [comment:6 msm@…]:
Replying to [comment:4 Deil.Christoph@…]:
I am new to GTK and would like to use it from python. This tutorial ( http://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html ) uses {{{ from gi.repository import Gtk }}}
Is this python GTK3 package available via Macports?
Which port / variant to I have to install to get it?
To get Gtk-3.0 working with Python you will need to build this port(Gtk3) with introspection enabled. I was able to get introspection enabled by applying the patches posted here and then building those ports. You will also need to install the gobject-introspection port and pygobject.
Feel free to email me if you want to chat more about setting up Gtk3 with Python.
Thanks for your help! I currently have this installed and active: {{{ atk @2.2.0_0 (active) gdk-pixbuf2 @2.26.1_0 (active) gobject-introspection @1.30.0_0 (active) pango @1.30.0_0+x11 (active) py27-gobject @2.26.0_2 (active) }}} Can you please post the commands I have to execute * to apply your patches and then how to * force a rebuild of these ports with the introspection variant? I can see that the atk, gdk-pixbuf2 and pango maintainers are CC'ed on this ticket. Would it be possible to apply these patches or do you have suggestions for further tests? Christoph -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Comment(by msm@…): Replying to [comment:7 Deil.Christoph@…]:
Can you please post the commands I have to execute * to apply your patches and then how to * force a rebuild of these ports with the introspection variant?
Well, when I created the patches I used 'sudo port edit' to modify the portfiles and then just rebuilt with 'sudo port install'. I'm not sure about applying the patches using the patch command as I don't recall where the portfiles are installed and I have since uninstalled macports. I would say you could easily reproduce what I did by using the 'sudo port edit' command on the atk, gdk-pixbuf2, and pango to manually apply the few lines to each. Then run 'sudo port install <port> +introspection' and you should be able to get them all installed.
I can see that the atk, gdk-pixbuf2 and pango maintainers are CC'ed on this ticket. Would it be possible to apply these patches or do you have suggestions for further tests?
There is another ticket open about this issue and I believe the maintainers are working on a different solution to adding introspection. It sounds like at some point it will enabled by default. good luck -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure --------------------------------+------------------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: gtk3 gobject-introspection --------------------------------+------------------------------------------- Comment(by cal@…): #33877 will fix this. I plan to commit those, but more testing is needed and gobject-introspection needs to be patched a little more (it currently fails for me when trying to import the modules into Python because they're linked against relative paths, which works on Linux, but breaks on Macs). -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33054: gtk3 @3.0.12 +introspection build failure -----------------------------------------+---------------------------------- Reporter: msm@… | Owner: cal@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: gtk3 gobject-introspection | -----------------------------------------+---------------------------------- Changes (by cal@…): * status: assigned => closed * resolution: => fixed Comment: #33877 has been closed, r95237 enabled gobject-introspection for gtk3. -- Ticket URL: <https://trac.macports.org/ticket/33054#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts