Lines 20-26
S="${WORKDIR}/${MY_P}"
Link Here
|
20 |
LICENSE="PSF-2" |
20 |
LICENSE="PSF-2" |
21 |
SLOT="${PYVER}" |
21 |
SLOT="${PYVER}" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
23 |
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
23 |
IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml" |
24 |
RESTRICT="!test? ( test )" |
24 |
RESTRICT="!test? ( test )" |
25 |
|
25 |
|
26 |
# Do not add a dependency on dev-lang/python to this ebuild. |
26 |
# Do not add a dependency on dev-lang/python to this ebuild. |
Lines 123-133
src_configure() {
Link Here
|
123 |
use hardened && replace-flags -O3 -O2 |
123 |
use hardened && replace-flags -O3 -O2 |
124 |
fi |
124 |
fi |
125 |
|
125 |
|
126 |
# https://bugs.gentoo.org/700012 |
|
|
127 |
if is-flagq -flto || is-flagq '-flto=*'; then |
128 |
append-cflags $(test-flags-CC -ffat-lto-objects) |
129 |
fi |
130 |
|
131 |
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
126 |
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
132 |
tc-export CXX |
127 |
tc-export CXX |
133 |
|
128 |
|
Lines 161-167
src_configure() {
Link Here
|
161 |
--without-ensurepip |
156 |
--without-ensurepip |
162 |
--with-system-expat |
157 |
--with-system-expat |
163 |
--with-system-ffi |
158 |
--with-system-ffi |
|
|
159 |
$(use_with lto) |
164 |
) |
160 |
) |
|
|
161 |
if use pgo; then |
162 |
myeconfarg+=("--enable-optimizations") |
163 |
fi |
165 |
|
164 |
|
166 |
OPT="" econf "${myeconfargs[@]}" |
165 |
OPT="" econf "${myeconfargs[@]}" |
167 |
} |
166 |
} |
Lines 170-178
src_compile() {
Link Here
|
170 |
# Ensure sed works as expected |
169 |
# Ensure sed works as expected |
171 |
# https://bugs.gentoo.org/594768 |
170 |
# https://bugs.gentoo.org/594768 |
172 |
local -x LC_ALL=C |
171 |
local -x LC_ALL=C |
173 |
|
172 |
|
174 |
emake CPPFLAGS= CFLAGS= LDFLAGS= |
173 |
if use pgo; then |
175 |
|
174 |
emake profile-opt PROFILE_TASK="-m test.regrtest --pgo -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio test_compileall test_pyexpat test_runpy test_support test_threaded_import test_xmlrpc_net test___all__ test_argparse test_asyncore test_contextlib_async test_devpoll test_httplib test_kqueue test_msilib test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_nis test_nntplib test_normalization test_ntpath test_os test_ossaudiodev test_robotparser test_shutil test_site test_smtpnet test_socket test_ssl test_startfile test_timeout test_tix test_tk test_tools test_ttk_guionly test_ttk_textonly test_unicodedata test_urllib2 test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_zipfile64 test_zipimport" |
|
|
175 |
else |
176 |
emake CPPFLAGS= CFLAGS= LDFLAGS= |
177 |
fi |
176 |
# Work around bug 329499. See also bug 413751 and 457194. |
178 |
# Work around bug 329499. See also bug 413751 and 457194. |
177 |
if has_version dev-libs/libffi[pax_kernel]; then |
179 |
if has_version dev-libs/libffi[pax_kernel]; then |
178 |
pax-mark E python |
180 |
pax-mark E python |