User:Krille
From NetBSD Wiki
I'm keeping this patch locally. You can remove building glitz when building cairo with it. This saves building glitz and MesaLib.
It used to save glu and glut, but this obviously has changed.
I have a simmilar one to offer for devel/SDL to remove MesaLib and glu from there (well, more a hack and not a proper option).
Index: graphics/cairo/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/Makefile,v
retrieving revision 1.57
diff -u -r1.57 Makefile
--- graphics/cairo/Makefile 6 Jul 2007 18:19:43 -0000 1.57
+++ graphics/cairo/Makefile 28 Oct 2007 20:45:48 -0000
@@ -17,7 +17,7 @@
PKGCONFIG_OVERRIDE+= src/cairo.pc.in src/cairo-backend.pc.in
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-xcb
-CONFIGURE_ARGS+= --enable-glitz
+#CONFIGURE_ARGS+= --enable-glitz
CONFIGURE_ARGS+= --enable-pdf
CONFIGURE_ARGS+= --enable-ps
@@ -31,7 +31,7 @@
.include "options.mk"
-BUILDLINK_API_DEPENDS.glitz+= glitz>=0.5.1
+#BUILDLINK_API_DEPENDS.glitz+= glitz>=0.5.1
# For snprintf()
CPPFLAGS.SunOS+= -D__EXTENSIONS__
@@ -41,7 +41,7 @@
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/glitz/buildlink3.mk"
+#.include "../../graphics/glitz/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: graphics/cairo/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/PLIST,v
retrieving revision 1.17
diff -u -r1.17 PLIST
--- graphics/cairo/PLIST 15 Jun 2007 17:47:59 -0000 1.17
+++ graphics/cairo/PLIST 28 Oct 2007 20:45:48 -0000
@@ -3,7 +3,7 @@
include/cairo/cairo-deprecated.h
include/cairo/cairo-features.h
include/cairo/cairo-ft.h
-include/cairo/cairo-glitz.h
+${GLITZ}include/cairo/cairo-glitz.h
include/cairo/cairo-pdf.h
include/cairo/cairo-ps.h
${CARBON}include/cairo/cairo-quartz.h
@@ -14,7 +14,7 @@
lib/libcairo.la
${CARBON}lib/pkgconfig/cairo-atsui.pc
lib/pkgconfig/cairo-ft.pc
-lib/pkgconfig/cairo-glitz.pc
+${GLITZ}lib/pkgconfig/cairo-glitz.pc
lib/pkgconfig/cairo-pdf.pc
lib/pkgconfig/cairo-png.pc
lib/pkgconfig/cairo-ps.pc
Index: graphics/cairo/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/buildlink3.mk,v
retrieving revision 1.26
diff -u -r1.26 buildlink3.mk
--- graphics/cairo/buildlink3.mk 30 May 2007 08:54:30 -0000 1.26
+++ graphics/cairo/buildlink3.mk 28 Oct 2007 20:45:48 -0000
@@ -30,7 +30,9 @@
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/glitz/buildlink3.mk"
+.if !empty(PKG_BUILD_OPTIONS.cairo:Mglitz)
+. include "../../graphics/glitz/buildlink3.mk"
+.endif
.include "../../graphics/png/buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
Index: graphics/cairo/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/options.mk,v
retrieving revision 1.2
diff -u -r1.2 options.mk
--- graphics/cairo/options.mk 6 Nov 2006 09:46:41 -0000 1.2
+++ graphics/cairo/options.mk 28 Oct 2007 20:45:48 -0000
@@ -1,8 +1,8 @@
# $NetBSD: options.mk,v 1.2 2006/11/06 09:46:41 joerg Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.cairo
-PKG_SUPPORTED_OPTIONS= x11
-PKG_SUGGESTED_OPTIONS= x11
+PKG_SUPPORTED_OPTIONS= x11 glitz
+PKG_SUGGESTED_OPTIONS= x11 glitz
.include "../../mk/bsd.options.mk"
@@ -21,3 +21,14 @@
CONFIGURE_ARGS+= --disable-xlib --disable-xlib-xrender
PLIST_SUBST+= X11="@comment "
.endif
+
+# glitz
+.if !empty(PKG_OPTIONS:Mglitz)
+BUILDLINK_API_DEPENDS.glitz+= glitz>=0.5.1
+.include "../../graphics/glitz/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-glitz
+PLIST_SUBST+= GLITZ=
+.else
+CONFIGURE_ARGS+= --disable-glitz
+PLIST_SUBST+= GLITZ="@comment "
+.endif
Index: mk/defaults/options.description
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defaults/options.description,v
retrieving revision 1.168
diff -u -r1.168 options.description
--- mk/defaults/options.description 28 Oct 2007 13:09:40 -0000 1.168
+++ mk/defaults/options.description 28 Oct 2007 20:46:09 -0000
@@ -89,6 +89,7 @@
ggi Enable GGI support.
gif Enable GIF support.
gimp1-helpbrowser Link against gnome1 to get a help browser.
+glitz Enable glitz backend.
gnutls Enable GNU TLS support.
gopher Enable support for the Gopher information system.
gpgme Enable gpg support, by using the gpgme library.
