Created attachment 158959 [details] cairo-fix-mips.diff The following patch disables atomic support on mips and makes portlint checks happy. # portlint -ac WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 1 warning found.
Created attachment 158963 [details] poudriere log
Created attachment 159441 [details] cairo failed build log graphics/cairo fails to build with atomic operations enabled.
(In reply to Carlos J Puga Medina from comment #2) It seems that cairo looks first for: return __sync_fetch_and_add __sync_val_compare_and_swap and defines it as cairo_cv_atomic_primitives="Intel". If the configure compile fails cairo is looking for libatomic_ops support.
This patch allows to build cairo port with atomic operations enabled: --- Makefile.orig 2015-08-02 05:25:43.503429000 +0200 +++ Makefile 2015-08-02 05:28:26.946450000 +0200 @@ -4,7 +4,7 @@ PORTNAME= cairo PORTVERSION= 1.12.18 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= graphics MASTER_SITES= http://cairographics.org/releases/ @@ -16,6 +16,7 @@ .if !defined(REFERENCE_PORT) +BUILD_DEPENDS= ${LOCALBASE}/include/atomic_ops.h:${PORTSDIR}/devel/libatomic_ops LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \ libpng.so:${PORTSDIR}/graphics/png \ libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig @@ -26,6 +27,10 @@ CONFIGURE_ARGS= --with-html-dir=${DOCSDIR} \ --disable-directfb \ --enable-tee +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} LDFLAGS="${LDFLAGS} \ + cairo_cv_atomic_primitives="libatomic-ops" USES+= cpe libtool pathfix pkgconfig CPE_VENDOR= cairographics USE_XORG= pixman
Created attachment 159451 [details] cairo with atomic operations enabled log
Comment on attachment 158959 [details] cairo-fix-mips.diff >diff -urN graphics/cairo.old/Makefile graphics/cairo/Makefile >--- graphics/cairo.old/Makefile 2015-07-19 03:20:21.000000000 +0200 >+++ graphics/cairo/Makefile 2015-07-19 03:22:06.000000000 +0200 >@@ -4,7 +4,7 @@ > > PORTNAME= cairo > PORTVERSION= 1.12.18 >-PORTREVISION= 1 >+PORTREVISION= 2 > PORTEPOCH= 2 > CATEGORIES= graphics > MASTER_SITES= http://cairographics.org/releases/ >@@ -12,11 +12,14 @@ > 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) > >-LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \ >+LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2 \ > libpng.so:${PORTSDIR}/graphics/png \ > libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig > >@@ -41,7 +44,7 @@ > --disable-egl \ > --enable-tee > >-OPTIONS_DEFINE= OPENGL XCB GLIB X11 >+OPTIONS_DEFINE= OPENGL XCB GLIB X11 > OPTIONS_DEFAULT=XCB GLIB X11 > XCB_DESC= Enable XCB (X C-language Binding) Support > GLIB_DESC= Enable GObject Functions Feature >@@ -61,6 +64,10 @@ > > .include <bsd.port.options.mk> > >+.if ${ARCH} == "mips" >+CONFIGURE_ARGS+= --disable-atomic >+.endif >+ > post-patch: > @${REINPLACE_CMD} -e '/test/s/==/=/g' \ > -e '/LIBS/s/-lrt//' -e '/LIBS/s|-ldld||' \ >@@ -77,7 +84,6 @@ > @${REINPLACE_CMD} 's|@CAIRO_CFLAGS@|-I$$(top_srcdir)/src/glew &|' \ > ${WRKSRC}/src/Makefile.in > .endif >+.endif > > .include <bsd.port.mk> >- >-.endif >diff -urN graphics/cairo.old/files/patch-src_cairo-xlib-display.c graphics/cairo/files/patch-src_cairo-xlib-display.c >--- graphics/cairo.old/files/patch-src_cairo-xlib-display.c 2015-07-19 03:20:21.000000000 +0200 >+++ graphics/cairo/files/patch-src_cairo-xlib-display.c 2015-07-18 21:45:05.000000000 +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 2014-11-06 21:35:30 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. > */ >diff -urN graphics/cairo.old/files/patch-util_cairo-sphinx_sphinx.c graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c >--- graphics/cairo.old/files/patch-util_cairo-sphinx_sphinx.c 2015-07-19 03:20:21.000000000 +0200 >+++ graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c 2015-07-18 21:45:05.000000000 +0200 >@@ -1,5 +1,5 @@ >---- 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 >+--- util/cairo-sphinx/sphinx.c.orig 2014-11-06 21:35:30 UTC >++++ util/cairo-sphinx/sphinx.c > @@ -1325,7 +1325,7 @@ client_shm (const char *shm_path) > > base = mmap (NULL, DATA_SIZE, >diff -urN graphics/cairo.old/pkg-descr graphics/cairo/pkg-descr >--- graphics/cairo.old/pkg-descr 2015-07-19 03:20:21.000000000 +0200 >+++ graphics/cairo/pkg-descr 2015-07-18 21:47:24.000000000 +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
Created attachment 159673 [details] cairo-fix-mips.diff
The last patch is better in this case. Testing@work via poudriere
Created attachment 159713 [details] cairo-fix-mips.diff
Created attachment 159714 [details] cairo with atomic operations enabled log
Please, can someone commit this patch?
A commit references this bug: Author: sbruno Date: Mon Nov 9 14:59:37 UTC 2015 New revision: 401102 URL: https://svnweb.freebsd.org/changeset/ports/401102 Log: Update port Makefile to support mips build of cairo. Add License Information PR: 201683 Submitted by: Carlos J Puga Medina <cpm@fbsd.es> Changes: head/graphics/cairo/Makefile head/graphics/cairo/files/patch-src_cairo-gl.h head/graphics/cairo/files/patch-src_cairo-xlib-display.c head/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c head/graphics/cairo/pkg-descr
Done and done. A little follow up from antoine was required to unbreak index on 9. https://svnweb.freebsd.org/ports?view=revision&revision=401103