--- /var/db/repos/gentoo/media-gfx/gimp/gimp-2.10.32.ebuild 2022-06-15 23:10:24.000000000 +0200 +++ /var/db/repos/local/media-gfx/gimp-2.10.32.ebuild 2022-06-16 10:09:21.046292955 +0200 @@ -55,7 +55,7 @@ openexr? ( >=media-libs/openexr-1.6.1:= ) postscript? ( app-text/ghostscript-gpl ) udev? ( dev-libs/libgudev:= ) - unwind? ( >=sys-libs/libunwind-1.1.0:= ) + unwind? ( || ( >=sys-libs/libunwind-1.1.0 >=sys-libs/llvm-libunwind-12.0.0 ) ) webp? ( >=media-libs/libwebp-0.6.0:= ) wmf? ( >=media-libs/libwmf-0.2.8 ) xpm? ( x11-libs/libXpm )
In terms of the || () dep, that's wrong because of https://bugs.gentoo.org/791349#c16. But indeed we can add a USE=llvm-unwind or something.
The addition of REQUIRED_USE="unwind?( !llvm-unwind )" results in src_configure problem where "$(use_with unwind libunwind)" will always overwrite the above "$(use_with llvm-unwind libunwind)". But even if forced to drop this conflict then llvm-libunwind couldn't be easily used because of absence of /usr/lib{,64}/pkgconfig/libunwind.pc and other *.pc files that didn't provided by llvm-libunwind. It just can't be found by gimp build script.
(In reply to Sergey Torokhov from comment #2) > The addition of REQUIRED_USE="unwind?( !llvm-unwind )" results in > src_configure problem where "$(use_with unwind libunwind)" will always > overwrite the above "$(use_with llvm-unwind libunwind)". > > But even if forced to drop this conflict then llvm-libunwind couldn't be > easily used because of absence of /usr/lib{,64}/pkgconfig/libunwind.pc and > other *.pc files that didn't provided by llvm-libunwind. It just can't be > found by gimp build script. i've built gimp with current llvm-libunwind
I checked for llvm-libunwind-13.0.1. I will try to recheck with 14.0.4. But anyway gimp build script uses pkgconfig to find libunwind(.pc) and some backtrace implementation that were not provided by llvm-libunwind-13.0.1. The libunwind provides ptrace and others "tools". Are you sure that gimp really found unwind imlementation and didn't disable this feature on checking? You could check the configure phase log for LIBUNWIND status while build Gimp with installed llvm-libunwind. Imho, additional (maybe conditional) patching of configure.ac is required to force using this library without use of pkgconfig. Although this can't guarantee the success due to possible differences between libraries.