sys-kernel/vanilla-sources: Automated version bump to 5.5.9 - remove old.
[gentoo.git] / app-arch / unar / unar-1.10.6.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit bash-completion-r1 toolchain-funcs
7
8 DESCRIPTION="Unpacker for various archiving formats, e.g. rar v3"
9 HOMEPAGE="https://unarchiver.c3.cx/"
10 SRC_URI="
11         https://github.com/MacPaw/XADMaster/archive/v${PV}/XADMaster-${PV}.tar.gz
12         https://github.com/MacPaw/universal-detector/archive/1.1/universal-detector-1.1.tar.gz
13 "
14
15 LICENSE="LGPL-2.1"
16 SLOT="0"
17 KEYWORDS="~amd64"
18
19 BDEPEND="
20         sys-devel/gcc[objc]
21 "
22 RDEPEND="
23         app-arch/bzip2:=
24         dev-libs/icu:=
25         gnustep-base/gnustep-base
26         media-sound/wavpack
27         sys-libs/zlib
28 "
29 DEPEND="${RDEPEND}
30         ${BDEPEND}
31         gnustep-base/gnustep-make[native-exceptions]
32 "
33
34 S="${WORKDIR}/XADMaster-${PV}"
35
36 src_prepare() {
37         default
38         # avoid jobserver warning "make[1]: warning: jobserver unavailable: using -j1"
39         sed -i -e 's:make:$(MAKE):g' Makefile.linux || die
40         mv "${WORKDIR}/universal-detector-1.1" "${WORKDIR}/UniversalDetector" || die
41 }
42
43 src_compile() {
44         emake -f Makefile.linux \
45                 AR="$(tc-getAR)" \
46                 CC="$(tc-getCC)" \
47                 CXX="$(tc-getCXX)" \
48                 OBJCC="$(tc-getCC)" \
49                 CFLAGS="${CFLAGS}" \
50                 CXXFLAGS="${CXXFLAGS}" \
51                 OBJCFLAGS="${CFLAGS}" \
52                 LD="$(tc-getCXX)" \
53                 LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime ${LDFLAGS}"
54 }
55
56 src_install() {
57         dobin {ls,un}ar
58         doman Extra/{ls,un}ar.1
59         dobashcomp Extra/{ls,un}ar.bash_completion
60 }