Contents of /trunk/core/python/python-2.5.2-r1.smage2
Parent Directory
|
Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 8 months ago) by niro
File size: 2800 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 8 months ago) by niro
File size: 2800 byte(s)
import repo
1 | # $Header: /magellan-cvs/smage/python/python-2.5.1-r3.smage2,v 1.1 2008/03/20 14:24:16 niro Exp $ |
2 | |
3 | PNAME="python" |
4 | PVER="2.5.2" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-lang" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." |
11 | HOMEPAGE="http://www.python.org/" |
12 | |
13 | DEPEND=">= virtual/glibc |
14 | >= sys-libs/ncurses-5.6 |
15 | >= sys-libs/zlib-1.2 |
16 | >= dev-libs/expat-2 |
17 | >= dev-libs/openssl-0.9.8 |
18 | >= sys-libs/readline-5.2" |
19 | |
20 | SDEPEND=">= sys-apps/sed-4" |
21 | |
22 | SRCFILE="${PNAME/py/Py}-${PVER/.0}.tar.bz2" |
23 | SRCDIR="${BUILDDIR}/${PNAME/py/Py}-${PVER/.0}" |
24 | |
25 | PYVER="${PVER:0:3}" |
26 | |
27 | # vars needed in magefile |
28 | mPYVER="${PYVER}" |
29 | SPECIAL_VARS="mPYVER" |
30 | |
31 | # disabled modules (needs the gentoo_py_dontcompile patch) |
32 | export PYTHON_DISABLE_MODULES="gdbm dbm bsddb _tkinter" || die |
33 | |
34 | # force usage of our CFLAGS |
35 | export OPT="${CFLAGS}" |
36 | |
37 | sminclude mtools |
38 | |
39 | # uses PYVER and sometimes PVER; so keep both |
40 | SRC_URI=( |
41 | http://www.python.org/ftp/python/${PYVER}/${SRCFILE} |
42 | http://www.python.org/ftp/python/${PVER}/${SRCFILE} |
43 | mirror://${PNAME}/${SRCFILE} |
44 | mirror://${PNAME}/${PNAME}-2.4-gentoo_py_dontcompile.patch |
45 | mirror://${PNAME}/${PNAME}-2.4-disable_modules_and_ssl.patch |
46 | mirror://${PNAME}/${PNAME}-2.5.0-mimetypes-apache.patch |
47 | mirror://${PNAME}/${PNAME}-2.5.0-lib64.patch |
48 | ) |
49 | |
50 | src_prepare() |
51 | { |
52 | munpack ${SRCFILE} || die |
53 | cd ${SRCDIR} |
54 | |
55 | # adds support for PYTHON_DONTCOMPILE shell environment to |
56 | # supress automatic generation of .pyc and .pyo files |
57 | mpatch ${PNAME}-2.4-gentoo_py_dontcompile.patch || die |
58 | mpatch ${PNAME}-2.4-disable_modules_and_ssl.patch || die |
59 | mpatch ${PNAME}-2.5.0-mimetypes-apache.patch || die |
60 | |
61 | if [[ $(mlibdir) = lib64 ]] |
62 | then |
63 | mpatch ${PNAME}-2.5.0-lib64.patch || die |
64 | fi |
65 | } |
66 | |
67 | src_compile() |
68 | { |
69 | cd ${SRCDIR} |
70 | |
71 | mconfigure \ |
72 | --with-fpectl \ |
73 | --enable-shared \ |
74 | --infodir='${prefix}'/share/info \ |
75 | --mandir='${prefix}'/share/man \ |
76 | --with-threads || die |
77 | |
78 | mmake || die |
79 | } |
80 | |
81 | src_install() |
82 | { |
83 | cd ${SRCDIR} |
84 | |
85 | # install some missing directories |
86 | minstalldir /usr || die |
87 | |
88 | mmake DESTDIR=${BINDIR} altinstall || die |
89 | |
90 | # link python${PYVER}-config to python-config |
91 | mlink python${PYVER}-config /usr/bin/python-config || die |
92 | |
93 | minstalldir /usr/$(mlibdir)/python${PYVER}/config || die |
94 | minstallfile ${SRCDIR}/Makefile.pre.in /usr/$(mlibdir)/python${PYVER}/config || die |
95 | |
96 | # remove hardcoded CFLAGS from default Makefile |
97 | sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PYVER}/config/Makefile || die |
98 | |
99 | minstalldocs LICENSE README || die |
100 | } |
101 | |
102 | postinstall() |
103 | { |
104 | # link python2.4 binary with python |
105 | [ -e ${MROOT}/usr/bin/python ] && rm -f ${MROOT}/usr/bin/python |
106 | ln -snf python${mPYVER} ${MROOT}/usr/bin/python |
107 | |
108 | # link python2.4 binary with python2 |
109 | [ -e ${MROOT}/usr/bin/python2 ] && rm -f ${MROOT}/usr/bin/python2 |
110 | ln -snf python${mPYVER} ${MROOT}/usr/bin/python2 |
111 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |