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