# HG changeset patch # User Rich Burridge # Date 1392180715 28800 # Node ID 38d16c6d5c60bb4793c71b56191b947436f5c946 # Parent 74c77317f502d651003d5107dfe4281a03325e49 PSARC 2013/306 zendopcache version 7.0.2 16544945 Zend OptimizerPlus package should be made available for Solaris 18230236 Update PHP 5.3 from version 5.3.14 to 5.3.27 diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/Makefile --- a/components/php-5_3/Makefile Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # include ../../make-rules/shared-macros.mk include ../../make-rules/ips.mk @@ -115,7 +115,7 @@ # looks like i DO NEED the pear patches COMPONENT_NAME= php -COMPONENT_VERSION= 5.3.14 +COMPONENT_VERSION= 5.3.27 COMPONENT_PROJECT_URL= http://www.php.net/ COMPONENT_BUGDB= utility/php @@ -134,6 +134,8 @@ PKG_PROTO_DIRS += tcpwrap-zts/build/prototype/$(MACH) PKG_PROTO_DIRS += xdebug/build/prototype/$(MACH) PKG_PROTO_DIRS += xdebug-zts/build/prototype/$(MACH) +PKG_PROTO_DIRS += zendopcache/build/prototype/$(MACH) +PKG_PROTO_DIRS += zendopcache-zts/build/prototype/$(MACH) # for now, everything with a Makefile should be built SUBDIRS = $(shell echo */Makefile | sed -e 's;/Makefile;;g') @@ -178,5 +180,7 @@ tcpwrap-zts: php-sapi php-nsapi xdebug: php-sapi xdebug-zts: php-sapi php-nsapi +zendopcache: php-sapi +zendopcache-zts: php-sapi php-nsapi FORCE: diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/cleancr.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/cleancr.mk Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,27 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# + +# Makefile fragment to clean a file of its carriage returns. +# Carriage returns drive the Studio compiler crazy. + +cleancr = $(GSED) -i -e 's/\r//g' $(1) ; diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/common.mk --- a/components/php-5_3/common.mk Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/common.mk Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # PHP_REL= 5.3 @@ -54,8 +54,8 @@ IMAP_CLIENT_DIR = $(IMAP_DIR)/c-client MODULES_DIR = $(TOP_DIR)/modules MODULES_CONF_DIR=$(CONF_DIR)/conf.d -MYSQL_DIR = /usr/mysql/5.1 -MYSQL_LIBDIR=/usr/mysql/5.1/lib/mysql +MYSQL_DIR = /usr/mysql +MYSQL_LIBDIR=/usr/mysql/lib/mysql PHP_SAPI_BUILD = $(COMPONENT_DIR)/../php-sapi/build/$(MACH32) PEAR_DIR=/var/php/$(PHP_REL)/pear diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/extensions.mk --- a/components/php-5_3/extensions.mk Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/extensions.mk Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # include $(WS_TOP)/make-rules/prep.mk @@ -47,6 +47,7 @@ CONFIGURE_ENV += $(ENVLINE) CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure +CPPFLAGS += -I$(PHP_SAPI_BUILD) CPPFLAGS += -I$(PHP_SAPI_BUILD)/Zend CPPFLAGS += -I$(PHP_SAPI_BUILD)/TSRM CPPFLAGS += -I$(PHP_SAPI_BUILD)/main diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-53.p5m --- a/components/php-5_3/php-53.p5m Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-53.p5m Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # default mangler.man.stability uncommitted> @@ -430,7 +430,7 @@ depend fmri=pkg:/web/php-common type=require # if php5.2 is present drag forward because of /usr/php/* mediated links -depend fmri=pkg:/web/php-52@5.2.17,$(BUILD_VERSION) type=optional +depend fmri=pkg:/web/php-52@5.2.17 type=optional # if php5.2's apache module is present then make sure # php5.3's apache module is installed diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-cgi/Makefile --- a/components/php-5_3/php-cgi/Makefile Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-cgi/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # include ../../../make-rules/shared-macros.mk @@ -32,12 +32,13 @@ PATCH_DIR = ../php-sapi/patches +include ../php-sapi/php.mk + include $(WS_TOP)/make-rules/prep.mk include $(WS_TOP)/make-rules/configure.mk include $(WS_TOP)/make-rules/ips.mk include ../common.mk -include ../php-sapi/php.mk CONFIGURE_OPTIONS += \ --disable-all \ diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-doc.p5m --- a/components/php-5_3/php-doc.p5m Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-doc.p5m Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # set name=pkg.fmri value=pkg:/web/php-53/documentation@5.3.27,$(BUILD_VERSION) @@ -12170,4 +12170,4 @@ # if php5.2 doc is present drag forward because of /usr/php/doc # mediated link -depend fmri=pkg:/web/php-52/documentation@5.2.17,$(BUILD_VERSION) type=optional +depend fmri=pkg:/web/php-52/documentation@5.2.17 type=optional diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-nsapi/Makefile --- a/components/php-5_3/php-nsapi/Makefile Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-nsapi/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # include ../../../make-rules/shared-macros.mk @@ -48,12 +48,13 @@ PATCH_DIR = ../php-sapi/patches +include ../php-sapi/php.mk + include $(WS_TOP)/make-rules/prep.mk include $(WS_TOP)/make-rules/configure.mk include $(WS_TOP)/make-rules/ips.mk include ../common.mk -include ../php-sapi/php.mk COMPONENT_POST_UNPACK_ACTION += && ( \ $(RM) -r $(COMPONENT_DIR)/$(COMPONENT_SRC_1); \ @@ -80,13 +81,13 @@ --with-imap=shared,$(IMAP_DIR) \ --with-imap-ssl=shared,/usr \ --with-ldap=shared \ - --with-mysql=shared,$(MYSQL_DIR) \ + --with-mysql=shared,mysqlnd \ --with-mysql-sock=/tmp/mysql.sock \ - --with-mysqli=shared,$(MYSQL_DIR)/bin/mysql_config \ + --with-mysqli=shared,mysqlnd \ --with-nsapi=$(COMPONENT_DIR)/webserver7-spi \ --with-openssl=shared \ --with-pear=$(PEAR_DIR) \ - --with-pdo-mysql=shared,$(MYSQL_DIR) \ + --with-pdo-mysql=shared,mysqlnd \ --with-pdo-sqlite=shared \ --with-snmp=shared,/usr \ --with-sqlite3=shared \ @@ -97,9 +98,9 @@ COMPONENT_POST_BUILD_ACTION = ( \ cat $(BUILD_DIR_32)/scripts/phpize | \ sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \ - sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \ - sed -e "s%^includedir=.*%includedir=$(SOURCE_DIR)%" | \ - sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \ + sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \ + sed -e "s%^includedir=.*%includedir=$(BUILD_DIR_32)%" | \ + sed -e "s%^phpdir=.*%phpdir=$(BUILD_DIR_32)%" | \ sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \ sed -e 's%cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build%cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build%' \ > phpize-proto.zts ; \ diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-sapi/Makefile --- a/components/php-5_3/php-sapi/Makefile Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-sapi/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # include ../../../make-rules/shared-macros.mk @@ -57,12 +57,14 @@ # will pick it up. COMPONENT_ARCHIVE_URL_1=http://us.php.net/get/$(COMPONENT_ARCHIVE_1)/from/this/mirror +include ./php.mk + + include $(WS_TOP)/make-rules/prep.mk include $(WS_TOP)/make-rules/configure.mk include $(WS_TOP)/make-rules/ips.mk include ../common.mk -include ./php.mk CONFIGURE_OPTIONS += \ $(COMMON_CONFIG_OPTIONS) \ @@ -83,12 +85,12 @@ --with-imap=shared,$(IMAP_DIR) \ --with-imap-ssl=shared,/usr \ --with-ldap=shared \ - --with-mysql=shared,$(MYSQL_DIR) \ + --with-mysql=shared,mysqlnd \ --with-mysql-sock=/tmp/mysql.sock \ - --with-mysqli=shared,$(MYSQL_DIR)/bin/mysql_config \ + --with-mysqli=shared,mysqlnd \ --with-openssl=shared \ --with-pear=$(PEAR_DIR) \ - --with-pdo-mysql=shared,$(MYSQL_DIR) \ + --with-pdo-mysql=shared,mysqlnd \ --with-pdo-sqlite=shared \ --with-snmp=shared,/usr \ --with-sqlite=shared \ @@ -100,9 +102,9 @@ COMPONENT_POST_BUILD_ACTION = ( \ cat $(BUILD_DIR_32)/scripts/phpize | \ sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \ - sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \ - sed -e "s%^includedir=.*%includedir=$(SOURCE_DIR)%" | \ - sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \ + sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \ + sed -e "s%^includedir=.*%includedir=$(BUILD_DIR_32)%" | \ + sed -e "s%^phpdir=.*%phpdir=$(BUILD_DIR_32)%" | \ sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \ sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \ sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \ @@ -112,8 +114,8 @@ chmod 755 phpize-proto ) ; \ ( cat $(BUILD_DIR_32)/scripts/php-config | \ sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \ - sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \ - sed -e "s%^include_dir=.*%include_dir=$(SOURCE_DIR)%" \ + sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \ + sed -e "s%^include_dir=.*%include_dir=$(BUILD_DIR_32)%" \ > php-config-proto ; \ chmod 755 php-config-proto ) ; \ ( cat $(BUILD_DIR_32)/scripts/php-config | \ @@ -138,8 +140,8 @@ # Ship a default php.ini to simplify ease of use. FIX_CONFIG_FILES = ( \ - cd $(SOURCE_DIR); \ - $(GPATCH) -p0 -o php.ini-patched -i ../patches-other/php_ini.patch; \ + cd $(BUILD_DIR_32); \ + $(GPATCH) -p0 -o php.ini-patched -i ../../patches-other/php_ini.patch; \ $(GSED) -e "s@<>@$(PHP_REL)@g" < php.ini-patched > php.ini; \ $(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(CONF_DIR)/php.ini; \ ) diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-sapi/php.mk --- a/components/php-5_3/php-sapi/php.mk Tue Feb 11 13:53:54 2014 -0800 +++ b/components/php-5_3/php-sapi/php.mk Tue Feb 11 20:51:55 2014 -0800 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # COMPONENT_PRE_INSTALL_ACTION += ( \ @@ -37,12 +37,14 @@ $(COMPONENT_SRC)/Zend/zend_language_parser.h \ $(COMPONENT_SRC)/Zend/zend_language_parser.output ) +PATCHES = $(shell cd $(PATCH_DIR); echo [0-9]* $$(MACH)* ) + COMPONENT_PRE_CONFIGURE_ACTION = ( \ cd $(COMPONENT_SRC); $(ENV) -i PATH=/usr/gnu/bin:$(PATH) \ MAKE="$(GMAKE)" \ $(CONFIG_SHELL) ./buildconf --force ; \ - $(MV) configure configure.orig; \ + $(MV) configure configure_orig; \ $(GSED) -e "s\#-i -a -n php5\#-i -n php5\#" \ - < configure.orig > configure; \ + < configure_orig > configure; \ $(CHMOD) 755 configure; \ $(CLONEY) $(SOURCE_DIR) $(@D) ) diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-zendopcache.license --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/php-zendopcache.license Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,68 @@ +-------------------------------------------------------------------- + The PHP License, version 3.01 +Copyright (c) 1999 - 2012 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 + ". + +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 . + +PHP includes the Zend Engine, freely available at +. diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/php-zendopcache.p5m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/php-zendopcache.p5m Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,43 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# + +set name=pkg.fmri \ + value=pkg:/web/php-53/extension/php-zendopcache@7.0.2,$(BUILD_VERSION) +set name=pkg.summary value="ZendOpcache extension module for PHP" +set name=pkg.description \ + value="The Zend OPcache provides faster PHP execution through opcode caching and optimization. It improves PHP performance by storing precompiled script bytecode in the shared memory. This eliminates the stages of reading code from the disk and compiling it on future access. In addition, it applies a few bytecode optimization patterns that make code execution faster." +set name=com.oracle.info.description value="the Zend OPcache PHP extension" +set name=com.oracle.info.tpno value=14926 +set name=info.classification value=org.opensolaris.category.2008:Development/PHP +set name=info.source-url value=http://pecl.php.net/get/zendopcache-7.0.2.tgz +set name=info.upstream-url value=http://pecl.php.net/package/ZendOpcache +set name=org.opensolaris.arc-caseid value=PSARC/2013/306 +set name=org.opensolaris.consolidation value=$(CONSOLIDATION) +file path=etc/php/5.3/conf.d/opcache.ini mode=0644 preserve=renamenew +file path=etc/php/5.3/zts-conf.d/opcache.ini mode=0644 preserve=renamenew +file path=usr/php/5.3/modules/opcache.so +file path=usr/php/5.3/zts-modules/opcache.so +license php-zendopcache.license license=PHP + +# need generic dependency on PHP itself +depend type=require fmri=web/php-53@5.3.27 diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/zendopcache-zts/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/zendopcache-zts/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,42 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# +include ../../../make-rules/shared-macros.mk + +COMPONENT_NAME= zendopcache +COMPONENT_VERSION= 7.0.2 +COMPONENT_PROJECT_URL= http://pecl.php.net/package/ZendOpcache +COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) +COMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz +COMPONENT_ARCHIVE_HASH= \ + sha256:4aea4f0242dc50a5a68e7a170c3c537716e5da03b2a7b322349f211c09d90f44 +COMPONENT_ARCHIVE_URL= http://pecl.php.net/get/$(COMPONENT_ARCHIVE) +COMPONENT_BUGDB= utility/php + +PATCH_DIR = ../zendopcache/patches + +include ../extensions-zts.mk +include ../cleancr.mk + +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer_internal.h) +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer.c) +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer.h) diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/zendopcache/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/zendopcache/Makefile Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,51 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# +include ../../../make-rules/shared-macros.mk + +COMPONENT_NAME= zendopcache +COMPONENT_VERSION= 7.0.2 +COMPONENT_PROJECT_URL= http://pecl.php.net/package/ZendOpcache +COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) +COMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz +COMPONENT_ARCHIVE_HASH= \ + sha256:4aea4f0242dc50a5a68e7a170c3c537716e5da03b2a7b322349f211c09d90f44 +COMPONENT_ARCHIVE_URL= http://pecl.php.net/get/$(COMPONENT_ARCHIVE) +COMPONENT_BUGDB= utility/php + +include ../extensions.mk +include ../cleancr.mk + +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer_internal.h) +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer.c) +COMPONENT_PREP_ACTION += $(call cleancr,$(SOURCE_DIR)/Optimizer/zend_optimizer.h) + +COMPONENT_POST_INSTALL_ACTION = ( \ + $(FIX_CONFIG_FILES) \ + ) + +# Testing note: +# According to: https://github.com/zendtech/ZendOptimizerPlus/issues/13 +# and https://github.com/zendtech/ZendOptimizerPlus/issues/13 +# these tests are having issues. +# My own testing shows that if these are run by hand most of them pass. +# There is some issue around the cli version of php not liking this optimizer. diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/zendopcache/config/opcache.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/zendopcache/config/opcache.ini Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,175 @@ +;From ZendOpcache README file + +zend_extension=/usr/php/PHP_VERSION/modules/opcache.so + +;NOTE: In case you are going to use Zend OPcache together with Xdebug, +;be sure that Xdebug is loaded after OPcache. "php -v" must show Xdebug +;after OPcache. +; +;Speed Tuning +;------------- +; +;We recommend the following configuration options for best performance. + +opcache.memory_consumption=128 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=4000 +opcache.revalidate_freq=60 +opcache.fast_shutdown=1 +opcache.enable_cli=1 + +;You also may add the following, but it may break some applications and +;frameworks. Please, read description of these directives and add them on your +;own risk. + +;opcache.save_comments=0 +;opcache.enable_file_override=1 + +;In some cases you may like to prefer enabling/disabling some features +;to avoid incompatibilities at the cost of some performance degradation. +; +;Configuration Directives +;------------------------ +; +;opcache.enable (default "1") +; OPcache On/Off switch. When set to Off, code is not optimized and cached. +; +;opcache.enable_cli (default "0") +; Enables the OPcache for the CLI version of PHP. It's mostly for testing +; and debugging. +; +;opcache.memory_consumption (default "64") +; The OPcache shared memory storage size. The amount of memory for storing +; precompiled PHP code in Mbytes. +; +;opcache.interned_strings_buffer (default "4") +; The amount of memory for interned strings in Mbytes. +; +;opcache.max_accelerated_files (default "2000") +; The maximum number of keys (scripts) in the OPcache hash table. +; The number is actually the first one in the following set of prime +; numbers that is bigger than the one supplied: { 223, 463, 983, 1979, 3907, +; 7963, 16229, 32531, 65407, 130987 }. Only numbers between 200 and 100000 +; are allowed. +; +;opcache.max_wasted_percentage (default "5") +; The maximum percentage of "wasted" memory until a restart is scheduled. +; +;opcache.use_cwd (default "1") +; When this directive is enabled, the OPcache appends the current working +; directory to the script key, thus eliminating possible collisions between +; files with the same name (basename). Disabling the directive improves +; performance, but may break existing applications. +; +;opcache.validate_timestamps (default "1") +; When disabled, you must reset the OPcache manually or restart the +; webserver for changes to the filesystem to take effect. +; The frequency of the check is controlled by the directive +; "opcache.revalidate_freq". +; +;opcache.revalidate_freq (default "2") +; How often (in seconds) to check file timestamps for changes to the shared +; memory storage allocation. ("1" means validate once per second, but only +; once per request. "0" means always validate) +; +;opcache.revalidate_path (default "0") +; Enables or disables file search in include_path optimization +; If the file search is disabled and a cached file is found that uses +; the same include_path, the file is not searched again. Thus, if a file +; with the same name appears somewhere else in include_path, it +; won't be found. Enable this directive if this optimization has an effect on +; your applications. The default for this directive is disabled, which means +; that optimization is active. +; +;opcache.save_comments (default "1") +; If disabled, all PHPDoc comments are dropped from the code to reduce the +; size of the optimized code. Disabling "Doc Comments" may break some +; existing applications and frameworks (e.g. Doctrine, ZF2, PHPUnit) +; +;opcache.load_comments (default "1") +; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" +; may be always stored (save_comments=1), but not loaded by applications +; that don't need them anyway. +; +;opcache.fast_shutdown (default "0") +; If enabled, a fast shutdown sequence is used for the accelerated code +; The fast shutdown sequence doesn't free each allocated block, but lets +; the Zend Engine Memory Manager do the work. +; +;opcache.enable_file_override (default "0") +; Allow file existence override (file_exists, etc.) performance feature. +; +;opcache.optimization_level (default "0xffffffff") +; A bitmask, where each bit enables or disables the appropriate OPcache +; passes +; +;opcache.inherited_hack (default "1") +; Enable this hack as a workaround for "can't redeclare class" errors. +; The OPcache stores the places where DECLARE_CLASS opcodes use +; inheritance (These are the only opcodes that can be executed by PHP, +; but which may not be executed because the parent class is missing due to +; optimization). When the file is loaded, OPcache tries to bind the +; inherited classes by using the current environment. The problem with this +; scenario is that, while the DECLARE_CLASS opcode may not be needed for the +; current script, if the script requires that the opcode at least be defined, +; it may not run. The default for this directive is disabled, which means +; that optimization is active. In php-5.3 and above this hack is not needed +; anymore and this setting has no effect. +; +;opcache.dups_fix (default "0") +; Enable this hack as a workaround for "Cannot redeclare class" errors. +; +;opcache.blacklist_filename +; The location of the OPcache blacklist file (wildcards allowed). +; Each OPcache blacklist file is a text file that holds the names of files +; that should not be accelerated. The file format is to add each filename +; to a new line. The filename may be a full path or just a file prefix +; (i.e., /var/www/x blacklists all the files and directories in /var/www +; that start with 'x'). Line starting with a ; are ignored (comments). +; Files are usually triggered by one of the following three reasons: +; 1) Directories that contain auto generated code, like Smarty or ZFW cache. +; 2) Code that does not work well when accelerated, due to some delayed +; compile time evaluation. +; 3) Code that triggers an OPcache bug. +; +;opcache.max_file_size (default "0") +; Allows exclusion of large files from being cached. By default all files +; are cached. +; +;opcache.consistency_checks (default "0") +; Check the cache checksum each N requests. +; The default value of "0" means that the checks are disabled. +; Because calculating the checksum impairs performance, this directive should +; be enabled only as part of a debugging process. +; +;opcache.force_restart_timeout (default "180") +; How long to wait (in seconds) for a scheduled restart to begin if the cache +; is not being accessed. +; The OPcache uses this directive to identify a situation where there may +; be a problem with a process. After this time period has passed, the +; OPcache assumes that something has happened and starts killing the +; processes that still hold the locks that are preventing a restart. +; If the log level is 3 or above, a "killed locker" error is recorded +; in the Apache logs when this happens. +; +;opcache.error_log +; OPcache error_log file name. Empty string assumes "stderr". +; +;opcache.log_verbosity_level (default "1") +; All OPcache errors go to the Web server log. +; By default, only fatal errors (level 0) or errors (level 1) are logged. +; You can also enable warnings (level 2), info messages (level 3) or +; debug messages (level 4). +; +;opcache.preferred_memory_model +; Preferred Shared Memory back-end. Leave empty and let the system decide. +; +;opcache.protect_memory (default "0") +; Protect the shared memory from unexpected writing during script execution. +; Useful for internal debugging only. +; +;opcache.mmap_base +; Mapping base of shared memory segments (for Windows only). All the PHP +; processes have to map shared memory into the same address space. This +; directive allows to manually fix the "Unable to reattach to base address" +; errors. diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/zendopcache/patches/Optimizer-zend_optimizer_internal_h.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/zendopcache/patches/Optimizer-zend_optimizer_internal_h.patch Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,16 @@ +Fix Overflown issue on Solaris. For more information, see: +https://github.com/zendtech/ZendOptimizerPlus/issues/122 + +--- zendopcache-7.0.2/Optimizer/zend_optimizer_internal.h_orig 2013-06-04 23:28:53.000000000 -0700 ++++ zendopcache-7.0.2/Optimizer/zend_optimizer_internal.h 2013-08-28 13:08:44.068188002 -0700 +@@ -28,8 +28,8 @@ + # define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v))) + # define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, v)) + #else +-# define VAR_NUM(v) ((v)/(sizeof(temp_variable))) +-# define NUM_VAR(v) ((v)*(sizeof(temp_variable))) ++# define VAR_NUM(v) ((v)/ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) ++# define NUM_VAR(v) ((v)*ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) + #endif + + #define INV_COND(op) ((op) == ZEND_JMPZ ? ZEND_JMPNZ : ZEND_JMPZ) diff -r 74c77317f502 -r 38d16c6d5c60 components/php-5_3/zendopcache/patches/config_m4.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php-5_3/zendopcache/patches/config_m4.patch Tue Feb 11 20:51:55 2014 -0800 @@ -0,0 +1,24 @@ +Teach it about Solaris. This patch will be pushed upstream. + +--- zendopcache-7.0.2/config.m4_orig 2013-06-04 23:28:53.000000000 -0700 ++++ zendopcache-7.0.2/config.m4 2013-07-19 11:01:46.373047462 -0700 +@@ -338,7 +338,7 @@ + # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (defined(__APPLE__) && defined(__MACH__)/* Darwin */) || defined(__OpenBSD__) || defined(__NetBSD__) + # define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {start, len, -1, type, whence} +-# elif defined(__svr4__) ++# elif defined(__svr4__) || defined (__SunOS) + # define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {type, whence, start, len} + # elif defined(__linux__) || defined(__hpux) +--- zendopcache-7.0.2/ZendAccelerator.h_orig 2013-06-04 23:28:53.000000000 -0700 ++++ zendopcache-7.0.2/ZendAccelerator.h 2013-07-19 11:07:03.956873718 -0700 +@@ -97,7 +97,7 @@ + # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (defined(__APPLE__) && defined(__MACH__)/* Darwin */) || defined(__OpenBSD__) || defined(__NetBSD__) + # define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {start, len, -1, type, whence} +-# elif defined(__svr4__) ++# elif defined(__svr4__) || defined (__SunOS) + # define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {type, whence, start, len} + # elif defined(__linux__) || defined(__hpux)