summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2024-01-12 11:40:45 +0100
committerDavid Seifert <soap@gentoo.org>2024-01-12 11:40:45 +0100
commitc6226bf5686032af074d93cee08e657ff604c6fc (patch)
tree3ae8d1598a995fae905a862c0d7741fbf57503d5 /app-arch/unar
parentnet-im/slack: drop 4.36.134 (diff)
downloadgentoo-c6226bf5686032af074d93cee08e657ff604c6fc.tar.gz
gentoo-c6226bf5686032af074d93cee08e657ff604c6fc.tar.bz2
gentoo-c6226bf5686032af074d93cee08e657ff604c6fc.zip
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@gentoo.org>
Diffstat (limited to 'app-arch/unar')
-rw-r--r--app-arch/unar/unar-1.10.8.ebuild25
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"