--- /usr/ports/graphics/cairo/Makefile 2015-08-06 09:50:29.000000000 +0200 +++ /usr/ports/graphics/cairo/Makefile 2015-08-08 21:59:16.764294000 +0200 @@ -3,6 +3,7 @@ PORTNAME= cairo PORTVERSION= 1.14.2 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= graphics MASTER_SITES= http://cairographics.org/releases/ @@ -10,6 +11,9 @@ MAINTAINER= gnome@FreeBSD.org COMMENT= Vector graphics library with cross-device output support +LICENSE= LGPL21 MPL +LICENSE_COMB= multi + USES= tar:xz .if !defined(REFERENCE_PORT) @@ -58,6 +62,10 @@ .include +.if ${ARCH} == "mips" +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-src_cairo-atomic-private.h +.endif + .if ${PORT_OPTIONS:MOPENGL} && !${PORT_OPTIONS:MX11} BROKEN= OpenGL option needs X11 support .endif @@ -76,6 +84,6 @@ ${WRKSRC}/util/*/Makefile.in \ ${WRKSRC}/boilerplate/Makefile.in -.include - .endif + +.include --- /usr/ports/graphics/cairo/files/extrapatch-src_cairo-atomic-private.h 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/graphics/cairo/files/extrapatch-src_cairo-atomic-private.h 2015-08-08 22:13:56.753341000 +0200 @@ -0,0 +1,37 @@ +--- src/cairo-atomic-private.h.orig 2015-08-08 19:59:56 UTC ++++ src/cairo-atomic-private.h +@@ -81,8 +81,14 @@ _cairo_atomic_ptr_get (void **x) + # define _cairo_atomic_int_inc(x) ((void) __sync_fetch_and_add(x, 1)) + # define _cairo_atomic_int_dec(x) ((void) __sync_fetch_and_add(x, -1)) + # define _cairo_atomic_int_dec_and_test(x) (__sync_fetch_and_add(x, -1) == 1) ++#if defined(__FreeBSD__) ++#include ++# define _cairo_atomic_int_cmpxchg(x, oldv, newv) atomic_cmpset_rel_32 ((uint32_t *)x, (uint32_t)oldv, (uint32_t)newv) ++# define _cairo_atomic_int_cmpxchg_return_old(x, oldv, newv) atomic_cmpset_rel_32 ((uint32_t *)x, (uint32_t)oldv, (uint32_t)newv) ++#else + # define _cairo_atomic_int_cmpxchg(x, oldv, newv) __sync_bool_compare_and_swap (x, oldv, newv) + # define _cairo_atomic_int_cmpxchg_return_old(x, oldv, newv) __sync_val_compare_and_swap (x, oldv, newv) ++#endif + + #if SIZEOF_VOID_P==SIZEOF_INT + typedef int cairo_atomic_intptr_t; +@@ -94,12 +100,19 @@ typedef long long cairo_atomic_intptr_t; + #error No matching integer pointer type + #endif + ++#if defined(__FreeBSD__) ++# define _cairo_atomic_ptr_cmpxchg(x, oldv, newv) \ ++ atomic_cmpset_rel_64 ((uint64_t *)x, (uint64_t)oldv, (uint64_t)newv) ++# define _cairo_atomic_ptr_cmpxchg_return_old(x, oldv, newv) \ ++ _cairo_atomic_intptr_to_voidptr (atomic_cmpset_rel_64 ((uint64_t *)x, (uint64_t)oldv, (uint64_t)newv)) ++#else + # define _cairo_atomic_ptr_cmpxchg(x, oldv, newv) \ + __sync_bool_compare_and_swap ((cairo_atomic_intptr_t*)x, (cairo_atomic_intptr_t)oldv, (cairo_atomic_intptr_t)newv) + + # define _cairo_atomic_ptr_cmpxchg_return_old(x, oldv, newv) \ + _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)) + ++#endif /* __FreeBSD__ */ + #endif + + #if HAVE_LIB_ATOMIC_OPS --- /usr/ports/graphics/cairo/files/patch-src_cairo-gl.h 2015-08-05 21:13:24.000000000 +0200 +++ /usr/ports/graphics/cairo/files/patch-src_cairo-gl.h 2015-08-08 22:13:56.767297000 +0200 @@ -1,6 +1,6 @@ ---- src/cairo-gl.h.orig 2013-03-15 21:29:27.000000000 +0100 -+++ src/cairo-gl.h 2015-01-05 10:30:46.611768380 +0100 -@@ -92,7 +92,7 @@ +--- src/cairo-gl.h.orig 2015-03-10 22:21:07 UTC ++++ src/cairo-gl.h +@@ -92,7 +92,7 @@ cairo_public void cairo_gl_device_set_thread_aware (cairo_device_t *device, cairo_bool_t thread_aware); @@ -9,7 +9,7 @@ #include cairo_public cairo_device_t * -@@ -110,7 +110,7 @@ +@@ -110,7 +110,7 @@ cairo_gl_surface_create_for_window (cair int width, int height); #endif @@ -18,7 +18,7 @@ #include cairo_public cairo_device_t * -@@ -126,7 +126,7 @@ +@@ -126,7 +126,7 @@ cairo_gl_surface_create_for_dc (cairo_de int height); #endif --- /usr/ports/graphics/cairo/files/patch-src_cairo-xlib-display.c 2014-01-22 18:40:44.000000000 +0100 +++ /usr/ports/graphics/cairo/files/patch-src_cairo-xlib-display.c 2015-08-08 22:13:56.780492000 +0200 @@ -1,6 +1,6 @@ ---- 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) +--- src/cairo-xlib-display.c.orig 2015-03-10 22:21:07 UTC ++++ src/cairo-xlib-display.c +@@ -263,11 +263,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. */ --- /usr/ports/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c 2014-10-18 14:20:42.000000000 +0200 +++ /usr/ports/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c 2015-08-08 22:13:56.802550000 +0200 @@ -1,6 +1,6 @@ ---- util/cairo-sphinx/sphinx.c.orig 2014-10-06 15:22:24.000000000 -0400 -+++ util/cairo-sphinx/sphinx.c 2014-10-06 15:23:04.000000000 -0400 -@@ -1325,7 +1325,7 @@ client_shm (const char *shm_path) +--- util/cairo-sphinx/sphinx.c.orig 2015-03-10 22:21:07 UTC ++++ util/cairo-sphinx/sphinx.c +@@ -1337,7 +1337,7 @@ client_shm (const char *shm_path) base = mmap (NULL, DATA_SIZE, PROT_READ | PROT_WRITE, --- /usr/ports/graphics/cairo/pkg-descr 2014-01-22 16:44:51.000000000 +0100 +++ /usr/ports/graphics/cairo/pkg-descr 2015-08-08 21:48:14.865644000 +0200 @@ -10,4 +10,4 @@ and filling Bezier cubic splines, transforming and compositing translucent images, and antialiased text rendering. -WWW: http://www.cairographics.org +WWW: http://www.cairographics.org