Makefile revision 6713
4406N/A#
4406N/A# CDDL HEADER START
4406N/A#
4406N/A# The contents of this file are subject to the terms of the
4406N/A# Common Development and Distribution License (the "License").
4406N/A# You may not use this file except in compliance with the License.
4406N/A#
4406N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4406N/A# or http://www.opensolaris.org/os/licensing.
4406N/A# See the License for the specific language governing permissions
4406N/A# and limitations under the License.
4406N/A#
4406N/A# When distributing Covered Code, include this CDDL HEADER in each
4406N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4406N/A# If applicable, add the following below this CDDL HEADER, with the
4406N/A# fields enclosed by brackets "[]" replaced with your own identifying
4406N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4406N/A#
4406N/A# CDDL HEADER END
4406N/A#
4406N/A
4406N/A#
5680N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4406N/A#
5680N/ABUILD_BITS= 64
6713N/ACOMPILER= gcc
4406N/Ainclude ../../../make-rules/shared-macros.mk
4406N/A
4406N/Ainclude $(WS_COMPONENTS)/php/php-metadata.mk
4406N/A
4406N/ACOMPONENT_NAME= php
4406N/ACOMPONENT_VERSION= $(UL_PHP_VERSION)
4406N/ACOMPONENT_PROJECT_URL= http://php.net/
4406N/ACOMPONENT_SRC= $(PHP_COMPONENT_SRC)
6713N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
4406N/ACOMPONENT_ARCHIVE_HASH=\
6713N/A sha256:c96980d7de1d66c821a4ee5809df0076f925b2fe0b8c362d234d92f2f0a178e2
4406N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
6713N/ATPNO= 29533
4406N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
4406N/Ainclude $(PHP_TOP_DIR)/php.mk
4406N/A
4406N/A# We patch configure.in to allow building just modules (no SAPI's), e.g. intl.
4406N/A# Since we are sharing the source, regenerate configure here.
5680N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoreconf) ;
4406N/A
4406N/Ainclude enable-extensions.mk
4406N/A
4406N/ACONFIGURE_OPTIONS += --enable-dtrace
5680N/ACOMPONENT_BUILD_ENV += PATH="$(PATH):$(USRSBINDIR)"
4406N/A
5680N/AETCPHPDIR= $(ETCDIR)/php/$(UL_PHP_MINOR_VERSION)
5680N/AVARPHPDIR= $(VARDIR)/php/$(UL_PHP_MINOR_VERSION)
4406N/A# .conf files go under /etc, not /usr
5680N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCPHPDIR)
4406N/A# var doesn't go under /usr either!
5680N/ACONFIGURE_OPTIONS += --localstatedir=$(VARPHPDIR)
4406N/A# Nor does php.ini and its friends.
5680N/ACONFIGURE_OPTIONS += --with-config-file-path=$(ETCPHPDIR)
5680N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=$(ETCPHPDIR)/conf.d
4406N/A# Nor does PEAR (default: $PREFIX/lib/php)
5680N/ACONFIGURE_OPTIONS += --with-pear=$(VARPHPDIR)/pear
4406N/A
6713N/A# icu's switch to g++
6713N/A# 21090206 icu should build C++ to C++11
6713N/A# Causes this in php forcing php to switch also
6713N/A# 23003672 PHP fails all or most tests
6713N/ACXXFLAGS += -std=c++11
6713N/ACONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
6713N/A
4824N/A# Use openldap
4824N/A# This is good enough to fool configure
5680N/ACPPFLAGS += -I$(USRINCDIR)/openldap
5680N/ALDFLAGS += -lldap_r
4824N/A# but ensure "make" gets the point
4824N/ACOMPONENT_BUILD_ARGS += LDAP_SHARED_LIBADD="-lldap_r"
4824N/A
4478N/A# Disable SSLv2 and SSLv3 for security reasons
4478N/ACFLAGS += -DOPENSSL_NO_SSL2
4478N/ACFLAGS += -DOPENSSL_NO_SSL3
4478N/A
4406N/APROTOUSRPHPVERDIR = $(PROTO_DIR)/$(CONFIGURE_PREFIX)
4406N/A# Adapted from PHP 5.3 Makefile.
4406N/A# Creates alternate versions of the scripts needed for building extensions
4406N/A# separately, since the generated versions of these scripts hardcode configuring
4406N/A# for a PHP that is installed on the system.
4406N/ACOMPONENT_POST_INSTALL_ACTION += \
4406N/A ( set -e; \
4406N/A mkdir -p proto-scripts; \
4406N/A cat $(BUILD_DIR_64)/scripts/phpize | \
4406N/A sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
4406N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
4406N/A sed -e "s%^includedir=.*%includedir=$(PROTOUSRPHPVERDIR)/include/php%" | \
4406N/A sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \
4406N/A sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
4406N/A sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
4406N/A sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
4406N/A sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
4406N/A sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_64)%" \
4406N/A > proto-scripts/phpize-proto ; \
4406N/A chmod 755 proto-scripts/phpize-proto ) ; \
4406N/A ( set -e; \
4406N/A cat $(BUILD_DIR_64)/scripts/php-config | \
4406N/A sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
4406N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
4406N/A sed -e "s%^include_dir=.*%include_dir=$(PROTOUSRPHPVERDIR)/include/php%" \
4406N/A > proto-scripts/php-config-proto ; \
4406N/A chmod 755 proto-scripts/php-config-proto ) ;
4406N/A
4824N/A# test failures; keep going
4824N/ACOMPONENT_TEST_ARGS += -k -i
4824N/A# different results for different architectures
4824N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
6713N/ACOMPONENT_TEST_TRANSFORMS += \
6713N/A '-e "/^make/d" '
4824N/A
4406N/ACLEAN_PATHS += proto-scripts
4406N/A
4406N/A# The test results are unstable between runs
4406N/A$(SKIP_TEST_AT_TOP_LEVEL)
4406N/A
4941N/AREQUIRED_PACKAGES += developer/icu
4824N/AREQUIRED_PACKAGES += library/libxml2
4824N/AREQUIRED_PACKAGES += library/openldap
4406N/AREQUIRED_PACKAGES += library/security/openssl
5680N/AREQUIRED_PACKAGES += system/dtrace
6713N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
4941N/AREQUIRED_PACKAGES += system/library/math
5910N/AREQUIRED_PACKAGES += system/management/snmp/net-snmp-57
6021N/AREQUIRED_PACKAGES += system/network/ldap/openldap
6713N/AREQUIRED_PACKAGES += text/gnu-sed