author  Norm Jacobs <Norm.Jacobs@Oracle.COM> 
Tue, 22 Mar 2011 16:12:59 0700  
changeset 145  1e2390f5555e 
parent 127  3e3c266b3a81 
child 181  87e11e685b1f 
permissions  rwrr 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

1 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

2 
# CDDL HEADER START 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

3 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

4 
# The contents of this file are subject to the terms of the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

5 
# Common Development and Distribution License (the "License"). 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

6 
# You may not use this file except in compliance with the License. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

7 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

8 
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

9 
# or http://www.opensolaris.org/os/licensing. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

10 
# See the License for the specific language governing permissions 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

11 
# and limitations under the License. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

12 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

13 
# When distributing Covered Code, include this CDDL HEADER in each 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

14 
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

15 
# If applicable, add the following below this CDDL HEADER, with the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

16 
# fields enclosed by brackets "[]" replaced with your own identifying 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

17 
# information: Portions Copyright [yyyy] [name of copyright owner] 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

18 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

19 
# CDDL HEADER END 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

20 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

21 
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

22 
# 
127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
118
diff
changeset

23 
include ../../../makerules/sharedmacros.mk 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

24 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

25 
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

26 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

27 
COMPONENT_NAME= Python 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

28 
COMPONENT_VERSION= 2.6.4 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

29 
COMPONENT_SRC= $(COMPONENT_NAME)$(COMPONENT_VERSION) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

30 
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

31 
COMPONENT_ARCHIVE_HASH= sha1:bee572680d1966501247cb2b26e0e51f94d1cd13 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

32 
COMPONENT_ARCHIVE_URL= http://python.org/ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

33 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

34 
include $(WS_TOP)/makerules/prep.mk 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

35 
include $(WS_TOP)/makerules/configure.mk 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

36 
include $(WS_TOP)/makerules/ips.mk 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

37 

118
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

38 
# We patch auto* files, so regenerate headers and configure 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

39 
COMPONENT_PREP_ACTION = \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

40 
(cd $(@D) ; autoheader ; autoconf) 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

41 

049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

42 
# This seems horribly wrong, but these defines break the ability to build c99 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

43 
# compliant modules or with gcc. 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

44 
COMPONENT_POST_CONFIGURE_ACTION = \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

45 
(cd $(@D) ; \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

46 
perl pi e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

47 
perl pi e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

48 
perl pi e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \ 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

49 
pyconfig.h) 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

50 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

51 
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

52 
# pythonconfig 
118
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

53 
CC += $(CFLAGS) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

54 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

55 
C99MODE= 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

56 
CPPFLAGS += IPython 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

57 

118
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

58 
# so we find the ncurses headers 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

59 
CPPFLAGS += I/usr/include/ncurses 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

60 
# enable large files how they did in JDS 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

61 
CPPFLAGS += D_LARGEFILE64_SOURCE 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

62 
# libffi for _ctypes 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

63 
CPPFLAGS += $(shell pkgconfig cflagsonlyI libffi) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

64 

118
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

65 
CCFLAGS += norunpath compat=5 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

66 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

67 
CONFIGURE_OPTIONS += infodir=$(CONFIGURE_INFODIR) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

68 
CONFIGURE_OPTIONS += enableshared 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

69 
CONFIGURE_OPTIONS += disablestatic 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

70 
CONFIGURE_OPTIONS += withsystemffi 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

71 
CONFIGURE_OPTIONS += withoutgcc 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

72 
CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

73 
CONFIGURE_OPTIONS += ac_cv_olimit_ok=no 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

74 
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" 
118
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

75 
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

76 
CONFIGURE_OPTIONS += CCSHARED="$(CC_PIC)" 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

77 
CONFIGURE_OPTIONS += CXX="$(CCC)" 
049f3b3d6903
7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

78 
CONFIGURE_OPTIONS += CXXFLAGS="$(CCFLAGS)" 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

79 
CONFIGURE_OPTIONS += DFLAGS="$(BITS)" 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

80 
COMPONENT_BUILD_ENV += DFLAGS="$(BITS)" 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

81 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

82 
# 64 bit shared objects need to go in a 64bit directory 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

83 
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/libdynload 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

84 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

85 
# common targets 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

86 
build: $(BUILD_32_and_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

87 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

88 
$(INSTALL_32): $(INSTALL_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

89 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

90 
install: $(INSTALL_32_and_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

91 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

92 
test: $(TEST_32_and_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

93 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

94 
$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

95 
(cd $(@D) ; gmake test  exit 0) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

96 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

97 
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

98 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

99 
include $(WS_TOP)/makerules/depend.mk 