diff options
Diffstat (limited to 'app-arch/unar/unar-1.10.8.ebuild')
-rw-r--r-- | app-arch/unar/unar-1.10.8.ebuild | 25 |
1 files changed, 25 insertions, 0 deletions
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" |