]>
Commit | Line | Data |
---|---|---|
53c273e0 MT |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = Python | |
34335c28 AF |
28 | PKG_VER = 2.7.1 |
29 | PKG_REL = 3 | |
53c273e0 MT |
30 | |
31 | PKG_MAINTAINER = | |
bb7d617c | 32 | PKG_GROUPS = Development/Languages |
53c273e0 MT |
33 | PKG_URL = http://www.python.org |
34 | PKG_LICENSE = Python | |
35 | PKG_SUMMARY = An interpreted, interactive, object-oriented programming language. | |
36 | ||
4ea11fef | 37 | PKG_BUILD_DEPS+= autoconf automake bzip2-devel db4-devel expat-devel gdbm-devel \ |
b9a6b19e MT |
38 | libffi-devel libselinux-devel ncurses-devel openssl-devel pkg-config \ |
39 | readline-devel sqlite-devel tar zlib-devel | |
53c273e0 MT |
40 | |
41 | define PKG_DESCRIPTION | |
42 | Python is an interpreted, interactive, object-oriented programming \ | |
43 | language often compared to Tcl, Perl, Scheme or Java. Python includes \ | |
44 | modules, classes, exceptions, very high level dynamic data types and \ | |
45 | dynamic typing. Python supports interfaces to many system calls and \ | |
46 | libraries, as well as to various windowing systems. | |
47 | endef | |
48 | ||
5c8ad465 | 49 | PKG_TARBALL = $(THISAPP).tgz |
53c273e0 | 50 | |
c114edc3 MT |
51 | PKG_PACKAGES += $(PKG_NAME_REAL)-devel |
52 | ||
a72bb39e MT |
53 | PKG_FILES-$(PKG_NAME_REAL)-devel += \ |
54 | !/usr/lib/python*/config/Makefile \ | |
55 | !/usr/include/python*/pyconfig.h | |
56 | ||
4f8fc736 MT |
57 | export CFLAGS += -D_GNU_SOURCE -fwrapv |
58 | export CPPFLAGS = $(shell pkg-config --cflags-only-I libffi) | |
53c273e0 | 59 | |
95d3e551 | 60 | define STAGE_PREPARE_CMDS |
7a54de68 MT |
61 | cd $(DIR_APP) && sed -e "s/#*shared*/*shared*/g" -i Modules/Setup.dist |
62 | ||
4f8fc736 MT |
63 | # Remove embedded copies of expat, zlib and libffi |
64 | cd $(DIR_APP) && rm -rf Modules/{expat,zlib} | |
65 | cd $(DIR_APP) && rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx} | |
66 | ||
c2c6eb30 MT |
67 | # Remove autoconf version check and reconfigure |
68 | cd $(DIR_APP) && sed -e "s/^version_required.*//" -i configure.in | |
69 | cd $(DIR_APP) && autoreconf --force | |
95d3e551 MT |
70 | endef |
71 | ||
53c273e0 MT |
72 | define STAGE_BUILD |
73 | cd $(DIR_APP) && \ | |
74 | OPT="$(CFLAGS)" \ | |
75 | ./configure \ | |
53c273e0 MT |
76 | --prefix=/usr \ |
77 | --enable-ipv6 \ | |
7a54de68 MT |
78 | --with-system-expat \ |
79 | --with-system-ffi \ | |
80 | --enable-shared | |
53c273e0 MT |
81 | |
82 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) | |
83 | endef | |
84 | ||
85 | define STAGE_INSTALL | |
86 | cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT) | |
87 | ||
be86bab5 MT |
88 | # All *.py files don't need to be executeable... |
89 | find $(BUILDROOT)/usr/lib/python*/ -name "*.py" | xargs chmod a-x -v | |
53c273e0 | 90 | endef |