mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-02 23:48:17 -07:00
app-arch/unrar: add 7.1.7
Signed-off-by: Joe Kappus <joe@wt.gd> Part-of: https://github.com/gentoo/gentoo/pull/42657 Closes: https://github.com/gentoo/gentoo/pull/42657 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST unrar-7.1.5.tar.gz 267528 BLAKE2B ec3720159f0c4873b839c63d92f062a73073589d130a6caf189c2d958aacd50f5a8b044fffcf87abe44bb5904e1682ce61d6eaa6b259978dc3ad6cc4900afc17 SHA512 378bd29e6c89d7a11891947967f8235db4690155c91af7b6da0ef3dac4ead34fa5818ead997e3068929b2a4f0f26eb29c0febb41ef093a771eea63ab00e0c36d
|
||||
DIST unrar-7.1.6.tar.gz 267638 BLAKE2B 29940a5219b40ef6385c3dfb142c34c08560f42915e2fba91a9a61d0166fbfaf6048672c31755fb5e734b3cc609156e5b06712213334780e3b8a1d4e43dfd42d SHA512 b56213d7df87970da66170d1bae7baffc591169b80db06d2dfd0d07644f467b252d6623aa153684b360ce9a092e93a5560330f7b9c14dd3ff7269741b17bb90c
|
||||
DIST unrar-7.1.7.tar.gz 267949 BLAKE2B 43b3b51b90b45bcea6afa273476cabbff8cca46d191612d015f55a58d8abf03aa9361ba5114afd981adc1e03a026dbeca3745933ddbfde7ad65618bfac470521 SHA512 852be9336e64fe99e40b6bb332043356fc8f97eadccaa2f29169b69debd96d0effefbad3a707e7953d562f59ddffe7707ec546a98d118724670a9421bfc155a6
|
||||
|
||||
79
app-arch/unrar/unrar-7.1.7.ebuild
Normal file
79
app-arch/unrar/unrar-7.1.7.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user