Conflict between gtk2 and pangox-compat

Ryan Schmidt ryandesign at macports.org
Mon Feb 11 13:59:27 PST 2013


On Feb 11, 2013, at 07:08, Aljaž Srebrnič wrote:

> I recently tried to update gtk2, but it gave the error that pango must be installed with -x11. The thing is, I did install pango without the x11 variant. Going through the gtk2 portfile I noticed that it checks on a lib file to determine installed variants. The file ($prefix/lib/libpangox-1.0.0.dylib) is provided by pangox-compat!

Thanks, I had noticed this too but had not yet had time to figure out why. You're right, the problem is that libpangox, which used to be provided by pango, no longer is, so the check now fails.


> I refactored the gtk2 portfile to use active_variants instead, but, learning from my mistakes, I'm inlining the diff. If it's OK to you I'll commit it.
> Here it is:
> 
> Index: Portfile
> ===================================================================
> --- Portfile	(revision 102964)
> +++ Portfile	(working copy)
> @@ -4,6 +4,7 @@
>  PortSystem          1.0
>  PortGroup           muniversal 1.0
>  PortGroup           xcodeversion 1.0
> +PortGroup           active_variants 1.1
>  
>  name                gtk2
>  version             2.24.15
> @@ -73,11 +74,7 @@
>      }
>  
>      if {[variant_isset quartz]} {
> -        if {![file exists ${prefix}/include/cairo/cairo-quartz.h]} {
> -            error "cairo must be built with the +quartz variant enabled."
> -        }
> -    } elseif {![file exists ${prefix}/include/cairo/cairo-xlib.h]} {
> -        error "cairo must be built without the +no_x11 variant."
> +        require_active_variants cairo quartz x11
>      }
>  }
>  
> @@ -193,12 +190,7 @@
>  }
>  
>  variant no_x11 description {Disable X11 support} {
> -    pre-fetch {
> -        if {[file exists ${prefix}/lib/libpangox-1.0.dylib]} {
> -            ui_error "Please install pango without the x11 variant, by running 'port install pango -x11'."
> -            error "pango must be installed with the x11 variant disabled"
> -        }
> -    }
> +    require_active_variants pango "" x11
>  }
>  
>  variant quartz requires no_x11 conflicts x11 {

First the pango and pango-devel ports should be updated to use require_active_variants in their quartz and x11 variants.

Then, gtk2 should have its no_x11 variant switch to an x11 variant. Then its quartz and x11 variants should use require_active_variants against pango's variants (no need to check cairo's since checking pango's should cover that).




More information about the macports-dev mailing list