1 |
commit: 0e3dd41a3f75ddaf3626773d70f636813b7c4b1f |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 25 17:20:11 2016 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 25 17:21:42 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e3dd41a |
7 |
|
8 |
app-arch/p7zip: fixing bug 575622 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
app-arch/p7zip/p7zip-15.09-r1.ebuild | 161 +++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 161 insertions(+) |
14 |
|
15 |
diff --git a/app-arch/p7zip/p7zip-15.09-r1.ebuild b/app-arch/p7zip/p7zip-15.09-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..8ca5177 |
18 |
--- /dev/null |
19 |
+++ b/app-arch/p7zip/p7zip-15.09-r1.ebuild |
20 |
@@ -0,0 +1,161 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+WX_GTK_VER="3.0" |
28 |
+ |
29 |
+inherit eutils multilib toolchain-funcs wxwidgets |
30 |
+ |
31 |
+DESCRIPTION="Port of 7-Zip archiver for Unix" |
32 |
+HOMEPAGE="http://p7zip.sourceforge.net/" |
33 |
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2" |
34 |
+ |
35 |
+LICENSE="LGPL-2.1 rar? ( unRAR )" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" |
38 |
+IUSE="doc kde rar +pch static wxwidgets abi_x86_x32" |
39 |
+ |
40 |
+REQUIRED_USE="kde? ( wxwidgets )" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ kde? ( x11-libs/wxGTK:${WX_GTK_VER}[X] kde-base/kdelibs ) |
44 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )" |
45 |
+DEPEND="${RDEPEND} |
46 |
+ amd64? ( dev-lang/yasm ) |
47 |
+ abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 ) |
48 |
+ x86? ( dev-lang/nasm )" |
49 |
+ |
50 |
+S=${WORKDIR}/${PN}_${PV} |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ epatch \ |
54 |
+ "${FILESDIR}"/${P}-CVE-2015-1038.patch |
55 |
+ |
56 |
+ if ! use pch; then |
57 |
+ sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die |
58 |
+ fi |
59 |
+ |
60 |
+ sed \ |
61 |
+ -e 's:-m32 ::g' \ |
62 |
+ -e 's:-m64 ::g' \ |
63 |
+ -e 's:-pipe::g' \ |
64 |
+ -e "/^CXX=/s:g++:$(tc-getCXX):" \ |
65 |
+ -e "/^CC=/s:gcc:$(tc-getCC):" \ |
66 |
+ -e '/ALLFLAGS/s:-s ::' \ |
67 |
+ -e "/OPTFLAGS=/s:=.*:=${CXXFLAGS}:" \ |
68 |
+ -i makefile* || die |
69 |
+ |
70 |
+ # remove non-free RAR codec |
71 |
+ if use rar; then |
72 |
+ ewarn "Enabling nonfree RAR decompressor" |
73 |
+ else |
74 |
+ sed \ |
75 |
+ -e '/Rar/d' \ |
76 |
+ -e '/RAR/d' \ |
77 |
+ -i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die |
78 |
+ rm -rf CPP/7zip/Compress/Rar || die |
79 |
+ fi |
80 |
+ |
81 |
+ if use abi_x86_x32; then |
82 |
+ sed -i -e "/^ASM=/s:amd64:x32:" makefile* || die |
83 |
+ cp -f makefile.linux_amd64_asm makefile.machine || die |
84 |
+ elif use amd64; then |
85 |
+ cp -f makefile.linux_amd64_asm makefile.machine || die |
86 |
+ elif use x86; then |
87 |
+ cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die |
88 |
+ elif [[ ${CHOST} == *-darwin* ]] ; then |
89 |
+ # Mac OS X needs this special makefile, because it has a non-GNU linker |
90 |
+ [[ ${CHOST} == *64-* ]] \ |
91 |
+ && cp -f makefile.macosx_64bits makefile.machine \ |
92 |
+ || cp -f makefile.macosx_32bits makefile.machine |
93 |
+ # bundles have extension .bundle but don't die because USE=-rar |
94 |
+ # removes the Rar directory |
95 |
+ sed -i -e '/strcpy(name/s/\.so/.bundle/' \ |
96 |
+ CPP/Windows/DLL.cpp || die |
97 |
+ sed -i -e '/^PROG=/s/\.so/.bundle/' \ |
98 |
+ CPP/7zip/Bundles/Format7zFree/makefile \ |
99 |
+ $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die |
100 |
+ elif use x86-fbsd; then |
101 |
+ # FreeBSD needs this special makefile, because it hasn't -ldl |
102 |
+ sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine |
103 |
+ fi |
104 |
+ |
105 |
+ if use static; then |
106 |
+ sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die |
107 |
+ fi |
108 |
+ |
109 |
+ if use kde || use wxwidgets; then |
110 |
+ need-wxwidgets unicode |
111 |
+ einfo "Preparing dependency list" |
112 |
+ emake depend |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+src_compile() { |
117 |
+ emake all3 |
118 |
+ if use kde || use wxwidgets; then |
119 |
+ emake -- 7zG |
120 |
+# emake -- 7zFM |
121 |
+ fi |
122 |
+} |
123 |
+ |
124 |
+src_test() { |
125 |
+ emake test test_7z test_7zr |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ # this wrappers can not be symlinks, p7zip should be called with full path |
130 |
+ make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr" |
131 |
+ make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za" |
132 |
+ make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z" |
133 |
+ |
134 |
+ if use kde || use wxwidgets; then |
135 |
+ make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG" |
136 |
+# make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM" |
137 |
+ |
138 |
+# make_desktop_entry 7zFM "${PN} FM" ${PN} "GTK;Utility;Archiving;Compression" |
139 |
+ |
140 |
+ dobin GUI/p7zipForFilemanager |
141 |
+ exeinto /usr/$(get_libdir)/${PN} |
142 |
+# doexe bin/7z{G,FM} |
143 |
+ doexe bin/7zG |
144 |
+ |
145 |
+ insinto /usr/$(get_libdir)/${PN} |
146 |
+ doins -r GUI/{Lang,help} |
147 |
+ |
148 |
+ insinto /usr/share/icons/hicolor/16x16/apps/ |
149 |
+ newins GUI/p7zip_16_ok.png p7zip.png |
150 |
+ |
151 |
+ if use kde; then |
152 |
+ rm GUI/kde4/p7zip_compress.desktop || die |
153 |
+ insinto /usr/share/kde4/services/ServiceMenus |
154 |
+ doins GUI/kde4/*.desktop |
155 |
+ dodir /usr/local/share/kservices5/ServiceMenus |
156 |
+ for item in "${D}"/usr/share/kde4/services/ServiceMenus/*.desktop; do |
157 |
+ item="$(basename ${item})" |
158 |
+ dosym "/usr/share/kde4/services/ServiceMenus/${item}" "/usr/local/share/kservices5/ServiceMenus/${item}" |
159 |
+ done |
160 |
+ fi |
161 |
+ fi |
162 |
+ |
163 |
+ dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip |
164 |
+ doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 |
165 |
+ |
166 |
+ exeinto /usr/$(get_libdir)/${PN} |
167 |
+ doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx |
168 |
+ doexe bin/*$(get_modname) |
169 |
+ if use rar; then |
170 |
+ exeinto /usr/$(get_libdir)/${PN}/Codecs/ |
171 |
+ doexe bin/Codecs/*$(get_modname) |
172 |
+ fi |
173 |
+ |
174 |
+ doman man1/7z.1 man1/7za.1 man1/7zr.1 |
175 |
+ dodoc ChangeLog README TODO |
176 |
+ |
177 |
+ if use doc; then |
178 |
+ dodoc DOC/*.txt |
179 |
+ dohtml -r DOC/MANUAL/* |
180 |
+ fi |
181 |
+} |