summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2013-05-05 13:44:22 +0000
committerspz <spz@pkgsrc.org>2013-05-05 13:44:22 +0000
commit1233aaae208039cacd2fd93cc1802de73d81440f (patch)
tree400c41beb790daa868bbfdad8fd3f4ebda56dfcd /graphics
parentccb923b02efe1dafc3bbd0fabfaab14733f8edfe (diff)
downloadpkgsrc-1233aaae208039cacd2fd93cc1802de73d81440f.tar.gz
make it optionally build without x11
Diffstat (limited to 'graphics')
-rw-r--r--graphics/cairo-gobject/Makefile15
-rw-r--r--graphics/cairo-gobject/options.mk26
2 files changed, 29 insertions, 12 deletions
diff --git a/graphics/cairo-gobject/Makefile b/graphics/cairo-gobject/Makefile
index 57f2d756384..ca25a8d0f75 100644
--- a/graphics/cairo-gobject/Makefile
+++ b/graphics/cairo-gobject/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2013/02/16 11:18:06 wiz Exp $
+# $NetBSD: Makefile,v 1.24 2013/05/05 13:44:22 spz Exp $
DISTNAME= cairo-1.12.14
PKGNAME= ${DISTNAME:S/-/-gobject-/}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics
MASTER_SITES= http://cairographics.org/releases/
EXTRACT_SUFX= .tar.xz
@@ -28,16 +28,7 @@ CONFIGURE_ARGS+= --enable-ps
INSTALLATION_DIRS+= lib/pkgconfig
-.if exists(/System/Library/Frameworks/Carbon.framework)
-CONFIGURE_ARGS+= --enable-quartz
-CONFIGURE_ARGS+= --enable-quartz-font
-CONFIGURE_ARGS+= --enable-quartz-image
-CONFIGURE_ARGS+= --disable-gl
-CONFIGURE_ARGS+= --disable-xlib
-CONFIGURE_ARGS+= --disable-xlib-xrender
-.else
-CONFIGURE_ARGS+= --enable-gl
-.endif
+.include "options.mk"
# For snprintf() and ctime_r()
CPPFLAGS.SunOS+= -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
diff --git a/graphics/cairo-gobject/options.mk b/graphics/cairo-gobject/options.mk
new file mode 100644
index 00000000000..a03be2d7d09
--- /dev/null
+++ b/graphics/cairo-gobject/options.mk
@@ -0,0 +1,26 @@
+# $NetBSD: options.mk,v 1.1 2013/05/05 13:44:23 spz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cairo-gobject
+PKG_SUPPORTED_OPTIONS= x11
+PKG_SUGGESTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= x11
+
+###
+### decide between Quartz, GL or nothing
+###
+.if exists(/System/Library/Frameworks/Carbon.framework)
+CONFIGURE_ARGS+= --enable-quartz
+CONFIGURE_ARGS+= --enable-quartz-font
+CONFIGURE_ARGS+= --enable-quartz-image
+CONFIGURE_ARGS+= --disable-gl
+CONFIGURE_ARGS+= --disable-xlib
+CONFIGURE_ARGS+= --disable-xlib-xrender
+.else
+.if !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --enable-gl
+.endif
+.endif
+