forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-arch/unrar: Bump to version 5.6.1
Package-Manager: Portage-2.3.24, Repoman-2.3.6
- Loading branch information
Lars Wendler
committed
Mar 12, 2018
1 parent
0810fc3
commit 58e7c00
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST unrar-5.5.8.tar.gz 222285 BLAKE2B ec6317fc95674a3f282f92762ee89d2fd21d162a96b7b1ea29de9f4ab0ebf0bdb9c3e7141c7146d4bd2e570620db7d7850bc9a8c45a42ef745af1d75d4df5a71 SHA512 9eac83707fa47a03925e5f3e8adf47889064d748304b732d12a2d379ab525b441f1aa33216377d4ef445f45c4e8ad73d2cd0b560601ceac344c60571b77fd6aa | ||
DIST unrar-5.6.1.tar.gz 225408 BLAKE2B 1b4cef7b55dec0658d4eca09e9dc933ed1ad10d87dabe3626a01974bddb51dabf89c39f2db200cbe4388a682c0a756c720d116b9654e4539bfca1658396d0768 SHA512 62f37f9e3deb86651c92832190fa27a8e4490084c6a95f42e8a5f5668fbc7aafd9c273a2c60683c3534b614e0ca44b20d18598296f67edb0812850a50b807e77 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI="6" | ||
|
||
inherit eutils flag-o-matic multilib toolchain-funcs | ||
|
||
MY_PN=${PN}src | ||
|
||
DESCRIPTION="Uncompress rar files" | ||
HOMEPAGE="http://www.rarlab.com/rar_add.htm" | ||
SRC_URI="http://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="unRAR" | ||
# subslot = soname version | ||
SLOT="0/5" | ||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" | ||
IUSE="" | ||
|
||
RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417" | ||
|
||
S=${WORKDIR}/unrar | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-5.5.5-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} | ||
printf 'VPATH = ..\ninclude ../makefile' > build-lib/Makefile || die | ||
cp build-{lib,bin}/Makefile || die | ||
} | ||
|
||
src_compile() { | ||
unrar_make() { | ||
emake 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 | ||
} |