Subject: Re: in buildlink files?
To: Todd Vierling <>
From: Christian Hattemer <>
List: tech-pkg
Date: 04/20/2006 17:02:41
Hello Todd,

On 19.04.06, you wrote:

> Do dependencies of cairo *actually* break when built without the line
> in cairo/  (The point here is that if cairo hides the
> glitz API from cairo's dependents, then the dependents don't need the
> .include in cairo/

It looks a bit strange that (when building with glitz enabled) the
requirements listings at the beginning of the build and after install
sometimes list glitz and sometimes don't. This may have to do with build
vs. run depends, but it still looks a bit strange. E.g. pango lists it at
the start and not after install and not in the package. With cairo it's the
oposite, IIRC.

pango builds ok without the line, make test runs ok, it doesn't package due
to some missing files (however I do have older packages from it, seems
something changed). But it runs ok, at least for gtk2. I had it quite
some time this way, but I need the package now.

>> It seems this isn't the right way to go. How is it done?
> See graphics/aalib/ for an example.

Thanks for the hint. It think this should be mentioned in the pkgsrc guide
in a section that could be named "nifty tricks you can't dig out yourself
easily", or something like that.

Please also add an "Published at" timestamp to the titlepage, as the NetBSD
guide has it. The timestamp on the RCS id of pkgsrc.xml doesn't say much
about how uptodate the rest of the document is.

Here's also the revised diff.

Bye, Chris

Index: graphics/cairo/Makefile
RCS file: /cvsroot/pkgsrc/graphics/cairo/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- graphics/cairo/Makefile    17 Apr 2006 13:45:57 -0000    1.35
+++ graphics/cairo/Makefile    20 Apr 2006 14:53:44 -0000
@@ -16,13 +16,14 @@
 GNU_CONFIGURE=        yes
 CONFIGURE_ARGS+=    --disable-atsui
 CONFIGURE_ARGS+=    --disable-xcb
-CONFIGURE_ARGS+=    --enable-glitz
 CONFIGURE_ARGS+=    --enable-pdf
 CONFIGURE_ARGS+=    --enable-ps
 CONFIGURE_ARGS+=    --with-html-dir=${PREFIX}/share/doc
 .include "../../mk/"
+.include ""
 .if ${OPSYS} == "Darwin" &&
 CONFIGURE_ARGS+=    --enable-quartz
@@ -33,7 +34,6 @@
 BUILDLINK_API_DEPENDS.freetype2+=    freetype2>=2.1.5
 BUILDLINK_API_DEPENDS.Xft2+=    Xft2>=2.1.2
 BUILDLINK_API_DEPENDS.Xrender+=    Xrender>=0.8
-BUILDLINK_API_DEPENDS.glitz+=    glitz>=0.4.4
 BUILDLINK_API_DEPENDS.libpixman+=    libpixman>=0.1.5
 .include "../../mk/"
@@ -47,7 +47,6 @@
 .include "../../fonts/fontconfig/"
 .include "../../fonts/Xft2/"
 .include "../../graphics/freetype2/"
-.include "../../graphics/glitz/"
 .include "../../graphics/libpixman/"
 .include "../../graphics/png/"
 .include "../../x11/Xrender/"
Index: graphics/cairo/
RCS file: /cvsroot/pkgsrc/graphics/cairo/,v
retrieving revision 1.16
diff -u -r1.16
--- graphics/cairo/    17 Apr 2006 13:45:57 -0000    1.16
+++ graphics/cairo/    20 Apr 2006 14:53:44 -0000
@@ -20,11 +20,21 @@
 BUILDLINK_API_DEPENDS.Xrender+=    Xrender>=0.8
 .endif    # CAIRO_BUILDLINK3_MK
+.if !defined(PKG_BUILD_OPTIONS.cairo)
+PKG_BUILD_OPTIONS.cairo!=                        \
+    cd ${BUILDLINK_PKGSRCDIR.cairo} &&                \
 .include "../../devel/zlib/"
 .include "../../fonts/fontconfig/"
 .include "../../fonts/Xft2/"
 .include "../../graphics/freetype2/"
-.include "../../graphics/glitz/"
+.if !empty(PKG_BUILD_OPTIONS.cairo:Mglitz)
+.  include "../../graphics/glitz/"
 .include "../../graphics/libpixman/"
 .include "../../graphics/png/"
 .include "../../x11/Xrender/"
Index: mk/defaults/options.description
RCS file: /cvsroot/pkgsrc/mk/defaults/options.description,v
retrieving revision 1.97
diff -u -r1.97 options.description
--- mk/defaults/options.description    2 Apr 2006 17:45:18 -0000    1.97
+++ mk/defaults/options.description    20 Apr 2006 14:53:44 -0000
@@ -87,6 +87,7 @@
 gif            Enable GIF support.
 gimp1-helpbrowser    Link against gnome1 to get a help browser.
+glitz            Enable glitz backend.

---------------- new -------------------------
# $NetBSD$


.include "../../mk/"

.if !empty(PKG_OPTIONS:Mglitz)
BUILDLINK_API_DEPENDS.glitz+=    glitz>=0.4.4
.include "../../graphics/glitz/"
CONFIGURE_ARGS+=    --enable-glitz
CONFIGURE_ARGS+=    --disable-glitz
PLIST_SUBST+=        GLITZ="@comment "