View | Details | Raw Unified | Return to bug 201683 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/ports/graphics/cairo/Makefile (-2 / +10 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	cairo
4
PORTNAME=	cairo
5
PORTVERSION=	1.14.2
5
PORTVERSION=	1.14.2
6
PORTREVISION=	1
6
PORTEPOCH=	2
7
PORTEPOCH=	2
7
CATEGORIES=	graphics
8
CATEGORIES=	graphics
8
MASTER_SITES=	http://cairographics.org/releases/
9
MASTER_SITES=	http://cairographics.org/releases/
Lines 10-15 Link Here
10
MAINTAINER=	gnome@FreeBSD.org
11
MAINTAINER=	gnome@FreeBSD.org
11
COMMENT=	Vector graphics library with cross-device output support
12
COMMENT=	Vector graphics library with cross-device output support
12
13
14
LICENSE=	LGPL21 MPL
15
LICENSE_COMB=	multi
16
13
USES=		tar:xz
17
USES=		tar:xz
14
18
15
.if !defined(REFERENCE_PORT)
19
.if !defined(REFERENCE_PORT)
Lines 58-63 Link Here
58
62
59
.include <bsd.port.options.mk>
63
.include <bsd.port.options.mk>
60
64
65
.if ${ARCH} == "mips"
66
EXTRA_PATCHES+=	${FILESDIR}/extrapatch-src_cairo-atomic-private.h
67
.endif
68
61
.if ${PORT_OPTIONS:MOPENGL} && !${PORT_OPTIONS:MX11}
69
.if ${PORT_OPTIONS:MOPENGL} && !${PORT_OPTIONS:MX11}
62
BROKEN=	OpenGL option needs X11 support
70
BROKEN=	OpenGL option needs X11 support
63
.endif
71
.endif
Lines 76-81 Link Here
76
		${WRKSRC}/util/*/Makefile.in \
84
		${WRKSRC}/util/*/Makefile.in \
77
		${WRKSRC}/boilerplate/Makefile.in
85
		${WRKSRC}/boilerplate/Makefile.in
78
86
79
.include <bsd.port.mk>
80
81
.endif
87
.endif
88
89
.include <bsd.port.mk>
(-)/usr/ports/graphics/cairo/files/extrapatch-src_cairo-atomic-private.h (+37 lines)
Line 0 Link Here
1
--- src/cairo-atomic-private.h.orig	2015-08-08 19:59:56 UTC
2
+++ src/cairo-atomic-private.h
3
@@ -81,8 +81,14 @@ _cairo_atomic_ptr_get (void **x)
4
 # define _cairo_atomic_int_inc(x) ((void) __sync_fetch_and_add(x, 1))
5
 # define _cairo_atomic_int_dec(x) ((void) __sync_fetch_and_add(x, -1))
6
 # define _cairo_atomic_int_dec_and_test(x) (__sync_fetch_and_add(x, -1) == 1)
7
+#if defined(__FreeBSD__)
8
+#include <machine/atomic.h>
9
+# define _cairo_atomic_int_cmpxchg(x, oldv, newv) atomic_cmpset_rel_32 ((uint32_t *)x, (uint32_t)oldv, (uint32_t)newv)
10
+# define _cairo_atomic_int_cmpxchg_return_old(x, oldv, newv) atomic_cmpset_rel_32 ((uint32_t *)x, (uint32_t)oldv, (uint32_t)newv)
11
+#else
12
 # define _cairo_atomic_int_cmpxchg(x, oldv, newv) __sync_bool_compare_and_swap (x, oldv, newv)
13
 # define _cairo_atomic_int_cmpxchg_return_old(x, oldv, newv) __sync_val_compare_and_swap (x, oldv, newv)
14
+#endif
15
 
16
 #if SIZEOF_VOID_P==SIZEOF_INT
17
 typedef int cairo_atomic_intptr_t;
18
@@ -94,12 +100,19 @@ typedef long long cairo_atomic_intptr_t;
19
 #error No matching integer pointer type
20
 #endif
21
 
22
+#if defined(__FreeBSD__)
23
+# define _cairo_atomic_ptr_cmpxchg(x, oldv, newv) \
24
+    atomic_cmpset_rel_64 ((uint64_t *)x, (uint64_t)oldv, (uint64_t)newv)
25
+# define _cairo_atomic_ptr_cmpxchg_return_old(x, oldv, newv) \
26
+    _cairo_atomic_intptr_to_voidptr (atomic_cmpset_rel_64 ((uint64_t *)x, (uint64_t)oldv, (uint64_t)newv))
27
+#else
28
 # define _cairo_atomic_ptr_cmpxchg(x, oldv, newv) \
29
     __sync_bool_compare_and_swap ((cairo_atomic_intptr_t*)x, (cairo_atomic_intptr_t)oldv, (cairo_atomic_intptr_t)newv)
30
 
31
 # define _cairo_atomic_ptr_cmpxchg_return_old(x, oldv, newv) \
32
     _cairo_atomic_intptr_to_voidptr (__sync_val_compare_and_swap ((cairo_atomic_intptr_t*)x, (cairo_atomic_intptr_t)oldv, (cairo_atomic_intptr_t)newv))
33
 
34
+#endif /* __FreeBSD__ */
35
 #endif
36
 
37
 #if HAVE_LIB_ATOMIC_OPS
(-)/usr/ports/graphics/cairo/files/patch-src_cairo-gl.h (-5 / +5 lines)
Lines 1-6 Link Here
1
--- src/cairo-gl.h.orig	2013-03-15 21:29:27.000000000 +0100
1
--- src/cairo-gl.h.orig	2015-03-10 22:21:07 UTC
2
+++ src/cairo-gl.h	2015-01-05 10:30:46.611768380 +0100
2
+++ src/cairo-gl.h
3
@@ -92,7 +92,7 @@
3
@@ -92,7 +92,7 @@ cairo_public void
4
 cairo_gl_device_set_thread_aware (cairo_device_t	*device,
4
 cairo_gl_device_set_thread_aware (cairo_device_t	*device,
5
 				  cairo_bool_t		 thread_aware);
5
 				  cairo_bool_t		 thread_aware);
6
 
6
 
Lines 9-15 Link Here
9
 #include <GL/glx.h>
9
 #include <GL/glx.h>
10
 
10
 
11
 cairo_public cairo_device_t *
11
 cairo_public cairo_device_t *
12
@@ -110,7 +110,7 @@
12
@@ -110,7 +110,7 @@ cairo_gl_surface_create_for_window (cair
13
 				    int width, int height);
13
 				    int width, int height);
14
 #endif
14
 #endif
15
 
15
 
Lines 18-24 Link Here
18
 #include <windows.h>
18
 #include <windows.h>
19
 
19
 
20
 cairo_public cairo_device_t *
20
 cairo_public cairo_device_t *
21
@@ -126,7 +126,7 @@
21
@@ -126,7 +126,7 @@ cairo_gl_surface_create_for_dc (cairo_de
22
 				int			 height);
22
 				int			 height);
23
 #endif
23
 #endif
24
 
24
 
(-)/usr/ports/graphics/cairo/files/patch-src_cairo-xlib-display.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- src/cairo-xlib-display.c.orig	2010-11-21 14:41:31.000000000 -0500
1
--- src/cairo-xlib-display.c.orig	2015-03-10 22:21:07 UTC
2
+++ src/cairo-xlib-display.c	2010-11-21 14:42:12.000000000 -0500
2
+++ src/cairo-xlib-display.c
3
@@ -353,11 +353,7 @@ _cairo_xlib_device_create (Display *dpy)
3
@@ -263,11 +263,7 @@ _cairo_xlib_device_create (Display *dpy)
4
     /* Prior to Render 0.10, there is no protocol support for gradients and
4
     /* Prior to Render 0.10, there is no protocol support for gradients and
5
      * we call function stubs instead, which would silently consume the drawing.
5
      * we call function stubs instead, which would silently consume the drawing.
6
      */
6
      */
(-)/usr/ports/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- util/cairo-sphinx/sphinx.c.orig	2014-10-06 15:22:24.000000000 -0400
1
--- util/cairo-sphinx/sphinx.c.orig	2015-03-10 22:21:07 UTC
2
+++ util/cairo-sphinx/sphinx.c	2014-10-06 15:23:04.000000000 -0400
2
+++ util/cairo-sphinx/sphinx.c
3
@@ -1325,7 +1325,7 @@ client_shm (const char *shm_path)
3
@@ -1337,7 +1337,7 @@ client_shm (const char *shm_path)
4
 
4
 
5
     base = mmap (NULL, DATA_SIZE,
5
     base = mmap (NULL, DATA_SIZE,
6
 		 PROT_READ | PROT_WRITE,
6
 		 PROT_READ | PROT_WRITE,
(-)/usr/ports/graphics/cairo/pkg-descr (-1 / +1 lines)
Lines 10-13 Link Here
10
and filling Bezier cubic splines, transforming and compositing translucent
10
and filling Bezier cubic splines, transforming and compositing translucent
11
images, and antialiased text rendering.
11
images, and antialiased text rendering.
12
12
13
WWW:	http://www.cairographics.org
13
WWW: http://www.cairographics.org

Return to bug 201683