From 24013d61a6cffca18ebd447f939769901d806ee2 Mon Sep 17 00:00:00 2001 From: jasper Date: Thu, 12 Nov 2009 21:48:18 +0000 Subject: [PATCH] Prevent redefinition of ALIGN in giroffsets.c, doesn't fix sparc64 build though.. --- devel/gobject-introspection/Makefile | 3 +- .../patches/patch-girepository_giroffsets_c | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 devel/gobject-introspection/patches/patch-girepository_giroffsets_c diff --git a/devel/gobject-introspection/Makefile b/devel/gobject-introspection/Makefile index 093d81869fb..906950ee9fe 100644 --- a/devel/gobject-introspection/Makefile +++ b/devel/gobject-introspection/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2009/09/24 20:08:09 jasper Exp $ +# $OpenBSD: Makefile,v 1.2 2009/11/12 21:48:18 jasper Exp $ COMMENT= GObject Introspection GNOME_VERSION= 0.6.5 GNOME_PROJECT= gobject-introspection +PKGNAME= ${DISTNAME}p0 CATEGORIES= devel SHARED_LIBS += girepository-1.0 0.0 # .0.0 diff --git a/devel/gobject-introspection/patches/patch-girepository_giroffsets_c b/devel/gobject-introspection/patches/patch-girepository_giroffsets_c new file mode 100644 index 00000000000..4de6f9bb2bb --- /dev/null +++ b/devel/gobject-introspection/patches/patch-girepository_giroffsets_c @@ -0,0 +1,50 @@ +$OpenBSD: patch-girepository_giroffsets_c,v 1.1 2009/11/12 21:48:18 jasper Exp $ + +Prevent redefinition of ALIGN in giroffsets.c with /usr/include/machine/param.h + +--- girepository/giroffsets.c.orig Thu Nov 12 21:33:35 2009 ++++ girepository/giroffsets.c Thu Nov 12 21:34:37 2009 +@@ -309,7 +309,7 @@ get_field_size_alignment (GIrNodeField *field, + return success; + } + +-#define ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1)) ++#define G_ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1)) + + static gboolean + compute_struct_field_offsets (GIrNode *node, +@@ -343,7 +343,7 @@ compute_struct_field_offsets (GIrNode *node, + module, modules, + &member_size, &member_alignment)) + { +- size = ALIGN (size, member_alignment); ++ size = G_ALIGN (size, member_alignment); + alignment = MAX (alignment, member_alignment); + field->offset = size; + size += member_size; +@@ -357,14 +357,14 @@ compute_struct_field_offsets (GIrNode *node, + } + else if (member->type == G_IR_NODE_CALLBACK) + { +- size = ALIGN (size, ffi_type_pointer.alignment); ++ size = G_ALIGN (size, ffi_type_pointer.alignment); + alignment = MAX (alignment, ffi_type_pointer.alignment); + size += ffi_type_pointer.size; + } + } + + /* Structs are tail-padded out to a multiple of their alignment */ +- size = ALIGN (size, alignment); ++ size = G_ALIGN (size, alignment); + + if (!have_error) + { +@@ -422,7 +422,7 @@ compute_union_field_offsets (GIrNode *node, + } + + /* Unions are tail-padded out to a multiple of their alignment */ +- size = ALIGN (size, alignment); ++ size = G_ALIGN (size, alignment); + + if (!have_error) + {