Makefile revision 2899
243N/A#
243N/A# CDDL HEADER START
243N/A#
243N/A# The contents of this file are subject to the terms of the
243N/A# Common Development and Distribution License (the "License").
243N/A# You may not use this file except in compliance with the License.
243N/A#
243N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
243N/A# or http://www.opensolaris.org/os/licensing.
243N/A# See the License for the specific language governing permissions
243N/A# and limitations under the License.
243N/A#
243N/A# When distributing Covered Code, include this CDDL HEADER in each
243N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
243N/A# If applicable, add the following below this CDDL HEADER, with the
243N/A# fields enclosed by brackets "[]" replaced with your own identifying
243N/A# information: Portions Copyright [yyyy] [name of copyright owner]
243N/A#
243N/A# CDDL HEADER END
243N/A#
243N/A
243N/A#
243N/A# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
243N/A#
243N/A
243N/Ainclude ../../make-rules/shared-macros.mk
243N/A
243N/ACOMPONENT_NAME= libxml2
243N/ACOMPONENT_VERSION= 2.9.1
243N/ACOMPONENT_PROJECT_URL= http://xmlsoft.org/
243N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
243N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
243N/ACOMPONENT_ARCHIVE_HASH= \
243N/A sha256:fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb
243N/ACOMPONENT_ARCHIVE_URL= ftp://xmlsoft.org/libxml2/$(COMPONENT_ARCHIVE)
243N/ACOMPONENT_BUGDB= library/libxml
243N/A
243N/A# W3C XML Conformance Test Suites
243N/ACOMPONENT_ARCHIVE_1= xmlts20080827.tar.gz
243N/ACOMPONENT_ARCHIVE_HASH_1= \
243N/A sha256:96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7
243N/ACOMPONENT_ARCHIVE_URL_1= http://www.w3.org/XML/Test/$(COMPONENT_ARCHIVE_1)
243N/A
243N/ATPNO= 17981
243N/A
243N/Ainclude ../../make-rules/prep.mk
243N/Ainclude ../../make-rules/configure.mk
243N/Ainclude ../../make-rules/ips.mk
243N/Ainclude ../../make-rules/lint-libraries.mk
243N/A
243N/ACFLAGS += $(CPP_LARGEFILES)
243N/ALDFLAGS += $(LD_Z_DEFS) $(LD_Z_TEXT) -lpthread
243N/A
243N/ACONFIGURE_OPTIONS += --disable-static
243N/ACONFIGURE_OPTIONS += --with-pic
243N/ACONFIGURE_OPTIONS += --with-threads
243N/ACONFIGURE_OPTIONS += --with-python=$(PYTHON.$(BITS))
243N/A# Cannot link to lzma since it's not in /lib.
243N/ACONFIGURE_OPTIONS += --without-lzma
243N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
243N/ACONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
243N/ACONFIGURE_OPTIONS += PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES)
243N/A
243N/ACOMPONENT_PREP_ACTION += (cd $(@D) ; cp ../mapfile libxml2.syms ; autoreconf -if)
243N/A
243N/A# After we have configured, make a copy of the python bits so we
243N/A# can build and test separate python 2.7 support.
243N/ACOMPONENT_POST_CONFIGURE_ACTION = (cd $(@D) ; cp -rp python python2.7 ; \
316N/A $(GSED) -i -e 's/2[.]6/2.7/g' `find python2.7 -name Makefile`)
243N/A
316N/A# After we have built/installed libxml2, build/install the python
243N/A# support for python 2.7
243N/ACOMPONENT_POST_INSTALL_ACTION = \
243N/A (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
243N/A
243N/A# It's nice to test also python 2.7 module.
243N/ACOMPONENT_POST_TEST_ACTION = \
(cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_TEST_ARGS) test)
# We have patched our 64 bit python so it will search for modules only in
# '64/' directories. Now we need to provide one. Otherwise python will
# end up using libxml2mod.so installed on system.
$(BUILD_DIR)/$(MACH64)/.tested: COMPONENT_PRE_TEST_ACTION = ( \
$(MKDIR) $(@D)/python/.libs/64 $(@D)/python2.7/.libs/64; \
$(SYMLINK) ../libxml2mod.so $(@D)/python/.libs/64/libxml2mod.so; \
$(SYMLINK) ../libxml2mod.so $(@D)/python2.7/.libs/64/libxml2mod.so);
COMPONENT_PRE_TEST_ACTION += \
(cd $(@D) ; gtar xf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1));
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
$(PYTHON.2.6.32) -m compileall $(PROTO_DIR)/usr/lib/python2.6/vendor-packages
$(PYTHON.2.7.32) -m compileall $(PROTO_DIR)/usr/lib/python2.7/vendor-packages
test: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk