Makefile revision 3494
bf52162f2d05c1fb1a107c7ef108de73f739b3edpquerna# CDDL HEADER START
09359a90ff115fc5eeb96e1e5c78a58dd9fc59d3jim# The contents of this file are subject to the terms of the
b8c9229249804470a885a1a43f7f2dad15fb06a3rjung# Common Development and Distribution License (the "License").
b8c9229249804470a885a1a43f7f2dad15fb06a3rjung# You may not use this file except in compliance with the License.
ef3e19a9a27ca055dd20e971d5578f5510308023niq# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ef3e19a9a27ca055dd20e971d5578f5510308023niq# See the License for the specific language governing permissions
ef3e19a9a27ca055dd20e971d5578f5510308023niq# and limitations under the License.
099d298d417b68b3d11fb5934c404c60f518d69csf# When distributing Covered Code, include this CDDL HEADER in each
099d298d417b68b3d11fb5934c404c60f518d69csf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0d54de55e9fec3d9ac5989a5fe016f349b82ed05sf# If applicable, add the following below this CDDL HEADER, with the
0d54de55e9fec3d9ac5989a5fe016f349b82ed05sf# fields enclosed by brackets "[]" replaced with your own identifying
0d54de55e9fec3d9ac5989a5fe016f349b82ed05sf# information: Portions Copyright [yyyy] [name of copyright owner]
636d0d3e03f5f4f2fefae0f20c36e288755e79f6rjung# CDDL HEADER END
3f5968bf1059aebe846e121a6f3748dd03471ce4sf# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
7c6f514f2ef9b98f58b8f8a5f534eb78a75f29f2jorton sha256:5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc
3e520e9f095fbbcaa3c216c8ea56e89bd6fd58b4sfCOMPONENT_ARCHIVE_URL= ftp://xmlsoft.org/libxml2/$(COMPONENT_ARCHIVE)
3e520e9f095fbbcaa3c216c8ea56e89bd6fd58b4sf# W3C XML Conformance Test Suites
93d757f10e0823af718075b34363970c4af0e6cdsf sha256:96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7
533d85911f7e4914ee5f9d5c99a2421f4ab4208asfCOMPONENT_ARCHIVE_URL_1= http://www.w3.org/XML/Test/$(COMPONENT_ARCHIVE_1)
3ef519991d73cff6763052b5a44c206bda01541dsfCONFIGURE_OPTIONS += --with-python-install-dir=$(PYTHON_VENDOR_PACKAGES)
3ef519991d73cff6763052b5a44c206bda01541dsf# Cannot link to lzma since it's not in /lib.
f82baabbe731507742af2f7ba41463dbbc7911e9sfCOMPONENT_PREP_ACTION += (cd $(@D) ; cp ../mapfile libxml2.syms ; autoreconf -if)
26d07dbe57cb2c8f49df541329a1653635988dbbsf# After we have configured, make a copy of the python bits so we can build and
26d07dbe57cb2c8f49df541329a1653635988dbbsf# test separate python 2.7 and 3.4 support. Note for 3.4: .py files need to
09359a90ff115fc5eeb96e1e5c78a58dd9fc59d3jim# go in .../vendor-packages (whether building 32-bit or 64-bit) whereas .so
686555019e71b355e835166dfefbec33f7fb6f90rjung# files need to go in .../vendor-packages for 32-bit but .../vendor-packages/64
686555019e71b355e835166dfefbec33f7fb6f90rjung# for 64-bit. For 2.6 and 2.7, Python is built 32- and 64-bit, so .py files
686555019e71b355e835166dfefbec33f7fb6f90rjung# end up in both places even though only the 32-bit location is needed, but the
eda40bb2debf78c913552346127358797665cf7frjung# superfluous files in the proto area are harmless; meanwhile, the .so files
eda40bb2debf78c913552346127358797665cf7frjung# end up in their proper 32- and 64-bit locations. But Python 3.4 is built
eda40bb2debf78c913552346127358797665cf7frjung# 64-bit only, so we have an extra sed edit below to force the .py files into
eda40bb2debf78c913552346127358797665cf7frjung# the 32-bit location and we manually specify the 32-bit path in the manifest
eda40bb2debf78c913552346127358797665cf7frjung# to correct for the .so file being installed there instead of the 64-bit path
eda40bb2debf78c913552346127358797665cf7frjung# where it belongs. Further, Python 3.4 needs an extra 'm' on the link and
53b3e9f9937ca992fb149d02d19223674c81c5a4rjung# include paths, plus a tweak to the binary path; see PEP 3149 for details.
25cc406eca0c99de0dfbd6c8862bec2d5fb6c4farjung $(GSED) -i -e 's/2[.]6/2.7/g' `find python2.7 -name Makefile` ; \
5b43275cebfb0ff9961ac462f3a96f7fe612d327rjung -e 's|usr/bin/$(MACH64)/python2[.]6|usr/bin/python3.4m|' \
5b43275cebfb0ff9961ac462f3a96f7fe612d327rjung -e 's|usr/include/python2[.]6|usr/include/python3.4m|' \
5b43275cebfb0ff9961ac462f3a96f7fe612d327rjung -e 's/2[.]6/3.4/g' -e 's|vendor-packages/64|vendor-packages|' \
4acb0cd5536553055c7c6996414cec00b0191e1djim# After we have built/installed libxml2, build/install the python
4acb0cd5536553055c7c6996414cec00b0191e1djim# support for python 2.7 and 3.4
dc610ff4888acc61dc6c8de2b8974a4dce9c074fsf (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install ; \
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf# It's nice to test also python 2.7 and 3.4 modules.
70f553c56eda63b353598193c3afc238db9b3c78sf (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_TEST_ARGS) test ; \
3fa816e4832a1c70600bdfd6fc5ef60e9f1c18bbsf# We have patched our 64 bit python so it will search for modules only in
0c2193f47081b894ed16f4fc371f44564d28b334jorton# '64/' directories. Now we need to provide one. Otherwise python will
950e3163cb42ba1e9c8f9d93f4505f580cbc71f4jorton# end up using libxml2mod.so installed on system.
950e3163cb42ba1e9c8f9d93f4505f580cbc71f4jorton$(BUILD_DIR)/$(MACH64)/.tested: COMPONENT_PRE_TEST_ACTION = ( \
2ce2fc3287632e20f1b8759aa17e571f68c6fe6dsf $(SYMLINK) ../libxml2mod.so $(@D)/python/.libs/64/libxml2mod.so; \
2ce2fc3287632e20f1b8759aa17e571f68c6fe6dsf $(SYMLINK) ../libxml2mod.so $(@D)/python2.7/.libs/64/libxml2mod.so; \
2ce2fc3287632e20f1b8759aa17e571f68c6fe6dsf $(SYMLINK) ../libxml2mod.so $(@D)/python3.4/.libs/64/libxml2mod.so);
49aa87d735a13ae3d04012ee0df91ddb51f7c36esf (cd $(@D) ; gtar xf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1));
b44ddab21bd6e44ba3c03f7ae8ed08dd23b68b48sf# common targets
0ab15ffa17f588723d0c310af78b505bf4e8a953sf $(PYTHON.2.6.32) -m compileall $(PROTO_DIR)/usr/lib/python2.6/vendor-packages
0ab15ffa17f588723d0c310af78b505bf4e8a953sf $(PYTHON.2.7.32) -m compileall $(PROTO_DIR)/usr/lib/python2.7/vendor-packages