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