Wed Sep 9 15:28:04 2009 UTC ()
Fix lossage due to the assumption that a time_t has the same width
as a pointer, which fails at least on NetBSD-64bit <=5 and -32bit >5.
Unfortunately this assumption is deep in the code, in particular
already in gtk-sharp, so this fix isn't great because it only corrects
the translation of a C structure into C# data.
(With this fix, I can import pictures into f-spot from the filesystem.)
Many thanks to Brian de Alwis for explaining how conditionals can
be done in C#.
bump PKGREVISION


(drochner)
diff -r1.14 -r1.15 pkgsrc/x11/gnome-sharp/Makefile
diff -r1.4 -r1.5 pkgsrc/x11/gnome-sharp/distinfo
diff -r0 -r1.1 pkgsrc/x11/gnome-sharp/patches/patch-aa
diff -r0 -r1.1 pkgsrc/x11/gnome-sharp/patches/patch-ab

cvs diff -r1.14 -r1.15 pkgsrc/x11/gnome-sharp/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/gnome-sharp/Attic/Makefile 2009/08/26 19:56:47 1.14
+++ pkgsrc/x11/gnome-sharp/Attic/Makefile 2009/09/09 15:28:04 1.15
@@ -1,33 +1,42 @@ @@ -1,33 +1,42 @@
1# $NetBSD: Makefile,v 1.14 2009/08/26 19:56:47 sno Exp $ 1# $NetBSD: Makefile,v 1.15 2009/09/09 15:28:04 drochner Exp $
2# 2#
3 3
4DISTNAME= gnome-sharp-2.24.1 4DISTNAME= gnome-sharp-2.24.1
5PKGREVISION= 3 5PKGREVISION= 4
6CATEGORIES= x11 6CATEGORIES= x11
7MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-sharp/2.24/} 7MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-sharp/2.24/}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.mono-project.com/GtkSharp 10HOMEPAGE= http://www.mono-project.com/GtkSharp
11COMMENT= C\# bindings for the GNOME platform 11COMMENT= C\# bindings for the GNOME platform
12 12
13PKG_DESTDIR_SUPPORT= user-destdir 13PKG_DESTDIR_SUPPORT= user-destdir
14 14
15GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
16USE_PKGLOCALEDIR= yes 16USE_PKGLOCALEDIR= yes
17USE_LIBTOOL= yes 17USE_LIBTOOL= yes
18USE_TOOLS+= gmake pkg-config 18USE_TOOLS+= gmake pkg-config
19MAKE_JOBS_SAFE= no 19MAKE_JOBS_SAFE= no
20 20
 21.include "../../mk/bsd.prefs.mk"
 22.if ${OPSYS} == NetBSD
 23.if !empty(OS_VERSION:M5.99.*) || !empty(OS_VERSION:M[6789].*)
 24CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_64BITS
 25.else
 26CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_32BITS
 27.endif
 28.endif
 29
21PKGCONFIG_OVERRIDE+= art/art-sharp-2.0.pc.in 30PKGCONFIG_OVERRIDE+= art/art-sharp-2.0.pc.in
22PKGCONFIG_OVERRIDE+= gconf/GConf/gconf-sharp-2.0.pc.in 31PKGCONFIG_OVERRIDE+= gconf/GConf/gconf-sharp-2.0.pc.in
23PKGCONFIG_OVERRIDE+= gconf/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc.in 32PKGCONFIG_OVERRIDE+= gconf/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc.in
24PKGCONFIG_OVERRIDE+= gnome/gnome-sharp-2.0.pc.in 33PKGCONFIG_OVERRIDE+= gnome/gnome-sharp-2.0.pc.in
25PKGCONFIG_OVERRIDE+= gnomevfs/gnome-vfs-sharp-2.0.pc.in 34PKGCONFIG_OVERRIDE+= gnomevfs/gnome-vfs-sharp-2.0.pc.in
26 35
27SUBST_CLASSES= pc 36SUBST_CLASSES= pc
28SUBST_STAGE.pc= post-patch 37SUBST_STAGE.pc= post-patch
29SUBST_FILES.pc= ${PKGCONFIG_OVERRIDE} 38SUBST_FILES.pc= ${PKGCONFIG_OVERRIDE}
30SUBST_SED.pc= -e "s|\$${pcfiledir}/../..|@prefix@|g" 39SUBST_SED.pc= -e "s|\$${pcfiledir}/../..|@prefix@|g"
31SUBST_MESSAGE.pc= Fixing hardcoded paths. 40SUBST_MESSAGE.pc= Fixing hardcoded paths.
32 41
33BUILDLINK_API_DEPENDS.libgnomeui+= libgnomeui>=2.23.0 42BUILDLINK_API_DEPENDS.libgnomeui+= libgnomeui>=2.23.0

cvs diff -r1.4 -r1.5 pkgsrc/x11/gnome-sharp/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/x11/gnome-sharp/Attic/distinfo 2009/03/06 14:30:05 1.4
+++ pkgsrc/x11/gnome-sharp/Attic/distinfo 2009/09/09 15:28:04 1.5
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
1$NetBSD: distinfo,v 1.4 2009/03/06 14:30:05 wiz Exp $ 1$NetBSD: distinfo,v 1.5 2009/09/09 15:28:04 drochner Exp $
2 2
3SHA1 (gnome-sharp-2.24.1.tar.gz) = deaeb62de5a404c9867a07e9cfa06abfa67b982c 3SHA1 (gnome-sharp-2.24.1.tar.gz) = deaeb62de5a404c9867a07e9cfa06abfa67b982c
4RMD160 (gnome-sharp-2.24.1.tar.gz) = ae579db486ca02d16170756ba4461b576d5e5e7d 4RMD160 (gnome-sharp-2.24.1.tar.gz) = ae579db486ca02d16170756ba4461b576d5e5e7d
5Size (gnome-sharp-2.24.1.tar.gz) = 595441 bytes 5Size (gnome-sharp-2.24.1.tar.gz) = 595441 bytes
 6SHA1 (patch-aa) = 73127f8b0e90ab53f03fbec6242d5ccc1ccdfd1f
 7SHA1 (patch-ab) = a8bb071d965cc7265bae16fa78f7bc286fd8f7b2

File Added: pkgsrc/x11/gnome-sharp/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.1 2009/09/09 15:28:04 drochner Exp $

--- gnomevfs/FileInfo.cs.orig	2008-03-07 03:32:15.000000000 +0100
+++ gnomevfs/FileInfo.cs
@@ -38,9 +38,19 @@ namespace Gnome.Vfs {
 			public long size;
 			public long block_count;
 			public uint io_block_size;
+#if TIMET_IS_64BITS
+			public long atime;
+			public long mtime;
+			public long ctime;
+#elif TIMET_IS_32BITS
+			public int atime;
+			public int mtime;
+			public int ctime;
+#else
 			public IntPtr atime;
 			public IntPtr mtime;
 			public IntPtr ctime;
+#endif
 			public IntPtr symlink_name;
 			public IntPtr mime_type;
 			public uint refcount;
@@ -216,7 +226,7 @@ namespace Gnome.Vfs {
 		public System.DateTime Atime {
 			get {
 				if ((ValidFields & FileInfoFields.Atime) != 0)
-					return GLib.Marshaller.time_tToDateTime (Native.atime);
+					return GLib.Marshaller.time_tToDateTime ((IntPtr)Native.atime);
 				else
 					throw new ArgumentException ("Atime is not set");
 			}
@@ -225,7 +235,7 @@ namespace Gnome.Vfs {
 		public System.DateTime Mtime {
 			get {
 				if ((ValidFields & FileInfoFields.Mtime) != 0)
-					return GLib.Marshaller.time_tToDateTime (Native.mtime);
+					return GLib.Marshaller.time_tToDateTime ((IntPtr)Native.mtime);
 				else
 					throw new ArgumentException ("Mtime is not set");
 			}
@@ -234,7 +244,7 @@ namespace Gnome.Vfs {
 		public System.DateTime Ctime  {
 			get {
 				if ((ValidFields & FileInfoFields.Ctime) != 0)
-					return GLib.Marshaller.time_tToDateTime (Native.ctime);
+					return GLib.Marshaller.time_tToDateTime ((IntPtr)Native.ctime);
 				else
 					throw new ArgumentException ("Ctime is not set");
 			}

File Added: pkgsrc/x11/gnome-sharp/patches/Attic/patch-ab
$NetBSD: patch-ab,v 1.1 2009/09/09 15:28:04 drochner Exp $

--- configure.orig	2009-03-03 17:09:53.000000000 +0100
+++ configure
@@ -21774,7 +21774,7 @@ fi
 fi
 
 CSDEFINES='-define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 -define:GNOME_SHARP_2_20 -define:GNOME_SHARP_2_24'
-CSFLAGS="$DEBUG_FLAGS $CSDEFINES"
+CSFLAGS="$DEBUG_FLAGS $CSDEFINES $EXTRACSDEFINES"
 
 
 GTK_SHARP_VERSION_CFLAGS='-DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -DGNOME_SHARP_2_16 -DGNOME_SHARP_2_20 -DGNOME_SHARP_2_24'