[MacPorts] #33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- GObject Introspection is only useful when the libraries trying to be used through introspection are built with `--enable-introspection`. Current practice (e.g. in the gtk3 port) is to provide a variant for introspection, which is however a pain to maintain, because every port trying to depend on, e.g., gtk3 +introspection needs to check for a file installed by that variant, abort if it's not there and instruct the user to install the dependency with the needed variant. Because of this, I would suggest to enable introspection by default. This adds a dependency on the `gobject-introspection` port. I don't see this as a blocker, because the port is a rather quick build and its dependencies will mostly be installed in systems where introspection is used anyway (e.g., cairo is needed by pango, glib2 is needed by gtk3, python27 is required by a huge number of ports). I'll attach patches for atk, gdk-pixbuf2 and pango shortly. -- Ticket URL: <https://trac.macports.org/ticket/33877> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by cal@…): Any comments? Should I just go ahead and commit those, since all those ports are marked openmaintainer? -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by ryandesign@…): Enabling introspection has previously caused lots of problems. I don't know what introspection is or what's going on. If you have reviewed the previous problems, and come to the conclusion that they won't happen again, then proceed at your discretion. I agree if the feature is useful and does not cause problems it should be turned on. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by msm@…): I brought this up a few months ago here https://trac.macports.org/ticket/33054 The patches I generated allow for introspection to be turned off if needed. @ryandesign Introspection allows for a dynamic analysis of the api for gobject/gdk/gtk and a few others. For one this allows python developers to move forward with using gtk3 as PyGtk is going to be deprecated. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by cal@…): Replying to [comment:3 msm@…]:
The patches I generated allow for introspection to be turned off if needed.
Yes, I was aware of this. This method has the problem that it can't be directly depended upon, because the MacPorts dependency engine doesn't handle variants (i.e. you can't easily depend on gtk3 +introspection). This makes writing Portfiles using introspection (imho unnecessarily) hard and often requires user interaction to get the dependencies right. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by msm@…): Replying to [comment:4 cal@…]:
i.e. you can't easily depend on gtk3 +introspection
That makes sense. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by charlie.clark@…): I've just tried the Pango patch (+ py27-gobject3) but Pango is not coming through. """ Type "help", "copyright", "credits" or "license" for more information.
from gi.repository import cairo from gi.repository import Pango ERROR:root:Could not find any typelib for Pango Traceback (most recent call last): """
-- Ticket URL: <https://trac.macports.org/ticket/33877#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by cal@…): Which files did your pango install? Check with `port contents pango`. Also make sure you're not getting the binary download from the buildbot without the changes in the Portfile, but force build from source: `port -s install pango`. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by charlie.clark@…): Yes, I did trip up over the different behaviour of `port -D . build` and `port -D . install` After that I was still hitting problems until I added /opt/local/lib to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/local/lib Result: Weasyprint, http://www.weasyprint.org now runs on Mac OS. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by cal@…): This is a known problem and I'm going to fix this by modifying `gobject- introspection` to include the full path of the to-be-loaded libraries in the typelib file. Unfortunately upstream gobject-introspection disregards Mac OS X' linking style here (which works fine as long as the libraries are located in /usr/lib). -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by charlie.clark@…): Great! I'm sure I'm not the only one who struggles with some of the unix environment variables. I managed to destroy my LD_LIBRARY_PATH earlier and had to reinstall py-Gobject3 to get things working again. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by dougalg@…): Charlie, can you clarify how you got it to work? I'm stuck at the typelib error, and cannot get pango to install. Do I need to manually add these patches or have they been moved into the main repository already? I've already added opt/local/lib to my LD_LIBRARY_PATH Any help would be appreciated, thanks. Replying to [comment:14 charlie.clark@…]:
Yes, I did trip up over the different behaviour of `port -D . build` and `port -D . install`
After that I was still hitting problems until I added /opt/local/lib to the LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/local/lib
Result: Weasyprint, http://www.weasyprint.org now runs on Mac OS.
-- Ticket URL: <https://trac.macports.org/ticket/33877#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by dougalg@…): OK, I found and looked at the portfile, then patched it with the patch. Now when I try to build it fails with: Error: Unable to open port: invalid command name "CC=/usr/bin/clang" Thank you if you have any idea what might be wrong. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:20> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 ------------------------------+--------------------------------------------- Comment(by ryandesign@…): Replying to [comment:20 dougalg@…]:
{{{ Error: Unable to open port: invalid command name "CC=/usr/bin/clang" }}} I'm not sure which of the four patches in this ticket you're talking about. The only thing I can imagine is that you did not actually use the patch(es), but rather tried to make equivalent changes to the Portfile(s) manually, and ended up inserting something like the following, which is a syntax error: {{{ build.env-append CC=${configure.cc} }}} Rather than the following, which is what you want: {{{ build.env-append \ CC=${configure.cc} }}} -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:21> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection ------------------------------+--------------------------------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Keywords: haspatch | Port: atk pango pango-devel gdk-pixbuf2 gtk3 ------------------------------+--------------------------------------------- Changes (by cal@…): * port: atk pango pango-devel gdk-pixbuf2 => atk pango pango-devel gdk- pixbuf2 gtk3 Comment: GObject Introspection from MacPorts as of r95227 generates .gir and .typelib files with absolute paths. This should lift any requirements to specify `DYLD_LIBRARY_PATH` or `DYLD_FALLBACK_LIBRARY_PATH`. In order for this change to work, the .gir and .typelib files must be regenerated, i.e. the ports installing these files must be rebuilt. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:22> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection -----------------------------------------------------+---------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Resolution: fixed | Keywords: haspatch Port: atk pango pango-devel gdk-pixbuf2 gtk3 | -----------------------------------------------------+---------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed Comment: Introspection was enabled for - atk in r95232 and r95233 - gdk-pixbuf2 in r95234 - pango in r95235 - pango-devel in r95236 - gtk3 in 95237. -- Ticket URL: <https://trac.macports.org/ticket/33877#comment:23> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33877: Build atk, pango and gdk-pixbuf2 with GObject Introspection -----------------------------------------------------+---------------------- Reporter: cal@… | Owner: singingwolfboy@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.99 Resolution: fixed | Keywords: haspatch Port: atk pango pango-devel gdk-pixbuf2 gtk3 | -----------------------------------------------------+---------------------- Comment(by dougalg@…): Thank you for your help. The patch did indeed not patch all the lines so I manually added those which it missed, so you must be right. However, since it's been added to the trunk now, I just updated and it worked great! Replying to [comment:21 ryandesign@…]:
I'm not sure which of the four patches in this ticket you're talking about. The only thing I can imagine is that you did not actually use the patch(es), but rather tried to make equivalent changes to the Portfile(s) manually, and ended up inserting something like the following, which is a syntax error...
-- Ticket URL: <https://trac.macports.org/ticket/33877#comment:24> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts