Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 913596 | Differences between
and this patch

Collapse All | Expand All

(-)a/dev-lang/python/python-3.10.13.ebuild (-32 / +31 lines)
Lines 137-151 src_configure() { Link Here
137
	if ! use bluetooth; then
137
	if ! use bluetooth; then
138
		local -x ac_cv_header_bluetooth_bluetooth_h=no
138
		local -x ac_cv_header_bluetooth_bluetooth_h=no
139
	fi
139
	fi
140
	local disable
140
141
	use gdbm      || disable+=" gdbm"
141
	# Force-disable modules we don't want built.
142
	use ncurses   || disable+=" _curses _curses_panel"
142
	# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
143
	use readline  || disable+=" readline"
143
	{
144
	use sqlite    || disable+=" _sqlite3"
144
		echo "*disabled*"
145
	use ssl       || export PYTHON_DISABLE_SSL="1"
145
		use gdbm      || echo "_gdbm _dbm"
146
	use tk        || disable+=" _tkinter"
146
		use ncurses   || echo "_curses _curses_panel"
147
	use xml       || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
147
		use readline  || echo "readline"
148
	export PYTHON_DISABLE_MODULES="${disable}"
148
		use sqlite    || echo "_sqlite3"
149
		use ssl       || echo "_hashlib _ssl"
150
		use tk        || echo "_tkinter"
151
		use xml       || echo "_elementtree pyexpat" # _elementtree uses pyexpat
152
153
	} > Modules/Setup.local
149
154
150
	if ! use xml; then
155
	if ! use xml; then
151
		ewarn "You have configured Python without XML support."
156
		ewarn "You have configured Python without XML support."
Lines 153-162 src_configure() { Link Here
153
		ewarn "may face problems parsing any XML documents."
158
		ewarn "may face problems parsing any XML documents."
154
	fi
159
	fi
155
160
156
	if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
157
		einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
158
	fi
159
160
	append-flags -fwrapv
161
	append-flags -fwrapv
161
	filter-flags -malign-double
162
	filter-flags -malign-double
162
163
Lines 278-310 src_configure() { Link Here
278
279
279
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
280
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
280
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
281
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
281
		# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
282
		# libdir correctly for cross.
283
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
284
			ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
285
282
283
		mkdir Modules || die
286
		# Avoid as many dependencies as possible for the cross build.
284
		# Avoid as many dependencies as possible for the cross build.
287
		cat >> Makefile <<-EOF || die
285
		cat >> Modules/Setup.local <<-EOF || die
288
			MODULE_NIS=disabled
286
			*disabled*
289
			MODULE__DBM=disabled
287
			nis
290
			MODULE__GDBM=disabled
288
			_dbm _gdbm
291
			MODULE__DBM=disabled
289
			_sqlite3
292
			MODULE__SQLITE3=disabled
290
			_hashlib _ssl
293
			MODULE__HASHLIB=disabled
291
			_curses _curses_panel
294
			MODULE__SSL=disabled
292
			readline
295
			MODULE__CURSES=disabled
293
			_tkinter
296
			MODULE__CURSES_PANEL=disabled
294
			pyexpat
297
			MODULE_READLINE=disabled
295
			zlib
298
			MODULE__TKINTER=disabled
296
			# We disable these for CBUILD because Python's setup.py can't handle locating
299
			MODULE_PYEXPAT=disabled
297
			# libdir correctly for cross.
300
			MODULE_ZLIB=disabled
298
			_ctypes _crypt
301
		EOF
299
		EOF
300
		ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
302
301
303
		# Unfortunately, we do have to build this immediately, and
302
		# Unfortunately, we do have to build this immediately, and
304
		# not in src_compile, because CHOST configure for Python
303
		# not in src_compile, because CHOST configure for Python
305
		# will check the existence of the Python it was pointed to
304
		# will check the existence of the Python it was pointed to
306
		# immediately.
305
		# immediately.
307
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
306
		emake
308
		popd &> /dev/null || die
307
		popd &> /dev/null || die
309
	fi
308
	fi
310
309
(-)a/dev-lang/python/python-3.11.5.ebuild (-35 / +31 lines)
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
}
(-)a/dev-lang/python/python-3.8.18.ebuild (-32 / +31 lines)
Lines 125-139 src_configure() { Link Here
125
	if ! use bluetooth; then
125
	if ! use bluetooth; then
126
		local -x ac_cv_header_bluetooth_bluetooth_h=no
126
		local -x ac_cv_header_bluetooth_bluetooth_h=no
127
	fi
127
	fi
128
	local disable
128
129
	use gdbm      || disable+=" gdbm"
129
	# Force-disable modules we don't want built.
130
	use ncurses   || disable+=" _curses _curses_panel"
130
	# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
131
	use readline  || disable+=" readline"
131
	{
132
	use sqlite    || disable+=" _sqlite3"
132
		echo "*disabled*"
133
	use ssl       || export PYTHON_DISABLE_SSL="1"
133
		use gdbm      || echo "_gdbm _dbm"
134
	use tk        || disable+=" _tkinter"
134
		use ncurses   || echo "_curses _curses_panel"
135
	use xml       || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
135
		use readline  || echo "readline"
136
	export PYTHON_DISABLE_MODULES="${disable}"
136
		use sqlite    || echo "_sqlite3"
137
		use ssl       || echo "_hashlib _ssl"
138
		use tk        || echo "_tkinter"
139
		use xml       || echo "_elementtree pyexpat" # _elementtree uses pyexpat
140
141
	} > Modules/Setup.local
137
142
138
	if ! use xml; then
143
	if ! use xml; then
139
		ewarn "You have configured Python without XML support."
144
		ewarn "You have configured Python without XML support."
Lines 141-150 src_configure() { Link Here
141
		ewarn "may face problems parsing any XML documents."
146
		ewarn "may face problems parsing any XML documents."
142
	fi
147
	fi
143
148
144
	if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
145
		einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
146
	fi
147
148
	append-flags -fwrapv
149
	append-flags -fwrapv
149
150
150
	filter-flags -malign-double
151
	filter-flags -malign-double
Lines 225-257 src_configure() { Link Here
225
226
226
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
227
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
227
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
228
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
228
		# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
229
		# libdir correctly for cross.
230
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
231
			ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
232
229
230
		mkdir Modules || die
233
		# Avoid as many dependencies as possible for the cross build.
231
		# Avoid as many dependencies as possible for the cross build.
234
		cat >> Makefile <<-EOF || die
232
		cat >> Modules/Setup.local <<-EOF || die
235
			MODULE_NIS=disabled
233
			*disabled*
236
			MODULE__DBM=disabled
234
			nis
237
			MODULE__GDBM=disabled
235
			_dbm _gdbm
238
			MODULE__DBM=disabled
236
			_sqlite3
239
			MODULE__SQLITE3=disabled
237
			_hashlib _ssl
240
			MODULE__HASHLIB=disabled
238
			_curses _curses_panel
241
			MODULE__SSL=disabled
239
			readline
242
			MODULE__CURSES=disabled
240
			_tkinter
243
			MODULE__CURSES_PANEL=disabled
241
			pyexpat
244
			MODULE_READLINE=disabled
242
			zlib
245
			MODULE__TKINTER=disabled
243
			# We disable these for CBUILD because Python's setup.py can't handle locating
246
			MODULE_PYEXPAT=disabled
244
			# libdir correctly for cross.
247
			MODULE_ZLIB=disabled
245
			_ctypes _crypt
248
		EOF
246
		EOF
247
		ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
249
248
250
		# Unfortunately, we do have to build this immediately, and
249
		# Unfortunately, we do have to build this immediately, and
251
		# not in src_compile, because CHOST configure for Python
250
		# not in src_compile, because CHOST configure for Python
252
		# will check the existence of the Python it was pointed to
251
		# will check the existence of the Python it was pointed to
253
		# immediately.
252
		# immediately.
254
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
253
		emake
255
		popd &> /dev/null || die
254
		popd &> /dev/null || die
256
	fi
255
	fi
257
256
(-)a/dev-lang/python/python-3.9.18.ebuild (-33 / +31 lines)
Lines 133-147 src_configure() { Link Here
133
	if ! use bluetooth; then
133
	if ! use bluetooth; then
134
		local -x ac_cv_header_bluetooth_bluetooth_h=no
134
		local -x ac_cv_header_bluetooth_bluetooth_h=no
135
	fi
135
	fi
136
	local disable
136
137
	use gdbm      || disable+=" gdbm"
137
	# Force-disable modules we don't want built.
138
	use ncurses   || disable+=" _curses _curses_panel"
138
	# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
139
	use readline  || disable+=" readline"
139
	{
140
	use sqlite    || disable+=" _sqlite3"
140
		echo "*disabled*"
141
	use ssl       || export PYTHON_DISABLE_SSL="1"
141
		use gdbm      || echo "_gdbm _dbm"
142
	use tk        || disable+=" _tkinter"
142
		use ncurses   || echo "_curses _curses_panel"
143
	use xml       || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
143
		use readline  || echo "readline"
144
	export PYTHON_DISABLE_MODULES="${disable}"
144
		use sqlite    || echo "_sqlite3"
145
		use ssl       || echo "_hashlib _ssl"
146
		use tk        || echo "_tkinter"
147
		use xml       || echo "_elementtree pyexpat" # _elementtree uses pyexpat
148
149
	} > Modules/Setup.local
145
150
146
	if ! use xml; then
151
	if ! use xml; then
147
		ewarn "You have configured Python without XML support."
152
		ewarn "You have configured Python without XML support."
Lines 149-158 src_configure() { Link Here
149
		ewarn "may face problems parsing any XML documents."
154
		ewarn "may face problems parsing any XML documents."
150
	fi
155
	fi
151
156
152
	if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
153
		einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
154
	fi
155
156
	append-flags -fwrapv
157
	append-flags -fwrapv
157
	filter-flags -malign-double
158
	filter-flags -malign-double
158
159
Lines 267-299 src_configure() { Link Here
267
268
268
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
269
		mkdir "${WORKDIR}"/${P}-${CBUILD} || die
269
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
270
		pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
270
		# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
271
		# libdir correctly for cross.
272
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
273
			ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
274
271
272
		mkdir Modules || die
275
		# Avoid as many dependencies as possible for the cross build.
273
		# Avoid as many dependencies as possible for the cross build.
276
		cat >> Makefile <<-EOF || die
274
		cat >> Modules/Setup.local <<-EOF || die
277
			MODULE_NIS=disabled
275
			*disabled*
278
			MODULE__DBM=disabled
276
			nis
279
			MODULE__GDBM=disabled
277
			_dbm _gdbm
280
			MODULE__DBM=disabled
278
			_sqlite3
281
			MODULE__SQLITE3=disabled
279
			_hashlib _ssl
282
			MODULE__HASHLIB=disabled
280
			_curses _curses_panel
283
			MODULE__SSL=disabled
281
			readline
284
			MODULE__CURSES=disabled
282
			_tkinter
285
			MODULE__CURSES_PANEL=disabled
283
			pyexpat
286
			MODULE_READLINE=disabled
284
			zlib
287
			MODULE__TKINTER=disabled
285
			# We disable these for CBUILD because Python's setup.py can't handle locating
288
			MODULE_PYEXPAT=disabled
286
			# libdir correctly for cross.
289
			MODULE_ZLIB=disabled
287
			_ctypes _crypt
290
		EOF
288
		EOF
289
		ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
291
290
292
		# Unfortunately, we do have to build this immediately, and
291
		# Unfortunately, we do have to build this immediately, and
293
		# not in src_compile, because CHOST configure for Python
292
		# not in src_compile, because CHOST configure for Python
294
		# will check the existence of the Python it was pointed to
293
		# will check the existence of the Python it was pointed to
295
		# immediately.
294
		# immediately.
296
		PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
295
		emake
297
		popd &> /dev/null || die
296
		popd &> /dev/null || die
298
	fi
297
	fi
299
298
300
- 

Return to bug 913596