Advice on distributing a project

Ryan Schmidt ryandesign at
Thu Jun 28 16:17:22 UTC 2018

On Jun 28, 2018, at 11:02, Langer, Stephen A. (Fed) wrote:

> In any case, thanks to all of your suggestions, I can now build and install using the Portfile.  I can create an mpkg and install from it.  However, the contents of the mpkg are incorrect.   There are missing symbols in libgio-2.0.dylib, which is installed by the glib2 port, so I suspect it has something to do with with   I installed glib2 with +x11 and installed everything else with +quartz, which is the only way to get gtk2 working on quartz.

This is surprising to me and probably not what we intended. If you want quartz, you're supposed to have to use the quartz variant for everything, and if you instead want x11, you're supposed to have to use the x11 variant for everything. I don't use the quartz variants so I don't have personal experience with them.

> Would mpkg have somehow pulled in the +quartz version?

It sounds like maybe it did. How did you invoke sudo port mpkg -- what arguments? Did any of its output show that it deactivated your x11 version of glib2 and activated the quartz version?

> If my port requires a particular version, do I have to do something to enforce it when packaging the port?

The require_active_variants procedure of the active_variants 1.1 portgroup is the only way to "enforce" variants of a dependency.

> The correct libgio-2.0.dylb defines _g_desktop_app_info_get_type.

This is the +x11 variant of glib2.

> The one in the mpkg defines _g_osx_app_info_get_type instead.

This is the +quartz variant of glib2.

> Googling "glib osx_app_info" leads to a page with Ryan's name on it…

MacPorts patches glib2 to offer a quartz variant that changes how app_info works.

Right now these patches are MacPorts-specific, until upstream decides to merge the changes into their official sources.

More information about the macports-users mailing list