components/php-5_2/php-nsapi/Makefile
changeset 4073 4f086b95f18c
parent 4071 4b68c2b0134b
child 4074 3b59c13ef5ec
equal deleted inserted replaced
4071:4b68c2b0134b 4073:4f086b95f18c
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 
       
    24 include ../../../make-rules/shared-macros.mk
       
    25 
       
    26 COMPONENT_NAME=		php
       
    27 COMPONENT_VERSION=	5.2.17
       
    28 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    29 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    30 COMPONENT_ARCHIVE_HASH=	\
       
    31     sha256:1abe07c1fdd64184708a3ba179abcfcca5662a4e0d2037eb2748b75abc42e767
       
    32 COMPONENT_ARCHIVE_URL=	http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
       
    33 #
       
    34 # webserver7-spi only for php NSAPI
       
    35 #
       
    36 COMPONENT_NAME_1=	webserver7-spi
       
    37 #COMPONENT_VERSION_1=	NONE
       
    38 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)
       
    39 COMPONENT_ARCHIVE_1=	$(COMPONENT_NAME_1).tar.bz2
       
    40 COMPONENT_ARCHIVE_HASH_1= \
       
    41     sha256:9739fe99ed270955546313322775940c6b7e8eb802707d248342406ebe5b1c97
       
    42 #
       
    43 # The Netscape server?
       
    44 # Came from Sun's Netscape (web stack) group originally?
       
    45 COMPONENT_ARCHIVE_URL_1= $(EXTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_1)
       
    46 
       
    47 PATCH_DIR = ../php-sapi/patches
       
    48 
       
    49 include $(WS_MAKE_RULES)/prep.mk
       
    50 include $(WS_MAKE_RULES)/configure.mk
       
    51 include $(WS_MAKE_RULES)/ips.mk
       
    52 
       
    53 include ../common.mk
       
    54 include ../php-sapi/php.mk
       
    55 
       
    56 COMPONENT_POST_UNPACK_ACTION += && ( \
       
    57 	set -e; \
       
    58 	$(RM) -r $(COMPONENT_DIR)/$(COMPONENT_SRC_1); \
       
    59 	cd $(COMPONENT_DIR); \
       
    60 	$(UNPACK) $(UNPACK_ARGS) ./$(COMPONENT_ARCHIVE_1); \
       
    61 	)
       
    62 
       
    63 CONFIGURE_OPTIONS  += \
       
    64 	--disable-all \
       
    65 	$(COMMON_CONFIG_OPTIONS) \
       
    66 	--with-config-file-path=$(CONF_DIR) \
       
    67 	--with-config-file-scan-dir=$(CONF_DIR)/conf.d \
       
    68 	--disable-cgi \
       
    69 	--disable-fastcgi \
       
    70 	--enable-discard-path \
       
    71 	--enable-maintainer-zts \
       
    72 	--enable-ftp=shared \
       
    73 	--enable-pdo=shared \
       
    74 	--with-bz2=shared \
       
    75 	--with-curl=shared \
       
    76 	--with-gd=shared \
       
    77 	--with-gettext=shared \
       
    78 	--with-iconv=shared \
       
    79 	--with-imap=shared,$(IMAP_DIR) \
       
    80 	--with-imap-ssl=shared,/usr \
       
    81 	--with-ldap=shared \
       
    82 	--with-mysql=shared,$(MYSQL_DIR) \
       
    83 	--with-mysql-sock=/tmp/mysql.sock \
       
    84 	--with-mysqli=shared,$(MYSQL_DIR)/bin/$(MACH32)/mysql_config \
       
    85 	--with-nsapi=$(COMPONENT_DIR)/webserver7-spi \
       
    86 	--with-openssl=shared \
       
    87 	--with-pear=$(PEAR_DIR) \
       
    88 	--with-pdo-mysql=shared,$(MYSQL_DIR)/bin/$(MACH32)/mysql_config \
       
    89 	--with-pdo-sqlite=shared \
       
    90 	--with-snmp=shared,/usr \
       
    91 	--with-sqlite=shared \
       
    92 	--with-tidy=shared,/usr
       
    93 
       
    94 CONFIGURE_ENV += $(ZTS_CONF_ENVLINE)
       
    95 
       
    96 COMPONENT_POST_BUILD_ACTION = ( \
       
    97 	set -e; \
       
    98 	cat $(BUILD_DIR_32)/scripts/phpize | \
       
    99 	 sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
       
   100 	 sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \
       
   101 	 sed -e "s%^includedir=.*%includedir=$(BUILD_DIR_32)%" | \
       
   102 	 sed -e "s%^phpdir=.*%phpdir=$(BUILD_DIR_32)%"  | \
       
   103 	 sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
       
   104 	 sed -e 's%cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build%cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build%' \
       
   105 	 > phpize-proto.zts ; \
       
   106 	chmod 755 phpize-proto.zts )
       
   107 
       
   108 ADD_NSAPI_MODULE_SUPPORT = ( \
       
   109 	set -e; \
       
   110 	$(MKDIR) $(PROTO_DIR)/$(TOP_DIR)/nsapi/; \
       
   111 	$(CP) $(BUILD_DIR_32)/libs/libphp5.so \
       
   112 		$(PROTO_DIR)/$(TOP_DIR)/nsapi/libphp5.so; \
       
   113 	)
       
   114 
       
   115 FIX_CONFIG_FILES = ( \
       
   116 	set -e; \
       
   117 	cd $(COMPONENT_DIR); \
       
   118 	$(GSED) -e "s@extension_dir = \(.*\)@extension_dir=$(PHP_ROOT_ZTS_EXT)@"< ../php-sapi/build/prototype/$(MACH)/$(CONFDIR)/php.ini > php.ini; \
       
   119 	$(MKDIR) $(PROTO_DIR)/$(NSAPI_CONFDIR); \
       
   120 	$(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(NSAPI_CONFDIR); \
       
   121 	)
       
   122 
       
   123 COMPONENT_INSTALL_TARGETS = libphp5.la install-modules
       
   124 
       
   125 COMPONENT_POST_INSTALL_ACTION = ( \
       
   126 	set -e; \
       
   127 	$(ADD_NSAPI_MODULE_SUPPORT); \
       
   128 	$(FIX_CONFIG_FILES); \
       
   129 	)
       
   130 
       
   131 CLEAN_PATHS += webserver7-spi phpize-proto.zts php.ini
       
   132 
       
   133 # common targets
       
   134 configure:	$(CONFIGURE_32)
       
   135 
       
   136 build:		$(BUILD_32)
       
   137 
       
   138 install:	$(INSTALL_32)
       
   139 
       
   140 test:		$(TEST_32)
       
   141 
       
   142 # php-sapi does the publish
       
   143 publish:	install
       
   144 
       
   145 ## causes loop in gmake
       
   146 ##../php-sapi/build/$(MACH32)/.installed:
       
   147 ##	(cd ../php-sapi ; $(MAKE) install)
       
   148 ##
       
   149 ##$(BUILD_DIR_32)/.configured:	../php-sapi/build/$(MACH32)/.installed
       
   150