Makefile revision 6903
278N/A#
278N/A# CDDL HEADER START
278N/A#
278N/A# The contents of this file are subject to the terms of the
278N/A# Common Development and Distribution License (the "License").
278N/A# You may not use this file except in compliance with the License.
278N/A#
278N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
278N/A# or http://www.opensolaris.org/os/licensing.
278N/A# See the License for the specific language governing permissions
278N/A# and limitations under the License.
278N/A#
278N/A# When distributing Covered Code, include this CDDL HEADER in each
278N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
278N/A# If applicable, add the following below this CDDL HEADER, with the
278N/A# fields enclosed by brackets "[]" replaced with your own identifying
278N/A# information: Portions Copyright [yyyy] [name of copyright owner]
278N/A#
278N/A# CDDL HEADER END
278N/A#
3968N/A
278N/A#
278N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
278N/A#
1273N/A
4881N/Ainclude ../../../make-rules/shared-macros.mk
618N/A
1273N/Ainclude $(WS_COMPONENTS)/php/php-metadata.mk
1273N/A
278N/ACOMPONENT_NAME= php
844N/ACOMPONENT_VERSION= $(UL_PHP_VERSION)
4881N/ACOMPONENT_PROJECT_URL= http://php.net/
278N/ACOMPONENT_SRC= $(PHP_COMPONENT_SRC)
1273N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
4881N/ACOMPONENT_ARCHIVE_HASH=\
4881N/A sha256:c96980d7de1d66c821a4ee5809df0076f925b2fe0b8c362d234d92f2f0a178e2
3661N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
278N/ACOMPONENT_BUGDB= utility/php
278N/ATPNO= 29533
278N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
278N/A
2622N/Ainclude $(PHP_TOP_DIR)/php.mk
2622N/A
278N/A# Use GCC on S11 to work around build issues with Studio 12.1
278N/ACOMPILER=gcc
278N/ACFLAGS += -std=gnu99
278N/A
278N/A# We patch configure.in to allow building just modules (no SAPI's), e.g. intl.
278N/A# Since we are sharing the source, regenerate configure here.
278N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoconf) ;
278N/A
278N/AASLR_MODE = $(ASLR_ENABLE)
278N/A
278N/Ainclude enable-extensions.mk
278N/A
278N/ACONFIGURE_OPTIONS += --enable-dtrace
278N/AREQUIRED_PACKAGES += system/dtrace
278N/ACOMPONENT_BUILD_ENV += PATH="$(PATH):$(USRSBINDIR)"
278N/A
278N/AVARDIR = /var
278N/AETCPHPDIR= $(ETCDIR)/php/$(UL_PHP_MINOR_VERSION)
278N/AVARPHPDIR= $(VARDIR)/php/$(UL_PHP_MINOR_VERSION)
278N/A# .conf files go under /etc, not /usr
278N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCPHPDIR)
278N/A# var doesn't go under /usr either!
278N/ACONFIGURE_OPTIONS += --localstatedir=$(VARPHPDIR)
278N/A# Nor does php.ini and its friends.
278N/ACONFIGURE_OPTIONS += --with-config-file-path=$(ETCPHPDIR)
278N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=$(ETCPHPDIR)/conf.d
278N/A# Nor does PEAR (default: $PREFIX/lib/php)
278N/ACONFIGURE_OPTIONS += --with-pear=$(VARPHPDIR)/pear
278N/A
278N/A# Use openldap
278N/A# This is good enough to fool configure
278N/ACPPFLAGS += -I$(USRINCDIR)/openldap
278N/ALDFLAGS += -lldap_r
278N/A# but ensure "make" gets the point
278N/ACOMPONENT_BUILD_ARGS += LDAP_SHARED_LIBADD="-lldap_r"
278N/A
278N/A# Disable SSLv2 and SSLv3 for security reasons
278N/ACFLAGS += -DOPENSSL_NO_SSL2
278N/ACFLAGS += -DOPENSSL_NO_SSL3
278N/A
278N/APROTOUSRPHPVERDIR = $(PROTO_DIR)/$(CONFIGURE_PREFIX)
278N/A# Adapted from PHP 5.3 Makefile.
278N/A# Creates alternate versions of the scripts needed for building extensions
278N/A# separately, since the generated versions of these scripts hardcode configuring
278N/A# for a PHP that is installed on the system.
278N/ACOMPONENT_POST_INSTALL_ACTION += \
278N/A ( set -e; \
278N/A mkdir -p proto-scripts; \
278N/A cat $(BUILD_DIR_64)/scripts/phpize | \
278N/A sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
278N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
278N/A sed -e "s%^includedir=.*%includedir=$(PROTOUSRPHPVERDIR)/include/php%" | \
278N/A sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \
278N/A sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
278N/A sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
3970N/A sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
3970N/A sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
3970N/A sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_64)%" \
3970N/A > proto-scripts/phpize-proto ; \
3970N/A chmod 755 proto-scripts/phpize-proto ) ; \
3970N/A ( set -e; \
278N/A cat $(BUILD_DIR_64)/scripts/php-config | \
278N/A sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
3970N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
3970N/A sed -e "s%^include_dir=.*%include_dir=$(PROTOUSRPHPVERDIR)/include/php%" \
3970N/A > proto-scripts/php-config-proto ; \
3970N/A chmod 755 proto-scripts/php-config-proto ) ;
3970N/A
278N/ACLEAN_PATHS += intl/build
278N/ACLEAN_PATHS += proto-scripts
278N/A
278N/A# For picking up php.ini-development and -production
278N/APKG_PROTO_DIRS += $(COMPONENT_SRC)
278N/A
278N/Aconfigure: $(CONFIGURE_64)
278N/Abuild: $(BUILD_64)
278N/Ainstall: $(INSTALL_64)
278N/A cd intl ; $(GMAKE) install
278N/A cp intl/build/prototype/$(MACH)/$(CONFIGURE_PREFIX)/lib/extensions/no-debug-zts-20131226/intl.so $(PROTOUSRPHPVERDIR)/lib/extensions/no-debug-zts-20131226/
278N/A# requirement from intl
278N/AREQUIRED_PACKAGES += library/icu
278N/A
278N/A# The test results are unstable between runs
278N/A$(SKIP_TEST_AT_TOP_LEVEL)
278N/Atest: $(TEST_64)
3996N/A
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/openldap
3996N/AREQUIRED_PACKAGES += library/security/openssl
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += text/gnu-sed
3996N/A