]> granicus.if.org Git - php/commitdiff
- package.xml genartion fixed, <configureoptions> and <license> added
authorHartmut Holzgraefe <hholzgra@php.net>
Fri, 20 Jun 2003 11:31:43 +0000 (11:31 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Fri, 20 Jun 2003 11:31:43 +0000 (11:31 +0000)
- shutdown code for globals added

scripts/ext_skel_ng/extension_parser.php
scripts/ext_skel_ng/php_global.php

index 09ba750365911d13963eeedbc8491362f475fab7..3a4a17dc15335e518352a76e1611d330fc6fcdbe 100644 (file)
@@ -710,7 +710,7 @@ PHP_MINIT_FUNCTION({$this->name})
 ";
 
                if (count($this->globals)) {
-                       $code .= "\tZEND_INIT_MODULE_GLOBALS({$this->name}, php_{$this->name}_init_globals, NULL)\n";
+                       $code .= "\tZEND_INIT_MODULE_GLOBALS({$this->name}, php_{$this->name}_init_globals, php_{$this->name}_shutdown_globals)\n";
                        $need_block = true;
                }
 
@@ -1269,7 +1269,7 @@ you have been warned!
                ob_start();
                
                echo 
-"<?xml version=\"1.0\" encoding=\"utf-8\">
+"<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
 <!DOCTYPE package SYSTEM \"../../package.dtd\">
 <package>
   <name>{$this->name}</name>
@@ -1283,6 +1283,16 @@ you have been warned!
                        echo "  <description>\n".rtrim($this->description)."\n  </description>\n";
                }
                
+    if (isset($this->release['license'])) {
+      echo "  <license>".$this->release['license']."</license>\n";
+    }
+
+               if (isset($this->with['attr'])) {
+      echo "  <configureoptions>\n";
+      echo "   <configureoption name=\"{$this->name}\" default=\"shared\" prompt=\"{$this->name} installation directory?\" />\n";
+      echo "  </configureoptions>\n";
+    }
+
                if (@is_array($this->users)) {
                        echo "\n  <maintainers>\n";
                        foreach ($this->users as $user) {
@@ -1292,9 +1302,9 @@ you have been warned!
                                                echo "      <$key>{$user[$key]}</$key>\n";
                                        }
                                }
-                               echo "    <maintainer/>\n";
+                               echo "    </maintainer>\n";
                        }
-                       echo "  <maintainers/>\n";
+                       echo "  </maintainers>\n";
                }
                
                if (is_array($this->release)) {
@@ -1304,7 +1314,7 @@ you have been warned!
                                        echo "    <$key>{$this->release[$key]}</$key>\n";
                                }
                        }
-                       echo "  <release/>\n";
+                       echo "  </release>\n";
                }
 
                echo "\n  <filelist>\n";
index bec2082e092b5c91f43aff36df246b66e3f78e04..83a0dea878cfd0c920e03d550bb761e72072589b 100644 (file)
                }
 
                static function c_code_footer() {
-                       return "}\n\n";
+                       return "
+}
+
+static void php_{name}_shutdown_globals(zend_{name}_globals *{name}_globals)
+{
+}";
                }
 
                static function h_code_header($name) {