diff --git a/ChangeLog b/ChangeLog index fbbaae445..9b4508b98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-11-07 Mike Kestner + + * configure.in : add mono check. expand wrapper scripts + * generator/Makefile.in : use install. install a gapi-codegen wrapper. + * generator/SymbolTable.cs : add SimpleGen for short + * generator/gapi-codegen.in : new wrapper script in file. + * parser/Makefile.in : use install. install a gapi-fixup wrapper. + * generator/gapi-fixup.in : new wrapper script in file. + * parser/gapi2xml.pl : deal with non-namespaced enums. ignore + forward struct declarations. + 2003-11-05 Mike Kestner * gtk/ITreeNode.cs : make Parent readonly diff --git a/configure.in b/configure.in index 49c7a2598..9a24acbfe 100644 --- a/configure.in +++ b/configure.in @@ -57,6 +57,10 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir], fi ) +PKG_CHECK_MODULES(MONO_DEPENDENCY, mono) + +MONO=`which mono` +AC_SUBST(MONO) ## Versions of dependencies GNOME_REQUIRED_VERSION=2.0.0 @@ -111,6 +115,7 @@ AC_OUTPUT([ glue/Makefile parser/Makefile generator/Makefile +generator/gapi-codegen glib/Makefile pango/Makefile atk/Makefile @@ -132,6 +137,7 @@ sample/Makefile sample/rsvg/Makefile gtk-sharp.pc parser/gapi.pc +parser/gapi-fixup Makefile ]) diff --git a/generator/.cvsignore b/generator/.cvsignore index a3b26fa34..1515dd2de 100644 --- a/generator/.cvsignore +++ b/generator/.cvsignore @@ -2,5 +2,6 @@ *.exe *.xml generated-stamp +gapi-codegen Makefile diff --git a/generator/Makefile.in b/generator/Makefile.in index b2e50f359..3a0eaf861 100644 --- a/generator/Makefile.in +++ b/generator/Makefile.in @@ -2,22 +2,21 @@ MCS=mcs RUNTIME=mono DESTDIR= -all: linux - -windows: *.cs - $(CSC) /unsafe /out:codegen.exe *.cs - ./codegen gtkapi.xml - -linux: gapi_codegen.exe +all: gapi_codegen.exe clean: rm -f *.exe +distclean: + rm gapi-codegen + prefix=@prefix@ +install=@INSTALL@ install: all ../mkinstalldirs $(DESTDIR)$(prefix)/bin && \ - cp gapi_codegen.exe $(DESTDIR)$(prefix)/bin + $(install) gapi_codegen.exe $(DESTDIR)$(prefix)/bin && \ + $(install) gapi-codegen $(DESTDIR)$(prefix)/bin gapi_codegen.exe: *.cs $(MCS) --unsafe -o gapi_codegen.exe -r System.Xml *.cs diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index 7511b3f5f..aa4ae5528 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -56,6 +56,7 @@ namespace GtkSharp.Generation { AddType (new SimpleGen ("guint1", "bool")); AddType (new SimpleGen ("gpointer", "IntPtr")); AddType (new SimpleGen ("guchar", "byte")); + AddType (new SimpleGen ("short", "short")); AddType (new SimpleGen ("long", "long")); AddType (new SimpleGen ("ulong", "ulong")); AddType (new SimpleGen ("gulong", "ulong")); diff --git a/generator/gapi-codegen.in b/generator/gapi-codegen.in new file mode 100755 index 000000000..4ff93f2a7 --- /dev/null +++ b/generator/gapi-codegen.in @@ -0,0 +1,2 @@ +#!/bin/sh +@MONO@ @prefix@/bin/gapi_codegen.exe "$@" diff --git a/parser/.cvsignore b/parser/.cvsignore index 8e53efb71..bfd70d0f0 100755 --- a/parser/.cvsignore +++ b/parser/.cvsignore @@ -1,4 +1,5 @@ Makefile gapi_format_xml +gapi-fixup *.pc diff --git a/parser/Makefile.in b/parser/Makefile.in index 98d10b5c2..0d3e8f639 100644 --- a/parser/Makefile.in +++ b/parser/Makefile.in @@ -7,6 +7,7 @@ MCS=mcs SCRIPTS = \ gapi.pl \ gapi_pp.pl \ + gapi-fixup \ gapi-parser \ gapi2xml.pl @@ -29,16 +30,17 @@ distclean: rm -f gapi.pc prefix=@prefix@ +install=@INSTALL@ DESTDIR= install: all for i in $(SCRIPTS) gapi_format_xml gapi-fixup.exe; do \ ../mkinstalldirs $(DESTDIR)$(prefix)/bin && \ - cp $$i $(DESTDIR)$(prefix)/bin; \ + $(install) $$i $(DESTDIR)$(prefix)/bin; \ done for i in $(MODULES); do \ ../mkinstalldirs $(DESTDIR)$(prefix)/share/perl5/GAPI && \ - cp $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \ + $(install) $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \ done ../mkinstalldirs $(DESTDIR)$(prefix)/lib/pkgconfig && \ - cp gapi.pc $(DESTDIR)$(prefix)/lib/pkgconfig + $(install) -m 644 gapi.pc $(DESTDIR)$(prefix)/lib/pkgconfig diff --git a/parser/gapi-fixup.in b/parser/gapi-fixup.in new file mode 100755 index 000000000..8307c834b --- /dev/null +++ b/parser/gapi-fixup.in @@ -0,0 +1,2 @@ +#!/bin/sh +@MONO@ @prefix@/bin/gapi-fixup.exe "$@" diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index e729b0a6a..2b2172719 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -84,8 +84,9 @@ while ($line = ) { $fdef .= $line; $fdef =~ s/\n\s+//g; $fpdefs{$fname} = $fdef; - } elsif ($line =~ /struct\s+(\w+)/) { - $sname = $1; + } elsif ($line =~ /^(private)?struct\s+(\w+)/) { + next if ($line =~ /;/); + $sname = $2; $sdef = $line; while ($line = ) { $sdef .= $line; @@ -192,17 +193,17 @@ foreach $cname (sort(keys(%edefs))) { } foreach $val (@vals) { - if ($val =~ /$common\_(\w+)\s*=\s*(\-?\d+.*)/) { + if ($val =~ /$common\_?(\w+)\s*=\s*(\-?\d+.*)/) { $name = $1; if ($2 =~ /1u?\s*<<\s*(\d+)/) { $enumval = "1 << $1"; } else { $enumval = $2; } - } elsif ($val =~ /$common\_(\w+)/) { + } elsif ($val =~ /$common\_?(\w+)/) { $name = $1; $enumval = ""; } else { - die "Unexpected enum value: $val\n"; + die "Unexpected enum value: $val for common value $common\n"; } $val_elem = addNameElem($enum_elem, 'member'); diff --git a/sources/.cvsignore b/sources/.cvsignore index 80a5f5eef..2038812d5 100644 --- a/sources/.cvsignore +++ b/sources/.cvsignore @@ -1,5 +1,5 @@ atk-1.2.4 -gstreamer-0.4.2 +gstreamer-0.6.4 gtk+-2.2.2 gtkhtml-3.0.8 libart_lgpl-2.3.10