14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# CDDL HEADER START
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# The contents of this file are subject to the terms of the
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Common Development and Distribution License (the "License").
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# You may not use this file except in compliance with the License.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# or http://www.opensolaris.org/os/licensing.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# See the License for the specific language governing permissions
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# and limitations under the License.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# When distributing Covered Code, include this CDDL HEADER in each
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# If applicable, add the following below this CDDL HEADER, with the
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# fields enclosed by brackets "[]" replaced with your own identifying
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# information: Portions Copyright [yyyy] [name of copyright owner]
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# CDDL HEADER END
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
6876da76f91687fee15a706830b990a2c0d55157Trang Do# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd#
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# gobject-introspection bindings are only built correctly for gtk when building
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# with gcc, this would otherwise build with Studio.
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCOMPILER = gcc
535ec645ca371f1ce298eaf76bf8feb73494f923dduvallBUILD_BITS = 64_and_32
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephhinclude ../../../make-rules/shared-macros.mk
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCOMPONENT_NAME= pygobject
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCOMPONENT_VERSION= 3.18.2
dd566498928f08e7c9a79797a40db893c6a4b9fbvnCOMPONENT_PROJECT_URL= https://wiki.gnome.org/Projects/PyGObject
dd566498928f08e7c9a79797a40db893c6a4b9fbvnCOMPONENT_ARCHIVE_HASH= \
14ea4bb737263733ad80a36b4f73f681c30a6b45sd sha256:2a3cad1517916b74e131e6002c3824361aee0671ffb0d55ded119477fc1c2c5f
dd566498928f08e7c9a79797a40db893c6a4b9fbvnCOMPONENT_BUGDB= gnome/libraries
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephhTPNO= 25832
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Needs gobject-introspection >= 1.39.0, which is not available on S11.
14ea4bb737263733ad80a36b4f73f681c30a6b45sdifeq ($(BUILD_TYPE), evaluation)
14ea4bb737263733ad80a36b4f73f681c30a6b45sdBUILD_32_and_64=
14ea4bb737263733ad80a36b4f73f681c30a6b45sdINSTALL_32_and_64=
14ea4bb737263733ad80a36b4f73f681c30a6b45sdPUBLISH_STAMP=
14ea4bb737263733ad80a36b4f73f681c30a6b45sdendif
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# replicated from $(WS_MAKE_RULES)/setup.py.mk since this uses configure.mk
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCONFIGURE_64 += $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.configured)
14ea4bb737263733ad80a36b4f73f681c30a6b45sd$(BUILD_DIR)/%-3.4/.configured: PYTHON_VERSION=3.4
14ea4bb737263733ad80a36b4f73f681c30a6b45sd$(BUILD_DIR)/%-3.4/.configured: PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES.32)
dd566498928f08e7c9a79797a40db893c6a4b9fbvn$(BUILD_DIR)/%-3.5/.configured: PYTHON_VERSION=3.5
dd566498928f08e7c9a79797a40db893c6a4b9fbvn$(BUILD_DIR)/%-3.5/.configured: PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES.32)
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephh$(BUILD_DIR)/$(MACH64)-%/.configured: BITS=64
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephh
dd566498928f08e7c9a79797a40db893c6a4b9fbvnBUILD_64 += $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
dd566498928f08e7c9a79797a40db893c6a4b9fbvn$(BUILD_DIR)/%-3.4/.built: PYTHON_VERSION=3.4
dd566498928f08e7c9a79797a40db893c6a4b9fbvn$(BUILD_DIR)/%-3.5/.built: PYTHON_VERSION=3.5
dd566498928f08e7c9a79797a40db893c6a4b9fbvn$(BUILD_DIR)/$(MACH64)-%/.built: BITS=64
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sdINSTALL_64 += $(PYTHON3_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
14ea4bb737263733ad80a36b4f73f681c30a6b45sd$(BUILD_DIR)/%-3.4/.installed: PYTHON_VERSION=3.4
14ea4bb737263733ad80a36b4f73f681c30a6b45sd$(BUILD_DIR)/%-3.5/.installed: PYTHON_VERSION=3.5
14ea4bb737263733ad80a36b4f73f681c30a6b45sd$(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Tests do not yet work with Userland framework - 23712631
dd566498928f08e7c9a79797a40db893c6a4b9fbvnTEST_TARGET= $(SKIP_TEST)
dd566498928f08e7c9a79797a40db893c6a4b9fbvninclude $(WS_MAKE_RULES)/gnome-component.mk
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephh# Required due to patch to configure.ac.
25c6ff4b77fcddf4097ce78a8277275ca603b46cstephhCOMPONENT_PREP_ACTION += ( cd $(@D) ; NOCONFIGURE=1 $(CONFIG_SHELL) autogen.sh );
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
dd566498928f08e7c9a79797a40db893c6a4b9fbvn# Needs -std=c99 at minimum for 'NAN', etc.
dd566498928f08e7c9a79797a40db893c6a4b9fbvnCFLAGS += -std=c11
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
dd566498928f08e7c9a79797a40db893c6a4b9fbvnCONFIGURE_OPTIONS += --disable-static
dd566498928f08e7c9a79797a40db893c6a4b9fbvn
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# The build process modifies the shebang line to use the version of Python
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# automatically found; to avoid using the current system default, one is
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# explicitly specified here.
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCONFIGURE_OPTIONS += --with-python=$(PYTHON)
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Ensure Python modules are installed into vendor package directories.
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCONFIGURE_ENV += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCONFIGURE_ENV += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
14ea4bb737263733ad80a36b4f73f681c30a6b45sd
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Temporary until build machines install pycairo for python3
14ea4bb737263733ad80a36b4f73f681c30a6b45sdPYCAIRO_BASE = $(WS_COMPONENTS)/python/pycairo/build/prototype/$(MACH)
14ea4bb737263733ad80a36b4f73f681c30a6b45sdPKG_CONFIG_PATHS += $(PYCAIRO_BASE)$(PKG_CONFIG_DEFAULT)
14ea4bb737263733ad80a36b4f73f681c30a6b45sdCPPFLAGS += -I $(PYCAIRO_BASE)/usr/include/pycairo
6876da76f91687fee15a706830b990a2c0d55157Trang Do
6876da76f91687fee15a706830b990a2c0d55157Trang Do# Override $(PYTHON) for configure step so that configure can find
6876da76f91687fee15a706830b990a2c0d55157Trang Do# $(PYTHON)-config properly
6876da76f91687fee15a706830b990a2c0d55157Trang Do$(BUILD_DIR)/%-3.4/.configured: PYTHON=$(PYTHON.3.4)m
6876da76f91687fee15a706830b990a2c0d55157Trang Do$(BUILD_DIR)/%-3.5/.configured: PYTHON=$(PYTHON.3.5)m
6876da76f91687fee15a706830b990a2c0d55157Trang Do
6876da76f91687fee15a706830b990a2c0d55157Trang Do# Make install path match what autopyc transforms look for
6876da76f91687fee15a706830b990a2c0d55157Trang DoCOMPONENT_POST_INSTALL_ACTION += \
6876da76f91687fee15a706830b990a2c0d55157Trang Do case "$(PYTHON_VERSION)" in \
6876da76f91687fee15a706830b990a2c0d55157Trang Do 2.7) $(MKDIR) $(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)/gi ; \
6876da76f91687fee15a706830b990a2c0d55157Trang Do $(SYMLINK) ../64/gi $(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)/gi/64 ;; \
6876da76f91687fee15a706830b990a2c0d55157Trang Do 3.4) $(SYMLINK) . $(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)/gi/64 ;; \
6876da76f91687fee15a706830b990a2c0d55157Trang Do esac ;
6876da76f91687fee15a706830b990a2c0d55157Trang Do
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/desktop/cairo
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/desktop/gobject/gobject-introspection
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/glib2
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/libffi
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/python/pycairo-27
6876da76f91687fee15a706830b990a2c0d55157Trang Do# Pyflakes is needed for tests, but not build or install
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += library/python/pyflakes
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += runtime/python-27
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += runtime/python-34
6876da76f91687fee15a706830b990a2c0d55157Trang DoREQUIRED_PACKAGES += runtime/python-35
6876da76f91687fee15a706830b990a2c0d55157Trang Do