fritzkink
2023-12-25 851cd5721904afd5369055381778e81a271b5bde
php-mongodb - new package for php 8.2

7 files added
208 ■■■■■ changed files
components/web/php/php-8_2-ext-mongodb/Makefile 87 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/manifests/sample-manifest.p5m 26 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/mongodb.ini 2 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/patches/solaris.patch 11 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/php82-ext-mongodb.p5m 32 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/pkg5 14 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/test/results-all.master 36 ●●●●● patch | view | raw | blame | history
components/web/php/php-8_2-ext-mongodb/Makefile
New file
@@ -0,0 +1,87 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL)". You may
# only use this file in accordance with the terms of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright (c) 2019 Alexander Pyhalov
# Copyright (c) 2023 Friedrich Kink
#
OPENSSL_VERSION=    3.1
include ../../../../make-rules/shared-macros.mk
COMPONENT_NAME=        php-8.2-ext-mongodb
COMPONENT_VERSION=    1.17.2
COMPONENT_SUMMARY=    MongoDB driver for PHP
COMPONENT_PROJECT_URL=    https://pecl.php.net/package/mongodb
COMPONENT_SRC=        mongodb-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_NAME)-$(COMPONENT_VERSION).tgz
COMPONENT_ARCHIVE_HASH=    sha256:84081b780d48af884d47f0339800c3666c664c66f0035c66d43a34a10fb67376
COMPONENT_ARCHIVE_URL=    https://pecl.php.net/get/$(COMPONENT_SRC).tgz
COMPONENT_FMRI=        web/php-82/extension/php-mongodb
COMPONENT_CLASSIFICATION=    Development/PHP
COMPONENT_LICENSE=    Apache v2.0
COMPONENT_LICENSE_FILE=    LICENSE
include $(WS_MAKE_RULES)/common.mk
COMPONENT_TEST_TARGETS = test
COMPONENT_TEST_ENV += NO_INTERACTION=yes
COMPONENT_TEST_TRANSFORMS += \
    '-e "/^make/d" ' \
    '-e "/^Time taken/d" ' \
    '-e "/^TEST RESULT SUMMARY$$/,\$$p" ' \
    '-e "/.*/d" '
CLEAN_PATHS +=  package.xml package2.xml
PHP_PREFIX=/usr/php/8.2
PHP_SYSCONFDIR=/etc/php/8.2
PHP_DATADIR=/var/php/8.2
# Configure Options
CONFIGURE_OPTIONS  +=   --prefix=$(PHP_PREFIX)
CONFIGURE_OPTIONS  +=   --bindir=$(PHP_PREFIX)/bin
CONFIGURE_OPTIONS  +=   --sbindir=$(PHP_PREFIX)/bin
CONFIGURE_OPTIONS  +=   --libdir=$(PHP_PREFIX)/lib/$(MACH64)
CONFIGURE_OPTIONS  +=   --libexecdir=$(PHP_PREFIX)/libexec
CONFIGURE_OPTIONS  +=   --includedir=$(PHP_PREFIX)/include
CONFIGURE_OPTIONS  +=   --sysconfdir=$(PHP_SYSCONFDIR)
CONFIGURE_OPTIONS  +=   --datadir=$(PHP_DATADIR)
CONFIGURE_OPTIONS  +=   --mandir=$(PHP_PREFIX)/share/man
CONFIGURE_OPTIONS  +=   --localstatedir=$(PHP_DATADIR)
ifeq ($(strip $(MACH)),i386)
CONFIGURE_OPTIONS  +=    --build=x86_64-pc-solaris$(SOLARIS_VERSION)
else
CONFIGURE_OPTIONS  +=    --build=sparcv9-sun-solaris$(SOLARIS_VERSION)
endif
CONFIGURE_OPTIONS  +=    --with-php-config=$(PHP_PREFIX)/bin/php-config
CFLAGS             +=    -I$(PHP_PREFIX)/include -I/usr/include/pcre -D__EXTENSIONS__ -D__SOLARIS__
CPPFLAG            +=    $(CFLAGS)
LDFLAGS            +=    -L$(PHP_PREFIX)/lib -R$(PHP_PREFIX)/lib
CONFIGURE_SCRIPT   =    $(@D)/configure
COMPONENT_PRE_CONFIGURE_ACTION     =    cp -R $(SOURCE_DIR)/* $(@D) ; cd $(@D) ; $(PHP_PREFIX)/bin/phpize
COMPONENT_INSTALL_ARGS        +=    INSTALL_ROOT=$(PROTO_DIR)
# manually added dependencies
REQUIRED_PACKAGES += web/php-82/php-common
REQUIRED_PACKAGES += library/pcre2
# Auto-generated dependencies
REQUIRED_PACKAGES += compress/zstd
REQUIRED_PACKAGES += library/security/openssl-31
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
components/web/php/php-8_2-ext-mongodb/manifests/sample-manifest.p5m
New file
@@ -0,0 +1,26 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2023 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=usr/php/8.2/extensions/mongodb.so
components/web/php/php-8_2-ext-mongodb/mongodb.ini
New file
@@ -0,0 +1,2 @@
[mongodb]
extension=mongodb.so
components/web/php/php-8_2-ext-mongodb/patches/solaris.patch
New file
@@ -0,0 +1,11 @@
--- mongodb-1.17.2/src/libmongocrypt/src/os_posix/os_dll.c    2023-12-20 17:52:40.000000000 +0100
+++ mongodb-1.17.2/src/libmongocrypt/src/os_posix/os_dll.c.new    2023-12-25 17:28:58.705237791 +0100
@@ -95,7 +95,7 @@
     return (mcr_dll_path_result){.error_string = mstr_copy_cstr("Handle not found in loaded modules")};
 }
-#elif defined(__linux__) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__SOLARIS__)
 #include <link.h>
components/web/php/php-8_2-ext-mongodb/php82-ext-mongodb.p5m
New file
@@ -0,0 +1,32 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2019 Alexander Pyhalov
# Copyright 2023 Friedrich Kink
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
<transform file path=usr/php/8.2/extensions/.*\.so -> \
    add pkg.linted.userland.action001.2 true>
file mongodb.ini path=etc/php/8.2/conf.d/mongodb.ini preserve=true mode=0644
file path=usr/php/8.2/extensions/mongodb.so
components/web/php/php-8_2-ext-mongodb/pkg5
New file
@@ -0,0 +1,14 @@
{
    "dependencies": [
        "compress/zstd",
        "library/pcre2",
        "library/security/openssl-31",
        "library/zlib",
        "system/library",
        "web/php-82/php-common"
    ],
    "fmris": [
        "web/php-82/extension/php-mongodb"
    ],
    "name": "php-8.2-ext-mongodb"
}
components/web/php/php-8_2-ext-mongodb/test/results-all.master
New file
@@ -0,0 +1,36 @@
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   31
---------------------------------------------------------------------
Number of tests : 2257              1709
Tests skipped   :  548 ( 24.3%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    2 (  0.1%) (  0.1%)
Expected fail   :    9 (  0.4%) (  0.5%)
Tests passed    : 1698 ( 75.2%) ( 99.4%)
---------------------------------------------------------------------
=====================================================================
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Javascript Code: Embedded nulls [tests/bson-corpus/code-valid-006.phpt]  XFAIL REASON: Embedded null in code string is not supported in libbson (CDRIVER-1879)
Javascript Code with Scope: Unicode and embedded null in code string, empty scope [tests/bson-corpus/code_w_scope-valid-005.phpt]  XFAIL REASON: Embedded null in code string is not supported in libbson (CDRIVER-1879)
Int64 type: -1 [tests/bson-corpus/int64-valid-003.phpt]  XFAIL REASON: PHP encodes integers as 32-bit if range allows
Int64 type: 0 [tests/bson-corpus/int64-valid-004.phpt]  XFAIL REASON: PHP encodes integers as 32-bit if range allows
Int64 type: 1 [tests/bson-corpus/int64-valid-005.phpt]  XFAIL REASON: PHP encodes integers as 32-bit if range allows
Multiple types within the same document: All BSON types [tests/bson-corpus/multi-type-deprecated-valid-001.phpt]  XFAIL REASON: PHP encodes integers as 32-bit if range allows
Multiple types within the same document: All BSON types [tests/bson-corpus/multi-type-valid-001.phpt]  XFAIL REASON: PHP encodes integers as 32-bit if range allows
Top-level document validity: Bad $date (number, not string or hash) [tests/bson-corpus/top-parseError-032.phpt]  XFAIL REASON: Legacy extended JSON $date syntax uses numbers (CDRIVER-2223)
Connect to MongoDB with using PLAIN auth mechanism #002 [tests/connect/standalone-plain-0002.phpt]  XFAIL REASON: authMechanism=PLAIN (LDAP) tests must be reimplemented (PHPC-1172)
parse_url() tests must be reimplemented (PHPC-1177)
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
MongoDB\BSON\toJSON(): Encoding JSON [tests/bson/bson-toJSON-001.phpt]
MongoDB\Driver\Manager::__construct(): check if server is live [tests/manager/manager-ctor-server.phpt]
=====================================================================