pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/cairo Bring back previous patch in correct ve...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b8afb0fdcdfb
branches:  trunk
changeset: 610625:b8afb0fdcdfb
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Nov 01 08:54:46 2012 +0000

description:
Bring back previous patch in correct version to fix SHM part of
build on NetBSD-5 with native Xorg.

Additionally, disable GL support since NetBSD-5's MesaLib is too old and,
according to upstream, cairo-gl "is only really being experimented
with currently by toy applications".

Bump PKGREVISION.

Tested by Andreas Gustafsson and David Brownlee.

diffstat:

 graphics/cairo/Makefile                                   |    4 +-
 graphics/cairo/PLIST                                      |    5 +-
 graphics/cairo/distinfo                                   |    6 +-
 graphics/cairo/options.mk                                 |    6 +-
 graphics/cairo/patches/patch-config.h.in                  |   22 ++
 graphics/cairo/patches/patch-configure                    |   29 +++
 graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c |  130 +++++++++++++-
 7 files changed, 190 insertions(+), 12 deletions(-)

diffs (279 lines):

diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/Makefile
--- a/graphics/cairo/Makefile   Thu Nov 01 04:09:24 2012 +0000
+++ b/graphics/cairo/Makefile   Thu Nov 01 08:54:46 2012 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.118 2012/10/31 13:06:22 wiz Exp $
+# $NetBSD: Makefile,v 1.119 2012/11/01 08:54:46 wiz Exp $
 
 DISTNAME=      cairo-1.12.6
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    graphics
 MASTER_SITES=  http://cairographics.org/releases/
 EXTRACT_SUFX=  .tar.xz
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/PLIST
--- a/graphics/cairo/PLIST      Thu Nov 01 04:09:24 2012 +0000
+++ b/graphics/cairo/PLIST      Thu Nov 01 08:54:46 2012 +0000
@@ -1,9 +1,8 @@
-@comment $NetBSD: PLIST,v 1.32 2012/09/07 15:24:03 adam Exp $
+@comment $NetBSD: PLIST,v 1.33 2012/11/01 08:54:46 wiz Exp $
 bin/cairo-trace
 include/cairo/cairo-deprecated.h
 include/cairo/cairo-features.h
 include/cairo/cairo-ft.h
-${PLIST.x11}include/cairo/cairo-gl.h
 include/cairo/cairo-pdf.h
 include/cairo/cairo-ps.h
 ${PLIST.carbon}include/cairo/cairo-quartz.h
@@ -23,8 +22,6 @@
 lib/libcairo.la
 lib/pkgconfig/cairo-fc.pc
 lib/pkgconfig/cairo-ft.pc
-${PLIST.x11}lib/pkgconfig/cairo-gl.pc
-${PLIST.x11}lib/pkgconfig/cairo-glx.pc
 lib/pkgconfig/cairo-pdf.pc
 lib/pkgconfig/cairo-png.pc
 lib/pkgconfig/cairo-ps.pc
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/distinfo
--- a/graphics/cairo/distinfo   Thu Nov 01 04:09:24 2012 +0000
+++ b/graphics/cairo/distinfo   Thu Nov 01 08:54:46 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.69 2012/10/31 13:06:22 wiz Exp $
+$NetBSD: distinfo,v 1.70 2012/11/01 08:54:46 wiz Exp $
 
 SHA1 (cairo-1.12.6.tar.xz) = a383c6cb4495e18848ea43e1031c294aa9417a43
 RMD160 (cairo-1.12.6.tar.xz) = 78d3cc6200bd3f5a288843a6b360f44d7756fa2e
@@ -7,4 +7,6 @@
 SHA1 (patch-ab) = 62ff361d52742bba0f49c6a32149269b958fa24a
 SHA1 (patch-ac) = 151c682245004902cf42ba141e3743592691dfb9
 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530
-SHA1 (patch-src_cairo-xlib-surface-shm.c) = 76ae8b94319e7ca7c0bf7f14e53512684f386778
+SHA1 (patch-config.h.in) = 321b76320810d58ba810fd99232b77671880066a
+SHA1 (patch-configure) = a3fc6d897bf6103b6bbdf79c6a57dc27d96dac8e
+SHA1 (patch-src_cairo-xlib-surface-shm.c) = 7cac06cf0af9b38e5ddce345165dd6c4dcdb8fc2
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/options.mk
--- a/graphics/cairo/options.mk Thu Nov 01 04:09:24 2012 +0000
+++ b/graphics/cairo/options.mk Thu Nov 01 08:54:46 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.11 2012/10/20 00:55:06 wiz Exp $
+# $NetBSD: options.mk,v 1.12 2012/11/01 08:54:46 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.cairo
 PKG_SUPPORTED_OPTIONS= x11 xcb
@@ -14,7 +14,9 @@
 .if !empty(PKG_OPTIONS:Mx11) || !empty(PKG_OPTIONS:Mxcb)
 CONFIGURE_ARGS+=       --enable-xlib
 CONFIGURE_ARGS+=       --enable-xlib-xrender
-PLIST.gl=              yes
+# does not build against NetBSD-5's MesaLib, and is according
+# to upstream, only used by "toy applications"
+CONFIGURE_ARGS+=       --disable-gl
 PLIST.x11=             yes
 .include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/patches/patch-config.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-config.h.in  Thu Nov 01 08:54:46 2012 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-config.h.in,v 1.1 2012/11/01 08:54:47 wiz Exp $
+
+Detect old-style shm headers. From upstream.
+
+--- config.h.in.orig   2012-10-22 12:09:27.000000000 +0200
++++ config.h.in        2012-10-31 14:29:24.000000000 +0100
+@@ -255,6 +255,15 @@
+ /* Define to 1 if you have the <windows.h> header file. */
+ #undef HAVE_WINDOWS_H
+ 
++/* Define to 1 if you have the <X11/extensions/shmproto.h> header file. */
++#undef HAVE_X11_EXTENSIONS_SHMPROTO_H
++
++/* Define to 1 if you have the <X11/extensions/shmstr.h> header file. */
++#undef HAVE_X11_EXTENSIONS_SHMSTR_H
++
++/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
++#undef HAVE_X11_EXTENSIONS_XSHM_H
++
+ /* Define to 1 if you have the `XRenderCreateConicalGradient' function. */
+ #undef HAVE_XRENDERCREATECONICALGRADIENT
+ 
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-configure    Thu Nov 01 08:54:46 2012 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-configure,v 1.5 2012/11/01 08:54:47 wiz Exp $
+
+Detect old-style shm headers. From upstream.
+
+--- configure.orig     2012-10-22 10:08:43.000000000 +0000
++++ configure
+@@ -21799,6 +21799,22 @@ fi
+ 
+       fi
+ 
++      for ac_header in X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <X11/Xlibint.h>
++                      #include <X11/Xproto.h>
++"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
+ 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo's Xlib surface backend feature could be enabled" >&5
+ $as_echo_n "checking whether cairo's Xlib surface backend feature could be enabled... " >&6; }
diff -r 728481ac4ffb -r b8afb0fdcdfb graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c
--- a/graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c Thu Nov 01 04:09:24 2012 +0000
+++ b/graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c Thu Nov 01 08:54:46 2012 +0000
@@ -1,11 +1,130 @@
-$NetBSD: patch-src_cairo-xlib-surface-shm.c,v 1.7 2012/10/31 13:06:22 wiz Exp $
+$NetBSD: patch-src_cairo-xlib-surface-shm.c,v 1.8 2012/11/01 08:54:47 wiz Exp $
 
 Recognize Xorg servers as well as X.org servers. From Chris Wilson (upstream);
 fixes some more firefox issues.
 
+Also, handle old-style shm headers, also from upstream.
+
 --- src/cairo-xlib-surface-shm.c.orig  2012-10-21 08:13:41.000000000 +0000
 +++ src/cairo-xlib-surface-shm.c
-@@ -1141,7 +1141,8 @@ xorg_has_buggy_send_shm_completion_event
+@@ -41,17 +41,114 @@
+ 
+ #include "cairo-xlib-private.h"
+ #include "cairo-xlib-surface-private.h"
+-#include "cairo-image-surface-private.h"
+-#include "cairo-mempool-private.h"
++
++#if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H)
++void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {}
++
++cairo_surface_t *
++_cairo_xlib_surface_get_shm (cairo_xlib_surface_t *surface,
++                           cairo_bool_t overwrite)
++{
++    return NULL;
++}
++
++cairo_int_status_t
++_cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return CAIRO_INT_STATUS_SUCCESS;
++}
++
++cairo_surface_t *
++_cairo_xlib_surface_create_shm (cairo_xlib_surface_t *other,
++                              pixman_format_code_t format,
++                              int width, int height)
++{
++    return NULL;
++}
++
++cairo_surface_t *
++_cairo_xlib_surface_create_shm__image (cairo_xlib_surface_t *surface,
++                                     pixman_format_code_t format,
++                                     int width, int height)
++{
++    return NULL;
++}
++
++cairo_surface_t *
++_cairo_xlib_surface_create_similar_shm (void *other,
++                                      cairo_format_t format,
++                                      int width, int height)
++{
++    return cairo_image_surface_create (format, width, height);
++}
++
++void
++_cairo_xlib_shm_surface_mark_active (cairo_surface_t *_shm)
++{
++    ASSERT_NOT_REACHED;
++}
++
++void
++_cairo_xlib_shm_surface_get_ximage (cairo_surface_t *surface,
++                                  XImage *ximage)
++{
++    ASSERT_NOT_REACHED;
++}
++
++void *
++_cairo_xlib_shm_surface_get_obdata (cairo_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return NULL;
++}
++
++Pixmap
++_cairo_xlib_shm_surface_get_pixmap (cairo_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return 0;
++}
++
++XRenderPictFormat *
++_cairo_xlib_shm_surface_get_xrender_format (cairo_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return NULL;
++}
++
++cairo_bool_t
++_cairo_xlib_shm_surface_is_active (cairo_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return FALSE;
++}
++
++cairo_bool_t
++_cairo_xlib_shm_surface_is_idle (cairo_surface_t *surface)
++{
++    ASSERT_NOT_REACHED;
++    return TRUE;
++}
++
++void _cairo_xlib_display_fini_shm (cairo_xlib_display_t *display) {}
++
++#else
+ 
+ #include "cairo-damage-private.h"
+ #include "cairo-default-context-private.h"
++#include "cairo-image-surface-private.h"
+ #include "cairo-list-inline.h"
++#include "cairo-mempool-private.h"
+ 
+ #include <X11/Xlibint.h>
+ #include <X11/Xproto.h>
+ #include <X11/extensions/XShm.h>
++#if HAVE_X11_EXTENSIONS_SHMPROTO_H
+ #include <X11/extensions/shmproto.h>
++#elif HAVE_X11_EXTENSIONS_SHMSTR_H
++#include <X11/extensions/shmstr.h>
++#endif
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ 
+@@ -1141,7 +1238,8 @@ xorg_has_buggy_send_shm_completion_event
       *
       * Remove the SendEvent bit (0x80) before doing range checks on event type.
       */
@@ -15,3 +134,10 @@
            VendorRelease (dpy) < XORG_VERSION_ENCODE(1,11,0,1));
  }
  
+@@ -1220,5 +1318,5 @@ _cairo_xlib_display_fini_shm (cairo_xlib
+     free (shm);
+     display->shm = NULL;
+ }
+-
++#endif
+ #endif



Home | Main Index | Thread Index | Old Index