author | Danek Duvall <danek.duvall@oracle.com> |
Fri, 04 Nov 2011 10:38:12 -0700 | |
changeset 578 | 4f51372decaf |
parent 458 | 2edc011b559e |
child 609 | 775168282b2f |
permissions | -rw-r--r-- |
458 | 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 |
# |
|
24 |
include ../../../make-rules/shared-macros.mk |
|
25 |
||
26 |
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
|
27 |
||
28 |
COMPONENT_NAME= Python |
|
29 |
COMPONENT_VERSION= 2.7.1 |
|
30 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
31 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
32 |
COMPONENT_ARCHIVE_HASH= sha1:fbe1894322ff91b80726e269c97454f4129fc2a3 |
|
33 |
COMPONENT_ARCHIVE_URL= http://python.org/ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
|
34 |
||
35 |
include $(WS_TOP)/make-rules/prep.mk |
|
36 |
include $(WS_TOP)/make-rules/configure.mk |
|
37 |
include $(WS_TOP)/make-rules/ips.mk |
|
578
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
38 |
include $(WS_TOP)/make-rules/lint-libraries.mk |
458 | 39 |
|
40 |
# We patch auto* files, so regenerate headers and configure |
|
41 |
COMPONENT_PREP_ACTION = \ |
|
42 |
(cd $(@D) ; autoheader ; autoconf) |
|
43 |
||
44 |
# to find the ncurses headers |
|
45 |
CPPFLAGS += -I/usr/include/ncurses |
|
46 |
||
47 |
# libffi for _ctypes |
|
48 |
CPPFLAGS += $(shell pkg-config --cflags-only-I libffi) |
|
49 |
||
50 |
# because python links with $(CC) ... $(LDFLAGS) ... |
|
51 |
LDFLAGS = $(CC_BITS) $(CC_PIC) |
|
52 |
||
53 |
# build pic |
|
54 |
CFLAGS += $(CC_PIC) |
|
55 |
||
56 |
# add /usr/gnu/lib to the library search/run path |
|
57 |
LDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib |
|
58 |
LDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64) |
|
59 |
LDFLAGS += $(LDFLAGS.$(BITS)) |
|
60 |
||
578
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
61 |
# Python puts its header files in a special place. |
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
62 |
LINT_FLAGS += -I$(SOURCE_DIR)/Include |
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
63 |
|
458 | 64 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
65 |
CONFIGURE_OPTIONS += --enable-shared |
|
66 |
CONFIGURE_OPTIONS += --with-system-expat |
|
67 |
CONFIGURE_OPTIONS += --with-system-ffi |
|
68 |
CONFIGURE_OPTIONS += --without-gcc |
|
69 |
CONFIGURE_OPTIONS += --enable-ipv6 |
|
70 |
CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no |
|
71 |
CONFIGURE_OPTIONS += ac_cv_olimit_ok=no |
|
72 |
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
|
73 |
CONFIGURE_OPTIONS += BASECFLAGS="$(CFLAGS)" |
|
74 |
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
75 |
CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
|
76 |
||
77 |
COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
|
78 |
||
79 |
# patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to |
|
80 |
# generate a pyconfig.h that is both 32 and 64 bit compatible. We add this |
|
81 |
# back to the environment so that configure can still work. configure.in and |
|
82 |
# pyconfig.h.in should probably be rewhacked to do this more cleanly in the |
|
83 |
# future. |
|
84 |
CONFIGURE_OPTIONS.32 += ac_cv_sizeof_long=4 |
|
85 |
CONFIGURE_OPTIONS.64 += ac_cv_sizeof_long=8 |
|
86 |
||
87 |
# 64 bit shared objects need to go in a 64-bit directory |
|
88 |
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
|
89 |
||
90 |
# common targets |
|
91 |
build: $(BUILD_32_and_64) |
|
92 |
||
93 |
$(INSTALL_32): $(INSTALL_64) |
|
94 |
||
95 |
install: $(INSTALL_32_and_64) |
|
96 |
||
97 |
COMPONENT_TEST_TARGETS = test |
|
98 |
||
99 |
test: $(TEST_32_and_64) |
|
100 |
||
101 |
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
102 |
||
103 |
include $(WS_TOP)/make-rules/depend.mk |