Makefile revision 3056
148N/A#
148N/A# CDDL HEADER START
148N/A#
148N/A# The contents of this file are subject to the terms of the
148N/A# Common Development and Distribution License (the "License").
148N/A# You may not use this file except in compliance with the License.
148N/A#
148N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
148N/A# or http://www.opensolaris.org/os/licensing.
148N/A# See the License for the specific language governing permissions
148N/A# and limitations under the License.
148N/A#
148N/A# When distributing Covered Code, include this CDDL HEADER in each
148N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
148N/A# If applicable, add the following below this CDDL HEADER, with the
148N/A# fields enclosed by brackets "[]" replaced with your own identifying
148N/A# information: Portions Copyright [yyyy] [name of copyright owner]
148N/A#
148N/A# CDDL HEADER END
148N/A#
148N/A
148N/A#
2899N/A# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
148N/A#
148N/A
148N/Ainclude ../../make-rules/shared-macros.mk
148N/A
148N/ACOMPONENT_NAME= libxml2
1652N/ACOMPONENT_VERSION= 2.9.1
618N/ACOMPONENT_PROJECT_URL= http://xmlsoft.org/
148N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
148N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
1652N/A sha256:fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb
148N/ACOMPONENT_ARCHIVE_URL= ftp://xmlsoft.org/libxml2/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= library/libxml
148N/A
1002N/A# W3C XML Conformance Test Suites
1239N/ACOMPONENT_ARCHIVE_1= xmlts20080827.tar.gz
1002N/ACOMPONENT_ARCHIVE_HASH_1= \
1239N/A sha256:96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7
1002N/ACOMPONENT_ARCHIVE_URL_1= http://www.w3.org/XML/Test/$(COMPONENT_ARCHIVE_1)
1002N/A
2899N/ATPNO= 17981
2899N/A
148N/Ainclude ../../make-rules/prep.mk
148N/Ainclude ../../make-rules/configure.mk
148N/Ainclude ../../make-rules/ips.mk
181N/Ainclude ../../make-rules/lint-libraries.mk
148N/A
148N/ACFLAGS += $(CPP_LARGEFILES)
148N/ALDFLAGS += $(LD_Z_DEFS) $(LD_Z_TEXT) -lpthread
148N/A
148N/ACONFIGURE_OPTIONS += --disable-static
148N/ACONFIGURE_OPTIONS += --with-pic
148N/ACONFIGURE_OPTIONS += --with-threads
148N/ACONFIGURE_OPTIONS += --with-python=$(PYTHON.$(BITS))
1239N/A# Cannot link to lzma since it's not in /lib.
1239N/ACONFIGURE_OPTIONS += --without-lzma
148N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
148N/ACONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
148N/ACONFIGURE_OPTIONS += PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES)
148N/A
690N/ACOMPONENT_PREP_ACTION += (cd $(@D) ; cp ../mapfile libxml2.syms ; autoreconf -if)
148N/A
3056N/A# After we have configured, make a copy of the python bits so we can build and
3056N/A# test separate python 2.7 and 3.4 support. Note for 3.4: .py files need to
3056N/A# go in .../vendor-packages (whether building 32-bit or 64-bit) whereas .so
3056N/A# files need to go in .../vendor-packages for 32-bit but .../vendor-packages/64
3056N/A# for 64-bit. For 2.6 and 2.7, Python is built 32- and 64-bit, so .py files
3056N/A# end up in both places even though only the 32-bit location is needed, but the
3056N/A# superfluous files in the proto area are harmless; meanwhile, the .so files
3056N/A# end up in their proper 32- and 64-bit locations. But Python 3.4 is built
3056N/A# 64-bit only, so we have an extra sed edit below to force the .py files into
3056N/A# the 32-bit location and we manually specify the 32-bit path in the manifest
3056N/A# to correct for the .so file being installed there instead of the 64-bit path
3056N/A# where it belongs.
3056N/ACOMPONENT_POST_CONFIGURE_ACTION = \
3056N/A (cd $(@D) ; cp -rp python python2.7 ; \
3056N/A $(GSED) -i -e 's/2[.]6/2.7/g' `find python2.7 -name Makefile` ; \
3056N/A cd $(@D) ; cp -rp python python3.4 ; \
3056N/A $(GSED) -i -e 's/2[.]6/3.4/g' -e 's|vendor-packages/64|vendor-packages|' \
3056N/A `find python3.4 -name Makefile` ; \
3056N/A)
727N/A
727N/A# After we have built/installed libxml2, build/install the python
3056N/A# support for python 2.7 and 3.4
727N/ACOMPONENT_POST_INSTALL_ACTION = \
3056N/A (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install ; \
3056N/A [ $(BITS) -eq 64 ] && cd $(@D)/python3.4 ; \
3056N/A $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
727N/A
3056N/A# It's nice to test also python 2.7 and 3.4 modules.
1652N/ACOMPONENT_POST_TEST_ACTION = \
3056N/A (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_TEST_ARGS) test ; \
3056N/A [ $(BITS) -eq 64 ] && cd $(@D)/python3.4 ; \
3056N/A $(GMAKE) $(COMPONENT_TEST_ARGS) test)
1652N/A
1652N/A# We have patched our 64 bit python so it will search for modules only in
1652N/A# '64/' directories. Now we need to provide one. Otherwise python will
1652N/A# end up using libxml2mod.so installed on system.
1652N/A$(BUILD_DIR)/$(MACH64)/.tested: COMPONENT_PRE_TEST_ACTION = ( \
3056N/A $(MKDIR) $(@D)/python/.libs/64 \
3056N/A $(@D)/python2.7/.libs/64 \
3056N/A $(@D)/python3.4/.libs/64; \
1652N/A $(SYMLINK) ../libxml2mod.so $(@D)/python/.libs/64/libxml2mod.so; \
3056N/A $(SYMLINK) ../libxml2mod.so $(@D)/python2.7/.libs/64/libxml2mod.so; \
3056N/A $(SYMLINK) ../libxml2mod.so $(@D)/python3.4/.libs/64/libxml2mod.so);
1652N/A
1652N/ACOMPONENT_PRE_TEST_ACTION += \
1652N/A (cd $(@D) ; gtar xf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1));
727N/A
148N/A# common targets
148N/Abuild: $(BUILD_32_and_64)
148N/A
148N/Ainstall: $(INSTALL_32_and_64)
560N/A $(PYTHON.2.6.32) -m compileall $(PROTO_DIR)/usr/lib/python2.6/vendor-packages
727N/A $(PYTHON.2.7.32) -m compileall $(PROTO_DIR)/usr/lib/python2.7/vendor-packages
3056N/A $(PYTHON.3.4.64) -m compileall $(PROTO_DIR)/usr/lib/python3.4/vendor-packages
148N/A
181N/Atest: $(TEST_32_and_64)
148N/A
148N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
148N/A
148N/Ainclude ../../make-rules/depend.mk