[cairo] Building cairo without X dependencies, current state

Jeff Kowalczyk jtk at yahoo.com
Mon Dec 20 09:54:46 PST 2004


I am interested in building cairo without any X dependencies for my Gentoo
linux servers. I'd like to use cairo as a drawing library to render PNG
from python-cairo, and to use the svg2png utility.

Previous inquiries made to this list all but confirm that this can be
done. With recent improvements cairo packaging on my chosen distro, it
would be great to go a step further and have cairo respect the -X (no X
windows) USE setting typical for server installations.

I'm starting this thread to ask the best instructions on building current
cairo, libpixman and libsvg releases with no X dependencies (i.e. only the
PNG and PDF backends). I'm particularly interested in resolving any
dependencies for font rendering components. I'll post the responses to a
Gentoo bug report to notify the packagers. If someone wants to add these
details to a 'Building without X Dependencies' sections in the
documentation, that might be useful to packagers on all distros.

Thanks.

 Current cairo dependency tree on Gentoo linux (USE -X)
 ---------------------------------------------------------

 # emerge cairo -Du --newuse -p
 [ebuild N ] x11-misc/ttmkfdir-3.0.9-r2
 [ebuild N ] x11-base/opengl-update-1.8.2
 [ebuild N ] x11-base/xorg-x11-6.8.0-r3
 [ebuild N ] app-arch/rpm2targz-9.0-r2
 [ebuild N ] sys-apps/utempter-0.5.5.5-r1
 [ebuild N ] x11-terms/xterm-196-r1
 [ebuild N ] media-libs/libpixman-0.1.2
 [ebuild N ]  app-arch/cabextract-1.1
 [ebuild N ] x11-libs/cairo-0.2.0

 Many of those packages are dependencies brought in by X, of course.


 cairo ebuild:
 -------------

 DESCRIPTION="A vector graphics library with cross-device output support"
 HOMEPAGE="http://cairographics.org/"
 SRC_URI="http://cairographics.org/snapshots/${P}.tar.gz"

 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
 KEYWORDS="~x86 ~sparc ~ppc"
 IUSE="glitz png"

 DEPEND="virtual/x11
     || ( >=x11-base/xfree-4.3.0-r7 x11-base/xorg-x11 ) virtual/xft
     media-libs/fontconfig
     >=media-libs/freetype-2*
     >=media-libs/libpixman-0.1.1
     glitz? ( =media-libs/glitz-0.2.3 )
     png? ( media-libs/libpng )"

 src_compile() {
     econf `use_enable glitz` `use_enable png` || die emake || die
 }

 src_install() {
     make install DESTDIR=${D}
 }



 libsvg-cairo ebuild:
 --------------------

 DESCRIPTION="Render SVG content using cairo" HOMEPAGE="http://xsvg.org/"
 SRC_URI="http://cairographics.org/snapshots/${P}.tar.gz" LICENSE="X11"
 SLOT="0"
 KEYWORDS="x86 ppc ~amd64 ~sparc"
 IUSE=""
 DEPEND="x11-libs/cairo
         media-libs/libsvg"

 src_compile() {
     econf || die
     emake || die
 }

 src_install() {
     make install DESTDIR=${D} || die
 }


FWIW, the version-numbered snapshots ease package updates on Gentoo,
please continue the frequent incremental releases. Thanks.




More information about the cairo mailing list