326
|
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 |
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
|
22 |
#
|
|
23 |
include ../../../make-rules/shared-macros.mk
|
|
24 |
|
|
25 |
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
|
|
26 |
|
|
27 |
COMPONENT_NAME= Python
|
|
28 |
COMPONENT_VERSION= 2.6.4
|
|
29 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
|
|
30 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
|
|
31 |
COMPONENT_ARCHIVE_HASH= sha1:bee572680d1966501247cb2b26e0e51f94d1cd13
|
|
32 |
COMPONENT_ARCHIVE_URL= http://python.org/ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
|
|
33 |
|
|
34 |
include $(WS_TOP)/make-rules/prep.mk
|
|
35 |
include $(WS_TOP)/make-rules/configure.mk
|
|
36 |
include $(WS_TOP)/make-rules/ips.mk
|
|
37 |
|
354
|
38 |
# Need to preserve timestamp for Grammar files. If the pickle files are older,
|
|
39 |
# Python will try to rebuild them.
|
|
40 |
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
|
|
41 |
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
|
|
42 |
|
326
|
43 |
# We patch auto* files, so regenerate headers and configure
|
|
44 |
COMPONENT_PREP_ACTION = \
|
|
45 |
(cd $(@D) ; autoheader ; autoconf)
|
|
46 |
|
|
47 |
# This seems horribly wrong, but these defines break the ability to build c99
|
|
48 |
# compliant modules or with gcc.
|
|
49 |
COMPONENT_POST_CONFIGURE_ACTION = \
|
|
50 |
(cd $(@D) ; \
|
|
51 |
perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
|
|
52 |
perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
|
|
53 |
perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \
|
|
54 |
pyconfig.h)
|
|
55 |
|
|
56 |
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
|
|
57 |
# python-config
|
|
58 |
CC += $(CFLAGS)
|
|
59 |
|
|
60 |
C99MODE=
|
|
61 |
CPPFLAGS += -IPython
|
|
62 |
|
|
63 |
# so we find the ncurses headers
|
|
64 |
CPPFLAGS += -I/usr/include/ncurses
|
|
65 |
# enable large files how they did in JDS
|
|
66 |
CPPFLAGS += -D_LARGEFILE64_SOURCE
|
|
67 |
# libffi for _ctypes
|
|
68 |
CPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
|
|
69 |
|
|
70 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
|
|
71 |
CONFIGURE_OPTIONS += --enable-shared
|
|
72 |
CONFIGURE_OPTIONS += --disable-static
|
|
73 |
CONFIGURE_OPTIONS += --with-system-ffi
|
|
74 |
CONFIGURE_OPTIONS += --without-gcc
|
|
75 |
CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no
|
|
76 |
CONFIGURE_OPTIONS += ac_cv_olimit_ok=no
|
|
77 |
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
|
|
78 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
|
|
79 |
CONFIGURE_OPTIONS += CCSHARED="$(CC_PIC)"
|
|
80 |
CONFIGURE_OPTIONS += CXX="$(CXX)"
|
|
81 |
CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
|
|
82 |
CONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
|
|
83 |
COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
|
|
84 |
|
|
85 |
COMPONENT_TEST_TARGETS = test
|
|
86 |
|
|
87 |
# 64 bit shared objects need to go in a 64-bit directory
|
|
88 |
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
|
|
89 |
|
354
|
90 |
# Setup pyconfig.h file to support 32 & 64 bit.
|
|
91 |
# If the /usr/lib/python2.6/lib2to3/*.pickle files are older than the related
|
|
92 |
# *.txt files in the same directory, it will rebuild them anytime you try to
|
|
93 |
# build a Python module. So here we also touch the pickle files to avoid this.
|
|
94 |
#
|
|
95 |
COMPONENT_POST_INSTALL_ACTION= \
|
|
96 |
(cd $(PROTOUSRDIR) ; \
|
|
97 |
$(MV) include/python2.6/pyconfig.h include/python2.6/pyconfig-$(BITS).h ; \
|
|
98 |
$(TOUCH) lib/python2.6/lib2to3/*.pickle)
|
|
99 |
|
326
|
100 |
# common targets
|
|
101 |
build: $(BUILD_32_and_64)
|
|
102 |
|
|
103 |
$(INSTALL_32): $(INSTALL_64)
|
|
104 |
|
|
105 |
install: $(INSTALL_32_and_64)
|
|
106 |
|
|
107 |
test: $(TEST_32_and_64)
|
|
108 |
|
|
109 |
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
|
|
110 |
|
|
111 |
include $(WS_TOP)/make-rules/depend.mk
|