com gtk/php-gtk: Make the extension building a little bit more smoother :): ext/mozembed/Makefile.frag ext/mozembed/modifyGenerated.php ext/mozembed/mozembed.overrides ext/scintilla/Makefile.frag ext/scintilla/modifyGenerated.php ext/scintilla/scintilla.overrides ext/sourceview/Makefile.frag ext/sourceview/modifyGenerated.php ext/sourceview/sourceview.overrides

[email protected] (David Soria Parra)
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    bd1cdd892f0989bcf827f09d391c1d8bf0d90ef2
Author:    Anant Narayanan <[email protected]>         Fri, 14 Apr 2006 22:49:08 +0000
Parents:   b6e570b341c5ae3b13c5b76bcef16b9828f7c88a
Branches:  master

Link:       http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=bd1cdd892f0989bcf827f09d391c1d8bf0d90ef2

Log:
Make the extension building a little bit more smoother :)

Changed paths:
  M  ext/mozembed/Makefile.frag
  D  ext/mozembed/modifyGenerated.php
  M  ext/mozembed/mozembed.overrides
  M  ext/scintilla/Makefile.frag
  D  ext/scintilla/modifyGenerated.php
  M  ext/scintilla/scintilla.overrides
  M  ext/sourceview/Makefile.frag
  D  ext/sourceview/modifyGenerated.php
  M  ext/sourceview/sourceview.overrides


Diff:
bd1cdd892f0989bcf827f09d391c1d8bf0d90ef2
diff --git a/ext/mozembed/Makefile.frag b/ext/mozembed/Makefile.frag
index 3310e6a..ef7801e 100644
--- a/ext/mozembed/Makefile.frag
+++ b/ext/mozembed/Makefile.frag
@@ -10,6 +10,5 @@ $(builddir)/gen_mozembed.c: $(srcdir)/mozembed.defs $(srcdir)/mozembed.overrides
 		-o ext/mozembed/mozembed.overrides \
         -p GtkMozembed \
 		-f $@ ext/mozembed/mozembed.defs \
-	 && $(PHP) $(srcdir)/modifyGenerated.php \
      && grep -h "^PHP_GTK_EXPORT_CE" $@ | sed -e "s!^!extern !" > $(@D)/$(*F).h \
 	)
diff --git a/ext/mozembed/modifyGenerated.php b/ext/mozembed/modifyGenerated.php
deleted file mode 100644
index 15db9b1..0000000
--- a/ext/mozembed/modifyGenerated.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/* Ugly, Ugly way of exporting gtkbin for mozembed */
-$contents = file("ext/mozembed/gen_mozembed.c");
-$tmpFile = fopen("ext/mozembed/gen_temp.c", "w+");
-
-for($i=0; $i<5; $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fwrite($tmpFile, "\nPHP_GTK_EXPORT_CE(gtkbin_ce);\n");
-
-for($i=6; $i<=count($contents); $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fclose($tmpFile);
-$toPut = file("ext/mozembed/gen_temp.c");
-file_put_contents("ext/mozembed/gen_mozembed.c", $toPut);
-
-?>
diff --git a/ext/mozembed/mozembed.overrides b/ext/mozembed/mozembed.overrides
index ac1d3b6..87ce932 100644
--- a/ext/mozembed/mozembed.overrides
+++ b/ext/mozembed/mozembed.overrides
@@ -3,6 +3,7 @@
 headers
 #include <gtkmozembed.h>
 #include "ext/gtk+/php_gtk+.h"
+#include "php_gtk_api.h"
 %%
 constants
 %%
diff --git a/ext/scintilla/Makefile.frag b/ext/scintilla/Makefile.frag
index 53881d5..6f7828d 100644
--- a/ext/scintilla/Makefile.frag
+++ b/ext/scintilla/Makefile.frag
@@ -10,6 +10,5 @@ $(builddir)/gen_scintilla.c: $(srcdir)/scintilla.defs $(srcdir)/scintilla.overri
 		-o ext/scintilla/scintilla.overrides \
         -p GtkScintilla \
 		-f $@ ext/scintilla/scintilla.defs \
-	 && $(PHP) $(srcdir)/modifyGenerated.php \
      && grep -h "^PHP_GTK_EXPORT_CE" $@ | sed -e "s!^!extern !" > $(@D)/$(*F).h \
 	)
diff --git a/ext/scintilla/modifyGenerated.php b/ext/scintilla/modifyGenerated.php
deleted file mode 100644
index 3e741f1..0000000
--- a/ext/scintilla/modifyGenerated.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/* Ugly, Ugly way of exporting classes req for scintilla */
-$contents = file("ext/scintilla/gen_scintilla.c");
-$tmpFile = fopen("ext/scintilla/gen_temp.c", "w+");
-
-for($i=0; $i<5; $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fwrite($tmpFile, "\nPHP_GTK_EXPORT_CE(gtkframe_ce);\n");
-
-for($i=5; $i<=count($contents); $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fclose($tmpFile);
-$toPut = file("ext/scintilla/gen_temp.c");
-file_put_contents("ext/scintilla/gen_scintilla.c", $toPut);
-
-?>
diff --git a/ext/scintilla/scintilla.overrides b/ext/scintilla/scintilla.overrides
index 54dd323..df35661 100644
--- a/ext/scintilla/scintilla.overrides
+++ b/ext/scintilla/scintilla.overrides
@@ -3,7 +3,7 @@
 headers
 #include <gtkscintilla2/gtkscintilla.h>
 #include "ext/gtk+/php_gtk+.h"
-
+#include "php_gtk_api.h"
 %%
 ignore-glob
   *_get_type
diff --git a/ext/sourceview/Makefile.frag b/ext/sourceview/Makefile.frag
index 2ecd2cc..945d378 100644
--- a/ext/sourceview/Makefile.frag
+++ b/ext/sourceview/Makefile.frag
@@ -10,6 +10,5 @@ $(builddir)/gen_sourceview.c: $(srcdir)/sourceview.defs $(srcdir)/sourceview.ove
 		-o ext/sourceview/sourceview.overrides \
         -p GtkSourceView \
 		-f $@ ext/sourceview/sourceview.defs \
-	 && $(PHP) $(srcdir)/modifyGenerated.php \
      && grep -h "^PHP_GTK_EXPORT_CE" $@ | sed -e "s!^!extern !" > $(@D)/$(*F).h \
 	)
diff --git a/ext/sourceview/modifyGenerated.php b/ext/sourceview/modifyGenerated.php
deleted file mode 100644
index 47dd13f..0000000
--- a/ext/sourceview/modifyGenerated.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-/* Ugly, Ugly way of exporting gtkcontainer for sourceview */
-$contents = file("ext/sourceview/gen_sourceview.c");
-$tmpFile = fopen("ext/sourceview/gen_temp.c", "w+");
-
-for($i=0; $i<16; $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fwrite($tmpFile, "\nPHP_GTK_EXPORT_CE(gtkcontainer_ce);\n");
-fwrite($tmpFile, "PHP_GTK_EXPORT_CE(gdkpixbuf_ce);\n");
-fwrite($tmpFile, "PHP_GTK_EXPORT_CE(gtktextbuffer_ce);\n");
-fwrite($tmpFile, "PHP_GTK_EXPORT_CE(gtktexttagtable_ce);\n");
-fwrite($tmpFile, "PHP_GTK_EXPORT_CE(gtktextview_ce);\n");
-fwrite($tmpFile, "PHP_GTK_EXPORT_CE(gtktextmark_ce);");
-
-for($i=16; $i<=count($contents); $i++) {
-    fwrite($tmpFile, $contents[$i]);
-}
-
-fclose($tmpFile);
-$toPut = file("ext/sourceview/gen_temp.c");
-file_put_contents("ext/sourceview/gen_sourceview.c", $toPut);
-
-?>
diff --git a/ext/sourceview/sourceview.overrides b/ext/sourceview/sourceview.overrides
index c7b299e..40461e2 100644
--- a/ext/sourceview/sourceview.overrides
+++ b/ext/sourceview/sourceview.overrides
@@ -14,6 +14,7 @@ headers
 #include <gtksourceview/gtksourcetagtable.h>
 #include <gtksourceview/gtksourceview-typebuiltins.h>
 #include "ext/gtk+/php_gtk+.h"
+#include "php_gtk_api.h"
 %%
 constants
 %%
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.