Makefile revision 7055
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
4406N/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)
4406N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
4406N/ACOMPONENT_ARCHIVE_HASH=\
4406N/A sha256:c96980d7de1d66c821a4ee5809df0076f925b2fe0b8c362d234d92f2f0a178e2
4406N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
4406N/ATPNO= 29533
5680N/A
4406N/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.
5680N/A# Since we are sharing the source, regenerate configure here.
4406N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoreconf) ;
4406N/A
4406N/Ainclude enable-extensions.mk
4406N/A
5680N/ACONFIGURE_OPTIONS += --enable-dtrace
4406N/ACOMPONENT_BUILD_ENV += PATH="$(PATH):$(USRSBINDIR)"
5680N/A
5680N/A# Without this, the the build seems to interrogate GCC for potential library
4406N/A# search path information and then embed it into the RUNPATH of selected ELF
5680N/A# files it creates. This includes GCC private directories
4406N/ACONFIGURE_OPTIONS += --disable-rpath
5680N/A
4406N/AETCPHPDIR= $(ETCDIR)/php/$(UL_PHP_MINOR_VERSION)
5680N/AVARPHPDIR= $(VARDIR)/php/$(UL_PHP_MINOR_VERSION)
5680N/A# .conf files go under /etc, not /usr
4406N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCPHPDIR)
5680N/A# var doesn't go under /usr either!
4406N/ACONFIGURE_OPTIONS += --localstatedir=$(VARPHPDIR)
4824N/A# Nor does php.ini and its friends.
4824N/ACONFIGURE_OPTIONS += --with-config-file-path=$(ETCPHPDIR)
5680N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=$(ETCPHPDIR)/conf.d
5680N/A# Nor does PEAR (default: $PREFIX/lib/php)
4824N/ACONFIGURE_OPTIONS += --with-pear=$(VARPHPDIR)/pear
4824N/A
4824N/A# icu's switch to g++
4478N/A# 21090206 icu should build C++ to C++11
4478N/A# Causes this in php forcing php to switch also
4478N/A# 23003672 PHP fails all or most tests
4478N/ACXXFLAGS += -std=c++11
4406N/ACONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
4406N/A
4406N/A# Use openldap
4406N/A# This is good enough to fool configure
4406N/ACPPFLAGS += -I$(USRINCDIR)/openldap
4406N/ALDFLAGS += -lldap_r
4406N/A# but ensure "make" gets the point
4406N/ACOMPONENT_BUILD_ARGS += LDAP_SHARED_LIBADD="-lldap_r"
4406N/A
4406N/A# Disable SSLv2 and SSLv3 for security reasons
4406N/ACFLAGS += -DOPENSSL_NO_SSL2
4406N/ACFLAGS += -DOPENSSL_NO_SSL3
4406N/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%" | \
4824N/A sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
4824N/A sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
4824N/A sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_64)%" \
4824N/A > proto-scripts/phpize-proto ; \
4824N/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%" \
4941N/A > proto-scripts/php-config-proto ; \
4824N/A chmod 755 proto-scripts/php-config-proto ) ;
4824N/A
4406N/A# test failures; keep going
5680N/ACOMPONENT_TEST_ARGS += -k -i
4941N/A# different results for different architectures
5910N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
6021N/ACOMPONENT_TEST_TRANSFORMS += \
'-e "/^make/d" '
CLEAN_PATHS += proto-scripts
# The test results are unstable between runs
$(SKIP_TEST_AT_TOP_LEVEL)
REQUIRED_PACKAGES += developer/icu
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += system/dtrace
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/management/snmp/net-snmp-57
REQUIRED_PACKAGES += system/network/ldap/openldap
REQUIRED_PACKAGES += text/gnu-sed