24 include ../../../make-rules/shared-macros.mk |
24 include ../../../make-rules/shared-macros.mk |
25 |
25 |
26 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
26 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
27 |
27 |
28 COMPONENT_NAME= Python |
28 COMPONENT_NAME= Python |
29 COMPONENT_VERSION= 2.7.3 |
29 COMPONENT_VERSION= 2.7.8 |
30 COMPONENT_PROJECT_URL= http://python.org/ |
30 COMPONENT_PROJECT_URL= http://python.org/ |
31 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
31 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
33 COMPONENT_ARCHIVE_HASH= \ |
33 COMPONENT_ARCHIVE_HASH= \ |
34 sha256:726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c |
34 sha256:edde10a0cb7d14e2735e682882d5b287028d1485c456758154c19573db68075a |
35 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
35 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
36 COMPONENT_BUGDB= utility/python |
36 COMPONENT_BUGDB= utility/python |
|
37 |
|
38 TPNO= 18461 |
37 |
39 |
38 include $(WS_TOP)/make-rules/prep.mk |
40 include $(WS_TOP)/make-rules/prep.mk |
39 include $(WS_TOP)/make-rules/configure.mk |
41 include $(WS_TOP)/make-rules/configure.mk |
40 include $(WS_TOP)/make-rules/ips.mk |
42 include $(WS_TOP)/make-rules/ips.mk |
41 include $(WS_TOP)/make-rules/lint-libraries.mk |
43 include $(WS_TOP)/make-rules/lint-libraries.mk |
|
44 |
|
45 # Need to preserve timestamp for Grammar files. If the pickle files are older, |
|
46 # Python will try to rebuild them. |
|
47 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt |
|
48 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle |
42 |
49 |
43 # We patch auto* files, so regenerate headers and configure |
50 # We patch auto* files, so regenerate headers and configure |
44 COMPONENT_PREP_ACTION = \ |
51 COMPONENT_PREP_ACTION = \ |
45 (cd $(@D) ; autoheader ; autoconf) |
52 (cd $(@D) ; autoheader ; autoconf) |
46 |
53 |
89 CONFIGURE_OPTIONS += --enable-shared |
96 CONFIGURE_OPTIONS += --enable-shared |
90 CONFIGURE_OPTIONS += --with-system-expat |
97 CONFIGURE_OPTIONS += --with-system-expat |
91 CONFIGURE_OPTIONS += --with-system-ffi |
98 CONFIGURE_OPTIONS += --with-system-ffi |
92 CONFIGURE_OPTIONS += --without-gcc |
99 CONFIGURE_OPTIONS += --without-gcc |
93 CONFIGURE_OPTIONS += --enable-ipv6 |
100 CONFIGURE_OPTIONS += --enable-ipv6 |
94 CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no |
|
95 CONFIGURE_OPTIONS += ac_cv_olimit_ok=no |
|
96 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
101 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
97 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
102 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
98 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
103 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
99 CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
104 CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
100 CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" |
105 CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" |
101 |
106 |
102 COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
107 COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
103 COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" |
108 COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" |
104 |
109 |
105 # patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to |
|
106 # generate a pyconfig.h that is both 32 and 64 bit compatible. We add this |
|
107 # back to the environment so that configure can still work. configure.in and |
|
108 # pyconfig.h.in should probably be rewhacked to do this more cleanly in the |
|
109 # future. |
|
110 CONFIGURE_OPTIONS.32 += ac_cv_sizeof_long=4 |
|
111 CONFIGURE_OPTIONS.64 += ac_cv_sizeof_long=8 |
|
112 |
|
113 # 64 bit shared objects need to go in a 64-bit directory |
110 # 64 bit shared objects need to go in a 64-bit directory |
114 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
111 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
115 |
112 |
|
113 # Setup pyconfig.h file to support 32 & 64 bit. |
|
114 # If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the related |
|
115 # *.txt files in the same directory, it will rebuild them anytime you try to |
|
116 # build a Python module. So here we also touch the pickle files to avoid this. |
|
117 # |
|
118 COMPONENT_POST_INSTALL_ACTION= \ |
|
119 (cd $(PROTOUSRDIR) ; \ |
|
120 $(MV) include/python2.7/pyconfig.h include/python2.7/pyconfig-$(BITS).h ; \ |
|
121 $(TOUCH) lib/python2.7/lib2to3/*.pickle) |
|
122 |
|
123 ASLR_MODE = $(ASLR_ENABLE) |
|
124 |
116 # common targets |
125 # common targets |
|
126 $(INSTALL_32): $(INSTALL_64) |
117 build: $(BUILD_32_and_64) |
127 build: $(BUILD_32_and_64) |
118 |
|
119 $(INSTALL_32): $(INSTALL_64) |
|
120 |
|
121 install: $(INSTALL_32_and_64) |
128 install: $(INSTALL_32_and_64) |
122 |
129 |
|
130 # Using "-uall,-network" ensures all tests are run except the network tests. |
|
131 # The network tests contain many expected failures when run behind a firewall. |
|
132 # The "-v" ensures verbose mode. You can set TESTOPTS_PYTHON_TEST to a |
|
133 # particular test if you want to run just one test. For example, run gmake with |
|
134 # "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a |
|
135 # failure, like this: |
|
136 # $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test |
|
137 # Note that when a test succeeds, the builds/*/.tested file gets created. You |
|
138 # may need to remove these files, or run "gmake clobber" or "gmake clean" |
|
139 # between tests. |
|
140 # |
|
141 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)" |
123 COMPONENT_TEST_TARGETS = test |
142 COMPONENT_TEST_TARGETS = test |
124 |
143 |
125 test: $(TEST_32_and_64) |
144 test: $(TEST_32_and_64) |
126 |
145 |
127 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
146 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
128 |
147 |
129 include $(WS_TOP)/make-rules/depend.mk |
148 include $(WS_TOP)/make-rules/depend.mk |