Makefile revision 3996
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# CDDL HEADER START
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# The contents of this file are subject to the terms of the
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# Common Development and Distribution License (the "License").
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# You may not use this file except in compliance with the License.
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# See the License for the specific language governing permissions
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# and limitations under the License.
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# When distributing Covered Code, include this CDDL HEADER in each
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# If applicable, add the following below this CDDL HEADER, with the
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# fields enclosed by brackets "[]" replaced with your own identifying
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# information: Portions Copyright [yyyy] [name of copyright owner]
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# CDDL HEADER END
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael GraffCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff sha256:16c612ac01b9b5a31967e231c7f7d32b7263f151d5e3c617c69378170054805f
8d1943e8ffa991d54c5406342e44d7134762e7eaMichael GraffCOMPONENT_PROJECT_URL= http://github.com/xattr/xattr
1ec39fc7a8b6ad92de3363d4c50b75e24fcd6accMichael Graff# Look over into the pycparser and cffi proto areas until they're available in
ab0e5066083abcbec62513a3cc041d1f1eb9098aMichael Graff# the build environment. Make sure that cffi is built.
a8dcebd0419f27234664e89b9cd48bc54cad08a7Michael GraffPYCPARSER = $(WS_COMPONENTS)/python/pycparser/build/prototype/$(MACH)/$(PYTHON_LIB)
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael GraffCFFI = $(WS_COMPONENTS)/python/cffi/build/prototype/$(MACH)/$(PYTHON_LIB)
1ec39fc7a8b6ad92de3363d4c50b75e24fcd6accMichael GraffCOMPONENT_BUILD_ENV += PYTHONPATH=$(PYTHONPATH_DEP)
ab0e5066083abcbec62513a3cc041d1f1eb9098aMichael GraffCOMPONENT_INSTALL_ENV += PYTHONPATH=$(PYTHONPATH_DEP):$(PROTO_DIR)/$(PYTHON_LIB)
1ec39fc7a8b6ad92de3363d4c50b75e24fcd6accMichael GraffCOMPONENT_TEST_ENV += PYTHONPATH=$(PYTHONPATH_DEP):$(PROTO_DIR)/$(PYTHON_LIB)
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# The test suite wants to use some unicode filenames, which don't work in the C
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff (cd $(PROTO_DIR)/usr/bin; $(MV) xattr xattr-$(PYTHON_VERSION))
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# Tests run under setuptools work very hard to run in the source directory
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# itself, and will thus blow up with an VerificationError (wrong ELF class)
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# when running 64-bit tests after 32-bit or vice-versa. So copy the source off
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# to a target-specific directory and run the tests. Note that this will also
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# rebuild the package, since it doesn't want to use what it should already be
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael Graff# finding in PYTHONPATH.
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael GraffCOMPONENT_PRE_TEST_ACTION = $(CP) -r $(SOURCE_DIR) $(@D)/tests
1ec39fc7a8b6ad92de3363d4c50b75e24fcd6accMichael Graff# common targets
ab0e5066083abcbec62513a3cc041d1f1eb9098aMichael GraffREQUIRED_PACKAGES += library/python/setuptools-26
83f8c56f43852bf9a9c6964eae285284b23f9d8dMichael GraffREQUIRED_PACKAGES += library/python/setuptools-27