]> git.pld-linux.org Git - packages/php-pecl-mdbtools.git/commitdiff
- added mdb1 patch (adjust for mdbtools 1.0.x, drop no longer available function... master auto/th/php-pecl-mdbtools-1.0.0-14
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Feb 2023 08:41:56 +0000 (09:41 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Feb 2023 08:41:56 +0000 (09:41 +0100)
- release 14

php-pecl-mdbtools-mdb1.patch [new file with mode: 0644]
php-pecl-mdbtools.spec

diff --git a/php-pecl-mdbtools-mdb1.patch b/php-pecl-mdbtools-mdb1.patch
new file mode 100644 (file)
index 0000000..a86959e
--- /dev/null
@@ -0,0 +1,93 @@
+--- php-pecl-mdbtools-1.0.0/config.m4.orig     2023-02-26 09:02:15.665798499 +0100
++++ php-pecl-mdbtools-1.0.0/config.m4  2023-02-26 09:06:21.847798150 +0100
+@@ -45,7 +45,7 @@ if test "$PHP_MDBTOOLS" != "no"; then
+   PHP_SUBST(MDBTOOLS_SHARED_LIBADD)
+-  PHP_CHECK_LIBRARY(mdb, mdb_init,
++  PHP_CHECK_LIBRARY(mdb, mdb_open,
+   [
+       PHP_ADD_LIBRARY_WITH_PATH(mdb, $PHP_MDBTOOLS_DIR/lib, MDBTOOLS_SHARED_LIBADD)
+   ],[
+--- php-pecl-mdbtools-1.0.0/mdbtools.c.orig    2023-02-26 09:08:23.800470809 +0100
++++ php-pecl-mdbtools-1.0.0/mdbtools.c 2023-02-26 09:38:31.430678036 +0100
+@@ -76,7 +76,6 @@ function_entry mdbtools_functions[] = {
+       PHP_FE(mdb_num_rows        , mdb_num_rows_arg_info)
+       PHP_FE(mdb_table_fields    , mdb_table_fields_arg_info)
+       PHP_FE(mdb_table_indexes   , mdb_table_indexes_arg_info)
+-      PHP_FE(mdb_type_name       , mdb_type_name_arg_info)
+       { NULL, NULL, NULL }
+ };
+ /* }}} */
+@@ -125,9 +124,6 @@ PHP_MINIT_FUNCTION(mdbtools)
+                                                  NULL, "MdbDatabase", module_number);
+       le_MdbTable = zend_register_list_destructors_ex(MdbTable_dtor, 
+                                                  NULL, "MdbTable", module_number);
+-      do {
+-              mdb_init();
+-      } while (0);
+       return SUCCESS;
+ }
+@@ -137,10 +133,6 @@ PHP_MINIT_FUNCTION(mdbtools)
+ /* {{{ PHP_MSHUTDOWN_FUNCTION */
+ PHP_MSHUTDOWN_FUNCTION(mdbtools)
+ {
+-      do {
+-              mdb_exit();
+-      } while (0);
+-
+       return SUCCESS;
+ }
+ /* }}} */
+@@ -655,31 +647,6 @@ PHP_FUNCTION(mdb_table_indexes)
+ /* }}} mdb_table_indexes */
+-/* {{{ proto string mdb_type_name(resource MdbDatabase db, int typecode)
+-  Look up the name for a field type */
+-PHP_FUNCTION(mdb_type_name)
+-{
+-      zval * db_res = NULL;
+-      int db_resid = -1;
+-      MdbHandle * db;
+-
+-      long typecode = 0;
+-
+-
+-
+-      if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &db_res, &typecode) == FAILURE) {
+-              return;
+-      }
+-      ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase);
+-
+-
+-
+-      do {
+-              RETURN_STRING(mdb_get_coltype_string (db->default_backend, typecode), 1);
+-      } while (0);
+-}
+-/* }}} mdb_type_name */
+-
+ #endif /* HAVE_MDBTOOLS */
+--- php-pecl-mdbtools-1.0.0/php_mdbtools.h.orig        2007-11-27 16:13:18.000000000 +0100
++++ php-pecl-mdbtools-1.0.0/php_mdbtools.h     2023-02-26 09:38:42.637283991 +0100
+@@ -203,16 +203,6 @@ ZEND_END_ARG_INFO()
+ #define mdb_table_indexes_arg_info NULL
+ #endif
+-PHP_FUNCTION(mdb_type_name);
+-#if (PHP_MAJOR_VERSION >= 5)
+-ZEND_BEGIN_ARG_INFO_EX(mdb_type_name_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 2)
+-  ZEND_ARG_INFO(0, db)
+-  ZEND_ARG_INFO(0, typecode)
+-ZEND_END_ARG_INFO()
+-#else /* PHP 4.x */
+-#define mdb_type_name_arg_info NULL
+-#endif
+-
+ #ifdef  __cplusplus
+ } // extern "C" 
+ #endif
index b12ca87976cafb5941ec69d20866b50e2bce23c9..b7655fef79f77699182d072ca62c8e27273fa1f2 100644 (file)
@@ -5,16 +5,17 @@ Summary:      %{modname} - MDB data file access library
 Summary(pl.UTF-8):     %{modname} - biblioteka dostępu do plików MDB
 Name:          %{php_name}-pecl-%{modname}
 Version:       1.0.0
-Release:       13
-License:       LGPL
+Release:       14
+License:       LGPL v2.1+
 Group:         Development/Languages/PHP
 Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: 758f844257c50dbd07c2b9a67a83954b
 Patch0:                php-pecl-%{modname}-paths.patch
 Patch1:                mdb-0.7.patch
+Patch2:                php-pecl-%{modname}-mdb1.patch
 URL:           http://pecl.php.net/package/mdbtools/
 BuildRequires: %{php_name}-devel >= 3:5.0.4
-BuildRequires: mdbtools-devel
+BuildRequires: mdbtools-devel >= 1.0
 BuildRequires: rpmbuild(macros) >= 1.650
 %{?requires_php_extension}
 Provides:      php(%{modname}) = %{version}
@@ -36,9 +37,10 @@ To rozszerzenie ma w PECL status: %{status}.
 
 %prep
 %setup -qc
-mv %{modname}-%{version}/* .
+%{__mv} %{modname}-%{version}/* .
 %patch0 -p2
 %patch1 -p1
+%patch2 -p1
 
 %build
 phpize
This page took 0.119227 seconds and 4 git commands to generate.