|
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) 2014, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 include ../../../make-rules/shared-macros.mk |
|
27 |
|
28 COMPONENT_NAME= cffi |
|
29 COMPONENT_VERSION= 0.8.2 |
|
30 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
31 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
32 COMPONENT_ARCHIVE_HASH= \ |
|
33 sha256:8192393640f7bc304ce82669b35eb90592566a30abbb4924456f52079afc18e2 |
|
34 COMPONENT_ARCHIVE_URL= $(call pypi_url) |
|
35 COMPONENT_PROJECT_URL= http://cffi.readthedocs.org/ |
|
36 COMPONENT_BUGDB= python-mod/cffi |
|
37 |
|
38 include $(WS_TOP)/make-rules/prep.mk |
|
39 include $(WS_TOP)/make-rules/setup.py.mk |
|
40 include $(WS_TOP)/make-rules/ips.mk |
|
41 |
|
42 ASLR_MODE = $(ASLR_NOT_APPLICABLE) |
|
43 |
|
44 # We need to go look at pycparser in the workspace until it's available in the |
|
45 # build environment. |
|
46 PYCPARSER = $(WS_COMPONENTS)/python/pycparser/build/prototype/$(MACH)/$(PYTHON_LIB) |
|
47 |
|
48 $(PYCPARSER): |
|
49 (cd ../pycparser; $(MAKE) install) |
|
50 |
|
51 COMPONENT_TEST_DIR = $(@D)/tests |
|
52 COMPONENT_TEST_ENV = $(PYTHON_ENV) |
|
53 COMPONENT_TEST_ENV += PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB):$(PYCPARSER) |
|
54 COMPONENT_TEST_ENV += TESTOWNLIB_CC="$(CC) %s $(CC_BITS) -G -KPIC -o %s" |
|
55 COMPONENT_TEST_CMD = $(PYTHON.$(BITS)) /usr/bin/py.test-$(PYTHON_VERSION) |
|
56 COMPONENT_TEST_ARGS = --resultlog $(@D)/testresults |
|
57 COMPONENT_TEST_ARGS += -p no:codechecker |
|
58 COMPONENT_TEST_ARGS += $(TEST_SKIPS) |
|
59 COMPONENT_TEST_ARGS += c testing |
|
60 # The following tests cause core dumps on SPARC (bus error, illegal hardware |
|
61 # instruction). We don't skip test_install_and_reload_module{,_package}, which |
|
62 # fail on both 64-bit platforms, since those don't cause the interpreter to |
|
63 # crash. |
|
64 $(BUILD_DIR)/sparcv7-%/.tested: TEST_SKIPS = -k "not test_callback_return_type and not test_struct_packed and not test_opaque_integer_as_function_result" |
|
65 $(BUILD_DIR)/sparcv9-%/.tested: TEST_SKIPS = -k "not test_callback and not test_a_lot_of_callbacks and not test_struct_packed and not test_opaque_integer_as_function_result and not test_wchar" |
|
66 |
|
67 # Copy the tests and a few of the source files they read into a scratch |
|
68 # directory so running the tests don't leave turds in the source directory. |
|
69 COMPONENT_PRE_TEST_ACTION = \ |
|
70 $(MKDIR) $(@D)/tests/doc/source; \ |
|
71 $(CP) -r $(SOURCE_DIR)/c $(SOURCE_DIR)/testing $(@D)/tests; \ |
|
72 $(CP) $(SOURCE_DIR)/setup.py $(@D)/tests; \ |
|
73 $(CP) $(SOURCE_DIR)/doc/source/conf.py $(SOURCE_DIR)/doc/source/index.rst $(@D)/tests/doc/source |
|
74 |
|
75 $(BUILD_32_and_64): $(PYCPARSER) |
|
76 |
|
77 # common targets |
|
78 build: $(BUILD_32_and_64) |
|
79 |
|
80 install: $(INSTALL_32_and_64) |
|
81 |
|
82 test: $(TEST_32_and_64) |
|
83 |
|
84 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
85 |
|
86 include $(WS_TOP)/make-rules/depend.mk |