author  Norm Jacobs <Norm.Jacobs@Oracle.COM> 
Sun, 13 Mar 2011 16:12:25 0700  
changeset 127  3e3c266b3a81 
parent 118  049f3b3d6903 
child 145  1e2390f5555e 
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 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

52 
# Until the fix for "17858 pkgdepend generate hurls on some python modules" is 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

53 
# generally installed on our build systems, we need to skip the dependency 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

54 
# generation step. see https://defect.opensolaris.org/bz/show_bug.cgi?id=17858 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

55 
# When this is fixed, we need to remove the static dependencies from the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

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

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

58 
$(MANIFEST_BASE)python26.depend: PKGDEPEND = /bin/true 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

59 

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

60 
# 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

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

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

63 

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

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

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

66 

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

67 
# 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

68 
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

69 
# 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

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

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

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

73 

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

74 
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

75 

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

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

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

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

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

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

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

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

83 
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

84 
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

85 
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

86 
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

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

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

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

90 

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

91 
# 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

92 
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

93 

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

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

95 
build: $(BUILD_32_and_64) 
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 
$(INSTALL_32): $(INSTALL_64) 
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 
install: $(INSTALL_32_and_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

100 

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

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

102 

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

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

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

105 

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

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

107 

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

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