Makefile revision 4824
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#
4406N/A# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4406N/A#
4406N/A
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.bz2
4406N/ACOMPONENT_ARCHIVE_HASH=\
4406N/A sha256:0af0045745d61eeb74a3ea744529a2481b27cb689da720e6c0250675043724e4
4406N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
4406N/ACOMPONENT_BUGDB= utility/php
4406N/ATPNO= 22435
4406N/A
4406N/Ainclude $(WS_MAKE_RULES)/prep.mk
4406N/Ainclude $(WS_MAKE_RULES)/configure.mk
4406N/Ainclude $(WS_MAKE_RULES)/ips.mk
4406N/A
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.
4406N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoconf) ;
4406N/A
4406N/AASLR_MODE = $(ASLR_ENABLE)
4406N/A
4406N/Ainclude enable-extensions.mk
4406N/A
4406N/ACONFIGURE_OPTIONS += --enable-dtrace
4406N/AREQUIRED_PACKAGES += system/dtrace
4406N/ACOMPONENT_BUILD_ENV += PATH="$$PATH:/usr/sbin"
4406N/A
4406N/A# .conf files go under /etc, not /usr
4406N/ACONFIGURE_OPTIONS += --sysconfdir=/etc/php/$(UL_PHP_MINOR_VERSION)
4406N/A# var doesn't go under /usr either!
4406N/ACONFIGURE_OPTIONS += --localstatedir=/var/php/$(UL_PHP_MINOR_VERSION)
4406N/A# Nor does php.ini and its friends.
4406N/ACONFIGURE_OPTIONS += --with-config-file-path=/etc/php/$(UL_PHP_MINOR_VERSION)
4406N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=/etc/php/$(UL_PHP_MINOR_VERSION)/conf.d
4406N/A# Nor does PEAR (default: $PREFIX/lib/php)
4406N/ACONFIGURE_OPTIONS += --with-pear=/var/php/$(UL_PHP_MINOR_VERSION)/pear
4406N/A
4824N/A# Use openldap
4824N/A# This is good enough to fool configure
4824N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/openldap" \
4824N/A LDFLAGS="$(LDFLAGS) -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
4824N/A
4406N/ACLEAN_PATHS += proto-scripts
4406N/A
4406N/A# For picking up php.ini-development and -production
4406N/APKG_PROTO_DIRS += $(COMPONENT_SRC)
4406N/A
4406N/Aconfigure: $(CONFIGURE_64)
4406N/Abuild: $(BUILD_64)
4406N/Ainstall: $(INSTALL_64)
4406N/A
4406N/A# The test results are unstable between runs
4406N/A$(SKIP_TEST_AT_TOP_LEVEL)
4406N/Atest: $(TEST_64)
4406N/A
4406N/AREQUIRED_PACKAGES += system/library
4406N/AREQUIRED_PACKAGES += system/library/math
4824N/AREQUIRED_PACKAGES += library/libxml2
4824N/AREQUIRED_PACKAGES += library/openldap
4406N/AREQUIRED_PACKAGES += library/security/openssl