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