components/php-5_2/php-sapi/Makefile
author Craig Mohrman <craig.mohrman@oracle.com>
Fri, 05 Aug 2011 22:11:53 -0700
changeset 461 edabdd6aff23
child 800 2ad056ed89ec
permissions -rw-r--r--
7072982 move php from sfw to userland consolidation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
461
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     1
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     3
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     7
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    12
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    18
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    20
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    22
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    23
include ../../../make-rules/shared-macros.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    24
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		php
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=	5.2.17
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    27
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    28
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE_HASH=	sha1:5ba7edcb5ea187687001c4ccdbb94ac48f77fa92
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_URL=	http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    31
COMPONENT_PROJECT_URL=	http://www.php.net/
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    32
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    33
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    34
# php documentation
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    35
COMPONENT_NAME_1=       php_manual_en_20090130
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    36
#COMPONENT_VERSION_1=   NONE
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    37
COMPONENT_SRC_1=        $(COMPONENT_NAME_1)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    38
COMPONENT_ARCHIVE_1=    $(COMPONENT_NAME_1).tar.gz
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    39
COMPONENT_ARCHIVE_HASH_1= sha1:5eeaedf852afa3b406962fd6b425d8357f189fbf
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    40
#
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    41
# This older version is no longer available so it is cached on
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    42
# internal servers.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    43
COMPONENT_ARCHIVE_URL_1= $(EXTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_1)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    44
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    45
include $(WS_TOP)/make-rules/prep.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    46
include $(WS_TOP)/make-rules/configure.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    47
include $(WS_TOP)/make-rules/ips.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    48
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    49
include ../common.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    50
include ./php.mk
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    51
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    52
CONFIGURE_OPTIONS  += \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    53
	$(COMMON_CONFIG_OPTIONS) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    54
	--disable-cgi \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    55
	--disable-fastcgi \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    56
	--enable-discard-path \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    57
	--enable-ftp=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    58
	--enable-pdo=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    59
	--with-apxs2=$(APACHE_USR_PREFIX)/bin/apxs \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    60
	--with-bz2=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    61
	--with-config-file-path=$(CONF_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    62
	--with-config-file-scan-dir=$(MODULES_CONF_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    63
	--with-curl=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    64
	--with-curlwrappers \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    65
	--with-gd=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    66
	--with-gettext=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    67
	--with-iconv=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    68
	--with-imap=shared,$(IMAP_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    69
	--with-imap-ssl=shared,/usr \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    70
	--with-ldap=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    71
	--with-mysql=shared,$(MYSQL_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    72
	--with-mysql-sock=/tmp/mysql.sock \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    73
	--with-mysqli=shared,$(MYSQL_DIR)/bin/mysql_config \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    74
	--with-openssl=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    75
	--with-pear=$(PEAR_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    76
	--with-pdo-mysql=shared,$(MYSQL_DIR) \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    77
	--with-pdo-sqlite=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    78
	--with-snmp=shared,/usr \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    79
	--with-sqlite=shared \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    80
	--with-tidy=shared,/usr \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    81
	--without-tsrm-pthreads
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    82
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    83
CONFIGURE_ENV += $(CONF_ENVLINE)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    84
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    85
COMPONENT_POST_BUILD_ACTION = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    86
	cat $(BUILD_DIR_32)/scripts/phpize | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    87
	 sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    88
	 sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    89
	 sed -e "s%^includedir=.*%includedir=$(SOURCE_DIR)%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    90
	 sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%"  | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    91
	 sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    92
	 sed -e "s%$PHP_AUTOCONF   || exit 1%$PHP_AUTOCONF -f   || exit 1%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    93
	 sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    94
	 sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    95
	 sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_32)%" \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    96
	 > phpize-proto ; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    97
	chmod 755 phpize-proto ) ; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    98
	( cat $(BUILD_DIR_32)/scripts/php-config | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    99
	 sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   100
	 sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   101
	 sed -e "s%^include_dir=.*%include_dir=$(SOURCE_DIR)%" \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   102
	 > php-config-proto ; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   103
	chmod 755 php-config-proto ) ; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   104
	( cat $(BUILD_DIR_32)/scripts/php-config | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   105
	 sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   106
	 sed -e "s%^prefix=.*%prefix=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   107
	 sed -e "s%^include_dir=.*%include_dir=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   108
	 sed -e "s%^extension_dir=.*%extension_dir=$(ZTS_MODULES_DIR)%" \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   109
	 > php-config-proto.zts ; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   110
	chmod 755 php-config-proto.zts )
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   111
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   112
ADD_APACHE2_MODULE_SUPPORT = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   113
	$(MKDIR) $(PROTO_DIR)/$(APACHE2_CONFDIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   114
	$(CP) $(COMPONENT_DIR)/../Solaris/php$(PHP_REL).conf \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   115
		$(PROTO_DIR)/$(APACHE2_CONFDIR)/php$(PHP_REL).conf; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   116
	$(CHMOD) 644 $(PROTO_DIR)/$(APACHE2_CONFDIR)/php$(PHP_REL).conf; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   117
	$(CP) $(PROTO_DIR)/$(APACHE2_EXTDIR)/libphp5.so \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   118
		$(PROTO_DIR)/$(APACHE2_EXTDIR)/mod_php$(PHP_REL).so \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   119
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   120
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   121
# Ship a default php.ini to simplify ease of use.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   122
FIX_CONFIG_FILES = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   123
	cd $(SOURCE_DIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   124
	$(GPATCH) -p1 -o php.ini-patched -i ../patches-other/php_ini.patch; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   125
	$(GSED) -e "s@<<VERSION>>@$(PHP_REL)@g" < php.ini-patched > php.ini; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   126
	$(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(CONF_DIR)/php.ini; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   127
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   128
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   129
INSTALL_DOCS = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   130
	$(MKDIR) $(PROTO_DIR)/$(DOCDIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   131
	$(UNPACK) -r $(PROTO_DIR)/$(DOCDIR) $(COMPONENT_ARCHIVE_1); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   132
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   133
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   134
INSTALL_SAMPLES = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   135
	$(MKDIR) $(PROTO_DIR)/$(SCRIPTS_DIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   136
	$(MKDIR) $(COMPONENT_DIR)/tmp; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   137
	cd $(COMPONENT_DIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   138
	$(GSED) -e "s,\<\<INSTALL_DIR\>\>,$(PHP_ROOT)," \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   139
		-e "s,\<\<CONF_DIR\>\>,$(CONFDIR)," \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   140
		-e "s,\<\<NSAPI_CONF_DIR\>\>,$(NSAPI_CONFDIR)," \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   141
		-e "s,\<\<MODULES_CONF_DIR\>\>,$(MODULES_CONFDIR)," \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   142
		-e "s,\<\<ZTS_MODULES_CONF_DIR\>\>,$(ZTS_MODULES_CONFDIR)," \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   143
		< $(COMPONENT_DIR)/../Solaris/configure-sun-webserver \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   144
		> tmp/tmp; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   145
	$(INSTALL) -m 555 tmp/tmp \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   146
		$(PROTO_DIR)/$(SCRIPTS_DIR)/configure-sun-webserver; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   147
	cd $(PROTO_DIR)/$(PHP_BIN); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   148
	$(RM) configure-webserver7; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   149
	$(SYMLINK) ../samples/scripts/configure-sun-webserver \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   150
						configure-webserver7; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   151
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   152
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   153
# configure man pages
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   154
INSTALL_MAN = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   155
	$(MKDIR) $(PROTOUSRSHAREMAN1DIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   156
	$(INSTALL) -m 444 $(COMPONENT_DIR)/../Solaris/php.1.sunman \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   157
		$(PROTOUSRSHAREMAN1DIR)/php.1; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   158
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   159
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   160
# patch installation to support pear installation.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   161
PATCH_PEAR = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   162
	cd $(PROTO_DIR)/$(PHP_BIN); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   163
	$(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_pecl.patch; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   164
	$(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_php_config.patch; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   165
	cd $(PROTO_DIR)/$(PHP_LIB)/build; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   166
	$(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_Makefile_global.patch; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   167
	cd $(PROTO_DIR)/$(PEAR_DIR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   168
	$(GPATCH) -N -p0 -i $(COMPONENT_DIR)/patches-other/pear_Builder_php.patch; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   169
	$(CP) $(COMPONENT_DIR)/config/pear/*.reg \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   170
					$(PROTO_DIR)/$(PEAR_DIR)/.channels/;  \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   171
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   172
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   173
# Create symbolic links
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   174
# Not strictly necessary but makes the proto area more correct.
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   175
CREATE_SYMLINKS = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   176
	cd $(PROTO_DIR)/usr/php; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   177
	$(RM) bin lib include modules doc man; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   178
	$(SYMLINK) ./$(PHP_REL)/bin bin; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   179
	$(SYMLINK) ./$(PHP_REL)/lib lib; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   180
	$(SYMLINK) ./$(PHP_REL)/include include; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   181
	$(SYMLINK) ./$(PHP_REL)/modules modules; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   182
	$(SYMLINK) ./$(PHP_REL)/doc doc; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   183
	$(SYMLINK) ./$(PHP_REL)/man man; \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   184
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   185
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   186
COMPONENT_POST_INSTALL_ACTION = ( \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   187
	$(ADD_APACHE2_MODULE_SUPPORT); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   188
	$(FIX_CONFIG_FILES); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   189
	$(FIX_CONFIG_FILES_2); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   190
	$(INSTALL_DOCS); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   191
	$(INSTALL_SAMPLES); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   192
	$(INSTALL_MAN); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   193
	$(PATCH_PEAR); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   194
	$(CREATE_SYMLINKS); \
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   195
	)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   196
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   197
# This package contains all 3 versions of php:
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   198
#	sapi, cgi, nsapi
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   199
PKG_PROTO_DIRS += $(COMPONENT_DIR)/../php-nsapi/build/prototype/$(MACH)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   200
PKG_PROTO_DIRS += $(COMPONENT_DIR)/../php-cgi/build/prototype/$(MACH)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   201
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   202
CLEAN_PATHS += phpize-proto php-config-proto php-config-proto.zts tmp
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   203
CLEAN_PATHS += php.ini-patched
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   204
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   205
# common targets
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   206
build:		$(BUILD_32)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   207
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   208
install:	$(INSTALL_32) PHP-NSAPI_INSTALL PHP-CGI_INSTALL
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   209
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   210
test:		$(TEST_32)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   211
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   212
../imap/build/$(MACH32)/.built:
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   213
	(cd ../imap ; $(MAKE) build)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   214
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   215
../php-nsapi/build/$(MACH32)/.installed:
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   216
	(cd ../php-nsapi ; $(MAKE) install)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   217
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   218
../php-cgi/build/$(MACH32)/.installed:
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   219
	(cd ../php-cgi ; $(MAKE) install)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   220
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   221
$(BUILD_DIR_32)/.configured:	../imap/build/$(MACH32)/.built
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   222
PHP-NSAPI_INSTALL:		../php-nsapi/build/$(MACH32)/.installed
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   223
PHP-CGI_INSTALL:		../php-cgi/build/$(MACH32)/.installed
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   224
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   225
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   226
edabdd6aff23 7072982 move php from sfw to userland consolidation
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
   227
include $(WS_TOP)/make-rules/depend.mk