99N/A#
99N/A# CDDL HEADER START
99N/A#
99N/A# The contents of this file are subject to the terms of the
99N/A# Common Development and Distribution License (the "License").
99N/A# You may not use this file except in compliance with the License.
99N/A#
99N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99N/A# or http://www.opensolaris.org/os/licensing.
99N/A# See the License for the specific language governing permissions
99N/A# and limitations under the License.
99N/A#
99N/A# When distributing Covered Code, include this CDDL HEADER in each
99N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
99N/A# If applicable, add the following below this CDDL HEADER, with the
99N/A# fields enclosed by brackets "[]" replaced with your own identifying
99N/A# information: Portions Copyright [yyyy] [name of copyright owner]
99N/A#
99N/A# CDDL HEADER END
99N/A#
3996N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
99N/A#
127N/Ainclude ../../../make-rules/shared-macros.mk
99N/A
99N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
99N/A
99N/ACOMPONENT_NAME= Python
899N/ACOMPONENT_VERSION= 2.6.8
618N/ACOMPONENT_PROJECT_URL= http://python.org/
99N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
99N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
844N/ACOMPONENT_ARCHIVE_HASH= \
899N/A sha256:c34036718ee1f091736677f543bc7960861cf9fcbea77d49572b59f7f1ab3c3f
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= utility/python
99N/A
3661N/ATPNO= 9104
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
3996N/Ainclude $(WS_MAKE_RULES)/lint-libraries.mk
99N/A
118N/A# We patch auto* files, so regenerate headers and configure
118N/ACOMPONENT_PREP_ACTION = \
118N/A (cd $(@D) ; autoheader ; autoconf)
118N/A
118N/A# This seems horribly wrong, but these defines break the ability to build c99
118N/A# compliant modules or with gcc.
118N/ACOMPONENT_POST_CONFIGURE_ACTION = \
118N/A (cd $(@D) ; \
118N/A perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
118N/A perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
118N/A perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \
118N/A pyconfig.h)
118N/A
646N/A# The python build is profile-guided for studio; to see the benefits of that,
646N/A# Python must be compiled with -xO5 and a different build target must be used.
646N/A# Use of xprofile requires that the same options be used during compilation and
646N/A# linking. The targets chosen are based on Solaris 11 minimum supported system
646N/A# requirements.
646N/ACOMPONENT_BUILD_TARGETS = profile-opt
646N/AXPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
2349N/APYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
646N/APYFLAGS.sparc =
646N/ACFLAGS += -xO5 $(PYFLAGS.$(MACH))
646N/ALDFLAGS += -xO5 $(PYFLAGS.$(MACH))
646N/A
99N/A# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
99N/A# python-config
118N/ACC += $(CFLAGS)
99N/A
99N/AC99MODE=
99N/ACPPFLAGS += -IPython
99N/A
118N/A# so we find the ncurses headers
118N/ACPPFLAGS += -I/usr/include/ncurses
118N/A# enable large files how they did in JDS
118N/ACPPFLAGS += -D_LARGEFILE64_SOURCE
99N/A# libffi for _ctypes
99N/ACPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
99N/A
581N/A# Python puts its header files in a special place.
581N/ALINT_FLAGS += -I$(SOURCE_DIR)/Include
581N/A
99N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
99N/ACONFIGURE_OPTIONS += --enable-shared
99N/ACONFIGURE_OPTIONS += --with-system-ffi
99N/ACONFIGURE_OPTIONS += --without-gcc
99N/ACONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no
99N/ACONFIGURE_OPTIONS += ac_cv_olimit_ok=no
99N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
118N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
118N/ACONFIGURE_OPTIONS += CCSHARED="$(CC_PIC)"
206N/ACONFIGURE_OPTIONS += CXX="$(CXX)"
206N/ACONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
99N/ACONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
646N/ACONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)"
99N/ACOMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
646N/ACOMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)"
99N/A
181N/ACOMPONENT_TEST_TARGETS = test
181N/A
99N/A# 64 bit shared objects need to go in a 64-bit directory
99N/ACOMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
99N/A
99N/A# common targets
99N/Abuild: $(BUILD_32_and_64)
99N/A
99N/A$(INSTALL_32): $(INSTALL_64)
99N/A
99N/Ainstall: $(INSTALL_32_and_64)
99N/A
181N/Atest: $(TEST_32_and_64)
99N/A
99N/A
3996N/AREQUIRED_PACKAGES += compress/bzip2
3996N/AREQUIRED_PACKAGES += database/sqlite-3
3996N/AREQUIRED_PACKAGES += developer/library/xprofile
3996N/AREQUIRED_PACKAGES += library/database/gdbm
3996N/AREQUIRED_PACKAGES += library/libffi
3996N/AREQUIRED_PACKAGES += library/ncurses
3996N/AREQUIRED_PACKAGES += library/python/tkinter-26
3996N/AREQUIRED_PACKAGES += library/readline
3996N/AREQUIRED_PACKAGES += library/security/openssl
3996N/AREQUIRED_PACKAGES += library/zlib
3996N/AREQUIRED_PACKAGES += runtime/tcl-8
3996N/AREQUIRED_PACKAGES += runtime/tk-8
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/core-os
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += system/linker
3996N/AREQUIRED_PACKAGES += x11/compatibility/links-xorg
3996N/AREQUIRED_PACKAGES += x11/library/libx11