summaryrefslogtreecommitdiff
path: root/app-arch/unrar
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/unrar')
-rw-r--r--app-arch/unrar/Manifest2
-rw-r--r--app-arch/unrar/unrar-7.1.6.ebuild79
2 files changed, 81 insertions, 0 deletions
diff --git a/app-arch/unrar/Manifest b/app-arch/unrar/Manifest
index 306dd062b111..1786295285d0 100644
--- a/app-arch/unrar/Manifest
+++ b/app-arch/unrar/Manifest
@@ -2,7 +2,9 @@ AUX unrar-6.2.6-honor-flags.patch 1238 BLAKE2B 3006316800d6933f85935b0d1d4a224ae
DIST unrar-7.1.3.tar.gz 266820 BLAKE2B c18f9ef0208c893a6c4ff1ac0df7abcd54216f2f6341a08083af695729cba6773ee1de74af8b0fc1fce94e90ce1cbbf14fbe34ad0c8f1a3dcd6a3598b978c706 SHA512 210a4c65e5c3f3a3f9561a8fab805b6a6a182ac6274f8671d22020076873952b92cb8cc2523943df20a97ed01415b38e2bb59082f03dd5f7da0d6e85dc9193d4
DIST unrar-7.1.4.tar.gz 267194 BLAKE2B 926d45f61877878a8a7c998717526e8b10b70c6832b3761a6af6f4897f00c6edfd946b51b9a8e471affbb7e79dc166a952057f08aca9d128a18397446b8b767c SHA512 f1a9485f9d9bb7bb87779cfd442114c22c316423771d644251688e631232b516ee800bbf9bfecde53c429cb1a121b3de57e230f3fc08c27784d60d5587516d38
DIST unrar-7.1.5.tar.gz 267528 BLAKE2B ec3720159f0c4873b839c63d92f062a73073589d130a6caf189c2d958aacd50f5a8b044fffcf87abe44bb5904e1682ce61d6eaa6b259978dc3ad6cc4900afc17 SHA512 378bd29e6c89d7a11891947967f8235db4690155c91af7b6da0ef3dac4ead34fa5818ead997e3068929b2a4f0f26eb29c0febb41ef093a771eea63ab00e0c36d
+DIST unrar-7.1.6.tar.gz 267638 BLAKE2B 29940a5219b40ef6385c3dfb142c34c08560f42915e2fba91a9a61d0166fbfaf6048672c31755fb5e734b3cc609156e5b06712213334780e3b8a1d4e43dfd42d SHA512 b56213d7df87970da66170d1bae7baffc591169b80db06d2dfd0d07644f467b252d6623aa153684b360ce9a092e93a5560330f7b9c14dd3ff7269741b17bb90c
EBUILD unrar-7.1.3.ebuild 2685 BLAKE2B a7657a6f8e212ba7f47ad2f86b48dffdbdfab49d7ad39a48d161b38ff1efbc482867fa0c23db1345c2886261085ff8541d84b10c45b36fff1f1e8597e6bea29a SHA512 fdf55c67b755414266c9aac0a404eca492628c3dc5c2e1710469957fca6f92df3819122036c717b73b0407f6d06d24f6f3ca7f9da64a3483994f5d81c1b7a6c1
EBUILD unrar-7.1.4.ebuild 2692 BLAKE2B 58d0bcbcbce6b804451fb164b8e506f9616a0bc0973e42a44adaeef548693d57d10e29d785847bfa210dc1405885c894bce22c7b35681e35e03289d83c497964 SHA512 0469a38a37bbd984c636467d8779a447474789213e3dfd99c0d494a7d64324a0ddaccf8f0ddba6950ca4442944a593f7ee9375bed65b00cde614ada8faed82bd
EBUILD unrar-7.1.5.ebuild 2692 BLAKE2B 58d0bcbcbce6b804451fb164b8e506f9616a0bc0973e42a44adaeef548693d57d10e29d785847bfa210dc1405885c894bce22c7b35681e35e03289d83c497964 SHA512 0469a38a37bbd984c636467d8779a447474789213e3dfd99c0d494a7d64324a0ddaccf8f0ddba6950ca4442944a593f7ee9375bed65b00cde614ada8faed82bd
+EBUILD unrar-7.1.6.ebuild 2692 BLAKE2B 58d0bcbcbce6b804451fb164b8e506f9616a0bc0973e42a44adaeef548693d57d10e29d785847bfa210dc1405885c894bce22c7b35681e35e03289d83c497964 SHA512 0469a38a37bbd984c636467d8779a447474789213e3dfd99c0d494a7d64324a0ddaccf8f0ddba6950ca4442944a593f7ee9375bed65b00cde614ada8faed82bd
MISC metadata.xml 520 BLAKE2B d8b7da005139f02d8fdb948cb6e2c6af4073fab248ee05e80aaf4c706d9213a7600010b89b3ad99e89cbb651caf647dc898373225315ec1dc2c6f5a51424fa8a SHA512 65e6387fe9ecb267f630480287bfb4376c16b1d8088fa4f2078a747d53210ea92ef3ff03f05fdbcadf97af71e47a691f19425573b0b630b5c7640caab2ca890a
diff --git a/app-arch/unrar/unrar-7.1.6.ebuild b/app-arch/unrar/unrar-7.1.6.ebuild
new file mode 100644
index 000000000000..355f68e21b19
--- /dev/null
+++ b/app-arch/unrar/unrar-7.1.6.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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"
+S="${WORKDIR}/unrar"
+
+LICENSE="unRAR"
+SLOT="0/7" # subslot = soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+PATCHES=( "${FILESDIR}/${PN}-6.2.6-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*
+
+ # unrar doesn't officially install headers, but unofficially, software
+ # depends on it anyway. There is no standard for where to install them,
+ # but the most common location (shared by nearly all vendors) is "unrar".
+ # FreeBSD alone uses "libunrar". Gentoo formerly used "libunrar6" and
+ # had a compat symlink for FreeBSD, then passed the compat location in
+ # ./configure scripts e.g. for sys-fs/rar2fs. Software in the wild
+ # seems to expect either "unrar" or "libunrar".
+ # See: https://bugs.gentoo.org/916036
+ #
+ # We now use the "standard" (hah) location, and keep the compat symlink but
+ # change the destination. The version-suffixed location lacks utility, but
+ # we would keep it if we could, just in case -- unfortunately portage is
+ # buggy: https://bugs.gentoo.org/834600
+ #
+ # Hopefully, no one has ever actually used it and therefore this does not
+ # matter. The odds are on our side, since it periodically changed location
+ # arbitrarily.
+ insinto /usr/include/unrar
+ doins *.hpp
+ dosym unrar /usr/include/libunrar
+
+ find "${ED}" -type f -name "*.a" -delete || die
+}