commit: c6226bf5686032af074d93cee08e657ff604c6fc Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Fri Jan 12 10:40:45 2024 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Fri Jan 12 10:40:45 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6226bf5
app-arch/unar: check ObjC toolchain support Bug: https://bugs.gentoo.org/732846 Bug: https://bugs.gentoo.org/802813 Signed-off-by: David Seifert <soap <AT> gentoo.org> app-arch/unar/unar-1.10.8.ebuild | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app-arch/unar/unar-1.10.8.ebuild b/app-arch/unar/unar-1.10.8.ebuild index 8192fdaf82b2..2470dc335445 100644 --- a/app-arch/unar/unar-1.10.8.ebuild +++ b/app-arch/unar/unar-1.10.8.ebuild @@ -25,9 +25,34 @@ RDEPEND=" DEPEND=" ${RDEPEND} gnustep-base/gnustep-make[native-exceptions]" +BDEPEND=" + || ( + sys-devel/gcc[objc] + gnustep-base/gnustep-make[libobjc2] + )" PATCHES=( "${FILESDIR}"/${P}-Wint-conversion.patch ) +check_objc_toolchain() { + if tc-is-gcc; then + has_version 'sys-devel/gcc[-objc]' && + die "GCC requires sys-devel/gcc with USE=objc" + elif tc-is-clang; then + has_version 'gnustep-base/gnustep-make[-libobjc2]' && + die "Clang requires gnustep-base/gnustep-make with USE=libobjc2" + else + die "${PN} can only be build using GCC or Clang" + fi +} + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && check_objc_toolchain +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && check_objc_toolchain +} + src_prepare() { default # avoid jobserver warning "make[1]: warning: jobserver unavailable: using -j1"