summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-arch/unrar/Manifest1
-rw-r--r--app-arch/unrar/unrar-6.0.7.ebuild69
2 files changed, 70 insertions, 0 deletions
diff --git a/app-arch/unrar/Manifest b/app-arch/unrar/Manifest
index 40da7aa14f94..a1a4f7f9fe68 100644
--- a/app-arch/unrar/Manifest
+++ b/app-arch/unrar/Manifest
@@ -1,3 +1,4 @@
DIST unrar-6.0.4.tar.gz 232379 BLAKE2B 39382eeb71cafdeaa608ef497c44cd88d950d761e5c8395a224b2bdd530328a0060dec658aec943f9af8e135ce29cf86c3522ed17799f869cd0d84cbd7acc74a SHA512 9d2beb39fa0e3c60298b482967f1ae51d8a6531c88f5b8b053cc8905c033c0235cabb776d8449f9d96da6b81946167b84d19acdf93dda7ada14cc3c53bb7df19
DIST unrar-6.0.5.tar.gz 232702 BLAKE2B 8e33d116ae9de06818379f4303241dd7f44ba319619829d0eb2c9257b3fd27e473b636d40edd6049a1ff096ea722fee0a71bf145456923b2664087dbf7d4554d SHA512 cd6d9b316a2daf2f3f81b28b4d6054cbe7ca9a7e39087a5dc7e4c554e5d5590b395243f03f019bf358e127be48dd219e827fdb6af7543305a52c3f87f6e32dd7
DIST unrar-6.0.6.tar.gz 232874 BLAKE2B dd32f09167a641d7a63a2dc4979f6eb4462b1a16529e92fd0fb1e0e27f4eeb22e7ee15b96e7aa9d852db4dddd09d73efb53f2bcb2426e12612afa244f06f0387 SHA512 cb50cdde120c02461bb6618e4b8773a221982c5ba81309669001b9713fc14bedc42bc5a601f30a62674be7ffd5c674d51be285c02a468d6e3fe0ebc02da8bd8f
+DIST unrar-6.0.7.tar.gz 232903 BLAKE2B eba5179f622726046fabedac03e8c05f7dd2f64782dc0be18010deb22c1036b895cbb9429f44239e63d9c04f3e031b4f9787462f4f643f8bca11b135de08f547 SHA512 2c50d1f58f5189e59dad36eb25aa50a34572f583242e624846c9791c5609e83d4ee76314d785771fe514ec3378749dcb86e4c97a8d2a3ab7b469df49a5c5f412
diff --git a/app-arch/unrar/unrar-6.0.7.ebuild b/app-arch/unrar/unrar-6.0.7.ebuild
new file mode 100644
index 000000000000..451427685623
--- /dev/null
+++ b/app-arch/unrar/unrar-6.0.7.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs
+
+MY_PN="${PN}src"
+
+DESCRIPTION="Uncompress rar files"
+HOMEPAGE="https://www.rarlab.com/rar_add.htm"
+SRC_URI="https://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="unRAR"
+# subslot = soname version
+SLOT="0/6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
+
+RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417"
+
+S="${WORKDIR}/unrar"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.9.3-build.patch
+ "${FILESDIR}"/${PN}-5.5.5-honor-flags.patch
+)
+
+src_prepare() {
+ default
+
+ local sed_args=( -e "/libunrar/s:.so:$(get_libname ${PV%.*.*}):" )
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed_args+=( -e "s:-shared:-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/libunrar$(get_libname ${PV%.*.*}):" )
+ else
+ sed_args+=( -e "s:-shared:& -Wl,-soname -Wl,libunrar$(get_libname ${PV%.*.*}):" )
+ fi
+ sed -i "${sed_args[@]}" makefile || die
+}
+
+src_configure() {
+ mkdir -p build-{lib,bin} || die
+ printf 'VPATH = ..\ninclude ../makefile' > build-lib/Makefile || die
+ cp build-{lib,bin}/Makefile || die
+}
+
+src_compile() {
+ unrar_make() {
+ emake AR="$(tc-getAR)" CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
+ }
+
+ unrar_make CXXFLAGS+=" -fPIC" -C build-lib lib
+ ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname) || die
+ ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV}) || die
+
+ unrar_make -C build-bin
+}
+
+src_install() {
+ dobin build-bin/unrar
+ dodoc readme.txt
+
+ dolib.so build-lib/libunrar*
+
+ insinto /usr/include/libunrar${PV%.*.*}
+ doins *.hpp
+ dosym libunrar${PV%.*.*} /usr/include/libunrar
+
+ find "${ED}" -type f -name "*.a" -delete || die
+}