[50047] trunk/dports/x11/rox-filer/Portfile

Jeremy Huddleston jeremyhu at macports.org
Thu Apr 23 20:32:54 PDT 2009


On Apr 23, 2009, at 15:57, Anders F Björklund wrote:

> Jeremy Huddleston wrote:
>
>> Right, which is my point.  If gtk2 didn't pull in the X11 libs,  
>> then that means that he's got a gtk2+quartz install... which means  
>> that ROX is not going to work for him because it needs gtk2 for x11.
>
> Suppose dependencies-with-variants would have allowed requiring  
> "gtk2+x11" ?

+x11 is the default.  You can do some ui_err magic if they don't have  
gtk2+x11.

>> So either the user had a +quartz gtk2 (in which case he can't use  
>> rox) or he has some other problem that adding the X11 dependencies  
>> to rox won't solve (because they're redundant).
>
> In order to use a non-system X11, the port needed the usual  
> workaround:
> configure.args-append --x-include=${prefix}/include --x-lib=$ 
> {prefix}/lib
> Just wasn't obvious where to add them, when using Zero Install's -- 
> compile.

It should "just work".

> And obviously they would be wrong, when using +system_x11 (another  
> story)

The solution I've been using is just tricking AC_X_PATH by ALWAYS  
using --x-include=${prefix}/include --x-lib=${prefix}/lib and  
appending -I${x11prefix}/include and -L${x11prefix}/lib to  
configure.cppflags and configure.ldflags if ${prefix}/lib/pkgconfig/ 
x11.pc isn't available (just grep for AC_X_PATH in the tree, and  
you'll see a port that is doing that).

> But seems like it'll be able to pick up /usr/X11R6 anyway, due to it  
> being
> present in gtk2's pkg-config and it being the default. So should be  
> good.

Right... /usr/X11R6 should NOT be in gtk2's pc unless they're using  
+system_x11

$ pkg-config --libs gtk+-x11-2.0
-L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 - 
lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 - 
lm -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl

$ pkg-config --cflags gtk+-x11-2.0
-I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/ 
local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/ 
pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/ 
include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 - 
I/opt/local/include/libpng12




More information about the macports-dev mailing list