cvs: pear /CodeGen_PECL/PECL Extension.php ExtensionParser.php
| From: | Hartmut Holzgraefe | Date: | Tue, 07 Mar 2006 22:55:08 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL Extension.php ExtensionParser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38967@lists.php.net to get a copy of this message | ||
hholzgra Tue Mar 7 22:55:08 2006 UTC
Modified files:
/pear/CodeGen_PECL/PECL Extension.php ExtensionParser.php
Log:
support additional target dir for extra package files
http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/Extension.php?r1=1.42&r2=1.43&diff_format=u
Index: pear/CodeGen_PECL/PECL/Extension.php
diff -u pear/CodeGen_PECL/PECL/Extension.php:1.42 pear/CodeGen_PECL/PECL/Extension.php:1.43
--- pear/CodeGen_PECL/PECL/Extension.php:1.42 Mon Mar 6 20:38:40 2006
+++ pear/CodeGen_PECL/PECL/Extension.php Tue Mar 7 22:55:08 2006
@@ -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.42 2006/03/06 20:38:40 hholzgra Exp $
+ * @version CVS: $Id: Extension.php,v 1.43 2006/03/07 22:55:08 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen_PECL
*/
@@ -428,27 +428,7 @@
return true;
}
-
- /**
- * Add a package file by type and path
- *
- * @access public
- * @param string type
- * @param string path
- * @returns bool success state
- */
- function addPackageFile($type, $path)
- {
- $basename = basename($path);
-
- if (isset($this->packageFiles[$type][$basename])) {
- return PEAR::raiseError("duplicate distribution file name
'$basename'");
- }
-
- $this->packageFiles[$type][$basename] = $path;
- return true;
- }
-
+
/**
* Add a --with configure option
*
@@ -568,8 +548,12 @@
// copy additional source files
if (isset($this->packageFiles['copy'])) {
- foreach ($this->packageFiles['copy'] as $basename => $filepath) {
- copy($filepath, $this->dirpath."/".$basename);
+ foreach ($this->packageFiles['copy'] as $targetpath => $sourcepath) {
+ $targetpath = $this->dirpath."/".$targetpath;
+ if (!is_dir(dirname($targetpath))) {
+ mkdir(dirname($targetpath), 0777, true);
+ }
+ copy($sourcepath, $targetpath);
}
}
http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/ExtensionParser.php?r1=1.36&r2=1.37&diff_format=u
Index: pear/CodeGen_PECL/PECL/ExtensionParser.php
diff -u pear/CodeGen_PECL/PECL/ExtensionParser.php:1.36
pear/CodeGen_PECL/PECL/ExtensionParser.php:1.37
--- pear/CodeGen_PECL/PECL/ExtensionParser.php:1.36 Mon Mar 6 20:36:33 2006
+++ pear/CodeGen_PECL/PECL/ExtensionParser.php Tue Mar 7 22:55:08 2006
@@ -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.36 2006/03/06 20:36:33 hholzgra Exp $
+ * @version CVS: $Id: ExtensionParser.php,v 1.37 2006/03/07 22:55:08 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -667,15 +667,6 @@
}
- function tagstart_deps_file($attr) {
- if (!isset($attr['name'])) {
- return PEAR::raiseError("name attribut for file missing");
- }
-
- return $this->extension->addSourceFile($attr['name']);
- }
-
-
function tagstart_extension_code($attr)
{
if (isset($attr["src"])) {