3 |
3 |
|
4 |
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
WX_GTK_VER="3.0-gtk3"
|
7 |
|
inherit multilib toolchain-funcs wrapper wxwidgets xdg
|
|
6 |
inherit multilib toolchain-funcs wrapper xdg
|
8 |
7 |
|
9 |
8 |
DESCRIPTION="Port of 7-Zip archiver for Unix"
|
10 |
|
HOMEPAGE="http://p7zip.sourceforge.net/"
|
11 |
|
SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
|
12 |
|
S="${WORKDIR}/${PN}_${PV}"
|
|
9 |
HOMEPAGE="https://github.com/p7zip-project/p7zip"
|
|
10 |
SRC_URI="https://github.com/p7zip-project/p7zip/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
11 |
#S="${WORKDIR}/${PN}-${PV}"
|
13 |
12 |
|
14 |
13 |
LICENSE="LGPL-2.1 rar? ( unRAR )"
|
15 |
14 |
SLOT="0"
|
16 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
17 |
|
IUSE="abi_x86_x32 kde +pch rar static wxwidgets"
|
18 |
|
REQUIRED_USE="kde? ( wxwidgets )"
|
|
15 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
|
|
16 |
IUSE="abi_x86_x32 natspec +pch rar static"
|
19 |
17 |
|
20 |
|
RDEPEND="wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
|
|
18 |
RDEPEND="natspec? ( dev-libs/libnatspec )"
|
21 |
19 |
DEPEND="${RDEPEND}"
|
22 |
20 |
BDEPEND="
|
23 |
21 |
abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
|
... | ... | |
25 |
23 |
x86? ( dev-lang/nasm )"
|
26 |
24 |
|
27 |
25 |
PATCHES=(
|
28 |
|
"${FILESDIR}"/${P}-darwin.patch
|
29 |
|
"${FILESDIR}"/CVE-2016-9296.patch
|
30 |
|
"${FILESDIR}"/CVE-2017-17969.patch
|
31 |
|
"${FILESDIR}"/CVE-2018-5996.patch
|
32 |
|
"${FILESDIR}"/CVE-2018-10115.patch
|
33 |
|
"${FILESDIR}"/WimHandler.cpp.patch
|
|
26 |
"${FILESDIR}/p7zip-17.05-unit64.patch"
|
34 |
27 |
)
|
35 |
28 |
|
36 |
29 |
src_prepare() {
|
37 |
30 |
default
|
38 |
31 |
|
|
32 |
if use natspec; then
|
|
33 |
eapply "${FILESDIR}"/${P}-natspec.patch
|
|
34 |
sed -i '/^LOCAL_LIBS/s/$/ -lnatspec/' makefile.* || die
|
|
35 |
fi
|
|
36 |
|
39 |
37 |
if ! use pch; then
|
40 |
38 |
sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
|
41 |
39 |
fi
|
... | ... | |
50 |
48 |
-i makefile* || die
|
51 |
49 |
|
52 |
50 |
# remove non-free RAR codec
|
53 |
|
if use rar; then
|
54 |
|
ewarn "Enabling nonfree RAR decompressor"
|
55 |
|
else
|
|
51 |
if ! use rar; then
|
56 |
52 |
sed \
|
57 |
53 |
-e '/Rar/d' \
|
58 |
54 |
-e '/RAR/d' \
|
... | ... | |
84 |
80 |
if use static; then
|
85 |
81 |
sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
|
86 |
82 |
fi
|
87 |
|
|
88 |
|
if use kde || use wxwidgets; then
|
89 |
|
setup-wxwidgets unicode
|
90 |
|
einfo "Preparing dependency list"
|
91 |
|
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" depend
|
92 |
|
fi
|
93 |
83 |
}
|
94 |
84 |
|
95 |
85 |
src_compile() {
|
96 |
86 |
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" all3
|
97 |
|
if use kde || use wxwidgets; then
|
98 |
|
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -- 7zG
|
99 |
|
fi
|
100 |
87 |
}
|
101 |
88 |
|
102 |
89 |
src_test() {
|
... | ... | |
109 |
96 |
make_wrapper 7za /usr/$(get_libdir)/p7zip/7za
|
110 |
97 |
make_wrapper 7z /usr/$(get_libdir)/p7zip/7z
|
111 |
98 |
|
112 |
|
if use kde || use wxwidgets; then
|
113 |
|
make_wrapper 7zG /usr/$(get_libdir)/p7zip/7zG
|
114 |
|
|
115 |
|
dobin GUI/p7zipForFilemanager
|
116 |
|
exeinto /usr/$(get_libdir)/p7zip
|
117 |
|
doexe bin/7zG
|
118 |
|
|
119 |
|
insinto /usr/$(get_libdir)/p7zip
|
120 |
|
doins -r GUI/Lang
|
121 |
|
|
122 |
|
insinto /usr/share/icons/hicolor/16x16/apps/
|
123 |
|
newins GUI/p7zip_16_ok.png p7zip.png
|
124 |
|
|
125 |
|
if use kde; then
|
126 |
|
rm GUI/kde4/p7zip_compress.desktop || die
|
127 |
|
insinto /usr/share/kservices5/ServiceMenus
|
128 |
|
doins GUI/kde4/*.desktop
|
129 |
|
fi
|
130 |
|
fi
|
131 |
|
|
132 |
99 |
dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
|
133 |
100 |
doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
|
134 |
101 |
|