|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 |
|
22 # |
|
23 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 BUILD_BITS = 64 |
|
27 include ../../../make-rules/shared-macros.mk |
|
28 |
|
29 COMPONENT_NAME= pycairo |
|
30 COMPONENT_VERSION= 1.10.0 |
|
31 COMPONENT_PROJECT_URL= http://cairographics.org/pycairo/ |
|
32 COMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.bz2 |
|
33 COMPONENT_ARCHIVE_HASH= \ |
|
34 sha256:9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be |
|
35 COMPONENT_ARCHIVE_URL= http://cairographics.org/releases/$(COMPONENT_ARCHIVE) |
|
36 COMPONENT_BUGDB= python-mod/pycairo |
|
37 |
|
38 TPNO= 30739 |
|
39 |
|
40 # upstream delivers python2 support separately as "py2cairo" |
|
41 PYTHON_VERSIONS= $(PYTHON3_VERSIONS) |
|
42 |
|
43 BUILD_STYLE= waf |
|
44 |
|
45 # replicated from $(WS_MAKE_RULES)/setup.py.mk since this uses waf.mk instead |
|
46 CONFIGURE_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.configured) |
|
47 BUILD_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
|
48 INSTALL_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed) |
|
49 TEST_64 = $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.tested-and-compared) |
|
50 |
|
51 # Cannot run tests until build machines update to s12_105 due to bug 23763105 |
|
52 TEST_TARGET = $(SKIP_TEST) |
|
53 |
|
54 include $(WS_MAKE_RULES)/common.mk |
|
55 |
|
56 # Trick bundled waf into unpacking itself so we can patch it |
|
57 COMPONENT_POST_UNPACK_ACTION += \ |
|
58 (cd $(@D) ; $(PYTHON.3.5) waf --help >> /dev/null ); |
|
59 |
|
60 # Do not install optimised compiled .pyo files |
|
61 CONFIGURE_OPTIONS += --nopyo |
|
62 |
|
63 # The bundled waf compiles to the old pre-python-3.2 locations, so |
|
64 # tell it not to bother, and take care of it ourselves |
|
65 CONFIGURE_OPTIONS += --nopyc |
|
66 COMPONENT_POST_INSTALL_ACTION += \ |
|
67 $(PYTHON) -m compileall $(PROTO_DIR)$(PYTHON_LIB)/cairo ; |
|
68 |
|
69 # waf picks up the PYTHONDIR & PYTHONARCHDIR settings at configure time, |
|
70 # but still insists on installing to site-packages instead of vendor-packages |
|
71 PYTHON_SITE_DIR = $(USRLIB)/python$(PYTHON_VERSION)/site-packages |
|
72 COMPONENT_PRE_INSTALL_ACTION += \ |
|
73 $(MKDIR) $(PROTO_DIR)$(PYTHON_LIB)/cairo \ |
|
74 $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \ |
|
75 $(RM) -r $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \ |
|
76 $(LN) -s $(PROTO_DIR)$(PYTHON_LIB) $(PROTO_DIR)$(PYTHON_SITE_DIR) ; \ |
|
77 $(RM) -r $(PROTO_DIR)$(PYTHON_LIB)/cairo/64 ; \ |
|
78 $(LN) -s . $(PROTO_DIR)$(PYTHON_LIB)/cairo/64 |
|
79 |
|
80 # the test scripts aren't hooked into the test target in pycairo, so run directly |
|
81 COMPONENT_TEST_DIR = $(@D)/test |
|
82 COMPONENT_TEST_CMD = /usr/bin/py.test-$(PYTHON_VERSION) |
|
83 COMPONENT_TEST_TARGETS = |
|
84 |
|
85 REQUIRED_PACKAGES += library/desktop/cairo |
|
86 REQUIRED_PACKAGES += runtime/python-34 |
|
87 REQUIRED_PACKAGES += runtime/python-35 |
|
88 |
|
89 # py.test is required for testing, not building or runtime |
|
90 REQUIRED_PACKAGES += library/python/pytest |
|
91 |