Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/p7zip/, app-arch/p7zip/files/
Date: Wed, 28 Oct 2015 13:44:26
Message-Id: 1446039849.2b72affac85585328eb48f5933ea13345aa733bf.jlec@gentoo
1 commit: 2b72affac85585328eb48f5933ea13345aa733bf
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 28 13:44:09 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 28 13:44:09 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b72affa
7
8 app-arch/p7zip: Version Bump
9
10 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=564266
11
12 Package-Manager: portage-2.2.23
13 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
14
15 app-arch/p7zip/Manifest | 1 +
16 .../p7zip/files/p7zip-15.09-CVE-2015-1038.patch | 284 +++++++++++++++++++++
17 app-arch/p7zip/p7zip-15.09.ebuild | 158 ++++++++++++
18 3 files changed, 443 insertions(+)
19
20 diff --git a/app-arch/p7zip/Manifest b/app-arch/p7zip/Manifest
21 index 44c4c61..9b0a188 100644
22 --- a/app-arch/p7zip/Manifest
23 +++ b/app-arch/p7zip/Manifest
24 @@ -1,2 +1,3 @@
25 +DIST p7zip_15.09_src_all.tar.bz2 4048481 SHA256 8783acf747e210e00150f7311cc06c4cd8ecf7b0c27b4adf2194284cc49b4d6f SHA512 4f020b13632ef7a85aa8a98586b59bef2dde3c1cbebdbd17e01f1d09b2e13a56ecfe82546d7efc677c45df67456a71cfdb67826b53ebea4c0fb4878f20c2f6dd WHIRLPOOL 71d1cdb9b3b1208197b2c056670d057b00e9a5f80cf08b5914b5d25f2f6756d4cb53e5a000ec76b7b879f82302fca6d012a2cd397e8aa95ae4fc21fd620eb1ab
26 DIST p7zip_9.20.1_src_all.tar.bz2 3835235 SHA256 49557e7ffca08100f9fc687f4dfc5aea703ca207640c76d9dee7b66f03cb4782 SHA512 7bb8a276aaefc4a83364e45633c48527de44c6b1205344f3356db570582f30f81d82a94938c99a7ad193587b584cc1c03219c28249de40018bdaee6c3b2a022a WHIRLPOOL cb20f37d3f796931a9b330728aa7148afe98bbf8a49bb91bfd80e4667c16416206b23bf34298e9ec37825e8b43f92a5710f0cea1f974296d5c17aa2c7b0931f3
27 DIST p7zip_9.38.1_src_all.tar.bz2 3917925 SHA256 fd5019109c9a1bf34ad3257d37a6853eae8151ff50345f0a3ffba7d8c5fdb995 SHA512 f524ffae54e0d9563a509cc4b243e830d882a925e682eb2e15e2d19cb72c947fddecd72c8507d6c1538b997b240b0827046fc2fb4f5e3f7d49840257c92b9c04 WHIRLPOOL 6bad1cde056ab1e8db4079c0e649665fbc7e6b9a565261188bd0acaec6c583d8bd9425cb26d39315408d0180ba0be0069a77b704633cf05ec855220cb31f1c24
28
29 diff --git a/app-arch/p7zip/files/p7zip-15.09-CVE-2015-1038.patch b/app-arch/p7zip/files/p7zip-15.09-CVE-2015-1038.patch
30 new file mode 100644
31 index 0000000..dc81317
32 --- /dev/null
33 +++ b/app-arch/p7zip/files/p7zip-15.09-CVE-2015-1038.patch
34 @@ -0,0 +1,284 @@
35 + CPP/7zip/UI/Agent/Agent.cpp | 2 +-
36 + CPP/7zip/UI/Client7z/Client7z.cpp | 19 ++++++++++-
37 + CPP/7zip/UI/Common/ArchiveExtractCallback.cpp | 14 +++++++--
38 + CPP/7zip/UI/Common/ArchiveExtractCallback.h | 6 +++-
39 + CPP/7zip/UI/Common/Extract.cpp | 2 +-
40 + CPP/Windows/FileDir.cpp | 45 +++++++++++++++++++++++++--
41 + CPP/Windows/FileDir.h | 31 +++++++++++++++++-
42 + 7 files changed, 109 insertions(+), 10 deletions(-)
43 +
44 +diff --git a/CPP/7zip/UI/Agent/Agent.cpp b/CPP/7zip/UI/Agent/Agent.cpp
45 +index 201e82c..b0b8316 100644
46 +--- a/CPP/7zip/UI/Agent/Agent.cpp
47 ++++ b/CPP/7zip/UI/Agent/Agent.cpp
48 +@@ -1515,7 +1515,7 @@ STDMETHODIMP CAgentFolder::Extract(const UInt32 *indices,
49 + HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(),
50 + realIndices.Size(), testMode, extractCallback);
51 + if (result == S_OK)
52 +- result = extractCallbackSpec->SetDirsTimes();
53 ++ result = extractCallbackSpec->SetFinalAttribs();
54 + return result;
55 + COM_TRY_END
56 + }
57 +diff --git a/CPP/7zip/UI/Client7z/Client7z.cpp b/CPP/7zip/UI/Client7z/Client7z.cpp
58 +index c6522fe..1919389 100644
59 +--- a/CPP/7zip/UI/Client7z/Client7z.cpp
60 ++++ b/CPP/7zip/UI/Client7z/Client7z.cpp
61 +@@ -230,8 +230,11 @@ private:
62 + COutFileStream *_outFileStreamSpec;
63 + CMyComPtr<ISequentialOutStream> _outFileStream;
64 +
65 ++ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
66 ++
67 + public:
68 + void Init(IInArchive *archiveHandler, const FString &directoryPath);
69 ++ HRESULT SetFinalAttribs();
70 +
71 + UInt64 NumErrors;
72 + bool PasswordIsDefined;
73 +@@ -449,11 +452,23 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
74 + }
75 + _outFileStream.Release();
76 + if (_extractMode && _processedFileInfo.AttribDefined)
77 +- SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib);
78 ++ SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib, &_delayedSymLinks);
79 + PrintNewLine();
80 + return S_OK;
81 + }
82 +
83 ++HRESULT CArchiveExtractCallback::SetFinalAttribs()
84 ++{
85 ++ HRESULT result = S_OK;
86 ++
87 ++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
88 ++ if (!_delayedSymLinks[i].Create())
89 ++ result = E_FAIL;
90 ++
91 ++ _delayedSymLinks.Clear();
92 ++
93 ++ return result;
94 ++}
95 +
96 + STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
97 + {
98 +@@ -914,6 +929,8 @@ int MY_CDECL main(int numArgs, const char *args[])
99 + // extractCallbackSpec->PasswordIsDefined = true;
100 + // extractCallbackSpec->Password = L"1";
101 + HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback);
102 ++ if (result == S_OK)
103 ++ result = extractCallbackSpec->SetFinalAttribs();
104 + if (result != S_OK)
105 + {
106 + PrintError("Extract Error");
107 +diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
108 +index 877326b..05b13f3 100644
109 +--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
110 ++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
111 +@@ -1502,7 +1502,7 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 opRes)
112 + NumFiles++;
113 +
114 + if (!_stdOutMode && _extractMode && _fi.AttribDefined)
115 +- SetFileAttrib(_diskFilePath, _fi.Attrib);
116 ++ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks);
117 +
118 + RINOK(_extractCallback2->SetOperationResult(opRes, BoolToInt(_encrypted)));
119 +
120 +@@ -1584,8 +1584,9 @@ static unsigned GetNumSlashes(const FChar *s)
121 + }
122 + }
123 +
124 +-HRESULT CArchiveExtractCallback::SetDirsTimes()
125 ++HRESULT CArchiveExtractCallback::SetFinalAttribs()
126 + {
127 ++ HRESULT result = S_OK;
128 + CRecordVector<CExtrRefSortPair> pairs;
129 + pairs.ClearAndSetSize(_extractedFolderPaths.Size());
130 + unsigned i;
131 +@@ -1622,5 +1623,12 @@ HRESULT CArchiveExtractCallback::SetDirsTimes()
132 + (WriteATime && ATimeDefined) ? &ATime : NULL,
133 + (WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL));
134 + }
135 +- return S_OK;
136 ++
137 ++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
138 ++ if (!_delayedSymLinks[i].Create())
139 ++ result = E_FAIL;
140 ++
141 ++ _delayedSymLinks.Clear();
142 ++
143 ++ return result;
144 + }
145 +diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.h b/CPP/7zip/UI/Common/ArchiveExtractCallback.h
146 +index 1e9f0b6..b51d78f 100644
147 +--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.h
148 ++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.h
149 +@@ -6,6 +6,8 @@
150 + #include "../../../Common/MyCom.h"
151 + #include "../../../Common/Wildcard.h"
152 +
153 ++#include "../../../Windows/FileDir.h"
154 ++
155 + #include "../../IPassword.h"
156 +
157 + #include "../../Common/FileStreams.h"
158 +@@ -237,6 +239,8 @@ class CArchiveExtractCallback:
159 + bool _saclEnabled;
160 + #endif
161 +
162 ++ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
163 ++
164 + void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath);
165 + HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
166 + HRESULT GetUnpackSize();
167 +@@ -330,7 +334,7 @@ public:
168 + }
169 + #endif
170 +
171 +- HRESULT SetDirsTimes();
172 ++ HRESULT SetFinalAttribs();
173 + };
174 +
175 + bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item);
176 +diff --git a/CPP/7zip/UI/Common/Extract.cpp b/CPP/7zip/UI/Common/Extract.cpp
177 +index 5b96071..98192fa 100644
178 +--- a/CPP/7zip/UI/Common/Extract.cpp
179 ++++ b/CPP/7zip/UI/Common/Extract.cpp
180 +@@ -207,7 +207,7 @@ static HRESULT DecompressArchive(
181 + else
182 + result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs);
183 + if (result == S_OK && !options.StdInMode)
184 +- result = ecs->SetDirsTimes();
185 ++ result = ecs->SetFinalAttribs();
186 + return callback->ExtractResult(result);
187 + }
188 +
189 +diff --git a/CPP/Windows/FileDir.cpp b/CPP/Windows/FileDir.cpp
190 +index 422edfc..baa6255 100644
191 +--- a/CPP/Windows/FileDir.cpp
192 ++++ b/CPP/Windows/FileDir.cpp
193 +@@ -347,7 +347,8 @@ static int convert_to_symlink(const char * name) {
194 + return -1;
195 + }
196 +
197 +-bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes)
198 ++bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes,
199 ++ CObjectVector<CDelayedSymLink> *delayedSymLinks)
200 + {
201 + if (!fileName) {
202 + SetLastError(ERROR_PATH_NOT_FOUND);
203 +@@ -379,7 +380,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes)
204 + stat_info.st_mode = fileAttributes >> 16;
205 + #ifdef ENV_HAVE_LSTAT
206 + if (S_ISLNK(stat_info.st_mode)) {
207 +- if ( convert_to_symlink(name) != 0) {
208 ++ if (delayedSymLinks)
209 ++ delayedSymLinks->Add(CDelayedSymLink(name));
210 ++ else if ( convert_to_symlink(name) != 0) {
211 + TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes)))
212 + return false;
213 + }
214 +@@ -814,6 +817,44 @@ bool CTempDir::Remove()
215 + return !_mustBeDeleted;
216 + }
217 +
218 ++#ifdef ENV_UNIX
219 ++
220 ++CDelayedSymLink::CDelayedSymLink(const char * source)
221 ++ : _source(source)
222 ++{
223 ++ struct stat st;
224 ++
225 ++ if (lstat(_source, &st) == 0) {
226 ++ _dev = st.st_dev;
227 ++ _ino = st.st_ino;
228 ++ } else {
229 ++ _dev = 0;
230 ++ }
231 ++}
232 ++
233 ++bool CDelayedSymLink::Create()
234 ++{
235 ++ struct stat st;
236 ++
237 ++ if (_dev == 0) {
238 ++ errno = EPERM;
239 ++ return false;
240 ++ }
241 ++ if (lstat(_source, &st) != 0)
242 ++ return false;
243 ++ if (_dev != st.st_dev || _ino != st.st_ino) {
244 ++ // Placeholder file has been overwritten or moved by another
245 ++ // symbolic link creation
246 ++ errno = EPERM;
247 ++ return false;
248 ++ }
249 ++
250 ++ return convert_to_symlink(_source) == 0;
251 ++}
252 ++
253 ++#endif // ENV_UNIX
254 ++
255 ++
256 + }}}
257 +
258 + #ifndef _SFX
259 +diff --git a/CPP/Windows/FileDir.h b/CPP/Windows/FileDir.h
260 +index b13d1cc..7429a81 100644
261 +--- a/CPP/Windows/FileDir.h
262 ++++ b/CPP/Windows/FileDir.h
263 +@@ -4,6 +4,7 @@
264 + #define __WINDOWS_FILE_DIR_H
265 +
266 + #include "../Common/MyString.h"
267 ++#include "../Common/MyVector.h"
268 +
269 + #include "FileIO.h"
270 +
271 +@@ -11,11 +12,14 @@ namespace NWindows {
272 + namespace NFile {
273 + namespace NDir {
274 +
275 ++class CDelayedSymLink;
276 ++
277 + bool GetWindowsDir(FString &path);
278 + bool GetSystemDir(FString &path);
279 +
280 + bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
281 +-bool SetFileAttrib(CFSTR path, DWORD attrib);
282 ++bool SetFileAttrib(CFSTR path, DWORD attrib,
283 ++ CObjectVector<CDelayedSymLink> *delayedSymLinks = 0);
284 + bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
285 +
286 + #ifndef UNDER_CE
287 +@@ -76,6 +80,31 @@ public:
288 + bool Remove();
289 + };
290 +
291 ++// Symbolic links must be created last so that they can't be used to
292 ++// create or overwrite files above the extraction directory.
293 ++class CDelayedSymLink
294 ++{
295 ++#ifdef ENV_UNIX
296 ++ // Where the symlink should be created. The target is specified in
297 ++ // the placeholder file.
298 ++ AString _source;
299 ++
300 ++ // Device and inode of the placeholder file. Before creating the
301 ++ // symlink, we must check that these haven't been changed by creation
302 ++ // of another symlink.
303 ++ dev_t _dev;
304 ++ ino_t _ino;
305 ++
306 ++public:
307 ++ explicit CDelayedSymLink(const char * source);
308 ++ bool Create();
309 ++#else // !ENV_UNIX
310 ++public:
311 ++ CDelayedSymLink(const char * source) {}
312 ++ bool Create() { return true; }
313 ++#endif // ENV_UNIX
314 ++};
315 ++
316 + #if !defined(UNDER_CE)
317 + class CCurrentDirRestorer
318 + {
319
320 diff --git a/app-arch/p7zip/p7zip-15.09.ebuild b/app-arch/p7zip/p7zip-15.09.ebuild
321 new file mode 100644
322 index 0000000..048f4cc
323 --- /dev/null
324 +++ b/app-arch/p7zip/p7zip-15.09.ebuild
325 @@ -0,0 +1,158 @@
326 +# Copyright 1999-2015 Gentoo Foundation
327 +# Distributed under the terms of the GNU General Public License v2
328 +# $Id$
329 +
330 +EAPI=5
331 +
332 +WX_GTK_VER="3.0"
333 +
334 +inherit eutils multilib toolchain-funcs wxwidgets
335 +
336 +DESCRIPTION="Port of 7-Zip archiver for Unix"
337 +HOMEPAGE="http://p7zip.sourceforge.net/"
338 +SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
339 +
340 +LICENSE="LGPL-2.1 rar? ( unRAR )"
341 +SLOT="0"
342 +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"
343 +IUSE="doc kde rar +pch static wxwidgets abi_x86_x32"
344 +
345 +REQUIRED_USE="kde? ( wxwidgets )"
346 +
347 +RDEPEND="
348 + kde? ( x11-libs/wxGTK:${WX_GTK_VER}[X] kde-base/kdelibs )
349 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
350 +DEPEND="${RDEPEND}
351 + amd64? ( dev-lang/yasm )
352 + abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
353 + x86? ( dev-lang/nasm )"
354 +
355 +S=${WORKDIR}/${PN}_${PV}
356 +
357 +src_prepare() {
358 + epatch \
359 + "${FILESDIR}"/${P}-CVE-2015-1038.patch
360 +
361 + if ! use pch; then
362 + sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
363 + fi
364 +
365 + sed \
366 + -e 's:-m32 ::g' \
367 + -e 's:-m64 ::g' \
368 + -e 's:-O::g' \
369 + -e 's: -s ::g' \
370 + -e 's: -s$::g' \
371 + -e 's:-pipe::g' \
372 + -e "/^CXX=/s:g++:$(tc-getCXX):" \
373 + -e "/^CC=/s:gcc:$(tc-getCC):" \
374 + -e '/ALLFLAGS/s:-s ::' \
375 + -e "/OPTFLAGS=/s:=.*:=${CXXFLAGS}:" \
376 + -i makefile* || die
377 +
378 + # remove non-free RAR codec
379 + if use rar; then
380 + ewarn "Enabling nonfree RAR decompressor"
381 + else
382 + sed \
383 + -e '/Rar/d' \
384 + -e '/RAR/d' \
385 + -i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die
386 + rm -rf CPP/7zip/Compress/Rar || die
387 + fi
388 +
389 + if use abi_x86_x32; then
390 + sed -i -e "/^ASM=/s:amd64:x32:" makefile* || die
391 + cp -f makefile.linux_amd64_asm makefile.machine || die
392 + elif use amd64; then
393 + cp -f makefile.linux_amd64_asm makefile.machine || die
394 + elif use x86; then
395 + cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
396 + elif [[ ${CHOST} == *-darwin* ]] ; then
397 + # Mac OS X needs this special makefile, because it has a non-GNU linker
398 + [[ ${CHOST} == *64-* ]] \
399 + && cp -f makefile.macosx_64bits makefile.machine \
400 + || cp -f makefile.macosx_32bits makefile.machine
401 + # bundles have extension .bundle but don't die because USE=-rar
402 + # removes the Rar directory
403 + sed -i -e '/strcpy(name/s/\.so/.bundle/' \
404 + CPP/Windows/DLL.cpp || die
405 + sed -i -e '/^PROG=/s/\.so/.bundle/' \
406 + CPP/7zip/Bundles/Format7zFree/makefile \
407 + $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
408 + elif use x86-fbsd; then
409 + # FreeBSD needs this special makefile, because it hasn't -ldl
410 + sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
411 + fi
412 +
413 + if use static; then
414 + sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
415 + fi
416 +
417 + if use kde || use wxwidgets; then
418 + need-wxwidgets unicode
419 + einfo "Preparing dependency list"
420 + emake depend
421 + fi
422 +}
423 +
424 +src_compile() {
425 + emake all3
426 + if use kde || use wxwidgets; then
427 + emake -- 7zG
428 + emake -- 7zFM
429 + fi
430 +}
431 +
432 +src_test() {
433 + emake test test_7z test_7zr
434 +}
435 +
436 +src_install() {
437 + # this wrappers can not be symlinks, p7zip should be called with full path
438 + make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr"
439 + make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za"
440 + make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z"
441 +
442 + if use kde || use wxwidgets; then
443 + make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG"
444 + make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM"
445 +
446 + make_desktop_entry 7zFM "${PN} FM" ${PN} "GTK;Utility;Archiving;Compression"
447 +
448 + dobin GUI/p7zipForFilemanager
449 + exeinto /usr/$(get_libdir)/${PN}
450 + doexe bin/7z{G,FM}
451 +
452 + insinto /usr/$(get_libdir)/${PN}
453 + doins -r GUI/{Lang,help}
454 +
455 + insinto /usr/share/icons/hicolor/16x16/apps/
456 + newins GUI/p7zip_16_ok.png p7zip.png
457 +
458 + if use kde; then
459 + rm GUI/kde4/p7zip_compress.desktop || die
460 + insinto /usr/share/kde4/services/ServiceMenus
461 + doins GUI/kde4/*.desktop
462 + fi
463 + fi
464 +
465 + dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
466 + doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
467 +
468 + exeinto /usr/$(get_libdir)/${PN}
469 + doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
470 + doexe bin/*$(get_modname)
471 + if use rar; then
472 + exeinto /usr/$(get_libdir)/${PN}/Codecs/
473 + doexe bin/Codecs/*$(get_modname)
474 + fi
475 +
476 + doman man1/7z.1 man1/7za.1 man1/7zr.1
477 + dodoc ChangeLog README TODO
478 +
479 + if use doc; then
480 + dodoc DOC/*.txt
481 + dohtml -r DOC/MANUAL/*
482 + fi
483 +}