Makefile revision 7037
0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
873N/A# CDDL HEADER END
0N/A#
0N/A
0N/A#
0N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
0N/A#
868N/A
0N/ABUILD_BITS = 64
0N/Ainclude ../../../make-rules/shared-macros.mk
2086N/A
0N/ACOMPONENT_NAME= pycairo
0N/ACOMPONENT_VERSION= 1.10.0
0N/ACOMPONENT_PROJECT_URL= http://cairographics.org/pycairo/
0N/ACOMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.bz2
0N/ACOMPONENT_ARCHIVE_HASH= \
0N/A sha256:9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be
0N/ACOMPONENT_ARCHIVE_URL= http://cairographics.org/releases/$(COMPONENT_ARCHIVE)
0N/ACOMPONENT_BUGDB= python-mod/pycairo
0N/A
0N/ATPNO= 30739
0N/A
0N/A# upstream delivers python2 support separately as "py2cairo"
0N/APYTHON_VERSIONS= $(PYTHON3_VERSIONS)
0N/A
0N/ABUILD_STYLE= waf
0N/A
0N/A# replicated from $(WS_MAKE_RULES)/setup.py.mk since this uses waf.mk instead
0N/ACONFIGURE_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.configured)
0N/ABUILD_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
0N/AINSTALL_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
0N/ATEST_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.tested-and-compared)
0N/A
0N/A# Cannot run tests until build machines update to s12_105 due to bug 23763105
0N/ATEST_TARGET = $(SKIP_TEST)
0N/A
0N/A# Requires newer version of cairo than we have available in S11.
868N/Ainclude $(WS_MAKE_RULES)/no-evaluation.mk
0N/A
0N/Ainclude $(WS_MAKE_RULES)/common.mk
0N/A
0N/A# Trick bundled waf into unpacking itself so we can patch it
0N/ACOMPONENT_POST_UNPACK_ACTION += \
0N/A (cd $(@D) ; $(PYTHON.3.5) waf --help >> /dev/null );
0N/A
2086N/A# Do not install optimised compiled .pyo files
0N/ACONFIGURE_OPTIONS += --nopyo
0N/A
0N/A# This needed to be added for pycairo to build cleanly s12_109 onwards
0N/Astudio_C99MODE = $(studio_C99_ENABLE)
0N/A
0N/A# The bundled waf compiles to the old pre-python-3.2 locations, so
0N/A# tell it not to bother, and take care of it ourselves
0N/ACONFIGURE_OPTIONS += --nopyc
0N/ACOMPONENT_POST_INSTALL_ACTION += \
2086N/A $(PYTHON) -m compileall $(PROTO_DIR)$(PYTHON_LIB)/cairo ;
0N/A
0N/A# waf picks up the PYTHONDIR & PYTHONARCHDIR settings at configure time,
0N/A# but still insists on installing to site-packages instead of vendor-packages
0N/APYTHON_SITE_DIR = $(USRLIB)/python$(PYTHON_VERSION)/site-packages
0N/ACOMPONENT_PRE_INSTALL_ACTION += \
0N/A $(MKDIR) $(PROTO_DIR)$(PYTHON_LIB)/cairo \
0N/A $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \
0N/A $(RM) -r $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \
0N/A $(LN) -s $(PROTO_DIR)$(PYTHON_LIB) $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \
0N/A $(RM) -r $(PROTO_DIR)$(PYTHON_LIB)/cairo/64 ; \
0N/A $(LN) -s . $(PROTO_DIR)$(PYTHON_LIB)/cairo/64
0N/A
0N/A# the test scripts aren't hooked into the test target in pycairo, so run directly
0N/ACOMPONENT_TEST_DIR = $(@D)/test
0N/ACOMPONENT_TEST_CMD = /usr/bin/py.test-$(PYTHON_VERSION)
0N/ACOMPONENT_TEST_TARGETS =
0N/A
0N/AREQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += runtime/python-34
REQUIRED_PACKAGES += runtime/python-35
# py.test is required for testing, not building or runtime
REQUIRED_PACKAGES += library/python/pytest