diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index 1bc9dc1fe9a1..520140f46d36 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -1,96 +1,86 @@ # Created by: Michael Johnson PORTNAME= cairo DISTVERSION= 1.17.4 +PORTREVISION= 1 PORTEPOCH= 3 CATEGORIES= graphics MASTER_SITES= https://cairographics.org/releases/ \ https://cairographics.org/snapshots/ PATCH_SITES= https://gitlab.freedesktop.org/${PORTNAME}/${PORTNAME}/commit/ PATCHFILES= ebbaebdec12878836fc84d31c59ee324e67abc05.patch:-p1 # cairo-script-interpreter.pc MAINTAINER= desktop@FreeBSD.org COMMENT= Vector graphics library with cross-device output support LICENSE= LGPL21 MPL11 LICENSE_COMB= dual LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING-LGPL-2.1 LICENSE_FILE_MPL11= ${WRKSRC}/COPYING-MPL-1.1 LIB_DEPENDS= libfreetype.so:print/freetype2 \ libpng.so:graphics/png \ libfontconfig.so:x11-fonts/fontconfig PORTSCOUT= skipv:5c-1.1,5c-1.2,5c-1.5 -USES= autoreconf cpe gnome libtool pathfix pkgconfig tar:xz xorg +USES= autoreconf cpe gnome libtool pkgconfig tar:xz xorg CPE_VENDOR= cairographics USE_XORG= pixman USE_LDCONFIG= yes INSTALL_TARGET= install-strip GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-html-dir=${DOCSDIR} \ - --disable-directfb \ +CONFIGURE_ARGS= --disable-directfb \ --disable-gallium \ --disable-wgl \ --enable-tee OPTIONS_RADIO= GL OPTIONS_RADIO_GL= OPENGL GLESV2 OPTIONS_DEFINE= XCB GLIB X11 DOCS OPTIONS_DEFAULT=OPENGL XCB GLIB X11 OPTIONS_SLAVE= ${ARCH:tu} OPTIONS_SUB= yes +DOCS_BUILD_DEPENDS= gtkdocize:textproc/gtk-doc +DOCS_CONFIGURE_ON= --with-html-dir=${DOCSDIR} + X11_USES= xorg X11_USE= xorg=x11,xext,xorgproto,xrender X11_CONFIGURE_ENABLE=xlib X11_CONFIGURE_OFF=--disable-glx OPENGL_USES= gl OPENGL_USE= gl=egl OPENGL_CONFIGURE_ENABLE=gl egl GLESV2_USES= gl GLESV2_USE= gl=glesv2 GLESV2_DESC= Enable GLESv2 rendering GLESV2_CONFIGURE_ENABLE=glesv2 GLIB_DESC= Enable GObject Functions Feature GLIB_USES= gettext-runtime GLIB_USE= gnome=glib20 GLIB_CONFIGURE_ENABLE= gobject XCB_DESC= Enable XCB (X C-language Binding) Support XCB_USES= xorg XCB_USE= xorg=xcb XCB_CONFIGURE_ENABLE= xcb # this has another option --enable-xlib-xcb=auto but it is buggy. MIPS_BUILD_DEPENDS= ${LOCALBASE}/include/atomic_ops.h:devel/libatomic_ops MIPS_USES= localbase MIPS_CONFIGURE_ENV= cairo_cv_atomic_primitives="libatomic-ops" PLIST_SUB+= LIBVER=2.11704.0 -post-patch: - @${REINPLACE_CMD} -e '/strings/s/ - / -a /' \ - -e '/test/s/==/=/g' \ - -e '/LIBS/s/-lrt//' -e '/LIBS/s|-ldld||' \ - -e '/LIBS/s|-ldl||' \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|-lcairo|-lcairo -lpthread|' \ - ${WRKSRC}/src/*.pc.in - @${REINPLACE_CMD} -e '/@CAIRO_HAS_PNG_FUNCTIONS_TRUE@.*=/d' \ - ${WRKSRC}/Makefile.in - @${REINPLACE_CMD} -e 's|-ldl||g' \ - ${WRKSRC}/util/*/Makefile.in \ - ${WRKSRC}/boilerplate/Makefile.in - post-patch-DOCS-off: - @${REINPLACE_CMD} -e 's|public||g' \ - ${WRKSRC}/doc/Makefile.in + @${REINPLACE_CMD} '/^SUBDIRS/s/doc//' ${WRKSRC}/Makefile.am + @${REINPLACE_CMD} -e '/^GTK_DOC_CHECK/d' -e '/doc\/.*Makefile/d' \ + ${WRKSRC}/configure.ac .include diff --git a/graphics/cairo/files/patch-Makefile.am b/graphics/cairo/files/patch-Makefile.am new file mode 100644 index 000000000000..ce92235ec815 --- /dev/null +++ b/graphics/cairo/files/patch-Makefile.am @@ -0,0 +1,10 @@ +--- Makefile.am.orig 2020-11-26 23:20:59 UTC ++++ Makefile.am +@@ -20,7 +20,6 @@ if CAIRO_HAS_PNG_FUNCTIONS + SUBDIRS = src doc util + # libpng is required for our test programs + if CAIRO_HAS_PNG_FUNCTIONS +-SUBDIRS += boilerplate test perf + endif + + doc: diff --git a/graphics/cairo/files/patch-build_configure.ac.system b/graphics/cairo/files/patch-build_configure.ac.system new file mode 100644 index 000000000000..fbef9e951e1e --- /dev/null +++ b/graphics/cairo/files/patch-build_configure.ac.system @@ -0,0 +1,17 @@ +--- build/configure.ac.system.orig 2020-11-26 23:20:59 UTC ++++ build/configure.ac.system +@@ -53,11 +53,11 @@ LIBS="$LIBS $LIBM" + AC_CHECK_LIBM + LIBS="$LIBS $LIBM" + +-AC_CHECK_LIB(rt, sched_yield) ++AC_CHECK_LIB(c, sched_yield) + + has_shm_open= +-AC_CHECK_LIB(rt, shm_open, [ +- SHM_LIBS=-lrt ++AC_CHECK_LIB(c, shm_open, [ ++ SHM_LIBS= + has_shm_open=yes + ], [SHM_LIBS=]) + AM_CONDITIONAL(HAVE_SHM, test "x$has_shm_open" = "xyes") diff --git a/graphics/cairo/files/patch-configure.ac b/graphics/cairo/files/patch-configure.ac new file mode 100644 index 000000000000..43fdaa49a871 --- /dev/null +++ b/graphics/cairo/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2020-11-26 23:20:59 UTC ++++ configure.ac +@@ -842,7 +842,7 @@ save_LIBS="$LIBS" + AM_CONDITIONAL(BUILD_SPHINX, test "x$have_glib" = "xyes" -a "x$have_windows" = "xno" -a "x$have_png" = "xyes") + + save_LIBS="$LIBS" +-AC_CHECK_LIB(rt, shm_open, shm_LIBS="-lrt") ++AC_CHECK_LIB(c, shm_open, shm_LIBS="") + AC_SUBST(shm_LIBS) + LIBS="$save_LIBS" + diff --git a/graphics/cairo/files/patch-perf_cairo-perf-micro.c b/graphics/cairo/files/patch-perf_cairo-perf-micro.c deleted file mode 100644 index 5d5ba85905df..000000000000 --- a/graphics/cairo/files/patch-perf_cairo-perf-micro.c +++ /dev/null @@ -1,10 +0,0 @@ ---- perf/cairo-perf-micro.c.orig 2020-11-26 23:20:59 UTC -+++ perf/cairo-perf-micro.c -@@ -43,6 +43,7 @@ - #endif - - #ifdef HAVE_SCHED_H -+#define _WITH_CPU_SET_T - #include - #endif - diff --git a/graphics/cairo/files/patch-src_cairo-gl.h b/graphics/cairo/files/patch-src_cairo-gl.h deleted file mode 100644 index ab45af9bc00d..000000000000 --- a/graphics/cairo/files/patch-src_cairo-gl.h +++ /dev/null @@ -1,29 +0,0 @@ ---- 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); - --#if CAIRO_HAS_GLX_FUNCTIONS -+#if defined(CAIRO_HAS_GLX_FUNCTIONS) - #include - - cairo_public cairo_device_t * -@@ -110,7 +110,7 @@ cairo_gl_surface_create_for_window (cair - int width, int height); - #endif - --#if CAIRO_HAS_WGL_FUNCTIONS -+#if defined(CAIRO_HAS_WGL_FUNCTIONS) - #include - - cairo_public cairo_device_t * -@@ -126,7 +126,7 @@ cairo_gl_surface_create_for_dc (cairo_de - int height); - #endif - --#if CAIRO_HAS_EGL_FUNCTIONS -+#if defined(CAIRO_HAS_EGL_FUNCTIONS) - #include - - cairo_public cairo_device_t * diff --git a/graphics/cairo/files/patch-src_cairo-xlib-display.c b/graphics/cairo/files/patch-src_cairo-xlib-display.c deleted file mode 100644 index 2b31da881c26..000000000000 --- a/graphics/cairo/files/patch-src_cairo-xlib-display.c +++ /dev/null @@ -1,14 +0,0 @@ ---- 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. - */ --#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-test_Makefile.am b/graphics/cairo/files/patch-test_Makefile.am deleted file mode 100644 index 92c772be88b9..000000000000 --- a/graphics/cairo/files/patch-test_Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -https://gitlab.freedesktop.org/cairo/cairo/-/issues/101 - ---- test/Makefile.am.orig 2021-05-28 10:52:08 UTC -+++ test/Makefile.am -@@ -18,7 +18,9 @@ endif - endif - - if CAIRO_HAS_GL_SURFACE -+if CAIRO_HAS_GLX_FUNCTIONS - test_sources += $(gl_surface_test_sources) -+endif - endif - - if CAIRO_HAS_EGL_FUNCTIONS diff --git a/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c b/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c deleted file mode 100644 index 47825296f3da..000000000000 --- a/graphics/cairo/files/patch-util_cairo-sphinx_sphinx.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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, -- MAP_SHARED | MAP_NORESERVE, -+ MAP_SHARED, - fd, 0); - close (fd); -