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 PKGREVISIONdiff -r1.14 -r1.15 pkgsrc/x11/gnome-sharp/Makefile
(drochner)
@@ -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 | |||
4 | DISTNAME= gnome-sharp-2.24.1 | 4 | DISTNAME= gnome-sharp-2.24.1 | |
5 | PKGREVISION= 3 | 5 | PKGREVISION= 4 | |
6 | CATEGORIES= x11 | 6 | CATEGORIES= x11 | |
7 | MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-sharp/2.24/} | 7 | MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-sharp/2.24/} | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.mono-project.com/GtkSharp | 10 | HOMEPAGE= http://www.mono-project.com/GtkSharp | |
11 | COMMENT= C\# bindings for the GNOME platform | 11 | COMMENT= C\# bindings for the GNOME platform | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | GNU_CONFIGURE= yes | 15 | GNU_CONFIGURE= yes | |
16 | USE_PKGLOCALEDIR= yes | 16 | USE_PKGLOCALEDIR= yes | |
17 | USE_LIBTOOL= yes | 17 | USE_LIBTOOL= yes | |
18 | USE_TOOLS+= gmake pkg-config | 18 | USE_TOOLS+= gmake pkg-config | |
19 | MAKE_JOBS_SAFE= no | 19 | MAKE_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].*) | |||
24 | CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_64BITS | |||
25 | .else | |||
26 | CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_32BITS | |||
27 | .endif | |||
28 | .endif | |||
29 | ||||
21 | PKGCONFIG_OVERRIDE+= art/art-sharp-2.0.pc.in | 30 | PKGCONFIG_OVERRIDE+= art/art-sharp-2.0.pc.in | |
22 | PKGCONFIG_OVERRIDE+= gconf/GConf/gconf-sharp-2.0.pc.in | 31 | PKGCONFIG_OVERRIDE+= gconf/GConf/gconf-sharp-2.0.pc.in | |
23 | PKGCONFIG_OVERRIDE+= gconf/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc.in | 32 | PKGCONFIG_OVERRIDE+= gconf/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc.in | |
24 | PKGCONFIG_OVERRIDE+= gnome/gnome-sharp-2.0.pc.in | 33 | PKGCONFIG_OVERRIDE+= gnome/gnome-sharp-2.0.pc.in | |
25 | PKGCONFIG_OVERRIDE+= gnomevfs/gnome-vfs-sharp-2.0.pc.in | 34 | PKGCONFIG_OVERRIDE+= gnomevfs/gnome-vfs-sharp-2.0.pc.in | |
26 | 35 | |||
27 | SUBST_CLASSES= pc | 36 | SUBST_CLASSES= pc | |
28 | SUBST_STAGE.pc= post-patch | 37 | SUBST_STAGE.pc= post-patch | |
29 | SUBST_FILES.pc= ${PKGCONFIG_OVERRIDE} | 38 | SUBST_FILES.pc= ${PKGCONFIG_OVERRIDE} | |
30 | SUBST_SED.pc= -e "s|\$${pcfiledir}/../..|@prefix@|g" | 39 | SUBST_SED.pc= -e "s|\$${pcfiledir}/../..|@prefix@|g" | |
31 | SUBST_MESSAGE.pc= Fixing hardcoded paths. | 40 | SUBST_MESSAGE.pc= Fixing hardcoded paths. | |
32 | 41 | |||
33 | BUILDLINK_API_DEPENDS.libgnomeui+= libgnomeui>=2.23.0 | 42 | BUILDLINK_API_DEPENDS.libgnomeui+= libgnomeui>=2.23.0 |
@@ -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 | |||
3 | SHA1 (gnome-sharp-2.24.1.tar.gz) = deaeb62de5a404c9867a07e9cfa06abfa67b982c | 3 | SHA1 (gnome-sharp-2.24.1.tar.gz) = deaeb62de5a404c9867a07e9cfa06abfa67b982c | |
4 | RMD160 (gnome-sharp-2.24.1.tar.gz) = ae579db486ca02d16170756ba4461b576d5e5e7d | 4 | RMD160 (gnome-sharp-2.24.1.tar.gz) = ae579db486ca02d16170756ba4461b576d5e5e7d | |
5 | Size (gnome-sharp-2.24.1.tar.gz) = 595441 bytes | 5 | Size (gnome-sharp-2.24.1.tar.gz) = 595441 bytes | |
6 | SHA1 (patch-aa) = 73127f8b0e90ab53f03fbec6242d5ccc1ccdfd1f | |||
7 | SHA1 (patch-ab) = a8bb071d965cc7265bae16fa78f7bc286fd8f7b2 |
$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");
}
$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'