|
From: Arlindo da S. <da...@al...> - 2010-10-05 17:10:09
|
On Tue, Oct 5, 2010 at 11:37 AM, Jennifer Adams <jm...@co...> wrote:
> Thanks for the comments. This is NOT my area of expertise, and I welcome
> your guidance. Clearly, the dynamic linking against system installations is
> the easiest, but for the binary distributions, I will have to figure out how
> to link statically. That long list of dependent libraries is daunting! In my
> simple test program (rmf.c), I am compiling/linking with this command:
>
> gcc -g rmf.c -o rmf -I/opt/local/include/cairo -L/opt/local/lib -lcairo
> -L/usr/X11/lib -lX11
>
> I have some more testing to do with fonts, and so I may have to add some
> more libs to that list, but if my code doesn't require all those dependent
> libs, I don't have to statically link them, do I?
>
>
At a minimum you *must* have: fontconfig, freetype, pixman; other libraries
such as jpeg, libpng, etc., we already have.
> As for backends, I am planning to use cairo to draw to an X window, PNG,
> Postscript, PDF, and SVG. I do not see why it's necessary to add the
> platform-specific window backends; X has been working fine for GrADS all
> these years.
>
I'd love to be able to use a native Windows backend and get rid of the X
server... The Quartz backend would also give it a more native look on Mac OS
X, but that is less critical. So, if you could leave the door open to the
possibility of an alternative to X that would be good.
Arlindo
> --Jennifer
>
>
> On Oct 5, 2010, at 10:03 AM, Arlindo da Silva wrote:
>
>
>
> On Tue, Oct 5, 2010 at 5:16 AM, Patrice Dumas <per...@fr...> wrote:
>
>> On Mon, Oct 04, 2010 at 04:40:17PM -0400, Jennifer Adams wrote:
>> > >
>> > >Regarding the supplibs, I have been working on the switch to cairo
>> > >for graphics rendering. At the moment, I am only working in the
>> > >mac environment, using the macports installation of cairo, so I
>> > >don't really know what the issues are regarding building from
>> > >source, or for the autoconfiguration. If any of you can provide
>> > >some guidance, especially for the autoconf stuff, it would be most
>> > >welcome. There must be some existing code out there that does
>> > >this, maybe already in opengrads, but I haven't looked for it yet.
>>
>> cairo uses pkgconfig. So something like
>>
>> cairo_pkgconfig=yes
>> PKG_CHECK_MODULES([CAIRO],[cairo >= $cairo_min_version],,
>> [cairo_pkgconfig=no])
>>
>> should set CAIRO_LIBS and CAIRO_CFLAGS. This should be enough for
>> linking dynamically against the system library.
>>
>>
>> The libs it requires when statically linking should be listed in
>> Requires.private:. To link statically against the supplibs, I guess that
>> you have 2 options. Either simply supply the right link flags and
>> include dirs, either hardcoded or using GA_SET_FLAGS and similar. Or
>> put the .pc files obtained when compiling supplibs in a specific
>> directory in the supplibs, set PKG_CONFIG_PATH to this directory, and
>> use a pkg-config call, like
>> pkg-config --static cairo --libs
>>
>> I don't know if you'd want to put pkg-config in the supplibs too, then,
>> but, in case you wonder, on my debian squeeze box, pkg-config links
>> against
>> glib, which in turns requires libpcre, and no other dependency (besides
>> a C library) seems to be involved.
>>
>>
>> (Cairo, however needs quite a bit of depednecies, but it is not clear to
>> me
>> how you want to handle the backends of cairo? On my box, the xcb backend
>> is used:
>>
>> pkg-config --static cairo --libs
>> -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lm
>> -lxcb-render-util -lXrender -lxcb-render -lX11 -lpthread -lxcb -lXau -lXdmcp
>>
>> But I guess that on MacOSX the Quartz backend should be used, on Windows
>> the win32 backend, on other UNIX the xlib backend?)
>>
>>
> Nice to hear form you!
>
> The opengrads supplibs includes pkg-config and builds (whenever possible)
> builds all packages with it. The main reason being this autoconf
> integration.
>
> As for my experience building cairo in the supplibs. This is the only
> library that I have *not* succeeded to build statically on all platforms.
> Not quite sure what the issues are. Since the opengrads wrappers
> automatically sets LD_LIBRARY_PATH, this have not been a problem. So far I
> have used cairo primarily for gxyat with only 4 backends: PNG, SVG, ps and
> pdf. I disable everything else to avoid any unnecessary dependency.
>
> Jennifer: which back ends do you intend to use?
>
> Arlindo
>
> --
> Arlindo da Silva
> da...@al...
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
>
> http://p.sf.net/sfu/beautyoftheweb_______________________________________________
> Opengrads-devel mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opengrads-devel
>
>
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jm...@co...
>
>
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Opengrads-devel mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opengrads-devel
>
>
--
Arlindo da Silva
da...@al...
|