diff options
author | Remi Collet <remi@remirepo.net> | 2025-08-29 16:34:41 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-08-29 16:34:41 +0200 |
commit | a1ab71cdeb8893159dae89e600641c0525208297 (patch) | |
tree | 4442787a08fe12dbce134eeb58abe96f1b32ec23 | |
parent | 580753fa9993e479740a574af5619552b62c0011 (diff) |
update to 0.4.1
re-license spec file to CECILL-2.1
move from pecl to pie packaging
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | 3_01.txt | 68 | ||||
-rw-r--r-- | PHPINFO | 5 | ||||
-rw-r--r-- | REFLECTION | 346 | ||||
-rw-r--r-- | dbus-rpath.patch | 13 | ||||
-rw-r--r-- | dbus-svn.patch | 221 | ||||
-rw-r--r-- | php-pecl-dbus.spec | 225 |
7 files changed, 355 insertions, 532 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/3_01.txt b/3_01.txt deleted file mode 100644 index 6059c80..0000000 --- a/3_01.txt +++ /dev/null @@ -1,68 +0,0 @@ --------------------------------------------------------------------- - The PHP License, version 3.01 -Copyright (c) 1999 - 2014 The PHP Group. All rights reserved. --------------------------------------------------------------------- - -Redistribution and use in source and binary forms, with or without -modification, is permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. The name "PHP" must not be used to endorse or promote products - derived from this software without prior written permission. For - written permission, please contact group@php.net. - - 4. Products derived from this software may not be called "PHP", nor - may "PHP" appear in their name, without prior written permission - from group@php.net. You may indicate that your software works in - conjunction with PHP by saying "Foo for PHP" instead of calling - it "PHP Foo" or "phpfoo" - - 5. The PHP Group may publish revised and/or new versions of the - license from time to time. Each version will be given a - distinguishing version number. - Once covered code has been published under a particular version - of the license, you may always continue to use it under the terms - of that version. You may also choose to use such covered code - under the terms of any subsequent version of the license - published by the PHP Group. No one other than the PHP Group has - the right to modify the terms applicable to covered code created - under this License. - - 6. Redistributions of any form whatsoever must retain the following - acknowledgment: - "This product includes PHP software, freely available from - <http://www.php.net/software/>". - -THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND -ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP -DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- - -This software consists of voluntary contributions made by many -individuals on behalf of the PHP Group. - -The PHP Group can be contacted via Email at group@php.net. - -For more information on the PHP Group and the PHP project, -please see <http://www.php.net>. - -PHP includes the Zend Engine, freely available at -<http://www.zend.com>. @@ -0,0 +1,5 @@ + +dbus + +Dbus support => enabled +Version => 0.4.1 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #79 dbus version 0.1.1 ] { +Extension [ <persistent> extension #75 dbus version 0.4.1 ] { - Dependencies { Dependency [ libxml (Required) ] @@ -8,22 +8,22 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { Class [ <internal:dbus> class Dbus ] { - Constants [16] { - Constant [ integer BYTE ] { 121 } - Constant [ integer BOOLEAN ] { 98 } - Constant [ integer INT16 ] { 110 } - Constant [ integer UINT16 ] { 113 } - Constant [ integer INT32 ] { 105 } - Constant [ integer UINT32 ] { 117 } - Constant [ integer INT64 ] { 120 } - Constant [ integer UINT64 ] { 116 } - Constant [ integer DOUBLE ] { 100 } - Constant [ integer STRING ] { 115 } - Constant [ integer ARRAY ] { 97 } - Constant [ integer VARIANT ] { 118 } - Constant [ integer STRUCT ] { 114 } - Constant [ integer OBJECT_PATH ] { 111 } - Constant [ integer BUS_SESSION ] { 0 } - Constant [ integer BUS_SYSTEM ] { 1 } + Constant [ public int BYTE ] { 121 } + Constant [ public int BOOLEAN ] { 98 } + Constant [ public int INT16 ] { 110 } + Constant [ public int UINT16 ] { 113 } + Constant [ public int INT32 ] { 105 } + Constant [ public int UINT32 ] { 117 } + Constant [ public int INT64 ] { 120 } + Constant [ public int UINT64 ] { 116 } + Constant [ public int DOUBLE ] { 100 } + Constant [ public int STRING ] { 115 } + Constant [ public int ARRAY ] { 97 } + Constant [ public int VARIANT ] { 118 } + Constant [ public int STRUCT ] { 114 } + Constant [ public int OBJECT_PATH ] { 111 } + Constant [ public int BUS_SESSION ] { 0 } + Constant [ public int BUS_SYSTEM ] { 1 } } - Static properties [0] { @@ -37,26 +37,44 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [6] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method addWatch ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method waitLoop ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method requestName ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method registerObject ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method createProxy ] { + + - Parameters [0] { + } } } } - Class [ <internal:dbus> class DbusException extends Exception ] { + Class [ <internal:dbus> final class DbusException extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -68,49 +86,87 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - - Methods [9] { + - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:dbus> class DbusExceptionServiceUnknown extends Exception ] { + Class [ <internal:dbus> final class DbusExceptionServiceUnknown extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -122,49 +178,87 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - - Methods [9] { + - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:dbus> class DbusExceptionUnknownMethod extends Exception ] { + Class [ <internal:dbus> final class DbusExceptionUnknownMethod extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -176,44 +270,82 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - - Methods [9] { + - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -234,6 +366,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> private method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method __call ] { @@ -262,15 +397,27 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [4] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method matches ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method send ] { + + - Parameters [0] { + } } } } @@ -291,9 +438,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -314,9 +467,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -337,9 +496,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -360,9 +525,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -383,9 +554,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -406,9 +583,15 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [2] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:dbus> public method getData ] { + + - Parameters [0] { + } } } } @@ -429,6 +612,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -449,6 +635,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -469,6 +658,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -489,6 +681,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -509,6 +704,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -529,6 +727,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -549,6 +750,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -569,6 +773,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } @@ -589,6 +796,9 @@ Extension [ <persistent> extension #79 dbus version 0.1.1 ] { - Methods [1] { Method [ <internal:dbus, ctor> public method __construct ] { + + - Parameters [0] { + } } } } diff --git a/dbus-rpath.patch b/dbus-rpath.patch deleted file mode 100644 index cb9da29..0000000 --- a/dbus-rpath.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- dbus-0.1.1/config.m4.old 2014-02-23 08:04:27.000000000 +0100 -+++ dbus-0.1.1/config.m4 2014-02-23 08:13:18.000000000 +0100 -@@ -25,8 +25,8 @@ - - AC_MSG_CHECKING(for dbus) - if $PKG_CONFIG --exists dbus-1; then -- AC_MSG_RESULT(found) -- LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs dbus-1`" -+ LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs dbus-1 | sed -e s:-L/$PHP_LIBDIR:-L/usr/$PHP_LIBDIR:`" -+ AC_MSG_RESULT(found: $LDFLAGS) - CFLAGS="$CFLAGS `$PKG_CONFIG --cflags dbus-1`" - PHP_SETUP_LIBXML(DBUS_SHARED_LIBADD, [ - AC_DEFINE(HAVE_DBUS, 1, [whether dbus exists in the system]) diff --git a/dbus-svn.patch b/dbus-svn.patch deleted file mode 100644 index 40c6d49..0000000 --- a/dbus-svn.patch +++ /dev/null @@ -1,221 +0,0 @@ ---- pecl/dbus/trunk/dbus.c 2011/08/03 16:10:11 314193 -+++ pecl/dbus/trunk/dbus.c 2011/08/03 16:21:30 314194 -@@ -1031,7 +1031,7 @@ - dbusobj->dbus = dbus; - dbusobj->destination = estrdup(destination); - dbusobj->path = estrdup(path); -- dbusobj->interface = estrdup(interface); -+ dbusobj->interface = interface ? estrdup(interface) : NULL; - - return 1; - } -@@ -1099,7 +1099,7 @@ - int destination_len, path_len, interface_len; - - dbus_set_error_handling(EH_THROW, NULL TSRMLS_CC); -- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Osss", -+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Osss!", - &object, dbus_ce_dbus, - &destination, &destination_len, &path, &path_len, - &interface, &interface_len)) -@@ -1127,7 +1127,7 @@ - int destination_len, path_len, interface_len; - - dbus_set_error_handling(EH_THROW, NULL TSRMLS_CC); -- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", -+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss!", - &destination, &destination_len, &path, &path_len, - &interface, &interface_len)) - { -@@ -1221,10 +1221,11 @@ - - static void php_dbus_accept_incoming_method_call(php_dbus_obj *dbus, DBusMessage *msg, zval **return_value TSRMLS_DC) - { -- char *key, *class; -+ char *key, *class, *interface; - - /* See if we can find a class mapping for this object */ -- spprintf(&key, 0, "%s:%s", dbus_message_get_path(msg), dbus_message_get_interface(msg)); -+ interface = dbus_message_get_interface(msg); -+ spprintf(&key, 0, "%s:%s", dbus_message_get_path(msg), interface ? interface : "(null)"); - if (zend_hash_find(&(dbus->objects), key, strlen(key) + 1, (void**) &class) == SUCCESS) { - zend_class_entry **pce; - -@@ -1336,14 +1337,17 @@ - - dbus_set_error_handling(EH_THROW, NULL TSRMLS_CC); - if (FAILURE == zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), -- "Osss", &object, dbus_ce_dbus, &path, &path_len, &interface, &interface_len, -+ "Oss!s", &object, dbus_ce_dbus, &path, &path_len, &interface, &interface_len, - &class, &class_len)) { - RETURN_FALSE; - } - dbus = (php_dbus_obj *) zend_object_store_get_object(object TSRMLS_CC); - - /* Create the key out of the path and interface */ -- spprintf(&key, 0, "%s:%s", path, interface); -+ spprintf(&key, 0, "%s:%s", path, interface ? interface : "(null)"); -+ if (interface == NULL) { -+ interface_len = 6; -+ } - - /* Add class name to hash */ - zend_hash_add(&(dbus->objects), key, path_len + interface_len + 2, (void*) estrdup(class), strlen(class)+1, NULL); ---- pecl/dbus/trunk/dbus.c 2011/08/30 16:26:43 315793 -+++ pecl/dbus/trunk/dbus.c 2011/08/30 16:29:53 315794 -@@ -26,6 +26,7 @@ - #include "ext/standard/php_versioning.h" - #include "php_dbus.h" - #include "zend_extensions.h" -+#include "zend_exceptions.h" - #include "zend_interfaces.h" - #include "zend_hash.h" - #include "dbus/dbus.h" -@@ -157,6 +158,7 @@ - zend_class_entry *dbus_ce_dbus_array, *dbus_ce_dbus_dict, *dbus_ce_dbus_variant; - zend_class_entry *dbus_ce_dbus_variant, *dbus_ce_dbus_set, *dbus_ce_dbus_struct; - zend_class_entry *dbus_ce_dbus_object_path; -+zend_class_entry *dbus_ce_dbus_exception, *dbus_ce_dbus_exception_service, *dbus_ce_dbus_exception_method; - - static zend_object_handlers dbus_object_handlers_dbus, dbus_object_handlers_dbus_object; - static zend_object_handlers dbus_object_handlers_dbus_signal; -@@ -444,6 +446,7 @@ - zend_class_entry ce_dbus, ce_dbus_object, ce_dbus_array, ce_dbus_dict; - zend_class_entry ce_dbus_variant, ce_dbus_signal, ce_dbus_set, ce_dbus_struct; - zend_class_entry ce_dbus_object_path; -+ zend_class_entry ce_dbus_exception, ce_dbus_exception_service, ce_dbus_exception_method; - - INIT_CLASS_ENTRY(ce_dbus, "Dbus", dbus_funcs_dbus); - ce_dbus.create_object = dbus_object_new_dbus; -@@ -470,6 +473,18 @@ - zend_declare_class_constant_long(dbus_ce_dbus, "BUS_SESSION", sizeof("BUS_SESSION")-1, DBUS_BUS_SESSION TSRMLS_CC); - zend_declare_class_constant_long(dbus_ce_dbus, "BUS_SYSTEM", sizeof("BUS_SYSTEM")-1, DBUS_BUS_SYSTEM TSRMLS_CC); - -+ INIT_CLASS_ENTRY(ce_dbus_exception, "DbusException", NULL); -+ dbus_ce_dbus_exception = zend_register_internal_class_ex(&ce_dbus_exception, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); -+ dbus_ce_dbus_exception->ce_flags |= ZEND_ACC_FINAL; -+ -+ INIT_CLASS_ENTRY(ce_dbus_exception_service, "DbusExceptionServiceUnknown", NULL); -+ dbus_ce_dbus_exception_service = zend_register_internal_class_ex(&ce_dbus_exception_service, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); -+ dbus_ce_dbus_exception_service->ce_flags |= ZEND_ACC_FINAL; -+ -+ INIT_CLASS_ENTRY(ce_dbus_exception_method, "DbusExceptionUnknownMethod", NULL); -+ dbus_ce_dbus_exception_method = zend_register_internal_class_ex(&ce_dbus_exception_method, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); -+ dbus_ce_dbus_exception_method->ce_flags |= ZEND_ACC_FINAL; -+ - INIT_CLASS_ENTRY(ce_dbus_object, "DbusObject", dbus_funcs_dbus_object); - ce_dbus_object.create_object = dbus_object_new_dbus_object; - dbus_ce_dbus_object = zend_register_internal_class_ex(&ce_dbus_object, NULL, NULL TSRMLS_CC); -@@ -1883,12 +1898,23 @@ - - static int php_dbus_handle_reply(zval *return_value, DBusMessage *msg, int always_array TSRMLS_DC) - { -- DBusMessageIter args; -- dbus_int64_t stat; -- zval *val; -+ zend_class_entry *exception_ce = NULL; -+ DBusMessageIter args; -+ dbus_int64_t stat; -+ zval *val; - - if (dbus_message_get_type(msg) == DBUS_MESSAGE_TYPE_ERROR) { -- dbus_set_error_handling(EH_THROW, NULL TSRMLS_CC); -+ const char* error_msg_str = dbus_message_get_error_name(msg); -+ -+ if (!strcmp(error_msg_str, DBUS_ERROR_SERVICE_UNKNOWN)) { -+ exception_ce = dbus_ce_dbus_exception_service; -+ } else if (!strcmp(error_msg_str, DBUS_ERROR_UNKNOWN_METHOD)) { -+ exception_ce = dbus_ce_dbus_exception_method; -+ } else { -+ exception_ce = dbus_ce_dbus_exception; -+ } -+ -+ dbus_set_error_handling(EH_THROW, exception_ce TSRMLS_CC); - if (!dbus_message_iter_init(msg, &args)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", dbus_message_get_error_name(msg)); - return 0; ---- pecl/dbus/trunk/dbus.c 2013/11/03 14:09:33 332054 -+++ pecl/dbus/trunk/dbus.c 2013/11/03 15:36:02 332055 -@@ -2,7 +2,7 @@ - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ -- | Copyright (c) 1997-2008 The PHP Group | -+ | Copyright (c) 2008-2013 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | -@@ -39,7 +39,7 @@ - #endif - - #if PHP_MINOR_VERSION > 3 --# define INIT_OBJ_PROP object_properties_init(&intern->std, class_type); -+# define INIT_OBJ_PROP object_properties_init(&intern->std, class_type); if (!intern->std.properties) { rebuild_object_properties(&intern->std); }; - #else - # define INIT_OBJ_PROP zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - #endif -@@ -348,9 +348,9 @@ - - static int dbus_object_compare_dbus(zval *d1, zval *d2 TSRMLS_DC); - --/* This is need to ensure that session extension request shutdown occurs 1st, because it uses the dbus extension */ - static const zend_module_dep dbus_deps[] = { -- {NULL, NULL, NULL} -+ ZEND_MOD_REQUIRED("libxml") -+ ZEND_MOD_END - }; - - #ifdef COMPILE_DL_DBUS -@@ -2208,8 +2208,8 @@ - zend_hash_update(props, "signature", 10, (void*)&sig, sizeof(zval *), NULL); - } - -- zend_hash_update(props, "array", 6, (void*)&array_obj->elements, sizeof(zval *), NULL); - Z_ADDREF_P(array_obj->elements); -+ zend_hash_update(props, "array", 6, (void*)&array_obj->elements, sizeof(zval *), NULL); - - return props; - } -@@ -2274,8 +2274,8 @@ - zend_hash_update(props, "signature", 10, (void*)&sig, sizeof(zval *), NULL); - } - -- zend_hash_update(props, "dict", 5, (void*)&dict_obj->elements, sizeof(zval *), NULL); - Z_ADDREF_P(dict_obj->elements); -+ zend_hash_update(props, "dict", 5, (void*)&dict_obj->elements, sizeof(zval *), NULL); - - return props; - } -@@ -2328,8 +2328,8 @@ - - props = variant_obj->std.properties; - -- zend_hash_update(props, "variant", 8, (void*)&variant_obj->data, sizeof(zval *), NULL); - Z_ADDREF_P(variant_obj->data); -+ zend_hash_update(props, "variant", 8, (void*)&variant_obj->data, sizeof(zval *), NULL); - - return props; - } -@@ -2453,8 +2453,8 @@ - - props = struct_obj->std.properties; - -- zend_hash_update(props, "struct", 7, (void*)&struct_obj->elements, sizeof(zval *), NULL); - Z_ADDREF_P(struct_obj->elements); -+ zend_hash_update(props, "struct", 7, (void*)&struct_obj->elements, sizeof(zval *), NULL); - - return props; - } ---- pecl/dbus/trunk/dbus.c 2014/02/21 10:51:45 332875 -+++ pecl/dbus/trunk/dbus.c 2014/02/23 07:50:34 332876 -@@ -44,6 +44,10 @@ - # define INIT_OBJ_PROP zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - #endif - -+#ifndef ZEND_MOD_END -+#define ZEND_MOD_END {NULL, NULL, NULL} -+#endif -+ - /* {{{ arginfo */ - ZEND_BEGIN_ARG_INFO_EX(arginfo_dbus_object___call, 0, 0, 2) - ZEND_ARG_INFO(0, function_name) diff --git a/php-pecl-dbus.spec b/php-pecl-dbus.spec index ccd9ef4..ac1e825 100644 --- a/php-pecl-dbus.spec +++ b/php-pecl-dbus.spec @@ -1,80 +1,54 @@ -# spec file for php-pecl-dbus +# remirepo spec file for php-pecl-dbus # -# Copyright (c) 2014-2017 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2014-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-dbus} - -%global with_zts 0%{?__ztsphp:1} -%global pecl_name dbus -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif +%{?scl:%scl_package php-pecl-dbus} + +%bcond_without tests + +# Extension +%global ext_name dbus +%global ini_name 40-%{ext_name}.ini +%global upstream_version 0.4.1 +#global upstream_prever RC1 +# PIE / packagist +%global pie_vend pecl +%global pie_proj dbus +# Github forge +%global gh_vend derickr +%global gh_proj pecl-dbus +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +#global commit b3ae87353da524f33374ee0418ad48f704bb6af1 +%global tag %{upstream_version}%{?upstream_prever} Summary: Extension for interaction with DBUS busses -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.1.1 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} -License: BSD -Group: Development/Languages -URL: http://pecl.php.net/package/DBus -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz - -# Link from dbus.c header -Source1: http://www.php.net/license/3_01.txt - -# Fix RPATH added because of "pkg-config --libs dbus-1" -Patch0: %{pecl_name}-rpath.patch - -# http://svn.php.net/viewvc?view=revision&revision=332876 -# http://svn.php.net/viewvc?view=revision&revision=332055 -# http://svn.php.net/viewvc?view=revision&revision=315794 -# http://svn.php.net/viewvc?view=revision&revision=314194 -Patch1: %{pecl_name}-svn.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel > 5.2 -BuildRequires: %{?scl_prefix}php-pear +Name: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +%forgemeta +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: PHP-3.01 +URL: %{forgeurl} +Source0: %{forgesource} + +BuildRequires: make +BuildRequires: %{?dtsprefix}gcc +BuildRequires: (%{?scl_prefix}php-devel >= 8.0 with %{?scl_prefix}php-devel < 8.6) BuildRequires: dbus-devel BuildRequires: libxml2-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} - -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} -Obsoletes: php53u-pecl-%{pecl_name} -Obsoletes: php54-pecl-%{pecl_name} -Obsoletes: php54w-pecl-%{pecl_name} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} -Obsoletes: php55w-pecl-%{pecl_name} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} -Obsoletes: php56w-pecl-%{pecl_name} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif + +# PECL/PIE +Provides: %{?scl_prefix}php-%{ext_name} = %{version} +Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{ext_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{ext_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} %description @@ -83,17 +57,7 @@ and also act as a DBUS service. %prep -%setup -q -c -mv %{pecl_name}-%{version} NTS - -cd NTS -%patch0 -p1 -b .rpath -%patch1 -p3 -b .upstream - -cp %{SOURCE1} LICENSE - -# Fix version -sed -e '/PHP_DBUS_VERSION/s/0.1.0/%{version}/' -i php_dbus.h +%forgesetup # Sanity check, really often broken extver=$(sed -n '/#define PHP_DBUS_VERSION/{s/.* "//;s/".*$//;p}' php_dbus.h) @@ -101,119 +65,56 @@ if test "x${extver}" != "x%{version}"; then : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi -cd .. - -%if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS -%endif # Create configuration file cat > %{ini_name} << 'EOF' -; Enable %{pecl_name} extension module -extension=%{pecl_name}.so +; Enable %{ext_name} extension module +extension=%{ext_name} EOF %build -cd NTS -%{_bindir}/phpize -%configure \ - --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} +export PHP_RPATH=no + +%{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -%if %{with_zts} -cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} -%endif + --with-php-config=%{__phpconfig} +%make_build -%install -rm -rf %{buildroot} -make -C NTS \ - install INSTALL_ROOT=%{buildroot} +%install +%make_install # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -# Install XML package description -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml - -%if %{with_zts} -make -C ZTS \ - install INSTALL_ROOT=%{buildroot} - -install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - -# Documentation -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done -%{!?_licensedir:install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE} - - -%if 0%{?fedora} < 24 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - %check -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension=modules/%{pecl_name}.so \ - --modules | grep %{pecl_name} - -%if %{with_zts} -cd ../ZTS -: Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=modules/%{pecl_name}.so \ - --modules | grep %{pecl_name} -%endif - - -%clean -rm -rf %{buildroot} + --define extension=modules/%{ext_name}.so \ + --modules | grep '^%{ext_name}$' %files -%defattr(-,root,root,-) -%{?_licensedir:%license NTS/LICENSE} -%doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%license LICENSE +%doc composer.json +%doc CREDITS +%doc README.rst %config(noreplace) %{php_inidir}/%{ini_name} -%{php_extdir}/%{pecl_name}.so - -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif +%{php_extdir}/%{ext_name}.so %changelog +* Fri Aug 29 2025 Remi Collet <remi@remirepo.net> - 0.4.1-1 +- update to 0.4.1 +- re-license spec file to CECILL-2.1 +- move from pecl to pie packaging + * Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 0.1.1-5 - adapt for F24 - drop runtime dependency on pear, new scriptlets |