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