From fa1f3e73e008b8c8caba06fa6904603afaa0cc16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Sun, 9 Jul 2017 00:27:53 +0200 Subject: [PATCH] [dev-libs/Ice] added a patch for db6 from pld, also include php 7.1 fix from upstream so i don't forget it later in case we have no 3.6.4 soon-ish --- dev-libs/Ice/Ice-3.6.9999.ebuild | 4 ++ dev-libs/Ice/files/Ice-3.6.3-db6.patch | 48 ++++++++++++++++++++++++ dev-libs/Ice/files/Ice-3.6.3-php71.patch | 30 +++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 dev-libs/Ice/files/Ice-3.6.3-db6.patch create mode 100644 dev-libs/Ice/files/Ice-3.6.3-php71.patch diff --git a/dev-libs/Ice/Ice-3.6.9999.ebuild b/dev-libs/Ice/Ice-3.6.9999.ebuild index 9cd9fd4..35563a4 100644 --- a/dev-libs/Ice/Ice-3.6.9999.ebuild +++ b/dev-libs/Ice/Ice-3.6.9999.ebuild @@ -20,6 +20,9 @@ EGIT_REPO_URI="https://github.com/zeroc-ice/ice.git" EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}" EGIT_BRANCH="3.6" +# This variable does not belong to any eclass. It is solely used in this ebuild +BERKDB_SLOTS=( 6.2 6.1 5.3 5.1 4.8 ) + inherit db-use mono-env php-ext-source-r3 python-r1 ruby-ng toolchain-funcs versionator git-r3 # for mono-env @@ -61,6 +64,7 @@ PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${PN}-3.6.3-no-arch-opts.patch" + "${FILESDIR}/${PN}-3.6.3-db6.patch" "${FILESDIR}/${PN}-3.6.4-csharp.patch" ) diff --git a/dev-libs/Ice/files/Ice-3.6.3-db6.patch b/dev-libs/Ice/files/Ice-3.6.3-db6.patch new file mode 100644 index 0000000..b78fae7 --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.6.3-db6.patch @@ -0,0 +1,48 @@ +Avoid ambiguous ctor call (uint32_t vs DB_ENV*) with db 6.x. + +--- ice-3.6.3/cpp/src/Freeze/SharedDbEnv.cpp.orig 2016-10-05 16:59:08.000000000 +0200 ++++ ice-3.6.3/cpp/src/Freeze/SharedDbEnv.cpp 2017-06-28 18:42:43.411869639 +0200 +@@ -530,7 +530,7 @@ + { + if(_env == 0) + { +- _envHolder.reset(new DbEnv(0)); ++ _envHolder.reset(new DbEnv(0u)); + _env = _envHolder.get(); + + if(_trace >= 1) +--- ice-3.6.3/cpp/src/FreezeScript/transformdb.cpp.orig 2016-10-05 16:59:08.000000000 +0200 ++++ ice-3.6.3/cpp/src/FreezeScript/transformdb.cpp 2017-06-28 19:15:03.928514164 +0200 +@@ -766,8 +766,8 @@ + // + // Transform the database. + // +- DbEnv dbEnv(0); +- DbEnv dbEnvNew(0); ++ DbEnv dbEnv(0u); ++ DbEnv dbEnvNew(0u); + Freeze::TransactionPtr txNew; + Freeze::ConnectionPtr connection; + Freeze::ConnectionPtr connectionNew; +--- ice-3.6.3/cpp/src/FreezeScript/Util.cpp.orig 2016-10-05 16:59:08.000000000 +0200 ++++ ice-3.6.3/cpp/src/FreezeScript/Util.cpp 2017-06-28 19:22:29.318509063 +0200 +@@ -209,7 +209,7 @@ + { + CatalogDataMap result; + +- DbEnv dbEnv(0); ++ DbEnv dbEnv(0u); + try + { + #ifdef _WIN32 +--- ice-3.6.3/cpp/src/FreezeScript/DumpDB.cpp.orig 2016-10-05 16:59:08.000000000 +0200 ++++ ice-3.6.3/cpp/src/FreezeScript/DumpDB.cpp 2017-06-28 19:33:38.555168088 +0200 +@@ -481,7 +481,7 @@ + FreezeScript::ObjectFactoryPtr objectFactory = new FreezeScript::ObjectFactory; + communicator->addObjectFactory(objectFactory, ""); + +- DbEnv dbEnv(0); ++ DbEnv dbEnv(0u); + DbTxn* txn = 0; + Freeze::ConnectionPtr connection; + int status = EXIT_SUCCESS; diff --git a/dev-libs/Ice/files/Ice-3.6.3-php71.patch b/dev-libs/Ice/files/Ice-3.6.3-php71.patch new file mode 100644 index 0000000..324f562 --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.6.3-php71.patch @@ -0,0 +1,30 @@ +--- ice-3.6.3/php/src/php7/Types.cpp.orig 2016-10-05 16:59:08.000000000 +0200 ++++ ice-3.6.3/php/src/php7/Types.cpp 2017-06-30 20:05:36.233173124 +0200 +@@ -1166,26 +1166,7 @@ + { + assert(Z_TYPE_P(target) == IS_OBJECT); + +- // +- // The add_property_zval function fails if the data member has protected visibility. +- // As a workaround, before calling the function we change the current scope to be that +- // of the object. +- // +- zend_class_entry *oldScope = EG(scope); +- EG(scope) = Z_OBJCE_P(target); +- +- // +- // add_property_zval increments the refcount of zv. +- // +- int status = add_property_zval(target, STRCAST(name.c_str()), zv); +- +- EG(scope) = oldScope; // Restore the previous scope. +- +- if(status == FAILURE) +- { +- runtimeError("unable to set member `%s'", name.c_str()); +- throw AbortMarshaling(); +- } ++ zend_update_property(Z_OBJCE_P(target), target, STRCAST(name.c_str()), strlen(name.c_str()), zv); + } + + static void