summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/cairo/Makefile87
-rw-r--r--graphics/cairo/distinfo2
-rw-r--r--graphics/cairo/files/patch-src_cairo-wideint-type-private.h14
-rw-r--r--graphics/cairo/files/patch-src_cairo-xlib-display.c14
-rw-r--r--graphics/cairo/files/patch-src_cairoint.h14
-rw-r--r--graphics/cairo/pkg-descr13
-rw-r--r--graphics/cairo/pkg-plist48
7 files changed, 192 insertions, 0 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile
new file mode 100644
index 000000000..25cdfd537
--- /dev/null
+++ b/graphics/cairo/Makefile
@@ -0,0 +1,87 @@
+# New ports collection makefile for: cairo
+# Date created: 2004-10-06
+# Whom: Michael Johnson <ahze@FreeBSD.org>
+#
+# $FreeBSD$
+# $MCom: ports/graphics/cairo/Makefile,v 1.101 2010/10/29 15:40:04 kwm Exp $
+#
+
+PORTNAME= cairo
+PORTVERSION= 1.10.2
+PORTREVISION= 0
+PORTEPOCH?= 1
+CATEGORIES= graphics
+MASTER_SITES= http://cairographics.org/releases/
+#MASTER_SITES= http://cairographics.org/snapshots/
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= Vector graphics library with cross-device output support
+
+.if !defined(REFERENCE_PORT)
+
+LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \
+ png.6:${PORTSDIR}/graphics/png \
+ fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig \
+ pixman-1.9:${PORTSDIR}/x11/pixman
+
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS= --with-html-dir=${DOCSDIR} \
+ --disable-directfb \
+ --enable-gobject
+USE_GNOME= glib20 gnomehack ltverhack referencehack
+USE_AUTOTOOLS= libtool
+USE_LDCONFIG= yes
+
+CPPFLAGS+= ${PTHREAD_CFLAGS}
+LDFLAGS+= ${PTHREAD_LIBS}
+
+.if defined(WITHOUT_X11)
+CONFIGURE_ARGS+=--disable-xlib
+PLIST_SUB+= X11="@comment "
+.else
+USE_XORG+= xrender
+PLIST_SUB+= X11=""
+.endif
+
+OPTIONS+= GL "Enable OpenGL Support" Off \
+ XCB "Enable XCB (X C-language Binding) Support" On
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GL)
+USE_GL= gl
+CONFIGURE_ARGS+= --enable-gl
+PLIST_SUB+= GL=""
+.else
+CONFIGURE_ARGS+= --disable-gl
+PLIST_SUB+= GL="@comment "
+.endif
+
+.if defined(WITH_XCB)
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb-renderutil.pc:${PORTSDIR}/x11/xcb-util
+RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb-renderutil.pc:${PORTSDIR}/x11/xcb-util
+CONFIGURE_ARGS+= --enable-xcb
+# this option exposes a bug --enable-xlib-xcb=auto
+PLIST_SUB+= XCB=""
+.else
+CONFIGURE_ARGS+= --disable-xcb
+PLIST_SUB+= XCB="@comment "
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e '/test/s/==/=/g' \
+ -e '/LIBS/s/-lrt//' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|-lcairo|-lcairo ${PTHREAD_LIBS}|' \
+ ${WRKSRC}/src/*.pc.in
+ @${REINPLACE_CMD} -e '/@CAIRO_HAS_PNG_FUNCTIONS_TRUE@.*=/d' \
+ ${WRKSRC}/Makefile.in
+.if defined(WITH_GL)
+ @${REINPLACE_CMD} 's|@CAIRO_CFLAGS@|-I$$(top_srcdir)/src/glew &|' \
+ ${WRKSRC}/src/Makefile.in
+.endif
+
+.include <bsd.port.post.mk>
+
+.endif
diff --git a/graphics/cairo/distinfo b/graphics/cairo/distinfo
new file mode 100644
index 000000000..695495df3
--- /dev/null
+++ b/graphics/cairo/distinfo
@@ -0,0 +1,2 @@
+SHA256 (cairo-1.10.2.tar.gz) = 32018c7998358eebc2ad578ff8d8559d34fc80252095f110a572ed23d989fc41
+SIZE (cairo-1.10.2.tar.gz) = 23558405
diff --git a/graphics/cairo/files/patch-src_cairo-wideint-type-private.h b/graphics/cairo/files/patch-src_cairo-wideint-type-private.h
new file mode 100644
index 000000000..00f10fb6a
--- /dev/null
+++ b/graphics/cairo/files/patch-src_cairo-wideint-type-private.h
@@ -0,0 +1,14 @@
+--- src/cairo-wideint-type-private.h.orig 2010-11-26 02:41:47.000000000 -0500
++++ src/cairo-wideint-type-private.h 2010-11-26 02:42:07.000000000 -0500
+@@ -121,6 +121,11 @@ typedef struct _cairo_quorem64 {
+ cairo_int64_t rem;
+ } cairo_quorem64_t;
+
++/* Intrinsic __uint128_t support is broken on gcc 3.4/sparc. */
++#if __GNUC__ == 3 && __GNUC_MINOR__ == 4
++#undef HAVE___UINT128_T
++#endif
++
+ /* gcc has a non-standard name. */
+ #if HAVE___UINT128_T && !HAVE_UINT128_T
+ typedef __uint128_t uint128_t;
diff --git a/graphics/cairo/files/patch-src_cairo-xlib-display.c b/graphics/cairo/files/patch-src_cairo-xlib-display.c
new file mode 100644
index 000000000..fce8103ad
--- /dev/null
+++ b/graphics/cairo/files/patch-src_cairo-xlib-display.c
@@ -0,0 +1,14 @@
+--- src/cairo-xlib-display.c.orig 2010-11-21 14:41:31.000000000 -0500
++++ src/cairo-xlib-display.c 2010-11-21 14:42:12.000000000 -0500
+@@ -353,11 +353,7 @@ _cairo_xlib_device_create (Display *dpy)
+ /* Prior to Render 0.10, there is no protocol support for gradients and
+ * we call function stubs instead, which would silently consume the drawing.
+ */
+-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
+ display->buggy_gradients = TRUE;
+-#else
+- display->buggy_gradients = FALSE;
+-#endif
+ display->buggy_pad_reflect = FALSE;
+ display->buggy_repeat = FALSE;
+
diff --git a/graphics/cairo/files/patch-src_cairoint.h b/graphics/cairo/files/patch-src_cairoint.h
new file mode 100644
index 000000000..a9b3ce480
--- /dev/null
+++ b/graphics/cairo/files/patch-src_cairoint.h
@@ -0,0 +1,14 @@
+--- src/cairoint.h.orig Sun Oct 15 18:02:35 2006
++++ src/cairoint.h Sun Oct 15 18:10:11 2006
+@@ -50,6 +50,11 @@
+ #include "config.h"
+ #endif
+
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#define INT16_MIN (-0x7fff-1)
++#endif
++
+ #include <assert.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/graphics/cairo/pkg-descr b/graphics/cairo/pkg-descr
new file mode 100644
index 000000000..4fd137a19
--- /dev/null
+++ b/graphics/cairo/pkg-descr
@@ -0,0 +1,13 @@
+Cairo is a vector graphics library with cross-device output
+support. Currently supported output targets include the X Window
+System and in-memory image buffers. PostScript and PDF file output is
+planned. Cairo is designed to produce identical output on all output
+media while taking advantage of display hardware acceleration when
+available (eg. through the X Render Extension).
+
+Cairo provides a stateful user-level API with capabilities similar to
+the PDF 1.4 imaging model. Cairo provides operations including stroking
+and filling Bezier cubic splines, transforming and compositing translucent
+images, and antialiased text rendering.
+
+WWW: http://www.cairographics.org
diff --git a/graphics/cairo/pkg-plist b/graphics/cairo/pkg-plist
new file mode 100644
index 000000000..9271bf93e
--- /dev/null
+++ b/graphics/cairo/pkg-plist
@@ -0,0 +1,48 @@
+bin/cairo-trace
+include/cairo/cairo-deprecated.h
+include/cairo/cairo-features.h
+include/cairo/cairo-ft.h
+%%GL%%include/cairo/cairo-gl.h
+include/cairo/cairo-gobject.h
+include/cairo/cairo-pdf.h
+include/cairo/cairo-ps.h
+include/cairo/cairo-script-interpreter.h
+include/cairo/cairo-svg.h
+include/cairo/cairo-version.h
+%%XCB%%include/cairo/cairo-xcb.h
+%%X11%%include/cairo/cairo-xlib-xrender.h
+%%X11%%include/cairo/cairo-xlib.h
+include/cairo/cairo.h
+lib/cairo/libcairo-trace.a
+lib/cairo/libcairo-trace.la
+lib/cairo/libcairo-trace.so
+lib/cairo/libcairo-trace.so.0
+lib/libcairo-gobject.a
+lib/libcairo-gobject.la
+lib/libcairo-gobject.so
+lib/libcairo-gobject.so.2
+lib/libcairo-script-interpreter.a
+lib/libcairo-script-interpreter.la
+lib/libcairo-script-interpreter.so
+lib/libcairo-script-interpreter.so.2
+lib/libcairo.a
+lib/libcairo.la
+lib/libcairo.so
+lib/libcairo.so.2
+libdata/pkgconfig/cairo.pc
+libdata/pkgconfig/cairo-fc.pc
+libdata/pkgconfig/cairo-ft.pc
+%%GL%%libdata/pkgconfig/cairo-gl.pc
+%%GL%%libdata/pkgconfig/cairo-glx.pc
+libdata/pkgconfig/cairo-gobject.pc
+libdata/pkgconfig/cairo-pdf.pc
+libdata/pkgconfig/cairo-png.pc
+libdata/pkgconfig/cairo-ps.pc
+libdata/pkgconfig/cairo-svg.pc
+%%XCB%%libdata/pkgconfig/cairo-xcb.pc
+%%XCB%%libdata/pkgconfig/cairo-xcb-shm.pc
+%%X11%%libdata/pkgconfig/cairo-xlib.pc
+@comment %%X11%%%%XCB%%libdata/pkgconfig/cairo-xlib-xcb.pc
+%%X11%%libdata/pkgconfig/cairo-xlib-xrender.pc
+@dirrm include/cairo
+@dirrm lib/cairo