components/php/phpize.mk
author Rich Burridge <rich.burridge@oracle.com>
Fri, 19 Jun 2015 18:44:29 -0700
branchs11-update
changeset 4514 d5eea6257d67
parent 4418 7ae5fd823a4b
permissions -rw-r--r--
15477360 SUNBT6696488 rpm2cpio needs updating to cope with rpms from the modern era
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4418
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     1
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     3
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     7
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    12
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    18
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    20
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    21
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    22
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    23
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    24
#
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    25
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    26
# This is a collection of Makefile lines needed for building PHP extensions
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    27
# outside of the PHP source tree.  It is named for the "phpize" script, which
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    28
# is the main deviation from the standard configure-make-install cycle.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    29
# This file should handle everything necessary for an extension whose upstream
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    30
# expects the user to run "phpize" in order to create ./configure.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    31
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    32
# It relies on the Userland makefile for PHP creating modified versions of
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    33
# phpize and php-config for use during Userland builds, and placing them under
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    34
# $(PHP_BUNDLE_DIR)/proto-scripts. Therefore, it depends on gmake install of PHP
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    35
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    36
# Usage:
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    37
# include ../../../make-rules/shared-macros.mk [appropriate path]
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    38
# include $(WS_COMPONENTS)/php/php-metadata.mk
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    39
# [COMPONENT_* lines]
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    40
# include $(WS_MAKE_RULES)/prep.mk
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    41
# include $(WS_MAKE_RULES)/configure.mk
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    42
# include $(PHP_TOP_DIR)/phpize.mk
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    43
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    44
# Depends on having a built and intalled (prototype) version of PHP available
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    45
$(BUILD_DIR_64)/.configured: $(PHP_BUILD_DIR_64)/.installed
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    46
$(PHP_BUILD_DIR_64)/.installed:
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    47
	cd $(PHP_BUNDLE_DIR) ; $(GMAKE) install ;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    48
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    49
include $(PHP_TOP_DIR)/php.mk
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    50
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    51
COMPONENT_PRE_CONFIGURE_ACTION += \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    52
	$(GSED) -e "s|^builddir=.*|builddir=$(@D)|" \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    53
		< $(PHP_BUNDLE_DIR)/proto-scripts/phpize-proto \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    54
		> $(@D)/phpize-proto; \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    55
	chmod +x $(@D)/phpize-proto;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    56
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    57
# .tgz files from pecl contain this file
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    58
CLEAN_PATHS += package.xml
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    59
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    60
# The phpize script tries to copy some files into here, failing if the directory
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    61
# doesn't exist.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    62
COMPONENT_PRE_CONFIGURE_ACTION += mkdir $(@D)/build;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    63
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    64
# phpize generates configure where it is run.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    65
COMPONENT_PRE_CONFIGURE_ACTION += $(CLONEY) $(SOURCE_DIR) $(@D) ;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    66
CONFIGURE_SCRIPT = $(@D)/configure
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    67
COMPONENT_PRE_CONFIGURE_ACTION += cd $(@D) ; $(@D)/phpize-proto;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    68
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    69
# Change PHP_EXECUTABLE so that tests can run.
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    70
PROTOUSRPHPVERDIR = $(PHP_PROTO_DIR)/$(CONFIGURE_PREFIX)
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    71
COMPONENT_PRE_CONFIGURE_ACTION += \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    72
	$(GSED) -i -e "[email protected]^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(PROTOUSRPHPVERDIR)/bin/[email protected]" \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    73
		$(CONFIGURE_SCRIPT) ;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    74
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    75
COMPONENT_PRE_CONFIGURE_ACTION += \
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    76
		cp $(PHP_BUNDLE_DIR)/proto-scripts/php-config-proto $(@D) ;
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    77
CONFIGURE_OPTIONS += --with-php-config=$(@D)/php-config-proto
7ae5fd823a4b PSARC 2015/255 Update PHP to version 5.6.8
Michael Nestler <Michael.Nestler@Oracle.COM>
parents:
diff changeset
    78