#
|
# 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) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013 Erol Zavidic. All rights reserved.
|
# Copyright (c) 2022 Friedrich Kink. All rights reserved.
|
#
|
|
BUILD_BITS= 64_and_32
|
USE_COMMON_TEST_MASTER= no
|
include ../../../make-rules/shared-macros.mk
|
|
COMPONENT_NAME= libxml2
|
HUMAN_VERSION= 2.12.6
|
COMPONENT_SUMMARY= Libxml2 is the XML C parser and toolkit developed for the Gnome project
|
COMPONENT_ARCHIVE_HASH= sha256:889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb
|
COMPONENT_FMRI= library/libxml2
|
COMPONENT_CLASSIFICATION=System/Libraries
|
COMPONENT_LICENSE= MIT
|
COMPONENT_LICENSE_FILE= Copyright
|
|
# W3C XML Conformance Test Suites
|
COMPONENT_ARCHIVE_1= xmlts20080827.tar.gz
|
COMPONENT_ARCHIVE_HASH_1= sha256:96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7
|
COMPONENT_ARCHIVE_URL_1= https://www.w3.org/XML/Test/$(COMPONENT_ARCHIVE_1)
|
|
include $(WS_MAKE_RULES)/gnome.mk
|
include $(WS_MAKE_RULES)/common.mk
|
|
CFLAGS += $(CPP_LARGEFILES)
|
|
COMPONENT_PRE_CONFIGURE_ACTION += ( \
|
cd $(SOURCE_DIR); \
|
$(CLONEY) $(SOURCE_DIR) $(@D); \
|
);
|
|
CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
|
CONFIGURE_OPTIONS += --localstatedir="$(VARDIR)"
|
CONFIGURE_OPTIONS += --disable-static
|
CONFIGURE_OPTIONS += --with-pic
|
# during updates of ICU this configure option breaks the
|
# packaging system: pkg, furthermore it introduces additional
|
# dependencies in OpenSSH through the configure option:
|
# --with-solaris-projects which pulls in libproject, which
|
# in turn needs libxml2.
|
# CONFIGURE_OPTIONS += --with-icu
|
CONFIGURE_OPTIONS += --with-ftp
|
CONFIGURE_OPTIONS += --with-xptr-locs
|
CONFIGURE_OPTIONS += --with-history
|
CONFIGURE_OPTIONS += --with-legacy
|
CONFIGURE_OPTIONS.32 += --with-python=no
|
|
CONFIGURE_ENV.64 += PYTHON=$(PYTHON)
|
CONFIGURE_ENV.64 += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
|
CONFIGURE_ENV.64 += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
|
|
COMPONENT_PREP_ACTION += (cd $(@D) ; cp ../mapfile libxml2.syms ; PATH="$(PATH)" autoreconf -if )
|
|
# After we have built/installed libxml2, build/install the python
|
# support for python (only 64 bit is available)
|
COMPONENT_POST_INSTALL_ACTION.64 = ( \
|
cd $(@D)/python; \
|
$(GMAKE) pythondir=$(PYTHON_VENDOR_PACKAGES) \
|
pyexecdir=$(PYTHON_VENDOR_PACKAGES) \
|
DESTDIR=$(PROTO_DIR) \
|
install ; \
|
$(MV) $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)/libxml2mod.so $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)/libxml2mod.cpython-$(subst .,,$(PYTHON_VERSION)).so; \
|
$(PYTHON) -m compileall $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES); \
|
);
|
|
# It's nice to test also python modules (LC_ALL is set to avoid test failure).
|
COMPONENT_POST_TEST_ACTION.64 = \
|
cd $(@D)/python; \
|
LC_ALL=en_US.UTF-8 $(GMAKE) $(COMPONENT_TEST_ARGS) check
|
|
COMPONENT_PRE_TEST_ACTION.64 += \
|
(cd $(@D) ; gtar xf $(USERLAND_ARCHIVES)/$(COMPONENT_ARCHIVE_1));
|
|
COMPONENT_TEST_TRANSFORMS = \
|
'-e "s/^make\[.*$$/[EnD]/" ' \
|
'-e "/^\#\# XML regression tests/,/^\[EnD\]/p" ' \
|
'-e "/^\#\# running Python regression tests/,/^\[EnD\]/p" ' \
|
'-e "/.*/d" '
|
|
# Auto-generated dependencies
|
REQUIRED_PACKAGES += compress/xz
|
REQUIRED_PACKAGES += library/readline
|
REQUIRED_PACKAGES += library/zlib
|
REQUIRED_PACKAGES += shell/ksh93
|
REQUIRED_PACKAGES += system/library
|
REQUIRED_PACKAGES += system/library/math
|