Magellan Linux

Diff of /branches/magellan-next/core/python/python-2.7.0-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6329 by niro, Fri Aug 20 16:33:41 2010 UTC revision 6339 by niro, Fri Aug 20 19:57:48 2010 UTC
# Line 33  export PYTHON_DISABLE_MODULES="gdbm dbm Line 33  export PYTHON_DISABLE_MODULES="gdbm dbm
33  # force usage of our CFLAGS  # force usage of our CFLAGS
34  export OPT="${CFLAGS}"  export OPT="${CFLAGS}"
35    
36  sminclude mtools  sminclude mtools multilib
37    
38  # uses PYVER and sometimes PVER; so keep both  # uses PYVER and sometimes PVER; so keep both
39  SRC_URI=(  SRC_URI=(
# Line 52  UP2DATE="updatecmd ${HOMEPAGE}/download/ Line 52  UP2DATE="updatecmd ${HOMEPAGE}/download/
52  src_prepare()  src_prepare()
53  {  {
54   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
  cd ${SRCDIR}  
55    
56   # adds support for PYTHON_DONTCOMPILE shell environment to   # adds support for PYTHON_DONTCOMPILE shell environment to
57   # supress automatic generation of .pyc and .pyo files   # supress automatic generation of .pyc and .pyo files
# Line 60  src_prepare() Line 59  src_prepare()
59   mpatch ${PNAME}-2.4-disable_modules_and_ssl.patch || die   mpatch ${PNAME}-2.4-disable_modules_and_ssl.patch || die
60   mpatch ${PNAME}-2.5.0-mimetypes-apache.patch || die   mpatch ${PNAME}-2.5.0-mimetypes-apache.patch || die
61    
62   if [[ $(mlibdir) = lib64 ]]   only-m64 mpatch ${PNAME}-2.7.0-lib64-3.patch || die
  then  
  mpatch ${PNAME}-2.7.0-lib64-3.patch || die  
  fi  
63  }  }
64    
65  src_compile()  src_compile()
66  {  {
  cd ${SRCDIR}  
   
67   mconfigure \   mconfigure \
68   --with-fpectl \   --with-fpectl \
69   --enable-shared \   --enable-shared \
# Line 82  src_compile() Line 76  src_compile()
76    
77  src_install()  src_install()
78  {  {
  cd ${SRCDIR}  
   
79   # install some missing directories   # install some missing directories
80   minstalldir /usr || die   minstalldir /usr || die
81    
82   mmake DESTDIR=${BINDIR} altinstall  || die   local abi
83     for abi in ${MULTILIB_ABIS}
84   # link python${PVER%.*}-config to python-config   do
85   mlink python${PVER%.*}-config /usr/bin/python-config || die   cd ${SRCDIR}-${abi}
86     make DESTDIR=${BINDIR} altinstall  || die
87   minstalldir /usr/$(mlibdir)/python${PVER%.*}/config || die  
88   minstallfile ${SRCDIR}/Makefile.pre.in /usr/$(mlibdir)/python${PVER%.*}/config || die   minstalldir /usr/$(mlibdir)/python${PVER%.*}/config || die
89     minstallfile ${SRCDIR}-${abi}/Makefile.pre.in /usr/'$(mlibdir)'/python${PVER%.*}/config || die
90    
91     # remove hardcoded CFLAGS from default Makefile
92     sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PVER%.*}/config/Makefile || die
93    
94     if [[ ${ARCH} = x86_64 ]]
95     then
96     # move config header
97     mv -v ${BINDIR}/usr/include/python${PVER%.*}/pyconfig{,${abi}}.h
98    
99   # remove hardcoded CFLAGS from default Makefile   # install a stub header
100   sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PVER%.*}/config/Makefile || die   cat > ${BINDIR}/usr/include/python${PVER%.*}/pyconfig.h << "EOF"
   
  if [[ $(ARCH) = x86_64 ]]  
  then  
  # move config header  
  all-abis mv -v ${BINDIR}/usr/include/python${PVER%.*}/pyconfig{,'${abi/m/}'}.h  
   
  # install a stub header  
  cat > ${BINDIR}/usr/include/python${PVER%.*}/pyconfig.h << "EOF"  
101  /* pyconfig.h - Stub Header  */  /* pyconfig.h - Stub Header  */
102  #ifndef __STUB__PYCONFIG_H__  #ifndef __STUB__PYCONFIG_H__
103  #define __STUB__PYCONFIG_H__  #define __STUB__PYCONFIG_H__
# Line 114  src_install() Line 107  src_install()
107      defined(__arch64__) || \      defined(__arch64__) || \
108      defined(__powerpc64__) || \      defined(__powerpc64__) || \
109      defined (__s390x__)      defined (__s390x__)
110  # include "pyconfig-64.h"  # include "pyconfig-m64.h"
111  #else  #else
112  # include "pyconfig-32.h"  # include "pyconfig-m32.h"
113  #endif  #endif
114    
115  #endif /* __STUB__PYCONFIG_H__ */  #endif /* __STUB__PYCONFIG_H__ */
116  EOF  EOF
117   # install the multiarch-wrapper   # install the multiarch-wrapper
118   all-abis mv -v ${BINDIR}/usr/bin/python${PYVER%.*}{,-'${abi/m/}'}   mv -v ${BINDIR}/usr/bin/python${PYVER%.*}{,-${abi}}
119   mlink multiarch-wrapper /usr/bin/python${PYVER%.*}   mlink multiarch-wrapper /usr/bin/python${PYVER%.*}
120   fi   fi
121     done
122    
123     # link python${PVER%.*}-config to python-config
124     mlink python${PVER%.*}-config /usr/bin/python-config || die
125    
126   # link python2.7 binary with python   # link python2.7 binary with python
127   mlink python${PVER%.*} /usr/bin/python || die   mlink python${PVER%.*} /usr/bin/python || die

Legend:
Removed from v.6329  
changed lines
  Added in v.6339