pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php5 load extensions via dlopen(), in preference ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/35d5db624c7d
branches:  trunk
changeset: 532941:35d5db624c7d
user:      jdolecek <jdolecek%pkgsrc.org@localhost>
date:      Tue Sep 04 23:39:31 2007 +0000

description:
load extensions via dlopen(), in preference to using NsLinkModule() et.al. on Mac OS X,
so that symbols of loaded modules are available for other, dependant modules;
dlopen() is native function since 10.4, so actually apparently preferable interface
now

this is necessary for PDO family of modules (pdo_* depends on symbols of PDO module),
and for XSL module (which depends on symbols of DOM module); doing it this way
allows for PDO and DOM modules to be also shared and dynamically loaded, this avoids
need to compile them into main PHP binary

bump PKGREVISION, this is functionality change for Mac OS X (no change for other
platforms)

diffstat:

 lang/php5/Makefile         |   4 ++--
 lang/php5/distinfo         |   4 +++-
 lang/php5/patches/patch-ap |  39 +++++++++++++++++++++++++++++++++++++++
 lang/php5/patches/patch-aq |  22 ++++++++++++++++++++++
 4 files changed, 66 insertions(+), 3 deletions(-)

diffs (97 lines):

diff -r 994c2016774f -r 35d5db624c7d lang/php5/Makefile
--- a/lang/php5/Makefile        Tue Sep 04 23:21:27 2007 +0000
+++ b/lang/php5/Makefile        Tue Sep 04 23:39:31 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.59 2007/09/04 22:12:23 jdolecek Exp $
+# $NetBSD: Makefile,v 1.60 2007/09/04 23:39:31 jdolecek Exp $
 
 PKGNAME=               php-${PHP_BASE_VERS}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            lang
 
 HOMEPAGE=              http://www.php.net/
diff -r 994c2016774f -r 35d5db624c7d lang/php5/distinfo
--- a/lang/php5/distinfo        Tue Sep 04 23:21:27 2007 +0000
+++ b/lang/php5/distinfo        Tue Sep 04 23:39:31 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.47 2007/09/02 21:13:43 jdolecek Exp $
+$NetBSD: distinfo,v 1.48 2007/09/04 23:39:31 jdolecek Exp $
 
 SHA1 (php-5.2.4/php-5.2.4.tar.bz2) = 0e8f42d1363b17fbaeb3e7732ab1a501a9a12c8e
 RMD160 (php-5.2.4/php-5.2.4.tar.bz2) = 22728d27ec3ba3287943ea878fefbba0b4ffdc00
@@ -12,3 +12,5 @@
 SHA1 (patch-al) = 0ee37782cc0d3bf5ede1a583de0589c2c1316b50
 SHA1 (patch-an) = f07a08f8ee1a18f6371af9bd6c482d936e9220e4
 SHA1 (patch-ao) = 4f22a112e5626b2f9fa029363c9e451e77136e97
+SHA1 (patch-ap) = 5eb0e0e4244a993da93e36f8fcb5553454207fce
+SHA1 (patch-aq) = 0c9d48547da2fa80aa8357d23ad8505d1c0330df
diff -r 994c2016774f -r 35d5db624c7d lang/php5/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php5/patches/patch-ap        Tue Sep 04 23:39:31 2007 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-ap,v 1.3 2007/09/04 23:39:31 jdolecek Exp $
+
+--- Zend/zend.h.orig   2007-09-05 00:16:02.000000000 +0200
++++ Zend/zend.h
+@@ -80,18 +80,7 @@
+ # include <dlfcn.h>
+ #endif
+ 
+-#if HAVE_MACH_O_DYLD_H
+-#include <mach-o/dyld.h>
+-
+-/* MH_BUNDLE loading functions for Mac OS X / Darwin */
+-void *zend_mh_bundle_load (char* bundle_path);
+-int zend_mh_bundle_unload (void *bundle_handle);
+-void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name);
+-const char *zend_mh_bundle_error(void);
+-
+-#endif /* HAVE_MACH_O_DYLD_H */
+-
+-#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) && !defined(ZEND_WIN32)
++#if defined(HAVE_LIBDL) && !defined(ZEND_WIN32)
+ 
+ # ifndef RTLD_LAZY
+ #  define RTLD_LAZY 1    /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
+@@ -118,6 +107,14 @@ const char *zend_mh_bundle_error(void);
+ # define DL_HANDLE                                    void *
+ # define ZEND_EXTENSIONS_SUPPORT      1
+ #elif defined(HAVE_MACH_O_DYLD_H)
++
++#include <mach-o/dyld.h>
++
++/* MH_BUNDLE loading functions for Mac OS X / Darwin */
++void *zend_mh_bundle_load (char* bundle_path);
++int zend_mh_bundle_unload (void *bundle_handle);
++void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name);
++const char *zend_mh_bundle_error(void);
+ # define DL_LOAD(libname)                     zend_mh_bundle_load(libname)
+ # define DL_UNLOAD                    zend_mh_bundle_unload
+ # define DL_FETCH_SYMBOL(h,s)         zend_mh_bundle_symbol(h,s)
diff -r 994c2016774f -r 35d5db624c7d lang/php5/patches/patch-aq
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php5/patches/patch-aq        Tue Sep 04 23:39:31 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-aq,v 1.3 2007/09/04 23:39:31 jdolecek Exp $
+
+--- Zend/zend_extensions.c.orig        2007-09-05 00:24:04.000000000 +0200
++++ Zend/zend_extensions.c
+@@ -230,7 +230,7 @@ ZEND_API zend_extension *zend_get_extens
+  *
+  */
+ 
+-#if HAVE_MACH_O_DYLD_H
++#if defined(HAVE_MACH_O_DYLD_H) && !defined(HAVE_LIBDL)
+ 
+ void *zend_mh_bundle_load(char* bundle_path)
+ {
+@@ -284,7 +284,7 @@ const char *zend_mh_bundle_error(void)
+       return NULL;
+ }
+ 
+-#endif /* HAVE_MACH_O_DYLD_H */
++#endif /* HAVE_MACH_O_DYLD_H && !HAVE_LIBDL */
+ 
+ /*
+  * Local variables:



Home | Main Index | Thread Index | Old Index