cvs: pear /CodeGen_PECL/PECL Extension.php ExtensionParser.php /CodeGen_PECL/PECL/Dependency Lib.php
| From: | Hartmut Holzgraefe | Date: | Sun, 24 Jul 2005 21:29:02 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL Extension.php ExtensionParser.php /CodeGen_PECL/PECL/Dependency Lib.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33280@lists.php.net to get a copy of this message | ||
hholzgra Sun Jul 24 17:29:02 2005 EDT
Modified files:
/pear/CodeGen_PECL/PECL Extension.php ExtensionParser.php
/pear/CodeGen_PECL/PECL/Dependency Lib.php
Log:
refactoring bugs fixed
.cvsignore output simplified
http://cvs.php.net/diff.php/pear/CodeGen_PECL/PECL/Extension.php?r1=1.2&r2=1.3&ty=u
Index: pear/CodeGen_PECL/PECL/Extension.php
diff -u pear/CodeGen_PECL/PECL/Extension.php:1.2 pear/CodeGen_PECL/PECL/Extension.php:1.3
--- pear/CodeGen_PECL/PECL/Extension.php:1.2 Sun Jul 24 13:41:55 2005
+++ pear/CodeGen_PECL/PECL/Extension.php Sun Jul 24 17:28:58 2005
@@ -15,7 +15,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @copyright 2005 Hartmut Holzgraefe
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Extension.php,v 1.2 2005/07/24 17:41:55 hholzgra Exp $
+ * @version CVS: $Id: Extension.php,v 1.3 2005/07/24 21:28:58 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -1689,10 +1689,10 @@
// add libraries from <deps> section
if (count($this->libs)) {
foreach ($this->libs as $lib) {
- if (!$lib["platform"]->test("windows")) {
+ if (!$lib->testPlatform("windows")) {
continue;
}
- $winlibs .= " $lib[name].lib";
+ $winlibs .= " ".$lib->getName().".lib";
}
}
@@ -2008,69 +2008,67 @@
*/
function writeDotCvsignore()
{
- // open output file
- $fp = fopen($this->dirpath."/.cvsignore", "w");
+ ob_start();
// unix specific entries
if ($this->platform->test("unix")) {
- fputs($fp, "*.lo\n");
- fputs($fp, "*.la\n");
- fputs($fp, ".deps\n");
- fputs($fp, ".libs\n");
- fputs($fp, "Makefile\n");
- fputs($fp, "Makefile.fragments\n");
- fputs($fp, "Makefile.global\n");
- fputs($fp, "Makefile.objects\n");
- fputs($fp, "acinclude.m4\n");
- fputs($fp, "aclocal.m4\n");
- fputs($fp, "autom4te.cache\n");
- fputs($fp, "build\n");
- fputs($fp, "config.cache\n");
- fputs($fp, "config.guess\n");
- fputs($fp, "config.h\n");
- fputs($fp, "config.h.in\n");
- fputs($fp, "config.log\n");
- fputs($fp, "config.nice\n");
- fputs($fp, "config.status\n");
- fputs($fp, "config.sub\n");
- fputs($fp, "configure\n");
- fputs($fp, "configure.in\n");
- fputs($fp, "conftest\n");
- fputs($fp, "conftest.c\n");
- fputs($fp, "include\n");
- fputs($fp, "install-sh\n");
- fputs($fp, "libtool\n");
- fputs($fp, "ltmain.sh\n");
- fputs($fp, "missing\n");
- fputs($fp, "mkinstalldirs\n");
- fputs($fp, "modules\n");
- fputs($fp, "scan_makefile_in.awk\n");
+ echo
+"*.lo
+*.la
+.deps
+.libs
+Makefile
+Makefile.fragments
+Makefile.global
+Makefile.objects
+acinclude.m4
+aclocal.m4
+autom4te.cache
+build
+config.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.nice
+config.status
+config.sub
+configure
+configure.in
+conftest
+conftest.c
+include
+install-sh
+libtool
+ltmain.sh
+missing
+mkinstalldirs
+modules
+scan_makefile_in.awk
+";
}
// windows specific entries
if ($this->platform->test("windows")) {
- fputs($fp, "*.dsw\n");
- fputs($fp, "*.plg\n");
- fputs($fp, "*.opt\n");
- fputs($fp, "*.ncb\n");
- fputs($fp, "Release\n");
- fputs($fp, "Release_inline\n");
- fputs($fp, "Debug\n");
- fputs($fp, "Release_TS\n");
- fputs($fp, "Release_TSDbg\n");
- fputs($fp, "Release_TS_inline\n");
- fputs($fp, "Debug_TS\n");
+ echo
+"*.dsw
+*.plg
+*.opt
+*.ncb
+Release
+Release_inline
+Debug
+Release_TS
+Release_TSDbg
+Release_TS_inline
+Debug_TS
+";
}
// "pear package" creates .tgz
- fputs($fp, "*.tgz\n");
+ echo "{$this->name}*.tgz\n";
- // some typical backup file patterns
- fputs($fp, "*~\n");
- fputs($fp, "#*#\n");
- fputs($fp, ".#*\n");
-
- fclose($fp);
+ return $this->obToFile(".cvsignore");
}
/**
http://cvs.php.net/diff.php/pear/CodeGen_PECL/PECL/ExtensionParser.php?r1=1.1&r2=1.2&ty=u
Index: pear/CodeGen_PECL/PECL/ExtensionParser.php
diff -u pear/CodeGen_PECL/PECL/ExtensionParser.php:1.1
pear/CodeGen_PECL/PECL/ExtensionParser.php:1.2
--- pear/CodeGen_PECL/PECL/ExtensionParser.php:1.1 Sat Jul 23 17:35:04 2005
+++ pear/CodeGen_PECL/PECL/ExtensionParser.php Sun Jul 24 17:28:59 2005
@@ -15,7 +15,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @copyright 2005 Hartmut Holzgraefe
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: ExtensionParser.php,v 1.1 2005/07/23 21:35:04 hholzgra Exp $
+ * @version CVS: $Id: ExtensionParser.php,v 1.2 2005/07/24 21:28:59 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -41,7 +41,7 @@
{
- function tagstart_extension_maintainer($attr)
+ function tagstart_maintainer($attr)
{
// check: never popped?
$this->pushHelper(new CodeGen_PECL_Maintainer);
http://cvs.php.net/diff.php/pear/CodeGen_PECL/PECL/Dependency/Lib.php?r1=1.1&r2=1.2&ty=u
Index: pear/CodeGen_PECL/PECL/Dependency/Lib.php
diff -u pear/CodeGen_PECL/PECL/Dependency/Lib.php:1.1 pear/CodeGen_PECL/PECL/Dependency/Lib.php:1.2
--- pear/CodeGen_PECL/PECL/Dependency/Lib.php:1.1 Sat Jul 23 17:35:04 2005
+++ pear/CodeGen_PECL/PECL/Dependency/Lib.php Sun Jul 24 17:29:02 2005
@@ -15,7 +15,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @copyright 2005 Hartmut Holzgraefe
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Lib.php,v 1.1 2005/07/23 21:35:04 hholzgra Exp $
+ * @version CVS: $Id: Lib.php,v 1.2 2005/07/24 21:29:02 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -66,6 +66,11 @@
return $this->name;
}
+ function testPlatform($name)
+ {
+ return $this->platform->test($name);
+ }
+
function configm4($extName, $withName)
{
static $first = true;
@@ -87,7 +92,7 @@
$ret.= " PHP_ADD_LIBRARY_WITH_PATH({$this->name},
\$PHP_{$withUpname}_DIR/{$this->path}, {$extUpname}_SHARED_LIBADD)\n";
if ($this->function) {
- $ret.= " AC_CHECK_LIB({$this->name}, {$this->function},
[AC_DEFINE(HAVE_{$this->upname},1,[ ])], [AC_MSG_ERROR({$this->name} library not found or
wrong version)],)\n";
+ $ret.= " AC_CHECK_LIB({$this->name}, {$this->function},
[AC_DEFINE(HAVE_{$extUpname},1,[ ])], [AC_MSG_ERROR({$this->name} library not found or wrong
version)],)\n";
}
return $ret;
@@ -99,7 +104,7 @@
return "";
}
- $extUpname = strtoupper($extname);
+ $extUpname = strtoupper($extName);
return "
if (!CHECK_LIB(\"{$this->name}.lib\", \"{$extName}\", PHP_$extUpname)) {