Lines 227-232
src_configure() {
Link Here
|
227 |
$(use_with readline readline "$(usex libedit editline readline)") |
227 |
$(use_with readline readline "$(usex libedit editline readline)") |
228 |
$(use_with valgrind) |
228 |
$(use_with valgrind) |
229 |
) |
229 |
) |
|
|
230 |
# Force-disable modules we don't want built. |
231 |
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations. |
232 |
{ |
233 |
echo "*disabled*" |
234 |
echo "nis" |
235 |
use gdbm || echo "_gdbm _dbm" |
236 |
use sqlite || echo "_sqlite3" |
237 |
use ssl || echo "_hashlib _ssl" |
238 |
use ncurses || echo "_curses _curses_panel" |
239 |
use readline || echo "readline" |
240 |
use tk || echo "_tkinter" |
241 |
|
242 |
} > Modules/Setup.local |
230 |
|
243 |
|
231 |
# disable implicit optimization/debugging flags |
244 |
# disable implicit optimization/debugging flags |
232 |
local -x OPT= |
245 |
local -x OPT= |
Lines 270-302
src_configure() {
Link Here
|
270 |
|
283 |
|
271 |
mkdir "${WORKDIR}"/${P}-${CBUILD} || die |
284 |
mkdir "${WORKDIR}"/${P}-${CBUILD} || die |
272 |
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die |
285 |
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die |
273 |
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating |
286 |
|
274 |
# libdir correctly for cross. |
287 |
mkdir Modules || die |
275 |
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ |
288 |
cat >> Modules/Setup.local <<-EOF || die |
276 |
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" |
289 |
*disabled* |
277 |
|
290 |
nis |
278 |
# Avoid as many dependencies as possible for the cross build. |
291 |
_dbm _gdbm |
279 |
cat >> Makefile <<-EOF || die |
292 |
_sqlite3 |
280 |
MODULE_NIS_STATE=disabled |
293 |
_hashlib _ssl |
281 |
MODULE__DBM_STATE=disabled |
294 |
_curses _curses_panel |
282 |
MODULE__GDBM_STATE=disabled |
295 |
readline |
283 |
MODULE__DBM_STATE=disabled |
296 |
_tkinter |
284 |
MODULE__SQLITE3_STATE=disabled |
297 |
pyexpat |
285 |
MODULE__HASHLIB_STATE=disabled |
298 |
zlib |
286 |
MODULE__SSL_STATE=disabled |
299 |
# We disable these for CBUILD because Python's setup.py can't handle locating |
287 |
MODULE__CURSES_STATE=disabled |
300 |
# libdir correctly for cross. |
288 |
MODULE__CURSES_PANEL_STATE=disabled |
301 |
_ctypes _crypt |
289 |
MODULE_READLINE_STATE=disabled |
|
|
290 |
MODULE__TKINTER_STATE=disabled |
291 |
MODULE_PYEXPAT_STATE=disabled |
292 |
MODULE_ZLIB_STATE=disabled |
293 |
EOF |
302 |
EOF |
|
|
303 |
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" |
294 |
|
304 |
|
295 |
# Unfortunately, we do have to build this immediately, and |
305 |
# Unfortunately, we do have to build this immediately, and |
296 |
# not in src_compile, because CHOST configure for Python |
306 |
# not in src_compile, because CHOST configure for Python |
297 |
# will check the existence of the --with-build-python value |
307 |
# will check the existence of the --with-build-python value |
298 |
# immediately. |
308 |
# immediately. |
299 |
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake |
309 |
emake |
300 |
popd &> /dev/null || die |
310 |
popd &> /dev/null || die |
301 |
fi |
311 |
fi |
302 |
|
312 |
|
Lines 320-339
src_configure() {
Link Here
|
320 |
die "Broken sem_open function (bug 496328)" |
330 |
die "Broken sem_open function (bug 496328)" |
321 |
fi |
331 |
fi |
322 |
|
332 |
|
323 |
# force-disable modules we don't want built |
|
|
324 |
local disable_modules=( NIS ) |
325 |
use gdbm || disable_modules+=( _GDBM _DBM ) |
326 |
use sqlite || disable_modules+=( _SQLITE3 ) |
327 |
use ssl || disable_modules+=( _HASHLIB _SSL ) |
328 |
use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) |
329 |
use readline || disable_modules+=( READLINE ) |
330 |
use tk || disable_modules+=( _TKINTER ) |
331 |
|
332 |
local mod |
333 |
for mod in "${disable_modules[@]}"; do |
334 |
echo "MODULE_${mod}_STATE=disabled" |
335 |
done >> Makefile || die |
336 |
|
337 |
# install epython.py as part of stdlib |
333 |
# install epython.py as part of stdlib |
338 |
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die |
334 |
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die |
339 |
} |
335 |
} |