Makefile revision 6021
342N/A#
1472N/A# CDDL HEADER START
342N/A#
342N/A# The contents of this file are subject to the terms of the
342N/A# Common Development and Distribution License (the "License").
342N/A# You may not use this file except in compliance with the License.
342N/A#
342N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
342N/A# or http://www.opensolaris.org/os/licensing.
342N/A# See the License for the specific language governing permissions
342N/A# and limitations under the License.
342N/A#
342N/A# When distributing Covered Code, include this CDDL HEADER in each
342N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
342N/A# If applicable, add the following below this CDDL HEADER, with the
342N/A# fields enclosed by brackets "[]" replaced with your own identifying
342N/A# information: Portions Copyright [yyyy] [name of copyright owner]
342N/A#
1472N/A# CDDL HEADER END
1472N/A#
1472N/A
342N/A#
342N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
342N/A#
342N/ABUILD_BITS= 64
342N/Ainclude ../../../make-rules/shared-macros.mk
342N/A
342N/Ainclude $(WS_COMPONENTS)/php/php-metadata.mk
342N/A
342N/ACOMPONENT_NAME= php
342N/ACOMPONENT_VERSION= $(UL_PHP_VERSION)
342N/ACOMPONENT_PROJECT_URL= http://php.net/
342N/ACOMPONENT_SRC= $(PHP_COMPONENT_SRC)
1387N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
1387N/ACOMPONENT_ARCHIVE_HASH=\
1387N/A sha256:0af0045745d61eeb74a3ea744529a2481b27cb689da720e6c0250675043724e4
1387N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
1387N/ATPNO= 22435
1387N/A
342N/Ainclude $(WS_MAKE_RULES)/common.mk
342N/Ainclude $(PHP_TOP_DIR)/php.mk
453N/A
342N/A# We patch configure.in to allow building just modules (no SAPI's), e.g. intl.
457N/A# Since we are sharing the source, regenerate configure here.
342N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoreconf) ;
342N/A
342N/Ainclude enable-extensions.mk
342N/A
342N/ACONFIGURE_OPTIONS += --enable-dtrace
342N/ACOMPONENT_BUILD_ENV += PATH="$(PATH):$(USRSBINDIR)"
342N/A
342N/AETCPHPDIR= $(ETCDIR)/php/$(UL_PHP_MINOR_VERSION)
342N/AVARPHPDIR= $(VARDIR)/php/$(UL_PHP_MINOR_VERSION)
342N/A# .conf files go under /etc, not /usr
342N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCPHPDIR)
342N/A# var doesn't go under /usr either!
342N/ACONFIGURE_OPTIONS += --localstatedir=$(VARPHPDIR)
342N/A# Nor does php.ini and its friends.
358N/ACONFIGURE_OPTIONS += --with-config-file-path=$(ETCPHPDIR)
358N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=$(ETCPHPDIR)/conf.d
358N/A# Nor does PEAR (default: $PREFIX/lib/php)
358N/ACONFIGURE_OPTIONS += --with-pear=$(VARPHPDIR)/pear
342N/A
342N/A# Use openldap
751N/A# This is good enough to fool configure
342N/ACPPFLAGS += -I$(USRINCDIR)/openldap
342N/ALDFLAGS += -lldap_r
342N/A# but ensure "make" gets the point
342N/ACOMPONENT_BUILD_ARGS += LDAP_SHARED_LIBADD="-lldap_r"
342N/A
342N/A# Disable SSLv2 and SSLv3 for security reasons
342N/ACFLAGS += -DOPENSSL_NO_SSL2
342N/ACFLAGS += -DOPENSSL_NO_SSL3
342N/A
342N/APROTOUSRPHPVERDIR = $(PROTO_DIR)/$(CONFIGURE_PREFIX)
342N/A# Adapted from PHP 5.3 Makefile.
342N/A# Creates alternate versions of the scripts needed for building extensions
342N/A# separately, since the generated versions of these scripts hardcode configuring
342N/A# for a PHP that is installed on the system.
358N/ACOMPONENT_POST_INSTALL_ACTION += \
342N/A ( set -e; \
342N/A mkdir -p proto-scripts; \
342N/A cat $(BUILD_DIR_64)/scripts/phpize | \
342N/A sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
342N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
342N/A sed -e "s%^includedir=.*%includedir=$(PROTOUSRPHPVERDIR)/include/php%" | \
342N/A sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \
342N/A sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
342N/A sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
342N/A sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
342N/A sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
342N/A sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_64)%" \
342N/A > proto-scripts/phpize-proto ; \
342N/A chmod 755 proto-scripts/phpize-proto ) ; \
342N/A ( set -e; \
342N/A cat $(BUILD_DIR_64)/scripts/php-config | \
342N/A sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
342N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
342N/A sed -e "s%^include_dir=.*%include_dir=$(PROTOUSRPHPVERDIR)/include/php%" \
342N/A > proto-scripts/php-config-proto ; \
342N/A chmod 755 proto-scripts/php-config-proto ) ;
342N/A
342N/A# test failures; keep going
342N/ACOMPONENT_TEST_ARGS += -k -i
342N/A# different results for different architectures
342N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
342N/A
342N/ACLEAN_PATHS += proto-scripts
1311N/A
1311N/A# The test results are unstable between runs
342N/A$(SKIP_TEST_AT_TOP_LEVEL)
941N/A
342N/AREQUIRED_PACKAGES += developer/icu
941N/AREQUIRED_PACKAGES += library/libxml2
941N/AREQUIRED_PACKAGES += library/openldap
941N/AREQUIRED_PACKAGES += library/security/openssl
941N/AREQUIRED_PACKAGES += system/dtrace
941N/AREQUIRED_PACKAGES += system/library/math
941N/AREQUIRED_PACKAGES += system/management/snmp/net-snmp-57
342N/AREQUIRED_PACKAGES += system/network/ldap/openldap
342N/A