dev-python/pillow: respect MAKEOPTS

This works around a crash in pybind11 on 32-bit arches (at least ppc and
x86) where various processes get spawned, then hit:
```
pillow.80008:mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory)
pillow.80009:mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory)
pillow.80010:mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory)
...
```

We want to do this anyway to respect the user's chosen parallelism, of
course.

Bug: https://bugs.gentoo.org/970414
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-04-05 22:56:20 +01:00
parent 24b82c8361
commit cb65fc1ec2
2 changed files with 4 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE='tk?,threads(+)'
inherit distutils-r1 toolchain-funcs virtualx
inherit distutils-r1 multiprocessing toolchain-funcs virtualx
MY_PN=Pillow
MY_P=${MY_PN}-${PV}
@@ -101,6 +101,7 @@ python_configure_all() {
[build_ext]
debug = True
disable_platform_guessing = True
parallel = $(get_makeopts_jobs)
$(usepil avif)_avif = True
$(usepil truetype)_freetype = True
$(usepil jpeg)_jpeg = True

View File

@@ -9,7 +9,7 @@ DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE='tk?,threads(+)'
inherit distutils-r1 toolchain-funcs virtualx
inherit distutils-r1 multiprocessing toolchain-funcs virtualx
MY_PN=Pillow
MY_P=${MY_PN}-${PV}
@@ -101,6 +101,7 @@ python_configure_all() {
[build_ext]
debug = True
disable_platform_guessing = True
parallel = $(get_makeopts_jobs)
$(usepil avif)_avif = True
$(usepil truetype)_freetype = True
$(usepil jpeg)_jpeg = True