98 |
# remove hardcoded CFLAGS from default Makefile |
# remove hardcoded CFLAGS from default Makefile |
99 |
sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PVER%.*}/config/Makefile || die |
sed -i 's:^OPT=.*:OPT=-DNDEBUG:' ${BINDIR}/usr/$(mlibdir)/python${PVER%.*}/config/Makefile || die |
100 |
|
|
101 |
# install the multiarch-wrapper |
if [[ $(ARCH) = x86_64 ]] |
102 |
all-abis mv ${BINDIR}/usr/bin/python${PYVER%.*} ${BINDIR}/usr/bin/python${PYVER%.*}-'${abi}' |
then |
103 |
mlink multiarch-wrapper /usr/bin/python${PYVER%.*} |
# move config header |
104 |
|
all-abis mv -v ${BINDIR}/usr/include/python${PVER%.*}/pyconfig{,'${abi/m/}'}.h |
105 |
|
|
106 |
|
# install a stub header |
107 |
|
cat > ${BINDIR}/usr/include/python${PVER%.*}/pyconfig.h << "EOF" |
108 |
|
/* pyconfig.h - Stub Header */ |
109 |
|
#ifndef __STUB__PYCONFIG_H__ |
110 |
|
#define __STUB__PYCONFIG_H__ |
111 |
|
|
112 |
|
#if defined(__x86_64__) || \ |
113 |
|
defined(__sparc64__) || \ |
114 |
|
defined(__arch64__) || \ |
115 |
|
defined(__powerpc64__) || \ |
116 |
|
defined (__s390x__) |
117 |
|
# include "pyconfig-64.h" |
118 |
|
#else |
119 |
|
# include "pyconfig-32.h" |
120 |
|
#endif |
121 |
|
|
122 |
|
#endif /* __STUB__PYCONFIG_H__ */ |
123 |
|
EOF |
124 |
|
# install the multiarch-wrapper |
125 |
|
all-abis mv -v ${BINDIR}/usr/bin/python${PYVER%.*}{,-'${abi/m/}'} |
126 |
|
mlink multiarch-wrapper /usr/bin/python${PYVER%.*} |
127 |
|
fi |
128 |
|
|
129 |
# link python2.7 binary with python |
# link python2.7 binary with python |
130 |
mlink python${PVER%.*} /usr/bin/python || die |
mlink python${PVER%.*} /usr/bin/python || die |