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