[Gtk-sharp-list] [LONG] Patches to make Gtk-Sharp 1.0 work on FreeBSD and Gnome 2.6.2

John Merryweather Cooper john_m_cooper@yahoo.com
Sat, 17 Jul 2004 17:54:36 -0700


--=-uxTTzBF9O+5jtEoOVKxu
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I'm the FreeBSD maintainer for Gtk-Sharp and I have some patches that
get Gtk-Sharp 1.0 up and working on FreeBSD and Gnome 2.6.2--the current
level of Gnome on FreeBSD.  All the following patches are always
available, in their latest form, via cvsweb at:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-toolkits/gtk-sharp/files/

jmc

<=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3DDISCUSSION=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>
#####
# patch-art_art-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-atk_atk-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-configure
#####

Pass correct PTHREAD_CFLAGS and PTHREAD_LIBS flags (which differ which
each version [and within versions] for FreeBSD).  As I discussed on
patches for Mono 1.0, this can be handled by some reasonable guesses,
but allowance for overriding by use of these two environment variables
will produce more reliable builds.  The values for PTHREAD_CFLAGS and
PTHREAD_LIBS are set based on __FREEBSD__version (defined in
<sys/param.h> in /usr/ports/Mk/bsd.port.mk.

#####
# patch-gconf_GConf_gconf-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-gda_gda-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-gdk_gdk-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-glib_glib-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-gnome_gnome-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-gtk_gtk-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-ltmain.sh
#####

Handle -pthread for FreeBSD -STABLE (version 4.x) and -lc_r issues.=20
Also, don't install *.la files (although this one is in a state of flux
waiting for resolution on the auto[tools] situation with FreeBSD).

#####
# patch-pango_pango-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

#####
# patch-sample_rsvg_Makefile.in
#####

Build breaks here with a missing dependency.  Add ../art/art-sharp.dll
which is required by rsvg-sharp.dll.

#####
# patch-vte_vte-sharp.dll.config.in
#####

Patch ABI Numbers to match Gnome 2.6.2.

<=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DBE=
GIN FREEBSD PATCHES=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D>
#####
# patch-art_art-sharp.dll.config.in
#####
--- art/art-sharp.dll.config.in.orig	Wed Jul 14 21:48:30 2004
+++ art/art-sharp.dll.config.in	Wed Jul 14 21:49:46 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"art_lgpl"
target=3D"libart_lgpl_2@LIB_PREFIX@.2@LIB_SUFFIX@"/>
+  <dllmap dll=3D"art_lgpl"
target=3D"libart_lgpl@LIB_PREFIX@.5@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-atk_atk-sharp.dll.config.in
#####
--- atk/atk-sharp.dll.config.in.orig	Wed Jul 14 21:51:46 2004
+++ atk/atk-sharp.dll.config.in	Wed Jul 14 21:52:14 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.600@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-configure
#####
--- configure.bak	Tue Jun 29 09:02:24 2004
+++ configure	Thu Jul  8 02:13:18 2004
@@ -8441,7 +8441,7 @@
=20
=20
=20
-CFLAGS=3D'-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs  -Wshadow
-Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
+CFLAGS=3D'-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs  -Wshadow
-Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
=20
 # Extract the first word of "pkg-config", so it can be a program name
with args.
 set dummy pkg-config; ac_word=3D$2

#####
# patch-gconf_GConf_gconf-sharp.dll.config.in
#####
--- gconf/GConf/gconf-sharp.dll.config.in.orig	Wed Jul 14 21:54:59 2004
+++ gconf/GConf/gconf-sharp.dll.config.in	Wed Jul 14 21:57:00 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"gconf-2" target=3D"libgconf-2@LIB_PREFIX@.4@LIB_SUFFIX@"/=
>
+  <dllmap dll=3D"gconf-2" target=3D"libgconf-2@LIB_PREFIX@.5@LIB_SUFFIX@"/=
>
 </configuration>

#####
# patch-gda_gda-sharp.dll.config.in
#####
--- gda/gda-sharp.dll.config.in.orig	Wed Jul 14 22:12:50 2004
+++ gda/gda-sharp.dll.config.in	Wed Jul 14 22:13:11 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"gda-2" target=3D"libgda-2@LIB_PREFIX@.1@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gda-2" target=3D"libgda-2@LIB_PREFIX@.2@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-gdk_gdk-sharp.dll.config.in
#####
--- gdk/gdk-sharp.dll.config.in.orig	Wed Jul 14 22:14:38 2004
+++ gdk/gdk-sharp.dll.config.in	Wed Jul 14 22:15:47 2004
@@ -1,6 +1,6 @@
 <configuration>
-  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgdk-win32-2.0-0.dll"
target=3D"libgdk-x11-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgdk_pixbuf-2.0-0.dll"
target=3D"libgdk_pixbuf-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgdk-win32-2.0-0.dll"
target=3D"libgdk-x11-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgdk_pixbuf-2.0-0.dll"
target=3D"libgdk_pixbuf-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-glib_glib-sharp.dll.config.in
#####
--- glib/glib-sharp.dll.config.in.orig	Wed Jul 14 22:17:54 2004
+++ glib/glib-sharp.dll.config.in	Wed Jul 14 22:18:28 2004
@@ -1,5 +1,5 @@
 <configuration>
-  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgthread-2.0-0.dll"
target=3D"libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgthread-2.0-0.dll"
target=3D"libgthread-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-gnome_gnome-sharp.dll.config.in
#####
--- gnome/gnome-sharp.dll.config.in.orig	Wed Jul 14 22:20:21 2004
+++ gnome/gnome-sharp.dll.config.in	Wed Jul 14 22:21:54 2004
@@ -1,11 +1,11 @@
 <configuration>
-  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgthread-2.0-0.dll"
target=3D"libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgtk-win32-2.0-0.dll"
target=3D"libgtk-x11-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"gnome-2" target=3D"libgnome-2@LIB_PREFIX@.0@LIB_SUFFIX@"/=
>
-  <dllmap dll=3D"gnomecanvas-2"
target=3D"libgnomecanvas-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"gnomeprint-2-2"
target=3D"libgnomeprint-2-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"gnomeprintui-2-2"
target=3D"libgnomeprintui-2-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"gnomeui-2"
target=3D"libgnomeui-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgthread-2.0-0.dll"
target=3D"libgthread-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgtk-win32-2.0-0.dll"
target=3D"libgtk-x11-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gnome-2"
target=3D"libgnome-2@LIB_PREFIX@.600@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gnomecanvas-2"
target=3D"libgnomecanvas-2@LIB_PREFIX@.600@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gnomeprint-2-2"
target=3D"libgnomeprint-2-2@LIB_PREFIX@.1@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gnomeprintui-2-2"
target=3D"libgnomeprintui-2-2@LIB_PREFIX@.1@LIB_SUFFIX@"/>
+  <dllmap dll=3D"gnomeui-2"
target=3D"libgnomeui-2@LIB_PREFIX@.600@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-gtk_gtk-sharp.dll.config.in
#####
--- gtk/gtk-sharp.dll.config.in.orig	Wed Jul 14 22:23:27 2004
+++ gtk/gtk-sharp.dll.config.in	Wed Jul 14 22:24:17 2004
@@ -1,6 +1,6 @@
 <configuration>
-  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"libgtk-win32-2.0-0.dll"
target=3D"libgtk-x11-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libglib-2.0-0.dll"
target=3D"libglib-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgobject-2.0-0.dll"
target=3D"libgobject-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.600@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libgtk-win32-2.0-0.dll"
target=3D"libgtk-x11-2.0@LIB_PREFIX@.400@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-ltmain.sh
#####
--- ltmain.sh.orig	Thu May 22 16:42:22 2003
+++ ltmain.sh	Tue May 27 12:12:52 2003
@@ -1072,7 +1072,7 @@
 	  esac
 	 elif test "X$arg" =3D "X-lc_r"; then
 	  case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd4*)
 	    # Do not include libc_r directly, use -pthread flag.
 	    continue
 	    ;;
@@ -1082,8 +1082,16 @@
 	continue
 	;;
=20
+      -pthread)
+      compile_command=3D"$compile_command -pthread"
+      finalize_command=3D"$finalize_command -pthread"
+      compiler_flags=3D"$compiler_flags -pthread"
+      continue
+      ;;
+
       -module)
 	module=3Dyes
+	build_old_libs=3Dno
 	continue
 	;;
=20
@@ -4325,10 +4336,12 @@
 	fi
=20
 	# Install the pseudo-library for information purposes.
+	if /usr/bin/false; then
 	name=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
 	instname=3D"$dir/$name"i
 	$show "$install_prog $instname $destdir/$name"
 	$run eval "$install_prog $instname $destdir/$name" || exit $?
+	fi
=20
 	# Maybe install the static library, too.
 	test -n "$old_library" && staticlibs=3D"$staticlibs $dir/$old_library"

#####
# patch-pango_pango-sharp.dll.config.in
#####
--- pango/pango-sharp.dll.config.in.orig	Wed Jul 14 22:25:54 2004
+++ pango/pango-sharp.dll.config.in	Wed Jul 14 22:26:14 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"libpango-1.0-0.dll"
target=3D"libpango-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libpango-1.0-0.dll"
target=3D"libpango-1.0@LIB_PREFIX@.399@LIB_SUFFIX@"/>
 </configuration>
--- rsvg/rsvg-sharp.dll.config.in.orig	Wed Jul 14 22:28:11 2004
+++ rsvg/rsvg-sharp.dll.config.in	Wed Jul 14 22:28:29 2004
@@ -1,3 +1,3 @@
 <configuration>
-  <dllmap dll=3D"rsvg-2" target=3D"librsvg-2@LIB_PREFIX@.2@LIB_SUFFIX@"/>
+  <dllmap dll=3D"rsvg-2" target=3D"librsvg-2@LIB_PREFIX@.8@LIB_SUFFIX@"/>
 </configuration>

#####
# patch-sample_rsvg_Makefile.in
#####
--- sample/rsvg/Makefile.in.bak	Tue Jun 29 09:03:12 2004
+++ sample/rsvg/Makefile.in	Thu Jul  8 16:27:33 2004
@@ -119,7 +119,7 @@
 am__include =3D @am__include@
 am__quote =3D @am__quote@
 install_sh =3D @install_sh@
-assemblies =3D ../../glib/glib-sharp.dll ../../pango/pango-sharp.dll
../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll
../../rsvg/rsvg-sharp.dll
+assemblies =3D ../../glib/glib-sharp.dll ../../pango/pango-sharp.dll
../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll
../../art/art-sharp.dll ../../rsvg/rsvg-sharp.dll
 references =3D $(addprefix /r:, $(assemblies))
=20
 @ENABLE_RSVG_TRUE@TARGETS =3D svghelloworld.exe

#####
# patch-vte_vte-sharp.dll.config.in
#####
--- vte/vte-sharp.dll.config.in.orig	Wed Jul 14 22:29:44 2004
+++ vte/vte-sharp.dll.config.in	Wed Jul 14 22:30:14 2004
@@ -1,4 +1,4 @@
 <configuration>
-  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
-  <dllmap dll=3D"vte" target=3D"libvte@LIB_PREFIX@.4@LIB_SUFFIX@"/>
+  <dllmap dll=3D"libatk-1.0-0.dll"
target=3D"libatk-1.0@LIB_PREFIX@.600@LIB_SUFFIX@"/>
+  <dllmap dll=3D"vte" target=3D"libvte@LIB_PREFIX@.8@LIB_SUFFIX@"/>
 </configuration>
<=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3DEND FREEBSD PATCHES=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D>


--=-uxTTzBF9O+5jtEoOVKxu
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBA+cpLvBSBfjNhsrIRAk5dAJ9907ZILYdoMjDtQNL0qs72yquF3gCfQy2/
LU9+GLrQBse37BXYVFCIYTQ=
=o2mU
-----END PGP SIGNATURE-----

--=-uxTTzBF9O+5jtEoOVKxu--