components/php/php56/intl/Makefile
branchs11-update
changeset 4418 7ae5fd823a4b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php/php56/intl/Makefile	Fri Jun 05 09:47:02 2015 -0700
@@ -0,0 +1,65 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+# Build intl extension separately to use Studio for proper linkage with ICU
+
+include ../../../../make-rules/shared-macros.mk
+include $(WS_COMPONENTS)/php/php-metadata.mk
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/configure.mk
+
+# CLEAN_PATHS by default only gets SOURCE_DIR, which we don't want to delete.
+# (removing BUILD_DIR is a separate rule in configure.mk)
+CLEAN_PATHS=
+
+# putting this line here - with no way to compute SOURCE_DIR in prep.mk -
+# means .prep goes in php56/intl.
+SOURCE_DIR = $(PHP_SOURCE_DIR)/ext/intl
+CLEAN_PATHS += .prep
+
+# phpize.mk will cloney SOURCE_DIR into BUILD_DIR_64
+include $(PHP_TOP_DIR)/phpize.mk
+
+CONFIGURE_OPTIONS += --enable-intl=shared
+
+# The build tools (libtool?) insist on passing "-lCrun -lCstd" flags. These are
+# legacy Solaris Studio C++ runtime and standard libraries, which is wrong.
+# The only expedient method I found of removing these flags is to edit the
+# generated Makefile after configure runs.
+COMPONENT_POST_CONFIGURE_ACTION += \
+	$(GSED) -i -e 's/-lCrun//g' -e 's/-lCstd//g' $(BUILD_DIR_64)/Makefile
+
+CONFIGURE_ENV +=	CXXFLAGS="$(CXXFLAGS)"
+
+COMPONENT_TEST_TARGETS = test
+
+configure:		$(CONFIGURE_64)
+build:			$(BUILD_64)
+install:		$(INSTALL_64)
+test:			$(TEST_64)
+
+REQUIRED_PACKAGES += library/icu
+REQUIRED_PACKAGES += system/library/math