Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 75346

Summary: cairo-0.2.0 can be built without X for servers, attached diff respects USE X
Product: Gentoo Linux Reporter: Jeff Kowalczyk <jeff.kowalczyk>
Component: New packagesAssignee: Peter Johanson (RETIRED) <latexer>
Status: RESOLVED FIXED    
Severity: normal CC: twp
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild respects X use var

Description Jeff Kowalczyk 2004-12-22 11:00:50 UTC
The cairo make file detects the presence of X and other libraries, and configures accordingly. I wanted to build cairo (and pycairo) on my servers, to use the png back-end as a server-side drawing library for web applications.

We only need to alter the USE behavior of the ebuild to enable building cairo without X dependencies. The patch below respects the X use variable. Tested on server and laptop, no problems so far.

Please excuse the xorg-unichrome dependency. This is the X I use on my laptop. If you know of a better way to express 'virtual/xorg', by all means do so. It was also necessary to move the xfree to the end of the expression on my system. Don't know how that will affect people still actually using xfree.

# diff -u /usr/portage/x11-libs/cairo/cairo-0.2.0.ebuild /usr/local/portage/x11-libs/cairo/cairo-0.2.0.ebuild
--- /usr/portage/x11-libs/cairo/cairo-0.2.0.ebuild      2004-12-19 13:41:50.000000000 -0500
+++ /usr/local/portage/x11-libs/cairo/cairo-0.2.0.ebuild        2004-12-22 13:31:05.032882640 -0500
@@ -9,11 +9,11 @@
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
 KEYWORDS="~x86 ~sparc ~ppc"
-IUSE="glitz png"
+IUSE="glitz png X"

-DEPEND="virtual/x11
-       || ( >=x11-base/xfree-4.3.0-r7 x11-base/xorg-x11 )
-       virtual/xft
+DEPEND="X? (virtual/x11
+       || ( x11-base/xorg-x11 x11-base/xorg-unichrome >=x11-base/xfree-4.3.0-r7 )
+       virtual/xft)
        media-libs/fontconfig
        >=media-libs/freetype-2*
        >=media-libs/libpixman-0.1.1


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jeff Kowalczyk 2004-12-22 11:01:57 UTC
Created attachment 46651 [details]
ebuild respects X use var
Comment 2 Peter Johanson (RETIRED) gentoo-dev 2005-02-23 11:36:49 UTC
I've just added 0.2.0-r1 and 0.3.0-r1 which includes this functionality. Also added another use_enable line for the X stuff, so it's not deterministic based on USE flags, not on what you might or not might have installed on your machine.

Marking FIXED, please feel free to re-open if you have any problems with these ebuilds. Thanks.
Comment 3 Peter Johanson (RETIRED) gentoo-dev 2005-02-23 11:37:10 UTC
FIXED