Magellan Linux

Annotation of /trunk/core/python/python-2.6.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1120 - (hide annotations) (download)
Wed Apr 22 19:46:47 2009 UTC (15 years, 6 months ago) by niro
File size: 2912 byte(s)
auto added: ver bump to 2.6.2-r1
1 niro 1120 # $Id$
2    
3     PNAME="python"
4     PVER="2.6.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.7
15     >= sys-libs/zlib-1.2
16     >= dev-libs/expat-2
17     >= dev-libs/openssl-0.9.8
18     >= sys-libs/readline-6.0"
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.6.0-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.6.0-lib64-2.patch
48     )
49    
50     # sed line: on 2 digits add an zero: 2.6 -> 2.6.0
51     UP2DATE="updatecmd ${HOMEPAGE}/download/releases/ | grep 'Python .*(.*)' | sed 's/.*Python\ \([0-9].*\) (.*/\1/g;s/\([0-9]\.[0-9]\$\)/\1.0/;q'"
52    
53     src_prepare()
54     {
55     munpack ${SRCFILE} || die
56     cd ${SRCDIR}
57    
58     # adds support for PYTHON_DONTCOMPILE shell environment to
59     # supress automatic generation of .pyc and .pyo files
60     mpatch ${PNAME}-2.6.0-gentoo_py_dontcompile.patch || die
61     mpatch ${PNAME}-2.4-disable_modules_and_ssl.patch || die
62     mpatch ${PNAME}-2.5.0-mimetypes-apache.patch || die
63    
64     if [[ $(mlibdir) = lib64 ]]
65     then
66     mpatch ${PNAME}-2.6.0-lib64-2.patch || die
67     fi
68     }
69    
70     src_compile()
71     {
72     cd ${SRCDIR}
73    
74     mconfigure \
75     --with-fpectl \
76     --enable-shared \
77     --infodir='${prefix}'/share/info \
78     --mandir='${prefix}'/share/man \
79     --with-threads || die
80    
81     mmake || die
82     }
83    
84     src_install()
85     {
86     cd ${SRCDIR}
87    
88     # install some missing directories
89     minstalldir /usr || die
90    
91     mmake DESTDIR=${BINDIR} altinstall || die
92    
93     # link python${PYVER}-config to python-config
94     mlink python${PYVER}-config /usr/bin/python-config || die
95    
96     minstalldir /usr/$(mlibdir)/python${PYVER}/config || die
97     minstallfile ${SRCDIR}/Makefile.pre.in /usr/$(mlibdir)/python${PYVER}/config || die
98    
99     # remove hardcoded CFLAGS from default Makefile
100     sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PYVER}/config/Makefile || die
101    
102     minstalldocs LICENSE README || die
103     }
104    
105     postinstall()
106     {
107     # link python2.4 binary with python
108     [ -e ${MROOT}/usr/bin/python ] && rm -f ${MROOT}/usr/bin/python
109     ln -snf python${mPYVER} ${MROOT}/usr/bin/python
110    
111     # link python2.4 binary with python2
112     [ -e ${MROOT}/usr/bin/python2 ] && rm -f ${MROOT}/usr/bin/python2
113     ln -snf python${mPYVER} ${MROOT}/usr/bin/python2
114     }

Properties

Name Value
svn:keywords Id