Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/unrar/
Date: Fri, 02 Dec 2022 03:38:20
Message-Id: 1669952211.9c75c91b8a8d477e1bc2196bdef03c22d20f2db8.sam@gentoo
1 commit: 9c75c91b8a8d477e1bc2196bdef03c22d20f2db8
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 2 03:36:27 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 2 03:36:51 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c75c91b
7
8 app-arch/unrar: add 6.2.2
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-arch/unrar/Manifest | 1 +
13 app-arch/unrar/unrar-6.2.2.ebuild | 65 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 66 insertions(+)
15
16 diff --git a/app-arch/unrar/Manifest b/app-arch/unrar/Manifest
17 index 2d3b4bc578c9..e1287c04f3f5 100644
18 --- a/app-arch/unrar/Manifest
19 +++ b/app-arch/unrar/Manifest
20 @@ -1,2 +1,3 @@
21 DIST unrar-6.1.7.tar.gz 236798 BLAKE2B e33a7500b4a03a54f84b018ab90934366f52ef54c83257ed7fe4419ba993d2a8c21de26f445ae18d870aa5232cfbf1f5d8fbc0b3965803aeec6cac5e5a38e949 SHA512 b1a95358ff66b0e049597bbc4e1786d0bc909a8aff4aca94ee793d0d5a3c8b052eb347d88f44b6bc2e6231e777f1b711c198711118ae9ffbe8db2f72e7fbe846
22 DIST unrar-6.2.1.tar.gz 242918 BLAKE2B 55cd5d11caae2e6cef2a36f5656b76d96946d6d7df3f34d7c65cc31b43b820d955da4751666797f8147c6a7b20c3429527b2b1629842334d3bec6de49e1d6a72 SHA512 920819b4b3e76004492813b4c22309443976fe5e7c873032bc084603b902c6873775cb90cb173d78de3624a3161a2238c9ece1e817f6b7d915937e2e18d8def9
23 +DIST unrar-6.2.2.tar.gz 243051 BLAKE2B 3f76476d8cfd2fb56c6d98c8a5698c7dbdba518566384051f5b645fc5e0661ec662aeee713641cf180819984c6e1d3a44f16d8afa0c99d95ae8007916feb82ea SHA512 8edc659599f9e7a325e7db0ffdf57775295880c4368c4b37881390e0633b1f41d66799263e7cb85cc658e395b6eb0ff9e495aa0fd870b971422c4369a2e6c1b5
24
25 diff --git a/app-arch/unrar/unrar-6.2.2.ebuild b/app-arch/unrar/unrar-6.2.2.ebuild
26 new file mode 100644
27 index 000000000000..e38b27b24a93
28 --- /dev/null
29 +++ b/app-arch/unrar/unrar-6.2.2.ebuild
30 @@ -0,0 +1,65 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +inherit multilib toolchain-funcs
37 +
38 +MY_PN="${PN}src"
39 +
40 +DESCRIPTION="Uncompress rar files"
41 +HOMEPAGE="https://www.rarlab.com/rar_add.htm"
42 +SRC_URI="https://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
43 +S="${WORKDIR}/unrar"
44 +
45 +LICENSE="unRAR"
46 +SLOT="0/6" # subslot = soname version
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
48 +
49 +PATCHES=(
50 + "${FILESDIR}"/${PN}-5.9.3-build.patch
51 + "${FILESDIR}"/${PN}-5.5.5-honor-flags.patch
52 +)
53 +
54 +src_prepare() {
55 + default
56 +
57 + local sed_args=( -e "/libunrar/s:.so:$(get_libname ${PV%.*.*}):" )
58 + if [[ ${CHOST} == *-darwin* ]] ; then
59 + sed_args+=( -e "s:-shared:-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/libunrar$(get_libname ${PV%.*.*}):" )
60 + else
61 + sed_args+=( -e "s:-shared:& -Wl,-soname -Wl,libunrar$(get_libname ${PV%.*.*}):" )
62 + fi
63 + sed -i "${sed_args[@]}" makefile || die
64 +}
65 +
66 +src_configure() {
67 + mkdir -p build-{lib,bin} || die
68 + printf 'VPATH = ..\ninclude ../makefile' > build-lib/Makefile || die
69 + cp build-{lib,bin}/Makefile || die
70 +}
71 +
72 +src_compile() {
73 + unrar_make() {
74 + emake AR="$(tc-getAR)" CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
75 + }
76 +
77 + unrar_make CXXFLAGS+=" -fPIC" -C build-lib lib
78 + ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname) || die
79 + ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV}) || die
80 +
81 + unrar_make -C build-bin
82 +}
83 +
84 +src_install() {
85 + dobin build-bin/unrar
86 + dodoc readme.txt
87 +
88 + dolib.so build-lib/libunrar*
89 +
90 + insinto /usr/include/libunrar${PV%.*.*}
91 + doins *.hpp
92 + dosym libunrar${PV%.*.*} /usr/include/libunrar
93 +
94 + find "${ED}" -type f -name "*.a" -delete || die
95 +}