Makefile revision 3996
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater# CDDL HEADER START
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater# The contents of this file are subject to the terms of the
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater# Common Development and Distribution License (the "License").
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater# You may not use this file except in compliance with the License.
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater# See the License for the specific language governing permissions
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# and limitations under the License.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# If applicable, add the following below this CDDL HEADER, with the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Currently the version numbers in the package manifests, one
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# level up, are manually set because the COMPONENT_VERSION, like
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# below, is not available at the top level where this is IPS
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# published from.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sha256:c4e1cf6972b2a9c7f2777a18497d83bf713cdbecabb65d3ff62ba441aebb0091
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_ARCHIVE_URL= http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
bbb069be941f649228760edcc241122933c066d2Automatic Updater# php documentation
9d330c054e02f52cefd8dc0e71550b0fe07e077eAutomatic UpdaterCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION_1)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews sha256:4c5d45e5f49bb164d40154fdef57b3193e7b77e306055559e60615c8ca9a3c30
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# This next download URL is completely hocus pocus.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# php.net does not freeze their documentation to match the software versions.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# So we need to take a snapshot of PHP's documentation by downloading what
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# they currently have from this URL:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# COMPONENT_ARCHIVE_URL_1=http://us.php.net/get/php_manual_en.tar.gz/from/this/mirror
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Then move that download to the name being constructed in the variables
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# above. Finally, forward a copy to the gatekeeping staff to place
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# the copy in userland's download cache so that the following download URL
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# will pick it up.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCOMPONENT_ARCHIVE_URL_1=http://us.php.net/get/$(COMPONENT_ARCHIVE_1)/from/this/mirror
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews --with-config-file-scan-dir=$(MODULES_CONF_DIR) \
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater sed -e "s%^includedir=.*%includedir=$(BUILD_DIR_32)%" | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^phpdir=.*%phpdir=$(BUILD_DIR_32)%" | \
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_32)%" \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cat $(BUILD_DIR_32)/scripts/php-config | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^include_dir=.*%include_dir=$(BUILD_DIR_32)%" \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cat $(BUILD_DIR_32)/scripts/php-config | \
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^prefix=.*%prefix=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater sed -e "s%^include_dir=.*%include_dir=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater sed -e "s%^extension_dir=.*%extension_dir=$(ZTS_MODULES_DIR)%" \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/../Solaris/php$(PHP_REL).conf \
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater $(PROTO_DIR)/$(APACHE2_PHP)/php$(PHP_REL).conf; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(GSED) -i -e "s@<<VERSION>>@$(PHP_REL)@g" \
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater $(PROTO_DIR)/$(APACHE2_PHP)/php$(PHP_REL).conf; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(CP) $(PROTO_DIR)/$(APACHE2_EXTDIR)/libphp5.so \
bbb069be941f649228760edcc241122933c066d2Automatic Updater $(PROTO_DIR)/$(APACHE2_EXTDIR)/mod_php$(PHP_REL).so; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Ship a default php.ini to simplify ease of use.
b0d566a2ce0f5a67f537ee7f8233f82f2584cc61Automatic Updater# Replace the php.ini-production symlink with a copy of the real file because
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater# gpatch no longer follows symlinks.
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater $(GPATCH) -p0 -o php.ini-patched -i ../../patches-other/php_ini.patch; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(GSED) -e "s@<<VERSION>>@$(PHP_REL)@g" < php.ini-patched > php.ini; \
c5a53da13bb2126dcbbd5b45ca4904eccafe6621Automatic Updater $(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(CONF_DIR)/php.ini; \
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater $(UNPACK) -r $(PROTO_DIR)/$(DOCDIR) $(COMPONENT_ARCHIVE_1); \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(GSED) -e "s,\<\<INSTALL_DIR\>\>,$(PHP_ROOT)," \
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater -e "s,\<\<NSAPI_CONF_DIR\>\>,$(NSAPI_CONFDIR)," \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson -e "s,\<\<MODULES_CONF_DIR\>\>,$(MODULES_CONFDIR)," \
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater -e "s,\<\<ZTS_MODULES_CONF_DIR\>\>,$(ZTS_MODULES_CONFDIR)," \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater < $(COMPONENT_DIR)/../Solaris/configure-sun-webserver \
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater $(PROTO_DIR)/$(SCRIPTS_DIR)/configure-sun-webserver; \
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews $(SYMLINK) ../samples/scripts/configure-sun-webserver \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# patch installation to support pear installation.
8ae412a86ed138263796195eed82a4716e7effcbMark Andrews $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_pecl.patch; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_php_config.patch; \
3c5dffc581c882235485cf5eaf7cd6a5e07548bfAutomatic Updater $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_Makefile_global.patch; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(GPATCH) -N -p0 -i $(COMPONENT_DIR)/patches-other/pear_Builder_php.patch; \
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Create symbolic links
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Not strictly necessary but makes the proto area more correct.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews $(SYMLINK) ../php/$(PHP_REL)/bin/php-config . ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# This package contains all 3 versions of php:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# sapi, cgi, nsapi
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonPKG_PROTO_DIRS += $(COMPONENT_DIR)/../php-nsapi/build/prototype/$(MACH)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonPKG_PROTO_DIRS += $(COMPONENT_DIR)/../php-cgi/build/prototype/$(MACH)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCLEAN_PATHS += phpize-proto php-config-proto php-config-proto.zts tmp
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# common targets
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninstall: $(INSTALL_32) PHP-NSAPI_INSTALL PHP-CGI_INSTALL
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Besides running this test target it is also strong advised to download
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and test with:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington$(BUILD_DIR_32)/.configured: ../imap/build/$(MACH32)/.built
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonPHP-NSAPI_INSTALL: ../php-nsapi/build/$(MACH32)/.installed