summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authordrochner <drochner>2009-09-09 15:28:04 +0000
committerdrochner <drochner>2009-09-09 15:28:04 +0000
commit6a57301f4250f42ce4d21906cae19350f29576c7 (patch)
tree43ef0ff6038240c044d6445ec31b42736460ab8f /x11
parent81165861fc68313eedef553c4f396d82f1663ba3 (diff)
downloadpkgsrc-6a57301f4250f42ce4d21906cae19350f29576c7.tar.gz
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
Diffstat (limited to 'x11')
-rw-r--r--x11/gnome-sharp/Makefile13
-rw-r--r--x11/gnome-sharp/distinfo4
-rw-r--r--x11/gnome-sharp/patches/patch-aa51
-rw-r--r--x11/gnome-sharp/patches/patch-ab13
4 files changed, 78 insertions, 3 deletions
diff --git a/x11/gnome-sharp/Makefile b/x11/gnome-sharp/Makefile
index 3df1d51063f..263c3dceb15 100644
--- a/x11/gnome-sharp/Makefile
+++ b/x11/gnome-sharp/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2009/08/26 19:56:47 sno Exp $
+# $NetBSD: Makefile,v 1.15 2009/09/09 15:28:04 drochner Exp $
#
DISTNAME= gnome-sharp-2.24.1
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-sharp/2.24/}
@@ -18,6 +18,15 @@ USE_LIBTOOL= yes
USE_TOOLS+= gmake pkg-config
MAKE_JOBS_SAFE= no
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == NetBSD
+.if !empty(OS_VERSION:M5.99.*) || !empty(OS_VERSION:M[6789].*)
+CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_64BITS
+.else
+CONFIGURE_ENV+= EXTRACSDEFINES=-define:TIMET_IS_32BITS
+.endif
+.endif
+
PKGCONFIG_OVERRIDE+= art/art-sharp-2.0.pc.in
PKGCONFIG_OVERRIDE+= gconf/GConf/gconf-sharp-2.0.pc.in
PKGCONFIG_OVERRIDE+= gconf/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc.in
diff --git a/x11/gnome-sharp/distinfo b/x11/gnome-sharp/distinfo
index 40e26d7fdcd..98d6db55931 100644
--- a/x11/gnome-sharp/distinfo
+++ b/x11/gnome-sharp/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.4 2009/03/06 14:30:05 wiz Exp $
+$NetBSD: distinfo,v 1.5 2009/09/09 15:28:04 drochner Exp $
SHA1 (gnome-sharp-2.24.1.tar.gz) = deaeb62de5a404c9867a07e9cfa06abfa67b982c
RMD160 (gnome-sharp-2.24.1.tar.gz) = ae579db486ca02d16170756ba4461b576d5e5e7d
Size (gnome-sharp-2.24.1.tar.gz) = 595441 bytes
+SHA1 (patch-aa) = 73127f8b0e90ab53f03fbec6242d5ccc1ccdfd1f
+SHA1 (patch-ab) = a8bb071d965cc7265bae16fa78f7bc286fd8f7b2
diff --git a/x11/gnome-sharp/patches/patch-aa b/x11/gnome-sharp/patches/patch-aa
new file mode 100644
index 00000000000..59a9f551a11
--- /dev/null
+++ b/x11/gnome-sharp/patches/patch-aa
@@ -0,0 +1,51 @@
+$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");
+ }
diff --git a/x11/gnome-sharp/patches/patch-ab b/x11/gnome-sharp/patches/patch-ab
new file mode 100644
index 00000000000..d17c082715c
--- /dev/null
+++ b/x11/gnome-sharp/patches/patch-ab
@@ -0,0 +1,13 @@
+$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'