build maintenance
authorMichael Wallner <mike@php.net>
Thu, 31 Jan 2013 21:15:54 +0000 (22:15 +0100)
committerMichael Wallner <mike@php.net>
Thu, 31 Jan 2013 21:15:54 +0000 (22:15 +0100)
TODO
config.m4
package.xml [new file with mode: 0644]
src/php_pq.c
src/php_pq.h

diff --git a/TODO b/TODO
index 5cf75470a860452c6f1eece7a2d007e3f70b311f..4d29ac5027d3315e5407f2c912cbf5bc916af311 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,6 +8,5 @@
 * bound columns/variables
 * fetchInto/fetchCtor?
 * unlisten?
-* pq\Result->__clone through PQcopyResult?
 * LOB stream wrapper
 * LOB convenience import/export over php streams
index bbd3e019cec304fadef0c19d2b38f51d7bf6cbb8..7abff92cb0bb96fc71a3cfaf2f35e8c631c2f7ed 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -23,7 +23,6 @@ if test "$PHP_PQ" != "no"; then
 
        PQ_SYM=PQregisterEventProc
        PHP_CHECK_LIBRARY(pq, $PQ_SYM, [
-               LDFLAGS="$save_LDFLAGS"
                PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_DIR/$PHP_LIBDIR, PQ_SHARED_LIBADD)
                PHP_SUBST(PQ_SHARED_LIBADD)
        ],[
@@ -31,8 +30,10 @@ if test "$PHP_PQ" != "no"; then
        ],[
                -L$PQ_DIR/$PHP_LIBDIR
        ])
+       PHP_CHECK_LIBRARY(pq, PQlibVersion, AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion))
 
        PQ_SRC="src/php_pq.c"
-    PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
        PHP_NEW_EXTENSION(pq, $PQ_SRC, $ext_shared)
+    PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
 fi
+
diff --git a/package.xml b/package.xml
new file mode 100644 (file)
index 0000000..cef28b4
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package 
+ packagerversion="1.4.11" 
+ version="2.0" 
+ xmlns="http://pear.php.net/dtd/package-2.0" 
+ xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" 
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+ xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+http://pear.php.net/dtd/tasks-1.0.xsd
+http://pear.php.net/dtd/package-2.0
+http://pear.php.net/dtd/package-2.0.xsd">
+ <name>pq</name>
+ <channel>pecl.php.net</channel>
+ <summary>libpq binding</summary>
+ <description>Binding for libpq (PostgreSQL client library)</description>
+ <lead>
+  <name>Michael Wallner</name>
+  <user>mike</user>
+  <email>mike@php.net</email>
+  <active>yes</active>
+ </lead>
+ <date>2013-01-31</date>
+ <version>
+  <release>1.0.0dev</release>
+  <api>1.0.0</api>
+ </version>
+ <stability>
+  <release>beta</release>
+  <api>beta</api>
+ </stability>
+ <license>BSD, revised</license>
+ <notes><![CDATA[
+* Initial release
+]]></notes>
+ <contents>
+  <dir name="/">
+   <file role="doc" name="CREDITS" />
+   <file role="doc" name="EXPERIMENTAL" />
+   <file role="doc" name="LICENSE" />
+   <file role="src" name="config.m4" />
+   <dir name="src">
+    <file role="src" name="php_pq.h" />
+    <file role="src" name="php_pq.c" />
+   </dir>
+   <dir name="tests">
+    <file role="test" name="async001.phpt" />
+    <file role="test" name="async002.phpt" />
+    <file role="test" name="async003.phpt" />
+    <file role="test" name="async004.phpt" />
+    <file role="test" name="async005.phpt" />
+    <file role="test" name="async006.phpt" />
+    <file role="test" name="basic001.phpt" />
+    <file role="test" name="basic002.phpt" />
+    <file role="test" name="cancel001.phpt" />
+    <file role="test" name="copy001.phpt" />
+    <file role="test" name="lob001.phpt" />
+    <file role="test" name="map001.phpt" />
+    <file role="test" name="notify001.phpt" />
+    <file role="test" name="reset001.phpt" />
+    <file role="test" name="savepoint001.phpt" />
+    <file role="test" name="stm_desc001.phpt" />
+    <file role="test" name="trans001.phpt" />
+    <file role="test" name="_setup.inc" />
+    <file role="test" name="_skipif.inc" />
+   </dir>
+  </dir>
+ </contents>
+ <dependencies>
+  <required>
+   <php>
+    <min>5.4</min>
+   </php>
+   <pearinstaller>
+    <min>1.4.0</min>
+   </pearinstaller>
+  </required>
+ </dependencies>
+ <providesextension>pq</providesextension>
+ <extsrcrelease>
+  <configureoption default="yes" name="with-pq" prompt="whether to enable libpq support" />
+ </extsrcrelease>
+</package>
+
index 86eff744ba5aceed8cb0cc0a101b734b330fd1a2..34c4ffee81fdf754885ceb192b081ee426c1e318 100644 (file)
@@ -4690,8 +4690,21 @@ static PHP_MSHUTDOWN_FUNCTION(pq)
  */
 static PHP_MINFO_FUNCTION(pq)
 {
+       int libpq_v;
+       char libpq_version[10] = "pre-9.1";
+
        php_info_print_table_start();
-       php_info_print_table_header(2, "pq support", "enabled");
+       php_info_print_table_header(2, "PQ Support", "enabled");
+       php_info_print_table_row(2, "Extension Version", PHP_PQ_EXT_VERSION);
+       php_info_print_table_end();
+
+       php_info_print_table_start();
+       php_info_print_table_header(2, "Used Library", "Version");
+#ifdef HAVE_PQLIBVERSION
+       libpq_v = PQlibVersion();
+       slprintf(libpq_version, sizeof(libpq_version), "%d.%d.%d", libpq_v/10000%100, libpq_v/100%100, libpq_v%100);
+#endif
+       php_info_print_table_row(2, "libpq", libpq_version);
        php_info_print_table_end();
 
        /* Remove comments if you have entries in php.ini
index 702d0992c895c95a6caeea1bf9304fae8f7c6aea..fc67bf0d132ecaf31c817327b825b6805afdcaf2 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef PHP_PQ_H
 #define PHP_PQ_H
 
-#define PHP_PQ_EXT_VERSION "0.1.0"
+#define PHP_PQ_EXT_VERSION "1.0.0dev"
 
 int pq_module_number;
 zend_module_entry pq_module_entry;