summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/advancecomp/Manifest4
-rw-r--r--app-arch/advancecomp/advancecomp-1.15.ebuild47
-rw-r--r--app-arch/advancecomp/advancecomp-1.16.ebuild43
-rw-r--r--app-arch/advancecomp/advancecomp-1.17.ebuild52
-rw-r--r--app-arch/advancecomp/advancecomp-1.19.ebuild48
-rw-r--r--app-arch/advancecomp/files/advancecomp-1.13-bzip2-compile-plz-k-thx.diff61
-rw-r--r--app-arch/advancecomp/files/advancecomp-1.17-bzip2-compile.patch16
-rw-r--r--app-arch/advancecomp/metadata.xml15
-rw-r--r--app-arch/afio/Manifest2
-rw-r--r--app-arch/afio/afio-2.5.1.ebuild32
-rw-r--r--app-arch/afio/afio-2.5.ebuild44
-rw-r--r--app-arch/afio/files/Makefile-r1.patch23
-rw-r--r--app-arch/afio/files/Makefile.patch25
-rw-r--r--app-arch/afio/metadata.xml17
-rw-r--r--app-arch/alien/Manifest3
-rw-r--r--app-arch/alien/alien-8.89.ebuild30
-rw-r--r--app-arch/alien/alien-8.90.ebuild30
-rw-r--r--app-arch/alien/alien-8.93.ebuild30
-rw-r--r--app-arch/alien/metadata.xml6
-rw-r--r--app-arch/arc/Manifest1
-rw-r--r--app-arch/arc/arc-5.21p.ebuild35
-rw-r--r--app-arch/arc/files/arc-5.21m-darwin.patch11
-rw-r--r--app-arch/arc/files/arc-5.21m-gentoo-fbsd.patch12
-rw-r--r--app-arch/arc/files/arc-5.21o-interix.patch12
-rw-r--r--app-arch/arc/metadata.xml11
-rw-r--r--app-arch/arj/Manifest3
-rw-r--r--app-arch/arj/arj-3.10.22-r3.ebuild56
-rw-r--r--app-arch/arj/arj-3.10.22-r4.ebuild55
-rw-r--r--app-arch/arj/files/arj-3.10.22-darwin.patch41
-rw-r--r--app-arch/arj/files/arj-3.10.22-glibc2.10.patch12
-rw-r--r--app-arch/arj/files/arj-3.10.22-implicit-declarations.patch33
-rw-r--r--app-arch/arj/files/arj-3.10.22-interix.patch45
-rw-r--r--app-arch/arj/metadata.xml7
-rw-r--r--app-arch/atool/Manifest1
-rw-r--r--app-arch/atool/atool-0.39.0.ebuild18
-rw-r--r--app-arch/atool/metadata.xml12
-rw-r--r--app-arch/bloscpack/Manifest2
-rw-r--r--app-arch/bloscpack/bloscpack-0.5.0.ebuild24
-rw-r--r--app-arch/bloscpack/bloscpack-0.6.0.ebuild24
-rw-r--r--app-arch/bloscpack/metadata.xml14
-rw-r--r--app-arch/bsdsfv/Manifest1
-rw-r--r--app-arch/bsdsfv/bsdsfv-1.18-r1.ebuild30
-rw-r--r--app-arch/bsdsfv/files/bsdsfv-1.18-64bit.patch83
-rw-r--r--app-arch/bsdsfv/metadata.xml12
-rw-r--r--app-arch/bzip2/Manifest1
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r1.ebuild73
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r2.ebuild73
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r3.ebuild80
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r4.ebuild87
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r6.ebuild113
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r7.ebuild115
-rw-r--r--app-arch/bzip2/bzip2-1.0.6.ebuild68
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.2-progress.patch175
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.3-no-test.patch9
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch21
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch25
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.4-man-links.patch12
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.6-mingw.patch27
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch79
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.6-progress.patch163
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.6-saneso.patch13
-rw-r--r--app-arch/bzip2/metadata.xml8
-rw-r--r--app-arch/cabextract/Manifest1
-rw-r--r--app-arch/cabextract/cabextract-1.6.ebuild35
-rw-r--r--app-arch/cabextract/metadata.xml11
-rw-r--r--app-arch/cfv/Manifest2
-rw-r--r--app-arch/cfv/cfv-1.18.2.ebuild32
-rw-r--r--app-arch/cfv/cfv-1.18.3-r1.ebuild41
-rw-r--r--app-arch/cfv/files/cfv-1.18.1-modulefix.patch21
-rw-r--r--app-arch/cfv/metadata.xml19
-rw-r--r--app-arch/cksfv/Manifest3
-rw-r--r--app-arch/cksfv/cksfv-1.3.12.ebuild32
-rw-r--r--app-arch/cksfv/cksfv-1.3.13.ebuild32
-rw-r--r--app-arch/cksfv/cksfv-1.3.14.ebuild31
-rw-r--r--app-arch/cksfv/metadata.xml8
-rw-r--r--app-arch/cpio/Manifest1
-rw-r--r--app-arch/cpio/cpio-2.11-r1.ebuild35
-rw-r--r--app-arch/cpio/cpio-2.11-r3.ebuild36
-rw-r--r--app-arch/cpio/cpio-2.11.ebuild35
-rw-r--r--app-arch/cpio/files/cpio-2.11-no-gets.patch24
-rw-r--r--app-arch/cpio/files/cpio-2.11-non-gnu-compilers.patch18
-rw-r--r--app-arch/cpio/files/cpio-2.11-security.patch266
-rw-r--r--app-arch/cpio/files/cpio-2.11-stat.patch25
-rw-r--r--app-arch/cpio/metadata.xml5
-rw-r--r--app-arch/createrepo/Manifest2
-rw-r--r--app-arch/createrepo/createrepo-0.10.3.ebuild57
-rw-r--r--app-arch/createrepo/files/createrepo-0.10.3-pkglist.patch15
-rw-r--r--app-arch/createrepo/files/createrepo-0.10.3-ten-changelog-limit.patch11
-rw-r--r--app-arch/createrepo/metadata.xml8
-rw-r--r--app-arch/deb2targz/Manifest1
-rw-r--r--app-arch/deb2targz/deb2targz-1-r2.ebuild29
-rw-r--r--app-arch/deb2targz/files/deb2targz-any-data.patch17
-rw-r--r--app-arch/deb2targz/metadata.xml5
-rw-r--r--app-arch/defluff/Manifest2
-rw-r--r--app-arch/defluff/defluff-0.3.2.ebuild28
-rw-r--r--app-arch/defluff/metadata.xml9
-rw-r--r--app-arch/deltarpm/Manifest1
-rw-r--r--app-arch/deltarpm/deltarpm-3.6_pre20110223-r1.ebuild51
-rw-r--r--app-arch/deltarpm/files/3.6_pre20110223-build.patch13
-rw-r--r--app-arch/deltarpm/metadata.xml11
-rw-r--r--app-arch/dpkg/Manifest3
-rw-r--r--app-arch/dpkg/dpkg-1.17.25.ebuild98
-rw-r--r--app-arch/dpkg/dpkg-1.18.1.ebuild98
-rw-r--r--app-arch/dpkg/dpkg-1.18.2.ebuild98
-rw-r--r--app-arch/dpkg/files/dpkg-1.17.0-gzip-rsyncable.patch11
-rw-r--r--app-arch/dpkg/files/dpkg-1.17.1-flags.patch11
-rw-r--r--app-arch/dpkg/metadata.xml8
-rw-r--r--app-arch/duff/Manifest1
-rw-r--r--app-arch/duff/duff-0.5.2.ebuild20
-rw-r--r--app-arch/duff/metadata.xml10
-rw-r--r--app-arch/dump/Manifest1
-rw-r--r--app-arch/dump/dump-0.4.44-r1.ebuild64
-rw-r--r--app-arch/dump/files/dump-0.4.44-fix-pointers-aliasing.patch126
-rw-r--r--app-arch/dump/files/dump-0.4.44-rl_completion_matches-detection.patch24
-rw-r--r--app-arch/dump/files/dump-0.4.44-underlinking.patch31
-rw-r--r--app-arch/dump/metadata.xml14
-rw-r--r--app-arch/engrampa/Manifest2
-rw-r--r--app-arch/engrampa/engrampa-1.8.0-r1.ebuild82
-rw-r--r--app-arch/engrampa/engrampa-1.8.0.ebuild84
-rw-r--r--app-arch/engrampa/engrampa-1.8.1-r1.ebuild82
-rw-r--r--app-arch/engrampa/files/engrampa-1.8.0-caja-schema-fix.patch89
-rw-r--r--app-arch/engrampa/metadata.xml13
-rw-r--r--app-arch/fastjar/Manifest1
-rw-r--r--app-arch/fastjar/fastjar-0.98-r2.ebuild25
-rw-r--r--app-arch/fastjar/fastjar-0.98-r3.ebuild25
-rw-r--r--app-arch/fastjar/files/0.98-traversal.patch112
-rw-r--r--app-arch/fastjar/metadata.xml10
-rw-r--r--app-arch/file-roller/Manifest3
-rw-r--r--app-arch/file-roller/file-roller-3.14.2.ebuild96
-rw-r--r--app-arch/file-roller/file-roller-3.16.2.ebuild96
-rw-r--r--app-arch/file-roller/file-roller-3.16.3.ebuild91
-rw-r--r--app-arch/file-roller/files/3.6.0-packages.match30
-rw-r--r--app-arch/file-roller/files/file-roller-2.10.3-use_bin_tar.patch12
-rw-r--r--app-arch/file-roller/metadata.xml12
-rw-r--r--app-arch/freeze/Manifest1
-rw-r--r--app-arch/freeze/files/freeze-2.5.0-gentoo.patch55
-rw-r--r--app-arch/freeze/freeze-2.5.0-r1.ebuild45
-rw-r--r--app-arch/freeze/metadata.xml8
-rw-r--r--app-arch/funzix/Manifest1
-rw-r--r--app-arch/funzix/funzix-1.0.ebuild23
-rw-r--r--app-arch/funzix/metadata.xml10
-rw-r--r--app-arch/gcab/Manifest1
-rw-r--r--app-arch/gcab/gcab-0.6.ebuild46
-rw-r--r--app-arch/gcab/metadata.xml5
-rw-r--r--app-arch/gtk-splitter/Manifest1
-rw-r--r--app-arch/gtk-splitter/files/gtk-splitter-2.2.1-r1-desktop-QA-fixes.patch13
-rw-r--r--app-arch/gtk-splitter/gtk-splitter-2.2.1-r1.ebuild40
-rw-r--r--app-arch/gtk-splitter/metadata.xml12
-rw-r--r--app-arch/gzip/Manifest3
-rw-r--r--app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch11
-rw-r--r--app-arch/gzip/files/gzip-1.4-asmv.patch30
-rw-r--r--app-arch/gzip/files/gzip-1.4-assembler.patch52
-rw-r--r--app-arch/gzip/files/gzip-1.4-no-gets.patch22
-rw-r--r--app-arch/gzip/gzip-1.4.ebuild49
-rw-r--r--app-arch/gzip/gzip-1.5.ebuild47
-rw-r--r--app-arch/gzip/gzip-1.6.ebuild41
-rw-r--r--app-arch/gzip/metadata.xml11
-rw-r--r--app-arch/hardlink/Manifest2
-rw-r--r--app-arch/hardlink/hardlink-0.2.0.ebuild40
-rw-r--r--app-arch/hardlink/hardlink-0.3.0.ebuild40
-rw-r--r--app-arch/hardlink/metadata.xml9
-rw-r--r--app-arch/innoextract/Manifest3
-rw-r--r--app-arch/innoextract/files/innoextract-1.2-gentoo.patch49
-rw-r--r--app-arch/innoextract/files/innoextract-1.3-gentoo.patch49
-rw-r--r--app-arch/innoextract/files/innoextract-1.4-cmake.patch30
-rw-r--r--app-arch/innoextract/innoextract-1.2.ebuild37
-rw-r--r--app-arch/innoextract/innoextract-1.3.ebuild48
-rw-r--r--app-arch/innoextract/innoextract-1.4.ebuild73
-rw-r--r--app-arch/innoextract/metadata.xml21
-rw-r--r--app-arch/ipkg-utils/Manifest1
-rw-r--r--app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch30
-rw-r--r--app-arch/ipkg-utils/files/ipkg-utils-tar_call_fixes.patch28
-rw-r--r--app-arch/ipkg-utils/ipkg-utils-1.7.050831-r2.ebuild64
-rw-r--r--app-arch/ipkg-utils/metadata.xml15
-rw-r--r--app-arch/lbzip2/Manifest2
-rw-r--r--app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch16
-rw-r--r--app-arch/lbzip2/lbzip2-2.3-r1.ebuild38
-rw-r--r--app-arch/lbzip2/lbzip2-2.5.ebuild38
-rw-r--r--app-arch/lbzip2/metadata.xml19
-rw-r--r--app-arch/lcab/Manifest1
-rw-r--r--app-arch/lcab/lcab-1.0_beta12.ebuild31
-rw-r--r--app-arch/lcab/metadata.xml13
-rw-r--r--app-arch/lha/Manifest1
-rw-r--r--app-arch/lha/files/lha-114i-file-list-from-stdin.patch29
-rw-r--r--app-arch/lha/lha-114i-r7.ebuild47
-rw-r--r--app-arch/lha/metadata.xml15
-rw-r--r--app-arch/libarchive/Manifest1
-rw-r--r--app-arch/libarchive/files/libarchive-3.1.2-CVE-2013-0211.patch32
-rw-r--r--app-arch/libarchive/libarchive-3.1.2-r1.ebuild91
-rw-r--r--app-arch/libarchive/metadata.xml34
-rw-r--r--app-arch/libpar2/Manifest1
-rw-r--r--app-arch/libpar2/libpar2-0.4.ebuild25
-rw-r--r--app-arch/libpar2/metadata.xml11
-rw-r--r--app-arch/libzpaq/Manifest4
-rw-r--r--app-arch/libzpaq/files/0001-Add-autotools-files.patch50
-rw-r--r--app-arch/libzpaq/libzpaq-6.41.ebuild39
-rw-r--r--app-arch/libzpaq/libzpaq-6.49.ebuild40
-rw-r--r--app-arch/libzpaq/libzpaq-6.53.ebuild40
-rw-r--r--app-arch/libzpaq/libzpaq-7.04.ebuild40
-rw-r--r--app-arch/libzpaq/metadata.xml12
-rw-r--r--app-arch/lrzip/Manifest3
-rw-r--r--app-arch/lrzip/files/lrzip-missing-stdarg_h.patch11
-rw-r--r--app-arch/lrzip/lrzip-0.614.ebuild36
-rw-r--r--app-arch/lrzip/lrzip-0.616.ebuild36
-rw-r--r--app-arch/lrzip/lrzip-0.621.ebuild36
-rw-r--r--app-arch/lrzip/metadata.xml14
-rw-r--r--app-arch/lz4/Manifest2
-rw-r--r--app-arch/lz4/files/lz4-0_p106-cflags.patch22
-rw-r--r--app-arch/lz4/files/lz4-0_p106-install-to-bindir.patch51
-rw-r--r--app-arch/lz4/lz4-0_p106-r1.ebuild62
-rw-r--r--app-arch/lz4/lz4-0_p120.ebuild49
-rw-r--r--app-arch/lz4/lz4-9999.ebuild44
-rw-r--r--app-arch/lz4/metadata.xml11
-rw-r--r--app-arch/lzip/Manifest2
-rw-r--r--app-arch/lzip/lzip-1.16.ebuild25
-rw-r--r--app-arch/lzip/lzip-1.17.ebuild27
-rw-r--r--app-arch/lzip/metadata.xml5
-rw-r--r--app-arch/lziprecover/Manifest3
-rw-r--r--app-arch/lziprecover/lziprecover-1.16.ebuild25
-rw-r--r--app-arch/lziprecover/lziprecover-1.17.ebuild27
-rw-r--r--app-arch/lziprecover/lziprecover-1.18_pre1.ebuild27
-rw-r--r--app-arch/lziprecover/metadata.xml47
-rw-r--r--app-arch/lzlib/Manifest2
-rw-r--r--app-arch/lzlib/lzlib-1.6.ebuild38
-rw-r--r--app-arch/lzlib/lzlib-1.7.ebuild38
-rw-r--r--app-arch/lzlib/metadata.xml8
-rw-r--r--app-arch/lzma/Manifest1
-rw-r--r--app-arch/lzma/lzma-9.20.ebuild35
-rw-r--r--app-arch/lzma/metadata.xml10
-rw-r--r--app-arch/lzop/Manifest1
-rw-r--r--app-arch/lzop/lzop-1.03.ebuild32
-rw-r--r--app-arch/lzop/metadata.xml9
-rw-r--r--app-arch/makeself/Manifest2
-rw-r--r--app-arch/makeself/files/makeself-2.2.0-help-header.patch124
-rwxr-xr-xapp-arch/makeself/files/makeself-unpack100
-rw-r--r--app-arch/makeself/makeself-2.1.5-r2.ebuild25
-rw-r--r--app-arch/makeself/makeself-2.2.0-r1.ebuild31
-rw-r--r--app-arch/makeself/metadata.xml10
-rw-r--r--app-arch/metadata.xml40
-rw-r--r--app-arch/mscompress/Manifest1
-rw-r--r--app-arch/mscompress/files/mscompress-0.3-amd64.patch24
-rw-r--r--app-arch/mscompress/files/mscompress-0.3-makefile.patch12
-rw-r--r--app-arch/mscompress/metadata.xml11
-rw-r--r--app-arch/mscompress/mscompress-0.3-r1.ebuild34
-rw-r--r--app-arch/mt-st/Manifest1
-rw-r--r--app-arch/mt-st/metadata.xml8
-rw-r--r--app-arch/mt-st/mt-st-1.1.ebuild31
-rw-r--r--app-arch/ncompress/Manifest2
-rw-r--r--app-arch/ncompress/metadata.xml9
-rw-r--r--app-arch/ncompress/ncompress-4.2.4.3.ebuild27
-rw-r--r--app-arch/ncompress/ncompress-4.2.4.4.ebuild29
-rw-r--r--app-arch/p7zip/Manifest2
-rw-r--r--app-arch/p7zip/files/9.04-makefile.patch19
-rw-r--r--app-arch/p7zip/files/p7zip73
-rw-r--r--app-arch/p7zip/files/p7zip-9.20.1-CVE-2015-1038.patch315
-rw-r--r--app-arch/p7zip/files/p7zip-9.20.1-QA.patch17
-rw-r--r--app-arch/p7zip/files/p7zip-9.20.1-execstack.patch24
-rw-r--r--app-arch/p7zip/files/p7zip-9.20.1-long_rar_pwd.patch17
-rw-r--r--app-arch/p7zip/files/p7zip-9.38.1-CVE-2015-1038.patch283
-rw-r--r--app-arch/p7zip/files/p7zip-9.38.1-osversion.patch28
-rw-r--r--app-arch/p7zip/metadata.xml14
-rw-r--r--app-arch/p7zip/p7zip-9.20.1-r5.ebuild155
-rw-r--r--app-arch/p7zip/p7zip-9.38.1-r2.ebuild156
-rw-r--r--app-arch/par/Manifest1
-rw-r--r--app-arch/par/metadata.xml10
-rw-r--r--app-arch/par/par-1.1.ebuild37
-rw-r--r--app-arch/par2cmdline/Manifest4
-rw-r--r--app-arch/par2cmdline/metadata.xml15
-rw-r--r--app-arch/par2cmdline/par2cmdline-0.6.11.ebuild21
-rw-r--r--app-arch/par2cmdline/par2cmdline-0.6.12.ebuild21
-rw-r--r--app-arch/par2cmdline/par2cmdline-0.6.13.ebuild21
-rw-r--r--app-arch/par2cmdline/par2cmdline-0.6.3.ebuild21
-rw-r--r--app-arch/pax/Manifest1
-rw-r--r--app-arch/pax/files/pax-3.4-fix-fts-includes.patch24
-rw-r--r--app-arch/pax/files/pax-3.4-x32.patch162
-rw-r--r--app-arch/pax/metadata.xml7
-rw-r--r--app-arch/pax/pax-3.4.12.16-r1.ebuild39
-rw-r--r--app-arch/pax/pax-3.4.12.16.ebuild35
-rw-r--r--app-arch/pbzip2/Manifest5
-rw-r--r--app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch20
-rw-r--r--app-arch/pbzip2/files/pbzip2-1.1.6-makefile.patch62
-rw-r--r--app-arch/pbzip2/files/pbzip2-1.1.9-makefile.patch29
-rw-r--r--app-arch/pbzip2/metadata.xml14
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.10.ebuild43
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.11.ebuild43
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.12.ebuild43
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.8.ebuild43
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.9.ebuild43
-rw-r--r--app-arch/pdlzip/Manifest1
-rw-r--r--app-arch/pdlzip/metadata.xml8
-rw-r--r--app-arch/pdlzip/pdlzip-1.5.ebuild26
-rw-r--r--app-arch/pdv/Manifest1
-rw-r--r--app-arch/pdv/files/pdv-1.5.1-default-args.patch16
-rw-r--r--app-arch/pdv/files/pdv-1.5.1-early-free.patch21
-rw-r--r--app-arch/pdv/files/pdv-1.5.1-no-strip.patch13
-rw-r--r--app-arch/pdv/files/pdv-1.5.1-opt.patch24
-rw-r--r--app-arch/pdv/files/pdv-1.5.1-x-config.patch18
-rw-r--r--app-arch/pdv/metadata.xml12
-rw-r--r--app-arch/pdv/pdv-1.5.1-r2.ebuild57
-rw-r--r--app-arch/pet2tgz/Manifest1
-rw-r--r--app-arch/pet2tgz/metadata.xml11
-rw-r--r--app-arch/pet2tgz/pet2tgz-0.3.ebuild16
-rw-r--r--app-arch/pigz/Manifest2
-rw-r--r--app-arch/pigz/files/0001-Do-not-return-non-zero-exit-code-when-warnings-issue.patch47
-rw-r--r--app-arch/pigz/files/pigz-2.3-make.patch25
-rw-r--r--app-arch/pigz/files/pigz-2.3.3-ldflags.patch34
-rw-r--r--app-arch/pigz/metadata.xml12
-rw-r--r--app-arch/pigz/pigz-2.3.1-r1.ebuild43
-rw-r--r--app-arch/pigz/pigz-2.3.3.ebuild43
-rw-r--r--app-arch/pixz/Manifest1
-rw-r--r--app-arch/pixz/files/pixz-1.0.2-lm.patch25
-rw-r--r--app-arch/pixz/metadata.xml13
-rw-r--r--app-arch/pixz/pixz-1.0.2.ebuild47
-rw-r--r--app-arch/pixz/pixz-9999.ebuild47
-rw-r--r--app-arch/plzip/Manifest2
-rw-r--r--app-arch/plzip/metadata.xml8
-rw-r--r--app-arch/plzip/plzip-1.3.ebuild29
-rw-r--r--app-arch/plzip/plzip-1.4.ebuild29
-rw-r--r--app-arch/ppmd/Manifest4
-rw-r--r--app-arch/ppmd/files/ppmd-p10-makefile.patch29
-rw-r--r--app-arch/ppmd/metadata.xml8
-rw-r--r--app-arch/ppmd/ppmd-10.1_p5.ebuild42
-rw-r--r--app-arch/ppmd/ppmd-9.1_p14.ebuild48
-rw-r--r--app-arch/pure-sfv/Manifest1
-rw-r--r--app-arch/pure-sfv/files/pure-sfv-0.3-asneeded.patch11
-rw-r--r--app-arch/pure-sfv/metadata.xml11
-rw-r--r--app-arch/pure-sfv/pure-sfv-0.3-r1.ebuild35
-rw-r--r--app-arch/pxz/Manifest1
-rw-r--r--app-arch/pxz/metadata.xml16
-rw-r--r--app-arch/pxz/pxz-5.0_pre20110811.ebuild25
-rw-r--r--app-arch/pxz/pxz-9999.ebuild44
-rw-r--r--app-arch/rar/Manifest12
-rw-r--r--app-arch/rar/metadata.xml14
-rw-r--r--app-arch/rar/rar-4.2.0.ebuild79
-rw-r--r--app-arch/rar/rar-5.0.0.ebuild79
-rw-r--r--app-arch/rar/rar-5.1.0.ebuild79
-rw-r--r--app-arch/rar/rar-5.2.1.ebuild79
-rw-r--r--app-arch/rpm/Manifest4
-rw-r--r--app-arch/rpm/files/rpm-4.11.0-autotools.patch14
-rw-r--r--app-arch/rpm/files/rpm-4.8.1-db-path.patch26
-rw-r--r--app-arch/rpm/files/rpm-4.9.1.2-libdir.patch31
-rw-r--r--app-arch/rpm/metadata.xml9
-rw-r--r--app-arch/rpm/rpm-4.11.0.1.ebuild118
-rw-r--r--app-arch/rpm/rpm-4.11.1.ebuild118
-rw-r--r--app-arch/rpm/rpm-4.11.2-r1.ebuild120
-rw-r--r--app-arch/rpm/rpm-4.11.2.ebuild118
-rw-r--r--app-arch/rpm/rpm-4.12.0.1.ebuild123
-rw-r--r--app-arch/rpm2targz/Manifest1
-rw-r--r--app-arch/rpm2targz/metadata.xml5
-rw-r--r--app-arch/rpm2targz/rpm2targz-9.0.0.5g.ebuild28
-rw-r--r--app-arch/rzip/Manifest1
-rw-r--r--app-arch/rzip/files/rzip-2.1-darwin.patch163
-rw-r--r--app-arch/rzip/metadata.xml8
-rw-r--r--app-arch/rzip/rzip-2.1-r2.ebuild39
-rw-r--r--app-arch/sharutils/Manifest3
-rw-r--r--app-arch/sharutils/files/sharutils-4.14-popen-rb.patch33
-rw-r--r--app-arch/sharutils/metadata.xml8
-rw-r--r--app-arch/sharutils/sharutils-4.14-r1.ebuild32
-rw-r--r--app-arch/sharutils/sharutils-4.15.1.ebuild32
-rw-r--r--app-arch/sharutils/sharutils-4.15.2.ebuild28
-rw-r--r--app-arch/snappy/Manifest2
-rw-r--r--app-arch/snappy/metadata.xml15
-rw-r--r--app-arch/snappy/snappy-1.1.1.ebuild40
-rw-r--r--app-arch/snappy/snappy-1.1.2-r1.ebuild41
-rw-r--r--app-arch/snappy/snappy-1.1.2.ebuild40
-rw-r--r--app-arch/star/Manifest2
-rw-r--r--app-arch/star/files/star-1.5.1-bufferoverflow.patch21
-rw-r--r--app-arch/star/files/star-1.5.1-changewarnSegv.patch80
-rw-r--r--app-arch/star/files/star-1.5.1-multivolsigsegv.patch12
-rw-r--r--app-arch/star/files/star-1.5.1-stdioconflict.patch92
-rw-r--r--app-arch/star/metadata.xml8
-rw-r--r--app-arch/star/star-1.5.2.ebuild102
-rw-r--r--app-arch/star/star-1.5.3.ebuild100
-rw-r--r--app-arch/stuffit/Manifest1
-rw-r--r--app-arch/stuffit/metadata.xml8
-rw-r--r--app-arch/stuffit/stuffit-5.2.0.611.ebuild66
-rw-r--r--app-arch/tapeutils/Manifest1
-rw-r--r--app-arch/tapeutils/metadata.xml9
-rw-r--r--app-arch/tapeutils/tapeutils-0.4.ebuild25
-rw-r--r--app-arch/tar/Manifest3
-rw-r--r--app-arch/tar/files/rmt8
-rw-r--r--app-arch/tar/files/tar-1.26-no-gets.patch22
-rw-r--r--app-arch/tar/files/tar-1.26-xattr.patch931
-rw-r--r--app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch25
-rw-r--r--app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch196
-rw-r--r--app-arch/tar/files/tar-1.28-concat-listed.patch117
-rw-r--r--app-arch/tar/files/tar-1.28-xattr.patch36
-rw-r--r--app-arch/tar/files/tar.1813
-rw-r--r--app-arch/tar/files/tar.1-1.27388
-rw-r--r--app-arch/tar/metadata.xml11
-rw-r--r--app-arch/tar/tar-1.26-r1.ebuild76
-rw-r--r--app-arch/tar/tar-1.27.1-r2.ebuild79
-rw-r--r--app-arch/tar/tar-1.28-r1.ebuild76
-rw-r--r--app-arch/tar/tar-1.28.ebuild75
-rw-r--r--app-arch/tardelta/Manifest1
-rw-r--r--app-arch/tardelta/metadata.xml10
-rw-r--r--app-arch/tardelta/tardelta-1.0.1.ebuild23
-rw-r--r--app-arch/tardy/Manifest1
-rw-r--r--app-arch/tardy/files/tardy-1.28-test-utc.patch10
-rw-r--r--app-arch/tardy/metadata.xml11
-rw-r--r--app-arch/tardy/tardy-1.28.ebuild33
-rw-r--r--app-arch/tarsync/Manifest1
-rw-r--r--app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch59
-rw-r--r--app-arch/tarsync/files/tarsync-0.2.1-make.patch13
-rw-r--r--app-arch/tarsync/metadata.xml7
-rw-r--r--app-arch/tarsync/tarsync-0.2.1-r1.ebuild34
-rw-r--r--app-arch/threadzip/Manifest1
-rw-r--r--app-arch/threadzip/metadata.xml7
-rw-r--r--app-arch/threadzip/threadzip-1.2-r1.ebuild29
-rw-r--r--app-arch/torrentzip/Manifest1
-rw-r--r--app-arch/torrentzip/files/fix-perms.patch11
-rw-r--r--app-arch/torrentzip/metadata.xml14
-rw-r--r--app-arch/torrentzip/torrentzip-0.2-r1.ebuild37
-rw-r--r--app-arch/unace/Manifest2
-rw-r--r--app-arch/unace/metadata.xml6
-rw-r--r--app-arch/unace/unace-2.5-r3.ebuild31
-rw-r--r--app-arch/unadf/Manifest2
-rw-r--r--app-arch/unadf/files/no.in_path.patch39
-rw-r--r--app-arch/unadf/metadata.xml7
-rw-r--r--app-arch/unadf/unadf-0.7.12.ebuild34
-rw-r--r--app-arch/unadf/unadf-0.7.9b.ebuild40
-rw-r--r--app-arch/unar/Manifest5
-rw-r--r--app-arch/unar/metadata.xml10
-rw-r--r--app-arch/unar/unar-1.1.ebuild40
-rw-r--r--app-arch/unar/unar-1.2.ebuild40
-rw-r--r--app-arch/unar/unar-1.5.ebuild42
-rw-r--r--app-arch/unar/unar-1.6.ebuild42
-rw-r--r--app-arch/unar/unar-1.8.1.ebuild42
-rw-r--r--app-arch/unarj/Manifest1
-rw-r--r--app-arch/unarj/files/unarj-2.65-CAN-2004-0947.patch49
-rw-r--r--app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch9
-rw-r--r--app-arch/unarj/files/unarj-2.65-sanitation.patch126
-rw-r--r--app-arch/unarj/metadata.xml10
-rw-r--r--app-arch/unarj/unarj-2.65.ebuild33
-rw-r--r--app-arch/undms/Manifest2
-rw-r--r--app-arch/undms/metadata.xml7
-rw-r--r--app-arch/undms/undms-1.3-r1.ebuild24
-rw-r--r--app-arch/unlzx/Manifest2
-rw-r--r--app-arch/unlzx/metadata.xml8
-rw-r--r--app-arch/unlzx/unlzx-1.1.ebuild29
-rw-r--r--app-arch/unmakeself/Manifest2
-rw-r--r--app-arch/unmakeself/metadata.xml8
-rw-r--r--app-arch/unmakeself/unmakeself-1.0.ebuild28
-rw-r--r--app-arch/unmakeself/unmakeself-1.1.ebuild25
-rw-r--r--app-arch/unp/Manifest2
-rw-r--r--app-arch/unp/files/unp-2.0_pre7_p1-remove-deprecated-have.diff10
-rw-r--r--app-arch/unp/metadata.xml5
-rw-r--r--app-arch/unp/unp-2.0_pre7.ebuild42
-rw-r--r--app-arch/unp/unp-2.0_pre7_p1.ebuild48
-rw-r--r--app-arch/unrar-gpl/Manifest1
-rw-r--r--app-arch/unrar-gpl/metadata.xml7
-rw-r--r--app-arch/unrar-gpl/unrar-gpl-0.0.1_p20080417-r1.ebuild25
-rw-r--r--app-arch/unrar/Manifest6
-rw-r--r--app-arch/unrar/files/unrar-5.0.2-build.patch45
-rw-r--r--app-arch/unrar/files/unrar-5.2.2-no-auto-clean.patch17
-rw-r--r--app-arch/unrar/metadata.xml8
-rw-r--r--app-arch/unrar/unrar-5.0.14.ebuild56
-rw-r--r--app-arch/unrar/unrar-5.1.6.ebuild60
-rw-r--r--app-arch/unrar/unrar-5.2.1.ebuild60
-rw-r--r--app-arch/unrar/unrar-5.2.2.ebuild62
-rw-r--r--app-arch/unrar/unrar-5.2.3.ebuild62
-rw-r--r--app-arch/unrar/unrar-5.2.7.ebuild62
-rw-r--r--app-arch/unrpa/Manifest1
-rw-r--r--app-arch/unrpa/metadata.xml15
-rw-r--r--app-arch/unrpa/unrpa-1.4.1.ebuild30
-rw-r--r--app-arch/unrpa/unrpa-9999.ebuild30
-rw-r--r--app-arch/unshield/Manifest1
-rw-r--r--app-arch/unshield/files/unshield-bootstrap.patch32
-rw-r--r--app-arch/unshield/metadata.xml12
-rw-r--r--app-arch/unshield/unshield-0.6_p20120308.ebuild39
-rw-r--r--app-arch/unzip/Manifest2
-rw-r--r--app-arch/unzip/files/unzip-5.52-CVE-2008-0888.patch35
-rw-r--r--app-arch/unzip/files/unzip-5.52-no-exec-stack.patch13
-rw-r--r--app-arch/unzip/files/unzip-6.0-natspec.patch382
-rw-r--r--app-arch/unzip/files/unzip-6.0-no-exec-stack.patch13
-rw-r--r--app-arch/unzip/metadata.xml11
-rw-r--r--app-arch/unzip/unzip-5.52-r2.ebuild58
-rw-r--r--app-arch/unzip/unzip-6.0-r1.ebuild70
-rw-r--r--app-arch/unzip/unzip-6.0-r2.ebuild71
-rw-r--r--app-arch/unzip/unzip-6.0-r3.ebuild72
-rw-r--r--app-arch/upx-bin/Manifest5
-rw-r--r--app-arch/upx-bin/metadata.xml9
-rw-r--r--app-arch/upx-bin/upx-bin-3.91.ebuild37
-rw-r--r--app-arch/upx-ucl/Manifest2
-rw-r--r--app-arch/upx-ucl/metadata.xml11
-rw-r--r--app-arch/upx-ucl/upx-ucl-3.91.ebuild44
-rw-r--r--app-arch/vimball/Manifest1
-rw-r--r--app-arch/vimball/metadata.xml12
-rw-r--r--app-arch/vimball/vimball-0.5.1.ebuild30
-rw-r--r--app-arch/vimball/vimball-9999.ebuild30
-rw-r--r--app-arch/xar/Manifest1
-rw-r--r--app-arch/xar/files/xar-1.5.2-automagic_acl_and_bzip2.patch46
-rw-r--r--app-arch/xar/files/xar-1.5.2-respect_ldflags.patch21
-rw-r--r--app-arch/xar/metadata.xml21
-rw-r--r--app-arch/xar/xar-1.5.2-r1.ebuild36
-rw-r--r--app-arch/xarchiver/Manifest1
-rw-r--r--app-arch/xarchiver/files/xarchiver-0.5.3-add-mime-types.patch17
-rw-r--r--app-arch/xarchiver/files/xarchiver-0.5.3-fix-password-protected.patch42
-rw-r--r--app-arch/xarchiver/files/xarchiver-0.5.3-fix-rpm-support.patch86
-rw-r--r--app-arch/xarchiver/metadata.xml11
-rw-r--r--app-arch/xarchiver/xarchiver-0.5.4.ebuild56
-rw-r--r--app-arch/xdms/Manifest1
-rw-r--r--app-arch/xdms/metadata.xml14
-rw-r--r--app-arch/xdms/xdms-1.3.2.ebuild30
-rw-r--r--app-arch/xz-utils/Manifest5
-rw-r--r--app-arch/xz-utils/metadata.xml5
-rw-r--r--app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild73
-rw-r--r--app-arch/xz-utils/xz-utils-5.0.7.ebuild73
-rw-r--r--app-arch/xz-utils/xz-utils-5.0.8.ebuild73
-rw-r--r--app-arch/xz-utils/xz-utils-5.2.0.ebuild73
-rw-r--r--app-arch/xz-utils/xz-utils-5.2.1-r1.ebuild74
-rw-r--r--app-arch/xz-utils/xz-utils-9999.ebuild74
-rw-r--r--app-arch/zip/Manifest2
-rw-r--r--app-arch/zip/files/zip-2.3-unix_configure-pic.patch12
-rw-r--r--app-arch/zip/files/zip-2.31-exec-stack.patch20
-rw-r--r--app-arch/zip/files/zip-2.32-build.patch89
-rw-r--r--app-arch/zip/files/zip-3.0-build.patch36
-rw-r--r--app-arch/zip/files/zip-3.0-exec-stack.patch22
-rw-r--r--app-arch/zip/files/zip-3.0-format-security.patch20
-rw-r--r--app-arch/zip/files/zip-3.0-natspec.patch214
-rw-r--r--app-arch/zip/files/zip-3.0-no-crypt.patch57
-rw-r--r--app-arch/zip/files/zip-3.0-pic.patch15
-rw-r--r--app-arch/zip/files/zip-3.0-zipnote-freeze.patch61
-rw-r--r--app-arch/zip/metadata.xml12
-rw-r--r--app-arch/zip/zip-2.32-r1.ebuild43
-rw-r--r--app-arch/zip/zip-3.0-r1.ebuild52
-rw-r--r--app-arch/zip/zip-3.0-r2.ebuild61
-rw-r--r--app-arch/zip/zip-3.0-r3.ebuild63
-rw-r--r--app-arch/zip/zip-3.0.ebuild51
-rw-r--r--app-arch/zoo/Manifest2
-rw-r--r--app-arch/zoo/files/zoo-2.10-CAN-2005-2349.patch36
-rw-r--r--app-arch/zoo/files/zoo-2.10-febz-183426.patch16
-rw-r--r--app-arch/zoo/files/zoo-2.10-gentoo-fbsd.patch25
-rw-r--r--app-arch/zoo/files/zoo-2.10-multiple-dos-fix.patch71
-rw-r--r--app-arch/zoo/files/zoo-2.10-security_pathsize.patch23
-rw-r--r--app-arch/zoo/metadata.xml8
-rw-r--r--app-arch/zoo/zoo-2.10-r4.ebuild37
-rw-r--r--app-arch/zopfli/Manifest3
-rw-r--r--app-arch/zopfli/metadata.xml14
-rw-r--r--app-arch/zopfli/zopfli-1.0.0.ebuild34
-rw-r--r--app-arch/zopfli/zopfli-1.0.0_p20140705.ebuild26
-rw-r--r--app-arch/zopfli/zopfli-1.0.0_p20141006.ebuild26
-rw-r--r--app-arch/zpaq-extras/Manifest13
-rw-r--r--app-arch/zpaq-extras/metadata.xml8
-rw-r--r--app-arch/zpaq-extras/zpaq-extras-2.ebuild66
-rw-r--r--app-arch/zpaq-extras/zpaq-extras-3.ebuild67
-rw-r--r--app-arch/zpaq/Manifest4
-rw-r--r--app-arch/zpaq/files/zpaq-4-autotools.patch307
-rw-r--r--app-arch/zpaq/metadata.xml8
-rw-r--r--app-arch/zpaq/zpaq-6.41.ebuild45
-rw-r--r--app-arch/zpaq/zpaq-6.49.ebuild44
-rw-r--r--app-arch/zpaq/zpaq-6.53.ebuild44
-rw-r--r--app-arch/zpaq/zpaq-7.04.ebuild44
-rw-r--r--app-arch/zpipe/Manifest1
-rw-r--r--app-arch/zpipe/metadata.xml8
-rw-r--r--app-arch/zpipe/zpipe-2.01-r1.ebuild30
556 files changed, 20743 insertions, 0 deletions
diff --git a/app-arch/advancecomp/Manifest b/app-arch/advancecomp/Manifest
new file mode 100644
index 000000000000..0354d4734c70
--- /dev/null
+++ b/app-arch/advancecomp/Manifest
@@ -0,0 +1,4 @@
+DIST advancecomp-1.15.tar.gz 259340 SHA256 0d235c78224d450666bdd852a301159d53b9570e9cd28f015e222797ba4d5fe1 SHA512 18d6abb4c739c16e340bad2e87f89b545d0ecb660897a109a038b2a236bab6ce3d3b3ad572839fb4ce7981c5f150d8ed2447654291a8d808bbb85e70152e47ba WHIRLPOOL 34b44dd464092f442d5b9945e97abb4cd6fee1363c61df7573792d6a315cdab64197653b63c545b55587f37da7353e68d4cc3e26cbad961e700729b0a3f76aa2
+DIST advancecomp-1.16.tar.gz 280510 SHA256 de5617d561935f41522f04e332d9db01f910c2acb3eb231d2fb0774a86539bc0 SHA512 51e80758bb290a59b1d2faaccd7b0ead18ce6abfd85e47a57d3123e80334fe0676d4e6ec82496c228db4aef46a18050409811c7f74c833b7aa52bc57ff4aaae5 WHIRLPOOL 90e1c5c2c48dde3d9646691a92188ff28f58fd11a1e632492882e190a7090364d8bc9018e219d55eb5cf67e69e4bd54edbd4c5ac012afa556fdeb03acd8721ec
+DIST advancecomp-1.17.tar.gz 1189646 SHA256 856d064e064c6105986b7cc29d6e2cba477e9ffca4a8830631161f5e7cd18e82 SHA512 8a75204ae98e3b0a55eea2ba82f23a31203d052b568031529b08bcd3028a241c64e30537db6d360d1a7717a7d0f8ea087340121c0224e288abd62267abe7287d WHIRLPOOL fc2ef6b9b767f8a9cffbe4f8493ca279aec1883b105845a284f8c7c88168c36552e14d50fbc5953fa2fc4b60b6b5af9ae8dbafde4c04217693993b44fbfdc185
+DIST advancecomp-1.19.tar.gz 1193228 SHA256 d594c50c3da356aa961f75b00e958a4ed1e142c6530b42926092e46419af3047 SHA512 9bce761f315e94ea9ebe59273cc810297e6227d914b498501f159f05c3a002236570c2d4248b397c5cdd3cf9a60565bb8d7f1470b079d5f50249031d3c78348d WHIRLPOOL cbf67f173d4cac1ef90266c5dfc9f8b65903828de26bdbafa467aada602d5858eb5eeeddaba08d665dad8a829d394e60d67bb6100322fa501c7d80144e74e91f
diff --git a/app-arch/advancecomp/advancecomp-1.15.ebuild b/app-arch/advancecomp/advancecomp-1.15.ebuild
new file mode 100644
index 000000000000..cd7939ba0ba7
--- /dev/null
+++ b/app-arch/advancecomp/advancecomp-1.15.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Recompress ZIP, PNG and MNG using deflate 7-Zip, considerably improving compression"
+HOMEPAGE="http://advancemame.sourceforge.net/comp-readme.html"
+SRC_URI="mirror://sourceforge/advancemame/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd"
+IUSE="png mng"
+
+DEPEND="sys-libs/zlib
+ app-arch/bzip2"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test" #282441
+
+src_prepare() {
+ # bzip2 support wont compile, here's a quick patch.
+ epatch "${FILESDIR}"/${PN}-1.13-bzip2-compile-plz-k-thx.diff
+}
+
+src_configure() {
+ econf --enable-bzip2
+}
+
+src_install() {
+ dobin advdef advzip
+
+ if use png; then
+ dobin advpng
+ doman doc/advpng.1
+ fi
+
+ if use mng; then
+ dobin advmng
+ doman doc/advmng.1
+ fi
+
+ dodoc HISTORY AUTHORS README
+ doman doc/advdef.1 doc/advzip.1
+}
diff --git a/app-arch/advancecomp/advancecomp-1.16.ebuild b/app-arch/advancecomp/advancecomp-1.16.ebuild
new file mode 100644
index 000000000000..2061e9417dcf
--- /dev/null
+++ b/app-arch/advancecomp/advancecomp-1.16.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Recompress ZIP, PNG and MNG using deflate 7-Zip, considerably improving compression"
+HOMEPAGE="http://advancemame.sourceforge.net/comp-readme.html"
+SRC_URI="mirror://sourceforge/advancemame/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="png mng"
+
+DEPEND="
+ app-arch/bzip2
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test" #282441
+
+src_configure() {
+ econf --enable-bzip2
+}
+
+src_install() {
+ dobin advdef advzip
+
+ if use png; then
+ dobin advpng
+ doman doc/advpng.1
+ fi
+
+ if use mng; then
+ dobin advmng
+ doman doc/advmng.1
+ fi
+
+ dodoc HISTORY AUTHORS README
+ doman doc/advdef.1 doc/advzip.1
+}
diff --git a/app-arch/advancecomp/advancecomp-1.17.ebuild b/app-arch/advancecomp/advancecomp-1.17.ebuild
new file mode 100644
index 000000000000..25f0ab661094
--- /dev/null
+++ b/app-arch/advancecomp/advancecomp-1.17.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Recompress ZIP, PNG and MNG using deflate 7-Zip, considerably improving compression"
+HOMEPAGE="http://advancemame.sourceforge.net/comp-readme.html"
+SRC_URI="mirror://sourceforge/project/advancemame/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="mng png test"
+
+RDEPEND="app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ test? (
+ app-text/tofrodos
+ dev-util/valgrind
+ )"
+
+#RESTRICT="test" #282441
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-bzip2-compile.patch
+}
+
+src_configure() {
+ econf --enable-bzip2 \
+ $(use_enable test valgrind)
+}
+
+src_install() {
+ dobin advdef advzip
+
+ if use png; then
+ dobin advpng
+ doman doc/advpng.1
+ fi
+
+ if use mng; then
+ dobin advmng
+ doman doc/advmng.1
+ fi
+
+ dodoc HISTORY AUTHORS README
+ doman doc/advdef.1 doc/advzip.1
+}
diff --git a/app-arch/advancecomp/advancecomp-1.19.ebuild b/app-arch/advancecomp/advancecomp-1.19.ebuild
new file mode 100644
index 000000000000..a5ea44e1117e
--- /dev/null
+++ b/app-arch/advancecomp/advancecomp-1.19.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Recompress ZIP, PNG and MNG using deflate 7-Zip, considerably improving compression"
+HOMEPAGE="http://advancemame.sourceforge.net/comp-readme.html"
+SRC_URI="mirror://sourceforge/project/advancemame/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="mng png test"
+
+RDEPEND="app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+# test? (
+# app-text/tofrodos
+# dev-util/valgrind
+# )"
+
+RESTRICT="test" #282441, #523212
+
+src_configure() {
+ econf --enable-bzip2 \
+ $(use_enable test valgrind)
+}
+
+src_install() {
+ dobin advdef advzip
+
+ if use png; then
+ dobin advpng
+ doman doc/advpng.1
+ fi
+
+ if use mng; then
+ dobin advmng
+ doman doc/advmng.1
+ fi
+
+ dodoc HISTORY AUTHORS README
+ doman doc/advdef.1 doc/advzip.1
+}
diff --git a/app-arch/advancecomp/files/advancecomp-1.13-bzip2-compile-plz-k-thx.diff b/app-arch/advancecomp/files/advancecomp-1.13-bzip2-compile-plz-k-thx.diff
new file mode 100644
index 000000000000..f20bba3373a2
--- /dev/null
+++ b/app-arch/advancecomp/files/advancecomp-1.13-bzip2-compile-plz-k-thx.diff
@@ -0,0 +1,61 @@
+--- advancecomp-1.13.orig/compress.cc 2004-12-16 23:19:17.779774920 -0200
++++ advancecomp-1.13/compress.cc 2004-12-16 23:36:05.356599960 -0200
+@@ -181,16 +181,17 @@
+ }
+
+ #if USE_BZIP2
+-bool compress_bzip2(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned& out_size, int blocksize, int workfactor)
++
++bool compress_bzip2(const char* in_data, unsigned in_size, char* out_data, unsigned& out_size, int blocksize, int workfactor)
+ {
+- return BZ2_bzBuffToBuffCompress(out_data, &out_size, const_cast<unsigned char*>(in_data), in_size, blocksize, 0, workfactor) == BZ_OK;
++ return BZ2_bzBuffToBuffCompress(out_data,&out_size,const_cast<char*>(in_data),in_size,blocksize,0,workfactor) == BZ_OK;
+ }
+
+-bool decompress_bzip2(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned out_size)
++bool decompress_bzip2(const char* in_data, unsigned in_size, char* out_data, unsigned out_size)
+ {
+ unsigned size = out_size;
+
+- if (BZ2_bzBuffToBuffDecompress(out_data, &size, const_cast<unsigned char*>(in_data), in_size, 0, 0)!=BZ_OK)
++ if (BZ2_bzBuffToBuffDecompress(out_data,&size,const_cast< char*>(in_data),in_size,0,0)!=BZ_OK)
+ return false;
+
+ if (size != out_size)
+--- advancecomp-1.13.orig/compress.h 2004-12-16 23:19:17.778775072 -0200
++++ advancecomp-1.13/compress.h 2004-12-16 23:37:00.178265800 -0200
+@@ -37,8 +37,8 @@
+ bool decompress_deflate_zlib(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned out_size);
+ bool compress_deflate_zlib(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned& out_size, int compression_level, int strategy, int mem_level);
+
+-bool decompress_bzip2(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned out_size);
+-bool compress_bzip2(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned& out_size, int blocksize, int workfactor);
++bool decompress_bzip2(const char* in_data, unsigned in_size, char* out_data, unsigned out_size);
++bool compress_bzip2(const char* in_data, unsigned in_size, char* out_data, unsigned& out_size, int blocksize, int workfactor);
+
+ bool decompress_rfc1950_zlib(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned out_size);
+ bool compress_rfc1950_zlib(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned& out_size, int compression_level, int strategy, int mem_level);
+--- advancecomp-1.13.orig/stamp-h1 1969-12-31 21:00:00.000000000 -0300
++++ advancecomp-1.13/stamp-h1 2004-12-16 23:37:46.906162080 -0200
+@@ -0,0 +1 @@
++timestamp for config.h
+--- advancecomp-1.13.orig/zipsh.cc 2004-12-16 23:19:17.779774920 -0200
++++ advancecomp-1.13/zipsh.cc 2004-12-16 23:39:30.099474312 -0200
+@@ -39,7 +39,7 @@
+ }
+ #ifdef USE_BZIP2
+ } else if (info.compression_method == ZIP_METHOD_BZIP2) {
+- if (!decompress_bzip2(data, compressed_size_get(), uncompressed_data, uncompressed_size_get())) {
++ if (!decompress_bzip2((char *)data,compressed_size_get(),(char *)uncompressed_data,uncompressed_size_get())) {
+ throw error_invalid() << "Invalid compressed data on file " << name_get();
+ }
+ #endif
+@@ -247,7 +247,7 @@
+ c1_met = ZIP_METHOD_BZIP2;
+ c1_fla = 0;
+
+- if (!compress_bzip2(uncompressed_data, uncompressed_size_get(), c1_data, c1_size, bzip2_level, bzip2_workfactor)) {
++ if (!compress_bzip2((char *)uncompressed_data,uncompressed_size_get(),(char *)c1_data,c1_size,bzip2_level,bzip2_workfactor)) {
+ data_free(c1_data);
+ c1_data = 0;
+ }
diff --git a/app-arch/advancecomp/files/advancecomp-1.17-bzip2-compile.patch b/app-arch/advancecomp/files/advancecomp-1.17-bzip2-compile.patch
new file mode 100644
index 000000000000..726c63cf532d
--- /dev/null
+++ b/app-arch/advancecomp/files/advancecomp-1.17-bzip2-compile.patch
@@ -0,0 +1,16 @@
+--- advancecomp-1.17/zipsh.cc
++++ advancecomp-1.17/zipsh.cc
+@@ -215,11 +215,11 @@
+ }
+
+ #if USE_BZIP2
+- if (level != shrink_fast && !standard) {
++ if (level.level != shrink_fast && !standard) {
+ unsigned bzip2_level;
+ unsigned bzip2_workfactor;
+
+- switch (level) {
++ switch (level.level) {
+ case shrink_normal :
+ bzip2_level = 6;
+ bzip2_workfactor = 30;
diff --git a/app-arch/advancecomp/metadata.xml b/app-arch/advancecomp/metadata.xml
new file mode 100644
index 000000000000..50789f6b11fe
--- /dev/null
+++ b/app-arch/advancecomp/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+ AdvanceCOMP is a set of recompression utilities for .PNG, .MNG, .ZIP
+ and .GZ files
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">advancemame</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/afio/Manifest b/app-arch/afio/Manifest
new file mode 100644
index 000000000000..5e4bed0692e5
--- /dev/null
+++ b/app-arch/afio/Manifest
@@ -0,0 +1,2 @@
+DIST afio-2.5.1.tgz 191765 SHA256 363457a5d6ee422d9b704ef56d26369ca5ee671d7209cfe799cab6e30bf2b99a SHA512 afa4e01cc9e7da5bff7c96d2da9a41c296e7b89c50484f58a8b011173a99a144a9e77d3ee8136622e490287b99a7ae76c6eba901a2186b5a3a6bab164a37c864 WHIRLPOOL 15ad4ec743a2b4ac1b9ca37a5680f2f08fee7dd9cfe22d7a1b1949b4958447365e67096c8123e82a0f41f106ec6e73024152cc05121855a1c5d75589a734a764
+DIST afio-2.5.tgz 179184 SHA256 e7801a0f0a8dcbae41f4156dee5dae2a34a558d6c3ceac517efad4fed610ff2e SHA512 8e8fba115989b60284d09fb37b8f4782b6adc4a0887a05544615a38e62c6b3a48c3194b53ea4496fea64b25d420ff89cf6faab31646998f3612082118fcbb052 WHIRLPOOL 9ee08583d4e64ca6984b66e81eda5f422b89c3da13e130d1c9c7f8b2f78090f37b10fbdbfdda6e0dc30c7183813912d4021ff74d198bdf7203fc516425c40df5
diff --git a/app-arch/afio/afio-2.5.1.ebuild b/app-arch/afio/afio-2.5.1.ebuild
new file mode 100644
index 000000000000..c8614d59e70c
--- /dev/null
+++ b/app-arch/afio/afio-2.5.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="makes cpio-format archives and deals somewhat gracefully with input data corruption"
+HOMEPAGE="http://members.chello.nl/k.holtman/afio.html"
+SRC_URI="http://members.chello.nl/k.holtman/${P}.tgz"
+
+LICENSE="Artistic LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/Makefile-r1.patch
+ tc-export CC
+}
+
+src_install() {
+ local i
+ dobin afio
+ dodoc ANNOUNCE-* HISTORY README SCRIPTS
+ for i in 1 2 3 4; do
+ docinto script$i
+ dodoc script$i/*
+ done
+ doman afio.1
+}
diff --git a/app-arch/afio/afio-2.5.ebuild b/app-arch/afio/afio-2.5.ebuild
new file mode 100644
index 000000000000..54998b5776bf
--- /dev/null
+++ b/app-arch/afio/afio-2.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="makes cpio-format archives and deals somewhat gracefully with input data corruption"
+HOMEPAGE="http://freshmeat.net/projects/afio/"
+SRC_URI="http://members.brabant.chello.nl/~k.holtman/${P}.tgz"
+
+LICENSE="Artistic LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ppc sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/Makefile.patch
+ # use our cflags
+ sed -i \
+ -e "s:-O2 -fomit-frame-pointer:${CFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ local i
+ dobin afio || die "dobin failed"
+ dodoc ANNOUNCE-2.5 HISTORY README SCRIPTS
+ for i in 1 2 3 4 5 ; do
+ docinto script$i
+ dodoc script$i/*
+ done
+ doman afio.1
+}
diff --git a/app-arch/afio/files/Makefile-r1.patch b/app-arch/afio/files/Makefile-r1.patch
new file mode 100644
index 000000000000..70ec6caa4b90
--- /dev/null
+++ b/app-arch/afio/files/Makefile-r1.patch
@@ -0,0 +1,23 @@
+diff -urN afio-2.5.1.orig/Makefile afio-2.5.1/Makefile
+--- afio-2.5.1.orig/Makefile 2012-02-05 14:52:24.000000000 +0100
++++ afio-2.5.1/Makefile 2012-03-11 14:02:16.267636685 +0100
+@@ -71,15 +71,12 @@
+ MW=
+ #MW=-Wtraditional -Wcast-qual -Wcast-align -Wconversion -pedantic -Wlong-long -Wimplicit -Wuninitialized -W -Wshadow -Wsign-compare -Wstrict-prototypes -Wmissing-declarations
+
+-CFLAGS1 = -Wall -Wstrict-prototypes -s -O2 -fomit-frame-pointer ${LARGEFILEFLAGS} ${MW}
+-
+-CC=gcc
+-
+-CFLAGS = ${CFLAGS1} $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e ${e2} $f $g $I
+-LDFLAGS =
++CC?=gcc
++CFLAGS+=-Wall -Wstrict-prototypes -s ${LARGEFILEFLAGS} ${2} ${3} ${6} ${8} ${c} ${d} ${e2} ${f} ${g}
++LDFLAGS+=
+
+ afio : afio.o compfile.o exten.o match.o $M
+- ${CC} ${LDFLAGS} afio.o compfile.o exten.o match.o $M -o afio
++ ${CC} ${CFLAGS} ${LDFLAGS} afio.o compfile.o exten.o match.o $M -o afio
+
+ clean:
+ rm -f *.o afio
diff --git a/app-arch/afio/files/Makefile.patch b/app-arch/afio/files/Makefile.patch
new file mode 100644
index 000000000000..537c29939fa2
--- /dev/null
+++ b/app-arch/afio/files/Makefile.patch
@@ -0,0 +1,25 @@
+--- Makefile.orig 2003-11-10 00:11:50.000000000 -0800
++++ Makefile 2003-11-10 00:13:47.000000000 -0800
+@@ -1,4 +1,22 @@
+ SHELL=/bin/sh
++1=
++2=
++3=
++4=
++5=
++6=
++7=
++8=
++9=
++a=
++b=
++c=
++d=
++e=
++f=
++g=
++M=
++I=
+ ##
+ ## I wrote this Makefile, based on comments in the source. -rich $alz.
+ ## Define INDEX to use index() in place of strchr() (v7, BSD).
diff --git a/app-arch/afio/metadata.xml b/app-arch/afio/metadata.xml
new file mode 100644
index 000000000000..9dc430496357
--- /dev/null
+++ b/app-arch/afio/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Afio makes cpio-format archives. It deals somewhat gracefully
+with input data corruption, supports multi-volume archives during interactive
+operation, and can make compressed archives that are much safer than compressed
+tar or cpio archives. Afio is best used as an 'archive engine' in a backup
+script.
+</longdescription>
+ <upstream>
+ <remote-id type="freshmeat">afio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/alien/Manifest b/app-arch/alien/Manifest
new file mode 100644
index 000000000000..7314212ab69c
--- /dev/null
+++ b/app-arch/alien/Manifest
@@ -0,0 +1,3 @@
+DIST alien_8.89.tar.gz 64478 SHA256 35d237e3a08fb86ae83b1b6d941aa696e1dff5b5c8eb83fa818995f15527e4d8 SHA512 55e8b99900f7f940bb4e38469ca10f02be20a4fb097f3d66649e50ab4dfc11a3c8aeaacca862872c02c68c482e1967ea0b12302e9660fbc7d920591bcd4be9ca WHIRLPOOL 2d4025819c824ad1a218ae0b4ba5ed837f5c8d2b7b5aaf2e94c71b2ddb21c47e8054e3d1b83cdd30022123ffa2dea1e0d5423793617b812d14d9ffca99d37715
+DIST alien_8.90.tar.gz 65014 SHA256 a520f0c6e1e0f8340712cc80a80b41d426b3034c41dfa256268f51beee3d75d7 SHA512 ca96a2b1039966f3bf5bc624cc9880d3426d9823ba8f8d8021c27bf1605b8072abbbf9befeb45e3210742cff51dff9beda9c636c592d230aac0e3c780ba2a83b WHIRLPOOL f88e2be871b04b98a4a495abd655ec09cb0c58c1aa5a7820da6986466ec61597bf243d42fbc871de6dd01cb29cb6f1a8a63798cf6ff8a6f8dd2eab0b7edc3ed3
+DIST alien_8.93.tar.gz 65289 SHA256 deb4e0c590ea7c44f2bc806b2c4cde6abbef32017ae6d06ee30539ae28faf896 SHA512 bb38286b5b2000d0cceecc19a03ed65c40b31b48ce22d16ecf5f082883dac87822abdf2897edccd959429d45efb257d76d4f833c188e9f22b6f7cc526f80c0f9 WHIRLPOOL c6710d8582b882a0c963ad0dc6ee362c7e02a55384ddbe25ddc079d22878009c59274febeba4c038e4be707f2ea7f4d92a833eddb603bcde9da05cae5b804a09
diff --git a/app-arch/alien/alien-8.89.ebuild b/app-arch/alien/alien-8.89.ebuild
new file mode 100644
index 000000000000..1a526af5236d
--- /dev/null
+++ b/app-arch/alien/alien-8.89.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Converts between the rpm, dpkg, stampede slp, and slackware tgz file formats"
+HOMEPAGE="http://kitenet.net/programs/alien"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ~ppc64 x86"
+IUSE="+bzip2"
+
+RDEPEND="app-arch/rpm
+ app-arch/dpkg
+ bzip2? ( app-arch/bzip2 )
+ dev-util/debhelper
+ >=app-arch/tar-1.14.91"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ sed -e s%'$(VARPREFIX)'%${D}% -e s%'$(PREFIX)'%${D}/usr%g \
+ -i "${S}"/Makefile.PL || die "sed failed."
+}
diff --git a/app-arch/alien/alien-8.90.ebuild b/app-arch/alien/alien-8.90.ebuild
new file mode 100644
index 000000000000..05808dfb9920
--- /dev/null
+++ b/app-arch/alien/alien-8.90.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Converts between the rpm, dpkg, stampede slp, and slackware tgz file formats"
+HOMEPAGE="http://kitenet.net/programs/alien"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ~ppc64 x86"
+IUSE="+bzip2"
+
+RDEPEND="app-arch/rpm
+ app-arch/dpkg
+ bzip2? ( app-arch/bzip2 )
+ dev-util/debhelper
+ >=app-arch/tar-1.14.91"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ sed -e s%'$(VARPREFIX)'%${D}% -e s%'$(PREFIX)'%${D}/usr%g \
+ -i "${S}"/Makefile.PL || die "sed failed."
+}
diff --git a/app-arch/alien/alien-8.93.ebuild b/app-arch/alien/alien-8.93.ebuild
new file mode 100644
index 000000000000..07011917d690
--- /dev/null
+++ b/app-arch/alien/alien-8.93.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Converts between the rpm, dpkg, stampede slp, and slackware tgz file formats"
+HOMEPAGE="http://kitenet.net/programs/alien"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="+bzip2"
+
+RDEPEND="app-arch/rpm
+ app-arch/dpkg
+ bzip2? ( app-arch/bzip2 )
+ dev-util/debhelper
+ >=app-arch/tar-1.14.91"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ sed -e s%'$(VARPREFIX)'%${D}% -e s%'$(PREFIX)'%${D}/usr%g \
+ -i "${S}"/Makefile.PL || die "sed failed."
+}
diff --git a/app-arch/alien/metadata.xml b/app-arch/alien/metadata.xml
new file mode 100644
index 000000000000..312ed3cbc3a1
--- /dev/null
+++ b/app-arch/alien/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer><email>lordvan@gentoo.org</email></maintainer>
+ <maintainer><email>monsieurp@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/app-arch/arc/Manifest b/app-arch/arc/Manifest
new file mode 100644
index 000000000000..c873b2daba44
--- /dev/null
+++ b/app-arch/arc/Manifest
@@ -0,0 +1 @@
+DIST arc-5.21p.tar.gz 84791 SHA256 eacf870a245f155a4ba8c6f8e0fbb2e8a267aafa157f56ba7a8cb1d74fd8b5a1 SHA512 c70c01ec407cc27f6507e2715d8b553277609cb49369a1e65a83d007362a24b69bb09ef2bf168ee36ca6797bd4524644a89e9114d866351ae53fece193c2967c WHIRLPOOL 307cb7fc3b3760f39c2746ba755f256bfebe615159dc0f4401ea8e54560d8c8d17610731a8475e8c9497d52341012a8c13f14737f89847bb7d78fa2cc2c42a8b
diff --git a/app-arch/arc/arc-5.21p.ebuild b/app-arch/arc/arc-5.21p.ebuild
new file mode 100644
index 000000000000..6c8ed4484b3b
--- /dev/null
+++ b/app-arch/arc/arc-5.21p.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Create & extract files from DOS .ARC files"
+HOMEPAGE="http://arc.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P/p/m}-darwin.patch \
+ "${FILESDIR}"/${P/p/m}-gentoo-fbsd.patch \
+ "${FILESDIR}"/${P/p/o}-interix.patch
+ sed -i Makefile \
+ -e 's/CFLAGS = $(OPT) $(SYSTEM)/CFLAGS += $(SYSTEM)/' \
+ || die "sed Makefile"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" OPT="${LDFLAGS}" || die "emake failed."
+}
+
+src_install() {
+ dobin arc marc
+ doman arc.1
+ dodoc Arc521.doc Arcinfo Changelog Readme
+}
diff --git a/app-arch/arc/files/arc-5.21m-darwin.patch b/app-arch/arc/files/arc-5.21m-darwin.patch
new file mode 100644
index 000000000000..fb1eb5ea2598
--- /dev/null
+++ b/app-arch/arc/files/arc-5.21m-darwin.patch
@@ -0,0 +1,11 @@
+--- arc-5.21m/tmclock.c
++++ arc-5.21m/tmclock.c
+@@ -14,7 +14,7 @@
+ /* Julian day number of the Unix* clock's origin, 01 Jan 1970. */
+ #define JD1970 2440587L
+ #define CENTURY 19
+-#if BSD
++#if BSD || defined(__MACH_O__)
+ #include <sys/time.h>
+ #else
+ #include <time.h>
diff --git a/app-arch/arc/files/arc-5.21m-gentoo-fbsd.patch b/app-arch/arc/files/arc-5.21m-gentoo-fbsd.patch
new file mode 100644
index 000000000000..552bfd14edd7
--- /dev/null
+++ b/app-arch/arc/files/arc-5.21m-gentoo-fbsd.patch
@@ -0,0 +1,12 @@
+--- tmclock.c 2005-09-21 18:39:57 +0200
++++ tmclock.c.new 2007-06-16 15:58:26 +0200
+@@ -18,8 +18,10 @@
+ #include <sys/time.h>
+ #else
+ #include <time.h>
++#ifdef timezone
+ extern long timezone; /* should be in <time.h>, but isn't on Sun */
+ #endif
++#endif
+
+ long tzone; \ No newline at end of file
diff --git a/app-arch/arc/files/arc-5.21o-interix.patch b/app-arch/arc/files/arc-5.21o-interix.patch
new file mode 100644
index 000000000000..f95aee85e37d
--- /dev/null
+++ b/app-arch/arc/files/arc-5.21o-interix.patch
@@ -0,0 +1,12 @@
+diff -ru arc-5.21o.orig/arcdos.c arc-5.21o/arcdos.c
+--- arc-5.21o.orig/arcdos.c 2008-03-30 15:44:53 +0200
++++ arc-5.21o/arcdos.c 2008-03-30 15:45:51 +0200
+@@ -30,7 +30,7 @@
+ #if UNIX
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#if BSD
++#if BSD || defined(__INTERIX)
+ #include <sys/time.h>
+ #else
+ #include <time.h> /* Sys V. Bleah. */
diff --git a/app-arch/arc/metadata.xml b/app-arch/arc/metadata.xml
new file mode 100644
index 000000000000..0e81bff44113
--- /dev/null
+++ b/app-arch/arc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>A program that is able to create and extract files form the DOS .ARC file</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">arc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/arj/Manifest b/app-arch/arj/Manifest
new file mode 100644
index 000000000000..dfe3e7534a37
--- /dev/null
+++ b/app-arch/arj/Manifest
@@ -0,0 +1,3 @@
+DIST arj_3.10.22-10.debian.tar.gz 12200 SHA256 0636c97817cf7328f43f541edfbb5ed59435daddee6febb4ffb8f7149543a983 SHA512 f4666a9dcaad3b5f49dbecfcac658d3ba3640fd885d2a378339c4c1c365019a5aa3a78935d9478d94a3ed80a9fda5d2b5ff02e5edfcad48597bee07662be560b WHIRLPOOL 617ca21734a325f0636dbe81d3cb7e78c8dcc4db20ce8848f6c46742bfed1c30563d979e3323d23fbfd9477c3c9821bd4ef5f9c9d0a6b1b1517fcc5aa9397627
+DIST arj_3.10.22-9.debian.tar.gz 11160 SHA256 3ca3437f48f6a17b6fe3fe9526d2029dc30a1f22d7a5c5df5bb6140b5fe9255a SHA512 d0b41584b8771ab757b7a90a697b4cc8099bc0657a0bfb3187db74f7626f5ffe249e9362d2acbe6bf86ddaf7fa5e97c936019112828608b489621bdc4eaf36e5 WHIRLPOOL f8a28d14dea45ed38cf30b79b88805b3981344ac30bd8e48aff468e7d5d63812da4eaf34090f2a2064b383fe4cc39d1547c01c3a8da081f8827442bcb59be93f
+DIST arj_3.10.22.orig.tar.gz 431467 SHA256 589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db SHA512 4730dfdbab4f8095396c337578ed69bdaae52955ad468db50b52af8ad2846ecd6cfc05eb3ac0d03838c1c32ea60126f14a22b93e8181c06b9546456f3937ff76 WHIRLPOOL 86223959a938898126c544a75cbc0c4885777fe2eda3ccad2bbae47f8e3a31a409e2dca0dbbde8333e8c2ac77a1f350c7d95bbcba002f88ee94420f31d957319
diff --git a/app-arch/arj/arj-3.10.22-r3.ebuild b/app-arch/arj/arj-3.10.22-r3.ebuild
new file mode 100644
index 000000000000..b713c8809398
--- /dev/null
+++ b/app-arch/arj/arj-3.10.22-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit autotools eutils multilib toolchain-funcs
+
+PATCH_LEVEL=9
+
+DESCRIPTION="Utility for opening arj archives"
+HOMEPAGE="http://arj.sourceforge.net"
+SRC_URI="mirror://debian/pool/main/a/arj/${P/-/_}.orig.tar.gz
+ mirror://debian/pool/main/a/arj/${P/-/_}-${PATCH_LEVEL}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-implicit-declarations.patch \
+ "${FILESDIR}/${P}-glibc2.10.patch"
+
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}"/debian/patches
+
+ epatch "${FILESDIR}"/${P}-darwin.patch
+ epatch "${FILESDIR}"/${P}-interix.patch
+
+ cd gnu
+ eautoconf
+}
+
+src_configure() {
+ cd gnu
+ CFLAGS="${CFLAGS} -Wall" econf
+}
+
+src_compile() {
+ sed -i -e '/stripgcc/d' GNUmakefile || die "sed failed."
+
+ ARJLIBDIR="${EPREFIX}/usr/$(get_libdir)"
+
+ emake CC=$(tc-getCC) libdir="${ARJLIBDIR}" \
+ ADD_LDFLAGS="${LDFLAGS}" \
+ pkglibdir="${ARJLIBDIR}" all || die "emake failed."
+}
+
+src_install() {
+ emake pkglibdir="${ARJLIBDIR}" \
+ DESTDIR="${D}" install || die "emake install failed."
+
+ dodoc doc/rev_hist.txt
+}
diff --git a/app-arch/arj/arj-3.10.22-r4.ebuild b/app-arch/arj/arj-3.10.22-r4.ebuild
new file mode 100644
index 000000000000..b8cc5d8dae55
--- /dev/null
+++ b/app-arch/arj/arj-3.10.22-r4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils multilib toolchain-funcs
+
+PATCH_LEVEL=10
+
+DESCRIPTION="Utility for opening arj archives"
+HOMEPAGE="http://arj.sourceforge.net"
+SRC_URI="mirror://debian/pool/main/a/arj/${P/-/_}.orig.tar.gz
+ mirror://debian/pool/main/a/arj/${P/-/_}-${PATCH_LEVEL}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-implicit-declarations.patch \
+ "${FILESDIR}/${P}-glibc2.10.patch"
+
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}"/debian/patches
+
+ epatch "${FILESDIR}"/${P}-darwin.patch
+ epatch "${FILESDIR}"/${P}-interix.patch
+
+ cd gnu
+ eautoconf
+}
+
+src_configure() {
+ cd gnu
+ CFLAGS="${CFLAGS} -Wall" econf
+}
+
+src_compile() {
+ sed -i -e '/stripgcc/d' GNUmakefile || die "sed failed."
+
+ ARJLIBDIR="${EPREFIX}/usr/$(get_libdir)"
+
+ emake CC=$(tc-getCC) libdir="${ARJLIBDIR}" \
+ ADD_LDFLAGS="${LDFLAGS}" \
+ pkglibdir="${ARJLIBDIR}" all
+}
+
+src_install() {
+ emake pkglibdir="${ARJLIBDIR}" DESTDIR="${D}" install
+
+ dodoc doc/rev_hist.txt
+}
diff --git a/app-arch/arj/files/arj-3.10.22-darwin.patch b/app-arch/arj/files/arj-3.10.22-darwin.patch
new file mode 100644
index 000000000000..a09c30d3126d
--- /dev/null
+++ b/app-arch/arj/files/arj-3.10.22-darwin.patch
@@ -0,0 +1,41 @@
+--- arj-3.10.22/environ.c
++++ arj-3.10.22/environ.c
+@@ -58,7 +58,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/statfs.h>
+ #include <sys/statvfs.h>
+- #elif defined(__FreeBSD__)||defined(__NetBSD__)
++ #elif defined(__FreeBSD__)||defined(__NetBSD__)||defined(__APPLE__)
+ #include <sys/param.h>
+ #include <sys/mount.h>
+ #elif defined(__QNXNTO__)
+--- arj-3.10.22/gnu/configure.in
++++ arj-3.10.22/gnu/configure.in
+@@ -62,6 +62,11 @@
+ DLL_FLAGS="-shared -export-dynamic"
+ LD_STRIP="gnu/stripgcc.lnk"
+ ;;
++*darwin*)
++ # not ELF
++ DLL_EXT=".dylib"
++ DLL_FLAGS=""
++ ;;
+ interix3*)
+ # not ELF
+ DLL_FLAGS="-shared"
+--- arj-3.10.22/arjcrypt.c
++++ arj-3.10.22/arjcrypt.c
+@@ -329,6 +329,13 @@
+ }
+ #endif
+
++#if defined(__APPLE__)
++int main()
++{
++ return(0);
++}
++#endif
++
+ /* External entry */
+
+ #if TARGET==DOS
diff --git a/app-arch/arj/files/arj-3.10.22-glibc2.10.patch b/app-arch/arj/files/arj-3.10.22-glibc2.10.patch
new file mode 100644
index 000000000000..4de45e1ea568
--- /dev/null
+++ b/app-arch/arj/files/arj-3.10.22-glibc2.10.patch
@@ -0,0 +1,12 @@
+diff -ruN arj-3.10.22.orig/fardata.c arj-3.10.22/fardata.c
+--- arj-3.10.22.orig/fardata.c 2004-04-17 04:39:42.000000000 -0700
++++ arj-3.10.22/fardata.c 2009-05-27 19:21:42.000000000 -0700
+@@ -13,7 +13,7 @@
+ /* ASR fix 02/05/2003: need that regardless of COLOR_OUTPUT to support -jp
+ correctly */
+ #if SFX_LEVEL>=ARJ
+- #define CUSTOM_PRINTF
++/* #define CUSTOM_PRINTF */
+ #define CHUNK_SIZE 512 /* Size of the output block */
+ #define CHUNK_THRESHOLD (CHUNK_SIZE-256) /* Safety bound */
+ #endif
diff --git a/app-arch/arj/files/arj-3.10.22-implicit-declarations.patch b/app-arch/arj/files/arj-3.10.22-implicit-declarations.patch
new file mode 100644
index 000000000000..a23429e7bd99
--- /dev/null
+++ b/app-arch/arj/files/arj-3.10.22-implicit-declarations.patch
@@ -0,0 +1,33 @@
+diff -up arj-3.10.22/environ.c~ arj-3.10.22/environ.c
+--- arj-3.10.22/environ.c~ 2008-03-31 15:19:36.000000000 +0200
++++ arj-3.10.22/environ.c 2008-03-31 15:19:36.000000000 +0200
+@@ -12,6 +12,8 @@
+ #include <conio.h>
+ #include <io.h>
+ #include <process.h>
++#else
++#include <sys/wait.h>
+ #endif
+
+ #include <fcntl.h>
+diff -up arj-3.10.22/arjsfx.c~ arj-3.10.22/arjsfx.c
+--- arj-3.10.22/arjsfx.c~ 2008-03-31 15:17:45.000000000 +0200
++++ arj-3.10.22/arjsfx.c 2008-03-31 15:17:45.000000000 +0200
+@@ -5,6 +5,7 @@
+ *
+ */
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <signal.h>
+
+diff -up arj-3.10.22/arj.c~ arj-3.10.22/arj.c
+--- arj-3.10.22/arj.c~ 2008-03-31 15:17:14.000000000 +0200
++++ arj-3.10.22/arj.c 2008-03-31 15:17:14.000000000 +0200
+@@ -5,6 +5,7 @@
+ *
+ */
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <signal.h> \ No newline at end of file
diff --git a/app-arch/arj/files/arj-3.10.22-interix.patch b/app-arch/arj/files/arj-3.10.22-interix.patch
new file mode 100644
index 000000000000..8294f1e96bb4
--- /dev/null
+++ b/app-arch/arj/files/arj-3.10.22-interix.patch
@@ -0,0 +1,45 @@
+diff -ru arj-3.10.22.orig/environ.c arj-3.10.22/environ.c
+--- arj-3.10.22.orig/environ.c 2008-03-30 16:51:40 +0200
++++ arj-3.10.22/environ.c 2008-03-30 16:50:16 +0200
+@@ -61,7 +61,7 @@
+ #elif defined(__FreeBSD__)||defined(__NetBSD__)||defined(__APPLE__)
+ #include <sys/param.h>
+ #include <sys/mount.h>
+- #elif defined(__QNXNTO__)
++ #elif defined(__QNXNTO__) || defined(__INTERIX)
+ #include <sys/statvfs.h>
+ #else
+ #include <sys/statfs.h>
+@@ -2286,7 +2286,7 @@
+ else
+ return((LONG_MAX/(spclu*bps)<fclu)?LONG_MAX:spclu*bps*fclu);
+ #elif TARGET==UNIX
+- #if defined(__QNXNTO__)||defined(__sco__)||defined(SUNOS)
++ #if defined(__QNXNTO__)||defined(__sco__)||defined(SUNOS)||defined(__INTERIX)
+ struct statvfs vfs;
+
+ if(statvfs(name, &vfs)==-1)
+@@ -3802,7 +3802,9 @@
+ #elif TARGET==WIN32
+ return(0);
+ #elif TARGET==UNIX
++ #ifndef __INTERIX
+ sync();
++ #endif
+ return(0);
+ #endif
+ }
+diff -ru arj-3.10.22.orig/gnu/configure.in arj-3.10.22/gnu/configure.in
+--- arj-3.10.22.orig/gnu/configure.in 2008-03-30 16:51:40 +0200
++++ arj-3.10.22/gnu/configure.in 2008-03-30 16:41:37 +0200
+@@ -67,8 +67,9 @@
+ DLL_EXT=".dylib"
+ DLL_FLAGS=""
+ ;;
+-interix3*)
++interix*)
+ # not ELF
++ DYN_LIBS="-ldl"
+ DLL_FLAGS="-shared"
+ DLL_CFLAGS=""
+ ;;
diff --git a/app-arch/arj/metadata.xml b/app-arch/arj/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/app-arch/arj/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/atool/Manifest b/app-arch/atool/Manifest
new file mode 100644
index 000000000000..f7af938fd72f
--- /dev/null
+++ b/app-arch/atool/Manifest
@@ -0,0 +1 @@
+DIST atool-0.39.0.tar.gz 119307 SHA256 aaf60095884abb872e25f8e919a8a63d0dabaeca46faeba87d12812d6efc703b SHA512 2011c13f510a140e71d26f9eac60d07f2cb9004dc278303fd37c5c7f78a6a2366ad9193e7b4e015d9fba8218c59205a6339189ae4775b0afc42328f9607524d3 WHIRLPOOL acd6b5635bdf88770738a8e7bcb8c1286b6d666226f8d55c03ce20a7a9235cf3820812b5c3422b318795c775b13a84ededc3daa195a00a1a3904ac4e1154a5cf
diff --git a/app-arch/atool/atool-0.39.0.ebuild b/app-arch/atool/atool-0.39.0.ebuild
new file mode 100644
index 000000000000..6f9d5861210c
--- /dev/null
+++ b/app-arch/atool/atool-0.39.0.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="a script for managing file archives of various types"
+HOMEPAGE="http://www.nongnu.org/atool/"
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND="${DEPEND}
+ !app-text/adiff"
diff --git a/app-arch/atool/metadata.xml b/app-arch/atool/metadata.xml
new file mode 100644
index 000000000000..27fecb98ed5a
--- /dev/null
+++ b/app-arch/atool/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/bloscpack/Manifest b/app-arch/bloscpack/Manifest
new file mode 100644
index 000000000000..00e0399ca743
--- /dev/null
+++ b/app-arch/bloscpack/Manifest
@@ -0,0 +1,2 @@
+DIST bloscpack-0.5.0.tar.gz 45171 SHA256 9889ad1a79434de8adb49ad6a12c40ac542850e0a133ed1376cdbec27462f7f8 SHA512 3a3ab351e9ab77409b8f5774c4ede533e2393bf49065d52cb60018268f448d1cef5ba2b24d0d25ec86298f6ff55bbb9075af3b302558a0e2e7343344b002b8d1 WHIRLPOOL 1700d778fdc21f5b247d5ac97ea58e15511014cdbab666fb2691d483de9cbbe2c1aee5dc59bdb3a42c3859330b236ca817e62dbc81848a22e894fbb40d472afd
+DIST bloscpack-0.6.0.tar.gz 60571 SHA256 a704bea04cae765e6f0be6e5b656803c6ead46ea4489c382dcd55cfd804a8aa0 SHA512 cd0b6e67d90fb8e320bfd5ddb41ee5d437543826f85931eb4cf3abbcb5eb6bc9581db88c2454b82b333ce2555f18670100f8df018299ce621eccd2e7c9e7d099 WHIRLPOOL aefb00c57e26cd90d23b9221c012a4ae3c821970782df4d2bebfc83ff6e0654ec1d91cf811a3969c33d4dd4e8ebcd6897fab1187f94ff1829f0a10aed64ef5cc
diff --git a/app-arch/bloscpack/bloscpack-0.5.0.ebuild b/app-arch/bloscpack/bloscpack-0.5.0.ebuild
new file mode 100644
index 000000000000..b5e29d6130ef
--- /dev/null
+++ b/app-arch/bloscpack/bloscpack-0.5.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Command line interface for Blosc compression"
+HOMEPAGE="https://github.com/Blosc/bloscpack"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-python/blosc[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/app-arch/bloscpack/bloscpack-0.6.0.ebuild b/app-arch/bloscpack/bloscpack-0.6.0.ebuild
new file mode 100644
index 000000000000..b5e29d6130ef
--- /dev/null
+++ b/app-arch/bloscpack/bloscpack-0.6.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Command line interface for Blosc compression"
+HOMEPAGE="https://github.com/Blosc/bloscpack"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-python/blosc[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/app-arch/bloscpack/metadata.xml b/app-arch/bloscpack/metadata.xml
new file mode 100644
index 000000000000..46e607c4a6ec
--- /dev/null
+++ b/app-arch/bloscpack/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ Command line interface to and serialization format for Blosc, a high
+ performance, multi-threaded, blocking and shuffling compressor. Uses
+ python-blosc bindings to interface with blosc.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">bloscpack</remote-id>
+ <remote-id type="github">Blosc/bloscpack</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/bsdsfv/Manifest b/app-arch/bsdsfv/Manifest
new file mode 100644
index 000000000000..203d349d7aa4
--- /dev/null
+++ b/app-arch/bsdsfv/Manifest
@@ -0,0 +1 @@
+DIST bsdsfv-1.18.tar.gz 13301 SHA256 577245da123d1ea95266c1628e66a6cf87b8046e1a902ddd408671baecf88495 SHA512 f2742cfc5c56c915aff7534eb07025394c57bebf74d6505dc1d7e814e5ca098b474a718ae1c2aeb993cf95dd55fc792c56f9ac80344d112738da2f20157647e6 WHIRLPOOL 4f0ae0c17b6907d99f36d442ffaa8afc197a06fd8f99d75a1023dc44f7531f5639d1e13cb4125e3596b19310e190033dcf2a71a765d8953e5bedf04d6879561a
diff --git a/app-arch/bsdsfv/bsdsfv-1.18-r1.ebuild b/app-arch/bsdsfv/bsdsfv-1.18-r1.ebuild
new file mode 100644
index 000000000000..a9d000111193
--- /dev/null
+++ b/app-arch/bsdsfv/bsdsfv-1.18-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils toolchain-funcs
+
+DESCRIPTION="all-in-one SFV checksum utility"
+HOMEPAGE="http://bsdsfv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~hppa m68k ppc s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-64bit.patch
+}
+
+src_compile() {
+ emake STRIP=true CC=$(tc-getCC) || die "emake failed"
+}
+
+src_install() {
+ dobin bsdsfv || die "dobin failed"
+ dodoc README MANUAL || die "dodoc failed"
+}
diff --git a/app-arch/bsdsfv/files/bsdsfv-1.18-64bit.patch b/app-arch/bsdsfv/files/bsdsfv-1.18-64bit.patch
new file mode 100644
index 000000000000..d55b42d01b86
--- /dev/null
+++ b/app-arch/bsdsfv/files/bsdsfv-1.18-64bit.patch
@@ -0,0 +1,83 @@
+Index: bsdsfv/bsdsfv.c
+===================================================================
+--- bsdsfv.orig/bsdsfv.c
++++ bsdsfv/bsdsfv.c
+@@ -59,10 +59,10 @@ typedef struct sfvtable {
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <dirent.h>
++#include <inttypes.h>
+
+-
+-long
+-UpdateCRC(unsigned long CRC, const char *buffer, long count)
++int32_t
++UpdateCRC(uint32_t CRC, const char *buffer, int32_t count)
+ {
+ /*
+ * Note: if you want to know how CRC32-checking works, I
+@@ -70,7 +70,7 @@ UpdateCRC(unsigned long CRC, const char
+ * There is not much you can change in this function, so
+ * if you need a CRC32-check yourself, feel free to rip.
+ */
+- unsigned long CRCTABLE[] = {
++ uint32_t CRCTABLE[] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f,
+ 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e,
+@@ -175,13 +175,13 @@ UpdateCRC(unsigned long CRC, const char
+
+
+
+-long
++int32_t
+ GetFileCRC(char *filename)
+ {
+- unsigned long crc = 0xffffffff;
++ uint32_t crc = 0xffffffff;
+ FILE *f;
+- long totalread = 0;
+- long localread;
++ int32_t totalread = 0;
++ int32_t localread;
+
+ /*
+ * Note: different buffer sizes may result in noticable
+@@ -306,7 +306,7 @@ main(int argc, char *argv[])
+ FILE *missingfile;
+ DIR *dirp;
+ struct dirent *dp;
+- long mycrc;
++ int32_t mycrc;
+ int cnt;
+ int dothisone;
+ char cfname[FNAMELEN];
+@@ -487,8 +487,8 @@ main(int argc, char *argv[])
+ printf("Adding file: %s ... ", cfname);
+ fflush(stdout);
+ mycrc = GetFileCRC(cfname);
+- printf("CRC = 0x%08lX\n", mycrc);
+- sprintf(sfvline, "%s %08lX", cfname, mycrc);
++ printf("CRC = 0x%08" PRIX32 "\n", mycrc);
++ sprintf(sfvline, "%s %08" PRIX32, cfname, mycrc);
+
+ // uncomment next 2 lines to
+ // convert filename to upper case, for whatever reason
+@@ -516,7 +516,7 @@ main(int argc, char *argv[])
+ printf("Testing %s ... ", cfname);
+ fflush(stdout);
+ mycrc = GetFileCRC(cfname);
+- printf("local = 0x%08lX, listed = ", mycrc);
++ printf("local = 0x%08" PRIX32 ", listed = ", mycrc);
+ fflush(stdout);
+
+ sfvfile = fopen(sfvname, "rt");
+@@ -675,7 +675,7 @@ main(int argc, char *argv[])
+
+ mycrc = GetFileCRC(dp->d_name);
+
+- printf("local = 0x%08lX ... ", mycrc);
++ printf("local = 0x%08" PRIX32 " ... ", mycrc);
+
+ if (mycrc == sfvTable[cnt].crc) {
+ printf("OK\n");
diff --git a/app-arch/bsdsfv/metadata.xml b/app-arch/bsdsfv/metadata.xml
new file mode 100644
index 000000000000..81551492a11e
--- /dev/null
+++ b/app-arch/bsdsfv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+ <longdescription>A all in one SFV utility.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bsdsfv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest
new file mode 100644
index 000000000000..01344aac5fe2
--- /dev/null
+++ b/app-arch/bzip2/Manifest
@@ -0,0 +1 @@
+DIST bzip2-1.0.6.tar.gz 782025 SHA256 a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12 WHIRLPOOL 8e92c24f77c3711f5103a26d6fefbe61fe49a7d1e46879d259d46347c606ca956b7228ab011aa88007db771f86a500d4954057c7f9c70bd8380ca6c9430bd81e
diff --git a/app-arch/bzip2/bzip2-1.0.6-r1.ebuild b/app-arch/bzip2/bzip2-1.0.6-r1.ebuild
new file mode 100644
index 000000000000..8f48338af66c
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="static"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.2-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@" || die
+}
+src_compile() {
+ bemake -f Makefile-libbz2_so all || die
+ use static && append-flags -static
+ bemake all || die
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr LIBDIR=$(get_libdir) install || die
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV} || die
+ local s
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} || die
+ done
+ gen_usr_ldscript -a bz2
+
+ if ! use static ; then
+ newbin bzip2-shared bzip2 || die
+ fi
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${D}"/usr/bin/b{zip2,zcat,unzip2} "${D}"/bin/ || die
+ dosym bzip2 /bin/bzcat || die
+ dosym bzip2 /bin/bunzip2 || die
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6-r2.ebuild b/app-arch/bzip2/bzip2-1.0.6-r2.ebuild
new file mode 100644
index 000000000000..734eea8b3b98
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="static"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@" || die
+}
+src_compile() {
+ bemake -f Makefile-libbz2_so all || die
+ use static && append-flags -static
+ bemake all || die
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr LIBDIR=$(get_libdir) install || die
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV} || die
+ local s
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} || die
+ done
+ gen_usr_ldscript -a bz2
+
+ if ! use static ; then
+ newbin bzip2-shared bzip2 || die
+ fi
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${D}"/usr/bin/b{zip2,zcat,unzip2} "${D}"/bin/ || die
+ dosym bzip2 /bin/bzcat || die
+ dosym bzip2 /bin/bunzip2 || die
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6-r3.ebuild b/app-arch/bzip2/bzip2-1.0.6-r3.ebuild
new file mode 100644
index 000000000000..8018d7a43795
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
+# (since we're building shared libs) ...
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="static static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+ epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@" || die
+}
+src_compile() {
+ bemake -f Makefile-libbz2_so all || die
+ use static && append-flags -static
+ bemake all || die
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr LIBDIR=$(get_libdir) install || die
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV} || die
+ local s
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} || die
+ done
+ gen_usr_ldscript -a bz2
+
+ if ! use static ; then
+ newbin bzip2-shared bzip2 || die
+ fi
+ if ! use static-libs ; then
+ rm -f "${D}"/usr/lib*/libbz2.a || die
+ fi
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${D}"/usr/bin/b{zip2,zcat,unzip2} "${D}"/bin/ || die
+ dosym bzip2 /bin/bzcat || die
+ dosym bzip2 /bin/bunzip2 || die
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6-r4.ebuild b/app-arch/bzip2/bzip2-1.0.6-r4.ebuild
new file mode 100644
index 000000000000..dd02be68e784
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
+# (since we're building shared libs) ...
+
+EAPI=4
+
+inherit eutils toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="static static-libs"
+
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+ epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+
+ multilib_copy_sources
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@"
+}
+
+multilib_src_compile() {
+ bemake -f Makefile-libbz2_so all
+ bemake all LDFLAGS="${LDFLAGS} $(usex static -static '')"
+}
+
+multilib_src_install() {
+ emake PREFIX="${ED}"/usr LIBDIR=$(get_libdir) install
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV}
+ local v
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
+ done
+ gen_usr_ldscript -a bz2
+
+ use static || newbin bzip2-shared bzip2
+}
+
+multilib_src_install_all() {
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${ED}"/usr/bin/b{zip2,zcat,unzip2} "${ED}"/bin/ || die
+ dosym bzip2 /bin/bzcat
+ dosym bzip2 /bin/bunzip2
+
+ use static-libs || find "${ED}"/usr -name libbz2.a -delete
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6-r6.ebuild b/app-arch/bzip2/bzip2-1.0.6-r6.ebuild
new file mode 100644
index 000000000000..d7b2cdff3b07
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
+# (since we're building shared libs) ...
+
+EAPI=4
+
+inherit eutils toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="static static-libs"
+
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+ epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
+ epatch "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ VPATH="${S}" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@"
+}
+
+multilib_src_compile() {
+ bemake -f "${S}"/Makefile-libbz2_so all
+ bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
+}
+
+multilib_src_install() {
+ into /usr
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV}
+ local v
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
+ done
+ use static-libs && dolib.a libbz2.a
+
+ if multilib_is_native_abi ; then
+ gen_usr_ldscript -a bz2
+
+ dobin bzip2recover
+ into /
+ dobin bzip2
+ fi
+}
+
+multilib_src_install_all() {
+ # `make install` doesn't cope with out-of-tree builds, nor with
+ # installing just non-binaries, so handle things ourselves.
+ insinto /usr/include
+ doins bzlib.h
+ into /usr
+ dobin bz{diff,grep,more}
+ doman *.1
+
+ dosym bzdiff /usr/bin/bzcmp
+ dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
+
+ dosym bzmore /usr/bin/bzless
+ dosym bzmore.1 /usr/share/man/man1/bzless.1
+
+ local x
+ for x in bunzip2 bzcat bzip2recover ; do
+ dosym bzip2.1 /usr/share/man/man1/${x}.1
+ done
+ for x in bz{e,f}grep ; do
+ dosym bzgrep /usr/bin/${x}
+ dosym bzgrep.1 /usr/share/man/man1/${x}.1
+ done
+
+ dodoc README* CHANGES manual.pdf
+ dohtml manual.html
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dosym bzip2 /bin/bzcat
+ dosym bzip2 /bin/bunzip2
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6-r7.ebuild b/app-arch/bzip2/bzip2-1.0.6-r7.ebuild
new file mode 100644
index 000000000000..60d0df33ac76
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r7.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
+# (since we're building shared libs) ...
+
+EAPI=4
+
+inherit eutils toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="static static-libs"
+
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+ epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
+ epatch "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ VPATH="${S}" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@"
+}
+
+multilib_src_compile() {
+ bemake -f "${S}"/Makefile-libbz2_so all
+ # Make sure we link against the shared lib #504648
+ ln -sf libbz2.so.${PV} libbz2.so
+ bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
+}
+
+multilib_src_install() {
+ into /usr
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV}
+ local v
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
+ done
+ use static-libs && dolib.a libbz2.a
+
+ if multilib_is_native_abi ; then
+ gen_usr_ldscript -a bz2
+
+ dobin bzip2recover
+ into /
+ dobin bzip2
+ fi
+}
+
+multilib_src_install_all() {
+ # `make install` doesn't cope with out-of-tree builds, nor with
+ # installing just non-binaries, so handle things ourselves.
+ insinto /usr/include
+ doins bzlib.h
+ into /usr
+ dobin bz{diff,grep,more}
+ doman *.1
+
+ dosym bzdiff /usr/bin/bzcmp
+ dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
+
+ dosym bzmore /usr/bin/bzless
+ dosym bzmore.1 /usr/share/man/man1/bzless.1
+
+ local x
+ for x in bunzip2 bzcat bzip2recover ; do
+ dosym bzip2.1 /usr/share/man/man1/${x}.1
+ done
+ for x in bz{e,f}grep ; do
+ dosym bzgrep /usr/bin/${x}
+ dosym bzgrep.1 /usr/share/man/man1/${x}.1
+ done
+
+ dodoc README* CHANGES manual.pdf
+ dohtml manual.html
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dosym bzip2 /bin/bzcat
+ dosym bzip2 /bin/bunzip2
+}
diff --git a/app-arch/bzip2/bzip2-1.0.6.ebuild b/app-arch/bzip2/bzip2-1.0.6.ebuild
new file mode 100644
index 000000000000..fa6a12783701
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="static"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.2-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@" || die
+}
+src_compile() {
+ bemake -f Makefile-libbz2_so all || die
+ use static && append-flags -static
+ bemake all || die
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr LIBDIR=$(get_libdir) install || die
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # Install the shared lib manually
+ dolib.so libbz2.so.${PV} || die
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/libbz2.so || die
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/libbz2.so.${PV%%.*} || die
+ gen_usr_ldscript -a bz2
+
+ if ! use static ; then
+ newbin bzip2-shared bzip2 || die
+ fi
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${D}"/usr/bin/b{zip2,zcat,unzip2} "${D}"/bin/ || die
+ dosym bzip2 /bin/bzcat || die
+ dosym bzip2 /bin/bunzip2 || die
+}
diff --git a/app-arch/bzip2/files/bzip2-1.0.2-progress.patch b/app-arch/bzip2/files/bzip2-1.0.2-progress.patch
new file mode 100644
index 000000000000..2f389cfac982
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.2-progress.patch
@@ -0,0 +1,175 @@
+Ripped from Mandrake.
+
+http://bugs.gentoo.org/show_bug.cgi?id=82192
+
+--- bzip2-1.0.2.org/bzip2.1
++++ bzip2-1.0.2/bzip2.1
+@@ -235,6 +235,10 @@
+ Suppress non-essential warning messages. Messages pertaining to
+ I/O errors and other critical events will not be suppressed.
+ .TP
++.B \-p --show-progress
++Show percentage of input-file done and while compressing show the percentage
++of the original file the new file is.
++.TP
+ .B \-v --verbose
+ Verbose mode -- show the compression ratio for each file processed.
+ Further \-v's increase the verbosity level, spewing out lots of
+--- bzip2-1.0.2.org/bzip2.c
++++ bzip2-1.0.2/bzip2.c
+@@ -145,6 +145,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <errno.h>
++#include <time.h>
+ #include <ctype.h>
+ #include "bzlib.h"
+
+@@ -301,6 +302,7 @@
+ Char progNameReally[FILE_NAME_LEN];
+ FILE *outputHandleJustInCase;
+ Int32 workFactor;
++Char showProgress;
+
+ static void panic ( Char* ) NORETURN;
+ static void ioError ( void ) NORETURN;
+@@ -425,6 +427,12 @@
+ UInt32 nbytes_in_lo32, nbytes_in_hi32;
+ UInt32 nbytes_out_lo32, nbytes_out_hi32;
+ Int32 bzerr, bzerr_dummy, ret;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ /* double because big files might otherwhise give
++ * overflows. not long long since not all compilers
++ * support that one
++ */
++ time_t startTime, currentTime;
+
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+@@ -432,12 +440,21 @@
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ (void)fseek(stream, 0, SEEK_END);
++ fileSize = (double)ftell(stream);
++ rewind(stream);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
+ blockSize100k, verbosity, workFactor );
+ if (bzerr != BZ_OK) goto errhandler;
+
+ if (verbosity >= 2) fprintf ( stderr, "\n" );
+
++ time(&startTime);
+ while (True) {
+
+ if (myfeof(stream)) break;
+@@ -446,13 +463,32 @@
+ if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+ if (bzerr != BZ_OK) goto errhandler;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True)
++ {
++ time(&currentTime);
++
++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
++ double curInPos = (double)ftell(stream);
++ double curOutPos = (double)ftell(zStream);
++
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
++ if (srcMode == SM_F2F)
++ {
++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
++ }
++
++ fprintf(stderr, " \r");
++ }
++ }
+ }
+
+ BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
+ &nbytes_in_lo32, &nbytes_in_hi32,
+ &nbytes_out_lo32, &nbytes_out_hi32 );
+ if (bzerr != BZ_OK) goto errhandler;
+-
++
+ if (ferror(zStream)) goto errhandler_io;
+ ret = fflush ( zStream );
+ if (ret == EOF) goto errhandler_io;
+@@ -526,6 +562,8 @@
+ UChar unused[BZ_MAX_UNUSED];
+ Int32 nUnused;
+ UChar* unusedTmp;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ time_t startTime, currentTime;
+
+ nUnused = 0;
+ streamNo = 0;
+@@ -533,9 +571,19 @@
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ long dummy = ftell(zStream);
++ (void)fseek(zStream, 0, SEEK_END);
++ fileSize = (double)ftell(zStream);
++ (void)fseek(zStream, dummy, SEEK_SET);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ time(&startTime);
+ while (True) {
+
+ bzf = BZ2_bzReadOpen (
+@@ -551,6 +599,17 @@
+ if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
+ fwrite ( obuf, sizeof(UChar), nread, stream );
+ if (ferror(stream)) goto errhandler_io;
++
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(&currentTime);
++ if ((currentTime - startTime) >= 2)
++ {
++ double curInPos = (double)ftell(zStream);
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
++ }
++ }
+ }
+ if (bzerr != BZ_STREAM_END) goto errhandler;
+
+@@ -1872,6 +1931,7 @@
+ deleteOutputOnInterrupt = False;
+ exitValue = 0;
+ i = j = 0; /* avoid bogus warning from egcs-1.1.X */
++ showProgress = False;
+
+ /*-- Set up signal handlers for mem access errors --*/
+ signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
+@@ -1949,6 +2009,7 @@
+ case 'k': keepInputFiles = True; break;
+ case 's': smallMode = True; break;
+ case 'q': noisy = False; break;
++ case 'p': showProgress = True; break;
+ case '1': blockSize100k = 1; break;
+ case '2': blockSize100k = 2; break;
+ case '3': blockSize100k = 3; break;
+@@ -1985,6 +2046,7 @@
+ if (ISFLAG("--keep")) keepInputFiles = True; else
+ if (ISFLAG("--small")) smallMode = True; else
+ if (ISFLAG("--quiet")) noisy = False; else
++ if (ISFLAG("--show-progress")) showProgress = True; else
+ if (ISFLAG("--version")) license(); else
+ if (ISFLAG("--license")) license(); else
+ if (ISFLAG("--exponential")) workFactor = 1; else
diff --git a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch
new file mode 100644
index 000000000000..672c89dfbd20
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch
@@ -0,0 +1,9 @@
+--- Makefile
++++ Makefile
+@@ -23,5 +23,5 @@
+ bzlib.o
+
+-all: libbz2.a bzip2 bzip2recover test
++all: libbz2.a bzip2 bzip2recover
+
+ bzip2: libbz2.a bzip2.o
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
new file mode 100644
index 000000000000..b31cc061db6f
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
@@ -0,0 +1,21 @@
+bzgrep uses !/bin/sh but then uses the bashism ${var//} so replace those
+with calls to sed so POSIX shells work
+
+http://bugs.gentoo.org/193365
+
+--- bzgrep
++++ bzgrep
+@@ -63,10 +63,9 @@
+ bzip2 -cdfq "$i" | $grep $opt "$pat"
+ r=$?
+ else
+- j=${i//\\/\\\\}
+- j=${j//|/\\|}
+- j=${j//&/\\&}
+- j=`printf "%s" "$j" | tr '\n' ' '`
++ # the backslashes here are doubled up as we have to escape each one for the
++ # shell and then escape each one for the sed expression
++ j=`printf "%s" "${i}" | sed -e 's:\\\\:\\\\\\\\:g' -e 's:[|]:\\\\|:g' -e 's:[&]:\\\\&:g' | tr '\n' ' '`
+ bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
+ r=$?
+ fi
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch
new file mode 100644
index 000000000000..5a95ed68b2d0
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch
@@ -0,0 +1,25 @@
+--- Makefile
++++ Makefile
+@@ -18,10 +18,9 @@
+ CC=gcc
+ AR=ar
+ RANLIB=ranlib
+-LDFLAGS=
+
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS)
+
+ # Where you want it installed when you do 'make install'
+ PREFIX=/usr/local
+--- Makefile-libbz2_so
++++ Makefile-libbz2_so
+@@ -24,7 +24,7 @@
+ SHELL=/bin/sh
+ CC=gcc
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS)
+
+ OBJS= blocksort.o \
+ huffman.o \
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch
new file mode 100644
index 000000000000..308f5f9b3e89
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/172986
+
+--- bzip2-1.0.4/Makefile
++++ bzip2-1.0.4/Makefile
+@@ -85,4 +85,7 @@
+ cp -f bzip2.1 $(PREFIX)/share/man/man1
+ chmod a+r $(PREFIX)/share/man/man1/bzip2.1
++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1
++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzcat.1
++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1
+ cp -f bzlib.h $(PREFIX)/include
+ chmod a+r $(PREFIX)/include/bzlib.h
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch b/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch
new file mode 100644
index 000000000000..51469ca4c96e
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch
@@ -0,0 +1,27 @@
+make it build for mingw targets
+
+https://bugs.gentoo.org/393573
+
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -129,7 +129,7 @@
+ #if BZ_LCCWIN32
+ # include <io.h>
+ # include <fcntl.h>
+-# include <sys\stat.h>
++# include <sys/stat.h>
+
+ # define NORETURN /**/
+ # define PATH_SEP '\\'
+--- a/bzlib.h
++++ b/bzlib.h
+@@ -81,6 +81,9 @@ typedef
+ /* windows.h define small to char */
+ # undef small
+ # endif
++# ifndef WINAPI
++# define WINAPI
++# endif
+ # ifdef BZ_EXPORT
+ # define BZ_API(func) WINAPI func
+ # define BZ_EXTERN extern
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch b/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch
new file mode 100644
index 000000000000..806339ebb6b4
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch
@@ -0,0 +1,79 @@
+--- a/Makefile
++++ b/Makefile
+@@ -53,7 +53,6 @@ libbz2.a: $(OBJS)
+
+ check: test
+ test: bzip2
+- @cat words1
+ ./bzip2 -1 < sample1.ref > sample1.rb2
+ ./bzip2 -2 < sample2.ref > sample2.rb2
+ ./bzip2 -3 < sample3.ref > sample3.rb2
+@@ -66,7 +65,6 @@ test: bzip2
+ cmp sample1.tst sample1.ref
+ cmp sample2.tst sample2.ref
+ cmp sample3.tst sample3.ref
+- @cat words3
+
+ install: bzip2 bzip2recover
+ if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
+@@ -115,25 +113,8 @@ clean:
+ sample1.rb2 sample2.rb2 sample3.rb2 \
+ sample1.tst sample2.tst sample3.tst
+
+-blocksort.o: blocksort.c
+- @cat words0
+- $(CC) $(CFLAGS) -c blocksort.c
+-huffman.o: huffman.c
+- $(CC) $(CFLAGS) -c huffman.c
+-crctable.o: crctable.c
+- $(CC) $(CFLAGS) -c crctable.c
+-randtable.o: randtable.c
+- $(CC) $(CFLAGS) -c randtable.c
+-compress.o: compress.c
+- $(CC) $(CFLAGS) -c compress.c
+-decompress.o: decompress.c
+- $(CC) $(CFLAGS) -c decompress.c
+-bzlib.o: bzlib.c
+- $(CC) $(CFLAGS) -c bzlib.c
+-bzip2.o: bzip2.c
+- $(CC) $(CFLAGS) -c bzip2.c
+-bzip2recover.o: bzip2recover.c
+- $(CC) $(CFLAGS) -c bzip2recover.c
++%.o: %.c
++ $(CC) $(CFLAGS) -c $<
+
+
+ distclean: clean
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -36,9 +36,7 @@ OBJS= blocksort.o \
+
+ all: $(OBJS)
+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
+- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
+- rm -f libbz2.so.1.0
+- ln -s libbz2.so.1.0.6 libbz2.so.1.0
++ ln -sf libbz2.so.1.0.6 libbz2.so.1.0
+
+ clean:
+ rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
+@@ -43,17 +43,5 @@ all: $(OBJS)
+ clean:
+ rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
+
+-blocksort.o: blocksort.c
+- $(CC) $(CFLAGS) -c blocksort.c
+-huffman.o: huffman.c
+- $(CC) $(CFLAGS) -c huffman.c
+-crctable.o: crctable.c
+- $(CC) $(CFLAGS) -c crctable.c
+-randtable.o: randtable.c
+- $(CC) $(CFLAGS) -c randtable.c
+-compress.o: compress.c
+- $(CC) $(CFLAGS) -c compress.c
+-decompress.o: decompress.c
+- $(CC) $(CFLAGS) -c decompress.c
+-bzlib.o: bzlib.c
+- $(CC) $(CFLAGS) -c bzlib.c
++%.o: %.c
++ $(CC) $(CFLAGS) -c $<
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
new file mode 100644
index 000000000000..7691d63e27c8
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
@@ -0,0 +1,163 @@
+Ripped from Mandrake
+
+http://bugs.gentoo.org/82192
+
+--- bzip2-1.0.6/bzip2.1
++++ bzip2-1.0.6/bzip2.1
+@@ -235,6 +235,10 @@
+ Suppress non-essential warning messages. Messages pertaining to
+ I/O errors and other critical events will not be suppressed.
+ .TP
++.B \-p \-\-show\-progress
++Show percentage of input\-file done and while compressing show the percentage
++of the original file the new file is.
++.TP
+ .B \-v --verbose
+ Verbose mode -- show the compression ratio for each file processed.
+ Further \-v's increase the verbosity level, spewing out lots of
+--- bzip2-1.0.6/bzip2.c
++++ bzip2-1.0.6/bzip2.c
+@@ -145,6 +145,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <errno.h>
++#include <time.h>
+ #include <ctype.h>
+ #include "bzlib.h"
+
+@@ -301,6 +302,7 @@
+ Char progNameReally[FILE_NAME_LEN];
+ FILE *outputHandleJustInCase;
+ Int32 workFactor;
++Char showProgress;
+
+ static void panic ( Char* ) NORETURN;
+ static void ioError ( void ) NORETURN;
+@@ -425,6 +427,12 @@
+ UInt32 nbytes_in_lo32, nbytes_in_hi32;
+ UInt32 nbytes_out_lo32, nbytes_out_hi32;
+ Int32 bzerr, bzerr_dummy, ret;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ /* double because big files might otherwhise give
++ * overflows. not long long since not all compilers
++ * support that one
++ */
++ time_t startTime, currentTime;
+
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+@@ -432,12 +440,21 @@
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ (void)fseek(stream, 0, SEEK_END);
++ fileSize = ftello(stream);
++ rewind(stream);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
+ blockSize100k, verbosity, workFactor );
+ if (bzerr != BZ_OK) goto errhandler;
+
+ if (verbosity >= 2) fprintf ( stderr, "\n" );
+
++ time(&startTime);
+ while (True) {
+
+ if (myfeof(stream)) break;
+@@ -446,6 +463,22 @@
+ if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+ if (bzerr != BZ_OK) goto errhandler;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(&currentTime);
++
++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
++ double curInPos = ftello(stream);
++ double curOutPos = ftello(zStream);
++
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
++ if (srcMode == SM_F2F)
++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
++
++ fprintf(stderr, " \r");
++ }
++ }
+ }
+
+ BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
+@@ -526,6 +559,8 @@
+ UChar unused[BZ_MAX_UNUSED];
+ Int32 nUnused;
+ UChar* unusedTmp;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ time_t startTime, currentTime;
+
+ nUnused = 0;
+ streamNo = 0;
+@@ -533,9 +568,19 @@
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ off_t dummy = ftello(zStream);
++ (void)fseeko(zStream, 0, SEEK_END);
++ fileSize = ftello(zStream);
++ (void)fseeko(zStream, dummy, SEEK_SET);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ time(&startTime);
+ while (True) {
+
+ bzf = BZ2_bzReadOpen (
+@@ -551,6 +596,16 @@
+ if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
+ fwrite ( obuf, sizeof(UChar), nread, stream );
+ if (ferror(stream)) goto errhandler_io;
++
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(&currentTime);
++ if ((currentTime - startTime) >= 2) {
++ double curInPos = ftello(zStream);
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
++ }
++ }
+ }
+ if (bzerr != BZ_STREAM_END) goto errhandler;
+
+@@ -1872,6 +1927,7 @@
+ deleteOutputOnInterrupt = False;
+ exitValue = 0;
+ i = j = 0; /* avoid bogus warning from egcs-1.1.X */
++ showProgress = False;
+
+ /*-- Set up signal handlers for mem access errors --*/
+ signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
+@@ -1949,6 +2005,7 @@
+ case 'k': keepInputFiles = True; break;
+ case 's': smallMode = True; break;
+ case 'q': noisy = False; break;
++ case 'p': showProgress = True; break;
+ case '1': blockSize100k = 1; break;
+ case '2': blockSize100k = 2; break;
+ case '3': blockSize100k = 3; break;
+@@ -1985,6 +2042,7 @@
+ if (ISFLAG("--keep")) keepInputFiles = True; else
+ if (ISFLAG("--small")) smallMode = True; else
+ if (ISFLAG("--quiet")) noisy = False; else
++ if (ISFLAG("--show-progress")) showProgress = True; else
+ if (ISFLAG("--version")) license(); else
+ if (ISFLAG("--license")) license(); else
+ if (ISFLAG("--exponential")) workFactor = 1; else
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
new file mode 100644
index 000000000000..9c4ddf05307b
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
@@ -0,0 +1,13 @@
+--- Makefile-libbz2_so
++++ Makefile-libbz2_so
+@@ -35,8 +35,8 @@
+ bzlib.o
+
+ all: $(OBJS)
+- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
++ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
+ rm -f libbz2.so.1.0
+ ln -s libbz2.so.1.0.6 libbz2.so.1.0
+
diff --git a/app-arch/bzip2/metadata.xml b/app-arch/bzip2/metadata.xml
new file mode 100644
index 000000000000..80408f474306
--- /dev/null
+++ b/app-arch/bzip2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:bzip:bzip2</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/app-arch/cabextract/Manifest b/app-arch/cabextract/Manifest
new file mode 100644
index 000000000000..61f11f2cfaef
--- /dev/null
+++ b/app-arch/cabextract/Manifest
@@ -0,0 +1 @@
+DIST cabextract-1.6.tar.gz 241731 SHA256 cee661b56555350d26943c5e127fc75dd290b7f75689d5ebc1f04957c4af55fb SHA512 d1c71c0292e3d73d8edbff5f5230b3127c63028f5aba1d0cad968bc945202fb9c0773327affce3d28466068377f029c80735adbabe0929d29b2204dea73738f8 WHIRLPOOL 5816e3f6ee3a3caad574bbc3d8aeff55bb99383a4ce80a40332d59696a1d4fbaba6823e9a77023e7cbbc257a0693a35f7817d7ff20383b30898de5d4e50eb1f2
diff --git a/app-arch/cabextract/cabextract-1.6.ebuild b/app-arch/cabextract/cabextract-1.6.ebuild
new file mode 100644
index 000000000000..a56604b18651
--- /dev/null
+++ b/app-arch/cabextract/cabextract-1.6.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Extracts files from Microsoft cabinet archive files"
+HOMEPAGE="http://www.cabextract.org.uk/"
+SRC_URI="http://www.cabextract.org.uk/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="extras"
+
+RDEPEND="extras? ( dev-lang/perl )"
+
+# the code attempts to set up a fnmatch replacement, but then fails to code
+# it properly leading to undefined references to rpl_fnmatch(). This may be
+# removed in the future if building still works by setting "yes" to "no".
+export ac_cv_func_fnmatch_works=yes
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO doc/magic
+ dohtml doc/wince_cab_format.html
+ if use extras; then
+ dobin src/{wince_info,wince_rename,cabinfo,cabsplit}
+ fi
+}
diff --git a/app-arch/cabextract/metadata.xml b/app-arch/cabextract/metadata.xml
new file mode 100644
index 000000000000..78a6f5f7ea4a
--- /dev/null
+++ b/app-arch/cabextract/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>fonts</herd>
+ <use>
+ <flag name="extras">Install experimental extra tools: wince_info and
+ wince_rename for examining and processing Windows CE installation cabinet
+ header files; cabinfo for examining the structure of a cab file.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/app-arch/cfv/Manifest b/app-arch/cfv/Manifest
new file mode 100644
index 000000000000..e55a88580e36
--- /dev/null
+++ b/app-arch/cfv/Manifest
@@ -0,0 +1,2 @@
+DIST cfv-1.18.2.tar.gz 67970 SHA256 73fc368e3717cdc7062c3c909778d03d15128bc9a18a76c7e4f7a75e8a99f391 SHA512 8999349485a404b71aec8abe21b554a867c6a94ed77dda2441f418c5798a243039685d72ccfb5e020885c8bab2a571da48d98a3171339bf14becfacca3ae5508 WHIRLPOOL b6d2d19bb69975b3cecfd884be034983318e118ee609dea0ebd9491a42c945a53e0e613daafd99fdc76542364013749989880ebe6969e8acdd3a48e3a942bb18
+DIST cfv-1.18.3.tar.gz 68030 SHA256 ff28a8aa679932b83eb3b248ed2557c6da5860d5f8456ffe24686253a354cff6 SHA512 dbca82df850703ab68a20db9314475025ac2e7012f34a12abbb358677e81cbb29a465adf4a1b002f6cf1c1dd84f1588fc1072791d6bbaad0c02cc563e5fe7d71 WHIRLPOOL 895211c61ff57068f28945fd374d3b9e2f00dc2739e1b884bbdb7cfa0a799d50ee36ff6791bb6457e2eba5f613a8b57b77bd1b3bacc7c4a329f0326d58375b13
diff --git a/app-arch/cfv/cfv-1.18.2.ebuild b/app-arch/cfv/cfv-1.18.2.ebuild
new file mode 100644
index 000000000000..0b754c212a7e
--- /dev/null
+++ b/app-arch/cfv/cfv-1.18.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+PYTHON_DEPEND="2"
+
+inherit python
+
+DESCRIPTION="Utility to test and create .sfv, .csv, .crc and md5sum files"
+HOMEPAGE="http://cfv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cfv/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="amd64 hppa ppc sparc x86 ~x86-fbsd"
+
+DEPEND=""
+RDEPEND="dev-python/python-fchksum"
+
+src_compile() {
+ true
+}
+
+src_install() {
+ dobin cfv || die "dobin failed"
+ doman cfv.1 || die "doman failed"
+ dodoc README Changelog || die "dodoc failed"
+ python_convert_shebangs -r 2 "${ED}"
+}
diff --git a/app-arch/cfv/cfv-1.18.3-r1.ebuild b/app-arch/cfv/cfv-1.18.3-r1.ebuild
new file mode 100644
index 000000000000..36211539d28d
--- /dev/null
+++ b/app-arch/cfv/cfv-1.18.3-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="Utility to test and create .sfv, .csv, .crc and md5sum files"
+HOMEPAGE="http://cfv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cfv/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="bittorrent"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+DEPEND=""
+RDEPEND="${PYTHON_DEPS}
+ dev-python/python-fchksum[${PYTHON_USEDEP}]
+ bittorrent? (
+ || (
+ net-p2p/bittorrent[${PYTHON_USEDEP}]
+ net-p2p/bittornado[${PYTHON_USEDEP}]
+ )
+ )"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ python_fix_shebang cfv
+ dobin cfv
+ doman cfv.1
+ dodoc README Changelog
+}
diff --git a/app-arch/cfv/files/cfv-1.18.1-modulefix.patch b/app-arch/cfv/files/cfv-1.18.1-modulefix.patch
new file mode 100644
index 000000000000..a415a3afc8bb
--- /dev/null
+++ b/app-arch/cfv/files/cfv-1.18.1-modulefix.patch
@@ -0,0 +1,21 @@
+--- branches/cfv-1_x-branch/cfv/cfv 2006/03/28 07:29:01 340
++++ branches/cfv-1_x-branch/cfv/cfv 2007/03/04 01:57:56 401
+@@ -1360,12 +1360,15 @@
+ #---------- .torrent ----------
+ _btimporterror = None
+ try:
+- from BitTorrent import bencode, btformats
++ from BTL import bencode, btformats
+ except ImportError, e1:
+ try:
+- from BitTornado import bencode; from BitTornado.BT1 import btformats
++ from BitTorrent import bencode, btformats
+ except ImportError, e2:
+- _btimporterror = '%s and %s'%(e1,e2)
++ try:
++ from BitTornado import bencode; from BitTornado.BT1 import btformats
++ except ImportError, e3:
++ _btimporterror = '%s and %s and %s'%(e1,e2,e3)
+
+ class Torrent(ChksumType):
+ description = 'BitTorrent metainfo'
diff --git a/app-arch/cfv/metadata.xml b/app-arch/cfv/metadata.xml
new file mode 100644
index 000000000000..9a061aa30829
--- /dev/null
+++ b/app-arch/cfv/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ cfv is a utility to both test and create .sfv, .csv, .crc,
+ .md5(sfv-like), md5sum, bsd md5, sha1sum, and .torrent files. These
+ files are commonly used to ensure the correct retrieval or storage of
+ data.
+ </longdescription>
+ <use>
+ <flag name="bittorrent">Enable support for checking .torrent files</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">cfv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/cksfv/Manifest b/app-arch/cksfv/Manifest
new file mode 100644
index 000000000000..130e74a00d21
--- /dev/null
+++ b/app-arch/cksfv/Manifest
@@ -0,0 +1,3 @@
+DIST cksfv-1.3.12.tar.bz2 26772 SHA256 f029fab94cc7d6df88cc9ec8dbc65707662d82b1f5bacb95266da020528bf53f SHA512 1b98724d8fd20a500b459089538f175ebb94d6c07000cce4cf685c8fea183be15fc28de3a6352f69d9e124b5b102ab08dce5e4c28563d45e897ff35420902317 WHIRLPOOL 178243155eeaf9b209e854b86a782f8d1f838c4fb3fba9460997200d2100e06edaefc87c66d1d1d36f4fa2f9ac380e5dbcb333d14751d96e849fa725fd66ad2f
+DIST cksfv-1.3.13.tar.bz2 26109 SHA256 16ee1bbc0ae8a83909e25e37681d6d501a26dadb18e241310e4333dedc8d1435 SHA512 643bd82b9994087eb1ddc7c182df33f9de1c2b220e89beb878019b2a7489c16baa85d92a45ffe81bc22203f47dbde98b40ec375112978e0ff14a62ffa70faae0 WHIRLPOOL 82c573943ebeda8531d6b5357d34cb6da310531736bb2c70294e4a288d85eb8b51531a5d074b297909845529c17ed50a6ec40775f19f3d338cd4036678cf95ed
+DIST cksfv-1.3.14.tar.bz2 26114 SHA256 8f3c246f3a4a1f0136842a2108568297e66e92f5996e0945d186c27bca07df52 SHA512 016c2f61632980678957fe4b5bc9ecb30360efd548ff09bfbb7a31cc6fc36f6fe7936d3d819fe468a6208c71f8b625662aa3ae0abd668435d7273e149d7e4519 WHIRLPOOL 15d9daa70a37e14a05c0d07b0389dfb9502d5418418601822d74a3048776d25d0f9afb5df448abc67c0bfc1042b3330a1efff4c7a53a7a0d96e64c2528d8d8f1
diff --git a/app-arch/cksfv/cksfv-1.3.12.ebuild b/app-arch/cksfv/cksfv-1.3.12.ebuild
new file mode 100644
index 000000000000..54b8fd5d6cca
--- /dev/null
+++ b/app-arch/cksfv/cksfv-1.3.12.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="SFV checksum utility (simple file verification)"
+HOMEPAGE="http://zakalwe.fi/~shd/foss/cksfv/"
+SRC_URI="http://zakalwe.fi/~shd/foss/cksfv/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~ia64 ppc sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ # note: not an autoconf configure script
+ ./configure \
+ --compiler=$(tc-getCC) \
+ --prefix=/usr \
+ --package-prefix="${D}" \
+ --bindir=/usr/bin \
+ --mandir=/usr/share/man || die
+ emake || die
+}
+
+src_install() {
+ emake install || die
+ dodoc ChangeLog README TODO
+}
diff --git a/app-arch/cksfv/cksfv-1.3.13.ebuild b/app-arch/cksfv/cksfv-1.3.13.ebuild
new file mode 100644
index 000000000000..6cd76026687e
--- /dev/null
+++ b/app-arch/cksfv/cksfv-1.3.13.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="SFV checksum utility (simple file verification)"
+HOMEPAGE="http://zakalwe.fi/~shd/foss/cksfv/"
+SRC_URI="http://zakalwe.fi/~shd/foss/cksfv/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ # note: not an autoconf configure script
+ ./configure \
+ --compiler=$(tc-getCC) \
+ --prefix=/usr \
+ --package-prefix="${D}" \
+ --bindir=/usr/bin \
+ --mandir=/usr/share/man || die
+ emake || die
+}
+
+src_install() {
+ emake install || die
+ dodoc ChangeLog README TODO
+}
diff --git a/app-arch/cksfv/cksfv-1.3.14.ebuild b/app-arch/cksfv/cksfv-1.3.14.ebuild
new file mode 100644
index 000000000000..33680f81c054
--- /dev/null
+++ b/app-arch/cksfv/cksfv-1.3.14.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="SFV checksum utility (simple file verification)"
+HOMEPAGE="http://zakalwe.fi/~shd/foss/cksfv/"
+SRC_URI="http://zakalwe.fi/~shd/foss/cksfv/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE=""
+
+src_configure() {
+ # note: not an autoconf configure script
+ ./configure \
+ --compiler="$(tc-getCC)" \
+ --prefix="${EPREFIX}"/usr \
+ --package-prefix="${D}" \
+ --bindir="${EPREFIX}"/usr/bin \
+ --mandir="${EPREFIX}"/usr/share/man || die
+}
+
+src_install() {
+ emake install
+ dodoc ChangeLog README TODO
+}
diff --git a/app-arch/cksfv/metadata.xml b/app-arch/cksfv/metadata.xml
new file mode 100644
index 000000000000..01630d73a7f1
--- /dev/null
+++ b/app-arch/cksfv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+<longdescription>A Simple file verification tool to ensure that the files you recieve are the same as the originals.</longdescription>
+</pkgmetadata>
diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest
new file mode 100644
index 000000000000..3b37779c88b7
--- /dev/null
+++ b/app-arch/cpio/Manifest
@@ -0,0 +1 @@
+DIST cpio-2.11.tar.bz2 1018483 SHA256 bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd SHA512 b6ccb3e121ea29780219d21c9cd6267c2f7b7ae72fb899bb80e1c54cc33e9eac5363443d93dbfbe37e8e8d295dad2724ac607f0543cc62797919605f68c396aa WHIRLPOOL 3e19212f8d5c16de0d531d189fa9fc288ff90d6299c1f3f98f61e182bb0ec278705ae5021c85c7aaeab869ad36b2b3bcd11327a746cde0bf5a596049d711d9cd
diff --git a/app-arch/cpio/cpio-2.11-r1.ebuild b/app-arch/cpio/cpio-2.11-r1.ebuild
new file mode 100644
index 000000000000..34d1ad581aeb
--- /dev/null
+++ b/app-arch/cpio/cpio-2.11-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html"
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-stat.patch #328531
+ epatch "${FILESDIR}"/${P}-no-gets.patch #424974
+ epatch "${FILESDIR}"/${P}-non-gnu-compilers.patch #275295
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --bindir="${EPREFIX}"/bin \
+ --with-rmt="${EPREFIX}"/usr/sbin/rmt
+}
+
+src_install() {
+ default
+ rm "${ED}"/usr/share/man/man1/mt.1 || die
+ rmdir "${ED}"/usr/libexec || die
+}
diff --git a/app-arch/cpio/cpio-2.11-r3.ebuild b/app-arch/cpio/cpio-2.11-r3.ebuild
new file mode 100644
index 000000000000..c8f2dcc610b6
--- /dev/null
+++ b/app-arch/cpio/cpio-2.11-r3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html"
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-stat.patch #328531
+ epatch "${FILESDIR}"/${P}-no-gets.patch #424974
+ epatch "${FILESDIR}"/${P}-non-gnu-compilers.patch #275295
+ epatch "${FILESDIR}"/${P}-security.patch #530512 #536010
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --bindir="${EPREFIX}"/bin \
+ --with-rmt="${EPREFIX}"/usr/sbin/rmt
+}
+
+src_install() {
+ default
+ rm "${ED}"/usr/share/man/man1/mt.1 || die
+}
diff --git a/app-arch/cpio/cpio-2.11.ebuild b/app-arch/cpio/cpio-2.11.ebuild
new file mode 100644
index 000000000000..07d3e2f74d69
--- /dev/null
+++ b/app-arch/cpio/cpio-2.11.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html"
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-stat.patch #328531
+ epatch "${FILESDIR}"/${P}-no-gets.patch #424974
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --bindir=/bin \
+ --with-rmt=/usr/sbin/rmt
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog NEWS README
+ rm "${D}"/usr/share/man/man1/mt.1 || die
+ rmdir "${D}"/usr/libexec || die
+}
diff --git a/app-arch/cpio/files/cpio-2.11-no-gets.patch b/app-arch/cpio/files/cpio-2.11-no-gets.patch
new file mode 100644
index 000000000000..f7a9be324df4
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.11-no-gets.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/424974
+
+hack until gzip pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/gnu/stdio.in.h
++++ b/gnu/stdio.in.h
+@@ -125,7 +125,6 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/app-arch/cpio/files/cpio-2.11-non-gnu-compilers.patch b/app-arch/cpio/files/cpio-2.11-non-gnu-compilers.patch
new file mode 100644
index 000000000000..25e7373d4fcc
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.11-non-gnu-compilers.patch
@@ -0,0 +1,18 @@
+srcshelton@gmail.com: Patch for IRIX
+
+http://bugs.gentoo.org/show_bug.cgi?id=275295
+
+Sent upstream:
+https://savannah.gnu.org/patch/?7838
+
+--- src/cpiohdr.h.dist 2009-06-24 15:41:26.983725240 +0100
++++ src/cpiohdr.h 2009-06-24 15:41:59.753567720 +0100
+@@ -24,6 +24,8 @@
+
+ #ifdef HAVE_ATTRIB_PACKED
+ #define ATTRIB_PACKED __attribute__((packed))
++#else
++#define ATTRIB_PACKED
+ #endif
+
+ #ifdef HAVE_PRAGMA_PACK
diff --git a/app-arch/cpio/files/cpio-2.11-security.patch b/app-arch/cpio/files/cpio-2.11-security.patch
new file mode 100644
index 000000000000..e3ad7a44d000
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.11-security.patch
@@ -0,0 +1,266 @@
+diff -uNr cpio-2.11.ORIG/src/copyin.c cpio-2.11/src/copyin.c
+--- cpio-2.11.ORIG/src/copyin.c 2015-01-09 11:31:49.017090090 +0000
++++ cpio-2.11/src/copyin.c 2015-01-09 11:35:37.723092293 +0000
+@@ -124,10 +124,30 @@
+ if (pad != 0)
+ tape_toss_input (in_file_des, pad);
+ }
+-
++
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++ char *link_name;
++
++ if (file_hdr->c_filesize < 0 || file_hdr->c_filesize > SIZE_MAX-1)
++ {
++ error (0, 0, _("%s: stored filename length is out of range"),
++ file_hdr->c_name);
++ link_name = NULL;
++ }
++ else
++ {
++ link_name = xmalloc (file_hdr->c_filesize + 1);
++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++ link_name[file_hdr->c_filesize] = '\0';
++ tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ }
++ return link_name;
++}
+
+ static void
+-list_file(struct cpio_file_stat* file_hdr, int in_file_des)
++list_file (struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+ if (verbose_flag)
+ {
+@@ -136,21 +156,16 @@
+ {
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- char *link_name = NULL; /* Name of hard and symbolic links. */
+-
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- long_format (file_hdr, link_name);
+- free (link_name);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+- return;
++ char *link_name = get_link_name (file_hdr, in_file_des);
++ if (link_name)
++ {
++ long_format (file_hdr, link_name);
++ free (link_name);
++ }
+ }
+ else
+- {
+- long_format (file_hdr, file_hdr->c_tar_linkname);
+- return;
+- }
++ long_format (file_hdr, file_hdr->c_tar_linkname);
++ return;
+ }
+ else
+ #endif
+@@ -640,7 +655,7 @@
+ }
+
+ static void
+-copyin_link(struct cpio_file_stat *file_hdr, int in_file_des)
++copyin_link (struct cpio_file_stat *file_hdr, int in_file_des)
+ {
+ char *link_name = NULL; /* Name of hard and symbolic links. */
+ int res; /* Result of various function calls. */
+@@ -650,10 +665,9 @@
+
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ link_name = get_link_name (file_hdr, in_file_des);
++ if (!link_name)
++ return;
+ }
+ else
+ {
+@@ -1005,7 +1019,7 @@
+
+ file_hdr->c_tar_linkname = NULL;
+
+- tape_buffered_read (magic.str, in_des, 6L);
++ tape_buffered_read (magic.str, in_des, sizeof (magic.str));
+ while (1)
+ {
+ if (append_flag)
+@@ -1050,8 +1064,8 @@
+ break;
+ }
+ bytes_skipped++;
+- memmove (magic.str, magic.str + 1, 5);
+- tape_buffered_read (magic.str, in_des, 1L);
++ memmove (magic.str, magic.str + 1, sizeof (magic.str) - 1);
++ tape_buffered_read (magic.str + sizeof (magic.str) - 1, in_des, 1L);
+ }
+ }
+
+diff -uNr cpio-2.11.ORIG/src/util.c cpio-2.11/src/util.c
+--- cpio-2.11.ORIG/src/util.c 2015-01-09 11:31:49.018090090 +0000
++++ cpio-2.11/src/util.c 2015-01-09 11:36:55.794093045 +0000
+@@ -206,10 +206,7 @@
+ if (input_size < 0)
+ error (1, errno, _("read error"));
+ if (input_size == 0)
+- {
+- error (0, 0, _("premature end of file"));
+- exit (1);
+- }
++ error (PAXEXIT_FAILURE, 0, _("premature end of file"));
+ input_bytes += input_size;
+ }
+
+diff -uNr cpio-2.11.ORIG/tests/Makefile.am cpio-2.11/tests/Makefile.am
+--- cpio-2.11.ORIG/tests/Makefile.am 2015-01-09 11:31:49.020090090 +0000
++++ cpio-2.11/tests/Makefile.am 2015-01-09 11:34:05.121091401 +0000
+@@ -52,6 +52,8 @@
+ setstat04.at\
+ setstat05.at\
+ symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+ version.at
+
+ TESTSUITE = $(srcdir)/testsuite
+diff -uNr cpio-2.11.ORIG/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
+--- cpio-2.11.ORIG/tests/symlink-bad-length.at 1970-01-01 01:00:00.000000000 +0100
++++ cpio-2.11/tests/symlink-bad-length.at 2015-01-09 11:35:52.124092432 +0000
+@@ -0,0 +1,64 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++# The exact error message and exit status depend on the host architecture,
++# therefore strderr is filtered out and error code is not checked.
++
++# So far the only case when cpio would exit with code 0 is when it skips
++# several bytes and encounters a valid record header. Perhaps it should
++# exit with code 2 (non-critical error), if at least one byte was skipped,
++# but that could hurt backward compatibility.
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++TZ=UTC cpio -ntv < ARCHIVE 2>stderr
++cat stderr | grep -v \
++ -e 'stored filename length is out of range' \
++ -e 'premature end of file' \
++ -e 'archive header has reverse byte-order' \
++ -e 'memory exhausted' \
++ -e 'skipped [[0-9][0-9]*] bytes of junk' \
++ -e '[[0-9][0-9]*] block' \
++ >&2
++echo >&2 STDERR
++],
++[0],
++[-rw-rw-r-- 1 10029 10031 13 Nov 25 11:52 FILE
++],[STDERR
++])
++
++AT_CLEANUP
+diff -uNr cpio-2.11.ORIG/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
+--- cpio-2.11.ORIG/tests/symlink-long.at 1970-01-01 01:00:00.000000000 +0100
++++ cpio-2.11/tests/symlink-long.at 2015-01-09 11:32:53.908090715 +0000
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++ dirname="xxxxxxxxx/$dirname"
++ mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -uNr cpio-2.11.ORIG/tests/testsuite.at cpio-2.11/tests/testsuite.at
+--- cpio-2.11.ORIG/tests/testsuite.at 2015-01-09 11:31:49.020090090 +0000
++++ cpio-2.11/tests/testsuite.at 2015-01-09 11:34:34.386091683 +0000
+@@ -31,6 +31,8 @@
+
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
+ m4_include([interdir.at])
+
+ m4_include([setstat01.at])
diff --git a/app-arch/cpio/files/cpio-2.11-stat.patch b/app-arch/cpio/files/cpio-2.11-stat.patch
new file mode 100644
index 000000000000..dcd991e3f20c
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.11-stat.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/328531
+
+From 3a7a1820d4cecbd77c7b74c785af5942510bf080 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org.ua>
+Date: Thu, 22 Jul 2010 13:13:34 +0300
+Subject: [PATCH] Minor fix.
+
+* src/filetypes.h: Remove declarations of stat and lstat.
+---
+ src/filetypes.h | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/src/filetypes.h b/src/filetypes.h
+index f80faab..81f0c32 100644
+--- a/src/filetypes.h
++++ b/src/filetypes.h
+@@ -81,5 +81,3 @@
+ #ifndef S_ISLNK
+ #define lstat stat
+ #endif
+-int lstat ();
+-int stat ();
+--
+1.7.3
+
diff --git a/app-arch/cpio/metadata.xml b/app-arch/cpio/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/app-arch/cpio/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/app-arch/createrepo/Manifest b/app-arch/createrepo/Manifest
new file mode 100644
index 000000000000..8c291450f3a6
--- /dev/null
+++ b/app-arch/createrepo/Manifest
@@ -0,0 +1,2 @@
+DIST createrepo-0.10.3.tar.gz 66004 SHA256 cd54621bef94c4a5ebffb5f19382050452d3e69763d2db4121c5d3881509ea6d SHA512 9e56625361dbc54667b42a4a8e84f46fd80dcb8d92ec9ff8532107981550612f946438061cc00b14c02f45aad18b33085bb0511a200715ba6d7c019785604a6e WHIRLPOOL 35de55956d7a69d6e7e5a32753336fc7808101330bb635e0712a06a76f7c5bd506b7cbaf0c728c099afe6a5927ad315e26ef44ce5cb57f6a9bb512dcf0af78df
+DIST createrepo-0.9.9-head.patch.bz2 14380 SHA256 74bdaea63c5f72d8814b0be5bc4b497188c8bd7c10fc3d66b6fd4058f98b58b8 SHA512 6d5e970e1489cef85cebedc3805bb1496c743c361b9bdda3d8df290f8e588d7d960272cf3c18e9c48fcdaf6a003b784a87aaea218da1ad68bf77446600980554 WHIRLPOOL 571319be8e0a7a559aa941046ea098e197f539d5156df12f3ac5ad87b133dbd7fc844ad208b7163110f8393a06eeb5c3a2fca2d09c870b3b59f457c6cb52634a
diff --git a/app-arch/createrepo/createrepo-0.10.3.ebuild b/app-arch/createrepo/createrepo-0.10.3.ebuild
new file mode 100644
index 000000000000..c49142d59e5d
--- /dev/null
+++ b/app-arch/createrepo/createrepo-0.10.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml'
+
+inherit python-single-r1 bash-completion-r1 eutils
+
+DESCRIPTION="Creates a common rpm-metadata repository"
+HOMEPAGE="http://createrepo.baseurl.org/"
+SRC_URI="http://createrepo.baseurl.org/download/${P}.tar.gz
+ http://dev.gentoo.org/~pacho/maintainer-needed/${PN}-0.9.9-head.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-python/urlgrabber-2.9.0[${PYTHON_USEDEP}]
+ >=app-arch/rpm-4.1.1[python,${PYTHON_USEDEP}]
+ dev-libs/libxml2[python,${PYTHON_USEDEP}]
+ >=app-arch/deltarpm-3.6_pre20110223[python,${PYTHON_USEDEP}]
+ dev-python/pyliblzma[${PYTHON_USEDEP}]
+ >=sys-apps/yum-3.4.3
+ ${PYTHON_DEPS}"
+DEPEND="${PYTHON_DEPS}"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ python_export PYTHON_SITEDIR
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-ten-changelog-limit.patch"
+ epatch "${FILESDIR}/${P}-pkglist.patch"
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${ED}" \
+ PYTHON=true \
+ compdir="$(get_bashcompdir)" \
+ PKGDIR="${PYTHON_SITEDIR}/${PN}"
+ dodoc ChangeLog README
+ python_fix_shebang "${ED}"
+ python_optimize
+ python_optimize "${ED}/usr/share/createrepo"
+}
diff --git a/app-arch/createrepo/files/createrepo-0.10.3-pkglist.patch b/app-arch/createrepo/files/createrepo-0.10.3-pkglist.patch
new file mode 100644
index 000000000000..59fffc10ede1
--- /dev/null
+++ b/app-arch/createrepo/files/createrepo-0.10.3-pkglist.patch
@@ -0,0 +1,15 @@
+diff --git a/createrepo/__init__.py b/createrepo/__init__.py
+index b1875f6..85f2a3d 100644
+--- a/createrepo/__init__.py
++++ b/createrepo/__init__.py
+@@ -400,7 +400,9 @@ class MetaDataGenerator:
+ if self.conf.update:
+ self._setup_old_metadata_lookup()
+ # rpms we're going to be dealing with
+- if self.conf.pkglist:
++ if isinstance(self.conf.pkglist, MetaSack):
++ packages = self.conf.pkglist
++ elif self.conf.pkglist:
+ packages = []
+ for pkg in self.conf.pkglist:
+ if '://' in pkg: # remote
diff --git a/app-arch/createrepo/files/createrepo-0.10.3-ten-changelog-limit.patch b/app-arch/createrepo/files/createrepo-0.10.3-ten-changelog-limit.patch
new file mode 100644
index 000000000000..07b61067462e
--- /dev/null
+++ b/app-arch/createrepo/files/createrepo-0.10.3-ten-changelog-limit.patch
@@ -0,0 +1,11 @@
+--- createrepo/__init__.py~ 2011-01-26 12:14:30.000000000 -0500
++++ createrepo/__init__.py 2011-01-26 12:34:17.291441719 -0500
+@@ -96,7 +96,7 @@
+ self.mdtimestamp = 0
+ self.directory = None
+ self.directories = []
+- self.changelog_limit = None # needs to be an int or None
++ self.changelog_limit = 10 # needs to be an int or None
+ self.unique_md_filenames = True
+ self.additional_metadata = {} # dict of 'type':'filename'
+ self.revision = str(int(time.time()))
diff --git a/app-arch/createrepo/metadata.xml b/app-arch/createrepo/metadata.xml
new file mode 100644
index 000000000000..0e692af10e6c
--- /dev/null
+++ b/app-arch/createrepo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>alonbl@gentoo.org</email>
+ <name>Alon Bar-Lev</name>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/deb2targz/Manifest b/app-arch/deb2targz/Manifest
new file mode 100644
index 000000000000..7e83f08850e4
--- /dev/null
+++ b/app-arch/deb2targz/Manifest
@@ -0,0 +1 @@
+DIST deb2targz 1947 SHA256 f597319db098a9d6b5199e39b8a9ced0973d9ee84927286de4d5816d8e76a44b SHA512 9b6a533fbe232721304f3bc1d9ea952f78fb108ace3bd0a0eab206be8462bc547ff49ab9310f209079b9ed6f86413c8f0819a117b95c67b6082e37d416716b1c WHIRLPOOL 5cc4a40a88b4ce084ffac88dd0b66619de6b764f8a7125e8c0502525f74993e8fd47ea0d2269263dd0ea54d0bf4293b59569ef2a727dcb14553e84a6227c3973
diff --git a/app-arch/deb2targz/deb2targz-1-r2.ebuild b/app-arch/deb2targz/deb2targz-1-r2.ebuild
new file mode 100644
index 000000000000..c439c092ead7
--- /dev/null
+++ b/app-arch/deb2targz/deb2targz-1-r2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit base
+
+DESCRIPTION="Convert a .deb file to a .tar.gz archive"
+HOMEPAGE="http://www.miketaylor.org.uk/tech/deb/"
+SRC_URI="http://www.miketaylor.org.uk/tech/deb/${PN}"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~ppc-aix ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl"
+
+S=${WORKDIR}
+PATCHES=( "${FILESDIR}/${PN}-any-data.patch" )
+
+src_unpack() {
+ cp "${DISTDIR}/${PN}" "${S}"
+}
+
+src_install() {
+ dobin ${PN}
+}
diff --git a/app-arch/deb2targz/files/deb2targz-any-data.patch b/app-arch/deb2targz/files/deb2targz-any-data.patch
new file mode 100644
index 000000000000..c8c42308ce1c
--- /dev/null
+++ b/app-arch/deb2targz/files/deb2targz-any-data.patch
@@ -0,0 +1,17 @@
+Support any/all compression formats for data.tar
+--- deb2targz
++++ deb2targz
+@@ -47,10 +47,11 @@
+ ($header, $data) = ($data =~ /(.*?)\n(.*)/s);
+ my($name, $num1, $num2, $num3, $num4, $len) = split /\s+/, $header;
+ #print "header='$header'\n\tname='$name', len=$len\n";
+- if ($name eq "data.tar.gz") {
++ if ($name =~ /^data\.tar(.*)$/) {
+ # Found it
++ my $ext = $1;
+ $data = substr($data, 0, $len);
+- $filename =~ s/\.deb$/.tar.gz/;
++ $filename =~ s/\.deb$/.tar$ext/;
+ my $fh = new IO::File(">$filename")
+ or die "can't write '$filename': $!";
+ print $fh $data;
diff --git a/app-arch/deb2targz/metadata.xml b/app-arch/deb2targz/metadata.xml
new file mode 100644
index 000000000000..1db71bb6e0e4
--- /dev/null
+++ b/app-arch/deb2targz/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>chainsaw@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/app-arch/defluff/Manifest b/app-arch/defluff/Manifest
new file mode 100644
index 000000000000..b8477f3713e8
--- /dev/null
+++ b/app-arch/defluff/Manifest
@@ -0,0 +1,2 @@
+DIST defluff-0.3.2-linux-i686.zip 14258 SHA256 582bade12c2462d6f9370b5cc4139619ca9f0ff7451d298353d406e805db0256 SHA512 8befa4c0f4daefd1adbafeddcec65bb808859df6df9c8d43d6a0aaa797a395e3c18b682b955d7e0271dab84da0ce8323d8dc7d17efa2978db7b94e1467fca3f9 WHIRLPOOL 8b57c07f99abdc9a7b4a9e318710c64478ed76f1e28e0cb4d8218cb30d1797f161e19f8b6b83217305676ed18154079fc2333eaf5a7174a40b136195c1a3f9d7
+DIST defluff-0.3.2-linux-x86_64.zip 15601 SHA256 a9c6cbc2c0df8401e6bd694d635a5dae9cea07458239a0da814d35c8b90388f6 SHA512 15c0355eb926541a7b9f55880c9e7196fdab1da7117d3dc8fb392c413a09938e759ec95b1759ef870cd4b6c005f110245045a1786e5a4accfa5be83342485f67 WHIRLPOOL c861f3848bfa15fa6f839e5d1ddd2c67c7e74a1502cf5deb8319043b7e2a9120676e47e85531394584110741a224c83c86e988183e41a32fef345484f1ff393a
diff --git a/app-arch/defluff/defluff-0.3.2.ebuild b/app-arch/defluff/defluff-0.3.2.ebuild
new file mode 100644
index 000000000000..5fc8bed7a9e1
--- /dev/null
+++ b/app-arch/defluff/defluff-0.3.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="deflate huffman optimizer"
+HOMEPAGE="http://j-o.users.sourceforge.net/
+ http://encode.ru/threads/1214-defluff-a-deflate-huffman-optimizer"
+SRC_URI="amd64? ( http://encode.ru/attachment.php?attachmentid=1523 -> ${P}-linux-x86_64.zip )
+ x86? ( http://encode.ru/attachment.php?attachmentid=1522 -> ${P}-linux-i686.zip )"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/bin/${PN}"
+RESTRICT="bindist mirror"
+
+src_install() {
+ into /opt
+ dobin ${PN}
+}
diff --git a/app-arch/defluff/metadata.xml b/app-arch/defluff/metadata.xml
new file mode 100644
index 000000000000..b6a99d12873d
--- /dev/null
+++ b/app-arch/defluff/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>alex_y_xu@yahoo.ca</email>
+ <name>Alex Xu</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/deltarpm/Manifest b/app-arch/deltarpm/Manifest
new file mode 100644
index 000000000000..989530b1e289
--- /dev/null
+++ b/app-arch/deltarpm/Manifest
@@ -0,0 +1 @@
+DIST deltarpm-git-20110223.tar.bz2 499623 SHA256 e4d6cad74cece0c6e48d5c49929e00a23ba116ff88a09245ad1d7ac84610c089 SHA512 ca6b75d9be5fc74206c57d6d13fe207f92e5dd295a75aee9690d171bcff877f6b04fe4f52e3f919e7ef0045087c39a63a773886d6c79977a16fe2791052a549c WHIRLPOOL c9a7f114f872bd142545edc902cf38a0b23c945eaa8dadda037a10f06811db99ea7c74f4f236dbaf59542c02409e3ffec814bdc930120d9aa47dfeface6d09aa
diff --git a/app-arch/deltarpm/deltarpm-3.6_pre20110223-r1.ebuild b/app-arch/deltarpm/deltarpm-3.6_pre20110223-r1.ebuild
new file mode 100644
index 000000000000..082f90e9348d
--- /dev/null
+++ b/app-arch/deltarpm/deltarpm-3.6_pre20110223-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils toolchain-funcs python-single-r1
+
+SNAPSHOT="20110223"
+
+DESCRIPTION="tools to create and apply deltarpms"
+HOMEPAGE="http://gitorious.org/deltarpm/deltarpm"
+SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}/${PN}-git-${SNAPSHOT}.tar.bz2/70f8884be63614ca7c3fc888cf20ebc8/${PN}-git-${SNAPSHOT}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="python"
+
+RDEPEND="sys-libs/zlib
+ app-arch/xz-utils
+ app-arch/bzip2
+ <app-arch/rpm-5
+ python? ( ${PYTHON_DEPS} )"
+DEPEND=${RDEPEND}
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+S="${WORKDIR}/${PN}-git-${SNAPSHOT}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i \
+ -e '/^prefix/s:/local::' \
+ -e '/^mandir/s:/man:/share/man:' \
+ Makefile || die
+ epatch "${FILESDIR}/3.6_pre20110223-build.patch"
+}
+
+src_compile() {
+ emake -j1 CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
+
+ if use python; then
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" python
+ fi
+}
diff --git a/app-arch/deltarpm/files/3.6_pre20110223-build.patch b/app-arch/deltarpm/files/3.6_pre20110223-build.patch
new file mode 100644
index 000000000000..c7feea74f893
--- /dev/null
+++ b/app-arch/deltarpm/files/3.6_pre20110223-build.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 0d0028f..9d05d59 100644
+--- a/Makefile
++++ b/Makefile
+@@ -41,7 +41,7 @@ _deltarpmmodule.so: readdeltarpm.o rpmhead.o util.o md5.o cfile.o $(zlibbundled)
+ if [ ! -f "python$$PYVER/$@" ]; then \
+ mkdir -p python$$PYVER ;\
+ $(CC) $(CFLAGS) $$PYCFLAGS $(zlibcppflag) -fPIC -c -o python$$PYVER/deltarpmmodule.o deltarpmmodule.c ;\
+- $(CC) -o python$$PYVER/$@ python$$PYVER/deltarpmmodule.o $^ -shared -Wl,-soname,_deltarpmmodule.so $(LDLIBS) $$PYLDFLAGS; \
++ $(CC) -o python$$PYVER/$@ python$$PYVER/deltarpmmodule.o $^ -shared -Wl,-soname,_deltarpmmodule.so $(LDLIBS) $(LDFLAGS) $$PYLDFLAGS; \
+ fi; \
+ fi; \
+ done
diff --git a/app-arch/deltarpm/metadata.xml b/app-arch/deltarpm/metadata.xml
new file mode 100644
index 000000000000..24ef88ea5b33
--- /dev/null
+++ b/app-arch/deltarpm/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>A tool to create and apply deltarpms.</longdescription>
+ <upstream>
+ <remote-id type="gitorious">deltarpm/deltarpm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/dpkg/Manifest b/app-arch/dpkg/Manifest
new file mode 100644
index 000000000000..9b1fabffa088
--- /dev/null
+++ b/app-arch/dpkg/Manifest
@@ -0,0 +1,3 @@
+DIST dpkg_1.17.25.tar.xz 4407792 SHA256 07019d38ae98fb107c79dbb3690cfadff877f153b8c4970e3a30d2e59aa66baa SHA512 6a4b45c0f59cd11fc104d954ab790dd7e11e650cd6dde303a664023a04bf6fbc49c878eaf00e27dd7f9bf5e79a92b3a5f5923d003942436758a3027364a0b7c7 WHIRLPOOL 6ed2d8a645787a83f431803214cce9b1c7516c4083ffe651deb7c2f8b641b85d3a17271030286155a985dfd0046fbd584d2d750ab8954e8e5af74085d7651bd2
+DIST dpkg_1.18.1.tar.xz 4340240 SHA256 cb26a97ca21c970cbe63a762125fe21f7437663badf6ce686589fe62650399da SHA512 1aa6b3e5300f80382d84c5f74d945863ea4bc4e71774d6798552421f26cd258b9b96cced1f65b8fca4995c96e2fa55dfb340aa7e1bb8a9f35c74a9fef8dcf0ba WHIRLPOOL 368d3c4e5639f46e0eca572dbcd29800ad4b2f6dadec812065abb0ffacd9846aec26d51f6f386770daa284a91ddd55734bdc9e8db4932df8ea3d0056c5da7839
+DIST dpkg_1.18.2.tar.xz 4345224 SHA256 11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4 SHA512 cd84ba53a0a8d6f8c9a79d1b3e4c7716249e6dbf8b92635f4691cc31c9896bc156f6ea5a42de419210133497d05c41eb00208b3ec02d44a177015d23873003af WHIRLPOOL 2f4a60e8127c3514ba9ee51723e4057724b8b8a99caea6812d80bca5617cd6f3971a80c219162fd16059e08bd0914d15a39e618fd115bb6dcb8a6b402c64be42
diff --git a/app-arch/dpkg/dpkg-1.17.25.ebuild b/app-arch/dpkg/dpkg-1.17.25.ebuild
new file mode 100644
index 000000000000..369cfc9ace6b
--- /dev/null
+++ b/app-arch/dpkg/dpkg-1.17.25.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib autotools toolchain-funcs
+
+DESCRIPTION="Package maintenance system for Debian"
+HOMEPAGE="http://packages.qa.debian.org/dpkg"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${P/-/_}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-solaris ~x86-solaris"
+IUSE="+bzip2 +lzma nls selinux test unicode +update-alternatives +zlib"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.0:=
+ dev-perl/TimeDate
+ >=sys-libs/ncurses-5.2-r7
+ bzip2? ( app-arch/bzip2 )
+ lzma? ( app-arch/xz-utils )
+ selinux? ( sys-libs/libselinux )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+"
+DEPEND="
+ ${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ >=sys-devel/gettext-0.18.2
+ )
+ test? (
+ dev-perl/DateTime-Format-DateParse
+ dev-perl/IO-String
+ dev-perl/Test-Pod
+ virtual/perl-Test-Harness
+ )
+"
+
+DOCS=( ChangeLog THANKS TODO )
+
+src_prepare() {
+ # do not expect Debian's gzip --rsyncable extension
+ epatch "${FILESDIR}"/${PN}-1.17.0-gzip-rsyncable.patch
+
+ epatch "${FILESDIR}"/${PN}-1.17.1-flags.patch
+
+ # Force the use of the running bash for get-version (this file is never
+ # installed, so no need to worry about hardcoding a temporary bash)
+ sed -i -e '1c\#!'"${BASH}" get-version || die
+
+ if [[ ${CHOST} == mips64*-linux-gnu ]] ; then
+ # Debian targets use custom full tuples. Map the default one
+ # based on the ABI we're using.
+ local abi
+ if [[ ${ABI} == "n64" ]] ; then
+ abi="mips64"
+ else
+ abi="mipsn32"
+ fi
+ printf "gnu-linux-mips64 ${abi}\ngnu-linux-mips64el ${abi}el\n" >> triplettable
+ fi
+
+ use nls && strip-linguas -i po
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ econf \
+ $(use_enable nls) \
+ $(use_enable unicode) \
+ $(use_enable update-alternatives) \
+ $(use_with bzip2 bz2) \
+ $(use_with lzma liblzma) \
+ $(use_with selinux) \
+ $(use_with zlib) \
+ --disable-compiler-warnings \
+ --disable-dselect \
+ --disable-silent-rules \
+ --disable-start-stop-daemon \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_compile() {
+ emake AR=$(tc-getAR)
+}
+
+src_install() {
+ default
+
+ keepdir /usr/$(get_libdir)/db/methods/{mnt,floppy,disk}
+ keepdir /usr/$(get_libdir)/db/{alternatives,info,methods,parts,updates}
+}
diff --git a/app-arch/dpkg/dpkg-1.18.1.ebuild b/app-arch/dpkg/dpkg-1.18.1.ebuild
new file mode 100644
index 000000000000..808e52f6014b
--- /dev/null
+++ b/app-arch/dpkg/dpkg-1.18.1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib autotools toolchain-funcs
+
+DESCRIPTION="Package maintenance system for Debian"
+HOMEPAGE="http://packages.qa.debian.org/dpkg"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${P/-/_}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-solaris ~x86-solaris"
+IUSE="+bzip2 +lzma nls selinux test unicode +update-alternatives +zlib"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.0:=
+ dev-perl/TimeDate
+ >=sys-libs/ncurses-5.2-r7
+ bzip2? ( app-arch/bzip2 )
+ lzma? ( app-arch/xz-utils )
+ selinux? ( sys-libs/libselinux )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+"
+DEPEND="
+ ${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ >=sys-devel/gettext-0.18.2
+ )
+ test? (
+ dev-perl/DateTime-Format-DateParse
+ dev-perl/IO-String
+ dev-perl/Test-Pod
+ virtual/perl-Test-Harness
+ )
+"
+
+DOCS=( ChangeLog THANKS TODO )
+
+src_prepare() {
+ # do not expect Debian's gzip --rsyncable extension
+ epatch "${FILESDIR}"/${PN}-1.17.0-gzip-rsyncable.patch
+
+ epatch "${FILESDIR}"/${PN}-1.17.1-flags.patch
+
+ # Force the use of the running bash for get-version (this file is never
+ # installed, so no need to worry about hardcoding a temporary bash)
+ sed -i -e '1c\#!'"${BASH}" get-version || die
+
+ if [[ ${CHOST} == mips64*-linux-gnu ]] ; then
+ # Debian targets use custom full tuples. Map the default one
+ # based on the ABI we're using.
+ local abi
+ if [[ ${ABI} == "n64" ]] ; then
+ abi="mips64"
+ else
+ abi="mipsn32"
+ fi
+ printf "gnu-linux-mips64 ${abi}\ngnu-linux-mips64el ${abi}el\n" >> triplettable
+ fi
+
+ use nls && strip-linguas -i po
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ econf \
+ $(use_enable nls) \
+ $(use_enable unicode) \
+ $(use_enable update-alternatives) \
+ $(use_with bzip2 bz2) \
+ $(use_with lzma liblzma) \
+ $(use_with selinux) \
+ $(use_with zlib) \
+ --disable-compiler-warnings \
+ --disable-dselect \
+ --disable-silent-rules \
+ --disable-start-stop-daemon \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_compile() {
+ emake AR=$(tc-getAR)
+}
+
+src_install() {
+ default
+
+ keepdir /usr/$(get_libdir)/db/methods/{mnt,floppy,disk}
+ keepdir /usr/$(get_libdir)/db/{alternatives,info,methods,parts,updates}
+}
diff --git a/app-arch/dpkg/dpkg-1.18.2.ebuild b/app-arch/dpkg/dpkg-1.18.2.ebuild
new file mode 100644
index 000000000000..808e52f6014b
--- /dev/null
+++ b/app-arch/dpkg/dpkg-1.18.2.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib autotools toolchain-funcs
+
+DESCRIPTION="Package maintenance system for Debian"
+HOMEPAGE="http://packages.qa.debian.org/dpkg"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${P/-/_}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-solaris ~x86-solaris"
+IUSE="+bzip2 +lzma nls selinux test unicode +update-alternatives +zlib"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.0:=
+ dev-perl/TimeDate
+ >=sys-libs/ncurses-5.2-r7
+ bzip2? ( app-arch/bzip2 )
+ lzma? ( app-arch/xz-utils )
+ selinux? ( sys-libs/libselinux )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+"
+DEPEND="
+ ${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ >=sys-devel/gettext-0.18.2
+ )
+ test? (
+ dev-perl/DateTime-Format-DateParse
+ dev-perl/IO-String
+ dev-perl/Test-Pod
+ virtual/perl-Test-Harness
+ )
+"
+
+DOCS=( ChangeLog THANKS TODO )
+
+src_prepare() {
+ # do not expect Debian's gzip --rsyncable extension
+ epatch "${FILESDIR}"/${PN}-1.17.0-gzip-rsyncable.patch
+
+ epatch "${FILESDIR}"/${PN}-1.17.1-flags.patch
+
+ # Force the use of the running bash for get-version (this file is never
+ # installed, so no need to worry about hardcoding a temporary bash)
+ sed -i -e '1c\#!'"${BASH}" get-version || die
+
+ if [[ ${CHOST} == mips64*-linux-gnu ]] ; then
+ # Debian targets use custom full tuples. Map the default one
+ # based on the ABI we're using.
+ local abi
+ if [[ ${ABI} == "n64" ]] ; then
+ abi="mips64"
+ else
+ abi="mipsn32"
+ fi
+ printf "gnu-linux-mips64 ${abi}\ngnu-linux-mips64el ${abi}el\n" >> triplettable
+ fi
+
+ use nls && strip-linguas -i po
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ econf \
+ $(use_enable nls) \
+ $(use_enable unicode) \
+ $(use_enable update-alternatives) \
+ $(use_with bzip2 bz2) \
+ $(use_with lzma liblzma) \
+ $(use_with selinux) \
+ $(use_with zlib) \
+ --disable-compiler-warnings \
+ --disable-dselect \
+ --disable-silent-rules \
+ --disable-start-stop-daemon \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_compile() {
+ emake AR=$(tc-getAR)
+}
+
+src_install() {
+ default
+
+ keepdir /usr/$(get_libdir)/db/methods/{mnt,floppy,disk}
+ keepdir /usr/$(get_libdir)/db/{alternatives,info,methods,parts,updates}
+}
diff --git a/app-arch/dpkg/files/dpkg-1.17.0-gzip-rsyncable.patch b/app-arch/dpkg/files/dpkg-1.17.0-gzip-rsyncable.patch
new file mode 100644
index 000000000000..f956ca590ce7
--- /dev/null
+++ b/app-arch/dpkg/files/dpkg-1.17.0-gzip-rsyncable.patch
@@ -0,0 +1,11 @@
+--- a/scripts/Dpkg/Compression.pm
++++ b/scripts/Dpkg/Compression.pm
+@@ -52,7 +52,7 @@
+ my $COMP = {
+ gzip => {
+ file_ext => 'gz',
+- comp_prog => [ 'gzip', '--no-name', '--rsyncable' ],
++ comp_prog => [ 'gzip', '--no-name' ],
+ decomp_prog => [ 'gunzip' ],
+ default_level => 9,
+ },
diff --git a/app-arch/dpkg/files/dpkg-1.17.1-flags.patch b/app-arch/dpkg/files/dpkg-1.17.1-flags.patch
new file mode 100644
index 000000000000..9517714fa41b
--- /dev/null
+++ b/app-arch/dpkg/files/dpkg-1.17.1-flags.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,8 +104,6 @@
+ # Checks for the build machinery.
+ AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
+ DPKG_COMPILER_WARNINGS
+-DPKG_COMPILER_OPTIMISATIONS
+-DPKG_LINKER_OPTIMISATIONS
+ DPKG_ARCHITECTURE
+
+ AC_CONFIG_FILES([ Makefile
diff --git a/app-arch/dpkg/metadata.xml b/app-arch/dpkg/metadata.xml
new file mode 100644
index 000000000000..2d74819279d9
--- /dev/null
+++ b/app-arch/dpkg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>deb-tools</herd>
+<use>
+<flag name="update-alternatives">Install update-alternatives</flag>
+</use>
+</pkgmetadata>
diff --git a/app-arch/duff/Manifest b/app-arch/duff/Manifest
new file mode 100644
index 000000000000..2aca461e27cd
--- /dev/null
+++ b/app-arch/duff/Manifest
@@ -0,0 +1 @@
+DIST duff-0.5.2.tar.bz2 174545 SHA256 5615ce50f971d29f6a13bbf4d4ab2d5a7134aad157741515c51d3921aa1b755d SHA512 5f64c28ab86523dd4dffaf26dac67d10bea71bd5cf7b4eaa3dfa27309cf8e7cf37a74ee62b5f3df3cb0114a847711b3147a083cbdd72ab8e4b5f9a45c908f333 WHIRLPOOL 4c212872dc07757b2b14f6a1d3e5c69f62c787ec6f3df3d4bcc15a7ca7a56f6c50eac218c8797d42e8e24cf6f429e5581d35a877ea1784512a91fc52352a0cb5
diff --git a/app-arch/duff/duff-0.5.2.ebuild b/app-arch/duff/duff-0.5.2.ebuild
new file mode 100644
index 000000000000..c9b107f2f1b3
--- /dev/null
+++ b/app-arch/duff/duff-0.5.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="Command-line utility for quickly finding duplicates in a given set of files"
+HOMEPAGE="http://duff.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed emake install"
+ dodoc AUTHORS ChangeLog HACKING NEWS README* TODO
+}
diff --git a/app-arch/duff/metadata.xml b/app-arch/duff/metadata.xml
new file mode 100644
index 000000000000..da9a0b9845f9
--- /dev/null
+++ b/app-arch/duff/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">duff</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/dump/Manifest b/app-arch/dump/Manifest
new file mode 100644
index 000000000000..8c184d0f4459
--- /dev/null
+++ b/app-arch/dump/Manifest
@@ -0,0 +1 @@
+DIST dump-0.4b44.tar.gz 296691 SHA256 78cb75632ac5e99dca38af3a2574303eee3c5a7af464011d279421d8b0e64f96 SHA512 3db828bac026d872913f0e010378366919fbb523d22f1863c06017581e4f4a1c5a239199794ca1158b04e7e3ecbb596d77b131b3278bed29fcfcd3835a3351d4 WHIRLPOOL 43dfc8fb996b443b9d9a9d9ecbf7d01f3db6eaba7acc92ab35ee0930ebdc7666855fc6b78b25450ae3790c6f10093036e0fc733385d7e8dc808bb614b681135a
diff --git a/app-arch/dump/dump-0.4.44-r1.ebuild b/app-arch/dump/dump-0.4.44-r1.ebuild
new file mode 100644
index 000000000000..641d0475eeea
--- /dev/null
+++ b/app-arch/dump/dump-0.4.44-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils autotools
+
+MY_P=${P/4./4b}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="Dump/restore ext2fs backup utilities"
+HOMEPAGE="http://dump.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dump/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86"
+IUSE="debug ermt readline selinux static"
+
+RDEPEND=">=sys-fs/e2fsprogs-1.27
+ >=app-arch/bzip2-1.0.2
+ >=sys-libs/zlib-1.1.4
+ ermt? ( dev-libs/openssl )
+ readline? ( sys-libs/readline
+ sys-libs/ncurses
+ static? ( sys-libs/ncurses[static-libs] ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ virtual/os-headers"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-underlinking.patch"
+ epatch "${FILESDIR}/${P}-rl_completion_matches-detection.patch"
+ epatch "${FILESDIR}/${P}-fix-pointers-aliasing.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-dumpdatespath=/etc/dumpdates \
+ --with-{bin,man}owner=root \
+ --with-{bin,man}grp=root \
+ --enable-largefile \
+ $(use_enable selinux transselinux) \
+ $(use_enable ermt) \
+ $(use_enable static) \
+ $(use_enable readline) \
+ $(use_enable debug)
+}
+
+src_install() {
+ # built on old autotools, no DESTDIR support
+ einstall MANDIR="${D}"/usr/share/man/man8
+ mv "${ED}"/usr/sbin/{,dump-}rmt || die
+ mv "${ED}"/usr/share/man/man8/{,dump-}rmt.8 || die
+ use ermt && newsbin rmt/ermt dump-ermt
+
+ dodoc CHANGES KNOWNBUGS MAINTAINERS README REPORTING-BUGS THANKS TODO
+ dodoc -r examples/*
+}
+
+pkg_postinst() {
+ ewarn "app-arch/dump installs 'rmt' as 'dump-rmt'."
+ ewarn "This is to avoid conflicts with app-arch/tar 'rmt'."
+}
diff --git a/app-arch/dump/files/dump-0.4.44-fix-pointers-aliasing.patch b/app-arch/dump/files/dump-0.4.44-fix-pointers-aliasing.patch
new file mode 100644
index 000000000000..6e3290085470
--- /dev/null
+++ b/app-arch/dump/files/dump-0.4.44-fix-pointers-aliasing.patch
@@ -0,0 +1,126 @@
+https://sourceforge.net/tracker/?func=detail&aid=3322910&group_id=1306&atid=301306
+
+=== modified file 'dump/tape.c'
+--- dump/tape.c 2011-06-20 07:22:40 +0000
++++ dump/tape.c 2011-06-20 07:57:11 +0000
+@@ -1281,9 +1281,9 @@
+ compresult = 1;
+ #ifdef HAVE_ZLIB
+ if (zipflag == COMPRESS_ZLIB) {
+- compresult = compress2(comp_buf->buf,
++ compresult = compress2((Bytef *)comp_buf->buf,
+ &worklen,
+- (char *)slp->tblock[0],
++ (Bytef *)slp->tblock[0],
+ writesize,
+ compressed);
+ if (compresult == Z_OK)
+@@ -1313,8 +1313,9 @@
+ #ifdef HAVE_LZO
+ if (zipflag == COMPRESS_LZO) {
+ lzo_uint worklen2 = worklen;
+- compresult = lzo1x_1_compress((char *)slp->tblock[0],writesize,
+- comp_buf->buf,
++ compresult = lzo1x_1_compress((lzo_bytep)slp->tblock[0],
++ writesize,
++ (lzo_bytep)comp_buf->buf,
+ &worklen2,
+ LZO_WorkMem);
+ worklen = worklen2;
+
+=== modified file 'dump/traverse.c'
+--- dump/traverse.c 2011-06-20 07:22:40 +0000
++++ dump/traverse.c 2011-06-20 07:57:11 +0000
+@@ -782,13 +782,13 @@
+ for (i = p->next_block; i < blockcnt; i++) {
+ p->buf[p->cnt++] = 0;
+ if (p->cnt == p->max) {
+- blksout (p->buf, p->cnt, p->ino);
++ blksout ((blk_t *)p->buf, p->cnt, p->ino);
+ p->cnt = 0;
+ }
+ }
+ p->buf[p->cnt++] = *blocknr;
+ if (p->cnt == p->max) {
+- blksout (p->buf, p->cnt, p->ino);
++ blksout ((blk_t *)p->buf, p->cnt, p->ino);
+ p->cnt = 0;
+ }
+ p->next_block = blockcnt + 1;
+@@ -868,14 +868,15 @@
+ void
+ dumpino(struct dinode *dp, dump_ino_t ino, int metaonly)
+ {
++ fsizeT remaining;
++ char buf[TP_BSIZE];
++ struct new_bsd_inode nbi;
++ int i;
++#ifdef __linux__
++ struct block_context bc;
++#else
+ unsigned long cnt;
+- fsizeT size, remaining;
+- char buf[TP_BSIZE];
+- struct new_bsd_inode nbi;
+- int i;
+-#ifdef __linux__
+- struct block_context bc;
+-#else
++ fsizeT size;
+ int ind_level;
+ #endif
+ u_quad_t i_size;
+@@ -1001,13 +1002,13 @@
+ for (i = 0; i < (int)howmany(remaining, sblock->fs_fsize); i++) {
+ bc.buf[bc.cnt++] = 0;
+ if (bc.cnt == bc.max) {
+- blksout (bc.buf, bc.cnt, bc.ino);
++ blksout ((blk_t *)bc.buf, bc.cnt, bc.ino);
+ bc.cnt = 0;
+ }
+ }
+ }
+ if (bc.cnt > 0) {
+- blksout (bc.buf, bc.cnt, bc.ino);
++ blksout ((blk_t *)bc.buf, bc.cnt, bc.ino);
+ }
+ free(bc.buf);
+ dump_xattr(ino, dp);
+@@ -1016,7 +1017,7 @@
+ cnt = NDADDR * sblock->fs_frag;
+ else
+ cnt = howmany(i_size, sblock->fs_fsize);
+- blksout(&dp->di_db[0], cnt, ino);
++ blksout((blk_t *)&dp->di_db[0], cnt, ino);
+ if ((quad_t) (size = i_size - NDADDR * sblock->fs_bsize) <= 0) {
+ dump_xattr(ino, dp);
+ return;
+
+=== modified file 'restore/tape.c'
+--- restore/tape.c 2011-06-20 07:22:40 +0000
++++ restore/tape.c 2011-06-20 07:57:11 +0000
+@@ -2335,8 +2335,10 @@
+ #ifndef HAVE_ZLIB
+ errx(1,"This restore version doesn't support zlib decompression");
+ #else
+- cresult = uncompress(comprbuf, &worklen,
+- tpbin->buf, blocklen);
++ cresult = uncompress((Bytef *)comprbuf,
++ &worklen,
++ (Bytef *)tpbin->buf,
++ blocklen);
+ output = comprbuf;
+ switch (cresult) {
+ case Z_OK:
+@@ -2397,8 +2399,8 @@
+ errx(1,"This restore version doesn't support lzo decompression");
+ #else
+ lzo_uint worklen2 = worklen;
+- cresult = lzo1x_decompress(tpbin->buf, blocklen,
+- comprbuf, &worklen2, NULL);
++ cresult = lzo1x_decompress((lzo_bytep)tpbin->buf, blocklen,
++ (lzo_bytep)comprbuf, &worklen2, NULL);
+ worklen = worklen2;
+ output = comprbuf;
+ switch (cresult) {
+
diff --git a/app-arch/dump/files/dump-0.4.44-rl_completion_matches-detection.patch b/app-arch/dump/files/dump-0.4.44-rl_completion_matches-detection.patch
new file mode 100644
index 000000000000..6f968f549d7c
--- /dev/null
+++ b/app-arch/dump/files/dump-0.4.44-rl_completion_matches-detection.patch
@@ -0,0 +1,24 @@
+https://sourceforge.net/tracker/?func=detail&aid=3322906&group_id=1306&atid=301306
+
+=== modified file 'configure.in'
+--- configure.in 2011-06-20 07:22:40 +0000
++++ configure.in 2011-06-20 07:56:19 +0000
+@@ -516,7 +516,7 @@
+ dnl
+ dnl Check for rl_completion_matches
+ dnl
+-AC_CHECK_LIB(readline, rl_completion_matches, [rlcm=yes], [rlcm=no], "-ltermcap")
++AC_CHECK_LIB(readline, rl_completion_matches, [rlcm=yes], [rlcm=no], [$rdllib])
+ if test "$rlcm" = yes; then
+ AC_DEFINE([HAVE_READLINE_RLCM],1,[Define this if your readline libs have the rl_completion_matches library.])
+ fi
+@@ -524,7 +524,7 @@
+ dnl
+ dnl Check for rl_completion_append_character
+ dnl
+-AC_CHECK_LIB(readline, rl_completion_append_character, [rcac=yes], [rcac=no], "-ltermcap")
++AC_CHECK_LIB(readline, rl_completion_append_character, [rcac=yes], [rcac=no], [$rdllib])
+ if test "$rcac" = yes; then
+ AC_DEFINE([HAVE_READLINE_CAC],1,[Define this if your readline libs have the rl_completion_append_character variable.])
+ fi
+
diff --git a/app-arch/dump/files/dump-0.4.44-underlinking.patch b/app-arch/dump/files/dump-0.4.44-underlinking.patch
new file mode 100644
index 000000000000..b211f0079769
--- /dev/null
+++ b/app-arch/dump/files/dump-0.4.44-underlinking.patch
@@ -0,0 +1,31 @@
+diff --git a/MCONFIG.in b/MCONFIG.in
+index 64cb016..f5d1012 100644
+--- a/MCONFIG.in
++++ b/MCONFIG.in
+@@ -40,7 +40,7 @@ GINC+= @EXT2FS_CFLAGS@
+ # indicate where the ext2fs library can be found (this is not needed if you
+ # have run `make install-libs' in the e2fsprogs source directory).
+ #GLIBDIR= -L/usr/src/e2fsprogs-0.5c/lib
+-GLIBS= $(GLIBDIR) -L../compat/lib -lcompat @EXT2FS_LIBS@
++GLIBS= $(GLIBDIR) -L../compat/lib -lcompat @EXT2FS_LIBS@ @COM_ERR_LIBS@
+
+ #
+ # Definitions (don't change them unless you know what you are doing)
+diff --git a/configure.in b/configure.in
+index 2d69157..c8a9e04 100644
+--- a/configure.in
++++ b/configure.in
+@@ -414,11 +414,12 @@ fi
+ if test "$ext2fs_h" = no -o "x$EXT2FS_LIBS" = "x"; then
+ AC_MSG_ERROR(You need to install the Ext2fs libraries from the E2fsprogs distribution first - hint: make install-libs)
+ fi
++PKG_CHECK_MODULES(COM_ERR, [com_err])
+
+ dnl
+ dnl Check for ext2fs_read_inode_full
+ dnl
+-AC_CHECK_LIB(ext2fs, ext2fs_read_inode_full, [rif=yes], [rif=no], [-lcom_err])
++AC_CHECK_LIB(ext2fs, ext2fs_read_inode_full, [rif=yes], [rif=no], [$COM_ERR_LIBS])
+ if test "$rif" = yes; then
+ AC_DEFINE([HAVE_EXT2FS_READ_INODE_FULL],1,[Define this if your ext2fs libs have the ext2fs_read_inode_full function.])
+ fi
diff --git a/app-arch/dump/metadata.xml b/app-arch/dump/metadata.xml
new file mode 100644
index 000000000000..1d2ab7dac1e1
--- /dev/null
+++ b/app-arch/dump/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <longdescription>
+ A utility to help backup and restore files on a harddrive.
+ </longdescription>
+ <use>
+ <flag name="ermt">encrypted rmt support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dump</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/engrampa/Manifest b/app-arch/engrampa/Manifest
new file mode 100644
index 000000000000..ae890ce55822
--- /dev/null
+++ b/app-arch/engrampa/Manifest
@@ -0,0 +1,2 @@
+DIST engrampa-1.8.0.tar.xz 1357360 SHA256 d802acee43e24b8513e661a91dd7943ebdc55270ed0ceee0a8e29f981f0f6230 SHA512 3be9ba254cefe82e16eb533d5738dacb29e770e30b7a8cc1e62af0476b9b28d90bb86937f559d40eda79116172035c730d8f50053936857587c198461a401eea WHIRLPOOL c625de1156e582f58beed4b04087528e08f1d93de804b022bfc69ed04b12e3c53df92a51534693434d7b3237890d7ee8334a5cd830040b0374aa5f70710ab921
+DIST engrampa-1.8.1.tar.xz 1367088 SHA256 f8c541de364352005b2f4a100140197a2190269d3dbffe032e284a98478f1be7 SHA512 0733ef93d34356d6c9cdda7ac91c97ef10fe47df0962375e0270b25873c2271ade4ee9b82f7d6c4c3fd1de5dbe51e9ca1b30acf208b3a7f80a19a4899299b00b WHIRLPOOL 63fde3e27240b175dff12d7a3e15123413033faa7f49a0dcb6fa75eb8b51ab63246879ebacd4295f95b8f9964b48fcba85264378ea3659e5864b43e591133318
diff --git a/app-arch/engrampa/engrampa-1.8.0-r1.ebuild b/app-arch/engrampa/engrampa-1.8.0-r1.ebuild
new file mode 100644
index 000000000000..53334556e9e8
--- /dev/null
+++ b/app-arch/engrampa/engrampa-1.8.0-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="Engrampa archive manager for MATE"
+HOMEPAGE="http://mate-desktop.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="caja"
+
+RDEPEND=">=x11-libs/gtk+-2.21.4:2
+ >=dev-libs/glib-2.25.5:2
+ >=dev-libs/json-glib-0.14:0
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango:0
+ virtual/libintl:0
+ caja? ( >=mate-base/caja-1.8:0 )
+ !!app-arch/mate-file-archiver"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35:*
+ dev-util/itstool:0
+ >=mate-base/mate-common-1.8:0
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+src_prepare() {
+ epatch "${FILESDIR}/engrampa-1.8.0-caja-schema-fix.patch"
+ gnome2_src_prepare
+
+ # Drop DEPRECATED flags as configure option doesn't do it, bug #385453
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
+ copy-n-paste/Makefile.am copy-n-paste/Makefile.in || die
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-packagekit \
+ --disable-deprecations \
+ --with-gtk=2.0 \
+ $(use_enable caja caja-actions)
+}
+
+DOCS="AUTHORS HACKING MAINTAINERS NEWS README TODO"
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ elog ""
+ elog "${PN} is a frontend for several archiving utilities. If you want a"
+ elog "particular achive format supported install the relevant package."
+ elog
+ elog "For example:"
+ elog " 7-zip : emerge app-arch/p7zip"
+ elog " ace : emerge app-arch/unace"
+ elog " arj : emerge app-arch/arj"
+ elog " cpio : emerge app-arch/cpio"
+ elog " deb : emerge app-arch/dpkg"
+ elog " iso : emerge app-cdr/cdrtools"
+ elog " jar,zip : emerge app-arch/zip or emerge app-arch/unzip"
+ elog " lha : emerge app-arch/lha"
+ elog " lzma : emerge app-arch/xz-utils"
+ elog " lzop : emerge app-arch/lzop"
+ elog " rar : emerge app-arch/unrar"
+ elog " rpm : emerge app-arch/rpm"
+ elog " unstuff : emerge app-arch/stuffit"
+ elog " zoo : emerge app-arch/zoo"
+}
diff --git a/app-arch/engrampa/engrampa-1.8.0.ebuild b/app-arch/engrampa/engrampa-1.8.0.ebuild
new file mode 100644
index 000000000000..b7b106808609
--- /dev/null
+++ b/app-arch/engrampa/engrampa-1.8.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="Engrampa archive manager for MATE"
+HOMEPAGE="http://mate-desktop.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="caja"
+
+# GLib-GIO-ERROR **: Settings schema 'org.mate.caja.preferences' is not installed
+#
+# ... thus we depend on Caja regardless of the Caja USE flag. Patches welcome.
+RDEPEND=">=x11-libs/gtk+-2.21.4:2
+ >=dev-libs/glib-2.25.5:2
+ >=dev-libs/json-glib-0.14:0
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango:0
+ virtual/libintl:0
+ || ( >=mate-base/caja-1.8:0 >=mate-base/mate-file-manager-1.6:0 )
+ !!app-arch/mate-file-archiver"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35:*
+ dev-util/itstool:0
+ >=mate-base/mate-common-1.6:0
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Drop DEPRECATED flags as configure option doesn't do it, bug #385453
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
+ copy-n-paste/Makefile.am copy-n-paste/Makefile.in || die
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-packagekit \
+ --disable-deprecations \
+ --with-gtk=2.0 \
+ $(use_enable caja caja-actions)
+}
+
+DOCS="AUTHORS HACKING MAINTAINERS NEWS README TODO"
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ elog ""
+ elog "${PN} is a frontend for several archiving utilities. If you want a"
+ elog "particular achive format supported install the relevant package."
+ elog
+ elog "For example:"
+ elog " 7-zip : emerge app-arch/p7zip"
+ elog " ace : emerge app-arch/unace"
+ elog " arj : emerge app-arch/arj"
+ elog " cpio : emerge app-arch/cpio"
+ elog " deb : emerge app-arch/dpkg"
+ elog " iso : emerge app-cdr/cdrtools"
+ elog " jar,zip : emerge app-arch/zip or emerge app-arch/unzip"
+ elog " lha : emerge app-arch/lha"
+ elog " lzma : emerge app-arch/xz-utils"
+ elog " lzop : emerge app-arch/lzop"
+ elog " rar : emerge app-arch/unrar"
+ elog " rpm : emerge app-arch/rpm"
+ elog " unstuff : emerge app-arch/stuffit"
+ elog " zoo : emerge app-arch/zoo"
+}
diff --git a/app-arch/engrampa/engrampa-1.8.1-r1.ebuild b/app-arch/engrampa/engrampa-1.8.1-r1.ebuild
new file mode 100644
index 000000000000..53334556e9e8
--- /dev/null
+++ b/app-arch/engrampa/engrampa-1.8.1-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="Engrampa archive manager for MATE"
+HOMEPAGE="http://mate-desktop.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="caja"
+
+RDEPEND=">=x11-libs/gtk+-2.21.4:2
+ >=dev-libs/glib-2.25.5:2
+ >=dev-libs/json-glib-0.14:0
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango:0
+ virtual/libintl:0
+ caja? ( >=mate-base/caja-1.8:0 )
+ !!app-arch/mate-file-archiver"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35:*
+ dev-util/itstool:0
+ >=mate-base/mate-common-1.8:0
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+src_prepare() {
+ epatch "${FILESDIR}/engrampa-1.8.0-caja-schema-fix.patch"
+ gnome2_src_prepare
+
+ # Drop DEPRECATED flags as configure option doesn't do it, bug #385453
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
+ copy-n-paste/Makefile.am copy-n-paste/Makefile.in || die
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-packagekit \
+ --disable-deprecations \
+ --with-gtk=2.0 \
+ $(use_enable caja caja-actions)
+}
+
+DOCS="AUTHORS HACKING MAINTAINERS NEWS README TODO"
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ elog ""
+ elog "${PN} is a frontend for several archiving utilities. If you want a"
+ elog "particular achive format supported install the relevant package."
+ elog
+ elog "For example:"
+ elog " 7-zip : emerge app-arch/p7zip"
+ elog " ace : emerge app-arch/unace"
+ elog " arj : emerge app-arch/arj"
+ elog " cpio : emerge app-arch/cpio"
+ elog " deb : emerge app-arch/dpkg"
+ elog " iso : emerge app-cdr/cdrtools"
+ elog " jar,zip : emerge app-arch/zip or emerge app-arch/unzip"
+ elog " lha : emerge app-arch/lha"
+ elog " lzma : emerge app-arch/xz-utils"
+ elog " lzop : emerge app-arch/lzop"
+ elog " rar : emerge app-arch/unrar"
+ elog " rpm : emerge app-arch/rpm"
+ elog " unstuff : emerge app-arch/stuffit"
+ elog " zoo : emerge app-arch/zoo"
+}
diff --git a/app-arch/engrampa/files/engrampa-1.8.0-caja-schema-fix.patch b/app-arch/engrampa/files/engrampa-1.8.0-caja-schema-fix.patch
new file mode 100644
index 000000000000..2068046465da
--- /dev/null
+++ b/app-arch/engrampa/files/engrampa-1.8.0-caja-schema-fix.patch
@@ -0,0 +1,89 @@
+From 49f97664d7fdfc7914245cb26f660cbedd36afa4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Thu, 2 Oct 2014 14:29:01 +0200
+Subject: [PATCH] Use Caja GSettings schema optionally
+
+Excludes changes to glib version in configure.ac
+
+This makes Caja dependency optional.
+
+Closes https://github.com/mate-desktop/engrampa/pull/60
+---
+ configure.ac | 2 +-
+ src/fr-window.c | 34 ++++++++++++++++++++++++----------
+ 2 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/src/fr-window.c b/src/fr-window.c
+index f9ceef8..6994066 100644
+--- a/src/fr-window.c
++++ b/src/fr-window.c
+@@ -638,7 +638,9 @@ fr_window_free_private_data (FrWindow *window)
+ _g_object_unref (window->priv->settings_ui);
+ _g_object_unref (window->priv->settings_general);
+ _g_object_unref (window->priv->settings_dialogs);
+- _g_object_unref (window->priv->settings_caja);
++
++ if (window->priv->settings_caja)
++ _g_object_unref (window->priv->settings_caja);
+ }
+
+
+@@ -4598,11 +4600,13 @@ static gboolean
+ is_single_click_policy (FrWindow *window)
+ {
+ char *value;
+- gboolean result;
++ gboolean result = FALSE;
+
+- value = g_settings_get_string (window->priv->settings_caja, CAJA_CLICK_POLICY);
+- result = (value != NULL) && (strncmp (value, "single", 6) == 0);
+- g_free (value);
++ if (window->priv->settings_caja) {
++ value = g_settings_get_string (window->priv->settings_caja, CAJA_CLICK_POLICY);
++ result = (value != NULL) && (strncmp (value, "single", 6) == 0);
++ g_free (value);
++ }
+
+ return result;
+ }
+@@ -5384,6 +5388,8 @@ fr_window_construct (FrWindow *window)
+ GtkToolItem *open_recent_tool_item;
+ GtkWidget *menu_item;
+ GError *error = NULL;
++ GSettingsSchemaSource *schema_source;
++ GSettingsSchema *caja_schema;
+
+ /* data common to all windows. */
+
+@@ -5401,7 +5407,13 @@ fr_window_construct (FrWindow *window)
+ window->priv->settings_ui = g_settings_new (ENGRAMPA_SCHEMA_UI);
+ window->priv->settings_general = g_settings_new (ENGRAMPA_SCHEMA_GENERAL);
+ window->priv->settings_dialogs = g_settings_new (ENGRAMPA_SCHEMA_DIALOGS);
+- window->priv->settings_caja = g_settings_new (CAJA_SCHEMA);
++
++ schema_source = g_settings_schema_source_get_default ();
++ caja_schema = g_settings_schema_source_lookup (schema_source, CAJA_SCHEMA, FALSE);
++ if (caja_schema) {
++ window->priv->settings_caja = g_settings_new (CAJA_SCHEMA);
++ g_settings_schema_unref (caja_schema);
++ }
+
+ /* Create the application. */
+
+@@ -5994,10 +6006,12 @@ fr_window_construct (FrWindow *window)
+ "changed::" PREF_LISTING_USE_MIME_ICONS,
+ G_CALLBACK (pref_use_mime_icons_changed),
+ window);
+- g_signal_connect (window->priv->settings_caja,
+- "changed::" CAJA_CLICK_POLICY,
+- G_CALLBACK (pref_click_policy_changed),
+- window);
++
++ if (window->priv->settings_caja)
++ g_signal_connect (window->priv->settings_caja,
++ "changed::" CAJA_CLICK_POLICY,
++ G_CALLBACK (pref_click_policy_changed),
++ window);
+
+ /* Give focus to the list. */
+
diff --git a/app-arch/engrampa/metadata.xml b/app-arch/engrampa/metadata.xml
new file mode 100644
index 000000000000..b583ec5eee56
--- /dev/null
+++ b/app-arch/engrampa/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mate</herd>
+ <use>
+ <flag name="caja">Enable engrampa to integrate with
+ <pkg>mate-base/caja</pkg> by providing entries in its context
+ menu</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">mate-desktop/engrampa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/fastjar/Manifest b/app-arch/fastjar/Manifest
new file mode 100644
index 000000000000..e65f0bddc913
--- /dev/null
+++ b/app-arch/fastjar/Manifest
@@ -0,0 +1 @@
+DIST fastjar-0.98.tar.gz 717984 SHA256 f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145 SHA512 c0f9fca7b58d6acd00b90a5184dbde9ba3ffc5bf4d69512743e450649a272baf1f6af98b15d79d2b53990eaf84ef402c986035e6b615a19e35ed424348143903 WHIRLPOOL 6e1053713995532aa58b935f2935cc6d81331f35c1c6870f4758f7abd856d9976082553e74bebc43476ae48f64d6b7154264cc1bdcd0b9bee0230a5c07a6be3e
diff --git a/app-arch/fastjar/fastjar-0.98-r2.ebuild b/app-arch/fastjar/fastjar-0.98-r2.ebuild
new file mode 100644
index 000000000000..b2a537e1ddf8
--- /dev/null
+++ b/app-arch/fastjar/fastjar-0.98-r2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="A jar program written in C"
+HOMEPAGE="https://savannah.nongnu.org/projects/fastjar"
+SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris"
+
+IUSE=""
+
+# bug #188542
+RDEPEND="!<=dev-java/kaffe-1.1.7-r5"
+
+src_prepare() {
+ # bug #325557
+ epatch "${FILESDIR}/0.98-traversal.patch"
+}
diff --git a/app-arch/fastjar/fastjar-0.98-r3.ebuild b/app-arch/fastjar/fastjar-0.98-r3.ebuild
new file mode 100644
index 000000000000..20584692df01
--- /dev/null
+++ b/app-arch/fastjar/fastjar-0.98-r3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A jar program written in C"
+HOMEPAGE="https://savannah.nongnu.org/projects/fastjar"
+SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris"
+
+IUSE=""
+
+# bug #188542
+RDEPEND="!<=dev-java/kaffe-1.1.7-r5"
+
+src_prepare() {
+ # bug #325557
+ epatch "${FILESDIR}/0.98-traversal.patch"
+}
diff --git a/app-arch/fastjar/files/0.98-traversal.patch b/app-arch/fastjar/files/0.98-traversal.patch
new file mode 100644
index 000000000000..511f4c6cd838
--- /dev/null
+++ b/app-arch/fastjar/files/0.98-traversal.patch
@@ -0,0 +1,112 @@
+--- fastjar-0.98.orig/jartool.c
++++ fastjar-0.98/jartool.c
+@@ -790,6 +790,7 @@
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
+@@ -1257,7 +1258,7 @@
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
+@@ -1730,7 +1731,17 @@
+ struct stat sbuf;
+ int depth = 0;
+
+- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename));
++ if(*filename == '/'){
++ fprintf(stderr, "Absolute path names are not allowed.\n");
++ exit(EXIT_FAILURE);
++ }
++
++ tmp_buff = malloc(strlen((const char *)filename));
++
++ if(tmp_buff == NULL) {
++ fprintf(stderr, "Out of memory.\n");
++ exit(EXIT_FAILURE);
++ }
+
+ for(;;){
+ const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/');
+@@ -1738,25 +1749,28 @@
+ if(idx == NULL)
+ break;
+ else if(idx == start){
++ tmp_buff[idx - filename] = '/';
+ start++;
+ continue;
+ }
+- start = idx + 1;
+
+- strncpy(tmp_buff, (const char *)filename, (idx - filename));
+- tmp_buff[(idx - filename)] = '\0';
++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start));
++ tmp_buff[idx - filename] = '\0';
+
+ #ifdef DEBUG
+ printf("checking the existance of %s\n", tmp_buff);
+ #endif
+- if(strcmp(tmp_buff, "..") == 0){
++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){
+ --depth;
+ if (depth < 0){
+ fprintf(stderr, "Traversal to parent directories during unpacking!\n");
+ exit(EXIT_FAILURE);
+ }
+- } else if (strcmp(tmp_buff, ".") != 0)
++ } else if (idx - start != 1 || *start != '.')
+ ++depth;
++
++ start = idx + 1;
++
+ if(stat(tmp_buff, &sbuf) < 0){
+ if(errno != ENOENT)
+ exit_on_error("stat");
+@@ -1765,6 +1779,7 @@
+ #ifdef DEBUG
+ printf("Directory exists\n");
+ #endif
++ tmp_buff[idx - filename] = '/';
+ continue;
+ }else {
+ fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n",
+@@ -1781,10 +1796,11 @@
+ if(verbose && handle)
+ printf("%10s: %s/\n", "created", tmp_buff);
+
++ tmp_buff[idx - filename] = '/';
+ }
+
+ /* only a directory */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ dir = TRUE;
+
+ #ifdef DEBUG
+@@ -1792,7 +1808,7 @@
+ #endif
+
+ /* If the entry was just a directory, don't write to file, etc */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ f_fd = -1;
+
+ free(tmp_buff);
+@@ -1876,7 +1892,8 @@
+ exit(EXIT_FAILURE);
+ }
+
+- close(f_fd);
++ if (f_fd != -1)
++ close(f_fd);
+
+ if(verbose && dir == FALSE && handle)
+ printf("%10s: %s\n",
diff --git a/app-arch/fastjar/metadata.xml b/app-arch/fastjar/metadata.xml
new file mode 100644
index 000000000000..2b065fd7b06f
--- /dev/null
+++ b/app-arch/fastjar/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <longdescription lang="en">
+ Fastjar is a version of Sun's 'jar' utility, written entirely in C,
+ and therefore quite a bit faster. Fastjar can be up to 100x faster
+ than the stock 'jar' program running without a JIT.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/file-roller/Manifest b/app-arch/file-roller/Manifest
new file mode 100644
index 000000000000..39cb4a0f7dae
--- /dev/null
+++ b/app-arch/file-roller/Manifest
@@ -0,0 +1,3 @@
+DIST file-roller-3.14.2.tar.xz 1387784 SHA256 1815e736715afe8c0f3fbda41c76c07289220d4855345f779c632adf5e074e50 SHA512 92ff42e4fe06e3ea54e71806157fbb95f9e5f247142e9e857f61f61748fd0e1b99a73cfb35fd3ea890c3e19da0d2176af9a017a8eb918eff9ddc0371b09ed11d WHIRLPOOL db4e5519fe298759dbb0f048a597d4cd8ef6610b04eab9f77ee21905726f19e15312cdfc47aa80c2f55490ad4f400e7cac0664e24376b40a340d780e5f0809bf
+DIST file-roller-3.16.2.tar.xz 1409944 SHA256 60897ff24d4822395a227b62811c3b8768b701844961e93303d6d6d9463d7e3f SHA512 ac8c36c3b186bd4eb2ae41fe2e777a15074f09863402a56614a8ad0a89d6e480046fb2566db1be907ea1155ebe4aff6733e32e0f59547435db451757fb3cb15f WHIRLPOOL 3e20ba55d57d69a838f1602322478752eb2f172e8f713c23099edd3446c4b811306d101e23393a8d088382145d4bbf72c66c7ec62796e6eba47e4a4f46fd3ff7
+DIST file-roller-3.16.3.tar.xz 1411360 SHA256 2b3a1111caba26e67b96559a3118a700dbfb6a4c6ad7ebd3e509df227995411c SHA512 999d08d6ea5ae975a026c351c5f216fd503b78eb65e8f417f8afdce152c816f631bd5c6b1a430a5baefa19541e3d718c59beef4773242a6ba087479061ed42ea WHIRLPOOL 2534ae5ad2bb3886d4963bb30a5ef67a82c698f74d64fc0ddc1cac0a37ab258b4fa7e569d031ec1a715a0d3f99b70aae54d16f88d18b95ce7f77654cede4f176
diff --git a/app-arch/file-roller/file-roller-3.14.2.ebuild b/app-arch/file-roller/file-roller-3.14.2.ebuild
new file mode 100644
index 000000000000..ff19e68f6da2
--- /dev/null
+++ b/app-arch/file-roller/file-roller-3.14.2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils gnome2 readme.gentoo
+
+DESCRIPTION="Archive manager for GNOME"
+HOMEPAGE="http://fileroller.sourceforge.net/ https://wiki.gnome.org/Apps/FileRoller"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0"
+SLOT="0"
+IUSE="nautilus packagekit"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+# gdk-pixbuf used extensively in the source
+# cairo used in eggtreemultidnd.c
+# pango used in fr-window
+RDEPEND="
+ >=app-arch/libarchive-3:=
+ >=dev-libs/glib-2.36:2
+ >=dev-libs/json-glib-0.14
+ >=x11-libs/gtk+-3.13.2:3
+ >=x11-libs/libnotify-0.4.3:=
+ sys-apps/file
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango
+ nautilus? ( >=gnome-base/nautilus-3 )
+ packagekit? ( app-admin/packagekit-base )
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.40.0
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+${PN} is a frontend for several archiving utilities. If you want a
+particular archive format support, see ${HOMEPAGE}
+and install the relevant package. For example:
+7-zip - app-arch/p7zip
+ace - app-arch/unace
+arj - app-arch/arj
+cpio - app-arch/cpio
+deb - app-arch/dpkg
+iso - app-cdr/cdrtools
+jar,zip - app-arch/zip and app-arch/unzip
+lha - app-arch/lha
+lzop - app-arch/lzop
+rar - app-arch/unrar or app-arch/unar
+rpm - app-arch/rpm
+unstuff - app-arch/stuffit
+zoo - app-arch/zoo"
+
+src_prepare() {
+ # Use absolute path to GNU tar since star doesn't have the same
+ # options. On Gentoo, star is /usr/bin/tar, GNU tar is /bin/tar
+ epatch "${FILESDIR}"/${PN}-2.10.3-use_bin_tar.patch
+
+ # File providing Gentoo package names for various archivers
+ cp -f "${FILESDIR}/3.6.0-packages.match" data/packages.match || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README* TODO"
+ # --disable-debug because enabling it adds -O0 to CFLAGS
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-static \
+ --disable-debug \
+ --enable-magic \
+ --enable-libarchive \
+ $(use_enable nautilus nautilus-actions) \
+ $(use_enable packagekit) \
+ ITSTOOL=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-arch/file-roller/file-roller-3.16.2.ebuild b/app-arch/file-roller/file-roller-3.16.2.ebuild
new file mode 100644
index 000000000000..018e1b2db5b3
--- /dev/null
+++ b/app-arch/file-roller/file-roller-3.16.2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils gnome2 readme.gentoo
+
+DESCRIPTION="Archive manager for GNOME"
+HOMEPAGE="http://fileroller.sourceforge.net/ https://wiki.gnome.org/Apps/FileRoller"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0"
+SLOT="0"
+IUSE="nautilus packagekit"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+# gdk-pixbuf used extensively in the source
+# cairo used in eggtreemultidnd.c
+# pango used in fr-window
+RDEPEND="
+ >=app-arch/libarchive-3:=
+ >=dev-libs/glib-2.36:2
+ >=dev-libs/json-glib-0.14
+ >=x11-libs/gtk+-3.13.2:3
+ >=x11-libs/libnotify-0.4.3:=
+ sys-apps/file
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango
+ nautilus? ( >=gnome-base/nautilus-3 )
+ packagekit? ( app-admin/packagekit-base )
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.40.0
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+${PN} is a frontend for several archiving utilities. If you want a
+particular archive format support, see ${HOMEPAGE}
+and install the relevant package. For example:
+7-zip - app-arch/p7zip
+ace - app-arch/unace
+arj - app-arch/arj
+cpio - app-arch/cpio
+deb - app-arch/dpkg
+iso - app-cdr/cdrtools
+jar,zip - app-arch/zip and app-arch/unzip
+lha - app-arch/lha
+lzop - app-arch/lzop
+rar - app-arch/unrar or app-arch/unar
+rpm - app-arch/rpm
+unstuff - app-arch/stuffit
+zoo - app-arch/zoo"
+
+src_prepare() {
+ # Use absolute path to GNU tar since star doesn't have the same
+ # options. On Gentoo, star is /usr/bin/tar, GNU tar is /bin/tar
+ epatch "${FILESDIR}"/${PN}-2.10.3-use_bin_tar.patch
+
+ # File providing Gentoo package names for various archivers
+ cp -f "${FILESDIR}"/3.6.0-packages.match data/packages.match || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README* TODO"
+ # --disable-debug because enabling it adds -O0 to CFLAGS
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-static \
+ --disable-debug \
+ --enable-magic \
+ --enable-libarchive \
+ $(use_enable nautilus nautilus-actions) \
+ $(use_enable packagekit) \
+ ITSTOOL=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-arch/file-roller/file-roller-3.16.3.ebuild b/app-arch/file-roller/file-roller-3.16.3.ebuild
new file mode 100644
index 000000000000..b6fda2e40e9c
--- /dev/null
+++ b/app-arch/file-roller/file-roller-3.16.3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils gnome2 readme.gentoo
+
+DESCRIPTION="Archive manager for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/FileRoller"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0"
+SLOT="0"
+IUSE="nautilus packagekit"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+# gdk-pixbuf used extensively in the source
+# cairo used in eggtreemultidnd.c
+# pango used in fr-window
+RDEPEND="
+ >=app-arch/libarchive-3:=
+ >=dev-libs/glib-2.36:2
+ >=dev-libs/json-glib-0.14
+ >=x11-libs/gtk+-3.13.2:3
+ >=x11-libs/libnotify-0.4.3:=
+ sys-apps/file
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/pango
+ nautilus? ( >=gnome-base/nautilus-3 )
+ packagekit? ( app-admin/packagekit-base )
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.40.0
+ dev-util/itstool
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+${PN} is a frontend for several archiving utilities. If you want a
+particular archive format support, see ${HOMEPAGE}
+and install the relevant package. For example:
+7-zip - app-arch/p7zip
+ace - app-arch/unace
+arj - app-arch/arj
+cpio - app-arch/cpio
+deb - app-arch/dpkg
+iso - app-cdr/cdrtools
+jar,zip - app-arch/zip and app-arch/unzip
+lha - app-arch/lha
+lzop - app-arch/lzop
+rar - app-arch/unrar or app-arch/unar
+rpm - app-arch/rpm
+unstuff - app-arch/stuffit
+zoo - app-arch/zoo"
+
+src_prepare() {
+ # File providing Gentoo package names for various archivers
+ cp -f "${FILESDIR}"/3.6.0-packages.match data/packages.match || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README* TODO"
+ # --disable-debug because enabling it adds -O0 to CFLAGS
+ gnome2_src_configure \
+ --disable-run-in-place \
+ --disable-static \
+ --disable-debug \
+ --enable-magic \
+ --enable-libarchive \
+ $(use_enable nautilus nautilus-actions) \
+ $(use_enable packagekit)
+}
+
+src_install() {
+ gnome2_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-arch/file-roller/files/3.6.0-packages.match b/app-arch/file-roller/files/3.6.0-packages.match
new file mode 100644
index 000000000000..4085b19112b4
--- /dev/null
+++ b/app-arch/file-roller/files/3.6.0-packages.match
@@ -0,0 +1,30 @@
+[Package Matches]
+arj=app-arch/arj
+binutils=sys-devel/binutils
+bzip2=app-arch/bzip2
+cpio=app-arch/cpio
+dpkg=app-arch/dpkg
+genisoimage=virtual/cdrtools
+gzip=app-arch/gzip
+lha=app-arch/lha
+lrzip=app-arch/lrzip
+lzip=app-arch/lzip
+lzma=app-arch/xz-utils
+lzop=app-arch/lzop
+ncompress=app-arch/ncompress
+p7zip=app-arch/p7zip
+p7zip-full=
+p7zip-rar=
+rar=app-arch/rar
+rpm=app-arch/rpm
+rzip=app-arch/rzip
+tar=app-arch/tar
+unace=app-arch/unace
+unalz=
+unarchiver=app-arch/unar
+unrar=app-arch/unrar
+unstaff=
+unzip=app-arch/unzip
+xz=app-arch/xz-utils
+zip=app-arch/zip
+zoo=app-arch/zoo
diff --git a/app-arch/file-roller/files/file-roller-2.10.3-use_bin_tar.patch b/app-arch/file-roller/files/file-roller-2.10.3-use_bin_tar.patch
new file mode 100644
index 000000000000..edaa16c1c6bb
--- /dev/null
+++ b/app-arch/file-roller/files/file-roller-2.10.3-use_bin_tar.patch
@@ -0,0 +1,12 @@
+diff -uNr file-roller-2.10.3/src/fr-command-tar.c file-roller-2.10.3.patched/src/fr-command-tar.c
+--- file-roller-2.10.3/src/fr-command-tar.c 2005-04-22 18:39:22.000000000 +0200
++++ file-roller-2.10.3.patched/src/fr-command-tar.c 2005-06-06 14:29:45.000000000 +0200
+@@ -225,7 +225,7 @@
+ if (command != NULL)
+ fr_process_begin_command (comm->process, command);
+ else
+- fr_process_begin_command (comm->process, "tar");
++ fr_process_begin_command (comm->process, "/bin/tar");
+ g_free (command);
+ }
+
diff --git a/app-arch/file-roller/metadata.xml b/app-arch/file-roller/metadata.xml
new file mode 100644
index 000000000000..d529497a7a52
--- /dev/null
+++ b/app-arch/file-roller/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <use>
+ <flag name="nautilus">Enable file-roller to integrate with
+ <pkg>gnome-base/nautilus</pkg> by providing entries in its context
+ menu</flag>
+ <flag name="packagekit">Enable support for the distro-neutral package
+ manager GUI <pkg>app-admin/packagekit</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/app-arch/freeze/Manifest b/app-arch/freeze/Manifest
new file mode 100644
index 000000000000..521ae6d60daf
--- /dev/null
+++ b/app-arch/freeze/Manifest
@@ -0,0 +1 @@
+DIST freeze-2.5.0.tar.gz 36010 SHA256 f543eb18bd7de8893a3c0bac0e4fa5fea46a4e10f5d8182cebc40c97b8593863 SHA512 2e0965e1bb772a829763b99c623b3dfa062a624ed2bd5f658c9df0e4040a9c914aec5a85602340fe994634b82d2fac3250030b35ad3d5f5054b0a6f4059469e7 WHIRLPOOL 8415350c9ad833ceebff515922df947a54c1400cbba9606ef283068d6453cded3a6b674c4940fe0260a085834dd7b5b0a5cf3cb0116bbfde9cdd59d26323f0f2
diff --git a/app-arch/freeze/files/freeze-2.5.0-gentoo.patch b/app-arch/freeze/files/freeze-2.5.0-gentoo.patch
new file mode 100644
index 000000000000..3be357c25309
--- /dev/null
+++ b/app-arch/freeze/files/freeze-2.5.0-gentoo.patch
@@ -0,0 +1,55 @@
+--- a/Makefile.in 1999-05-20 11:07:51.000000000 +0200
++++ b/Makefile.in 2012-12-12 17:22:36.444775985 +0100
+@@ -3,7 +3,7 @@
+ VPATH = $(srcdir)
+
+ CC = @CC@
+-CFLAGS = -I. # -O2 # for gcc 2.2.2
++CFLAGS += -I.
+
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -79,15 +79,15 @@
+
+ freeze$(EXE): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+- -strip $@
++
+
+ statist$(EXE): statist.$(OBJ) lz.$(OBJ)
+ $(CC) $(LDFLAGS) -o $@ statist.$(OBJ) lz.$(OBJ) $(LIBS)
+- -strip $@
++
+
+ showhuf$(EXE): showhuf.$(OBJ)
+ $(CC) $(LDFLAGS) -o $@ showhuf.$(OBJ) $(LIBS)
+- -strip $@
++
+
+ clobber: clean
+ rm -f freeze$(EXE) statist$(EXE) showhuf$(EXE) *.man \#* *~ config.h Makefile
+@@ -101,18 +101,18 @@
+
+ $(DEST)/freeze: freeze
+ $(INSTALL_PROGRAM) freeze $@
+- -ln -f $@ $(DEST)/melt
+- -ln -f $@ $(DEST)/unfreeze
+- -ln -f $@ $(DEST)/fcat
++ ln -sf $< $(DEST)/melt
++ ln -sf $< $(DEST)/unfreeze
++ ln -sf $< $(DEST)/fcat
+
+ $(DEST)/statist: statist
+ $(INSTALL_PROGRAM) statist $@
+
+ $(MANDEST)/freeze.$(SEC): freeze.1
+ $(INSTALL_DATA) $(srcdir)/freeze.1 $@
+- -ln -f $@ $(MANDEST)/melt.$(SEC)
+- -ln -f $@ $(MANDEST)/unfreeze.$(SEC)
+- -ln -f $@ $(MANDEST)/fcat.$(SEC)
++ ln -sf $< $(MANDEST)/melt.$(SEC)
++ ln -sf $< $(MANDEST)/unfreeze.$(SEC)
++ ln -sf $< $(MANDEST)/fcat.$(SEC)
+ # This is much better for places which keep preformated manpages.
+ # echo ".so man1/freeze.$(SEC)" > $(MANDEST)/melt.$(SEC)
+ # echo ".so man1/freeze.$(SEC)" > $(MANDEST)/unfreeze.$(SEC)
diff --git a/app-arch/freeze/freeze-2.5.0-r1.ebuild b/app-arch/freeze/freeze-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..2db6da160ea2
--- /dev/null
+++ b/app-arch/freeze/freeze-2.5.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Freeze/unfreeze compression program"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/utils/compress/"
+SRC_URI="ftp://ftp.ibiblio.org/pub/Linux/utils/compress/${P}.tar.gz"
+
+LICENSE="GPL-1+"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="
+ !<=media-libs/mlt-0.4.2
+ !media-libs/mlt[melt]
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ OPTIONS="-DDEFFILE=\\\"/etc/freeze.cnf\\\""
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/man/man1
+
+ emake \
+ DEST="${D}/usr/bin" \
+ MANDEST="${D}/usr/share/man/man1" \
+ install
+
+ # these symlinks collide with app-forensics/sleuthkit (bug #444872)
+ rm "${D}"/usr/bin/fcat "${D}"/usr/share/man/man1/fcat.1 || die
+
+ dobin showhuf
+ dodoc README *.lsm
+}
diff --git a/app-arch/freeze/metadata.xml b/app-arch/freeze/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/app-arch/freeze/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/funzix/Manifest b/app-arch/funzix/Manifest
new file mode 100644
index 000000000000..5eed032da007
--- /dev/null
+++ b/app-arch/funzix/Manifest
@@ -0,0 +1 @@
+DIST funzix-1.0.tar.bz2 10792 SHA256 edea686fdc733a8af4573ecaced35985b0428caa1b9f788a78eefa5b4218868c SHA512 30abf29571df7be4a1e92270cb3b4949244f5e50b088bc128c8ac63da88c244f0fe810b4d05b76c68220576b06a1c47e84a3f3339d82a4f0e35a841b29ec4c2c WHIRLPOOL 39dcde893592c56b67fe231e390772760551f2cdc0c41db17ab4e1a20181b6288e6b73aecac13c2c541558510691211442fedebfcde1301b0ce2bac42ab7e088
diff --git a/app-arch/funzix/funzix-1.0.ebuild b/app-arch/funzix/funzix-1.0.ebuild
new file mode 100644
index 000000000000..f45de1f01948
--- /dev/null
+++ b/app-arch/funzix/funzix-1.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="unpacker for the bogus ZIX format"
+HOMEPAGE="http://funzix.sourceforge.net/"
+SRC_URI="mirror://sourceforge/funzix/${P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dobin funzix || die
+ dodoc README
+}
diff --git a/app-arch/funzix/metadata.xml b/app-arch/funzix/metadata.xml
new file mode 100644
index 000000000000..a3c636b4cc4d
--- /dev/null
+++ b/app-arch/funzix/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">funzix</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/gcab/Manifest b/app-arch/gcab/Manifest
new file mode 100644
index 000000000000..62aa64f8fb01
--- /dev/null
+++ b/app-arch/gcab/Manifest
@@ -0,0 +1 @@
+DIST gcab-0.6.tar.xz 316668 SHA256 a0443b904bfa7227b5155bfcdf9ea9256b6e26930b8febe1c41f972f6f1334bb SHA512 80c18f213b94402cbb4c19ed506f4a40e9c4f8deb9ddf6ee990214213f011f7638d83122b36cadff86330b524eef82969d1245b64d5d04eb5998f76cd2ca6df8 WHIRLPOOL 8e6140d6a9d11cf0ce249d15ce2fda21fbbca9c366cc938ff99398bcd32f375d07909c421ade7530611902c27e7c002d8f43ff71c04830c5062849ebe5c347e5
diff --git a/app-arch/gcab/gcab-0.6.ebuild b/app-arch/gcab/gcab-0.6.ebuild
new file mode 100644
index 000000000000..972f89b1b02b
--- /dev/null
+++ b/app-arch/gcab/gcab-0.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GCONF_DEBUG=no
+VALA_USE_DEPEND=vapigen
+
+inherit gnome2 vala
+
+DESCRIPTION="Library and tool for working with Microsoft Cabinet (CAB) files"
+HOMEPAGE="https://wiki.gnome.org/msitools"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+IUSE="+introspection vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.22:2
+ sys-libs/zlib
+ introspection? ( >=dev-libs/gobject-introspection-0.9.4 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+src_prepare() {
+ gnome2_src_prepare
+ use vala && vala_src_prepare
+}
+
+src_configure() {
+ local myconf
+ use vala || myconf="VAPIGEN=no"
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable introspection) \
+ ${myconf}
+}
diff --git a/app-arch/gcab/metadata.xml b/app-arch/gcab/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/app-arch/gcab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/app-arch/gtk-splitter/Manifest b/app-arch/gtk-splitter/Manifest
new file mode 100644
index 000000000000..c37fabaede66
--- /dev/null
+++ b/app-arch/gtk-splitter/Manifest
@@ -0,0 +1 @@
+DIST gtk-splitter-2.2.1.tar.gz 93515 SHA256 4f485c78ccd3d2f6353d751db3c1fc6cbd8f8ca4e99d2db0b284804acd3f37a9 SHA512 c84e43dddb5f1eef5a4fed7db7541012374d7e6bed760835adae20fa35a4685cb7a1a866ad02cbaf36ff3ee4d5bd3872a154e46ce9692603a3273859d2eb36dc WHIRLPOOL c3142aea941633f470aa6b3ff5d9972f8b7059277c9fe4ed1a839813c241d961f150f3f8fb05e370809bc1f4828bc6e1023a455e22cd45f5873218f721c6c986
diff --git a/app-arch/gtk-splitter/files/gtk-splitter-2.2.1-r1-desktop-QA-fixes.patch b/app-arch/gtk-splitter/files/gtk-splitter-2.2.1-r1-desktop-QA-fixes.patch
new file mode 100644
index 000000000000..32fd447c9019
--- /dev/null
+++ b/app-arch/gtk-splitter/files/gtk-splitter-2.2.1-r1-desktop-QA-fixes.patch
@@ -0,0 +1,13 @@
+--- a/gtk-splitter.desktop
++++ b/gtk-splitter.desktop
+@@ -3,8 +3,8 @@
+ Name=File Splitter
+ Comment=GTK+ File Splitter
+ Exec=gtk-splitter %F
+-Icon=gtk-splitter.png
++Icon=/usr/share/pixmaps/gtk-splitter.png
+ Terminal=false
+ Type=Application
+-Categories=GNOME;Application;Utility;
++Categories=GNOME;Utility;
+ StartupNotify=true
diff --git a/app-arch/gtk-splitter/gtk-splitter-2.2.1-r1.ebuild b/app-arch/gtk-splitter/gtk-splitter-2.2.1-r1.ebuild
new file mode 100644
index 000000000000..5d01d9c4bafa
--- /dev/null
+++ b/app-arch/gtk-splitter/gtk-splitter-2.2.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="Split files into smaller pieces and combine them back together"
+HOMEPAGE="http://gtk-splitter.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="crypt"
+
+RDEPEND="x11-libs/gtk+:2
+ virtual/libintl:0
+ crypt? ( >=app-crypt/mhash-0.8:0 )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig:*"
+
+src_prepare() {
+ epatch "${FILESDIR}/"${P}-r1-desktop-QA-fixes.patch
+}
+
+src_compile() {
+ default
+
+ if ! use crypt ; then
+ # configure script only autodetects
+ sed -i -e 's:-lmhash::' -e 's:-DHAVE_LIBMHASH=1::' src/Makefile || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install
+}
diff --git a/app-arch/gtk-splitter/metadata.xml b/app-arch/gtk-splitter/metadata.xml
new file mode 100644
index 000000000000..664da02d2022
--- /dev/null
+++ b/app-arch/gtk-splitter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer</description>
+ </maintainer>
+ <longdescription>A program to split files into smaller pieces and the put them back together.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gtk-splitter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/gzip/Manifest b/app-arch/gzip/Manifest
new file mode 100644
index 000000000000..dec1fe177406
--- /dev/null
+++ b/app-arch/gzip/Manifest
@@ -0,0 +1,3 @@
+DIST gzip-1.4.tar.gz 907411 SHA256 d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee SHA512 9ba6d11f0469b80433a5da25f834f7652db109c235e2a849f4249adae3929fda9ebef98a181cc928a5dfc2b0d35df8b220afba130cd4a596a4dbddbf3fe8d2bc WHIRLPOOL 3d8552d2dc660953714f49674e8af2319eade0fd33c705ee253c2ea215cf4e5c3e6b7088c7087060ea7751508c74769b5b64d9e88bc22ea1d7ad0e8680a616e5
+DIST gzip-1.5.tar.xz 720956 SHA256 9ac20a3841a1246a8bedd800ea1fb93ef76521535d89cb59397d267026b6a173 SHA512 27b1b9c1ab75331b5368abb54541f3f251009a3bc6e49e42cda13bc088673d9f8c89c55caa63da60c1ea70fac2e6de24203b7aeaaaad4bc54302edbe275f46ea WHIRLPOOL c718e5e4e0e6f29de285380c25564997615b7213fa32604922436c3c6221bb9531d01518a6cc4e0a80b4694bb040768654d4bf07bb48290f90e61f13962e96ab
+DIST gzip-1.6.tar.xz 725084 SHA256 37dfed1a485d53212c43b3fa2a7c7952f09bf5cd86e37121c222341ee1b27847 SHA512 06da599fc38b459d7e9a3f43fdd06d1a0d7b29ad14cb7b6552176bab584a1135bb47ba37a4eb377e6c42c4934d557079ace1e289a252ae192ee154079a62ed01 WHIRLPOOL 7c639d9a57d5f9a820972275c7813ccd76df7a87ad68b00668696aec251b84fd7efb1129205e8a7cd51e40706b718ce3ce71dc9aa6626acf074bcea6f0fe5c39
diff --git a/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch
new file mode 100644
index 000000000000..8d92b609b5dd
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch
@@ -0,0 +1,11 @@
+--- Makefile.in
++++ Makefile.in
+@@ -926,7 +926,7 @@
+ rm -f "$$dest" && \
+ case $@ in \
+ install-exec-hook) \
+- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
++ $(LN_S) "$$source" "$$dest";; \
+ esac \
+ ) || exit; \
+ done; \
diff --git a/app-arch/gzip/files/gzip-1.4-asmv.patch b/app-arch/gzip/files/gzip-1.4-asmv.patch
new file mode 100644
index 000000000000..c87855018cff
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.4-asmv.patch
@@ -0,0 +1,30 @@
+http://bugs.gentoo.org/show_bug.cgi?id=302773
+
+--- tailor.h.old 2010-01-29 11:13:02.000000000 +0000
++++ tailor.h 2010-01-29 13:18:15.000000000 +0000
+@@ -69,9 +69,6 @@
+ # include <io.h>
+ # define OS_CODE 0x00
+ # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
+-# if !defined(NO_ASM) && !defined(ASMV)
+-# define ASMV
+-# endif
+ #else
+ # define near
+ #endif
+@@ -182,7 +179,6 @@
+ # define PATH_SEP2 ':'
+ # define STDC_HEADERS
+ # define OS_CODE 0x01
+-# define ASMV
+ # ifdef __GNUC__
+ # define HAVE_DIRENT_H
+ # define HAVE_FCNTL_H
+@@ -201,7 +197,6 @@
+ #endif
+
+ #if defined(ATARI) || defined(atarist)
+-# define ASMV
+ # define OS_CODE 0x05
+ # ifdef TOSFS
+ # define PATH_SEP2 '\\'
diff --git a/app-arch/gzip/files/gzip-1.4-assembler.patch b/app-arch/gzip/files/gzip-1.4-assembler.patch
new file mode 100644
index 000000000000..76aade5c9341
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.4-assembler.patch
@@ -0,0 +1,52 @@
+http://bugs.gentoo.org/309079
+http://lists.gnu.org/archive/html/bug-gzip/2010-02/msg00032.html
+
+From 61af16213a488af3a8e994399ebd0859d390edb6 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Sat, 20 Mar 2010 13:05:58 +0100
+Subject: [PATCH] use assembly code matcher when possible
+
+* configure.ac (ASCPPPOST): Backslash-escape "#" in AC_SUBST'd
+variable, to keep make from seeing it as a comment-introducer.
+Based on a patch by Petr Pisar.
+* lib/Makefile.am (match.$(OBJEXT)): Use AM_V_GEN and AM_V_at.
+* lib/match.c: Don't include <config.h>.
+It would impede configure-time assembler test.
+* .x-sc_require_config_h: Exempt lib/match.c from syntax-check.
+* .x-sc_require_config_h_first: Likewise.
+---
+ .x-sc_require_config_h | 1 +
+ .x-sc_require_config_h_first | 1 +
+ THANKS | 1 +
+ configure.ac | 2 +-
+ lib/Makefile.am | 12 ++++++------
+ lib/match.c | 2 --
+ 6 files changed, 10 insertions(+), 9 deletions(-)
+ create mode 100644 .x-sc_require_config_h
+ create mode 100644 .x-sc_require_config_h_first
+
+--- a/configure
++++ b/configure
+@@ -22588,5 +22588,5 @@
+
+ # cc -E produces incorrect asm files on SVR4, so postprocess it.
+-ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
++ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
+
+
+diff --git a/lib/match.c b/lib/match.c
+index 4ef6128..5dd8d64 100644
+--- a/lib/match.c
++++ b/lib/match.c
+@@ -28,8 +28,6 @@
+ * David Mosberger-Tang <davidm@hpl.hp.com>.
+ */
+
+-#include <config.h>
+-
+ /* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix
+ * external symbols with an underline character '_'.
+ */
+--
+1.7.1.1
+
diff --git a/app-arch/gzip/files/gzip-1.4-no-gets.patch b/app-arch/gzip/files/gzip-1.4-no-gets.patch
new file mode 100644
index 000000000000..6da6e64bb7fd
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.4-no-gets.patch
@@ -0,0 +1,22 @@
+hack until gzip pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -125,7 +125,6 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/app-arch/gzip/gzip-1.4.ebuild b/app-arch/gzip/gzip-1.4.ebuild
new file mode 100644
index 000000000000..d2a57fa3e726
--- /dev/null
+++ b/app-arch/gzip/gzip-1.4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Standard GNU compressor"
+HOMEPAGE="http://www.gnu.org/software/gzip/"
+SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.gz
+ mirror://gnu/gzip/${P}.tar.gz
+ mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls pic static"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ #epatch "${FILESDIR}"/${PN}-1.3.5-rsync.patch
+ epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
+ epatch "${FILESDIR}"/${P}-assembler.patch #309079
+ epatch "${FILESDIR}"/${P}-no-gets.patch
+}
+
+src_compile() {
+ use static && append-flags -static
+ # avoid text relocation in gzip
+ use pic && export DEFS="NO_ASM"
+ econf || die
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog NEWS README THANKS TODO
+ docinto txt
+ dodoc algorithm.doc gzip.doc
+
+ # keep most things in /usr, just the fun stuff in /
+ dodir /bin
+ mv "${D}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${D}"/bin/ || die
+ sed -e 's:/usr::' -i "${D}"/bin/gunzip || die
+}
diff --git a/app-arch/gzip/gzip-1.5.ebuild b/app-arch/gzip/gzip-1.5.ebuild
new file mode 100644
index 000000000000..1698fc793afc
--- /dev/null
+++ b/app-arch/gzip/gzip-1.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic unpacker
+
+DESCRIPTION="Standard GNU compressor"
+HOMEPAGE="http://www.gnu.org/software/gzip/"
+SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.xz
+ mirror://gnu/gzip/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls pic static"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpacker
+ cd "${S}"
+ #epatch "${FILESDIR}"/${PN}-1.3.5-rsync.patch
+ epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
+}
+
+src_compile() {
+ use static && append-flags -static
+ # avoid text relocation in gzip
+ use pic && export DEFS="NO_ASM"
+ econf || die
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog NEWS README THANKS TODO
+ docinto txt
+ dodoc algorithm.doc gzip.doc
+
+ # keep most things in /usr, just the fun stuff in /
+ dodir /bin
+ mv "${D}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${D}"/bin/ || die
+ sed -e 's:/usr::' -i "${D}"/bin/gunzip || die
+}
diff --git a/app-arch/gzip/gzip-1.6.ebuild b/app-arch/gzip/gzip-1.6.ebuild
new file mode 100644
index 000000000000..e3619f210d2d
--- /dev/null
+++ b/app-arch/gzip/gzip-1.6.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Standard GNU compressor"
+HOMEPAGE="http://www.gnu.org/software/gzip/"
+SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.xz
+ mirror://gnu/gzip/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pic static"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
+ epatch "${FILESDIR}"/${PN}-1.4-asmv.patch
+}
+
+src_configure() {
+ use static && append-flags -static
+ # avoid text relocation in gzip
+ use pic && export DEFS="NO_ASM"
+ econf
+}
+
+src_install() {
+ default
+ docinto txt
+ dodoc algorithm.doc gzip.doc
+
+ # keep most things in /usr, just the fun stuff in /
+ dodir /bin
+ mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die
+ sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die
+}
diff --git a/app-arch/gzip/metadata.xml b/app-arch/gzip/metadata.xml
new file mode 100644
index 000000000000..66209169ac44
--- /dev/null
+++ b/app-arch/gzip/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:gzip</remote-id>
+</upstream>
+<use>
+<flag name='pic'>disable optimized assembly code that is not PIC friendly</flag>
+</use>
+</pkgmetadata>
diff --git a/app-arch/hardlink/Manifest b/app-arch/hardlink/Manifest
new file mode 100644
index 000000000000..fabf2f18514c
--- /dev/null
+++ b/app-arch/hardlink/Manifest
@@ -0,0 +1,2 @@
+DIST hardlink_0.2.0.tar.gz 12478 SHA256 7dbacfaaaa6bcc090f75511b204b73ca8f9da7816c4e9ea384eee5261aaef8d1 SHA512 963fe90aa09e2bd548722b5c7f047fbd54fddf37967333e86251d7e5d1c646108ce90d78e7efeb8af6b9169b9a0bc5bc8b744afe1e813390f3e0bd535ce22005 WHIRLPOOL 81b4e8724ef5a3a4399546ed3340034babcb77f089599b6d941fba20b993fa5dc5e522805cdc5cb0a57d7481146d72e0b2d164a6a0ac3eccb69ede2ea707b4d7
+DIST hardlink_0.3.0.tar.xz 14440 SHA256 e8c93dfcb24aeb44a75281ed73757cb862cc63b225d565db1c270af9dbb7300f SHA512 22a8945ce5dac74b05bb1231959823aec0cd364d6db9ad808df4acf232d894170c006ac1e88509604ce1859d41bd4a5d91e2b12c8010aa7fc7e19a77922c4486 WHIRLPOOL dcc1aaf3c4e8ac89137d4bb33d03d14689b4d8b193654e66614a99f551977401c406f29a4d903d61f82b9db51402fa6b7e3eaf88c965ce5d0a22408d58b6677a
diff --git a/app-arch/hardlink/hardlink-0.2.0.ebuild b/app-arch/hardlink/hardlink-0.2.0.ebuild
new file mode 100644
index 000000000000..ce773df52154
--- /dev/null
+++ b/app-arch/hardlink/hardlink-0.2.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="A tool which replaces copies of a file with hardlinks"
+HOMEPAGE="http://jak-linux.org/projects/hardlink/"
+SRC_URI="http://jak-linux.org/projects/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/libpcre"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="README ${T}/README.rsync"
+
+src_prepare() {
+ sed -i -e '/^CF/s:?=:+=:' -e '/^CF/s:-O2 -g::' Makefile || die
+
+ cat <<-EOF > "${T}"/README.rsync
+ http://hardlinkpy.googlecode.com/svn/trunk/hardlink.py has regex '^\..*\.\?{6,6}$'
+ for excluding rsync temporary files by default.
+
+ To accomplish same with this version, you can use following syntax:
+ # hardlink -x '^\..*\.\?{6,6}$'
+
+ This was discussed at http://bugs.gentoo.org/416613
+ EOF
+}
+
+src_compile() {
+ tc-export CC
+ emake
+}
diff --git a/app-arch/hardlink/hardlink-0.3.0.ebuild b/app-arch/hardlink/hardlink-0.3.0.ebuild
new file mode 100644
index 000000000000..d25e3834f15c
--- /dev/null
+++ b/app-arch/hardlink/hardlink-0.3.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="A tool which replaces copies of a file with hardlinks"
+HOMEPAGE="http://jak-linux.org/projects/hardlink/"
+SRC_URI="http://jak-linux.org/projects/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libpcre"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="README ${T}/README.rsync"
+
+src_prepare() {
+ sed -i -e '/^CF/s:?=:+=:' -e '/^CF/s:-O2 -g::' Makefile || die
+
+ cat <<-EOF > "${T}"/README.rsync
+ http://hardlinkpy.googlecode.com/svn/trunk/hardlink.py has regex '^\..*\.\?{6,6}$'
+ for excluding rsync temporary files by default.
+
+ To accomplish same with this version, you can use following syntax:
+ # hardlink -x '^\..*\.\?{6,6}$'
+
+ This was discussed at http://bugs.gentoo.org/416613
+ EOF
+}
+
+src_compile() {
+ tc-export CC
+ emake
+}
diff --git a/app-arch/hardlink/metadata.xml b/app-arch/hardlink/metadata.xml
new file mode 100644
index 000000000000..44539ce699c1
--- /dev/null
+++ b/app-arch/hardlink/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>shell-tools</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/innoextract/Manifest b/app-arch/innoextract/Manifest
new file mode 100644
index 000000000000..f0a1c9c14637
--- /dev/null
+++ b/app-arch/innoextract/Manifest
@@ -0,0 +1,3 @@
+DIST innoextract-1.2.tar.gz 106162 SHA256 a56b11bab2e209c7b37a93b3bd7416eb7359824071fc3ae1cf16a8421747cb9a SHA512 8e7fa55b1ed97ba8cc3f031904c29415c5e2f226f7963e439380bca287f4f034d2491a8d5c79e61a714d26e6e6b0997cc191ac7960ed564c69de58a92d47aced WHIRLPOOL d409057f8a90b6485c92be3b45f24cc8af1bd27dcd98df8c7ce97735c05a26556e5b62a795c0b61c64bcbc7674d205b6eabf1f995b64836dfd2e3d9d74c7f889
+DIST innoextract-1.3.tar.gz 130613 SHA256 bee65d1df2223870acb91ab90e9d933157167b8f7f5691ddd70f6a041d5bf671 SHA512 4faa263db00b847cf97b105696c49028fe80558b228ed840250be8abae9bfd0627488768eaa961fbe3a0c056d2e42487408ff3abc5b50bdf65b6bcb288721f66 WHIRLPOOL 47acd475ec776e4318a2f9a52dd57fc90106c2097180cbd6b8f962610ad486320896a6a58024c8625b5a3f6687d6444c1cd0eebdb47de5a6b261fa33031c2569
+DIST innoextract-1.4.tar.gz 151230 SHA256 5a494b5ae1e41043574096761d31695ed8b1d39dfe64895306d0d92623901cc9 SHA512 60700ef05ff50e3409b92571ebfc7342c0eadc8add5d1262f7e7740e1a14cfd186a8a9ac0ecab85f01ae50f21edb48f49ba9428369131f7cd46c4b07214838ea WHIRLPOOL 26b38b5c8fbc5c1f79c3d2b3f9cabbe439140ee174d31926ee6c1507815417dbab02632f2aaaf8681c2755ba6907f0a67ef91f2672deab9b2bdef16e3bd323fa
diff --git a/app-arch/innoextract/files/innoextract-1.2-gentoo.patch b/app-arch/innoextract/files/innoextract-1.2-gentoo.patch
new file mode 100644
index 000000000000..756f089a579e
--- /dev/null
+++ b/app-arch/innoextract/files/innoextract-1.2-gentoo.patch
@@ -0,0 +1,49 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed Jun 27 23:41:12 UTC 2012
+Subject: build system
+
+respect flags
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -54,40 +54,13 @@
+ link_directories("${Boost_LIBRARY_DIRS}")
+ include_directories(SYSTEM "${Boost_INCLUDE_DIR}")
+
+-add_cxxflag("-Wall")
+-add_cxxflag("-Wextra")
+-add_cxxflag("-Wformat=2")
+-add_cxxflag("-Wundef")
+-add_cxxflag("-Wpointer-arith")
+-add_cxxflag("-Wcast-qual")
+-add_cxxflag("-Woverloaded-virtual")
+-add_cxxflag("-Wlogical-op")
+-add_cxxflag("-Wliteral-conversion")
+-add_cxxflag("-Wshift-overflow")
+-add_cxxflag("-Woverflow")
+-add_cxxflag("-Wbool-conversions")
+-add_cxxflag("-Wconversion")
+-add_cxxflag("-Wsign-conversion")
+-add_cxxflag("-Wmissing-declarations")
+-add_cxxflag("-Wredundant-decls")
+-
+ if(DEBUG_EXTRA)
+ add_cxxflag("-ftrapv") # to add checks for (undefined) signed integer overflow
+ add_cxxflag("-fbounds-checking")
+ add_cxxflag("-fcatch-undefined-behavior")
+ add_cxxflag("-Wstrict-aliasing=1")
+-else()
+- # -Wuninitialized causes too many false positives - thanks very much, gcc
+- add_cxxflag("-Wno-uninitialized")
+- # (clang only) Conflicts with using const variables for configuration.
+- add_cxxflag("-Wno-constant-logical-operand")
+- add_cxxflag("-Wno-unneeded-internal-declaration")
+- add_cxxflag("-Wno-unused-function")
+ endif()
+
+-# Because i'm lazy
+-add_cxxflag("-Wl,--as-needed")
+-
+ check_symbol_exists(isatty "unistd.h" HAVE_ISATTY)
+ check_symbol_exists(ioctl "sys/ioctl.h" HAVE_IOCTL)
+
diff --git a/app-arch/innoextract/files/innoextract-1.3-gentoo.patch b/app-arch/innoextract/files/innoextract-1.3-gentoo.patch
new file mode 100644
index 000000000000..31f7e9088ec7
--- /dev/null
+++ b/app-arch/innoextract/files/innoextract-1.3-gentoo.patch
@@ -0,0 +1,49 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Jul 3 18:00:33 UTC 2012
+Subject: build system
+
+respect flags
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -57,40 +57,13 @@
+
+ add_cxxflag("-std=c++11")
+
+-add_cxxflag("-Wall")
+-add_cxxflag("-Wextra")
+-add_cxxflag("-Wformat=2")
+-add_cxxflag("-Wundef")
+-add_cxxflag("-Wpointer-arith")
+-add_cxxflag("-Wcast-qual")
+-add_cxxflag("-Woverloaded-virtual")
+-add_cxxflag("-Wlogical-op")
+-add_cxxflag("-Wliteral-conversion")
+-add_cxxflag("-Wshift-overflow")
+-add_cxxflag("-Woverflow")
+-add_cxxflag("-Wbool-conversions")
+-add_cxxflag("-Wconversion")
+-add_cxxflag("-Wsign-conversion")
+-add_cxxflag("-Wmissing-declarations")
+-add_cxxflag("-Wredundant-decls")
+-
+ if(DEBUG_EXTRA)
+ add_cxxflag("-ftrapv") # to add checks for (undefined) signed integer overflow
+ add_cxxflag("-fbounds-checking")
+ add_cxxflag("-fcatch-undefined-behavior")
+ add_cxxflag("-Wstrict-aliasing=1")
+-else()
+- # -Wuninitialized causes too many false positives - thanks very much, gcc
+- add_cxxflag("-Wno-uninitialized")
+- # (clang only) Conflicts with using const variables for configuration.
+- add_cxxflag("-Wno-constant-logical-operand")
+- add_cxxflag("-Wno-unneeded-internal-declaration")
+- add_cxxflag("-Wno-unused-function")
+ endif()
+
+-# Because i'm lazy
+-add_ldflag("-Wl,--as-needed")
+-
+ check_symbol_exists(isatty "unistd.h" HAVE_ISATTY)
+ check_symbol_exists(ioctl "sys/ioctl.h" HAVE_IOCTL)
+
diff --git a/app-arch/innoextract/files/innoextract-1.4-cmake.patch b/app-arch/innoextract/files/innoextract-1.4-cmake.patch
new file mode 100644
index 000000000000..199a10e14fac
--- /dev/null
+++ b/app-arch/innoextract/files/innoextract-1.4-cmake.patch
@@ -0,0 +1,30 @@
+--- innoextract-1.4/CMakeLists.txt
++++ innoextract-1.4/CMakeLists.txt
+@@ -6,6 +6,7 @@
+ # Define configuration options
+
+ option(USE_LZMA "Build lzma decompression support." ON)
++option(WITH_DEBUG "Debug build" OFF)
+ option(DEBUG_EXTRA "Expensive debug options" OFF)
+ option(SET_WARNING_FLAGS "Adjust compiler warning flags" ON)
+ option(SET_OPTIMIZATION_FLAGS "Adjust compiler optimization flags" ON)
+--- innoextract-1.4/cmake/BuildType.cmake
++++ innoextract-1.4/cmake/BuildType.cmake
+@@ -8,7 +8,7 @@
+ if(CMAKE_BUILD_TYPE STREQUAL "")
+ set(CMAKE_BUILD_TYPE "Release")
+ endif()
+-if(CMAKE_BUILD_TYPE STREQUAL "Debug")
++if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR WITH_DEBUG)
+ add_definitions(-DDEBUG)
+ set(DEBUG 1)
+ endif()
+@@ -64,7 +64,7 @@
+ # Specifically, the need for libboost_system depends on the Boost version
+ add_ldflag("-Wl,--as-needed")
+
+- if(CMAKE_BUILD_TYPE STREQUAL "Debug")
++ if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR WITH_DEBUG)
+
+ # set debug symbol level to -g3
+ check_compiler_flag(RESULT "-g3")
diff --git a/app-arch/innoextract/innoextract-1.2.ebuild b/app-arch/innoextract/innoextract-1.2.ebuild
new file mode 100644
index 000000000000..92b28ea35b82
--- /dev/null
+++ b/app-arch/innoextract/innoextract-1.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2012-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="A tool to unpack installers created by Inno Setup"
+HOMEPAGE="http://innoextract.constexpr.org/"
+SRC_URI="mirror://github/dscharrer/InnoExtract/${P}.tar.gz
+ mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +lzma"
+
+DEPEND=">=dev-libs/boost-1.37
+ lzma? ( app-arch/xz-utils )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README.md CHANGELOG )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ use debug && CMAKE_BUILD_TYPE=Debug
+
+ local mycmakeargs=(
+ $(cmake-utils_use lzma USE_LZMA)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/app-arch/innoextract/innoextract-1.3.ebuild b/app-arch/innoextract/innoextract-1.3.ebuild
new file mode 100644
index 000000000000..5cb382cacc3d
--- /dev/null
+++ b/app-arch/innoextract/innoextract-1.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="A tool to unpack installers created by Inno Setup"
+HOMEPAGE="http://innoextract.constexpr.org/"
+SRC_URI="mirror://github/dscharrer/InnoExtract/${P}.tar.gz
+ mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc +lzma"
+
+RDEPEND=">=dev-libs/boost-1.37
+ lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( README.md CHANGELOG )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ use debug && CMAKE_BUILD_TYPE=Debug
+
+ local mycmakeargs=(
+ $(cmake-utils_use lzma USE_LZMA)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_compile doc
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r "${CMAKE_BUILD_DIR}"/doc/html/*
+}
diff --git a/app-arch/innoextract/innoextract-1.4.ebuild b/app-arch/innoextract/innoextract-1.4.ebuild
new file mode 100644
index 000000000000..37b9d2f7617a
--- /dev/null
+++ b/app-arch/innoextract/innoextract-1.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs cmake-utils
+
+DESCRIPTION="A tool to unpack installers created by Inno Setup"
+HOMEPAGE="http://innoextract.constexpr.org/"
+SRC_URI="mirror://github/dscharrer/InnoExtract/${P}.tar.gz
+ mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="c++0x debug doc +lzma static"
+
+RDEPEND="
+ !static? (
+ dev-libs/boost
+ virtual/libiconv
+ lzma? ( app-arch/xz-utils )
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.8.3.1 )
+ static? (
+ app-arch/bzip2[static-libs]
+ dev-libs/boost[static-libs]
+ sys-libs/zlib[static-libs]
+ virtual/libiconv
+ lzma? ( app-arch/xz-utils[static-libs] )
+ )"
+
+DOCS=( README.md CHANGELOG )
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # not sure about minimum clang req
+ if use c++0x && [[ $(tc-getCXX) == *g++ && $(tc-getCXX) != *clang++ ]] ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 7 || $(gcc-major-version) -lt 4 ]] ; then
+ eerror "You need at least sys-devel/gcc-4.7.0 for C++0x capabilities"
+ die "You need at least sys-devel/gcc-4.7.0 for C++0x capabilities"
+ fi
+ fi
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use lzma LZMA)
+ $(cmake-utils_use_use static STATIC_LIBS)
+ $(cmake-utils_use_use c++0x CXX11)
+ $(cmake-utils_use_with debug DEBUG)
+ -DSET_OPTIMIZATION_FLAGS=OFF
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_compile doc
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r "${CMAKE_BUILD_DIR}"/doc/html/*
+}
diff --git a/app-arch/innoextract/metadata.xml b/app-arch/innoextract/metadata.xml
new file mode 100644
index 000000000000..3d1917dd249b
--- /dev/null
+++ b/app-arch/innoextract/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>daniel@constexpr.org</email>
+ <name>Daniel Scharrer</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <use>
+ <flag name="c++0x">Compile innoextract using the C++11 standard.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">innoextract</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/ipkg-utils/Manifest b/app-arch/ipkg-utils/Manifest
new file mode 100644
index 000000000000..e0750ea383d0
--- /dev/null
+++ b/app-arch/ipkg-utils/Manifest
@@ -0,0 +1 @@
+DIST ipkg-utils-050831.tar.gz 29175 SHA256 1dde1111fbca85977855db9acb557097a32a5133d8764a05ea36a89a1205394b SHA512 7375c4815225eb755699954d3005dfa88bc0f0e6c2678b7bad565f63204a32735d483dbef23e7b9b75c5f0428ff04c13744b8a10e68bb69fedb96a59c069e1aa WHIRLPOOL 7bd8b42aad219862c0211006954e027dd5b933fe13953932fa767f9fb35745d715c982f93c7ea636be23c5a27d7a460c2fc636963724e06547a4f093594355c1
diff --git a/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch b/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch
new file mode 100644
index 000000000000..e7cdf2de8c82
--- /dev/null
+++ b/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch
@@ -0,0 +1,30 @@
+--- ipkg.py
++++ ipkg.py
+@@ -36,12 +36,17 @@
+ import os
+ import sys
+ import glob
+-import md5
+ import re
+ import string
+ import commands
+ from stat import ST_SIZE
+
++try:
++ from hashlib import md5
++except ImportError:
++ import md5
++ md5 = md5.new
++
+ class Version:
+ """A class for holding parsed package version information."""
+ def __init__(self, epoch, version):
+@@ -136,7 +141,7 @@
+
+ # compute the MD5.
+ f = open(fn, "r")
+- sum = md5.new()
++ sum = md5()
+ while 1:
+ data = f.read(1024)
+ if not data: break
diff --git a/app-arch/ipkg-utils/files/ipkg-utils-tar_call_fixes.patch b/app-arch/ipkg-utils/files/ipkg-utils-tar_call_fixes.patch
new file mode 100644
index 000000000000..da1e02b4fddb
--- /dev/null
+++ b/app-arch/ipkg-utils/files/ipkg-utils-tar_call_fixes.patch
@@ -0,0 +1,28 @@
+Index: ipkg-utils-050831/ipkg.py
+===================================================================
+--- ipkg-utils-050831/ipkg.py {cset c946c633-8984-433c-8beb-a6cf3926b0af}
++++ ipkg-utils-050831/ipkg.py {local clone}
+@@ -152,9 +152,9 @@ class Package:
+ self.filename = os.path.basename(fn)
+ ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,))
+ if self.isdeb:
+- control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r")
++ control = os.popen("ar p "+fn+" control.tar.gz | gtar xfzO - --wildcards '*control'","r")
+ else:
+- control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r")
++ control = os.popen("gtar xfzO "+fn+" --wildcards '*control.tar.gz' | gtar xfzO - --wildcards '*control'","r")
+ line = control.readline()
+ while 1:
+ if not line: break
+@@ -181,7 +181,7 @@ class Package:
+ if self.isdeb:
+ data = os.popen("ar p "+fn+" data.tar.gz | tar tfz -","r")
+ else:
+- data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r")
++ data = os.popen("gtar xfzO "+fn+" --wildcards '*data.tar.gz' | gtar tfz -","r")
+ while 1:
+ line = data.readline()
+ if not line: break
+# Checksums: MD5
+# 3b32292e44cc49af1d6c599fd8a44fb8 ipkg.py
+# a103926695d45fe3c6d08a841ed6cd99 ipkg.py [diff]
diff --git a/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r2.ebuild b/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r2.ebuild
new file mode 100644
index 000000000000..5431871d58b4
--- /dev/null
+++ b/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils toolchain-funcs versionator
+
+MY_P="${PN}-$(get_version_component_range 3)"
+
+DESCRIPTION="Tools for working with the ipkg binary package format"
+HOMEPAGE="http://www.openembedded.org/"
+SRC_URI="http://handhelds.org/download/packages/ipkg-utils/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~x86"
+IUSE="minimal"
+
+DEPEND="
+ !minimal? (
+ app-crypt/gnupg
+ net-misc/curl
+ )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-tar_call_fixes.patch"
+ epatch "${FILESDIR}/${P}-hashlib.patch"
+
+ sed '/python setup.py build/d' -i Makefile
+
+ if use minimal; then
+ elog "ipkg-upload is not installed when the \`minimal' USE flag is set. If you"
+ elog "need ipkg-upload then rebuild this package without the \`minimal' USE flag."
+ fi
+}
+
+src_compile() {
+ distutils-r1_src_compile
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ if use minimal; then
+ rm "${ED}usr/bin/ipkg-upload" \
+ "${D}$(python_get_scriptdir)/ipkg-upload" || die
+ fi
+}
+
+src_install() {
+ distutils-r1_src_install
+}
+
+pkg_postinst() {
+ elog "Consider installing sys-apps/fakeroot for use with the ipkg-build command,"
+ elog "that makes it possible to build packages as a normal user."
+}
diff --git a/app-arch/ipkg-utils/metadata.xml b/app-arch/ipkg-utils/metadata.xml
new file mode 100644
index 000000000000..ab1d676f758c
--- /dev/null
+++ b/app-arch/ipkg-utils/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jnrowe@gmail.com</email>
+ <name>James Rowe</name>
+ </maintainer>
+ <longdescription>
+ Tools for working with the ipkg format.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/lbzip2/Manifest b/app-arch/lbzip2/Manifest
new file mode 100644
index 000000000000..75bd4bf69848
--- /dev/null
+++ b/app-arch/lbzip2/Manifest
@@ -0,0 +1,2 @@
+DIST lbzip2-2.3.tar.gz 630226 SHA256 d3110a2b9e19da277dec899f7a3f435cc130a518f6a43094ec4e31ca15f93eaa SHA512 4f694445cc90377bf8dac5046b952ff174db571f390c2d7b0aa001f73c76f3d3f048ff8e7297c2055ed1f7b210174496dc31d6628e1cbeff63146a36a442ad4c WHIRLPOOL 781c9e07eccb633eeb713a9e4f821e0a75102e182d6a6ea4dfba7e33aa96afbfd92fdd5d0e9818ec4c41cf86733fe0396bb42071aad7a47c5e4cdd6426812527
+DIST lbzip2-2.5.tar.gz 651399 SHA256 46c75ee93cc95eedc6005625442b2b8e59a2bef3ba80987d0491f055185650e9 SHA512 76e96cfa75b3ed515b2f891349dffc1403daab2dd0a2a614fa0c811cec6ca25faa395da08ad68a9b6ba4069332c4571f70fb7424f06ef3d800c3082c08d7d3d7 WHIRLPOOL b64e70239d89782499cd59731130258d0432dbd69f84d1bed2adb7f573f706ab635a80bd2e2331231f4aad0c92b51151a0c45f192f4fcea9579fb1eef2fa8708
diff --git a/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch b/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch
new file mode 100644
index 000000000000..6f4954102f5d
--- /dev/null
+++ b/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch
@@ -0,0 +1,16 @@
+ src/main.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index f030fd5..5f8290e 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -702,7 +702,7 @@ input_init(const struct arg *operand, struct stat *sbuf)
+ return -1;
+ }
+
+- if (OM_REGF == outmode && !S_ISREG(sbuf->st_mode)) {
++ if (!decompress && OM_REGF == outmode && !S_ISREG(sbuf->st_mode)) {
+ warn("skipping \"%s\": not a regular file", operand->val);
+ return -1;
+ }
diff --git a/app-arch/lbzip2/lbzip2-2.3-r1.ebuild b/app-arch/lbzip2/lbzip2-2.3-r1.ebuild
new file mode 100644
index 000000000000..07f82d83a6fe
--- /dev/null
+++ b/app-arch/lbzip2/lbzip2-2.3-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Parallel bzip2 utility"
+HOMEPAGE="https://github.com/kjn/lbzip2/"
+SRC_URI="http://archive.lbzip2.org/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug symlink"
+
+RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
+DEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-s_isreg.patch )
+
+src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_enable debug tracing)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use symlink; then
+ dosym ${PN} /usr/bin/bzip2
+ dosym lbunzip2 /usr/bin/bunzip2
+ fi
+}
diff --git a/app-arch/lbzip2/lbzip2-2.5.ebuild b/app-arch/lbzip2/lbzip2-2.5.ebuild
new file mode 100644
index 000000000000..c6f53ffebbaf
--- /dev/null
+++ b/app-arch/lbzip2/lbzip2-2.5.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Parallel bzip2 utility"
+HOMEPAGE="https://github.com/kjn/lbzip2/"
+SRC_URI="http://archive.lbzip2.org/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug symlink"
+
+RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
+DEPEND=""
+
+PATCHES=( "${FILESDIR}"/${PN}-2.3-s_isreg.patch )
+
+src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_enable debug tracing)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use symlink; then
+ dosym ${PN} /usr/bin/bzip2
+ dosym lbunzip2 /usr/bin/bunzip2
+ fi
+}
diff --git a/app-arch/lbzip2/metadata.xml b/app-arch/lbzip2/metadata.xml
new file mode 100644
index 000000000000..22603f78e326
--- /dev/null
+++ b/app-arch/lbzip2/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>mattst88@gentoo.org</email>
+ <name>Matt Turner</name>
+ </maintainer>
+ <longdescription lang="en">
+ A multi-threaded bzip2/bunzip2 utility that employs multiple threads and an
+ input-bound splitter even when decompressing .bz2 files created by standard
+ bzip2
+ </longdescription>
+ <upstream>
+ <remote-id type="github">kjn/lbzip2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/lcab/Manifest b/app-arch/lcab/Manifest
new file mode 100644
index 000000000000..b86e7ed7d05b
--- /dev/null
+++ b/app-arch/lcab/Manifest
@@ -0,0 +1 @@
+DIST lcab-1.0b12.tar.gz 74907 SHA256 065f2c1793b65f28471c0f71b7cf120a7064f28d1c44b07cabf49ec0e97f1fc8 SHA512 7aeb1b2aa0b9171963b771cfbec13d1a6d4b2519f0f6f2705b505d0ec7a7425764996de00ed1d2919d08c525617d029035a586e8c7e2fad2f44945fddd2afbcf WHIRLPOOL 4550fac41b3b990b0e9ae31f98b85e1e931c4a0508e64b14f0f0b26431d3afef74e479df5dec7051e539b796747637726652a13a49ea1767d3b8ead09f09ff68
diff --git a/app-arch/lcab/lcab-1.0_beta12.ebuild b/app-arch/lcab/lcab-1.0_beta12.ebuild
new file mode 100644
index 000000000000..a0e971bf82ea
--- /dev/null
+++ b/app-arch/lcab/lcab-1.0_beta12.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools
+
+MY_PV=${PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="CAB file creation tool"
+HOMEPAGE="http://ohnopub.net/lcab/"
+SRC_URI="ftp://mirror.ohnopub.net/mirror/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i "s:1.0b11:${MY_PV}:" mytypes.h || die
+ eautoreconf
+}
+
+src_install() {
+ default
+ doman ${PN}.1
+}
diff --git a/app-arch/lcab/metadata.xml b/app-arch/lcab/metadata.xml
new file mode 100644
index 000000000000..ededab1517b2
--- /dev/null
+++ b/app-arch/lcab/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+ <description>do whatever</description>
+</maintainer>
+ <maintainer>
+ <email>binki@gentoo.org</email>
+ <name>Nathan Phillip Brink</name>
+ <description>Upstreamish</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/lha/Manifest b/app-arch/lha/Manifest
new file mode 100644
index 000000000000..0ac42288c532
--- /dev/null
+++ b/app-arch/lha/Manifest
@@ -0,0 +1 @@
+DIST lha-1.14i-ac20050924p1.tar.gz 285518 SHA256 b5261e9f98538816aa9e64791f23cb83f1632ecda61f02e54b6749e9ca5e9ee4 SHA512 efe43d407d273f8f724f7b205223bd122c76adac4b67ad5e9811e88cae03f1f3c3af4297aa6f24951a02558975bbafacf697e97ab0da578b4e0115b89237566f WHIRLPOOL 2aaa99fa8106423fea381b4ebe72e7a454008032be88420d9d92d8cda0c9e4f38857909d5e5f6fb0303db0311978eb2ca64ee0465beb9dc780a9f5be2218e774
diff --git a/app-arch/lha/files/lha-114i-file-list-from-stdin.patch b/app-arch/lha/files/lha-114i-file-list-from-stdin.patch
new file mode 100644
index 000000000000..4bd0d17d7527
--- /dev/null
+++ b/app-arch/lha/files/lha-114i-file-list-from-stdin.patch
@@ -0,0 +1,29 @@
+Index: src/lharc.c
+===================================================================
+--- src/lharc.c (revision 773)
++++ src/lharc.c (working copy)
+@@ -561,7 +561,7 @@
+ if (!isatty(1) && cmd == CMD_ADD)
+ quiet = TRUE;
+ }
+-#if 0 /* Comment out; IMHO, this feature is useless. by Koji Arai */
++#ifndef MINGW32
+ else {
+ if (argc == 3 && !isatty(0)) { /* 1999.7.18 */
+ /* Bug(?) on MinGW, isatty() return 0 on Cygwin console.
+Index: configure.ac
+===================================================================
+--- configure.ac (revision 773)
++++ configure.ac (working copy)
+@@ -289,6 +289,11 @@
+ [Define to 1 if you want to ignore dot files with -X command line switch])
+ fi
+
++AC_MINGW32
++if test "x$MINGW32" = xyes; then
++ AC_DEFINE(MINGW32, 1, [Define to 1 if we're being compiled with MinGW.])
++fi
++
+ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile olddoc/Makefile])
+ AC_CONFIG_FILES([tests/Makefile tests/lha-test])
+ AC_OUTPUT
diff --git a/app-arch/lha/lha-114i-r7.ebuild b/app-arch/lha/lha-114i-r7.ebuild
new file mode 100644
index 000000000000..dad79e2b7ade
--- /dev/null
+++ b/app-arch/lha/lha-114i-r7.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils flag-o-matic
+
+MY_P=${PN}-1.14i-ac20050924p1
+
+DESCRIPTION="Utility for creating and opening lzh archives"
+HOMEPAGE="http://lha.sourceforge.jp"
+SRC_URI="mirror://sourceforge.jp/${PN}/22231/${MY_P}.tar.gz"
+
+LICENSE="lha"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~m68k-mint"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-file-list-from-stdin.patch
+
+ sed -i -e '/^AM_C_PROTOTYPES/d' configure.ac || die #423125
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -DPROTOTYPES #423125
+
+ if [[ ${CHOST} == *-interix* ]]; then
+ export ac_cv_header_inttypes_h=no
+ export ac_cv_func_iconv=no
+ fi
+
+ econf
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ mandir="${EPREFIX}"/usr/share/man/ja \
+ install
+
+ dodoc ChangeLog Hacking_of_LHa
+}
diff --git a/app-arch/lha/metadata.xml b/app-arch/lha/metadata.xml
new file mode 100644
index 000000000000..8eb52056a1e2
--- /dev/null
+++ b/app-arch/lha/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nitro@legroom.net</email>
+ <name>Jared B.</name>
+ </maintainer>
+ <longdescription lang="en">
+ A utility for creating and opening lzh archives.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge-jp">lha</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest
new file mode 100644
index 000000000000..d9a56ff4e636
--- /dev/null
+++ b/app-arch/libarchive/Manifest
@@ -0,0 +1 @@
+DIST libarchive-3.1.2.tar.gz 4527540 SHA256 eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e SHA512 1f3c2a675031f93c7d42ae2ed06742b0b1e2236ff57d9117791d62fb8ae77d6cafffbcb5d45b5bd98daa908bd18c576cf82e01a9b1eba699705e23eff3688114 WHIRLPOOL b90f336afb5264be91fb17d7dae3d5697e3f84e24d276af1d5ac076fe15ef6f5756488f09506fabe470473becb5449cd1f34865309dcf8a914e6e83506e8695f
diff --git a/app-arch/libarchive/files/libarchive-3.1.2-CVE-2013-0211.patch b/app-arch/libarchive/files/libarchive-3.1.2-CVE-2013-0211.patch
new file mode 100644
index 000000000000..78427ce47740
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.1.2-CVE-2013-0211.patch
@@ -0,0 +1,32 @@
+From 22531545514043e04633e1c015c7540b9de9dbe4 Mon Sep 17 00:00:00 2001
+From: Tim Kientzle <kientzle@acm.org>
+Date: Fri, 22 Mar 2013 23:48:41 -0700
+Subject: [PATCH] Limit write requests to at most INT_MAX. This prevents a
+ certain common programming error (passing -1 to write) from leading to other
+ problems deeper in the library.
+
+---
+ libarchive/archive_write.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c
+index eede5e0..be85621 100644
+--- a/libarchive/archive_write.c
++++ b/libarchive/archive_write.c
+@@ -673,8 +673,13 @@ static ssize_t
+ _archive_write_data(struct archive *_a, const void *buff, size_t s)
+ {
+ struct archive_write *a = (struct archive_write *)_a;
++ const size_t max_write = INT_MAX;
++
+ archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
+ ARCHIVE_STATE_DATA, "archive_write_data");
++ /* In particular, this catches attempts to pass negative values. */
++ if (s > max_write)
++ s = max_write;
+ archive_clear_error(&a->archive);
+ return ((a->format_write_data)(a, buff, s));
+ }
+--
+1.8.1
+
diff --git a/app-arch/libarchive/libarchive-3.1.2-r1.ebuild b/app-arch/libarchive/libarchive-3.1.2-r1.ebuild
new file mode 100644
index 000000000000..ce57a8000dcc
--- /dev/null
+++ b/app-arch/libarchive/libarchive-3.1.2-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib toolchain-funcs
+
+DESCRIPTION="BSD tar command"
+HOMEPAGE="http://www.libarchive.org/"
+SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
+
+LICENSE="BSD BSD-2 BSD-4 public-domain"
+SLOT="0/13"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux +lzma lzo nettle static-libs xattr +zlib"
+
+RDEPEND="dev-libs/openssl:0
+ acl? ( virtual/acl )
+ bzip2? ( app-arch/bzip2 )
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2 )
+ iconv? ( virtual/libiconv )
+ kernel_linux? (
+ xattr? ( sys-apps/attr )
+ )
+ lzma? ( app-arch/xz-utils )
+ lzo? ( >=dev-libs/lzo-2 )
+ nettle? ( dev-libs/nettle )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ kernel_linux? (
+ virtual/os-headers
+ e2fsprogs? ( sys-fs/e2fsprogs )
+ )"
+
+DOCS="NEWS README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2013-0211.patch
+ elibtoolize
+}
+
+src_configure() {
+ export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
+
+ # We disable lzmadec because we support the newer liblzma from xz-utils
+ # and not liblzmadec with this version.
+ econf \
+ $(use_enable static-libs static) \
+ --enable-bsdtar=$(tc-is-static-only && echo static || echo shared) \
+ --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared) \
+ $(use_enable xattr) \
+ $(use_enable acl) \
+ $(use_with zlib) \
+ $(use_with bzip2 bz2lib) \
+ --without-lzmadec \
+ $(use_with iconv) \
+ $(use_with lzma) \
+ $(use_with lzo lzo2) \
+ $(use_with nettle) \
+ $(use_with !expat xml2) \
+ $(use_with expat)
+}
+
+src_test() {
+ # Replace the default src_test so that it builds tests in parallel
+ emake check
+}
+
+src_install() {
+ default
+
+ # Libs.private: should be used from libarchive.pc instead
+ prune_libtool_files
+
+ # Create tar symlink for FreeBSD
+ if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
+ dosym bsdtar /usr/bin/tar
+ echo '.so bsdtar.1' > "${T}"/tar.1
+ doman "${T}"/tar.1
+ # We may wish to switch to symlink bsdcpio to cpio too one day
+ fi
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/${PN}$(get_libname 12)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/${PN}$(get_libname 12)
+}
diff --git a/app-arch/libarchive/metadata.xml b/app-arch/libarchive/metadata.xml
new file mode 100644
index 000000000000..ca60b945eeab
--- /dev/null
+++ b/app-arch/libarchive/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>bsd</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <longdescription lang='en'>
+ The bsdtar program creates and manipulates streaming archive files.
+ It has a number of advantages over previous tar implementations.
+ </longdescription>
+ <use>
+ <flag name='zlib'>
+ Allow accessing gzip-compressed archives through
+ <pkg>sys-libs/zlib</pkg>. This only affects libarchive's native
+ support: bsdtar will keep using gunzip as a filter if that's not
+ built-in. It's also needed for supporting extraction of ZIP
+ files.
+ </flag>
+ <flag name='bzip2'>
+ Allow accessing bzip2-compressed archives through libbz2 (which
+ comes with <pkg>app-arch/bzip2</pkg>). This only affects
+ libarchive's native support: bsdtar will keep using bunzip2 as a
+ filter if that's not built-in.
+ </flag>
+ <flag name='nettle'>
+ Use <pkg>dev-libs/nettle</pkg> as crypto backend
+ </flag>
+ <flag name='e2fsprogs'>
+ Use file flags from <pkg>sys-fs/e2fsprogs</pkg> headers instead of <pkg>virtual/os-headers</pkg> headers
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/app-arch/libpar2/Manifest b/app-arch/libpar2/Manifest
new file mode 100644
index 000000000000..c968270ae7a9
--- /dev/null
+++ b/app-arch/libpar2/Manifest
@@ -0,0 +1 @@
+DIST libpar2-0.4.tar.gz 516613 SHA256 316d6f0eb31eb896f5546171c2e86801aeffe5ae5e2decffc17f0018346796d4 SHA512 36d6f91bb3ea94dca1c4c45be41d37662a928bed39edace1a38ae0ad167804308d252a9fe49c2babb194b297fa4671654532add3758b7d7d528161cdceb278e6 WHIRLPOOL 759e9b4b211e1680098f7f61464ca6b75c6177ecdb7897f3f926db4479cb9e1a8e5f3888db24a9cf89218078cbab33f52dd7c69ccaec412074eddc06b70dfa2b
diff --git a/app-arch/libpar2/libpar2-0.4.ebuild b/app-arch/libpar2/libpar2-0.4.ebuild
new file mode 100644
index 000000000000..18c5bed4c8d5
--- /dev/null
+++ b/app-arch/libpar2/libpar2-0.4.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="A library for par2, extracted from par2cmdline"
+HOMEPAGE="https://launchpad.net/libpar2/"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/libsigc++:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog README )
+
+# Needed to install all headers properly (bug #391815)
+AUTOTOOLS_IN_SOURCE_BUILD=1
diff --git a/app-arch/libpar2/metadata.xml b/app-arch/libpar2/metadata.xml
new file mode 100644
index 000000000000..e20bf81c246e
--- /dev/null
+++ b/app-arch/libpar2/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">libpar2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/libzpaq/Manifest b/app-arch/libzpaq/Manifest
new file mode 100644
index 000000000000..6450e5eb8ea3
--- /dev/null
+++ b/app-arch/libzpaq/Manifest
@@ -0,0 +1,4 @@
+DIST zpaq641.zip 576673 SHA256 0d90a6be9a70c9c2b337116da4044385821c3b7bbd1988bff8d21171e5daf86c SHA512 48ee840496ee3b61b33117a7a421903635b515040c1a4414c83be66ae6da2516e26511fb3a09ecd1448a84f6b1e7f6df5069af6806d53361110a11590270e7eb WHIRLPOOL a27c3a06854face7e6a6558863e351700601459b354904d61733e75d3719a047a041fff3b315954801ca610355facdf1242b232edfd630d25bef94a321179e6e
+DIST zpaq649.zip 609714 SHA256 d6162d40f17649573ca355038ef7b79baf337696f8c14ca58706dcb6519b5767 SHA512 67e5fb2fb5d0c6f8b05e126aeaf3b9b2173c343487627ebaddbf63ce56ef044842e6e7b7ed20c80e813fe04c625421101ef157e21fc72d6411daec4ad25c77ae WHIRLPOOL e3bac2a75d4e5288b5093eb8989155c212a8260ffbd0d0a6a90acbae7c59a9ad20ade591744e573c557e510cd2b32c2d562cfe6c805aba90cd837fd5288279b3
+DIST zpaq653.zip 536808 SHA256 295e4e491958c222bf51a30d36eb2d013a6f427422b91ee9d5be7f1c332590b3 SHA512 7999f0e35e8b0f46b586e5a0f5346b3501f21ab39fa25d57b9bdf5b87eee16d9e846f6b60fc7c447195bbdd0345ec4e220606d8c100167611231afe36f5558ed WHIRLPOOL 9d66fc51d2d48df1853c68686a65bc492756e11378c8e9075d6c976f11e69941fe52405ce66a57497fcde0524879ce04ef0430df3ff84da28e7d2f9d2cc70034
+DIST zpaq704.zip 630426 SHA256 21b595f8452b32c780f6ff29e0fc716cdf3595338774e1f72d4d4b5df212da39 SHA512 2655febd6e1352858c4daa7abe743c77e2b4b554b6c5961e1dde2c4011b1b4dd647decf60b7a86585eb5a1606253789afb85551923c6f542cf31dfecd984eaaa WHIRLPOOL 8a4ff4dd0c9e53d2f4a85c600537d83d7876f24ba4d4371d5a647d873c5ecc92ed80626f7abc3127f62346a1ffa69bc88172366a4fe4e0ea4236086c55a5ee72
diff --git a/app-arch/libzpaq/files/0001-Add-autotools-files.patch b/app-arch/libzpaq/files/0001-Add-autotools-files.patch
new file mode 100644
index 000000000000..15b62284b4f9
--- /dev/null
+++ b/app-arch/libzpaq/files/0001-Add-autotools-files.patch
@@ -0,0 +1,50 @@
+From 0f4930dd8bdc1bb67c197fd3cdc3d8d832323209 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 6 Jan 2011 17:30:56 +0100
+Subject: [PATCH] Add autotools files.
+
+Now with libtool support!
+---
+ Makefile.am | 5 +++++
+ configure.ac | 17 +++++++++++++++++
+ 2 files changed, 22 insertions(+)
+ create mode 100644 Makefile.am
+ create mode 100644 configure.ac
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..c60308f
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,5 @@
++lib_LTLIBRARIES = libzpaq.la
++include_HEADERS = libzpaq.h
++
++libzpaq_la_SOURCES = libzpaq.cpp libzpaq.h
++libzpaq_la_LDFLAGS = -version-info @ABI_VERSION@
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..4118d18
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,17 @@
++AC_PREREQ([2.60])
++AC_INIT([libzpaq], [na])
++AC_CONFIG_AUX_DIR([build-aux])
++AM_INIT_AUTOMAKE([1.6 foreign no-dependencies])
++
++LT_INIT([disable-static])
++AC_PROG_CXX
++
++AC_ARG_WITH([library-version],
++ [AS_HELP_STRING([--with-library-version=<VERSION>],
++ [Set library libtool version])],, [
++ AC_MSG_ERROR([--with-library-version not set])
++])
++AC_SUBST([ABI_VERSION], [$with_library_version])
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+--
+1.9.0
+
diff --git a/app-arch/libzpaq/libzpaq-6.41.ebuild b/app-arch/libzpaq/libzpaq-6.41.ebuild
new file mode 100644
index 000000000000..eeff90bae4cc
--- /dev/null
+++ b/app-arch/libzpaq/libzpaq-6.41.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils flag-o-matic eutils
+
+MY_P=zpaq${PV/./}
+DESCRIPTION="Library to compress files in the ZPAQ format"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="zpaq"
+SLOT="0/4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +jit static-libs"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/0001-Add-autotools-files.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-library-version=${SLOT#*/}:0:0
+ )
+
+ use debug || append-cppflags -DNDEBUG
+ use jit || append-cppflags -DNOJIT
+
+ autotools-utils_src_configure
+}
diff --git a/app-arch/libzpaq/libzpaq-6.49.ebuild b/app-arch/libzpaq/libzpaq-6.49.ebuild
new file mode 100644
index 000000000000..a5153648f0cd
--- /dev/null
+++ b/app-arch/libzpaq/libzpaq-6.49.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils flag-o-matic eutils
+
+MY_P=zpaq${PV/./}
+DESCRIPTION="Library to compress files in the ZPAQ format"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="zpaq"
+SLOT="0/4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +jit static-libs"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/0001-Add-autotools-files.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-library-version=5:0:1
+ )
+
+ use debug || append-cppflags -DNDEBUG
+ use jit || append-cppflags -DNOJIT
+ append-cppflags -Dunix
+
+ autotools-utils_src_configure
+}
diff --git a/app-arch/libzpaq/libzpaq-6.53.ebuild b/app-arch/libzpaq/libzpaq-6.53.ebuild
new file mode 100644
index 000000000000..450d6cc1be30
--- /dev/null
+++ b/app-arch/libzpaq/libzpaq-6.53.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils flag-o-matic eutils
+
+MY_P=zpaq${PV/./}
+DESCRIPTION="Library to compress files in the ZPAQ format"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="zpaq"
+SLOT="0/4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +jit static-libs"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/0001-Add-autotools-files.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-library-version=5:1:1
+ )
+
+ use debug || append-cppflags -DNDEBUG
+ use jit || append-cppflags -DNOJIT
+ append-cppflags -Dunix
+
+ autotools-utils_src_configure
+}
diff --git a/app-arch/libzpaq/libzpaq-7.04.ebuild b/app-arch/libzpaq/libzpaq-7.04.ebuild
new file mode 100644
index 000000000000..0685f5abe9e7
--- /dev/null
+++ b/app-arch/libzpaq/libzpaq-7.04.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils flag-o-matic eutils
+
+MY_P=zpaq${PV/./}
+DESCRIPTION="Library to compress files in the ZPAQ format"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="zpaq"
+SLOT="0/5"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +jit static-libs"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/0001-Add-autotools-files.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-library-version=6:0:0
+ )
+
+ use debug || append-cppflags -DNDEBUG
+ use jit || append-cppflags -DNOJIT
+ append-cppflags -Dunix
+
+ autotools-utils_src_configure
+}
diff --git a/app-arch/libzpaq/metadata.xml b/app-arch/libzpaq/metadata.xml
new file mode 100644
index 000000000000..7a46622a1ba3
--- /dev/null
+++ b/app-arch/libzpaq/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name='jit'>Enable just-in-time compilation for faster
+ compression (requires SSE2)</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-arch/lrzip/Manifest b/app-arch/lrzip/Manifest
new file mode 100644
index 000000000000..3e3cd77746f7
--- /dev/null
+++ b/app-arch/lrzip/Manifest
@@ -0,0 +1,3 @@
+DIST lrzip-0.614.tar.bz2 491995 SHA256 65024d69d1773f3ccf84508a481d7de128c03d1cf9750b5803aead4a24522763 SHA512 6c82d7b4cc6081fb4f102a34f3a5ecf834b3fa3d222ac9dd4f3f0615c83610c08315eae9cc98291bd5e3eb71453cf391cdad4db980012e4368d16d80f34d2bd8 WHIRLPOOL 1669d9e551786f81c3849b2bfb813422cccc21c9d00104b58d42a0470ae9b8633339ef88ead6c5956eea92ac6800ee9b259fbfb15d1b22aa45fe92db7040cf68
+DIST lrzip-0.616.tar.bz2 493886 SHA256 982d5a8db4d8bbbced6e33fbbcd589c9b3fc4275110155d7bd71cbeff4a235ae SHA512 f578034fa41c5be6df9b9d8e7efe5014229e1acecdd5d6090c26322e1e46db98e3bc17d780eca96342a0bcb56b8e78b008b3293520b82c1bbbd5a96e423d4b3f WHIRLPOOL bc7b22a579de42657c46f4dad426dfdb5cc37e1f54955cb66722ccbfc9b66d19194eb1f1a4d9f545de7859de7903d57854a1af647ff6c3341907fcc874351d94
+DIST lrzip-0.621.tar.bz2 503286 SHA256 31c26fbee8b9b0bd413ca214862dbc0d9e6d3477f23e9839774936bf140ceb6b SHA512 be94f54c3d84c93e3c1ab7b08ca6d2a02bc343983785be4884f42521520d2babc31db3abbec4b77dc9f710d18648adcc3d24b203289d8d4728afb3ef0fb90c0a WHIRLPOOL 41bd08db70f30ff183f3e82e784a40b08070a3a728eafad50b64c7ce453ed2c379721be64d0ac0ee04e1c66b6ad528d0210977624a8c17f90775f70b83921ae7
diff --git a/app-arch/lrzip/files/lrzip-missing-stdarg_h.patch b/app-arch/lrzip/files/lrzip-missing-stdarg_h.patch
new file mode 100644
index 000000000000..dcc698bd9b93
--- /dev/null
+++ b/app-arch/lrzip/files/lrzip-missing-stdarg_h.patch
@@ -0,0 +1,11 @@
+diff -Naur Lrzip.h.orig Lrzip.h
+--- Lrzip.h.orig 2013-11-30 20:07:27.343086997 +0000
++++ Lrzip.h 2013-11-30 20:07:44.072641056 +0000
+@@ -22,6 +22,7 @@
+
+ #include <stdbool.h>
+ #include <stdio.h>
++#include <stdarg.h>
+ #ifdef _WIN32
+ # include <stddef.h>
+ #else
diff --git a/app-arch/lrzip/lrzip-0.614.ebuild b/app-arch/lrzip/lrzip-0.614.ebuild
new file mode 100644
index 000000000000..8875c9c27661
--- /dev/null
+++ b/app-arch/lrzip/lrzip-0.614.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Long Range ZIP or Lzma RZIP optimized for compressing large files"
+HOMEPAGE="http://ck.kolivas.org/apps/lrzip/README"
+SRC_URI="http://ck.kolivas.org/apps/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-libs/lzo
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )
+ virtual/perl-Pod-Parser"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-missing-stdarg_h.patch
+}
+
+src_configure() {
+ econf --docdir="/usr/share/doc/${P}"
+}
+
+src_install() {
+ default
+ rm "${D}/usr/share/doc/${P}/COPYING"
+}
diff --git a/app-arch/lrzip/lrzip-0.616.ebuild b/app-arch/lrzip/lrzip-0.616.ebuild
new file mode 100644
index 000000000000..d05e78a5b0a5
--- /dev/null
+++ b/app-arch/lrzip/lrzip-0.616.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Long Range ZIP or Lzma RZIP optimized for compressing large files"
+HOMEPAGE="http://ck.kolivas.org/apps/lrzip/README"
+SRC_URI="http://ck.kolivas.org/apps/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-libs/lzo
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )
+ virtual/perl-Pod-Parser"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-missing-stdarg_h.patch
+}
+
+src_configure() {
+ econf --docdir="/usr/share/doc/${P}"
+}
+
+src_install() {
+ default
+ rm "${D}/usr/share/doc/${P}/COPYING"
+}
diff --git a/app-arch/lrzip/lrzip-0.621.ebuild b/app-arch/lrzip/lrzip-0.621.ebuild
new file mode 100644
index 000000000000..176ae3410787
--- /dev/null
+++ b/app-arch/lrzip/lrzip-0.621.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Long Range ZIP or Lzma RZIP optimized for compressing large files"
+HOMEPAGE="http://ck.kolivas.org/apps/lrzip/README"
+SRC_URI="http://ck.kolivas.org/apps/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-libs/lzo
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )
+ virtual/perl-Pod-Parser"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-missing-stdarg_h.patch
+}
+
+src_configure() {
+ econf --docdir="/usr/share/doc/${P}"
+}
+
+src_install() {
+ default
+ rm "${D}/usr/share/doc/${P}/COPYING"
+}
diff --git a/app-arch/lrzip/metadata.xml b/app-arch/lrzip/metadata.xml
new file mode 100644
index 000000000000..47c8a7fd5cf7
--- /dev/null
+++ b/app-arch/lrzip/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ This is a compression program optimised for large files. The larger the
+ file and the more memory you have, the better the compression advantage
+ this will provide, especially once the files are larger than 100MB.
+ The advantage can be chosen to be either size (much smaller than bzip2)
+ or speed (much faster than bzip2).
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/lz4/Manifest b/app-arch/lz4/Manifest
new file mode 100644
index 000000000000..87be5e22b141
--- /dev/null
+++ b/app-arch/lz4/Manifest
@@ -0,0 +1,2 @@
+DIST lz4-0_p106.tar.xz 129352 SHA256 a9a09c4ebb962995d10e7e4f7d9224aaa93f308899de18a414948a58e87b6f22 SHA512 8b2bafbf78be7c42831e264d7acdca12712c88369cecdb3aa4621c84bb6b450c372f5153f7c3939a5f70d5810c62b98993697397319d286a1bb51b1e4a6ecde6 WHIRLPOOL fc5bb47b73606b125d8e155365d1fe101083e68e684ffd6014440e0f1416f1f6ecc64b797083e6939bd3e8cd42018e46a1864ae4542160c96933a47df9421a42
+DIST lz4-r120.tar.gz 161950 SHA256 fa02b1bcc26529c27cff0883d830914bdd1ba41a87035313e1050302f17e4b07 SHA512 8b27c57737ba4c2c8e4f00f7ce13f6edc91f74885bad66dd521dfe85d427e0fd78a300896d599bb8642a34fba78446daf207d1b2fd8e91543d4c093e53694e86 WHIRLPOOL 6a0cd7f8caf9799130b13b3f282197b5ef20fb987f0f5f6911f71a0f5d5d37c542976be5f13bdd2e21a8edd0a6cc8408fcc0f69f6354a0fbc7df75b22fb9de91
diff --git a/app-arch/lz4/files/lz4-0_p106-cflags.patch b/app-arch/lz4/files/lz4-0_p106-cflags.patch
new file mode 100644
index 000000000000..6fc0fbb47dd8
--- /dev/null
+++ b/app-arch/lz4/files/lz4-0_p106-cflags.patch
@@ -0,0 +1,22 @@
+--- a/cmake/pack/CMakeLists.txt
++++ b/cmake/pack/CMakeLists.txt
+@@ -36,7 +36,7 @@
+ ADD_DEFINITIONS("-Wundef")
+ ADD_DEFINITIONS("-Wcast-align")
+ ADD_DEFINITIONS("-Wno-implicit-function-declaration")
+-ADD_DEFINITIONS("-O3 -march=native -std=c99")
++ADD_DEFINITIONS("-std=c99")
+ INCLUDE_DIRECTORIES (${SRC_DIR})
+
+
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -99,7 +99,7 @@
+ ADD_DEFINITIONS("-Wundef")
+ ADD_DEFINITIONS("-Wcast-align")
+ ADD_DEFINITIONS("-Wno-implicit-function-declaration")
+-ADD_DEFINITIONS("-Os -march=native -std=c99")
++ADD_DEFINITIONS("-std=c99")
+ INCLUDE_DIRECTORIES (${SRC_DIR})
+
+
diff --git a/app-arch/lz4/files/lz4-0_p106-install-to-bindir.patch b/app-arch/lz4/files/lz4-0_p106-install-to-bindir.patch
new file mode 100644
index 000000000000..521b1bfc58d2
--- /dev/null
+++ b/app-arch/lz4/files/lz4-0_p106-install-to-bindir.patch
@@ -0,0 +1,51 @@
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index 496c076..ce3fab1 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -41,11 +41,11 @@ endif()
+ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "64bit")
+ message(STATUS "Build 64bit executable binary")
+ add_executable(lz4c64 ${LZ4_SRCS})
+- install(TARGETS lz4c64 RUNTIME DESTINATION "./")
++ install(TARGETS lz4c64 RUNTIME DESTINATION "bin/")
+ if(NOT BUILD_SHARED_LIBS)
+ message(STATUS "Build 32bit executable binary")
+ add_executable(lz4c32 ${LZ4_SRCS})
+- install(TARGETS lz4c32 RUNTIME DESTINATION "./")
++ install(TARGETS lz4c32 RUNTIME DESTINATION "bin/")
+
+ SET_TARGET_PROPERTIES(lz4c32 PROPERTIES
+ COMPILE_FLAGS PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
+@@ -53,7 +53,7 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "64bit")
+ else()
+ message(STATUS "Build 32bit executable binary")
+ add_executable(lz4c32 ${LZ4_SRCS})
+- install(TARGETS lz4c32 RUNTIME DESTINATION "./")
++ install(TARGETS lz4c32 RUNTIME DESTINATION "bin/")
+ endif()
+
+ if(BUILD_SHARED_LIBS)
+diff --git a/cmake/pack/CMakeLists.txt b/cmake/pack/CMakeLists.txt
+index a9b0557..e85416e 100644
+--- a/cmake/pack/CMakeLists.txt
++++ b/cmake/pack/CMakeLists.txt
+@@ -48,16 +48,16 @@ set(FUZZER_SRCS ${SRC_DIR}lz4.c ${SRC_DIR}lz4hc.c ${SRC_DIR}lz4.h ${SRC_DIR}fuzz
+ # EXECUTABLES FOR 32 Bit and 64 versions
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "64bit")
+ add_executable(lz4c32 ${LZ4_SRCS})
+- install(TARGETS lz4c32 RUNTIME DESTINATION "./")
++ install(TARGETS lz4c32 RUNTIME DESTINATION "bin/")
+ SET_TARGET_PROPERTIES(lz4c32 PROPERTIES
+ COMPILE_FLAGS PROPERTIES COMPILE_FLAGS "-m32 -Os" LINK_FLAGS "-m32")
+ endif()
+
+ add_executable(lz4c ${LZ4_SRCS})
+-install(TARGETS lz4c RUNTIME DESTINATION "./")
++install(TARGETS lz4c RUNTIME DESTINATION "bin/")
+
+ add_executable(fuzzer ${FUZZER_SRCS})
+-install(TARGETS fuzzer RUNTIME DESTINATION "./")
++install(TARGETS fuzzer RUNTIME DESTINATION "bin/")
+
+ #target_link_libraries(lz4 ${LZ4_SRCS_LIB})
+ ####################### CPACK PACKAGING ###################
diff --git a/app-arch/lz4/lz4-0_p106-r1.ebuild b/app-arch/lz4/lz4-0_p106-r1.ebuild
new file mode 100644
index 000000000000..22fac7bc2e25
--- /dev/null
+++ b/app-arch/lz4/lz4-0_p106-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+CMAKE_USE_DIR="${S}/cmake"
+
+if [ ${PV} == "9999" ] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://lz4.googlecode.com/svn/trunk/"
+ ESVN_PROJECT="lz4-read-only"
+else
+ SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Extremely Fast Compression algorithm"
+HOMEPAGE="https://code.google.com/p/lz4/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ if [ ${PV} == "9999" ]
+ then
+ subversion_src_prepare
+ else
+ epatch "${FILESDIR}/${P}-install-to-bindir.patch"
+ epatch "${FILESDIR}/${P}-cflags.patch"
+ fi
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(-DBUILD_SHARED_LIBS=ON)
+ cmake-utils_src_configure
+}
+
+src_install() {
+ dodir /usr
+ dodir "/usr/$(get_libdir)"
+ ln -s "$(get_libdir)" "${ED}usr/lib" || \
+ die "Cannot create temporary symlink from usr/lib to usr/$(get_libdir)"
+
+ cmake-utils_src_install
+
+ rm "${ED}usr/lib"
+
+ if [ -f "${ED}usr/bin/lz4c64" ]
+ then
+ dosym lz4c64 /usr/bin/lz4c
+ else
+ dosym lz4c32 /usr/bin/lz4c
+ fi
+}
diff --git a/app-arch/lz4/lz4-0_p120.ebuild b/app-arch/lz4/lz4-0_p120.ebuild
new file mode 100644
index 000000000000..5a0e244bcb01
--- /dev/null
+++ b/app-arch/lz4/lz4-0_p120.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib multilib-minimal toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Cyan4973/lz4.git"
+ EGIT_BRANCH=dev
+else
+ MY_PV="r${PV##0_p}"
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="https://github.com/Cyan4973/lz4/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Extremely Fast Compression algorithm"
+HOMEPAGE="https://code.google.com/p/lz4/"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+IUSE="test valgrind"
+
+DEPEND="test? ( valgrind? ( dev-util/valgrind ) )"
+
+src_prepare() {
+ if ! use valgrind; then
+ sed -i -e '/^test:/s|test-mem||g' programs/Makefile || die
+ fi
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export CC AR
+ # we must not use the 'all' target since it builds test programs
+ # & extra -m32 executables
+ emake
+ emake -C programs
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+}
diff --git a/app-arch/lz4/lz4-9999.ebuild b/app-arch/lz4/lz4-9999.ebuild
new file mode 100644
index 000000000000..32b103c727c8
--- /dev/null
+++ b/app-arch/lz4/lz4-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib multilib-minimal toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Cyan4973/lz4.git"
+ EGIT_BRANCH=dev
+else
+ SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Extremely Fast Compression algorithm"
+HOMEPAGE="https://code.google.com/p/lz4/"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+IUSE="test"
+
+RDEPEND=""
+DEPEND="test? ( dev-util/valgrind )"
+
+src_prepare() {
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export CC AR
+ # we must not use the 'all' target since it builds test programs
+ # & extra -m32 executables
+ emake
+ emake -C programs
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+}
diff --git a/app-arch/lz4/metadata.xml b/app-arch/lz4/metadata.xml
new file mode 100644
index 000000000000..1decb7dd7609
--- /dev/null
+++ b/app-arch/lz4/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ </maintainer>
+<use>
+<flag name='valgrind'>Enable usage of dev-util/valgrind in tests</flag>
+</use>
+</pkgmetadata>
diff --git a/app-arch/lzip/Manifest b/app-arch/lzip/Manifest
new file mode 100644
index 000000000000..cba59dc7e728
--- /dev/null
+++ b/app-arch/lzip/Manifest
@@ -0,0 +1,2 @@
+DIST lzip-1.16.tar.gz 86035 SHA256 128cc25baf92c8b69700831e6f984d954016318cc78edca87870d0c033112751 SHA512 8a1c0b254fd10428ddee8b26a2e426b57c4799bdc690e08211c3bc8fdef0d86e3ed69c48a3f6b7be1fe6c65f1e09f44cd3481b233632b60b58f4b8a806175b63 WHIRLPOOL fdb9462a4f7c3efc05b00785f1124e491d316ca44eb0d280542675593861cdca993654b5e6fcbbbabf7a1aa96c552b8ebc3307493af87ee4e154790e448ff8e5
+DIST lzip-1.17.tar.gz 91299 SHA256 9443855e0a33131233b22cdb6c62c9313a483f16cc7415efe88d4a494cea0352 SHA512 cd4a1a7d3778f22e3a6f2d2a20491919e662771e79d1738f74c63de857913e28186d53b2af7997e1b164f8ab792561c7dde8781bb025a1859271ddd72f5ed519 WHIRLPOOL 6ac2c7811bccb91db290df0c446f6fccf77918903f6a5eb430163973ded98b33d09505afbd2c9c1a585029d554f3a5683816778c23c0ee696eb49f25496d2828
diff --git a/app-arch/lzip/lzip-1.16.ebuild b/app-arch/lzip/lzip-1.16.ebuild
new file mode 100644
index 000000000000..047ac417dd3e
--- /dev/null
+++ b/app-arch/lzip/lzip-1.16.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="lossless data compressor based on the LZMA algorithm"
+HOMEPAGE="http://www.nongnu.org/lzip/lzip.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/lzip/lzip-1.17.ebuild b/app-arch/lzip/lzip-1.17.ebuild
new file mode 100644
index 000000000000..e51ceeb2c5ad
--- /dev/null
+++ b/app-arch/lzip/lzip-1.17.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="lossless data compressor based on the LZMA algorithm"
+HOMEPAGE="http://www.nongnu.org/lzip/lzip.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/${PN}/${P/_/-}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/lzip/metadata.xml b/app-arch/lzip/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/app-arch/lzip/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/app-arch/lziprecover/Manifest b/app-arch/lziprecover/Manifest
new file mode 100644
index 000000000000..744107ed1980
--- /dev/null
+++ b/app-arch/lziprecover/Manifest
@@ -0,0 +1,3 @@
+DIST lziprecover-1.16.tar.gz 71746 SHA256 fe01f89f439aa13cf8e169a92ac591262d24b9df61942cbecaa89180c3004882 SHA512 0c647214ae57883baa4fed2cad32d003d6601178cbb8cbf0a8de604eb91fda5f5b9dda840532381ca46b236a2a168ed65f621d65c1382b60df9e3e4b68880e2f WHIRLPOOL 0c0bec65f45d5fed23c592ab9de1e221c46ab16701c85cb401e852c344ab36bb21d4d906827b78df4741aec9c87db51d06d49f675bfef90174b7672915bca021
+DIST lziprecover-1.17.tar.gz 75941 SHA256 a539b86d282a4bb154e01b04c3e09eaf7540b2c2be72d6b2110900c076bf3dbd SHA512 409a3634ef15238f8c87e6e69ecf0cf83c48274cff6c54a901a4f80bdc3d475b6bf03215cfee762ac64ca41b3e8a805ab620ceaaa1bec7fc22ffafad049b5f0f WHIRLPOOL 1b97ac140cdc190fdb3ceec5337576c775166bf4a30fbd8f956208095898411bd9ee7cbd99bd4e44aae11d67e9a6ad52ba60967d87c9eb057830950ede23aefa
+DIST lziprecover-1.18-pre1.tar.gz 77354 SHA256 fa9399824123cff0280d16f1e996e2cb9a9662f90c817e72203cac05a8ccd35e SHA512 6e26200edb1c89d4698c335352480dcc58b960667e438f417b1407b6477c9df4c247f79133c8257909ee4911a74fbf51b3f70a12085a8a43716a7d146f533654 WHIRLPOOL 42faf01f28e93bf09890bf0018e03391d21201863e735005f62d238593c41ece278f4387c19f1494ddcab55764b21aaa34aca526684ae8a072e55a91618e8ac6
diff --git a/app-arch/lziprecover/lziprecover-1.16.ebuild b/app-arch/lziprecover/lziprecover-1.16.ebuild
new file mode 100644
index 000000000000..627cc6839256
--- /dev/null
+++ b/app-arch/lziprecover/lziprecover-1.16.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Lziprecover is a data recovery tool and decompressor for files in the lzip compressed data format"
+HOMEPAGE="http://www.nongnu.org/lzip/lziprecover.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P}.tar.gz"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/lziprecover/lziprecover-1.17.ebuild b/app-arch/lziprecover/lziprecover-1.17.ebuild
new file mode 100644
index 000000000000..f7dc48105a12
--- /dev/null
+++ b/app-arch/lziprecover/lziprecover-1.17.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Lziprecover is a data recovery tool and decompressor for files in the lzip compressed data format"
+HOMEPAGE="http://www.nongnu.org/lzip/lziprecover.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/lziprecover/lziprecover-1.18_pre1.ebuild b/app-arch/lziprecover/lziprecover-1.18_pre1.ebuild
new file mode 100644
index 000000000000..f7dc48105a12
--- /dev/null
+++ b/app-arch/lziprecover/lziprecover-1.18_pre1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Lziprecover is a data recovery tool and decompressor for files in the lzip compressed data format"
+HOMEPAGE="http://www.nongnu.org/lzip/lziprecover.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/lziprecover/metadata.xml b/app-arch/lziprecover/metadata.xml
new file mode 100644
index 000000000000..eb4dc77430b4
--- /dev/null
+++ b/app-arch/lziprecover/metadata.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <longdescription lang="en">
+ Lziprecover is a data recovery tool and decompressor for files in the lzip
+ compressed data format (.lz), able to repair slightly damaged files,
+ recover badly damaged files from two or more copies, extract data from
+ damaged files, decompress files and test integrity of files.
+ The lzip file format is designed for long-term data archiving. It is clean,
+ provides very safe 4 factor integrity checking, and is backed by the
+ recovery capabilities of lziprecover.
+ Lziprecover is able to recover or decompress files produced by any of the
+ compressors in the lzip family; lzip, plzip, minilzip/lzlib, clzip and
+ pdlzip.
+ Lziprecover makes lzip files resistant to bit-flip (one of the most common
+ forms of data corruption), and can safely merge multiple damaged backup
+ copies.
+ If the cause of file corruption is damaged media, the combination GNU
+ ddrescue + lziprecover is the best option for recovering data from multiple
+ damaged copies.
+ If a file is too damaged for lziprecover to repair it, all the recoverable
+ data in all members of the file can be extracted with the '-D' option.
+ Lziprecover is able to efficiently extract a range of bytes from a
+ multi-member file, because it only decompresses the members containing the
+ desired data.
+ Lziprecover can print correct total file sizes and ratios even for
+ multi-member files.
+ When recovering data, lziprecover takes as arguments the names of the
+ damaged files and writes zero or more recovered files depending on the
+ operation selected and whether the recovery succeeded or not. The damaged
+ files themselves are never modified.
+ When decompressing or testing file integrity, lziprecover behaves like lzip
+ or lunzip.
+ To give you an idea of its possibilities, when merging two copies, each of
+ them with one damaged area affecting 1 percent of the copy, the probability
+ of obtaining a correct file is about 98 percent. With three such copies the
+ probability rises to 99.97 percent. For large files (a few MB) with small
+ errors (one sector damaged per copy), the probability approaches 100 percent
+ even with only two copies.
+ Lziprecover is not a replacement for regular backups, but a last line of
+ defense for the case where the backups are also damaged.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/lzlib/Manifest b/app-arch/lzlib/Manifest
new file mode 100644
index 000000000000..25d7d4cd47a9
--- /dev/null
+++ b/app-arch/lzlib/Manifest
@@ -0,0 +1,2 @@
+DIST lzlib-1.6.tar.gz 91734 SHA256 c187ef5ffa9ffb01abaec667dda4d8c8b378291c68ad094c63bd75ee049e4780 SHA512 b4ebf3ad0c634593b7162479d43497b2daa1c47b979695988ed278e828fc6f6eac721b9eae238f50b7ee543f8c163fc4b51c6dcd575c37aa59aff8ca3cf903a2 WHIRLPOOL da2b6e1755c7697e3f8c7dbd82c4fc51b3503234498bfa9b860a144e8a53345e40fcd0062ad152742b247c3b03ccfb9d66046dc2372503333f30a2692efaa18d
+DIST lzlib-1.7.tar.gz 94257 SHA256 88c919dbb16a8b5409fc8ccec31d3c604551d73e84cec8c964fd639452536214 SHA512 de91417f301e7c41da39b57a5bbce112d24170008f24c87ddbe7977ad912a982e62aac7ed5c2964abbf1905d6ebb2faf64b29cfba0a2bea40d35aed5eb437728 WHIRLPOOL 7ee577edf78a3f79319469eafbecd418917c6b2da29be4b000438481b3e4692dca13902516f0486d260832813404e6920c1e8234c6c65ba7fad8eb88093343c8
diff --git a/app-arch/lzlib/lzlib-1.6.ebuild b/app-arch/lzlib/lzlib-1.6.ebuild
new file mode 100644
index 000000000000..517faae1e18f
--- /dev/null
+++ b/app-arch/lzlib/lzlib-1.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Library for lzip compression"
+HOMEPAGE="http://www.nongnu.org/lzip/lzlib.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --enable-shared \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ CC="$(tc-getCC)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" LDCONFIG=: install
+ einstalldocs
+
+ # this sucking thing does not support disabling static libs
+ if ! use static-libs; then
+ rm "${ED%/}"/usr/$(get_libdir)/*.a || die
+ fi
+}
diff --git a/app-arch/lzlib/lzlib-1.7.ebuild b/app-arch/lzlib/lzlib-1.7.ebuild
new file mode 100644
index 000000000000..517faae1e18f
--- /dev/null
+++ b/app-arch/lzlib/lzlib-1.7.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Library for lzip compression"
+HOMEPAGE="http://www.nongnu.org/lzip/lzlib.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --enable-shared \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ CC="$(tc-getCC)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" LDCONFIG=: install
+ einstalldocs
+
+ # this sucking thing does not support disabling static libs
+ if ! use static-libs; then
+ rm "${ED%/}"/usr/$(get_libdir)/*.a || die
+ fi
+}
diff --git a/app-arch/lzlib/metadata.xml b/app-arch/lzlib/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/lzlib/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/lzma/Manifest b/app-arch/lzma/Manifest
new file mode 100644
index 000000000000..6bcf400dc49b
--- /dev/null
+++ b/app-arch/lzma/Manifest
@@ -0,0 +1 @@
+DIST lzma920.tar.bz2 534077 SHA256 8ac221acdca8b6f6dd110120763af42b3707363752fc04e63c7bbff76774a445 SHA512 1c495530834107430a675fb48c006093edc301ec7a2c2f273efd62ff260f3056503bb2c3ddef63e82f5ff04b1347381055cf6cacd59eee9d451c4d841c13cd35 WHIRLPOOL 5ae0d8ece9d3d753ee3efa1b6422c15698a7f20d3783381cac7c5e10422ab532919018f44bac3050329745474c34b1115bc2006e70f4c6287600b89edca99db2
diff --git a/app-arch/lzma/lzma-9.20.ebuild b/app-arch/lzma/lzma-9.20.ebuild
new file mode 100644
index 000000000000..f9ecd55aacc1
--- /dev/null
+++ b/app-arch/lzma/lzma-9.20.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="LZMA Stream Compressor from the SDK"
+HOMEPAGE="http://www.7-zip.org/sdk.html"
+SRC_URI="mirror://sourceforge/sevenzip/${MY_P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~mips ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc"
+
+S=${WORKDIR}
+
+src_compile() {
+ cd CPP/7zip/Bundles/LzmaCon
+ emake -f makefile.gcc \
+ CXX="$(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS}" \
+ CXX_C="$(tc-getCC) ${CFLAGS} ${CPPFLAGS}" \
+ || die "Make failed"
+}
+
+src_install() {
+ newbin CPP/7zip/Bundles/LzmaCon/lzma lzmacon || die
+ dodoc lzma.txt history.txt
+ use doc && dodoc 7zC.txt 7zFormat.txt Methods.txt
+}
+
+pkg_postinst() {
+ einfo "The lzma binary is now 'lzmacon' to avoid xz-utils conflicts #218459"
+}
diff --git a/app-arch/lzma/metadata.xml b/app-arch/lzma/metadata.xml
new file mode 100644
index 000000000000..8fbc72cbc106
--- /dev/null
+++ b/app-arch/lzma/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sevenzip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/lzop/Manifest b/app-arch/lzop/Manifest
new file mode 100644
index 000000000000..333af0d78028
--- /dev/null
+++ b/app-arch/lzop/Manifest
@@ -0,0 +1 @@
+DIST lzop-1.03.tar.gz 370775 SHA256 c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9 SHA512 a7a46793e060690f7da3e9dcae8e19f9c3633b84bc6e4a9a7fbf7791361fc7795e00f1d820978b20df8731c165b37244f11203a2936640688e4ade0cc2f5f3d7 WHIRLPOOL 3590d424447290aeb102a7edc7baf2e3ca90cb5b0d34339cd501f90f3e3c4b41a94b530790e7ba06ca28d044dbf4a05973a9fe976b5d1356019e0302b376c7f4
diff --git a/app-arch/lzop/lzop-1.03.ebuild b/app-arch/lzop/lzop-1.03.ebuild
new file mode 100644
index 000000000000..20f76fe999ec
--- /dev/null
+++ b/app-arch/lzop/lzop-1.03.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Utility for fast (even real-time) compression/decompression"
+HOMEPAGE="http://www.lzop.org/"
+SRC_URI="http://www.lzop.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=">=dev-libs/lzo-2"
+DEPEND="${RDEPEND}"
+
+src_test() {
+ einfo "compressing config.status to test"
+ src/lzop config.status || die 'compression failed'
+ ls -la config.status{,.lzo}
+ src/lzop -t config.status.lzo || die 'lzo test failed'
+ src/lzop -dc config.status.lzo | diff config.status - || die 'decompression generated differences from original'
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+ dodoc doc/lzop.{txt,ps}
+ dohtml doc/*.html
+}
diff --git a/app-arch/lzop/metadata.xml b/app-arch/lzop/metadata.xml
new file mode 100644
index 000000000000..caaa4ac67bad
--- /dev/null
+++ b/app-arch/lzop/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>binki@gentoo.org</email>
+ <name>Nathan Phillip Brink</name>
+</maintainer>
+<longdescription></longdescription>
+</pkgmetadata>
diff --git a/app-arch/makeself/Manifest b/app-arch/makeself/Manifest
new file mode 100644
index 000000000000..63bd7c560dcb
--- /dev/null
+++ b/app-arch/makeself/Manifest
@@ -0,0 +1,2 @@
+DIST makeself-2.1.5.run 38210 SHA256 8227668bb35c34d86e6f0fe69c7bf4bd2813f51edfcbfc227896b4787b0a1a4e SHA512 c556770deea504573c50bc7c15340ed91c65d372e93c47dfc10fd6e8265b2462842da12b36898d4291cbac9e954ec12f2f6972bcf40e97ed82dbd22af21d3a91 WHIRLPOOL 6e6be1c047238280f737611049af7daa0902b52e7d065033f7ead665614da809bc1f5903b6163c768f191bf7e0ced566ac6168ab6fc5604bc1d2fed8dac72e37
+DIST release-2.2.0.tar.gz 21640 SHA256 9c9d003e097d9c198433a05926e64d9b7cd330c7f10cb4e6048877d0a87de341 SHA512 11cd536baed2d56405103f18a8318a202092755a74baf10730aa58dc57032e327697b1c7f76bf9bf438927093ba9ac467ffa0c4564c7f6b1d3b2b3936f34fa73 WHIRLPOOL ec9d7caa4ffed938e61e756636af04cf793158761c3a2b41e7ee4c18a415d6a41a4ed4499bd0b867dee930f281f901a80082bed75d9e9d7e237f3f85ad7ea590
diff --git a/app-arch/makeself/files/makeself-2.2.0-help-header.patch b/app-arch/makeself/files/makeself-2.2.0-help-header.patch
new file mode 100644
index 000000000000..5726bf55f7da
--- /dev/null
+++ b/app-arch/makeself/files/makeself-2.2.0-help-header.patch
@@ -0,0 +1,124 @@
+From c9f605cb4a3903985f2c6f816c30c1edf728c1b5 Mon Sep 17 00:00:00 2001
+From: Jon Salz <jsalz@google.com>
+Date: Mon, 27 Jan 2014 16:04:33 +0800
+Subject: [PATCH] Add --help-header option to prepend a string to the archive's
+ --help.
+
+---
+ makeself-header.sh | 3 ++-
+ makeself.sh | 71 ++++++++++++++++++++++++++++++------------------------
+ 2 files changed, 41 insertions(+), 33 deletions(-)
+
+diff --git a/makeself-header.sh b/makeself-header.sh
+index e3f6c11..f97758c 100755
+--- a/makeself-header.sh
++++ b/makeself-header.sh
+@@ -13,6 +13,7 @@ label="$LABEL"
+ script="$SCRIPT"
+ scriptargs="$SCRIPTARGS"
+ licensetxt="$LICENSE"
++helpheader='$HELPHEADER'
+ targetdir="$archdirname"
+ filesizes="$filesizes"
+ keep="$KEEP"
+@@ -119,7 +120,7 @@ MS_dd_Progress()
+ MS_Help()
+ {
+ cat << EOH >&2
+-Makeself version $MS_VERSION
++\${helpheader}Makeself version $MS_VERSION
+ 1) Getting help or info about \$0 :
+ \$0 --help Print this message
+ \$0 --info Print embedded info : title, default target directory, embedded script ...
+diff --git a/makeself.sh b/makeself.sh
+index 361d710..cb2d6f2 100755
+--- a/makeself.sh
++++ b/makeself.sh
+@@ -88,38 +88,39 @@ MS_Usage()
+ {
+ echo "Usage: $0 [params] archive_dir file_name label startup_script [args]"
+ echo "params can be one or more of the following :"
+- echo " --version | -v : Print out Makeself version number and exit"
+- echo " --help | -h : Print out this help message"
+- echo " --quiet | -q : Do not print any messages other than errors."
+- echo " --gzip : Compress using gzip (default if detected)"
+- echo " --bzip2 : Compress using bzip2 instead of gzip"
+- echo " --pbzip2 : Compress using pbzip2 instead of gzip"
+- echo " --xz : Compress using xz instead of gzip"
+- echo " --compress : Compress using the UNIX 'compress' command"
+- echo " --complevel lvl : Compression level for gzip xz bzip2 and pbzip2 (default 9)"
+- echo " --base64 : Instead of compressing, encode the data using base64"
+- echo " --nocomp : Do not compress the data"
+- echo " --notemp : The archive will create archive_dir in the"
+- echo " current directory and uncompress in ./archive_dir"
+- echo " --copy : Upon extraction, the archive will first copy itself to"
+- echo " a temporary directory"
+- echo " --append : Append more files to an existing Makeself archive"
+- echo " The label and startup scripts will then be ignored"
+- echo " --target dir : Extract directly to a target directory"
+- echo " directory path can be either absolute or relative"
+- echo " --current : Files will be extracted to the current directory"
+- echo " Both --current and --target imply --notemp"
+- echo " --tar-extra opt : Append more options to the tar command line"
+- echo " --nomd5 : Don't calculate an MD5 for archive"
+- echo " --nocrc : Don't calculate a CRC for archive"
+- echo " --header file : Specify location of the header script"
+- echo " --follow : Follow the symlinks in the archive"
+- echo " --noprogress : Do not show the progress during the decompression"
+- echo " --nox11 : Disable automatic spawn of a xterm"
+- echo " --nowait : Do not wait for user input after executing embedded"
+- echo " program from an xterm"
+- echo " --lsm file : LSM file describing the package"
+- echo " --license file : Append a license file"
++ echo " --version | -v : Print out Makeself version number and exit"
++ echo " --help | -h : Print out this help message"
++ echo " --quiet | -q : Do not print any messages other than errors."
++ echo " --gzip : Compress using gzip (default if detected)"
++ echo " --bzip2 : Compress using bzip2 instead of gzip"
++ echo " --pbzip2 : Compress using pbzip2 instead of gzip"
++ echo " --xz : Compress using xz instead of gzip"
++ echo " --compress : Compress using the UNIX 'compress' command"
++ echo " --complevel lvl : Compression level for gzip xz bzip2 and pbzip2 (default 9)"
++ echo " --base64 : Instead of compressing, encode the data using base64"
++ echo " --nocomp : Do not compress the data"
++ echo " --notemp : The archive will create archive_dir in the"
++ echo " current directory and uncompress in ./archive_dir"
++ echo " --copy : Upon extraction, the archive will first copy itself to"
++ echo " a temporary directory"
++ echo " --append : Append more files to an existing Makeself archive"
++ echo " The label and startup scripts will then be ignored"
++ echo " --target dir : Extract directly to a target directory"
++ echo " directory path can be either absolute or relative"
++ echo " --current : Files will be extracted to the current directory"
++ echo " Both --current and --target imply --notemp"
++ echo " --tar-extra opt : Append more options to the tar command line"
++ echo " --nomd5 : Don't calculate an MD5 for archive"
++ echo " --nocrc : Don't calculate a CRC for archive"
++ echo " --header file : Specify location of the header script"
++ echo " --follow : Follow the symlinks in the archive"
++ echo " --noprogress : Do not show the progress during the decompression"
++ echo " --nox11 : Disable automatic spawn of a xterm"
++ echo " --nowait : Do not wait for user input after executing embedded"
++ echo " program from an xterm"
++ echo " --lsm file : LSM file describing the package"
++ echo " --license file : Append a license file"
++ echo " --help-header file : Add a header to the archive's --help output"
+ echo
+ echo "Do not forget to give a fully qualified startup script name"
+ echo "(i.e. with a ./ prefix if inside the archive)."
+@@ -254,6 +255,12 @@ do
+ LSM_CMD="cat \"$2\" >> \"\$archname\""
+ if ! shift 2; then MS_Help; exit 1; fi
+ ;;
++ --help-header)
++ HELPHEADER=`sed -e "s/'/'\\\\\''/g" $2`
++ if ! shift 2; then MS_Help; exit 1; fi
++ [ -n "$HELPHEADER" ] && HELPHEADER="$HELPHEADER
++"
++ ;;
+ -q | --quiet)
+ QUIET=y
+ shift
+--
+1.8.5.5
+
diff --git a/app-arch/makeself/files/makeself-unpack b/app-arch/makeself/files/makeself-unpack
new file mode 100755
index 000000000000..90b98312c8b9
--- /dev/null
+++ b/app-arch/makeself/files/makeself-unpack
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+# Glue to keep unpack_makeself() unchanged
+source /lib/gentoo/functions.sh
+find_unpackable_file() { echo "$@"; }
+debug-print() { :; }
+emktemp() { mktemp "$@"; }
+die() { eerror "$*"; exit 1; }
+assert() { _pipestatus="${PIPESTATUS[*]}"; [[ "${_pipestatus// /}" -eq 0 ]] || die; }
+
+# Straight copied from unpacker.eclass ... should be kept in sync
+
+unpack_banner() {
+ echo ">>> Unpacking ${1##*/} to ${PWD}"
+}
+
+unpack_makeself() {
+ local src_input=${1:-${A}}
+ local src=$(find_unpackable_file "${src_input}")
+ local skip=$2
+ local exe=$3
+
+ [[ -z ${src} ]] && die "Could not locate source for '${src_input}'"
+
+ unpack_banner "${src}"
+
+ if [[ -z ${skip} ]] ; then
+ local ver=$(grep -m1 -a '#.*Makeself' "${src}" | awk '{print $NF}')
+ local skip=0
+ exe=tail
+ case ${ver} in
+ 1.5.*|1.6.0-nv*) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same
+ skip=$(grep -a ^skip= "${src}" | cut -d= -f2)
+ ;;
+ 2.0|2.0.1)
+ skip=$(grep -a ^$'\t'tail "${src}" | awk '{print $2}' | cut -b2-)
+ ;;
+ 2.1.1)
+ skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-)
+ (( skip++ ))
+ ;;
+ 2.1.2)
+ skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1)
+ (( skip++ ))
+ ;;
+ 2.1.3)
+ skip=`grep -a ^offset= "${src}" | awk '{print $3}'`
+ (( skip++ ))
+ ;;
+ 2.1.4|2.1.5|2.1.6|2.2.0)
+ skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1)
+ skip=$(head -n ${skip} "${src}" | wc -c)
+ exe="dd"
+ ;;
+ *)
+ eerror "I'm sorry, but I was unable to support the Makeself file."
+ eerror "The version I detected was '${ver}'."
+ eerror "Please file a bug about the file ${src##*/} at"
+ eerror "http://bugs.gentoo.org/ so that support can be added."
+ die "makeself version '${ver}' not supported"
+ ;;
+ esac
+ debug-print "Detected Makeself version ${ver} ... using ${skip} as offset"
+ fi
+ case ${exe} in
+ tail) exe="tail -n +${skip} '${src}'";;
+ dd) exe="dd ibs=${skip} skip=1 if='${src}'";;
+ *) die "makeself cant handle exe '${exe}'"
+ esac
+
+ # lets grab the first few bytes of the file to figure out what kind of archive it is
+ local filetype tmpfile=$(emktemp)
+ eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
+ filetype=$(file -b "${tmpfile}") || die
+ case ${filetype} in
+ *tar\ archive*)
+ eval ${exe} | tar --no-same-owner -xf -
+ ;;
+ bzip2*)
+ eval ${exe} | bzip2 -dc | tar --no-same-owner -xf -
+ ;;
+ gzip*)
+ eval ${exe} | tar --no-same-owner -xzf -
+ ;;
+ compress*)
+ eval ${exe} | gunzip | tar --no-same-owner -xf -
+ ;;
+ XZ*)
+ eval ${exe} | unxz | tar --no-same-owner -xf -
+ ;;
+ *)
+ eerror "Unknown filetype \"${filetype}\" ?"
+ false
+ ;;
+ esac
+ assert "failure unpacking (${filetype}) makeself ${src##*/} ('${ver}' +${skip})"
+ rm "${tmpfile}"
+}
+
+for x; do unpack_makeself "$x" ; done
diff --git a/app-arch/makeself/makeself-2.1.5-r2.ebuild b/app-arch/makeself/makeself-2.1.5-r2.ebuild
new file mode 100644
index 000000000000..d549794f45dc
--- /dev/null
+++ b/app-arch/makeself/makeself-2.1.5-r2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit unpacker
+
+DESCRIPTION="shell script that generates a self-extractible tar.gz"
+HOMEPAGE="http://www.megastep.org/makeself/"
+SRC_URI="http://www.megastep.org/makeself/${P}.run"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="sys-apps/gentoo-functions"
+
+S=${WORKDIR}
+
+src_install() {
+ dobin makeself-header.sh makeself.sh "${FILESDIR}"/makeself-unpack || die
+ dosym makeself.sh /usr/bin/makeself
+ doman makeself.1
+ dodoc README TODO makeself.lsm
+}
diff --git a/app-arch/makeself/makeself-2.2.0-r1.ebuild b/app-arch/makeself/makeself-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..4425311a13f2
--- /dev/null
+++ b/app-arch/makeself/makeself-2.2.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit unpacker eutils
+
+DESCRIPTION="shell script that generates a self-extractible tar.gz"
+HOMEPAGE="http://www.megastep.org/makeself/"
+SRC_URI="https://github.com/megastep/makeself/archive/release-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="sys-apps/gentoo-functions"
+
+S="${WORKDIR}/${PN}-release-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-help-header.patch
+}
+
+src_install() {
+ dobin makeself-header.sh makeself.sh "${FILESDIR}"/makeself-unpack
+ dosym makeself.sh /usr/bin/makeself
+ doman makeself.1
+ dodoc README.md makeself.lsm
+}
diff --git a/app-arch/makeself/metadata.xml b/app-arch/makeself/metadata.xml
new file mode 100644
index 000000000000..8e10bd749ec4
--- /dev/null
+++ b/app-arch/makeself/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">megastep/makeself</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/metadata.xml b/app-arch/metadata.xml
new file mode 100644
index 000000000000..72ecbb92d2e3
--- /dev/null
+++ b/app-arch/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The app-arch category contains tools for archiving, compressing and
+ uncompressing files or groups of files.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie app-arch enthält Werkzeuge für das Archivieren, Packen und
+ Entpacken von Dateien oder Gruppen von Dateien.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría app-arch contiene herramientas para archivar, comprimir
+ y descomprimir archivos ó grupos de archivos.
+ </longdescription>
+ <longdescription lang="ja">
+ app-archカテゴリにはファイルをアーカイブする、圧縮する、解凍する
+ ツールが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ The app-arch categorie bevat applicaties met betrekking tot het
+ archiveren en comprimeren van bestanden.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm app-arch chứa những công cụ để lưu trữ, nén và
+ giải nén các tập tin hoặc nhóm các tập tin.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria app-arch contiene strumenti di archiviazione, compressione e decompressione di file o gruppi di files.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria app-arch contém ferramentas para arquivar, comprimir
+ e descomprimir arquivos ou grupos de arquivos.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria app-arch zawiera narzędzia służące do archiwizowania,
+ kompresji i dekompresji zarówno pojedynczych plików jak i ich grup.
+ </longdescription>
+</catmetadata>
+
diff --git a/app-arch/mscompress/Manifest b/app-arch/mscompress/Manifest
new file mode 100644
index 000000000000..1775c9af373d
--- /dev/null
+++ b/app-arch/mscompress/Manifest
@@ -0,0 +1 @@
+DIST mscompress-0.3.tar.bz2 40989 SHA256 cdc3bf66865da9700d5f52a06602dfe3f9a6510bc53b97342957b1d71f026b77 SHA512 e69a95e9c12979e852227553028b578f324ec38472ead11f9c0cce85b77bc817ea39d5ecf74599c7935c692eaac537456ebefe110400514a3c834b12597dde14 WHIRLPOOL 9481d1ac9b3a211f578e41f6e195604bb691488aa9567f33c8556cf7b3d1ed620d189040c6b4990b2960b2a3899076ff375b6584ce358bd60aa66ca711f64500
diff --git a/app-arch/mscompress/files/mscompress-0.3-amd64.patch b/app-arch/mscompress/files/mscompress-0.3-amd64.patch
new file mode 100644
index 000000000000..95e4e617aefc
--- /dev/null
+++ b/app-arch/mscompress/files/mscompress-0.3-amd64.patch
@@ -0,0 +1,24 @@
+--- mscompress.c.old 2006-11-27 23:58:51.000000000 +0100
++++ mscompress.c 2006-11-27 23:59:50.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <string.h>
++#include <stdint.h>
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+ #else
+@@ -156,10 +157,10 @@
+ int ch, i, run, len, match, size, mask;
+ char buf[17];
+ struct stat st;
+- unsigned long magic1;
+- unsigned long magic2;
++ uint32_t magic1;
++ uint32_t magic2;
+ unsigned short magic3;
+- unsigned long filesize;
++ uint32_t filesize;
+
+ /* 28.5 kB */
+ buffer = malloc (N + F + (N + 1 + N + N + 256) * sizeof (int));
diff --git a/app-arch/mscompress/files/mscompress-0.3-makefile.patch b/app-arch/mscompress/files/mscompress-0.3-makefile.patch
new file mode 100644
index 000000000000..21c38155082e
--- /dev/null
+++ b/app-arch/mscompress/files/mscompress-0.3-makefile.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.in 2004-04-14 07:48:23.088418656 +0000
++++ b/Makefile.in 2004-04-14 07:48:38.233116312 +0000
+@@ -37,7 +37,7 @@
+ bzip2 -9f $(OUTDIR)/mscompress-$(VERS)-$(OSTYPE).tar
+
+ mscompress: mscompress.o version.o
+- $(CC) -o mscompress mscompress.o version.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o mscompress mscompress.o version.o
+
+ msexpand: msexpand.o version.o
+- $(CC) -o msexpand msexpand.o version.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o msexpand msexpand.o version.o
diff --git a/app-arch/mscompress/metadata.xml b/app-arch/mscompress/metadata.xml
new file mode 100644
index 000000000000..ab7361f77088
--- /dev/null
+++ b/app-arch/mscompress/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <longdescription lang="en">
+ A (de)compressor for microsoft's compress.exe and expand.exe functions.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/mscompress/mscompress-0.3-r1.ebuild b/app-arch/mscompress/mscompress-0.3-r1.ebuild
new file mode 100644
index 000000000000..14bfdf0a544b
--- /dev/null
+++ b/app-arch/mscompress/mscompress-0.3-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Microsoft compress.exe/expand.exe compatible (de)compressor"
+HOMEPAGE="http://gnuwin32.sourceforge.net/packages/mscompress.htm"
+SRC_URI="ftp://ftp.penguin.cz/pub/users/mhi/mscompress/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ppc ~ppc64 x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-amd64.patch
+}
+
+src_configure() {
+ tc-export CC
+ [[ $(tc-arch) == ppc* ]] && append-flags -fsigned-char
+ econf
+}
+
+src_install() {
+ dobin mscompress msexpand || die
+ doman mscompress.1 msexpand.1
+ dodoc README ChangeLog
+}
diff --git a/app-arch/mt-st/Manifest b/app-arch/mt-st/Manifest
new file mode 100644
index 000000000000..f7817f97347a
--- /dev/null
+++ b/app-arch/mt-st/Manifest
@@ -0,0 +1 @@
+DIST mt-st-1.1.tar.gz 35749 SHA256 945cb4f3d9957dabe768f5941a9148b746396836c797b25f020c84319ba8170d SHA512 5fd11c430219c9c2d98f7567433a59c689e6f1bf9a2aaa13eb8df58569c1d70417965a4a62b5c9d0fc7e4e520ecb8d745911d18c3e2652c6aaedb94850743fdb WHIRLPOOL 17f76ec85a0506bd7973cf3733ef091eb63f422cdf0057c11582f675e08d6aca1f531bbc824d4d4f8950431bbc87e246e90024f0b1f2ee43549802b56e7e31f8
diff --git a/app-arch/mt-st/metadata.xml b/app-arch/mt-st/metadata.xml
new file mode 100644
index 000000000000..52363bff0cba
--- /dev/null
+++ b/app-arch/mt-st/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/mt-st/mt-st-1.1.ebuild b/app-arch/mt-st/mt-st-1.1.ebuild
new file mode 100644
index 000000000000..af2173272118
--- /dev/null
+++ b/app-arch/mt-st/mt-st-1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="control magnetic tape drive operation"
+HOMEPAGE="http://www.ibiblio.org/pub/linux/system/backup/"
+SRC_URI="http://www.ibiblio.org/pub/linux/system/backup/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+src_prepare() {
+ sed -i -e "s:-O2:${CFLAGS}:g" Makefile
+}
+
+src_compile() {
+ # Builds straight from .c to final binary
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" || die
+}
+
+src_install() {
+ dosbin mt stinit || die
+ doman mt.1 stinit.8
+ dodoc README* stinit.def.examples
+}
diff --git a/app-arch/ncompress/Manifest b/app-arch/ncompress/Manifest
new file mode 100644
index 000000000000..2e704de73459
--- /dev/null
+++ b/app-arch/ncompress/Manifest
@@ -0,0 +1,2 @@
+DIST ncompress-4.2.4.3.tar.gz 32473 SHA256 d410210742ee85470135b1d49dad17086d4e2565b3914a83dc6e0b1e588f84f8 SHA512 261156061852b79f2f6bee3ffe8423dcd540e038f1dfdb9f2dc16d1de691982cfef8a196d69dad4507ed525d787b6f1d3fdef2827f29935bdbb75a5f30f89963 WHIRLPOOL 8926e93ebce0a85e2a4f71c1d0f848a4e616fb645c5021a1119d12af74ad0c89addf5dfb499067fb307e6c52ae5a3bc7ebb11886236f1d4b656890502c614812
+DIST ncompress-4.2.4.4.tar.gz 32571 SHA256 b00ba28d3f332b38aa75478a15c1b789957aa6c02d6453471f452c0ec3e6517a SHA512 abc7bd96daaab0b83d5ca18ef4b8b4c6528632653a0882a4e0eda4fb3f99e23aae60ee30193e79104ea2ac8fb5816ac3b0bdebb08322db6bde6b8ef1639527be WHIRLPOOL 8050829ca7010f9a8cd777e9d628c2d1f12205325db3aafb4d11eb9efb9839fa026366803306907fdbfc9fbfc29693c47317535ede220c784fc934fbe121c42f
diff --git a/app-arch/ncompress/metadata.xml b/app-arch/ncompress/metadata.xml
new file mode 100644
index 000000000000..5ab5d334a23a
--- /dev/null
+++ b/app-arch/ncompress/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">ncompress</remote-id>
+ <remote-id type="github">vapier/ncompress</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/ncompress/ncompress-4.2.4.3.ebuild b/app-arch/ncompress/ncompress-4.2.4.3.ebuild
new file mode 100644
index 000000000000..d3934ac01894
--- /dev/null
+++ b/app-arch/ncompress/ncompress-4.2.4.3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Another uncompressor for compatibility"
+HOMEPAGE="https://github.com/vapier/ncompress"
+SRC_URI="mirror://sourceforge/ncompress/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dobin compress || die
+ dosym compress /usr/bin/uncompress
+ doman compress.1
+ echo '.so compress.1' > "${D}"/usr/share/man/man1/uncompress.1
+ dodoc Acknowleds Changes LZW.INFO README
+}
diff --git a/app-arch/ncompress/ncompress-4.2.4.4.ebuild b/app-arch/ncompress/ncompress-4.2.4.4.ebuild
new file mode 100644
index 000000000000..97d2ea0267a3
--- /dev/null
+++ b/app-arch/ncompress/ncompress-4.2.4.4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Another uncompressor for compatibility"
+HOMEPAGE="https://github.com/vapier/ncompress"
+SRC_URI="mirror://sourceforge/ncompress/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+src_compile() {
+ tc-export CC
+ emake
+}
+
+src_install() {
+ dobin compress
+ dosym compress /usr/bin/uncompress
+ doman compress.1
+ echo '.so compress.1' > "${ED}"/usr/share/man/man1/uncompress.1
+ dodoc Acknowleds Changes LZW.INFO README
+}
diff --git a/app-arch/p7zip/Manifest b/app-arch/p7zip/Manifest
new file mode 100644
index 000000000000..44c4c6179ae4
--- /dev/null
+++ b/app-arch/p7zip/Manifest
@@ -0,0 +1,2 @@
+DIST p7zip_9.20.1_src_all.tar.bz2 3835235 SHA256 49557e7ffca08100f9fc687f4dfc5aea703ca207640c76d9dee7b66f03cb4782 SHA512 7bb8a276aaefc4a83364e45633c48527de44c6b1205344f3356db570582f30f81d82a94938c99a7ad193587b584cc1c03219c28249de40018bdaee6c3b2a022a WHIRLPOOL cb20f37d3f796931a9b330728aa7148afe98bbf8a49bb91bfd80e4667c16416206b23bf34298e9ec37825e8b43f92a5710f0cea1f974296d5c17aa2c7b0931f3
+DIST p7zip_9.38.1_src_all.tar.bz2 3917925 SHA256 fd5019109c9a1bf34ad3257d37a6853eae8151ff50345f0a3ffba7d8c5fdb995 SHA512 f524ffae54e0d9563a509cc4b243e830d882a925e682eb2e15e2d19cb72c947fddecd72c8507d6c1538b997b240b0827046fc2fb4f5e3f7d49840257c92b9c04 WHIRLPOOL 6bad1cde056ab1e8db4079c0e649665fbc7e6b9a565261188bd0acaec6c583d8bd9425cb26d39315408d0180ba0be0069a77b704633cf05ec855220cb31f1c24
diff --git a/app-arch/p7zip/files/9.04-makefile.patch b/app-arch/p7zip/files/9.04-makefile.patch
new file mode 100644
index 000000000000..93a99cc9014f
--- /dev/null
+++ b/app-arch/p7zip/files/9.04-makefile.patch
@@ -0,0 +1,19 @@
+--- p7zip_9.04/CPP/7zip/Bundles/Format7zFree/makefile.orig 2010-01-04 13:58:54.527887746 +0100
++++ p7zip_9.04/CPP/7zip/Bundles/Format7zFree/makefile 2010-01-04 13:59:10.290868343 +0100
+@@ -247,8 +247,6 @@
+ MyAes.o \
+ Pbkdf2HmacSha1.o \
+ RandGen.o \
+- Rar20Crypto.o \
+- RarAes.o \
+ Sha1.o \
+ WzAes.o \
+ ZipCrypto.o \
+@@ -298,7 +296,6 @@
+ $(HFS_OBJS) \
+ $(ISO_OBJS) \
+ $(NSIS_OBJS) \
+- $(RAR_OBJS) \
+ $(TAR_OBJS) \
+ $(UDF_OBJS) \
+ $(WIM_OBJS) \
diff --git a/app-arch/p7zip/files/p7zip b/app-arch/p7zip/files/p7zip
new file mode 100644
index 000000000000..9aaf078cbe00
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip
@@ -0,0 +1,73 @@
+#!/bin/bash
+# gzip-like CLI wrapper for p7zip
+set -e
+
+compress=true
+file=
+
+usage ()
+ {
+ echo "Usage: $0 [-d] [-h|--help] [file]"
+ exit 1
+ }
+
+while [ "$#" != "0" ] ; do
+ case "$1" in
+ -d) compress=false ;;
+ -c) echo "$0: ignoring $1 option (not yet implemented)" ;;
+ -h|--help) usage ;;
+ *)
+ if [ "${file}" = "" ] ; then
+ file="$1"
+ else
+ usage
+ fi
+ ;;
+ esac
+ shift
+done
+
+# make sure they're present, before we screw up
+for i in mktemp 7z rm cat tty ; do
+ if ! which $i > /dev/null ; then
+ echo "$0: $i: command not found"
+ exit 1
+ fi
+done
+
+if [ "${file}" != "" ] ; then
+ if ${compress} ; then
+ 7z a ${file}.7z ${file}
+ rm ${file}
+ else
+ case ${file} in
+ *.7z)
+ 7z x ${file}
+ rm ${file}
+ ;;
+ *)
+ echo "$0: ${file}: unknown suffix -- ignored"
+ ;;
+ esac
+ fi
+ exit 0
+fi
+
+tmp=`mktemp`
+trap "rm -f ${tmp}" 0
+
+if ${compress} ; then
+ if tty > /dev/null ; then
+ echo "$0: compressed data not written to a terminal."
+ echo "For help, type: $0 -h"
+ exit 1
+ fi
+ rm -f ${tmp}
+ 7z a ${tmp} -si >/dev/null
+ cat ${tmp}
+else
+ cat > ${tmp}
+ 7z x ${tmp} -so 2>/dev/null | cat
+fi
+
+rm -f ${tmp}
diff --git a/app-arch/p7zip/files/p7zip-9.20.1-CVE-2015-1038.patch b/app-arch/p7zip/files/p7zip-9.20.1-CVE-2015-1038.patch
new file mode 100644
index 000000000000..09dd0f29cce7
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.20.1-CVE-2015-1038.patch
@@ -0,0 +1,315 @@
+Author: Ben Hutchings <ben@decadent.org.uk>
+Date: Tue, 19 May 2015 02:38:40 +0100
+Description: Delay creation of symlinks to prevent arbitrary file writes (CVE-2015-1038)
+Bug: http://sourceforge.net/p/p7zip/bugs/147/
+Bug-Debian: https://bugs.debian.org/774660
+
+Alexander Cherepanov discovered that 7zip is susceptible to a
+directory traversal vulnerability. While extracting an archive, it
+will extract symlinks and then follow them if they are referenced in
+further entries. This can be exploited by a rogue archive to write
+files outside the current directory.
+
+We have to create placeholder files (which we already do) and delay
+creating symlinks until the end of extraction.
+
+Due to the possibility of anti-items (deletions) in the archive, it is
+possible for placeholders to be deleted and replaced before we create
+the symlinks. It's not clear that this can be used for mischief, but
+GNU tar guards against similar problems by checking that the placeholder
+still exists and is the same inode. XXX It also checks 'birth time' but
+this isn't portable. We can probably get away with comparing ctime
+since we don't support hard links.
+
+--- a/CPP/7zip/UI/Agent/Agent.cpp
++++ b/CPP/7zip/UI/Agent/Agent.cpp
+@@ -424,6 +424,8 @@ STDMETHODIMP CAgentFolder::Extract(const
+ CMyComPtr<IArchiveExtractCallback> extractCallback = extractCallbackSpec;
+ UStringVector pathParts;
+ CProxyFolder *currentProxyFolder = _proxyFolderItem;
++ HRESULT res;
++
+ while (currentProxyFolder->Parent)
+ {
+ pathParts.Insert(0, currentProxyFolder->Name);
+@@ -445,8 +447,11 @@ STDMETHODIMP CAgentFolder::Extract(const
+ (UInt64)(Int64)-1);
+ CUIntVector realIndices;
+ GetRealIndices(indices, numItems, realIndices);
+- return _agentSpec->GetArchive()->Extract(&realIndices.Front(),
++ res = _agentSpec->GetArchive()->Extract(&realIndices.Front(),
+ realIndices.Size(), testMode, extractCallback);
++ if (res == S_OK && !extractCallbackSpec->CreateSymLinks())
++ res = E_FAIL;
++ return res;
+ COM_TRY_END
+ }
+
+--- a/CPP/7zip/UI/Agent/ArchiveFolder.cpp
++++ b/CPP/7zip/UI/Agent/ArchiveFolder.cpp
+@@ -20,6 +20,8 @@ STDMETHODIMP CAgentFolder::CopyTo(const
+ CMyComPtr<IArchiveExtractCallback> extractCallback = extractCallbackSpec;
+ UStringVector pathParts;
+ CProxyFolder *currentProxyFolder = _proxyFolderItem;
++ HRESULT res;
++
+ while (currentProxyFolder->Parent)
+ {
+ pathParts.Insert(0, currentProxyFolder->Name);
+@@ -46,8 +48,11 @@ STDMETHODIMP CAgentFolder::CopyTo(const
+ (UInt64)(Int64)-1);
+ CUIntVector realIndices;
+ GetRealIndices(indices, numItems, realIndices);
+- return _agentSpec->GetArchive()->Extract(&realIndices.Front(),
++ res = _agentSpec->GetArchive()->Extract(&realIndices.Front(),
+ realIndices.Size(), BoolToInt(false), extractCallback);
++ if (res == S_OK && !extractCallbackSpec->CreateSymLinks())
++ res = E_FAIL;
++ return res;
+ COM_TRY_END
+ }
+
+--- a/CPP/7zip/UI/Client7z/Client7z.cpp
++++ b/CPP/7zip/UI/Client7z/Client7z.cpp
+@@ -197,8 +197,11 @@ private:
+ COutFileStream *_outFileStreamSpec;
+ CMyComPtr<ISequentialOutStream> _outFileStream;
+
++ CObjectVector<NWindows::NFile::NDirectory::CDelayedSymLink> _delayedSymLinks;
++
+ public:
+ void Init(IInArchive *archiveHandler, const UString &directoryPath);
++ bool CreateSymLinks();
+
+ UInt64 NumErrors;
+ bool PasswordIsDefined;
+@@ -392,11 +395,22 @@ STDMETHODIMP CArchiveExtractCallback::Se
+ }
+ _outFileStream.Release();
+ if (_extractMode && _processedFileInfo.AttribDefined)
+- NFile::NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attrib);
++ NFile::NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attrib, &_delayedSymLinks);
+ PrintNewLine();
+ return S_OK;
+ }
+
++bool CArchiveExtractCallback::CreateSymLinks()
++{
++ bool success = true;
++
++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
++ success &= _delayedSymLinks[i].Create();
++
++ _delayedSymLinks.Clear();
++
++ return success;
++}
+
+ STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
+ {
+--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
+@@ -453,12 +453,24 @@ STDMETHODIMP CArchiveExtractCallback::Se
+ NumFiles++;
+
+ if (_extractMode && _fi.AttribDefined)
+- NFile::NDirectory::MySetFileAttributes(_diskFilePath, _fi.Attrib);
++ NFile::NDirectory::MySetFileAttributes(_diskFilePath, _fi.Attrib, &_delayedSymLinks);
+ RINOK(_extractCallback2->SetOperationResult(operationResult, _encrypted));
+ return S_OK;
+ COM_TRY_END
+ }
+
++bool CArchiveExtractCallback::CreateSymLinks()
++{
++ bool success = true;
++
++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
++ success &= _delayedSymLinks[i].Create();
++
++ _delayedSymLinks.Clear();
++
++ return success;
++}
++
+ /*
+ STDMETHODIMP CArchiveExtractCallback::GetInStream(
+ const wchar_t *name, ISequentialInStream **inStream)
+--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.h
++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.h
+@@ -6,6 +6,8 @@
+ #include "Common/MyCom.h"
+ #include "Common/Wildcard.h"
+
++#include "Windows/FileDir.h"
++
+ #include "../../IPassword.h"
+
+ #include "../../Common/FileStreams.h"
+@@ -83,6 +85,8 @@ class CArchiveExtractCallback:
+ UInt64 _packTotal;
+ UInt64 _unpTotal;
+
++ CObjectVector<NWindows::NFile::NDirectory::CDelayedSymLink> _delayedSymLinks;
++
+ void CreateComplexDirectory(const UStringVector &dirPathParts, UString &fullPath);
+ HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
+ HRESULT GetUnpackSize();
+@@ -138,6 +142,7 @@ public:
+ const UStringVector &removePathParts,
+ UInt64 packSize);
+
++ bool CreateSymLinks();
+ };
+
+ #endif
+--- a/CPP/7zip/UI/Common/Extract.cpp
++++ b/CPP/7zip/UI/Common/Extract.cpp
+@@ -96,6 +96,9 @@ static HRESULT DecompressArchive(
+ else
+ result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, extractCallbackSpec);
+
++ if (result == S_OK && !extractCallbackSpec->CreateSymLinks())
++ result = E_FAIL;
++
+ return callback->ExtractResult(result);
+ }
+
+--- a/CPP/Windows/FileDir.cpp
++++ b/CPP/Windows/FileDir.cpp
+@@ -453,9 +453,10 @@ bool SetDirTime(LPCWSTR fileName, const
+ }
+
+ #ifndef _UNICODE
+-bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes)
++bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks)
+ {
+- return MySetFileAttributes(UnicodeStringToMultiByte(fileName, CP_ACP), fileAttributes);
++ return MySetFileAttributes(UnicodeStringToMultiByte(fileName, CP_ACP), fileAttributes, delayedSymLinks);
+ }
+
+ bool MyRemoveDirectory(LPCWSTR pathName)
+@@ -488,7 +489,8 @@ static int convert_to_symlink(const char
+ return -1;
+ }
+
+-bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes)
++bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks)
+ {
+ if (!fileName) {
+ SetLastError(ERROR_PATH_NOT_FOUND);
+@@ -520,7 +522,9 @@ bool MySetFileAttributes(LPCTSTR fileNam
+ stat_info.st_mode = fileAttributes >> 16;
+ #ifdef ENV_HAVE_LSTAT
+ if (S_ISLNK(stat_info.st_mode)) {
+- if ( convert_to_symlink(name) != 0) {
++ if (delayedSymLinks)
++ delayedSymLinks->Add(CDelayedSymLink(name));
++ else if ( convert_to_symlink(name) != 0) {
+ TRACEN((printf("MySetFileAttributes(%s,%d) : false-3\n",name,fileAttributes)))
+ return false;
+ }
+@@ -924,4 +928,41 @@ bool CTempDirectory::Create(LPCTSTR pref
+ }
+
+
++#ifdef ENV_UNIX
++
++CDelayedSymLink::CDelayedSymLink(LPCSTR source)
++ : _source(source)
++{
++ struct stat st;
++
++ if (lstat(_source, &st) == 0) {
++ _dev = st.st_dev;
++ _ino = st.st_ino;
++ } else {
++ _dev = 0;
++ }
++}
++
++bool CDelayedSymLink::Create()
++{
++ struct stat st;
++
++ if (_dev == 0) {
++ errno = EPERM;
++ return false;
++ }
++ if (lstat(_source, &st) != 0)
++ return false;
++ if (_dev != st.st_dev || _ino != st.st_ino) {
++ // Placeholder file has been overwritten or moved by another
++ // symbolic link creation
++ errno = EPERM;
++ return false;
++ }
++
++ return convert_to_symlink(_source) == 0;
++}
++
++#endif // ENV_UNIX
++
+ }}}
+--- a/CPP/Windows/FileDir.h
++++ b/CPP/Windows/FileDir.h
+@@ -4,6 +4,7 @@
+ #define __WINDOWS_FILEDIR_H
+
+ #include "../Common/MyString.h"
++#include "../Common/MyVector.h"
+ #include "Defs.h"
+
+ /* GetFullPathName for 7zAES.cpp */
+@@ -13,11 +14,15 @@ namespace NWindows {
+ namespace NFile {
+ namespace NDirectory {
+
++class CDelayedSymLink;
++
+ bool SetDirTime(LPCWSTR fileName, const FILETIME *creationTime, const FILETIME *lastAccessTime, const FILETIME *lastWriteTime);
+
+-bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes);
++bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks = 0);
+ #ifndef _UNICODE
+-bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes);
++bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks = 0);
+ #endif
+
+ bool MyMoveFile(LPCTSTR existFileName, LPCTSTR newFileName);
+@@ -80,6 +85,31 @@ public:
+ bool Remove();
+ };
+
++// Symbolic links must be created last so that they can't be used to
++// create or overwrite files above the extraction directory.
++class CDelayedSymLink
++{
++#ifdef ENV_UNIX
++ // Where the symlink should be created. The target is specified in
++ // the placeholder file.
++ AString _source;
++
++ // Device and inode of the placeholder file. Before creating the
++ // symlink, we must check that these haven't been changed by creation
++ // of another symlink.
++ dev_t _dev;
++ ino_t _ino;
++
++public:
++ explicit CDelayedSymLink(LPCSTR source);
++ bool Create();
++#else // !ENV_UNIX
++public:
++ CDelayedSymLink(LPCSTR source) {}
++ bool Create() { return true; }
++#endif // ENV_UNIX
++};
++
+ #ifdef _UNICODE
+ typedef CTempFile CTempFileW;
+ #endif
diff --git a/app-arch/p7zip/files/p7zip-9.20.1-QA.patch b/app-arch/p7zip/files/p7zip-9.20.1-QA.patch
new file mode 100644
index 000000000000..8845aca20707
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.20.1-QA.patch
@@ -0,0 +1,17 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu Jun 7 14:31:12 UTC 2012
+Subject: fix QA warnings
+
+https://sourceforge.net/tracker/?func=detail&atid=660493&aid=3532590&group_id=111810
+
+--- CPP/7zip/Archive/NtfsHandler.cpp
++++ CPP/7zip/Archive/NtfsHandler.cpp
+@@ -1280,7 +1280,7 @@
+ if (recSizeLog < Header.SectorSizeLog)
+ return false;
+ numSectorsInRec = 1 << (recSizeLog - Header.SectorSizeLog);
+- if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, NULL, 0))
++ if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, 0, NULL))
+ return S_FALSE;
+ if (!mftRec.IsFILE())
+ return S_FALSE;
diff --git a/app-arch/p7zip/files/p7zip-9.20.1-execstack.patch b/app-arch/p7zip/files/p7zip-9.20.1-execstack.patch
new file mode 100644
index 000000000000..1fdff481cf36
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.20.1-execstack.patch
@@ -0,0 +1,24 @@
+diff -Naupr p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm p7zip_9.20.1/Asm/x64/7zCrcT8U.asm
+--- p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm 2008-08-14 11:18:07.000000000 +0200
++++ p7zip_9.20.1/Asm/x64/7zCrcT8U.asm 2011-07-26 17:43:57.727910278 +0200
+@@ -101,3 +101,8 @@ _CrcUpdateT8:
+ ret
+
+ end
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++
+diff -Naupr p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm p7zip_9.20.1/Asm/x86/7zCrcT8U.asm
+--- p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm 2009-07-14 12:44:15.000000000 +0200
++++ p7zip_9.20.1/Asm/x86/7zCrcT8U.asm 2011-07-26 17:44:23.938864508 +0200
+@@ -99,3 +99,8 @@ _CrcUpdateT8:
+
+
+ ; end
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++
diff --git a/app-arch/p7zip/files/p7zip-9.20.1-long_rar_pwd.patch b/app-arch/p7zip/files/p7zip-9.20.1-long_rar_pwd.patch
new file mode 100644
index 000000000000..ea7a90b71d44
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.20.1-long_rar_pwd.patch
@@ -0,0 +1,17 @@
+--- ./CPP/7zip/Crypto/Sha1.cpp 2010-10-20 06:56:08.000000000 +0200
++++ CPP/7zip/Crypto/Sha1.cpp.new 2013-09-15 09:19:51.000000000 +0200
+@@ -148,10 +148,10 @@
+ for (int i = 0; i < kBlockSizeInWords; i++)
+ {
+ UInt32 d = _buffer[i];
+- data[i * 4 + 0 - kBlockSize] = (Byte)(d);
+- data[i * 4 + 1 - kBlockSize] = (Byte)(d >> 8);
+- data[i * 4 + 2 - kBlockSize] = (Byte)(d >> 16);
+- data[i * 4 + 3 - kBlockSize] = (Byte)(d >> 24);
++ data[(int)i * 4 + 0 - (int)kBlockSize] = (Byte)(d);
++ data[(int)i * 4 + 1 - (int)kBlockSize] = (Byte)(d >> 8);
++ data[(int)i * 4 + 2 - (int)kBlockSize] = (Byte)(d >> 16);
++ data[(int)i * 4 + 3 - (int)kBlockSize] = (Byte)(d >> 24);
+ }
+ returnRes = rar350Mode;
+ }
diff --git a/app-arch/p7zip/files/p7zip-9.38.1-CVE-2015-1038.patch b/app-arch/p7zip/files/p7zip-9.38.1-CVE-2015-1038.patch
new file mode 100644
index 000000000000..c4e443679b05
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.38.1-CVE-2015-1038.patch
@@ -0,0 +1,283 @@
+Author: Ben Hutchings <ben@decadent.org.uk>
+Date: Tue, 19 May 2015 02:38:40 +0100
+Description: Delay creation of symlinks to prevent arbitrary file writes (CVE-2015-1038)
+Bug: http://sourceforge.net/p/p7zip/bugs/147/
+Bug-Debian: https://bugs.debian.org/774660
+
+Alexander Cherepanov discovered that 7zip is susceptible to a
+directory traversal vulnerability. While extracting an archive, it
+will extract symlinks and then follow them if they are referenced in
+further entries. This can be exploited by a rogue archive to write
+files outside the current directory.
+
+We have to create placeholder files (which we already do) and delay
+creating symlinks until the end of extraction.
+
+Due to the possibility of anti-items (deletions) in the archive, it is
+possible for placeholders to be deleted and replaced before we create
+the symlinks. It's not clear that this can be used for mischief, but
+GNU tar guards against similar problems by checking that the placeholder
+still exists and is the same inode. XXX It also checks 'birth time' but
+this isn't portable. We can probably get away with comparing ctime
+since we don't support hard links.
+
+--- a/CPP/7zip/UI/Agent/Agent.cpp
++++ b/CPP/7zip/UI/Agent/Agent.cpp
+@@ -1215,7 +1215,7 @@ STDMETHODIMP CAgentFolder::Extract(const
+ HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(),
+ realIndices.Size(), testMode, extractCallback);
+ if (result == S_OK)
+- result = extractCallbackSpec->SetDirsTimes();
++ result = extractCallbackSpec->SetFinalAttribs();
+ return result;
+ COM_TRY_END
+ }
+--- a/CPP/7zip/UI/Client7z/Client7z.cpp
++++ b/CPP/7zip/UI/Client7z/Client7z.cpp
+@@ -222,8 +222,11 @@ private:
+ COutFileStream *_outFileStreamSpec;
+ CMyComPtr<ISequentialOutStream> _outFileStream;
+
++ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
++
+ public:
+ void Init(IInArchive *archiveHandler, const FString &directoryPath);
++ HRESULT SetFinalAttribs();
+
+ UInt64 NumErrors;
+ bool PasswordIsDefined;
+@@ -441,11 +444,23 @@ STDMETHODIMP CArchiveExtractCallback::Se
+ }
+ _outFileStream.Release();
+ if (_extractMode && _processedFileInfo.AttribDefined)
+- SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib);
++ SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib, &_delayedSymLinks);
+ PrintNewLine();
+ return S_OK;
+ }
+
++HRESULT CArchiveExtractCallback::SetFinalAttribs()
++{
++ HRESULT result = S_OK;
++
++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
++ if (!_delayedSymLinks[i].Create())
++ result = E_FAIL;
++
++ _delayedSymLinks.Clear();
++
++ return result;
++}
+
+ STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
+ {
+@@ -912,6 +927,8 @@ int MY_CDECL main(int numArgs, const cha
+ // extractCallbackSpec->PasswordIsDefined = true;
+ // extractCallbackSpec->Password = L"1";
+ HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback);
++ if (result == S_OK)
++ result = extractCallbackSpec->SetFinalAttribs();
+ if (result != S_OK)
+ {
+ PrintError("Extract Error");
+--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
+@@ -1083,7 +1083,7 @@ STDMETHODIMP CArchiveExtractCallback::Se
+ NumFiles++;
+
+ if (_extractMode && _fi.AttribDefined)
+- SetFileAttrib(_diskFilePath, _fi.Attrib);
++ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks);
+ RINOK(_extractCallback2->SetOperationResult(operationResult, _encrypted));
+ return S_OK;
+ COM_TRY_END
+@@ -1149,8 +1149,9 @@ static int GetNumSlashes(const FChar *s)
+ }
+ }
+
+-HRESULT CArchiveExtractCallback::SetDirsTimes()
++HRESULT CArchiveExtractCallback::SetFinalAttribs()
+ {
++ HRESULT result = S_OK;
+ CRecordVector<CExtrRefSortPair> pairs;
+ pairs.ClearAndSetSize(_extractedFolderPaths.Size());
+ unsigned i;
+@@ -1187,5 +1188,12 @@ HRESULT CArchiveExtractCallback::SetDirs
+ (WriteATime && ATimeDefined) ? &ATime : NULL,
+ (WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL));
+ }
+- return S_OK;
++
++ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
++ if (!_delayedSymLinks[i].Create())
++ result = E_FAIL;
++
++ _delayedSymLinks.Clear();
++
++ return result;
+ }
+--- a/CPP/7zip/UI/Common/ArchiveExtractCallback.h
++++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.h
+@@ -6,6 +6,8 @@
+ #include "../../../Common/MyCom.h"
+ #include "../../../Common/Wildcard.h"
+
++#include "../../../Windows/FileDir.h"
++
+ #include "../../IPassword.h"
+
+ #include "../../Common/FileStreams.h"
+@@ -213,6 +215,8 @@ class CArchiveExtractCallback:
+ bool _saclEnabled;
+ #endif
+
++ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
++
+ void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath);
+ HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
+ HRESULT GetUnpackSize();
+@@ -293,7 +297,7 @@ public:
+ _baseParentFolder = indexInArc;
+ }
+
+- HRESULT SetDirsTimes();
++ HRESULT SetFinalAttribs();
+ };
+
+ #endif
+--- a/CPP/7zip/UI/Common/Extract.cpp
++++ b/CPP/7zip/UI/Common/Extract.cpp
+@@ -170,7 +170,7 @@ static HRESULT DecompressArchive(
+ else
+ result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs);
+ if (result == S_OK && !options.StdInMode)
+- result = ecs->SetDirsTimes();
++ result = ecs->SetFinalAttribs();
+ return callback->ExtractResult(result);
+ }
+
+--- a/CPP/Windows/FileDir.cpp
++++ b/CPP/Windows/FileDir.cpp
+@@ -343,7 +343,8 @@ static int convert_to_symlink(const char
+ return -1;
+ }
+
+-bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes)
++bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks)
+ {
+ if (!fileName) {
+ SetLastError(ERROR_PATH_NOT_FOUND);
+@@ -375,7 +376,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD
+ stat_info.st_mode = fileAttributes >> 16;
+ #ifdef ENV_HAVE_LSTAT
+ if (S_ISLNK(stat_info.st_mode)) {
+- if ( convert_to_symlink(name) != 0) {
++ if (delayedSymLinks)
++ delayedSymLinks->Add(CDelayedSymLink(name));
++ else if ( convert_to_symlink(name) != 0) {
+ TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes)))
+ return false;
+ }
+@@ -885,6 +888,43 @@ bool CTempDir::Remove()
+ return !_mustBeDeleted;
+ }
+
++#ifdef ENV_UNIX
++
++CDelayedSymLink::CDelayedSymLink(const char * source)
++ : _source(source)
++{
++ struct stat st;
++
++ if (lstat(_source, &st) == 0) {
++ _dev = st.st_dev;
++ _ino = st.st_ino;
++ } else {
++ _dev = 0;
++ }
++}
++
++bool CDelayedSymLink::Create()
++{
++ struct stat st;
++
++ if (_dev == 0) {
++ errno = EPERM;
++ return false;
++ }
++ if (lstat(_source, &st) != 0)
++ return false;
++ if (_dev != st.st_dev || _ino != st.st_ino) {
++ // Placeholder file has been overwritten or moved by another
++ // symbolic link creation
++ errno = EPERM;
++ return false;
++ }
++
++ return convert_to_symlink(_source) == 0;
++}
++
++#endif // ENV_UNIX
++
+ }}}
+
+
+--- a/CPP/Windows/FileDir.h
++++ b/CPP/Windows/FileDir.h
+@@ -4,6 +4,7 @@
+ #define __WINDOWS_FILE_DIR_H
+
+ #include "../Common/MyString.h"
++#include "../Common/MyVector.h"
+
+ #include "FileIO.h"
+
+@@ -11,11 +12,14 @@ namespace NWindows {
+ namespace NFile {
+ namespace NDir {
+
++class CDelayedSymLink;
++
+ bool GetWindowsDir(FString &path);
+ bool GetSystemDir(FString &path);
+
+ bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
+-bool SetFileAttrib(CFSTR path, DWORD attrib);
++bool SetFileAttrib(CFSTR path, DWORD attrib,
++ CObjectVector<CDelayedSymLink> *delayedSymLinks = 0);
+ bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
+
+ #ifndef UNDER_CE
+@@ -69,6 +73,31 @@ public:
+ bool Remove();
+ };
+
++// Symbolic links must be created last so that they can't be used to
++// create or overwrite files above the extraction directory.
++class CDelayedSymLink
++{
++#ifdef ENV_UNIX
++ // Where the symlink should be created. The target is specified in
++ // the placeholder file.
++ AString _source;
++
++ // Device and inode of the placeholder file. Before creating the
++ // symlink, we must check that these haven't been changed by creation
++ // of another symlink.
++ dev_t _dev;
++ ino_t _ino;
++
++public:
++ explicit CDelayedSymLink(const char * source);
++ bool Create();
++#else // !ENV_UNIX
++public:
++ CDelayedSymLink(const char * source) {}
++ bool Create() { return true; }
++#endif // ENV_UNIX
++};
++
+ #if !defined(UNDER_CE)
+ class CCurrentDirRestorer
+ {
diff --git a/app-arch/p7zip/files/p7zip-9.38.1-osversion.patch b/app-arch/p7zip/files/p7zip-9.38.1-osversion.patch
new file mode 100644
index 000000000000..49e0653e43ef
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-9.38.1-osversion.patch
@@ -0,0 +1,28 @@
+diff -Naur old/CPP/7zip/UI/FileManager/FM.cpp new/CPP/7zip/UI/FileManager/FM.cpp
+--- old/CPP/7zip/UI/FileManager/FM.cpp 2015-01-18 08:59:09.000000000 -1000
++++ new/CPP/7zip/UI/FileManager/FM.cpp 2015-02-09 11:39:55.575712452 -1000
+@@ -348,24 +348,7 @@
+
+ bool IsLargePageSupported()
+ {
+- #ifdef _WIN64
+ return true;
+- #else
+- OSVERSIONINFO versionInfo;
+- versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
+- if (!::GetVersionEx(&versionInfo))
+- return false;
+- if (versionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || versionInfo.dwMajorVersion < 5)
+- return false;
+- if (versionInfo.dwMajorVersion > 5)
+- return true;
+- if (versionInfo.dwMinorVersion < 1)
+- return false;
+- if (versionInfo.dwMinorVersion > 1)
+- return true;
+- // return IsWow64();
+- return false;
+- #endif
+ }
+
+ #if 0 //#ifndef UNDER_CE
diff --git a/app-arch/p7zip/metadata.xml b/app-arch/p7zip/metadata.xml
new file mode 100644
index 000000000000..9ed2c1559b3e
--- /dev/null
+++ b/app-arch/p7zip/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <description>maintainer</description>
+ </maintainer>
+ <use>
+ <flag name="rar">Enable support for non-free rar decoder</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">p7zip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/p7zip/p7zip-9.20.1-r5.ebuild b/app-arch/p7zip/p7zip-9.20.1-r5.ebuild
new file mode 100644
index 000000000000..6b114776dd59
--- /dev/null
+++ b/app-arch/p7zip/p7zip-9.20.1-r5.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+WX_GTK_VER="2.8"
+
+inherit eutils multilib toolchain-funcs wxwidgets
+
+DESCRIPTION="Port of 7-Zip archiver for Unix"
+HOMEPAGE="http://p7zip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
+
+LICENSE="LGPL-2.1 rar? ( unRAR )"
+SLOT="0"
+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"
+IUSE="doc kde rar +pch static wxwidgets"
+
+REQUIRED_USE="kde? ( wxwidgets )"
+
+RDEPEND="
+ kde? ( x11-libs/wxGTK:2.8[X,-odbc] kde-base/kdelibs )
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,-odbc] )"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/yasm )
+ x86? ( dev-lang/nasm )"
+
+S=${WORKDIR}/${PN}_${PV}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-execstack.patch \
+ "${FILESDIR}"/${P}-QA.patch \
+ "${FILESDIR}"/${P}-CVE-2015-1038.patch
+
+ if ! use pch; then
+ sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
+ fi
+
+ sed \
+ -e 's:-m32 ::g' \
+ -e 's:-m64 ::g' \
+ -e 's:-O::g' \
+ -e 's:-pipe::g' \
+ -e "/^CC/s:\$(ALLFLAGS):${CFLAGS} \$(ALLFLAGS):g" \
+ -e "/^CXX/s:\$(ALLFLAGS):${CXXFLAGS} \$(ALLFLAGS):g" \
+ -i makefile* || die
+
+ # remove non-free RAR codec
+ if use rar; then
+ ewarn "Enabling nonfree RAR decompressor"
+ else
+ sed -e '/Rar/d' -i makefile* || die
+ rm -rf CPP/7zip/Compress/Rar || die
+ epatch "${FILESDIR}"/9.04-makefile.patch
+ fi
+
+ sed -i \
+ -e "/^CXX=/s:g++:$(tc-getCXX):" \
+ -e "/^CC=/s:gcc:$(tc-getCC):" \
+ -e '/ALLFLAGS/s:-s ::' \
+ makefile* || die "changing makefiles"
+
+ if use amd64; then
+ cp -f makefile.linux_amd64_asm makefile.machine || die
+ elif use x86; then
+ cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ # Mac OS X needs this special makefile, because it has a non-GNU linker
+ [[ ${CHOST} == *64-* ]] \
+ && cp -f makefile.macosx_64bits makefile.machine \
+ || cp -f makefile.macosx_32bits makefile.machine
+ # bundles have extension .bundle but don't die because USE=-rar
+ # removes the Rar directory
+ sed -i -e '/strcpy(name/s/\.so/.bundle/' \
+ CPP/Windows/DLL.cpp || die
+ sed -i -e '/^PROG=/s/\.so/.bundle/' \
+ CPP/7zip/Bundles/Format7zFree/makefile \
+ $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
+ elif use x86-fbsd; then
+ # FreeBSD needs this special makefile, because it hasn't -ldl
+ sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
+ fi
+
+ if use static; then
+ sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
+ fi
+
+ if use kde || use wxwidgets; then
+ einfo "Preparing dependency list"
+ emake depend
+ fi
+}
+
+src_compile() {
+ emake all3
+ if use kde || use wxwidgets; then
+ emake -- 7zG
+ emake -- 7zFM
+ fi
+}
+
+src_test() {
+ emake test test_7z test_7zr
+}
+
+src_install() {
+ # this wrappers can not be symlinks, p7zip should be called with full path
+ make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr"
+ make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za"
+ make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z"
+
+ if use kde || use wxwidgets; then
+ make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG"
+ make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM"
+
+ make_desktop_entry 7zFM "${PN} FM" ${PN} "GTK;Utility;Archiving;Compression"
+
+ dobin GUI/p7zipForFilemanager
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe bin/7z{G,FM}
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r GUI/{Lang,help}
+
+ insinto /usr/share/icons/hicolor/16x16/apps/
+ newins GUI/p7zip_16_ok.png p7zip.png
+
+ if use kde; then
+ rm GUI/kde4/p7zip_compress.desktop || die
+ insinto /usr/share/kde4/services/ServiceMenus
+ doins GUI/kde4/*.desktop
+ fi
+ fi
+
+ dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
+ doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
+
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
+ doexe bin/*$(get_modname)
+ if use rar; then
+ exeinto /usr/$(get_libdir)/${PN}/Codecs/
+ doexe bin/Codecs/*$(get_modname)
+ fi
+
+ doman man1/7z.1 man1/7za.1 man1/7zr.1
+ dodoc ChangeLog README TODO
+
+ if use doc; then
+ dodoc DOCS/*.txt
+ dohtml -r DOCS/MANUAL/*
+ fi
+}
diff --git a/app-arch/p7zip/p7zip-9.38.1-r2.ebuild b/app-arch/p7zip/p7zip-9.38.1-r2.ebuild
new file mode 100644
index 000000000000..7e779e8cd478
--- /dev/null
+++ b/app-arch/p7zip/p7zip-9.38.1-r2.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit eutils multilib toolchain-funcs wxwidgets
+
+DESCRIPTION="Port of 7-Zip archiver for Unix"
+HOMEPAGE="http://p7zip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
+
+LICENSE="LGPL-2.1 rar? ( unRAR )"
+SLOT="0"
+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"
+IUSE="doc kde rar +pch static wxwidgets abi_x86_x32"
+
+REQUIRED_USE="kde? ( wxwidgets )"
+
+RDEPEND="
+ kde? ( x11-libs/wxGTK:2.8[X,-odbc] kde-base/kdelibs )
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,-odbc] )"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/yasm )
+ abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
+ x86? ( dev-lang/nasm )"
+
+S=${WORKDIR}/${PN}_${PV}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-osversion.patch \
+ "${FILESDIR}"/${P}-CVE-2015-1038.patch
+
+ if ! use pch; then
+ sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
+ fi
+
+ sed \
+ -e 's:-m32 ::g' \
+ -e 's:-m64 ::g' \
+ -e 's:-O::g' \
+ -e 's:-pipe::g' \
+ -e "/^CXX=/s:g++:$(tc-getCXX):" \
+ -e "/^CC=/s:gcc:$(tc-getCC):" \
+ -e '/ALLFLAGS/s:-s ::' \
+ -e "/OPTFLAGS=/s:=.*:=${CXXFLAGS}:" \
+ -i makefile* || die
+
+ # remove non-free RAR codec
+ if use rar; then
+ ewarn "Enabling nonfree RAR decompressor"
+ else
+ sed \
+ -e '/Rar/d' \
+ -e '/RAR/d' \
+ -i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die
+ rm -rf CPP/7zip/Compress/Rar || die
+ fi
+
+ if use abi_x86_x32; then
+ sed -i -e "/^ASM=/s:amd64:x32:" makefile*
+ cp -f makefile.linux_amd64_asm makefile.machine || die
+ elif use amd64; then
+ cp -f makefile.linux_amd64_asm makefile.machine || die
+ elif use x86; then
+ cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ # Mac OS X needs this special makefile, because it has a non-GNU linker
+ [[ ${CHOST} == *64-* ]] \
+ && cp -f makefile.macosx_64bits makefile.machine \
+ || cp -f makefile.macosx_32bits makefile.machine
+ # bundles have extension .bundle but don't die because USE=-rar
+ # removes the Rar directory
+ sed -i -e '/strcpy(name/s/\.so/.bundle/' \
+ CPP/Windows/DLL.cpp || die
+ sed -i -e '/^PROG=/s/\.so/.bundle/' \
+ CPP/7zip/Bundles/Format7zFree/makefile \
+ $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
+ elif use x86-fbsd; then
+ # FreeBSD needs this special makefile, because it hasn't -ldl
+ sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
+ fi
+
+ if use static; then
+ sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
+ fi
+
+ if use kde || use wxwidgets; then
+ einfo "Preparing dependency list"
+ emake depend
+ fi
+}
+
+src_compile() {
+ emake all3
+ if use kde || use wxwidgets; then
+ emake -- 7zG
+ emake -- 7zFM
+ fi
+}
+
+src_test() {
+ emake test test_7z test_7zr
+}
+
+src_install() {
+ # this wrappers can not be symlinks, p7zip should be called with full path
+ make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr"
+ make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za"
+ make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z"
+
+ if use kde || use wxwidgets; then
+ make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG"
+ make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM"
+
+ make_desktop_entry 7zFM "${PN} FM" ${PN} "GTK;Utility;Archiving;Compression"
+
+ dobin GUI/p7zipForFilemanager
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe bin/7z{G,FM}
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r GUI/{Lang,help}
+
+ insinto /usr/share/icons/hicolor/16x16/apps/
+ newins GUI/p7zip_16_ok.png p7zip.png
+
+ if use kde; then
+ rm GUI/kde4/p7zip_compress.desktop || die
+ insinto /usr/share/kde4/services/ServiceMenus
+ doins GUI/kde4/*.desktop
+ fi
+ fi
+
+ dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
+ doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
+
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
+ doexe bin/*$(get_modname)
+ if use rar; then
+ exeinto /usr/$(get_libdir)/${PN}/Codecs/
+ doexe bin/Codecs/*$(get_modname)
+ fi
+
+ doman man1/7z.1 man1/7za.1 man1/7zr.1
+ dodoc ChangeLog README TODO
+
+ if use doc; then
+ dodoc DOC/*.txt
+ dohtml -r DOC/MANUAL/*
+ fi
+}
diff --git a/app-arch/par/Manifest b/app-arch/par/Manifest
new file mode 100644
index 000000000000..9dea9cac70fe
--- /dev/null
+++ b/app-arch/par/Manifest
@@ -0,0 +1 @@
+DIST par-v1.1.tar.gz 40959 SHA256 74afaf875412bce7dd93cac6e2572a7e27ea728dec0dc230aca6dbed4c1f724d SHA512 539be3cac0513429f44c9d53dcd61afa02b1e5a2935def3164398577882f47199b5a393f21ed6a1d6972409034bb0a7b63f338d69aa1fcdd3655adaf5993b95d WHIRLPOOL c03c104bee6f3b30b6cb8d2506d8e76602f1c2d290ec2459fada9e48aa134a7ba4e406fbca468276e23df79cb1f847ca8fc32aaaa839a9c3f7093adc75e293cf
diff --git a/app-arch/par/metadata.xml b/app-arch/par/metadata.xml
new file mode 100644
index 000000000000..fcb2ecb3ba47
--- /dev/null
+++ b/app-arch/par/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">parchive</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/par/par-1.1.ebuild b/app-arch/par/par-1.1.ebuild
new file mode 100644
index 000000000000..6b822fc7de0a
--- /dev/null
+++ b/app-arch/par/par-1.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit toolchain-funcs
+
+DESCRIPTION="Parchive archive fixing tool"
+HOMEPAGE="http://parchive.sourceforge.net/"
+SRC_URI="mirror://sourceforge/parchive/par-v${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND="!app-text/par
+ !dev-util/par"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/par-cmdline
+
+src_prepare() {
+ sed -i \
+ -e 's/\$(CC)/$(LINK.o)/' \
+ Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin par || die "dobin failed"
+ dodoc AUTHORS NEWS README
+}
diff --git a/app-arch/par2cmdline/Manifest b/app-arch/par2cmdline/Manifest
new file mode 100644
index 000000000000..86bd8e81d36c
--- /dev/null
+++ b/app-arch/par2cmdline/Manifest
@@ -0,0 +1,4 @@
+DIST par2cmdline-0.6.11.tar.gz 2703989 SHA256 7d09033ac4f2dd2f6dd2b61c2498bbc37762e6432afd9171553a5cc466a09998 SHA512 ec32e2b679ab35d8b7f733d7df34549b44ae22836cb8534419057c8003827e09c23d92d299570a0b2c878ef0d7620a58b50eaede9f47e5c8d5c8dc2a619ba634 WHIRLPOOL f9b6e3586aebce6d618d764f08a7f322843e9eb68f0547761f12a6403a6a6dee5ed1ef2ad0ef1f3683c58375bf080dbe257dcbec5b632402584f1642ccd726e4
+DIST par2cmdline-0.6.12.tar.gz 3536512 SHA256 1788aaab2cd7f760c4dc24c1d31a471a4b584fbbfa2a47f06f340b4d73480144 SHA512 17f0ff482c1410b1ef07a700f472f463660d393b7c06c796849c9b67d95f7283a91d135e67e20dbcaf888a85d0abf96959dc9d80b92e7b638ac632acd9b4107e WHIRLPOOL efe80eecd402a1ad800307a63edbe5b473bd8b29204d24b1e008b48549cb96336957fda4cd7f2e4fc83dda3152e663a70b2e0d00984e377f8b6cb03d80e91a0a
+DIST par2cmdline-0.6.13.tar.gz 3538108 SHA256 024b9f0ed5c57ebdd633333b288818790b0d5c4ecc9c6296dc32ae3f98690abe SHA512 fae4707c2d11c17774e890db9a5173f9ef14be1308dfa1e193d3e7f49d1decff651d58d410fc493992b41b84e5bb42930988a5bd8369bf13e083e95eb45f4bcc WHIRLPOOL 8ff13317c3961aa9c032f25084e2de65fbbcb8615c7e93a9b59a2ca5fc500863c03d489e56c1ba8e29113c6ef0897714db2ce17d6966ad9254f98d7755415444
+DIST par2cmdline-0.6.3.tar.gz 822972 SHA256 903bff9d1720523683cb04db76d37169ebab3a5157f0ae1d5f9065f371929288 SHA512 c664a414ef89abf8a468b382680ba9ea97f90f6d107185ff17208cfed9c44b5aea1040632055baffa0e6bf64bd41807221c0e050e0d3d50413a6af5fa56c7f36 WHIRLPOOL 0ad5bfe1ca2d9654f9c518407fa05ea403960ed24fcf68896d12567adfc3383c57bb3fe81405f1038c7f2cae3e1cba0530dbdf7f67889f5dcc43561e5e473bd6
diff --git a/app-arch/par2cmdline/metadata.xml b/app-arch/par2cmdline/metadata.xml
new file mode 100644
index 000000000000..7f2c592e7507
--- /dev/null
+++ b/app-arch/par2cmdline/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>swegener@gentoo.org</email>
+ <description>Primary Maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">BlackIkeEagle/par2cmdline</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/par2cmdline/par2cmdline-0.6.11.ebuild b/app-arch/par2cmdline/par2cmdline-0.6.11.ebuild
new file mode 100644
index 000000000000..6e3e544fb9b5
--- /dev/null
+++ b/app-arch/par2cmdline/par2cmdline-0.6.11.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="A PAR-2.0 file verification and repair tool"
+HOMEPAGE="http://github.com/BlackIkeEagle/par2cmdline"
+SRC_URI="http://github.com/BlackIkeEagle/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog README" # NEWS is empty, PORTING and ROADMAP are for building
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/app-arch/par2cmdline/par2cmdline-0.6.12.ebuild b/app-arch/par2cmdline/par2cmdline-0.6.12.ebuild
new file mode 100644
index 000000000000..1a0fc1eaeb01
--- /dev/null
+++ b/app-arch/par2cmdline/par2cmdline-0.6.12.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="A PAR-2.0 file verification and repair tool"
+HOMEPAGE="http://github.com/BlackIkeEagle/par2cmdline"
+SRC_URI="http://github.com/BlackIkeEagle/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ~ppc64 x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog README" # NEWS is empty, PORTING and ROADMAP are for building
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/app-arch/par2cmdline/par2cmdline-0.6.13.ebuild b/app-arch/par2cmdline/par2cmdline-0.6.13.ebuild
new file mode 100644
index 000000000000..efb88d86c827
--- /dev/null
+++ b/app-arch/par2cmdline/par2cmdline-0.6.13.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="A PAR-2.0 file verification and repair tool"
+HOMEPAGE="http://github.com/BlackIkeEagle/par2cmdline"
+SRC_URI="http://github.com/BlackIkeEagle/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog README" # NEWS is empty, PORTING and ROADMAP are for building
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/app-arch/par2cmdline/par2cmdline-0.6.3.ebuild b/app-arch/par2cmdline/par2cmdline-0.6.3.ebuild
new file mode 100644
index 000000000000..8e500a8b61bd
--- /dev/null
+++ b/app-arch/par2cmdline/par2cmdline-0.6.3.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="A PAR-2.0 file verification and repair tool"
+HOMEPAGE="http://github.com/BlackIkeEagle/par2cmdline"
+SRC_URI="http://github.com/BlackIkeEagle/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ~ppc64 x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog README" # NEWS is empty, PORTING and ROADMAP are for building
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/app-arch/pax/Manifest b/app-arch/pax/Manifest
new file mode 100644
index 000000000000..559fd39ef0ec
--- /dev/null
+++ b/app-arch/pax/Manifest
@@ -0,0 +1 @@
+DIST pax-3.4-12.fc16.src.rpm 171016 SHA256 b86ca0556b12600d3dd4777900baae5118e71ce9e026e42e3bb51aed23853932 SHA512 78704cd1b66288acdaa8fdf4ca0a97c12b1e843e024be4d3fac88a6b42049928c6bfe69a72a58a00a9bf755c23e1e8e0b7d30bc72ba08a83830495dd5f6d9be1 WHIRLPOOL 8a674356efa939ceff0f502de926688d81f17da48c98f24674a76f11043f420c33aa9f47eb66fb1e896ddc4ca4c64cec554d7397379d1ccc884bf02b37eb9b29
diff --git a/app-arch/pax/files/pax-3.4-fix-fts-includes.patch b/app-arch/pax/files/pax-3.4-fix-fts-includes.patch
new file mode 100644
index 000000000000..5e4e37eb66aa
--- /dev/null
+++ b/app-arch/pax/files/pax-3.4-fix-fts-includes.patch
@@ -0,0 +1,24 @@
+diff -ur pax-3.4-orig/lib/fts.c pax-3.4/lib/fts.c
+--- pax-3.4-orig/lib/fts.c 2005-07-29 09:55:25.000000000 +0200
++++ pax-3.4/lib/fts.c 2014-10-30 21:38:42.404092744 +0100
+@@ -35,7 +35,7 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <errno.h>
+-#include <fts.h>
++#include "fts.h"
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+diff -ur pax-3.4-orig/src/ftree.c pax-3.4/src/ftree.c
+--- pax-3.4-orig/src/ftree.c 2005-07-29 09:46:06.000000000 +0200
++++ pax-3.4/src/ftree.c 2014-10-30 21:39:14.876093149 +0100
+@@ -46,7 +46,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <stdlib.h>
+-#include <fts.h>
++#include "../lib/fts.h"
+ #include "pax.h"
+ #include "ftree.h"
+ #include "extern.h"
diff --git a/app-arch/pax/files/pax-3.4-x32.patch b/app-arch/pax/files/pax-3.4-x32.patch
new file mode 100644
index 000000000000..7ae1a9d914ca
--- /dev/null
+++ b/app-arch/pax/files/pax-3.4-x32.patch
@@ -0,0 +1,162 @@
+https://sites.google.com/site/x32abi/x32-patches
+
+--- pax-3.4/configure.in
++++ pax-3.4/configure.in
+@@ -33,4 +33,7 @@ dnl Checks for header files.
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+
++AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(long)
++
+ AC_OUTPUT([Makefile lib/Makefile src/Makefile])
+--- pax-3.4/src/ar_io.c
++++ pax-3.4/src/ar_io.c
+@@ -378,7 +378,8 @@ ar_close(void)
+ * could have written anything yet.
+ */
+ if (frmt == NULL) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
+ #else
+ (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
+@@ -391,7 +392,8 @@ ar_close(void)
+
+ if (strcmp(NM_CPIO, argv0) == 0)
+ (void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ "%qu blocks\n",
+ #else
+ "%lu blocks\n",
+@@ -399,7 +401,8 @@ ar_close(void)
+ (rdcnt ? rdcnt : wrcnt) / 5120);
+ else if (strcmp(NM_TAR, argv0) != 0)
+ (void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
+ #else
+ "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
+--- pax-3.4/src/cpio.c
++++ pax-3.4/src/cpio.c
+@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
+ */
+ if ((arcn->sb.st_size == 0) ||
+ (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ paxwarn (1, "Cpio link name length is invalid: %qu",
+ arcn->sb.st_size);
+ #else
+--- pax-3.4/src/gen_subs.c
++++ pax-3.4/src/gen_subs.c
+@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+ * print device id's for devices, or sizes for other nodes
+ */
+ if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
+ (unsigned long) MINOR (sbp->st_rdev));
+ #else
+@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+ #endif
+ else
+ {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void) fprintf (fp, "%9qu ", sbp->st_size);
+ #else
+ (void) fprintf (fp, "%9lu ", sbp->st_size);
+@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len,
+ return (0);
+ }
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+ * asc_uqd()
+ * convert hex/octal character string into a u_quad_t. We do not have to
+--- pax-3.4/src/options.c
++++ pax-3.4/src/options.c
+@@ -1545,7 +1545,8 @@ str_offt (char *val)
+ char *expr;
+ off_t num, t;
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ num = strtoq (val, &expr, 0);
+ if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
+ #else
+--- pax-3.4/src/tar.c
++++ pax-3.4/src/tar.c
+@@ -58,7 +58,8 @@
+ static unsigned long tar_chksm (char *, int);
+ static char *name_split (char *, int);
+ static int ul_oct (u_long, char *, int, int);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ static int uqd_oct (u_quad_t, char *, int, int);
+ #endif
+
+@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str,
+ return (0);
+ }
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+ * uqd_oct()
+ * convert an u_quad_t to an octal string. one of many oddball field
+@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
+ 0xfff);
+ arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
+ arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+ arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
+ * data follows this file, so set the pad
+ */
+ hd->linkflag = AREGTYPE;
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ sizeof (hd->size), 1))
+ #else
+@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
+ */
+ arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
+ 0xfff);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+ arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
+ else
+ hd->typeflag = REGTYPE;
+ arcn->pad = TAR_PAD (arcn->sb.st_size);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ sizeof (hd->size), 3))
+ {
diff --git a/app-arch/pax/metadata.xml b/app-arch/pax/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/app-arch/pax/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/pax/pax-3.4.12.16-r1.ebuild b/app-arch/pax/pax-3.4.12.16-r1.ebuild
new file mode 100644
index 000000000000..679fdb45f89e
--- /dev/null
+++ b/app-arch/pax/pax-3.4.12.16-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils rpm versionator autotools
+
+MY_PV=$(get_version_component_range 1-2)
+MY_P="${PN}-${MY_PV}"
+RPM_PV=$(get_version_component_range 3)
+FC_PV=$(get_version_component_range 4)
+
+DESCRIPTION="pax (Portable Archive eXchange) is the POSIX standard archive tool"
+HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+SRC_URI="mirror://fedora-dev/releases/${FC_PV}/Everything/source/SRPMS/${MY_P}-${RPM_PV}.fc${FC_PV}.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rpm_spec_epatch ../${PN}.spec
+ epatch "${FILESDIR}"/pax-3.4-x32.patch
+ epatch "${FILESDIR}"/pax-3.4-fix-fts-includes.patch
+ sed -i configure.in \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ -e '/AC_PROG_RANLIB/a AC_PROG_MKDIR_P' \
+ || die
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+}
diff --git a/app-arch/pax/pax-3.4.12.16.ebuild b/app-arch/pax/pax-3.4.12.16.ebuild
new file mode 100644
index 000000000000..2b53d8116ce1
--- /dev/null
+++ b/app-arch/pax/pax-3.4.12.16.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils rpm versionator autotools
+
+MY_PV=$(get_version_component_range 1-2)
+MY_P="${PN}-${MY_PV}"
+RPM_PV=$(get_version_component_range 3)
+FC_PV=$(get_version_component_range 4)
+
+DESCRIPTION="pax (Portable Archive eXchange) is the POSIX standard archive tool"
+HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+SRC_URI="mirror://fedora-dev/releases/${FC_PV}/Everything/source/SRPMS/${MY_P}-${RPM_PV}.fc${FC_PV}.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rpm_spec_epatch ../${PN}.spec
+ epatch "${FILESDIR}"/pax-3.4-x32.patch
+ sed -i configure.in -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' || die
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+}
diff --git a/app-arch/pbzip2/Manifest b/app-arch/pbzip2/Manifest
new file mode 100644
index 000000000000..3ef9138d37ee
--- /dev/null
+++ b/app-arch/pbzip2/Manifest
@@ -0,0 +1,5 @@
+DIST pbzip2-1.1.10.tar.gz 46585 SHA256 9d489191edd010e4c8f7bc86de88268cdc3da5a9f7904b257fda56941615a0c2 SHA512 7601370c8d212124bccd3387ae1155c4a1e753d0ff93f6274bf1ae90e4d661fc73c890fc15c46d86f4a6b2487e788b29664e0f6571365dc1777f0aa3ced477df WHIRLPOOL 2c6d3aae7f5e371ab4f0b06dbbd797d3b3c8df93c24cdd35f2af7fbb25051cbaa6310df57cbf8d057f696067975a91807cffe413d23859683119b24f2758a976
+DIST pbzip2-1.1.11.tar.gz 47723 SHA256 b4861389bd99c73d304a03b0dc0731a8a26905da8e94ca4cef873b96e1ab0e7f SHA512 542bb52fc9a39cc7d0245d569984afcff967dc0affaf4c5abd4ae7ab03a480df84321f0366b76989cbf438e022e8d38e5120561cefea67079b1038e5c8f096f3 WHIRLPOOL 37894164110a56c8e0f480ea9175c476ab562d48a55d993b3e3828fd3b0d1dfb96ff67c3d5376fbe7cf855c2a955bbeb9266c0d514f135b09770717a5a618a16
+DIST pbzip2-1.1.12.tar.gz 47826 SHA256 573bb358a5a7d3bf5f42f881af324cedf960c786e8d66dd03d448ddd8a0166ee SHA512 bb68e87867295b89ee6fb76a8b72834daebf0ca6c16b2f10bce67fe7386716a728acd28bf46a9732087202ca0cc774f02c741b0b58801184bb7550f6fd119cd6 WHIRLPOOL e7e9cd45b51aaf227e5bcb6e8df37b2fc05b2e3b8b666fcf213e05dc21d6df7392918e97d95379d25231832a9cfae938fdf5590ae7a7d3e6ad1968a9b2c25393
+DIST pbzip2-1.1.8.tar.gz 54429 SHA256 d2da7e65d2a2ba5426d6d9bcd15d86cc5f90038efabd5dbc1ef9bded21371f53 SHA512 a3314d1f465e6016bf79ca8bd734fc1485515e9688319ee5a6a837058599546848018f28e2e2cef2afde68ee8f3c26d16e4e6da4c74c75d1cb12068f1d1e1a83 WHIRLPOOL bd24e6102db6425978c5ac8e762b37f4df4bcdcc84f44e06e6b4c652b1f9e3128382af1558a1ebc9f68dba3a89be08d42bf92577eab73b3d748f6ff941b415bf
+DIST pbzip2-1.1.9.tar.gz 47477 SHA256 bd421be03e6e24a24a121ba2355bfd11571356a25ee64fcfa76330750ec5f9c4 SHA512 0c08230858e14d8880cd0ae96f8d9484dbf7e6739c5c3374376ebe25fa331f4b1bc6df0330dd735bef686263d41cc993b032c09da0d7ee1957637b7a61618f21 WHIRLPOOL fdd174690cadcdab07848ba03daeb006306ea5588a1bef6f9d18d6bffe102350621269f256495228a337772101b2157a2d57f46e8d877fe6953f8f1d10b88ce2
diff --git a/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch b/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch
new file mode 100644
index 000000000000..6524b6bf2a05
--- /dev/null
+++ b/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch
@@ -0,0 +1,20 @@
+--- pbzip2-1.1.10/Makefile
++++ pbzip2-1.1.10/Makefile
+@@ -17,7 +17,7 @@
+
+
+ # Optimization flags
+-CXXFLAGS = -O2
++#CXXFLAGS = -O2
+
+ #CXXFLAGS += -g -Wall
+ #CXXFLAGS += -ansi
+@@ -50,7 +50,7 @@
+
+
+ # Linker flags
+-LDFLAGS =
++#LDFLAGS =
+
+
+ # External libraries
diff --git a/app-arch/pbzip2/files/pbzip2-1.1.6-makefile.patch b/app-arch/pbzip2/files/pbzip2-1.1.6-makefile.patch
new file mode 100644
index 000000000000..72b8795c0fde
--- /dev/null
+++ b/app-arch/pbzip2/files/pbzip2-1.1.6-makefile.patch
@@ -0,0 +1,62 @@
+--- Makefile.orig 2011-02-21 00:17:16.334746748 +0200
++++ Makefile 2011-02-21 00:19:16.504881112 +0200
+@@ -2,8 +2,6 @@
+ SHELL = /bin/sh
+
+ # Compiler to use
+-CC = g++
+-CFLAGS = -O2
+ #CFLAGS += -g -Wall
+ #CFLAGS += -ansi
+ #CFLAGS += -pedantic
+@@ -12,7 +10,7 @@
+ # Comment out CFLAGS line below for compatability mode for 32bit file sizes
+ # (less than 2GB) and systems that have compilers that treat int as 64bit
+ # natively (ie: modern AIX)
+-CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++CXXFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+ # Uncomment CFLAGS line below if you want to compile pbzip2 without load
+ # average support for systems that do not support it
+@@ -22,10 +20,10 @@
+ #CFLAGS += -DPBZIP_DEBUG
+
+ # Comment out CFLAGS line below to disable pthread semantics in code
+-CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
++CXXFLAGS += -D_POSIX_PTHREAD_SEMANTICS
+
+ # Comment out CFLAGS line below to disable Thread stack size customization
+-CFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION
++CXXFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION
+
+ # Comment out CFLAGS line below to explicity set ignore trailing garbage
+ # default behavior: 0 - disabled; 1 - enabled (ignore garbage by default)
+@@ -34,11 +32,11 @@
+ #CFLAGS += -DIGNORE_TRAILING_GARBAGE=1
+
+ # On some compilers -pthreads
+-CFLAGS += -pthread
++CXXFLAGS += -pthread
+
+ # External libraries
+-LDFLAGS = -lbz2
+-LDFLAGS += -lpthread
++LIBS = -lbz2
++LIBS += -lpthread
+
+ # Where you want pbzip2 installed when you do 'make install'
+ PREFIX = /usr
+@@ -47,11 +45,11 @@
+
+ # Standard pbzip2 compile
+ pbzip2: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp
+- $(CC) $(CFLAGS) $^ -o pbzip2 $(LDFLAGS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o pbzip2
+
+ # Choose this if you want to compile in a static version of the libbz2 library
+ pbzip2-static: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp libbz2.a
+- $(CC) $(CFLAGS) $^ -o pbzip2 -I. -L. $(LDFLAGS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o pbzip2 -I. -L.
+
+ # Install the binary pbzip2 program and man page
+ install: pbzip2
diff --git a/app-arch/pbzip2/files/pbzip2-1.1.9-makefile.patch b/app-arch/pbzip2/files/pbzip2-1.1.9-makefile.patch
new file mode 100644
index 000000000000..39d35a3e0a2b
--- /dev/null
+++ b/app-arch/pbzip2/files/pbzip2-1.1.9-makefile.patch
@@ -0,0 +1,29 @@
+--- pbzip2-1.1.9/Makefile
++++ pbzip2-1.1.9/Makefile
+@@ -3,7 +3,7 @@
+
+
+ # Compiler to use
+-CXX = g++
++#CXX = g++
+
+
+ # Thread-related flags
+@@ -17,7 +17,7 @@
+
+
+ # Optimization flags
+-CXXFLAGS = -O2
++#CXXFLAGS = -O2
+
+ #CXXFLAGS += -g -Wall
+ #CXXFLAGS += -ansi
+@@ -50,7 +50,7 @@
+
+
+ # Linker flags
+-LDFLAGS =
++#LDFLAGS =
+
+
+ # External libraries
diff --git a/app-arch/pbzip2/metadata.xml b/app-arch/pbzip2/metadata.xml
new file mode 100644
index 000000000000..db352e4aad4f
--- /dev/null
+++ b/app-arch/pbzip2/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <use>
+ <flag name="symlink">Install symlinks which override <pkg>app-arch/bzip2</pkg> implementation</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">pbzip2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pbzip2/pbzip2-1.1.10.ebuild b/app-arch/pbzip2/pbzip2-1.1.10.ebuild
new file mode 100644
index 000000000000..c51e02965dc8
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.10.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.11.ebuild b/app-arch/pbzip2/pbzip2-1.1.11.ebuild
new file mode 100644
index 000000000000..a595877ad5dc
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.11.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.10-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.12.ebuild b/app-arch/pbzip2/pbzip2-1.1.12.ebuild
new file mode 100644
index 000000000000..13b04b6c124e
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.12.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.10-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.8.ebuild b/app-arch/pbzip2/pbzip2-1.1.8.ebuild
new file mode 100644
index 000000000000..d60507cc906c
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.8.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.6-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.9.ebuild b/app-arch/pbzip2/pbzip2-1.1.9.ebuild
new file mode 100644
index 000000000000..860023a048b2
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.9.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pdlzip/Manifest b/app-arch/pdlzip/Manifest
new file mode 100644
index 000000000000..4c4215a68a8e
--- /dev/null
+++ b/app-arch/pdlzip/Manifest
@@ -0,0 +1 @@
+DIST pdlzip-1.5.tar.gz 64443 SHA256 0c2e354cfe62f34ab2e12ac69f45242d8befcfdbdca645a62f039a66d3e63367 SHA512 2e900b591c13c1be50f3dcd76d9a46495f90c1335787fedb09e7c7694371d9cd117bc9158748ff8d12a09369ad4d56e2a33026779bae45f7e7d4adbaceb12585 WHIRLPOOL a86aa8d285f6b8d5efc26051c82ee2033c2a49ba296aacd6404914fc2b149a00ad65b3b49609b8bc3d137e2ca14096c390453d1ad5e37e0ccc56531b79a51071
diff --git a/app-arch/pdlzip/metadata.xml b/app-arch/pdlzip/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/pdlzip/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/pdlzip/pdlzip-1.5.ebuild b/app-arch/pdlzip/pdlzip-1.5.ebuild
new file mode 100644
index 000000000000..5b294f38a911
--- /dev/null
+++ b/app-arch/pdlzip/pdlzip-1.5.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Public-domain version of lzip compressor"
+HOMEPAGE="http://www.nongnu.org/lzip/pdlzip.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86 ~x86-fbsd"
+IUSE=""
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CC="$(tc-getCC)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/pdv/Manifest b/app-arch/pdv/Manifest
new file mode 100644
index 000000000000..44a231cbb617
--- /dev/null
+++ b/app-arch/pdv/Manifest
@@ -0,0 +1 @@
+DIST pdv-1.5.1.tar.gz 87858 SHA256 1c941a571e1f60b903b4b8e5154f1321d32cd593118c9f399e3fed4561a1b1ad SHA512 c8db9aa4c29016474d33111e8343174a1fb25f152517bceb29428def5e02590b1de523ffcf2c0f6ffbaec5b357e3893f48188775c2e66d343a21e04343b1d0e9 WHIRLPOOL f114691b60e80c598eeff6dcf3388670d13ba448ed893b5de6ea0a8a0a31afff993cef0b90fc84ccfeb944c8333accf05d8e6720668b62104c252c7388d7b410
diff --git a/app-arch/pdv/files/pdv-1.5.1-default-args.patch b/app-arch/pdv/files/pdv-1.5.1-default-args.patch
new file mode 100644
index 000000000000..dc61def911fb
--- /dev/null
+++ b/app-arch/pdv/files/pdv-1.5.1-default-args.patch
@@ -0,0 +1,16 @@
+diff -ur pdv-1.5.1.orig/pdv.h pdv-1.5.1/pdv.h
+--- pdv-1.5.1.orig/pdv.h 2001-09-01 12:09:28.000000000 -0700
++++ pdv-1.5.1/pdv.h 2006-07-22 22:20:43.000000000 -0700
+@@ -47,9 +47,9 @@
+ char *cmd; /* command to execute after delivery */
+ char *hlpmsg; /* user help message */
+ char *agrmsg; /* optional agreement message */
+- char iscompressed; /* filter payload through uncompress */
+- char isatar; /* filter payload through tar */
+- char iszipped; /* use internal compression library */
++ signed char iscompressed; /* filter payload through uncompress */
++ signed char isatar; /* filter payload through tar */
++ signed char iszipped; /* use internal compression library */
+ off_t payloadstart; /* start of payload (after pdv stub) */
+ off_t metadatastart; /* start of payload data (at end of file) */
+ };
diff --git a/app-arch/pdv/files/pdv-1.5.1-early-free.patch b/app-arch/pdv/files/pdv-1.5.1-early-free.patch
new file mode 100644
index 000000000000..6896d9437f47
--- /dev/null
+++ b/app-arch/pdv/files/pdv-1.5.1-early-free.patch
@@ -0,0 +1,21 @@
+diff -ur pdv-1.5.1-orig/mkpkgutils.c pdv-1.5.1/mkpkgutils.c
+--- pdv-1.5.1-orig/mkpkgutils.c 2005-04-26 15:01:30.525131384 -0700
++++ pdv-1.5.1/mkpkgutils.c 2005-04-26 15:55:19.004327944 -0700
+@@ -114,8 +114,6 @@
+ if(access(fn_tst, R_OK) == 0)
+ fn = strdup(fn_tst);
+
+- free(fn_tst);
+-
+ /* if we could not find it then try the search path
+ including the current directory as a last resort */
+
+@@ -144,6 +142,8 @@
+ free(path);
+ } /* if(fn == NULL) */
+
++ free(fn_tst);
++
+ return fn;
+ } /* findpdv */
+
diff --git a/app-arch/pdv/files/pdv-1.5.1-no-strip.patch b/app-arch/pdv/files/pdv-1.5.1-no-strip.patch
new file mode 100644
index 000000000000..630bf5eb7c36
--- /dev/null
+++ b/app-arch/pdv/files/pdv-1.5.1-no-strip.patch
@@ -0,0 +1,13 @@
+diff -ur pdv-1.5.1-orig/pdv.c pdv-1.5.1/pdv.c
+--- pdv-1.5.1-orig/Makefile.in 2008-12-06 23:17:46.000000000 -0800
++++ pdv-1.5.1/Makefile.in 2008-12-06 23:18:37.000000000 -0800
+@@ -536,7 +536,8 @@
+ touch $@
+
+ pdv_fixed : pdv_fixed.c pdv
+- $(STRIPBIN) pdv
++ # let portage decide whether to strip binaries
++ #$(STRIPBIN) pdv
+ printf "%-5.5s" $$VERSION >> pdv
+ printf "\000\000\000\000\000\000\000\000" >> pdv
+ sleep 1
diff --git a/app-arch/pdv/files/pdv-1.5.1-opt.patch b/app-arch/pdv/files/pdv-1.5.1-opt.patch
new file mode 100644
index 000000000000..df3ebb1b6699
--- /dev/null
+++ b/app-arch/pdv/files/pdv-1.5.1-opt.patch
@@ -0,0 +1,24 @@
+diff -ur pdv-1.5.1-orig/pdv.c pdv-1.5.1/pdv.c
+--- pdv-1.5.1-orig/pdv.c 2005-04-24 19:27:15.705946000 -0700
++++ pdv-1.5.1/pdv.c 2005-04-24 19:17:27.042436456 -0700
+@@ -79,7 +79,7 @@
+ int
+ main(int argc, char *argv[])
+ {
+- char opt;
++ int opt;
+ int retval = 0;
+ int showhelp = 0;
+ struct payload_st pld_data;
+diff -ur pdv-1.5.1-orig/pdvmkpkg.c pdv-1.5.1/pdvmkpkg.c
+--- pdv-1.5.1-orig/pdvmkpkg.c 2005-04-24 19:27:28.680973496 -0700
++++ pdv-1.5.1/pdvmkpkg.c 2005-04-24 19:21:49.992461976 -0700
+@@ -94,7 +94,7 @@
+ int promptusr = 0;
+ int nopts = 0;
+ int result;
+- char opt;
++ int opt;
+ struct stat payldstat;
+ struct payload_st pld_data;
+ struct pdvspec_st spec;
diff --git a/app-arch/pdv/files/pdv-1.5.1-x-config.patch b/app-arch/pdv/files/pdv-1.5.1-x-config.patch
new file mode 100644
index 000000000000..8bab9bee1bfe
--- /dev/null
+++ b/app-arch/pdv/files/pdv-1.5.1-x-config.patch
@@ -0,0 +1,18 @@
+diff -ur pdv-1.5.1-orig/X11/configure.in pdv-1.5.1/X11/configure.in
+--- pdv-1.5.1-orig/X11/configure.in 2005-05-13 13:43:27.577544136 -0700
++++ pdv-1.5.1/X11/configure.in 2005-05-13 13:36:14.218424736 -0700
+@@ -17,8 +17,12 @@
+ AC_PATH_X
+
+ dnl Checks for libraries.
+-CFLAGS=-I$x_includes
+-LDFLAGS=-L$x_libraries
++if test "x$x_includes" != x ; then
++ CFLAGS="$CFLAGS -I$x_includes"
++fi
++if test "x$x_libraries" != x ; then
++ LDFLAGS="$LDFLAGS -L$x_libraries"
++fi
+
+ AC_CHECK_LIB(Xt, XtManageChild)
+ AC_CHECK_LIB(X11, XLoadFont)
diff --git a/app-arch/pdv/metadata.xml b/app-arch/pdv/metadata.xml
new file mode 100644
index 000000000000..ed5703f6dbb5
--- /dev/null
+++ b/app-arch/pdv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>A payload Delivery vehicle that contains a complete package and
+the commands to install it.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">pdv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pdv/pdv-1.5.1-r2.ebuild b/app-arch/pdv/pdv-1.5.1-r2.ebuild
new file mode 100644
index 000000000000..2c7bb565e956
--- /dev/null
+++ b/app-arch/pdv/pdv-1.5.1-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="build a self-extracting and self-installing binary package"
+HOMEPAGE="http://sourceforge.net/projects/pdv"
+SRC_URI="mirror://sourceforge/pdv/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ppc x86 ~x86-linux ~ppc-macos"
+IUSE="X"
+
+DEPEND="X? ( >=x11-libs/motif-2.3:0
+ >=x11-libs/libX11-1.0.0
+ >=x11-libs/libXt-1.0.0
+ >=x11-libs/libXext-1.0.0
+ >=x11-libs/libXp-1.0.0 )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # fix a size-of-variable bug
+ epatch "${FILESDIR}"/${P}-opt.patch
+ # fix a free-before-use bug
+ epatch "${FILESDIR}"/${P}-early-free.patch
+ # fix a configure script bug
+ epatch "${FILESDIR}"/${P}-x-config.patch
+ # fix default args bug from assuming 'char' is signed
+ epatch "${FILESDIR}"/${P}-default-args.patch
+ # prevent pre-stripped binaries
+ epatch "${FILESDIR}"/${P}-no-strip.patch
+
+ # re-build configure script since patch was applied to configure.in
+ cd "${S}"/X11
+ eautoreconf
+ tc-export CC
+}
+
+src_configure() {
+ local myconf=""
+ use X || myconf="--without-x" # configure script is broken, cant use use_with
+ econf ${myconf}
+}
+
+src_install() {
+ dobin pdv pdvmkpkg
+ doman pdv.1 pdvmkpkg.1
+ if use X ; then
+ dobin X11/xmpdvmkpkg
+ doman xmpdvmkpkg.1
+ fi
+ dodoc AUTHORS ChangeLog NEWS README pdv.lsm
+}
diff --git a/app-arch/pet2tgz/Manifest b/app-arch/pet2tgz/Manifest
new file mode 100644
index 000000000000..ff940faab869
--- /dev/null
+++ b/app-arch/pet2tgz/Manifest
@@ -0,0 +1 @@
+DIST pet2tgz-0.3.tar.gz 90758 SHA256 12a52a3bc40cb62fee5626d1a72aeea64abcd848b2e107e9cb546a404dd6788c SHA512 e6d2612c27184ea06114f9ee1927f0d1c6fa5f2bdecd85366d4b35564b59318a123159180eb3da747d46d4ddcdd2f4ec40def0b10d2882acafe5ed40e84826c5 WHIRLPOOL eeaf761611c559de029a671c95a47e0b12d7d0a84cb8368edeb718a0be923d3cd8bb7ca6c2e3c59669360989abfd1fc96a718b37636c7ef16823e80fd361720b
diff --git a/app-arch/pet2tgz/metadata.xml b/app-arch/pet2tgz/metadata.xml
new file mode 100644
index 000000000000..74382342e237
--- /dev/null
+++ b/app-arch/pet2tgz/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pet2tgz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pet2tgz/pet2tgz-0.3.ebuild b/app-arch/pet2tgz/pet2tgz-0.3.ebuild
new file mode 100644
index 000000000000..fc4a789fecba
--- /dev/null
+++ b/app-arch/pet2tgz/pet2tgz-0.3.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Puppy Linux .pet to .tar.gz converter"
+HOMEPAGE="http://sourceforge.net/projects/pet2tgz/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS="AUTHORS"
diff --git a/app-arch/pigz/Manifest b/app-arch/pigz/Manifest
new file mode 100644
index 000000000000..756d069cebfb
--- /dev/null
+++ b/app-arch/pigz/Manifest
@@ -0,0 +1,2 @@
+DIST pigz-2.3.1.tar.gz 86651 SHA256 629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54 SHA512 7cb00ab87802352c817d9b2f745948199a7e571181aec3ef161305c1d8b828790bc2fb0083d6068ba5aead5d8b8c7f53ec25ab641ae2e98eda9adf14f195dbc6 WHIRLPOOL 242e38d05215269c3c9b6602191cc6e02fd9e781b0425738c3907ccf60da9a4a36ebcda866c9c0e949ad5988dad6b468f97102352d2ed13adb7e890688c221f7
+DIST pigz-2.3.3.tar.gz 92787 SHA256 4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c SHA512 6fa5ee1c03b4a8dc4b191acaa337b6f30132503ff413300214e1e6b27dd70590b53334be3fa880916f6ea4498beb8cf7c411a5954fdf188475882c44618c663c WHIRLPOOL 1eb3ea11a0bbb0bd837a1ed12a63b3d57d8ae9c127e8407f9b82b1aad8a41820abf1d429c513f4df3f56fdc3c842caab07a5c904207b2244e4215a6654ef5392
diff --git a/app-arch/pigz/files/0001-Do-not-return-non-zero-exit-code-when-warnings-issue.patch b/app-arch/pigz/files/0001-Do-not-return-non-zero-exit-code-when-warnings-issue.patch
new file mode 100644
index 000000000000..9d2512e055a4
--- /dev/null
+++ b/app-arch/pigz/files/0001-Do-not-return-non-zero-exit-code-when-warnings-issue.patch
@@ -0,0 +1,47 @@
+From 0c967f989d2f1afe1829cf7cf2f6d36846a625ec Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Sun, 19 Jan 2014 23:21:58 -0800
+Subject: [PATCH] Do not return non-zero exit code when warnings issued.
+
+---
+ pigz.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/pigz.c b/pigz.c
+index 4fefe40..4a16799 100644
+--- a/pigz.c
++++ b/pigz.c
+@@ -478,7 +478,6 @@ local struct {
+ int procs; /* maximum number of compression threads (>= 1) */
+ int setdict; /* true to initialize dictionary in each thread */
+ size_t block; /* uncompressed input size per thread (>= 32K) */
+- int warned; /* true if a warning has been given */
+
+ /* saved gzip/zip header data for decompression, testing, and listing */
+ time_t stamp; /* time stamp from gzip header */
+@@ -519,7 +518,6 @@ local int complain(char *fmt, ...)
+ va_end(ap);
+ putc('\n', stderr);
+ fflush(stderr);
+- g.warned = 1;
+ }
+ return 0;
+ }
+@@ -3929,7 +3927,6 @@ int main(int argc, char **argv)
+ /* initialize globals */
+ g.outf = NULL;
+ g.first = 1;
+- g.warned = 0;
+ g.hname = NULL;
+
+ /* save pointer to program name for error messages */
+@@ -4020,5 +4017,5 @@ int main(int argc, char **argv)
+ /* done -- release resources, show log */
+ new_opts();
+ log_dump();
+- return g.warned ? 2 : 0;
++ return 0;
+ }
+--
+1.8.5.3
+
diff --git a/app-arch/pigz/files/pigz-2.3-make.patch b/app-arch/pigz/files/pigz-2.3-make.patch
new file mode 100644
index 000000000000..f014c7b022ff
--- /dev/null
+++ b/app-arch/pigz/files/pigz-2.3-make.patch
@@ -0,0 +1,25 @@
+From 545a9350f8026f6c9826dd4fa7ab6000d8826d78 Mon Sep 17 00:00:00 2001
+From: Tim Harder <radhermit@gmail.com>
+Date: Wed, 6 Mar 2013 15:51:27 -0800
+Subject: [PATCH] Respect LDFLAGS and explicitly link to math library
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 3cc231d..48d1f26 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@ CFLAGS=-O3 -Wall -Wextra
+
+
+ pigz: pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o
+- $(CC) -o pigz $^ -lpthread -lz
++ $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lz -lm
+ ln -f pigz unpigz
+
+ pigz.o: pigz.c yarn.h zopfli/deflate.h zopfli/util.h
+--
+1.8.1.5
+
diff --git a/app-arch/pigz/files/pigz-2.3.3-ldflags.patch b/app-arch/pigz/files/pigz-2.3.3-ldflags.patch
new file mode 100644
index 000000000000..51c2b81c1fc7
--- /dev/null
+++ b/app-arch/pigz/files/pigz-2.3.3-ldflags.patch
@@ -0,0 +1,34 @@
+--- pigz-2.3.3/Makefile
++++ pigz-2.3.3/Makefile
+@@ -1,11 +1,11 @@
+ CC=cc
+ CFLAGS=-O3 -Wall -Wextra
+-LDFLAGS=-lz
++LIBS=-lm -lz
+ ZOPFLI=zopfli/src/zopfli/
+ # use gcc and gmake on Solaris
+
+ pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm
++ $(CC) $(LDFLAGS) -o pigz $^ -lpthread $(LIBS)
+ ln -f pigz unpigz
+
+ pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h
+@@ -35,7 +35,7 @@
+ dev: pigz pigzt pigzn
+
+ pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm
++ $(CC) $(LDFLAGS) -o pigzt $^ -lpthread $(LIBS)
+
+ pigzt.o: pigz.c yarn.h try.h
+ $(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
+@@ -44,7 +44,7 @@
+ $(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
+
+ pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigzn $^ -lm
++ $(CC) $(LDFLAGS) -o pigzn $^ $(LIBS)
+
+ pigzn.o: pigz.c try.h
+ $(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
diff --git a/app-arch/pigz/metadata.xml b/app-arch/pigz/metadata.xml
new file mode 100644
index 000000000000..8246c88b8239
--- /dev/null
+++ b/app-arch/pigz/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">
+ A parallel implementation of gzip for modern
+ multi-processor, multi-core machines.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/pigz/pigz-2.3.1-r1.ebuild b/app-arch/pigz/pigz-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..f5cf094da2d1
--- /dev/null
+++ b/app-arch/pigz/pigz-2.3.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="A parallel implementation of gzip"
+HOMEPAGE="http://www.zlib.net/pigz/"
+SRC_URI="http://www.zlib.net/pigz/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~mips ~sparc x86 ~amd64-linux ~sparc64-solaris"
+IUSE="static symlink test"
+
+LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? ( app-arch/ncompress )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/0001-Do-not-return-non-zero-exit-code-when-warnings-issue.patch
+}
+
+src_compile() {
+ use static && append-ldflags -static
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dosym ${PN} /usr/bin/un${PN}
+ dodoc README
+ doman ${PN}.1
+
+ if use symlink; then
+ dosym ${PN} /usr/bin/gzip
+ dosym un${PN} /usr/bin/gunzip
+ fi
+}
diff --git a/app-arch/pigz/pigz-2.3.3.ebuild b/app-arch/pigz/pigz-2.3.3.ebuild
new file mode 100644
index 000000000000..0588f5a11da6
--- /dev/null
+++ b/app-arch/pigz/pigz-2.3.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="A parallel implementation of gzip"
+HOMEPAGE="http://www.zlib.net/pigz/"
+SRC_URI="http://www.zlib.net/pigz/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~sparc ~x86 ~amd64-linux ~sparc64-solaris"
+IUSE="static symlink test"
+
+LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? ( app-arch/ncompress )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+}
+
+src_compile() {
+ use static && append-ldflags -static
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dosym ${PN} /usr/bin/un${PN}
+ dodoc README
+ doman ${PN}.1
+
+ if use symlink; then
+ dosym ${PN} /usr/bin/gzip
+ dosym un${PN} /usr/bin/gunzip
+ fi
+}
diff --git a/app-arch/pixz/Manifest b/app-arch/pixz/Manifest
new file mode 100644
index 000000000000..f5ce1c9665c7
--- /dev/null
+++ b/app-arch/pixz/Manifest
@@ -0,0 +1 @@
+DIST pixz-1.0.2.tgz 21425 SHA256 af9dac41edd6bf57953471f7fcbd4793810003bf911593ba4c84f7cccb5f74af SHA512 ea3f37b725a0f08e87a6bc0af19522e92bb5b34fad49cfbfcc04e7054f4537cb09c8f3b56abda7f6d27ce64535b158a676a9e69f92141190840bd9ba255961f3 WHIRLPOOL 76b8af8833b9d87718b0a1fa5f596f6aa820b176b17cbde25f7cd0cf1f6b0cdce6c4d7b7c3d82b3f7b018a60bd6ce1ae6f43263875f0eeef5c93ae889856c60e
diff --git a/app-arch/pixz/files/pixz-1.0.2-lm.patch b/app-arch/pixz/files/pixz-1.0.2-lm.patch
new file mode 100644
index 000000000000..7db039a54a95
--- /dev/null
+++ b/app-arch/pixz/files/pixz-1.0.2-lm.patch
@@ -0,0 +1,25 @@
+From 6c9d6b9020c599f850c0b719cc9c041f1667671b Mon Sep 17 00:00:00 2001
+From: Dave Vasilevsky <dave@vasilevsky.ca>
+Date: Thu, 10 Jan 2013 08:28:06 -0500
+Subject: [PATCH] Fix linking bug (issue 11)
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index fe605f2..3b27690 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ MYCFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=gnu99 \
+ MYLDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall
+
+ THREADS = -lpthread
+-LIBADD = $(THREADS) -llzma -larchive
++LIBADD = $(THREADS) -lm -llzma -larchive
+
+ CC = gcc
+ COMPILE = $(CC) $(MYCFLAGS) $(CFLAGS) -c -o
+--
+1.8.1.2
+
diff --git a/app-arch/pixz/metadata.xml b/app-arch/pixz/metadata.xml
new file mode 100644
index 000000000000..3aa4e7544edf
--- /dev/null
+++ b/app-arch/pixz/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">vasi/pixz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pixz/pixz-1.0.2.ebuild b/app-arch/pixz/pixz-1.0.2.ebuild
new file mode 100644
index 000000000000..4d3d7d56816b
--- /dev/null
+++ b/app-arch/pixz/pixz-1.0.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Parallel Indexed XZ compressor"
+HOMEPAGE="https://github.com/vasi/pixz"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/vasi/pixz.git"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="static"
+
+LIB_DEPEND=">=app-arch/libarchive-2.8:=[static-libs(+)]
+ >=app-arch/xz-utils-5[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-lm.patch
+}
+
+src_configure() {
+ use static && append-ldflags -static
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" OPT=""
+}
+
+src_install() {
+ dobin pixz
+ doman pixz.1
+ dodoc README TODO
+}
diff --git a/app-arch/pixz/pixz-9999.ebuild b/app-arch/pixz/pixz-9999.ebuild
new file mode 100644
index 000000000000..57941097e605
--- /dev/null
+++ b/app-arch/pixz/pixz-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Parallel Indexed XZ compressor"
+HOMEPAGE="https://github.com/vasi/pixz"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="static"
+
+LIB_DEPEND=">=app-arch/libarchive-2.8:=[static-libs(+)]
+ >=app-arch/xz-utils-5[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/vasi/pixz.git"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/vasi/${PN}/archive/v${PV}.zip -> ${P}.zip"
+ KEYWORDS="~amd64 ~arm ~x86"
+ DEPEND="${DEPEND} app-text/asciidoc"
+fi
+
+src_configure() {
+ use static && append-ldflags -static
+}
+
+src_compile() {
+ if [[ ${PV} == "9999" ]] ; then
+ emake CC="$(tc-getCC)" OPT="" all pixz.1
+ else
+ emake CC="$(tc-getCC)" OPT="" all
+ fi
+}
+
+src_install() {
+ dobin pixz
+ doman pixz.1
+ dodoc README TODO
+}
diff --git a/app-arch/plzip/Manifest b/app-arch/plzip/Manifest
new file mode 100644
index 000000000000..323b32980565
--- /dev/null
+++ b/app-arch/plzip/Manifest
@@ -0,0 +1,2 @@
+DIST plzip-1.3.tar.gz 60027 SHA256 45f631ae849cb1372317432478c815725ba00ae67fd7df9fb97df994720234a7 SHA512 7f32978b1c68d546df8c2a60f0dec3594981f08710216ec79d6cbe6fbc4163c5ab54781165689fd30b512159fc02a00a62d588b13166b53ccf94a544f1586173 WHIRLPOOL e943978d600f4eac00c390cdf2168b1cc97a0e888c4be3f1f76814edbbca81c5d1ff2792249d923dd4c4d2f20f7f79dff3b436e78a6f10827583a572b94e428a
+DIST plzip-1.4.tar.gz 60291 SHA256 2a152ee429495cb96c22a51b618d1d19882db3e24aff79329d9c755a2a2f67bb SHA512 f093a121dd94622c666b9bf77ee88f1b6b32647331829b33b49f3e59b7a6c48a700b1f0091b691cd37a67f0a65477d2cc285d95b44db0d262fec5274c53a1755 WHIRLPOOL cdcc3b55b50aaab6f6c66db24d5cfa536bc32475f8af91f435b073c3fec7e3446592e304436e13a09b24367f68dfb515705d545eb019f0b982f14c31eb1497a4
diff --git a/app-arch/plzip/metadata.xml b/app-arch/plzip/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/plzip/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/plzip/plzip-1.3.ebuild b/app-arch/plzip/plzip-1.3.ebuild
new file mode 100644
index 000000000000..6eea19ff6a41
--- /dev/null
+++ b/app-arch/plzip/plzip-1.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Parallel lzip compressor"
+HOMEPAGE="http://www.nongnu.org/lzip/plzip.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-arch/lzlib:0="
+DEPEND=${RDEPEND}
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/plzip/plzip-1.4.ebuild b/app-arch/plzip/plzip-1.4.ebuild
new file mode 100644
index 000000000000..6eea19ff6a41
--- /dev/null
+++ b/app-arch/plzip/plzip-1.4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Parallel lzip compressor"
+HOMEPAGE="http://www.nongnu.org/lzip/plzip.html"
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/lzip/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-arch/lzlib:0="
+DEPEND=${RDEPEND}
+
+src_configure() {
+ # not autotools-based
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/app-arch/ppmd/Manifest b/app-arch/ppmd/Manifest
new file mode 100644
index 000000000000..eb1019a0da86
--- /dev/null
+++ b/app-arch/ppmd/Manifest
@@ -0,0 +1,4 @@
+DIST ppmd_10.1-5.debian.tar.gz 13961 SHA256 f16807685e5a5a27479ea5aa8a243cddcda2e75c2550c19ee335f8b8ffcc221e SHA512 2ed53df72491fe8bce3b8a3b5b3d5ca483f702bc981495f9fd04a5b7828a9fd87057be21083ab2bddd868c5016de868c930e7a2abd9825ec501f3e03276e0137 WHIRLPOOL 7b726891d01321b5690c731433d811c543d0f7093ebf4344e61ceea9e5d6c0eb054562c73e52a044df5969deff991a963f792cd393c846881d1e61d77268d07c
+DIST ppmd_10.1.orig.tar.gz 22048 SHA256 827eb40401a2432551bb97262760462be32613cbbd4afbd94d50067d72570a1c SHA512 8349a24f3a46a0c3dfd779766507d3d12a208f8c988ffe87054b513fa1240a0749a8ea3c9112ba31dc1dfe271574295aa1cb953bedb02efa4992a870d699cf54 WHIRLPOOL 3403365464f545874b0a5debd76abcd001506069b6209a15ae598774ad73f528f6f5432cc75445ff878cba01b02107daeb458bf41b8cd663a0c0359e25880dc5
+DIST ppmd_9.1-14.diff.gz 11929 SHA256 323189cb90cd130debd4dbceb84d1649a0a4ca476a29fb2802319b42af001b5b SHA512 73905f755a4ace015134475c2399f5d7b66ac6ecd8bf52c26aa9959c3ce497e7abd4d2e63c746830863a696894353e6668c5736a5a2918d8982e316c18728257 WHIRLPOOL 50ce768da79bca26d06dec2d1231e727337fc838f7bd691bb4059ddb0e03f7b1f1a1dc710dfdfb500e7c177bb110db93abc3b4159172e1f1b644f417e226940b
+DIST ppmd_9.1.orig.tar.gz 48508 SHA256 5667c1345d450206d04259ef718ba74c15d0af86906adb0e0399c09b0c01b689 SHA512 35f0d2550fa6236c143d752d6af68e8abc125d85430194f99b17977b2d64bf10ad232f64ff68903e7d4e61a84b33f680461f0640e83b48574d8d09bec1d223e9 WHIRLPOOL a93dbc96cd5dcf4685f749baa049400cbc4850f148cc5ed33f8425c26a2aa72b3fac5f26b724f05810831b23a9fac4bd9657e762aab22e951c6630be344a6f36
diff --git a/app-arch/ppmd/files/ppmd-p10-makefile.patch b/app-arch/ppmd/files/ppmd-p10-makefile.patch
new file mode 100644
index 000000000000..87e5ee835954
--- /dev/null
+++ b/app-arch/ppmd/files/ppmd-p10-makefile.patch
@@ -0,0 +1,29 @@
+--- a/Makefile 2005-09-27 18:36:20.000000000 -0500
++++ b/Makefile 2005-09-27 18:55:59.000000000 -0500
+@@ -3,16 +3,12 @@
+ TARGET = PPMd
+ OBJS = PPMd.o Model.o
+
+-prefix = /usr/local
++prefix = /usr
+ bindir = $(prefix)/bin
+
+ INSTALL = install
+ INSTALL_PROGRAM = $(INSTALL) -m 755
+
+-CXXFLAGS = -g -fno-exceptions -fno-rtti -pedantic -Wall \
+- -Wno-unknown-pragmas -Wno-sign-compare -Wno-conversion \
+- -O2 -fomit-frame-pointer -fstrict-aliasing
+-
+ $(TARGET): $(OBJS)
+ $(CXX) -o $@ $^
+
+@@ -24,7 +20,7 @@
+ $(RM) $(TARGET)
+
+ install:
+- $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) -D $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
+
+ .PHONY: clean install
+
diff --git a/app-arch/ppmd/metadata.xml b/app-arch/ppmd/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/app-arch/ppmd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/ppmd/ppmd-10.1_p5.ebuild b/app-arch/ppmd/ppmd-10.1_p5.ebuild
new file mode 100644
index 000000000000..a2737343fff2
--- /dev/null
+++ b/app-arch/ppmd/ppmd-10.1_p5.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCHV="${P##*_p}"
+MY_P="${P%%_*}"
+MY_P="${MY_P/-/_}"
+
+DESCRIPTION="PPM based compressor -- better behaved than bzip2"
+HOMEPAGE="http://packages.qa.debian.org/p/ppmd.html"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${PATCHV}.debian.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="-alpha -amd64 ~hppa -ia64 ~mips ~ppc ~sparc ~x86 ~x86-interix -amd64-linux -ia64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+
+S="${WORKDIR}/${P%%_*}"
+
+src_prepare() {
+ EPATCH_FORCE=yes EPATCH_SUFFIX=patch epatch "${WORKDIR}"/debian/patches/
+ epatch "${FILESDIR}/${PN}-p10-makefile.patch"
+ sed b/Makefile \
+ -e 's|$(CXX)|& $(CFLAGS) $(LDFLAGS)|g' > Makefile \
+ || die "sed b/Makefile"
+}
+
+src_configure() {
+ tc-export CXX
+ replace-flags -O3 -O2
+ append-flags -fno-inline-functions -fno-exceptions -fno-rtti
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${ED}"
+ doman "${WORKDIR}/debian/ppmd.1"
+ dodoc "read_me.txt"
+}
diff --git a/app-arch/ppmd/ppmd-9.1_p14.ebuild b/app-arch/ppmd/ppmd-9.1_p14.ebuild
new file mode 100644
index 000000000000..42853048cc61
--- /dev/null
+++ b/app-arch/ppmd/ppmd-9.1_p14.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+PATCHV="${P##*_p}"
+MY_P="${P%%_*}"
+MY_P="${MY_P/-/_}"
+
+DESCRIPTION="PPM based compressor -- better behaved than bzip2"
+HOMEPAGE="http://packages.qa.debian.org/p/ppmd.html"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${PATCHV}.diff.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="-alpha -amd64 hppa -ia64 ~mips ppc sparc x86 ~x86-interix -amd64-linux -ia64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4
+ app-arch/gzip
+ sys-devel/patch
+ sys-devel/autoconf
+ sys-devel/automake"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}-i1
+
+src_prepare() {
+ epatch "${WORKDIR}/${MY_P}-${PATCHV}.diff"
+ epatch "${S}/${MY_P/_/-}/debian/patches"/*.patch
+ mv "${S}/b/Makefile" "${S}" || die "no makefile found"
+ epatch "${FILESDIR}/${PN}-p10-makefile.patch"
+}
+
+src_configure() {
+ replace-flags -O3 -O2
+ append-flags -fno-inline-functions -fno-exceptions -fno-rtti
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${ED}" || die "failed installing"
+ doman "${S}/${MY_P/_/-}/debian/ppmd.1" || die "failed installing manpage"
+ dodoc "${S}/read_me.txt" || die "failed installed readme"
+}
diff --git a/app-arch/pure-sfv/Manifest b/app-arch/pure-sfv/Manifest
new file mode 100644
index 000000000000..116e350bac51
--- /dev/null
+++ b/app-arch/pure-sfv/Manifest
@@ -0,0 +1 @@
+DIST pure-sfv_0.3_src.tar.gz 79069 SHA256 b5dc97e96656dbe397439c85b0b8ecebddd9d350a09a7485c653ff9210989321 SHA512 defacdaa0b78f708c83198e911ad93a5c5456bf15e2b33df61c984241df8a82ff4d962b8c7994c6413b36a61df2cc6d91c467bf8994fa43e0ac01db2585a78a6 WHIRLPOOL 2befa4d4dd6e0e043e50ca4b69e0024c71c68483af52ffe13bbac569d6f9482d5d167e25e918ddf314cf950e88e7271813c05fd2d1e0177ac6177a619ed7451e
diff --git a/app-arch/pure-sfv/files/pure-sfv-0.3-asneeded.patch b/app-arch/pure-sfv/files/pure-sfv-0.3-asneeded.patch
new file mode 100644
index 000000000000..926dd1318bdc
--- /dev/null
+++ b/app-arch/pure-sfv/files/pure-sfv-0.3-asneeded.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2009-01-03 18:36:24.349399478 +0100
++++ Makefile 2009-01-03 18:36:37.218398964 +0100
+@@ -65,7 +65,7 @@
+ OBJ = ${SRCS:%.c=%.o}
+
+ pure-sfv: $(OBJ)
+- $(CC) -lm -DVERSION=\"$(VERSION)\" $(CFLAGS) -o $(PROG) $(OBJ)
++ $(CC) -DVERSION=\"$(VERSION)\" $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJ) -lm
+
+ PURIFY_OPTIONS=-follow-child-processes=yes -always-use-cache-dir=yes
+ PURIFY=purify
diff --git a/app-arch/pure-sfv/metadata.xml b/app-arch/pure-sfv/metadata.xml
new file mode 100644
index 000000000000..174e6155e7df
--- /dev/null
+++ b/app-arch/pure-sfv/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pure-sfv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pure-sfv/pure-sfv-0.3-r1.ebuild b/app-arch/pure-sfv/pure-sfv-0.3-r1.ebuild
new file mode 100644
index 000000000000..08af26cabeb5
--- /dev/null
+++ b/app-arch/pure-sfv/pure-sfv-0.3-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="utility to test and create .sfv files and create .par files"
+HOMEPAGE="http://pure-sfv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pure-sfv/${PN}_${PV}_src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+IUSE=""
+RESTRICT="test"
+
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ sed -i Makefile -e "s:-Werror -O2 -g::"
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dobin pure-sfv || die "dobin failed"
+ dodoc ReadMe.txt
+}
diff --git a/app-arch/pxz/Manifest b/app-arch/pxz/Manifest
new file mode 100644
index 000000000000..a779dd0254f6
--- /dev/null
+++ b/app-arch/pxz/Manifest
@@ -0,0 +1 @@
+DIST pxz-5.0_pre20110811.tar.xz 11192 SHA256 0059ce89a35ed9d14634903ba1c7aae0a4af6116a6b0f04e10c4602862690ad7 SHA512 d7a837a1b777aad397752efdb0416778bd7b0da93db40528db384b5573702ff9c387c8223a65d1cdec3261cad07ca51ba8dc3bd8be18871d66f63009e144799d WHIRLPOOL f6b9dee63c2888f360f6298b04fb8d58ff20d57838faefa7e96296a37a98263d42b414380820642c9fc57d8ca4f5ff6d1eb7ddca66d09943c2676bf34b0e3a01
diff --git a/app-arch/pxz/metadata.xml b/app-arch/pxz/metadata.xml
new file mode 100644
index 000000000000..f33d0ac2ad6e
--- /dev/null
+++ b/app-arch/pxz/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>chutzpah@gentoo.org</email>
+<name>Patrick McLean</name>
+</maintainer>
+<longdescription lang="en">
+Parallel XZ is a compression utility that takes advantage of running LZMA
+compression of different parts of an input file on multiple cores and
+processors simultaneously. Its primary goal is to utilize all resources
+to speed up compression time with minimal possible influence on compression
+ratio.
+</longdescription>
+</pkgmetadata>
+
diff --git a/app-arch/pxz/pxz-5.0_pre20110811.ebuild b/app-arch/pxz/pxz-5.0_pre20110811.ebuild
new file mode 100644
index 000000000000..125750290860
--- /dev/null
+++ b/app-arch/pxz/pxz-5.0_pre20110811.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit flag-o-matic
+
+DESCRIPTION="Parallel implementation of the XZ compression utility"
+HOMEPAGE="http://jnovy.fedorapeople.org/pxz/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RDEPEND="app-arch/xz-utils"
+DEPEND="${RDEPEND}
+ sys-devel/gcc[openmp]"
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}
diff --git a/app-arch/pxz/pxz-9999.ebuild b/app-arch/pxz/pxz-9999.ebuild
new file mode 100644
index 000000000000..923d40ee5361
--- /dev/null
+++ b/app-arch/pxz/pxz-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit toolchain-funcs flag-o-matic
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://github.com/jnovy/pxz.git"
+ inherit git-2
+else
+ MY_PV=${PV/_}
+ case ${MY_PV} in
+ *beta?*) MY_PV="${MY_PV/beta/beta.}git" ;;
+ esac
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="http://jnovy.fedorapeople.org/pxz/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+ S=${WORKDIR}/${MY_P/beta*/beta}
+fi
+
+DESCRIPTION="parallel LZMA compressor (no parallel decompression!)"
+HOMEPAGE="http://jnovy.fedorapeople.org/pxz/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+# needs the library from xz-utils
+# needs the libgomp library from gcc at runtime
+DEPEND="app-arch/xz-utils
+ sys-devel/gcc[openmp]"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ append-lfs-flags
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+}
diff --git a/app-arch/rar/Manifest b/app-arch/rar/Manifest
new file mode 100644
index 000000000000..a7293d511e64
--- /dev/null
+++ b/app-arch/rar/Manifest
@@ -0,0 +1,12 @@
+DIST rarlinux-4.2.0.tar.gz 938809 SHA256 6826646bc9620055689f465e61f7d4a86e6ccc66940178d24f48d01734968eb5 SHA512 6cf2df60719e06eacedfecb7c30ba941803a537949a04d2a53b261f6975c322391195605873f7ba5307bfd4072d77ded436eb923da7bbaf12f1a3c675ad0e827 WHIRLPOOL 07dcacf990f8e4d2b419a2ff7816154066270aa87ad2e721af37228a0a0f607113f329cca31d56061372b86e171687a5a121f05f19824875889f601026021a50
+DIST rarlinux-5.0.0.tar.gz 1098525 SHA256 4f942d79bb16dc1981ccb52893e4a24dbee908089d783d766ac45cd4f2c78610 SHA512 46ef3d9703a71555e1166467d9658b7d0d210a21cce72957510bbb22870a3a10fc55a6298774c7dfd2ee0d1a2b02dd38fe2e4bcc248d025a7cb276d4d77a6629 WHIRLPOOL af2008d3bca69afc064ff9f5c9201ba99601c2f14173aeb949331cec22e2c9a25b451a7b6375f3c61b848adf003ac6d3788d5b9905bdac64217153d331205761
+DIST rarlinux-5.1.0.tar.gz 1103841 SHA256 586ba2671ace61f2d56fe85e54710b6a588cd9f87f95030b81d9b2aff2292636 SHA512 affe60f9865ad172bb8053af50e977afbb70a43e0cfeefb4e9d6924f2d9718670662a24770e46cf990715d9841ae3387d2c30522075f5cde97a05a2b0da23f22 WHIRLPOOL 9e957ff470130e40d05c2c80064ea39fa5c2fbb3c3ce85381bf9d3c8bac7487e10ab773c2752c8b7cb38906c8792c4b23bb96cd2fe22fdb7f2f764a274d5d2be
+DIST rarlinux-5.2.1.tar.gz 1109839 SHA256 dafe2deb46d0a9cc99b5f4e7204913051d4a2010e08311a0d3565050bd74026f SHA512 bb7ad791f5a34b8d48008a75f9d8008237f36261be6e722d8fdf97a19e70e444c42232544ac63514c354e1d173260dcb635024f72c77afff172f326a137ef21c WHIRLPOOL 6ee7d38bac0c158f0ab6b534544dd7fcd3bf3459219790d2f05ae60df86e7502ca8211580035d62279e99bd427577c4a79bd2eca6e1b99dc2dfde679a07537ec
+DIST rarlinux-x64-4.2.0.tar.gz 979938 SHA256 db4a35d1092eade42fd4233e200c8a24b942c7d67a4b7d0f92914781924b3985 SHA512 48da42222d4e8cc6eb23d21b7f3df1f699dd9624d525cafa81760ca1ed86d7a8c1a70a18a4f89ffd6b4ac65c8aa81c77895692f2c79f8f439dd179ba8d1433be WHIRLPOOL a8c949dffccd8e8774f575b2ac1aaae098e6f253e5c3a355586d2194a753b8f746096e6b3e3a4232001b68c29f39d939ed3c7c4ee89335a850813f32f41cdf56
+DIST rarlinux-x64-5.0.0.tar.gz 1134245 SHA256 aceefdab919a03dfab9892dbd7d25cbc0681f76608de2c73e400887fd625f30c SHA512 0b479703ea5c999274b246ef0d5ff5481bafb814f3342a13993586e252e3979b7e903818dbede7a72f9211150cca62a303d3f98c2e9830c5a4020a3d0635ad74 WHIRLPOOL 8195d69ab7811ea46f73ad11ce49fb183767f0160981891ef65f4183e933a11e90c52929db8f40af6d3fe8da6c6092a7f3985a5c944e3e38ca03c9b8054c78d7
+DIST rarlinux-x64-5.1.0.tar.gz 1139386 SHA256 8c04474201179cc3d3a4f3d1aa7bdd6ee3244479aa16371d2449cf416f882299 SHA512 76b1bf5f7cfc950415d3b9295b010766d1caf7207b86eae00edaf325898e7934909982658c6bc7d113dcc2dbcd7fdb40dc02dddeca63cbc90d69950fde426bb7 WHIRLPOOL 0fa10a995777a2aad7575b2842d5e82c741de9458fd9349c21cb3c8842a260ebc1b8480451c287239a6047b543330279f63fc3a6ac9b0517629997e70ba246dd
+DIST rarlinux-x64-5.2.1.tar.gz 1145110 SHA256 54015e921bf2789ca90afdf913c5a5d57db612bfdbf33eedae7b068aa1016a2d SHA512 fe0f866aa7437608e60d3d760263aa2428d7154f0574140008d19a088b6968b06a02d056bd6e9f1b30f4b06c5fd447bf8383bd823d958c6676cd7d835f14de2c WHIRLPOOL b82f153a9aa1e239e2b1e137c71005ce812ce446911e9f62c43609a810cfb86874aa7137698b7a79326d693d4571da20df19973206412be429f1b593908fa86e
+DIST winrar-x64-420.exe 1656459 SHA256 e1039b5051eef12c37200ab0d3e93d407a5027aad6b59ba705526f670f0634b1 SHA512 906ddbd30ce8503df8b71d5446bfc7a7aae0076313f58dd94523e63acd525b9a323d42f937b772f75fa274740d96c8d21030e6de68610c93d56d37935f40022e WHIRLPOOL 683b96c7c6af6a2562a7de5ab394182d27c58df71a13a0650b5a93edefda14795402d19f8277bfbb08692d3c813671adfef363847b370b53741949708ece608f
+DIST winrar-x64-500.exe 1970848 SHA256 72b1577d0993d1358c7e4d0ebc651b8236c5d6e1a2390b839fb9b34e79fcbb02 SHA512 f99d9bca49d401baeb82108e22728a8cc5652eb17f5fc9ea5ca44d66197ecdb1a0c3a85a114bfaafd4e61593a5c2ceac9c182774af02f17f8e6f9a11eeec0da5 WHIRLPOOL b4d779f9e90eecb59fa94c005576417d92d93491da049512f7c49bbcafdaccfc43d1658d529f8b7e662ebfec930a2e8f68e32916b836ab859585b7a4b1c1de93
+DIST winrar-x64-510.exe 1915800 SHA256 3dad374e0a3b38e5629e8e9d591c77e73199e7714fef2cfb651a133e843971ed SHA512 a7d723ca45d376fe1b003be0ccd0477e51b057784ee14feeb78727207c390a9e31efe481eb998f316ea27f33298b0235690eed71242fa4f591603f3cc7238f20 WHIRLPOOL 9a6992d1cf6e52f352199f037b410853134e77245cb758f641569c91e208a1f693f5a9eb0e0680763b5bd0539fca2bac55b8af13106957a40d32297b8078536e
+DIST winrar-x64-521.exe 1941744 SHA256 e315674d9e2f5f63977fb5fd8e8bcafcdc106594b83e7ba062c5bec24901a5d2 SHA512 b08be6ea9dcbd19ac3849045a18d59a968ade46bcdfe3c6451dbcb5856d294b9dbdb89b1d38dff1749b44c47dc47b4de519ae5561825f06498455ffec48c7822 WHIRLPOOL 4faf6f2379e8b589974bff8fbb4a8a9561d2d60473f7874c0bf163a8915e902d7550847bd808e32ace3f48cfc02246b07b69b50ed848881d84d59d0594fd2322
diff --git a/app-arch/rar/metadata.xml b/app-arch/rar/metadata.xml
new file mode 100644
index 000000000000..9f388db16c09
--- /dev/null
+++ b/app-arch/rar/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>jdhore@gentoo.org</email>
+ <name>Jeff Horelick</name>
+</maintainer>
+<use>
+ <flag name='all_sfx'>
+ Install all SFX (Self-Extracting) files rather than just the native
+ format (allows creation of Windows EXEs on Linux ELF systems)
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/app-arch/rar/rar-4.2.0.ebuild b/app-arch/rar/rar-4.2.0.ebuild
new file mode 100644
index 000000000000..88aaa0266534
--- /dev/null
+++ b/app-arch/rar/rar-4.2.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+
+DESCRIPTION="RAR compressor/uncompressor"
+HOMEPAGE="http://www.rarsoft.com/"
+URI_x86="http://www.rarlab.com/rar/rarlinux-${PV}.tar.gz"
+URI_amd64="http://www.rarlab.com/rar/rarlinux-x64-${PV}.tar.gz"
+URI_w64="http://www.rarlab.com/rar/winrar-x64-${PV//.}.exe"
+SRC_URI="x86? ( ${URI_x86} )
+ amd64? ( ${URI_amd64} )
+ all_sfx? (
+ ${URI_x86}
+ ${URI_amd64}
+ ${URI_w64}
+ )"
+
+LICENSE="RAR"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="all_sfx static"
+
+DEPEND="all_sfx? ( app-arch/unrar )"
+RDEPEND="sys-libs/glibc"
+
+S=${WORKDIR}/${PN}
+
+QA_FLAGS_IGNORED="opt/rar/default.sfx
+ opt/rar/default-elf32.sfx
+ opt/rar/default-elf64.sfx
+ opt/rar/default-win32.sfx
+ opt/rar/default-win64.sfx
+ opt/rar/WinCon.SFX
+ opt/rar/WinCon64.SFX
+ opt/rar/Zip.SFX
+ opt/rar/Zip64.SFX
+ opt/rar/unrar
+ opt/rar/rar"
+QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
+
+src_unpack() {
+ use x86 && unpack ${URI_x86##*/}
+ use amd64 && unpack ${URI_amd64##*/}
+ rm -f "${S}"/license.txt
+ if use all_sfx ; then
+ mkdir sfx
+ cd sfx
+ unpack ${URI_x86##*/}
+ mv rar/default.sfx default-elf32.sfx || die
+ unpack ${URI_amd64##*/}
+ mv rar/default.sfx default-elf64.sfx || die
+ ln -s "${DISTDIR}"/${URI_w64##*/} w64.rar
+ unpack ./w64.rar
+ mv Default.SFX default-win32.sfx || die
+ mv Default64.SFX default-win64.sfx || die
+ fi
+}
+
+src_compile() { :; }
+
+src_install() {
+ exeinto /opt/rar
+ doexe rar unrar || die
+ use static && { newexe rar_static rar || die ; }
+
+ dodir /opt/bin
+ dosym ../rar/rar /opt/bin/rar || die
+ dosym ../rar/unrar /opt/bin/unrar || die
+
+ insinto /opt/rar
+ if use all_sfx ; then
+ doins "${WORKDIR}"/sfx/*.{sfx,SFX} || die
+ else
+ doins default.sfx || die
+ fi
+ doins rarfiles.lst || die
+ dodoc *.txt
+}
diff --git a/app-arch/rar/rar-5.0.0.ebuild b/app-arch/rar/rar-5.0.0.ebuild
new file mode 100644
index 000000000000..063c4f6144b2
--- /dev/null
+++ b/app-arch/rar/rar-5.0.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+MY_PV="${PV/0_beta/b}"
+DESCRIPTION="RAR compressor/uncompressor"
+HOMEPAGE="http://www.rarsoft.com/"
+URI_x86="http://www.rarlab.com/rar/rarlinux-${MY_PV}.tar.gz"
+URI_amd64="http://www.rarlab.com/rar/rarlinux-x64-${MY_PV}.tar.gz"
+URI_w64="http://www.rarlab.com/rar/winrar-x64-${MY_PV//.}.exe"
+SRC_URI="x86? ( ${URI_x86} )
+ amd64? ( ${URI_amd64} )
+ all_sfx? (
+ ${URI_x86}
+ ${URI_amd64}
+ ${URI_w64}
+ )"
+
+LICENSE="RAR"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="all_sfx static"
+
+DEPEND="all_sfx? ( app-arch/unrar )"
+RDEPEND="sys-libs/glibc"
+
+S=${WORKDIR}/${PN}
+
+QA_FLAGS_IGNORED="opt/rar/default.sfx
+ opt/rar/default-elf32.sfx
+ opt/rar/default-elf64.sfx
+ opt/rar/default-win32.sfx
+ opt/rar/default-win64.sfx
+ opt/rar/WinCon.SFX
+ opt/rar/WinCon64.SFX
+ opt/rar/Zip.SFX
+ opt/rar/Zip64.SFX
+ opt/rar/unrar
+ opt/rar/rar"
+QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
+
+src_unpack() {
+ use x86 && unpack ${URI_x86##*/}
+ use amd64 && unpack ${URI_amd64##*/}
+ rm -f "${S}"/license.txt
+ if use all_sfx ; then
+ mkdir sfx
+ cd sfx
+ unpack ${URI_x86##*/}
+ mv rar/default.sfx default-elf32.sfx || die
+ unpack ${URI_amd64##*/}
+ mv rar/default.sfx default-elf64.sfx || die
+ ln -s "${DISTDIR}"/${URI_w64##*/} w64.rar
+ unpack ./w64.rar
+ mv Default.SFX default-win32.sfx || die
+ mv Default64.SFX default-win64.sfx || die
+ fi
+}
+
+src_compile() { :; }
+
+src_install() {
+ exeinto /opt/rar
+ doexe rar unrar || die
+ use static && { newexe rar_static rar || die ; }
+
+ dodir /opt/bin
+ dosym ../rar/rar /opt/bin/rar || die
+ dosym ../rar/unrar /opt/bin/unrar || die
+
+ insinto /opt/rar
+ if use all_sfx ; then
+ doins "${WORKDIR}"/sfx/*.{sfx,SFX} || die
+ else
+ doins default.sfx || die
+ fi
+ doins rarfiles.lst || die
+ dodoc *.txt
+}
diff --git a/app-arch/rar/rar-5.1.0.ebuild b/app-arch/rar/rar-5.1.0.ebuild
new file mode 100644
index 000000000000..fbc5b1ef4829
--- /dev/null
+++ b/app-arch/rar/rar-5.1.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+MY_PV="${PV/0_beta/b}"
+DESCRIPTION="RAR compressor/uncompressor"
+HOMEPAGE="http://www.rarsoft.com/"
+URI_x86="http://www.rarlab.com/rar/rarlinux-${MY_PV}.tar.gz"
+URI_amd64="http://www.rarlab.com/rar/rarlinux-x64-${MY_PV}.tar.gz"
+URI_w64="http://www.rarlab.com/rar/winrar-x64-${MY_PV//.}.exe"
+SRC_URI="x86? ( ${URI_x86} )
+ amd64? ( ${URI_amd64} )
+ all_sfx? (
+ ${URI_x86}
+ ${URI_amd64}
+ ${URI_w64}
+ )"
+
+LICENSE="RAR"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="all_sfx static"
+
+DEPEND="all_sfx? ( app-arch/unrar )"
+RDEPEND="sys-libs/glibc"
+
+S=${WORKDIR}/${PN}
+
+QA_FLAGS_IGNORED="opt/rar/default.sfx
+ opt/rar/default-elf32.sfx
+ opt/rar/default-elf64.sfx
+ opt/rar/default-win32.sfx
+ opt/rar/default-win64.sfx
+ opt/rar/WinCon.SFX
+ opt/rar/WinCon64.SFX
+ opt/rar/Zip.SFX
+ opt/rar/Zip64.SFX
+ opt/rar/unrar
+ opt/rar/rar"
+QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
+
+src_unpack() {
+ use x86 && unpack ${URI_x86##*/}
+ use amd64 && unpack ${URI_amd64##*/}
+ rm -f "${S}"/license.txt
+ if use all_sfx ; then
+ mkdir sfx
+ cd sfx
+ unpack ${URI_x86##*/}
+ mv rar/default.sfx default-elf32.sfx || die
+ unpack ${URI_amd64##*/}
+ mv rar/default.sfx default-elf64.sfx || die
+ ln -s "${DISTDIR}"/${URI_w64##*/} w64.rar
+ unpack ./w64.rar
+ mv Default.SFX default-win32.sfx || die
+ mv Default64.SFX default-win64.sfx || die
+ fi
+}
+
+src_compile() { :; }
+
+src_install() {
+ exeinto /opt/rar
+ doexe rar unrar || die
+ use static && { newexe rar_static rar || die ; }
+
+ dodir /opt/bin
+ dosym ../rar/rar /opt/bin/rar || die
+ dosym ../rar/unrar /opt/bin/unrar || die
+
+ insinto /opt/rar
+ if use all_sfx ; then
+ doins "${WORKDIR}"/sfx/*.{sfx,SFX} || die
+ else
+ doins default.sfx || die
+ fi
+ doins rarfiles.lst || die
+ dodoc *.txt
+}
diff --git a/app-arch/rar/rar-5.2.1.ebuild b/app-arch/rar/rar-5.2.1.ebuild
new file mode 100644
index 000000000000..1010e1183bb5
--- /dev/null
+++ b/app-arch/rar/rar-5.2.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+MY_PV="${PV/0_beta/b}"
+DESCRIPTION="RAR compressor/uncompressor"
+HOMEPAGE="http://www.rarsoft.com/"
+URI_x86="http://www.rarlab.com/rar/rarlinux-${MY_PV}.tar.gz"
+URI_amd64="http://www.rarlab.com/rar/rarlinux-x64-${MY_PV}.tar.gz"
+URI_w64="http://www.rarlab.com/rar/winrar-x64-${MY_PV//.}.exe"
+SRC_URI="x86? ( ${URI_x86} )
+ amd64? ( ${URI_amd64} )
+ all_sfx? (
+ ${URI_x86}
+ ${URI_amd64}
+ ${URI_w64}
+ )"
+
+LICENSE="RAR"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="all_sfx static"
+
+DEPEND="all_sfx? ( app-arch/unrar )"
+RDEPEND="sys-libs/glibc"
+
+S=${WORKDIR}/${PN}
+
+QA_FLAGS_IGNORED="opt/rar/default.sfx
+ opt/rar/default-elf32.sfx
+ opt/rar/default-elf64.sfx
+ opt/rar/default-win32.sfx
+ opt/rar/default-win64.sfx
+ opt/rar/WinCon.SFX
+ opt/rar/WinCon64.SFX
+ opt/rar/Zip.SFX
+ opt/rar/Zip64.SFX
+ opt/rar/unrar
+ opt/rar/rar"
+QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
+
+src_unpack() {
+ use x86 && unpack ${URI_x86##*/}
+ use amd64 && unpack ${URI_amd64##*/}
+ rm -f "${S}"/license.txt
+ if use all_sfx ; then
+ mkdir sfx
+ cd sfx
+ unpack ${URI_x86##*/}
+ mv rar/default.sfx default-elf32.sfx || die
+ unpack ${URI_amd64##*/}
+ mv rar/default.sfx default-elf64.sfx || die
+ ln -s "${DISTDIR}"/${URI_w64##*/} w64.rar
+ unpack ./w64.rar
+ mv Default.SFX default-win32.sfx || die
+ mv Default64.SFX default-win64.sfx || die
+ fi
+}
+
+src_compile() { :; }
+
+src_install() {
+ exeinto /opt/rar
+ doexe rar unrar || die
+ use static && { newexe rar_static rar || die ; }
+
+ dodir /opt/bin
+ dosym ../rar/rar /opt/bin/rar || die
+ dosym ../rar/unrar /opt/bin/unrar || die
+
+ insinto /opt/rar
+ if use all_sfx ; then
+ doins "${WORKDIR}"/sfx/*.{sfx,SFX} || die
+ else
+ doins default.sfx || die
+ fi
+ doins rarfiles.lst || die
+ dodoc *.txt
+}
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest
new file mode 100644
index 000000000000..c21aedd1c8f7
--- /dev/null
+++ b/app-arch/rpm/Manifest
@@ -0,0 +1,4 @@
+DIST rpm-4.11.0.1.tar.bz2 3670158 SHA256 98496c0c73095d7c66a8b6f1d8ab00998e1daf4e46a017ae74190c65132ffb21 SHA512 72bd3054b2d0def1e25fba7113eda14def38baef62b558e65cafaf3b374823d0905d982772cffddfd9dc6698eff293251acb2ace7dfda0964085669caa88d535 WHIRLPOOL bf37145cfecb2820b21f3a79c7c28048bf6b1c25500720d4159083b75535cf79075840b8d73e3b5562aab6ad520e384d0fd4e2aff26fb4e212bb863115682afb
+DIST rpm-4.11.1.tar.bz2 3778922 SHA256 5bbb0899ffdc997d399c4e96311f9cda5364f1fed5164aaf9db685784499ef8c SHA512 ef65b265e74e549c9525da9247a1c81a4fca2b47f49c80b155e8065f0191039b6c56be3ed92fd9dd7a88c36954039a5c1a613e2bfb45599eb9a79d06503a8587 WHIRLPOOL 792c0c6cd45324a9c930aed276189908ed053429a8bc36337c6f6df59bfaa84ae92682b8d8131df9839911ec586cd445875e32c022be03f4da78b101ac235aa5
+DIST rpm-4.11.2.tar.bz2 3988837 SHA256 403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4 SHA512 de3d8e6ca4981bcbf48f9db5f74c03afcc14a3f100a74a721a351183be8c5cc6052be6dce5809976b9aa348a79bfb5bc04b41930f75df4d6fc4021311301ef0e WHIRLPOOL 6bcc13e81a2bd6c4611d341bd0b3e1380f2fbdc2737d1c6526fc79da23525d1c75e64bafb6092a35dad560a5e40df205c191ebed31c774d4b4baa0dc729ecd7a
+DIST rpm-4.12.0.1.tar.bz2 4129093 SHA256 77ddd228fc332193c874aa0b424f41db1ff8b7edbb6a338703ef747851f50229 SHA512 ae751b04cec2463f1f259aec4b4750fca1e4cef6144b7e612d0c94f7b6a2864ed119547568f6acebb7fefddb7b040b6021c1f32cf465963db0b627f524c5760f WHIRLPOOL a6ba52bc98082f24b15d86da24545e5cff9cf5b63f5a0328c274decc554a1f97a8b82cf29e726f3ab2d0a594ded8e1dc919e84f83c3e955f67cca2dc1dae56bb
diff --git a/app-arch/rpm/files/rpm-4.11.0-autotools.patch b/app-arch/rpm/files/rpm-4.11.0-autotools.patch
new file mode 100644
index 000000000000..2a2dcb129de3
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.11.0-autotools.patch
@@ -0,0 +1,14 @@
+diff -urN rpm-4.11.0.1.old/configure.ac rpm-4.11.0.1/configure.ac
+--- rpm-4.11.0.1.old/configure.ac 2013-03-26 18:38:35.137667450 +0100
++++ rpm-4.11.0.1/configure.ac 2013-03-26 18:44:08.632673258 +0100
+@@ -824,10 +810,6 @@
+
+ AC_SUBST(OBJDUMP)
+
+-if test "$with_external_db" = no; then
+- AC_CONFIG_SUBDIRS(db3)
+-fi
+-
+ AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
+ AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
+ AM_CONDITIONAL([HACKINGDOCS],[test "$with_hackingdocs" = yes])
diff --git a/app-arch/rpm/files/rpm-4.8.1-db-path.patch b/app-arch/rpm/files/rpm-4.8.1-db-path.patch
new file mode 100644
index 000000000000..634dd2373ab8
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.8.1-db-path.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile.am b/Makefile.am
+index 587cfa7..498abfb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -177,7 +177,7 @@ EXTRA_DIST += rpmpopt.in
+
+ usrsrcdir = $(prefix)/src
+
+-rpmvardir = $(localstatedir)/lib/rpm
++rpmvardir = $(localstatedir)/rpm
+ rpmvar_DATA =
+
+ install-exec-hook:
+diff --git a/macros.in b/macros.in
+index ae46fcb..213b53c 100644
+--- a/macros.in
++++ b/macros.in
+@@ -155,7 +155,7 @@
+ %_bzip2bin %{__bzip2}
+
+ # The location of the rpm database file(s).
+-%_dbpath %{_var}/lib/rpm
++%_dbpath %{_var}/rpm
+
+ # The location of the rpm database file(s) after "rpm --rebuilddb".
+ %_dbpath_rebuild %{_dbpath}
diff --git a/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch b/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch
new file mode 100644
index 000000000000..221926494411
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch
@@ -0,0 +1,31 @@
+diff -urN rpm-4.9.1.2.old/configure.ac rpm-4.9.1.2/configure.ac
+--- rpm-4.9.1.2.old/configure.ac 2012-04-19 12:18:27.584725220 +0200
++++ rpm-4.9.1.2/configure.ac 2012-04-19 12:34:50.302722933 +0200
+@@ -846,13 +846,7 @@
+ AC_SUBST(RPMCANONGNU)
+ AC_DEFINE_UNQUOTED([RPMCANONVENDOR],["${RPMCANONVENDOR}"],[canonical vendor])
+
+-if test X"$prefix" = XNONE ; then
+- usrprefix="$ac_default_prefix"
+-else
+- usrprefix=$prefix
+-fi
+-
+-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
++RPMCONFIGDIR="`echo ${libexecdir}/rpm/`"
+ AC_SUBST(RPMCONFIGDIR)
+
+ AC_SUBST(OBJDUMP)
+diff -urN rpm-4.9.1.2.old/rpm.am rpm-4.9.1.2/rpm.am
+--- rpm-4.9.1.2.old/rpm.am 2012-04-19 12:18:27.584725220 +0200
++++ rpm-4.9.1.2/rpm.am 2012-04-19 12:24:49.035724332 +0200
+@@ -1,7 +1,5 @@
+ # Internal binaries
+-## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
+-rpmlibexecdir = $(prefix)/lib/rpm
++rpmlibexecdir = $(pkglibexecdir)
+
+ # Host independent config files
+-## HACK: it probably should be $(datadir)/rpm
+-rpmconfigdir = $(prefix)/lib/rpm
++rpmconfigdir = $(pkglibexecdir)
diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml
new file mode 100644
index 000000000000..8ae5ff0b2291
--- /dev/null
+++ b/app-arch/rpm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>sochotnicky@gentoo.org</email>
+ <name>Stanislav Ochotnicky</name>
+</maintainer>
+<herd>suse</herd>
+</pkgmetadata>
diff --git a/app-arch/rpm/rpm-4.11.0.1.ebuild b/app-arch/rpm/rpm-4.11.0.1.ebuild
new file mode 100644
index 000000000000..167156ebfe81
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.0.1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.1.ebuild b/app-arch/rpm/rpm-4.11.1.ebuild
new file mode 100644
index 000000000000..4b1e7b34d81d
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.2-r1.ebuild b/app-arch/rpm/rpm-4.11.2-r1.ebuild
new file mode 100644
index 000000000000..31ff807f0216
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.2-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+ # fix #492642
+ sed -i 's:@__PYTHON@:/usr/bin/python2:' macros.in || die "Fixing %__python failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.2.ebuild b/app-arch/rpm/rpm-4.11.2.ebuild
new file mode 100644
index 000000000000..4b1e7b34d81d
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.12.0.1.ebuild b/app-arch/rpm/rpm-4.12.0.1.ebuild
new file mode 100644
index 000000000000..2d628ce01ceb
--- /dev/null
+++ b/app-arch/rpm/rpm-4.12.0.1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ app-arch/libarchive
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+ # fix #492642
+ sed -i 's:@__PYTHON@:/usr/bin/python2:' macros.in || die "Fixing %__python failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm2targz/Manifest b/app-arch/rpm2targz/Manifest
new file mode 100644
index 000000000000..6f6263dda375
--- /dev/null
+++ b/app-arch/rpm2targz/Manifest
@@ -0,0 +1 @@
+DIST rpm2targz-9.0.0.5g.tar.xz 5740 SHA256 4327b7dd30bf55e473198444b920029624948e24af575edff9ce466dcd4075e0 SHA512 a595d23581bd396a3a00b6eae4cf6edca1c65b52510a02c7b162afc3d89f45026663a271279bb519741b4a35a0ee653fbfb124c5a7d6d921b466dc9236cbf549 WHIRLPOOL 24ef16afdd2c6fc1c803d849da9140bf53c10ecc041a1b3363459d233f5862a97f6199186932eaeb43e8100e4b2c015d3c0253a2e0d993b246f9fd0f692ab45b
diff --git a/app-arch/rpm2targz/metadata.xml b/app-arch/rpm2targz/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/app-arch/rpm2targz/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/app-arch/rpm2targz/rpm2targz-9.0.0.5g.ebuild b/app-arch/rpm2targz/rpm2targz-9.0.0.5g.ebuild
new file mode 100644
index 000000000000..7b517ec1cad3
--- /dev/null
+++ b/app-arch/rpm2targz/rpm2targz-9.0.0.5g.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Convert a .rpm file to a .tar.gz archive"
+HOMEPAGE="http://www.slackware.com/config/packages.php"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="BSD-1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="app-arch/cpio"
+DEPEND="app-arch/xz-utils"
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install # need explicit install line #397835
+ dodoc *.README*
+}
diff --git a/app-arch/rzip/Manifest b/app-arch/rzip/Manifest
new file mode 100644
index 000000000000..dba33d0b7141
--- /dev/null
+++ b/app-arch/rzip/Manifest
@@ -0,0 +1 @@
+DIST rzip-2.1.tar.gz 46785 SHA256 4bb96f4d58ccf16749ed3f836957ce97dbcff3e3ee5fd50266229a48f89815b7 SHA512 06ed760ba2b7f09781a2e9312b645d41c145f96e3ee55ddf573714493e92466366ec6394267e5e06b0d8c42dcb67e1ae99dafa417a84737ce2b4a650a9059a6f WHIRLPOOL 7a08328c9854fd0448661dd284707e9c8bfcab5017907c0ec758067e180863b0fb72a457a13c5d1f278c937e2dc6753528e5322ac09a3630810cdd6ae5297d99
diff --git a/app-arch/rzip/files/rzip-2.1-darwin.patch b/app-arch/rzip/files/rzip-2.1-darwin.patch
new file mode 100644
index 000000000000..b07aa1712309
--- /dev/null
+++ b/app-arch/rzip/files/rzip-2.1-darwin.patch
@@ -0,0 +1,163 @@
+--- a/configure.in 2003-11-03 09:19:11.000000000 +0100
++++ b/configure.in 2008-07-27 21:59:45.774740303 +0200
+@@ -2,6 +2,12 @@
+ AC_INIT(main.c)
+ AC_CONFIG_HEADER(config.h)
+
++# test prior to AC_PROG_CC, since it sets cflags on it's own.
++if test x"CFLAGS" = x
++then
++ DEFAULT_CFLAGS="-g -Wall -O3"
++fi
++
+ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
+@@ -9,10 +15,10 @@
+ AC_SYS_LARGEFILE
+
+ # Thanks to Martin Pool
+-if test x"$GCC" = xyes
++if test x"$GCC" = xyes && test x"$DEFAULT_CFLAGS" != x
+ then
+ CFLAGS="-g -Wall -O3"
+- AC_MSG_NOTICE([Setting gcc options: $CFLAGS])
++ AC_MSG_RESULT([Setting default cflags: $CFLAGS])
+ fi
+
+ AC_CHECK_HEADERS(fcntl.h sys/time.h sys/unistd.h unistd.h)
+@@ -45,12 +51,8 @@
+ AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, ,
+ AC_MSG_ERROR([Could not find bz2 library - please install libbz2-devel]))
+
+-echo $ac_n "checking for errno in errno.h... $ac_c"
+-AC_TRY_COMPILE([#include <errno.h>],[int i = errno],
+-echo yes; AC_DEFINE(HAVE_ERRNO_DECL),
+-echo no)
+-
+ AC_CHECK_FUNCS(mmap strerror)
+ AC_CHECK_FUNCS(getopt_long)
++AC_CHECK_FUNCS(strndup)
+
+ AC_OUTPUT(Makefile)
+--- a/main.c 2006-02-14 01:38:23.000000000 +0100
++++ b/main.c 2008-07-27 22:00:28.298071207 +0200
+@@ -18,6 +18,7 @@
+ /* rzip compression - main program */
+
+ #include "rzip.h"
++#include "strutils.h"
+
+ static void usage(void)
+ {
+--- a/rzip.h 2006-02-14 01:38:23.000000000 +0100
++++ b/rzip.h 2008-07-27 21:58:08.204752617 +0200
+@@ -94,7 +94,7 @@
+ #define strerror(i) sys_errlist[i]
+ #endif
+
+-#ifndef HAVE_ERRNO_DECL
++#if !defined(errno)
+ extern int errno;
+ #endif
+
+--- a/strutils.c 1970-01-01 01:00:00.000000000 +0100
++++ b/strutils.c 2008-07-27 21:58:08.204752617 +0200
+@@ -0,0 +1,29 @@
++/*
++ Copyright (C) 2005 Gentoo Foundation
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++/* string utilities that may be missing on various platforms */
++
++#include "strutils.h"
++
++#ifndef HAVE_STRNDUP
++char* strndup(const char* s, size_t n) {
++ char* ret = malloc(n + 1);
++ if (ret == NULL) return(ret);
++ ret[n] = '\0';
++ return(memcpy(ret, s, n));
++}
++#endif
+--- a/strutils.h 1970-01-01 01:00:00.000000000 +0100
++++ b/strutils.h 2008-07-27 21:58:08.204752617 +0200
+@@ -0,0 +1,31 @@
++/*
++ Copyright (C) 2005 Gentoo Foundation
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++/* string utilities that may be missing on various platforms */
++
++#ifndef _HEADER_STRUTIL
++#define _HEADER_STRUTIL 1
++
++#include <stdlib.h>
++#include <string.h>
++#include "config.h"
++
++# ifndef HAVE_STRNDUP
++char* strndup(const char* s, size_t n);
++# endif
++
++#endif
+--- a/Makefile.in 2006-02-14 01:38:23.000000000 +0100
++++ b/Makefile.in 2010-08-26 23:34:38.000000000 +0200
+@@ -3,8 +3,8 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-INSTALL_BIN=$(exec_prefix)/bin
+-INSTALL_MAN=$(prefix)/man
++INSTALL_BIN=$(DESTDIR)/@bindir@
++INSTALL_MAN=$(DESTDIR)/@mandir@
+
+ LIBS=@LIBS@
+ CC=@CC@
+@@ -20,7 +20,7 @@
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+
+-OBJS= rzip.o runzip.o main.o stream.o util.o crc32.o
++OBJS= rzip.o runzip.o strutils.o main.o stream.o util.o crc32.o
+
+ # note that the -I. is needed to handle config.h when using VPATH
+ .c.o:
+@@ -35,9 +35,10 @@
+ ${INSTALLCMD} -m 755 rzip ${INSTALL_BIN}
+ -mkdir -p ${INSTALL_MAN}/man1
+ ${INSTALLCMD} -m 644 $(srcdir)/rzip.1 ${INSTALL_MAN}/man1/
++ ln -s rzip $(INSTALL_BIN)/runzip
+
+ rzip: $(OBJS)
+- $(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o rzip $(OBJS) $(LIBS)
+
+ rzip.1: rzip.yo
+ yodl2man -o rzip.1 rzip.yo
diff --git a/app-arch/rzip/metadata.xml b/app-arch/rzip/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/app-arch/rzip/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/rzip/rzip-2.1-r2.ebuild b/app-arch/rzip/rzip-2.1-r2.ebuild
new file mode 100644
index 000000000000..6c0c8edad44a
--- /dev/null
+++ b/app-arch/rzip/rzip-2.1-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="Compression program for large files"
+HOMEPAGE="http://rzip.samba.org"
+SRC_URI="http://rzip.samba.org/ftp/rzip/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ppc ~ppc64 ~sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND="app-arch/bzip2"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1-darwin.patch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+}
+
+pkg_postinst() {
+ ewarn "Warning: Gentoo shipped a broken rzip for quite some time. During"
+ ewarn "compression of large files it didn't set the right file size, so"
+ ewarn "if you have any reason to believe that your archive was compressed "
+ ewarn "with an old Gentoo rzip, please refer to "
+ ewarn " http://bugs.gentoo.org/show_bug.cgi?id=217552 "
+ ewarn "for the rzip-handle-broken-archive.patch patch to rescue your"
+ ewarn "data."
+ ewarn
+ ewarn "We apologize for the inconvenience."
+}
diff --git a/app-arch/sharutils/Manifest b/app-arch/sharutils/Manifest
new file mode 100644
index 000000000000..790839a8225e
--- /dev/null
+++ b/app-arch/sharutils/Manifest
@@ -0,0 +1,3 @@
+DIST sharutils-4.14.tar.xz 1089052 SHA256 eae388efcf52aba0b081f09053189e0a3ad238561d88716b880b5c0676c07a0c SHA512 c1b87bc87915f7aebc9e02dfc1e08321f5ed2e144509c063139cde23eb8f75cb6469aa8042e4c6ec801f55d805e595f4c1c674cf5f2b4580a1e4933fcd605614 WHIRLPOOL dc3f9f3e2caaf296fbf6317f4b8eb1d4d8b8cb5aef59ef570dd24483afcaf3dd55f46e07a70e1213b393390c77e631e60891adae52ff9693ad446692189db649
+DIST sharutils-4.15.1.tar.xz 1126672 SHA256 b92ce637dbf95a69888ba70a55ecc8b527417fee9b518316eb7c650e8e90e70a SHA512 791e37730cfff36ef96793ff7e70af05845eef72c6f581ce05a873d7d9beb7d42504a253fb944c77938f355c5d29c1a9de78653812fbbf859574b7b72dc4d8e1 WHIRLPOOL d8ae0afe7857e708cb92061a759121058b18dd9da402088fccd63a0e974ba57e9f9340a161fa05639004fa9ddfb5d215e4fb30eb90eba71c9f3c661a06b89b22
+DIST sharutils-4.15.2.tar.xz 1122476 SHA256 2b05cff7de5d7b646dc1669bc36c35fdac02ac6ae4b6c19cb3340d87ec553a9a SHA512 80d0b804a0617e11e5c23dc0d59b218bbf93e40aaf5e9a5401a18ef9cb700390aab711e2b2e2f26c8fd5b8ef99a91d3405e01d02cadabcba7639979314e59f8d WHIRLPOOL 2e29cdad58bf530b401509fcd480fdd4dd8bd98c7b90dcb5a9ab7a6feadd9d98d8bcb0bb2b18c176c17b856061ac9f81ecac25e37c7f7fddc4938205c6bd3eb6
diff --git a/app-arch/sharutils/files/sharutils-4.14-popen-rb.patch b/app-arch/sharutils/files/sharutils-4.14-popen-rb.patch
new file mode 100644
index 000000000000..c502a623c1f6
--- /dev/null
+++ b/app-arch/sharutils/files/sharutils-4.14-popen-rb.patch
@@ -0,0 +1,33 @@
+delete the run time test which dies on cross-compiles.
+we know the answer already, so hardcode it to true.
+
+--- a/configure
++++ b/configure
+@@ -30745,25 +30745,8 @@
+ CATALOGS="$new_CATALOGS"
+ fi
+
+-if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+- FILE * fp = popen ("date", "rb");
+- exit (fp == NULL);
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
++if false; then
++if true; then
+
+ $as_echo "#define BINARY_MODE_POPEN 1" >>confdefs.h
+
diff --git a/app-arch/sharutils/metadata.xml b/app-arch/sharutils/metadata.xml
new file mode 100644
index 000000000000..801bcd0759e5
--- /dev/null
+++ b/app-arch/sharutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:sharutils</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/app-arch/sharutils/sharutils-4.14-r1.ebuild b/app-arch/sharutils/sharutils-4.14-r1.ebuild
new file mode 100644
index 000000000000..f343c7a75ddc
--- /dev/null
+++ b/app-arch/sharutils/sharutils-4.14-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${P/_/-}"
+DESCRIPTION="Tools to deal with shar archives"
+HOMEPAGE="http://www.gnu.org/software/sharutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+DEPEND="app-arch/xz-utils
+ sys-apps/texinfo
+ nls? ( >=sys-devel/gettext-0.10.35 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.14-popen-rb.patch
+}
+
+src_configure() {
+ strip-linguas -u po
+ econf $(use_enable nls)
+}
diff --git a/app-arch/sharutils/sharutils-4.15.1.ebuild b/app-arch/sharutils/sharutils-4.15.1.ebuild
new file mode 100644
index 000000000000..7507701ad983
--- /dev/null
+++ b/app-arch/sharutils/sharutils-4.15.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${P/_/-}"
+DESCRIPTION="Tools to deal with shar archives"
+HOMEPAGE="http://www.gnu.org/software/sharutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+DEPEND="app-arch/xz-utils
+ sys-apps/texinfo
+ nls? ( >=sys-devel/gettext-0.10.35 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.14-popen-rb.patch
+}
+
+src_configure() {
+ strip-linguas -u po
+ econf $(use_enable nls)
+}
diff --git a/app-arch/sharutils/sharutils-4.15.2.ebuild b/app-arch/sharutils/sharutils-4.15.2.ebuild
new file mode 100644
index 000000000000..bfb92941f7ec
--- /dev/null
+++ b/app-arch/sharutils/sharutils-4.15.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${P/_/-}"
+DESCRIPTION="Tools to deal with shar archives"
+HOMEPAGE="http://www.gnu.org/software/sharutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+DEPEND="app-arch/xz-utils
+ sys-apps/texinfo
+ nls? ( >=sys-devel/gettext-0.10.35 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ strip-linguas -u po
+ econf $(use_enable nls)
+}
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
new file mode 100644
index 000000000000..f81a04a6fc79
--- /dev/null
+++ b/app-arch/snappy/Manifest
@@ -0,0 +1,2 @@
+DIST snappy-1.1.1.tar.gz 1777992 SHA256 d79f04a41b0b513a014042a4365ec999a1ad5575e10d5e5578720010cb62fab3 SHA512 36b6a1934579dd82a67bcc46626f8dbe9d24d53fe2ca1eca2982d2091054241c9797ada0d4657c484ebc82e7ec11069fd9cd83aac61f4aa1a530167d899041f3 WHIRLPOOL f95ae11130ddd32123e202d6a179b04a5424593937ada0baee9bd17fbb980a9d2d0242df7eb48d795f5d98879b7b025070008852ad7324bc850c0ab0b245612e
+DIST snappy-1.1.2.tar.gz 1485435 SHA256 f9d8fe1c85494f62dbfa3efe8e73bc23d8dec7a254ff7fe09ec4b0ebfc586af4 SHA512 da0e80528dfc815d765347c60dc5f14bc7fb882cc6894b87d3a43dec1a127cf8bcfe46e6cb93e130790c0ebd67368a1042500d9080f844441803c1b69c3cc07e WHIRLPOOL a9cf520cc578a0a63ebb7fb127428b50d282cdf2448938ad88349f775e21b3dd27f2c6843f86dd749d66e9df5e29094bc5c67032f0219932fec69f882ec91246
diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml
new file mode 100644
index 000000000000..c9ad814e5692
--- /dev/null
+++ b/app-arch/snappy/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">Snappy is a compression/decompression library. It does not aim for
+ maximum compression, or compatibility with any other compression
+ library; instead, it aims for very high speeds and reasonable
+ compression.</longdescription>
+ <upstream>
+ <remote-id type="google-code">snappy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/snappy/snappy-1.1.1.ebuild b/app-arch/snappy/snappy-1.1.1.ebuild
new file mode 100644
index 000000000000..4da8c027bd50
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://code.google.com/p/snappy/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DOCS="AUTHORS ChangeLog README NEWS format_description.txt"
+
+src_prepare() {
+ # Avoid automagic lzop and gzip by not checking for it
+ sed -i -e '/^CHECK_EXT_COMPRESSION_LIB/d' "${S}/configure.ac" || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-gflags \
+ --disable-gtest \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # Remove docs installed by snappy itself
+ rm -rf "${ED}/usr/share/doc/snappy" || die
+
+ prune_libtool_files
+}
diff --git a/app-arch/snappy/snappy-1.1.2-r1.ebuild b/app-arch/snappy/snappy-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..afb12bbf10e5
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTO_DEPEND="yes"
+inherit eutils autotools-multilib
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://code.google.com/p/snappy/"
+# upstream uses google drive which has hash-based URLS
+SRC_URI="http://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+src_prepare() {
+ # Avoid automagic lzo and gzip by not checking for it
+ sed -i '/^CHECK_EXT_COMPRESSION_LIB/d' configure.ac || die
+
+ # don't install unwanted files
+ sed -i 's/COPYING INSTALL//' Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --without-gflags \
+ --disable-gtest \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+}
diff --git a/app-arch/snappy/snappy-1.1.2.ebuild b/app-arch/snappy/snappy-1.1.2.ebuild
new file mode 100644
index 000000000000..8d3e8e6dcf7d
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://code.google.com/p/snappy/"
+# upstream uses google drive which has hash-based URLS
+SRC_URI="http://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+src_prepare() {
+ # Avoid automagic lzo and gzip by not checking for it
+ sed -i '/^CHECK_EXT_COMPRESSION_LIB/d' configure.ac || die
+
+ # don't install unwanted files
+ sed -i 's/COPYING INSTALL//' Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --without-gflags \
+ --disable-gtest \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/app-arch/star/Manifest b/app-arch/star/Manifest
new file mode 100644
index 000000000000..4221d04c68a7
--- /dev/null
+++ b/app-arch/star/Manifest
@@ -0,0 +1,2 @@
+DIST star-1.5.2.tar.bz2 874558 SHA256 762645b98af13bb9b0512812814ec8e90635d1400c94eb5911e9774daed2addf SHA512 6ea9bd3db79a83c5fae5cb791ea6fc2d79cb464d97702ca0167fdd068df77f047a53037f5be342f138dd950c2c863ee07de0bf3390e37d39a1105634ca8fc9d5 WHIRLPOOL 957a499bdbc7cca5704635c89bd7703fb0018ee22ab99a7cacab4b5241131001f6b9a65b69c227dc513c210d772b4a3a560a1a5d602e6b9dde4778ab1a329876
+DIST star-1.5.3.tar.bz2 889881 SHA256 070342833ea83104169bf956aa880bcd088e7af7f5b1f8e3d29853b49b1a4f5b SHA512 622032a0e87f3df06ab1091af0af99d0362f478f70351cfe3d47195eec0fcc96f458fb6e50cae3531183984b1d390b598176ce008bcc5f29764795f66436efef WHIRLPOOL fd786e38666392813311d04350680bb9e1f4cf892412697652f8531eec95b9954c8e0ec3d1538dc1a7cc469e28dbbc38a0a21f8e210fdf929a65de3b73ab55d6
diff --git a/app-arch/star/files/star-1.5.1-bufferoverflow.patch b/app-arch/star/files/star-1.5.1-bufferoverflow.patch
new file mode 100644
index 000000000000..afc0b4aa2b58
--- /dev/null
+++ b/app-arch/star/files/star-1.5.1-bufferoverflow.patch
@@ -0,0 +1,21 @@
+diff -urNp star-1.5.1-orig/star/longnames.c star-1.5.1/star/longnames.c
+--- star-1.5.1-orig/star/longnames.c 2009-10-16 00:38:55.000000000 +0200
++++ star-1.5.1/star/longnames.c 2010-02-03 13:36:03.000000000 +0100
+@@ -155,7 +155,7 @@ name_to_tcb(info, ptb)
+ if (add)
+ strcatl(ptb->dbuf.t_name, name, "/", (char *)NULL);
+ else
+- strcpy(ptb->dbuf.t_name, name);
++ strncpy(ptb->dbuf.t_name, name, props.pr_maxsname);
+ return (TRUE);
+ }
+
+@@ -198,7 +198,7 @@ name_to_tcb(info, ptb)
+ if (add)
+ strcatl(ptb->dbuf.t_name, &np[1], "/", (char *)NULL);
+ else
+- strcpy(ptb->dbuf.t_name, &np[1]);
++ strncpy(ptb->dbuf.t_name, &np[1], props.pr_maxsname);
+ strncpy(ptb->dbuf.t_prefix, name, np - name);
+ info->f_flags |= F_SPLIT_NAME;
+ return (TRUE);
diff --git a/app-arch/star/files/star-1.5.1-changewarnSegv.patch b/app-arch/star/files/star-1.5.1-changewarnSegv.patch
new file mode 100644
index 000000000000..74d4870d5555
--- /dev/null
+++ b/app-arch/star/files/star-1.5.1-changewarnSegv.patch
@@ -0,0 +1,80 @@
+--- star-1.5/star/checkerr.c.orig-segv 2006-10-31 18:06:25.000000000 +0100
++++ star-1.5/star/checkerr.c 2007-08-27 11:42:39.000000000 +0200
+@@ -183,39 +183,45 @@ LOCAL struct eflags {
+ */
+ LOCAL UInt32_t
+ errflags(eflag, doexit)
+- char *eflag;
+- BOOL doexit;
++ char *eflag;
++ BOOL doexit;
+ {
+- register char *p = eflag;
+- char *ef = _endword(eflag);
+- register struct eflags *ep;
+- register int slen;
+- register UInt32_t nflags = 0;
+-
+- do {
+- for (ep = eflags; ep->fname; ep++) {
+- slen = strlen(ep->fname);
+- if ((strncmp(ep->fname, p, slen) == 0) &&
+- (p[slen] == '|' || p[slen] == ' ' ||
+- p[slen] == '\0')) {
+- nflags |= ep->fval;
+- break;
+- }
+- }
+- if (ep->fname == NULL) {
+- if (doexit)
+- comerrno(EX_BAD, "Bad flag '%s'\n", p);
+- return (0);
+- }
+- p = strchr(p, '|');
+- } while (p < ef && p && *p++ == '|');
+-
+- if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
+- if (doexit)
+- comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
+- return (0);
+- }
+- return (nflags);
++ register struct eflags *ep;
++ register int slen;
++ register UInt32_t nflags = 0;
++ char *curflags;
++ char *curflag;
++
++ curflags = strdup (eflag);
++ *_endword(curflags) = '\0';
++ curflag = strtok (curflags, "|");
++
++ while (curflag != NULL) {
++ for (ep = eflags; ep->fname; ep++) {
++ slen = strlen (ep->fname);
++ if ((strncmp (ep->fname, curflag, slen)) == 0) {
++ nflags |= ep->fval;
++ goto next;
++ }
++ }
++
++ if (doexit)
++ comerrno (EX_BAD, "Bad flag '%s' \n", curflag);
++
++ free (curflags);
++ return (0);
++ next:
++ curflag = strtok (NULL, "|");
++ }
++
++ free (curflags);
++
++ if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
++ if (doexit)
++ comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
++ return (0);
++ }
++ return (nflags);
+ }
+
+ LOCAL ec_t *
diff --git a/app-arch/star/files/star-1.5.1-multivolsigsegv.patch b/app-arch/star/files/star-1.5.1-multivolsigsegv.patch
new file mode 100644
index 000000000000..204a29d89e91
--- /dev/null
+++ b/app-arch/star/files/star-1.5.1-multivolsigsegv.patch
@@ -0,0 +1,12 @@
+diff -urNp star-1.5.1-orig/star/buffer.c star-1.5.1/star/buffer.c
+--- star-1.5.1-orig/star/buffer.c 2009-07-13 21:05:02.000000000 +0200
++++ star-1.5.1/star/buffer.c 2011-01-04 13:50:25.452138625 +0100
+@@ -799,7 +799,7 @@ initbuf(nblocks)
+
+ bigptr = bigbuf = ___malloc((size_t) bufsize+10+pagesize,
+ "buffer");
+- bigptr = bigbuf = (char *)roundup((Intptr_t)bigptr, pagesize);
++ bigptr = bigbuf = (char *)roundup((UIntptr_t)bigptr, pagesize);
+ fillbytes(bigbuf, bufsize, '\0');
+ fillbytes(&bigbuf[bufsize], 10, 'U');
+
diff --git a/app-arch/star/files/star-1.5.1-stdioconflict.patch b/app-arch/star/files/star-1.5.1-stdioconflict.patch
new file mode 100644
index 000000000000..e0be2d4eb4c0
--- /dev/null
+++ b/app-arch/star/files/star-1.5.1-stdioconflict.patch
@@ -0,0 +1,92 @@
+diff -urNp star-1.5.1-orig/include/schily/schily.h star-1.5.1/include/schily/schily.h
+--- star-1.5.1-orig/include/schily/schily.h 2009-10-22 23:18:55.000000000 +0200
++++ star-1.5.1/include/schily/schily.h 2010-01-13 13:17:10.000000000 +0100
+@@ -174,7 +174,7 @@ extern int fexecle __PR((const char *, F
+ /* 6th arg not const, fexecv forces av[ac] = NULL */
+ extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
+ char **));
+-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
++extern int sch_fexecve __PR((const char *, FILE *, FILE *, FILE *,
+ char * const *, char * const *));
+ extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
+ extern int fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
+@@ -311,7 +311,7 @@ extern char *findbytes __PR((const void
+ extern char *findinpath __PR((char *__name, int __mode, BOOL __plain_file));
+ extern int findline __PR((const char *, char, const char *,
+ int, char **, int));
+-extern int getline __PR((char *, int));
++extern int sch_getline __PR((char *, int));
+ extern int getstr __PR((char *, int));
+ extern int breakline __PR((char *, char, char **, int));
+ extern int getallargs __PR((int *, char * const**, const char *, ...));
+diff -urNp star-1.5.1-orig/lib/fexec.c star-1.5.1/lib/fexec.c
+--- star-1.5.1-orig/lib/fexec.c 2009-11-15 15:14:28.000000000 +0100
++++ star-1.5.1/lib/fexec.c 2010-01-13 13:17:10.000000000 +0100
+@@ -198,7 +198,7 @@ const char **pav;
+ } while (p != NULL);
+ va_end(args);
+
+- ret = fexecve(name, in, out, err, av, env);
++ ret = sch_fexecve(name, in, out, err, av, env);
+ if (av != xav)
+ free(av);
+ return (ret);
+@@ -212,11 +212,11 @@ fexecv(name, in, out, err, ac, av)
+ char *av[];
+ {
+ av[ac] = NULL; /* force list to be null terminated */
+- return (fexecve(name, in, out, err, av, environ));
++ return (sch_fexecve(name, in, out, err, av, environ));
+ }
+
+ EXPORT int
+-fexecve(name, in, out, err, av, env)
++sch_fexecve(name, in, out, err, av, env)
+ const char *name;
+ FILE *in, *out, *err;
+ char * const av[], * const env[];
+diff -urNp star-1.5.1-orig/lib/libschily-mapvers star-1.5.1/lib/libschily-mapvers
+--- star-1.5.1-orig/lib/libschily-mapvers 2007-10-06 15:21:55.000000000 +0200
++++ star-1.5.1/lib/libschily-mapvers 2010-01-13 13:17:10.000000000 +0100
+@@ -77,7 +77,7 @@ global:
+ fexecl;
+ fexecle;
+ fexecv;
+- fexecve;
++ sch_fexecve;
+ ffileread;
+ ffilewrite;
+ fgetline;
+@@ -123,7 +123,7 @@ global:
+ geterrno;
+ getfiles;
+ getfp;
+- getline;
++ sch_getline;
+ getmainfp;
+ #getstr;
+ #handlecond;
+diff -urNp star-1.5.1-orig/lib/stdio/fgetline.c star-1.5.1/lib/stdio/fgetline.c
+--- star-1.5.1-orig/lib/stdio/fgetline.c 2004-09-25 14:23:36.000000000 +0200
++++ star-1.5.1/lib/stdio/fgetline.c 2010-01-13 13:17:10.000000000 +0100
+@@ -61,7 +61,7 @@ fgetline(f, buf, len)
+ }
+
+ EXPORT int
+-getline(buf, len)
++sch_getline(buf, len)
+ char *buf;
+ int len;
+ {
+diff -urNp star-1.5.1-orig/libfind/find.c star-1.5.1/libfind/find.c
+--- star-1.5.1-orig/libfind/find.c 2009-11-15 16:25:02.000000000 +0100
++++ star-1.5.1/libfind/find.c 2010-01-13 13:17:10.000000000 +0100
+@@ -1747,7 +1747,7 @@ doexec(f, ac, av, state)
+ #endif
+ av[ac] = NULL; /* -exec {} \; is not NULL terminated */
+
+- fexecve(av[0], state->std[0], state->std[1], state->std[2],
++ sch_fexecve(av[0], state->std[0], state->std[1], state->std[2],
+ av, state->env);
+ err = geterrno();
+ #ifdef PLUS_DEBUG
diff --git a/app-arch/star/metadata.xml b/app-arch/star/metadata.xml
new file mode 100644
index 000000000000..486d2934ff92
--- /dev/null
+++ b/app-arch/star/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>shell-tools</herd>
+ <upstream>
+ <remote-id type="sourceforge">s-tar</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/star/star-1.5.2.ebuild b/app-arch/star/star-1.5.2.ebuild
new file mode 100644
index 000000000000..b65b048d06a0
--- /dev/null
+++ b/app-arch/star/star-1.5.2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An enhanced (world's fastest) tar, as well as enhanced mt/rmt"
+HOMEPAGE="http://s-tar.sourceforge.net/"
+SRC_URI="mirror://sourceforge/s-tar/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 CDDL-Schily"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="acl xattr"
+
+DEPEND="
+ acl? ( sys-apps/acl )
+ xattr? ( sys-apps/attr )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/_alpha[0-9][0-9]}
+
+src_prepare() {
+ find -type f -exec chmod -c u+w '{}' + || die
+ sed \
+ -e "s:/opt/schily:${EPREFIX}/usr:g" \
+ -e 's:bin:root:g' \
+ -e "s:/usr/src/linux/include:${EPREFIX}/usr/include:" \
+ -i DEFAULTS/Defaults.linux || die
+
+ # Disable libacl autodependency (hacky build system, hacky fix...)
+ if use acl; then
+ sed \
+ -e 's:[$]ac_cv_header_sys_acl_h:disable acl:' \
+ -i "${S}/autoconf/configure" || die
+ fi
+
+ if use xattr; then
+ sed \
+ -e 's:[$]ac_cv_header_attr_xattr_h:disable xattr:' \
+ -i "${S}/autoconf/configure" || die
+ fi
+
+ # Create additional symlinks needed for some archs.
+ pushd "${S}/RULES" > /dev/null
+ local t
+ for t in ppc64 s390x ; do
+ ln -s i586-linux-cc.rul ${t}-linux-cc.rul || die
+ ln -s i586-linux-gcc.rul ${t}-linux-gcc.rul || die
+ done
+ popd > /dev/null
+
+ epatch "${FILESDIR}"/${PN}-1.5.1-changewarnSegv.patch
+}
+
+src_configure() { :; } #avoid ./configure run
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ COPTX="${CFLAGS}" \
+ CPPOPTX="${CPPFLAGS}" \
+ COPTGPROF= \
+ COPTOPT= \
+ LDOPTX="${LDFLAGS}"
+}
+
+src_install() {
+ # Joerg Schilling suggested to integrate star into the main OS using call:
+ # make INS_BASE=/usr DESTDIR="${D}" install
+
+ dobin \
+ star/OBJ/*-*-cc/star \
+ tartest/OBJ/*-*-cc/tartest \
+ star_sym/OBJ/*-*-cc/star_sym \
+ mt/OBJ/*-*-cc/smt
+
+ newsbin rmt/OBJ/*-*-cc/rmt rmt.star
+ newman rmt/rmt.1 rmt.star.1
+
+ # Note that we should never install gnutar, tar or rmt in this package.
+ # tar and rmt are provided by app-arch/tar. gnutar is not compatible with
+ # GNU tar and breakes compilation, or init scripts. bug #33119
+ dosym {star,/usr/bin/ustar}
+ dosym {star,/usr/bin/spax}
+ dosym {star,/usr/bin/scpio}
+ dosym {star,/usr/bin/suntar}
+
+ # match is needed to understand the pattern matcher, if you wondered why ;)
+ doman man/man1/match.1 tartest/tartest.1 \
+ star/{star.4,star.1,spax.1,scpio.1,suntar.1}
+
+ insinto /etc/default
+ newins star/star.dfl star
+ newins rmt/rmt.dfl rmt
+
+ dodoc star/{README.ACL,README.crash,README.largefiles,README.otherbugs} \
+ star/{README.pattern,README.pax,README.posix-2001,README,STARvsGNUTAR} \
+ rmt/default-rmt.sample TODO AN-* Changelog CONTRIBUTING
+}
diff --git a/app-arch/star/star-1.5.3.ebuild b/app-arch/star/star-1.5.3.ebuild
new file mode 100644
index 000000000000..4cb914bca633
--- /dev/null
+++ b/app-arch/star/star-1.5.3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An enhanced (world's fastest) tar, as well as enhanced mt/rmt"
+HOMEPAGE="http://s-tar.sourceforge.net/"
+SRC_URI="mirror://sourceforge/s-tar/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 CDDL-Schily"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="acl xattr"
+
+DEPEND="
+ acl? ( sys-apps/acl )
+ xattr? ( sys-apps/attr )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/_alpha[0-9][0-9]}
+
+src_prepare() {
+ find -type f -exec chmod -c u+w '{}' + || die
+ sed \
+ -e "s:/opt/schily:${EPREFIX}/usr:g" \
+ -e 's:bin:root:g' \
+ -e "s:/usr/src/linux/include:${EPREFIX}/usr/include:" \
+ -i DEFAULTS/Defaults.linux || die
+
+ # Disable libacl autodependency (hacky build system, hacky fix...)
+ if use acl; then
+ sed \
+ -e 's:[$]ac_cv_header_sys_acl_h:disable acl:' \
+ -i "${S}/autoconf/configure" || die
+ fi
+
+ if use xattr; then
+ sed \
+ -e 's:[$]ac_cv_header_attr_xattr_h:disable xattr:' \
+ -i "${S}/autoconf/configure" || die
+ fi
+
+ # Create additional symlinks needed for some archs.
+ pushd "${S}/RULES" > /dev/null
+ local t
+ for t in ppc64 s390x ; do
+ ln -s i586-linux-cc.rul ${t}-linux-cc.rul || die
+ ln -s i586-linux-gcc.rul ${t}-linux-gcc.rul || die
+ done
+ popd > /dev/null
+}
+
+src_configure() { :; } #avoid ./configure run
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ COPTX="${CFLAGS}" \
+ CPPOPTX="${CPPFLAGS}" \
+ COPTGPROF= \
+ COPTOPT= \
+ LDOPTX="${LDFLAGS}"
+}
+
+src_install() {
+ # Joerg Schilling suggested to integrate star into the main OS using call:
+ # make INS_BASE=/usr DESTDIR="${D}" install
+
+ dobin \
+ star/OBJ/*-*-cc/star \
+ tartest/OBJ/*-*-cc/tartest \
+ star_sym/OBJ/*-*-cc/star_sym \
+ mt/OBJ/*-*-cc/smt
+
+ newsbin rmt/OBJ/*-*-cc/rmt rmt.star
+ newman rmt/rmt.1 rmt.star.1
+
+ # Note that we should never install gnutar, tar or rmt in this package.
+ # tar and rmt are provided by app-arch/tar. gnutar is not compatible with
+ # GNU tar and breakes compilation, or init scripts. bug #33119
+ dosym {star,/usr/bin/ustar}
+ dosym {star,/usr/bin/spax}
+ dosym {star,/usr/bin/scpio}
+ dosym {star,/usr/bin/suntar}
+
+ # match is needed to understand the pattern matcher, if you wondered why ;)
+ doman man/man1/match.1 tartest/tartest.1 \
+ star/{star.4,star.1,spax.1,scpio.1,suntar.1}
+
+ insinto /etc/default
+ newins star/star.dfl star
+ newins rmt/rmt.dfl rmt
+
+ dodoc star/{README.ACL,README.crash,README.largefiles,README.otherbugs} \
+ star/{README.pattern,README.pax,README.posix-2001,README,STARvsGNUTAR} \
+ rmt/default-rmt.sample TODO AN-* Changelog CONTRIBUTING
+}
diff --git a/app-arch/stuffit/Manifest b/app-arch/stuffit/Manifest
new file mode 100644
index 000000000000..d8418bf5595f
--- /dev/null
+++ b/app-arch/stuffit/Manifest
@@ -0,0 +1 @@
+DIST stuffit520.611linux-i386.tar.gz 1955619 SHA256 69ccd8659000f7cdeba640157ed42e360b2e448c8e8333b1db491f2c4daf7998 SHA512 a1d4631c2d238b49c710816cd5ed8a01dcf52c29b870297b8dfd76fb0cb6e725c5b0f9d4a6c155c7b6980005df52fc4597632f72e90f00bf93ad80a28972270a WHIRLPOOL 438a33133d959879d81cca96a2659b82ae07c3cd4b137904f3e02fbbedac6a183ba411ab4e864e3bfa0bee2b27531bfbbaab7928d138640069e01bbc605669cb
diff --git a/app-arch/stuffit/metadata.xml b/app-arch/stuffit/metadata.xml
new file mode 100644
index 000000000000..676bee02ece4
--- /dev/null
+++ b/app-arch/stuffit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>Stuffit is a archive creating application, supporting .sit, .sitx .zip, and self-extracting archives</longdescription>
+</pkgmetadata>
diff --git a/app-arch/stuffit/stuffit-5.2.0.611.ebuild b/app-arch/stuffit/stuffit-5.2.0.611.ebuild
new file mode 100644
index 000000000000..1a5ad6d1547e
--- /dev/null
+++ b/app-arch/stuffit/stuffit-5.2.0.611.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="stuffit520.611linux-i386"
+DESCRIPTION="Aladdin Software's StuffIt and StuffIt Expander"
+HOMEPAGE="http://www.stuffit.com/"
+SRC_URI="http://my.smithmicro.com/downloads/files/stuffit520.611linux-i386.tar.gz"
+
+LICENSE="Stuffit"
+SLOT="0"
+KEYWORDS="-* x86 amd64"
+IUSE=""
+RESTRICT="fetch strip"
+
+S="${WORKDIR}"
+
+INSTALLDIR="/opt/stuffit"
+
+pkg_nofetch() {
+ einfo "Please download stuffit from"
+ einfo "${SRC_URI}"
+ einfo "and put the file in ${DISTDIR}"
+ einfo
+ einfo "Note that StuffIt requires registration within 30 days,"
+ einfo "but StuffIt Expander is freeware."
+ einfo
+}
+
+src_install() {
+
+ # First do the binaries
+ exeinto ${INSTALLDIR}/bin
+ doexe bin/stuff
+ doexe bin/unstuff
+
+ # Now the registration binary
+ exeinto ${INSTALLDIR}/extra
+ doexe bin/register
+
+ # Now the documentation
+ docinto stuff
+ dodoc doc/stuff/README
+ dohtml doc/stuff/stuff.html
+ docinto unstuff
+ dodoc doc/unstuff/README
+ dohtml doc/unstuff/unstuff.html
+
+ # And now the man pages
+ doman man/man1/*
+
+ # Also add the executables to the path
+ dodir /etc/env.d
+ echo -e "PATH=${INSTALLDIR}/bin\nROOTPATH=${INSTALLDIR}/bin" > \
+ "${D}"/etc/env.d/10stuffit
+
+}
+
+pkg_postinst() {
+ elog
+ elog "Reminder: StuffIt requires registration within 30 days."
+ elog "The registration program is located in ${INSTALLDIR}/extra"
+ elog
+ elog "The binaries are named 'stuff' and 'unstuff'"
+ elog
+}
diff --git a/app-arch/tapeutils/Manifest b/app-arch/tapeutils/Manifest
new file mode 100644
index 000000000000..2f77372e900d
--- /dev/null
+++ b/app-arch/tapeutils/Manifest
@@ -0,0 +1 @@
+DIST tapeutils-0.4.tar.gz 14116 SHA256 01b9d6b9ed2e88860ea28bc09a00e2e54683498a3c4ba31732e03bc55ae75197 SHA512 b87b725c3f1610f5a116263120ffea84a7e81146cc9e46be69391388bb0b3bf4814d16428bfabd285557a0f72a3607f138e454b61989f2606697875e30c948bd WHIRLPOOL 90685fa67565e682822111e556230f3e3bcb14e1b8e588af77899d27fc6bec080231ba2f1bf812ad97518718ade3ff92c3bb74024dced10015cc747a7e50e0c5
diff --git a/app-arch/tapeutils/metadata.xml b/app-arch/tapeutils/metadata.xml
new file mode 100644
index 000000000000..f3ebc821556b
--- /dev/null
+++ b/app-arch/tapeutils/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>app-backup</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/tapeutils/tapeutils-0.4.ebuild b/app-arch/tapeutils/tapeutils-0.4.ebuild
new file mode 100644
index 000000000000..4363b04eb613
--- /dev/null
+++ b/app-arch/tapeutils/tapeutils-0.4.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Utilities for manipulation of tapes and tape image files"
+HOMEPAGE="http://www.brouhaha.com/~eric/software/tapeutils/"
+SRC_URI="http://www.brouhaha.com/~eric/software/tapeutils/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="!app-emulation/hercules"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ dobin tapecopy tapedump || die
+ # no docs to install
+}
diff --git a/app-arch/tar/Manifest b/app-arch/tar/Manifest
new file mode 100644
index 000000000000..dcba0d17ca48
--- /dev/null
+++ b/app-arch/tar/Manifest
@@ -0,0 +1,3 @@
+DIST tar-1.26.tar.bz2 2339773 SHA256 5a5369f464502a598e938029c310d4b3abd51e6bb8dfd045663e61c8ea9f6d41 SHA512 3bc12441bebfc388017ad0632fb3e777ceaf62be82fb19ce771df8bbb765eb094dad336110189f49f5eaaebd4d6ced586098e1e3c8b9f7f775dc483d5513f209 WHIRLPOOL bfdc579f97a260d6b6776211f470bfc1a99b81d89a8067b2ebfab3101ab1a4f2b4f7c444edffc05bc7585993cae601c499ec074bb606c7ef289deac5429cfb2b
+DIST tar-1.27.1.tar.bz2 2573070 SHA256 9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6 SHA512 f14a0a58e574db3aeec0914621aff2f0518b8d8acce81106b8219b36b3fed47349d6cb802c51a836a5e6889529337434d83b3c50cd7fc1801b9b3944eecc695b WHIRLPOOL fd44ee747f44febc9dd4b0e1a532c38a835fcb55967143a1ab29b29dfc27316de76dfa1d23438f1843bb0a7962eb0b59c3ec75041cc0fbe879b02af292ebc6e9
+DIST tar-1.28.tar.bz2 2693989 SHA256 60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562 SHA512 4f66a236a2d9185114e2b358a09f3d38c3c38e984e5fca4bedc4d7eb461bdaace6a7a9fc62aafb70428b1f3dc617fb0d0553558fb29cad33f0cb53ba081521c4 WHIRLPOOL 54ad7b73e973d436cff853fda267d21ab22139f53d18f6870c7a53cf74e53ec8735022b6d3c503504ee416f1b9f9d43ca1af60d2fedb5d852766cb8dd2ac72d0
diff --git a/app-arch/tar/files/rmt b/app-arch/tar/files/rmt
new file mode 100644
index 000000000000..15ed6aa91fad
--- /dev/null
+++ b/app-arch/tar/files/rmt
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# This is not a mistake. This shell script (/etc/rmt) has been provided
+# for compatibility with other Unix-like systems, some of which have
+# utilities that expect to find (and execute) rmt in the /etc directory
+# on remote systems.
+#
+exec rmt "$@"
diff --git a/app-arch/tar/files/tar-1.26-no-gets.patch b/app-arch/tar/files/tar-1.26-no-gets.patch
new file mode 100644
index 000000000000..a677af11d370
--- /dev/null
+++ b/app-arch/tar/files/tar-1.26-no-gets.patch
@@ -0,0 +1,22 @@
+hack until gzip pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/gnu/stdio.in.h
++++ b/gnu/stdio.in.h
+@@ -125,7 +125,6 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/app-arch/tar/files/tar-1.26-xattr.patch b/app-arch/tar/files/tar-1.26-xattr.patch
new file mode 100644
index 000000000000..7986828ef519
--- /dev/null
+++ b/app-arch/tar/files/tar-1.26-xattr.patch
@@ -0,0 +1,931 @@
+https://bugs.gentoo.org/382067
+
+add optional xattr support
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -223,6 +223,20 @@ AC_CHECK_TYPE(iconv_t,:,
+ #endif
+ ])
+
++AC_ARG_ENABLE(xattr,
++ AC_HELP_STRING([--enable-xattr],
++ [enable Extended Attribute support (disabled by default)]),
++ [xattr_enabled=$enableval],
++ [xattr_enabled=no])
++
++if test "x$xattr_enabled" = xyes; then
++ AC_CHECK_HEADERS(attr/xattr.h)
++ AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \
++ setxattr fsetxattr lsetxattr \
++ listxattr flistxattr llistxattr,
++ AC_DEFINE(HAVE_XATTRS,1,[Define if we have a working extended attributes]),)
++fi
++
+ # Gettext.
+ AM_GNU_GETTEXT([external], [need-formatstring-macros])
+ AM_GNU_GETTEXT_VERSION([0.16])
+--- a/doc/tar.texi
++++ b/doc/tar.texi
+@@ -3002,6 +3002,10 @@ mechanism.
+ Treat all input file or member names literally, do not interpret
+ escape sequences. @xref{input name quoting}.
+
++@opsummary{no-xattrs}
++@item --no-xattrs
++Causes @command{tar} not to store and not to extract xattrs. @xref{Attributes}.
++
+ @opsummary{no-wildcards}
+ @item --no-wildcards
+ Do not use wildcards.
+@@ -3447,6 +3451,10 @@ Enable or disable warning messages identified by @var{keyword}. The
+ messages are suppressed if @var{keyword} is prefixed with @samp{no-}.
+ @xref{warnings}.
+
++@opsummary{xattrs}
++@item --xattrs
++Causes @command{tar} to store xattrs. @xref{Attributes}.
++
+ @opsummary{wildcards}
+ @item --wildcards
+ Use wildcards when matching member names with patterns.
+@@ -8659,6 +8667,8 @@ implementation able to read @samp{ustar} archives will be able to read
+ most @samp{posix} archives as well, with the only exception that any
+ additional information (such as long file names etc.) will in such
+ case be extracted as plain text files along with the files it refers to.
++This is the only format that can store ACLs, SELinux context and extended
++attributes.
+
+ This archive format will be the default format for future versions
+ of @GNUTAR{}.
+@@ -9293,6 +9303,20 @@ Same as both @option{--same-permissions} and @option{--same-order}.
+
+ This option is deprecated, and will be removed in @GNUTAR{} version 1.23.
+
++@opindex xattrs
++@item --xattrs
++This option causes @command{tar} to store the current extended attributes in
++the archive.
++
++The @option{--xattrs} option has no equivalent short option name.
++
++@opindex no-xattrs
++@item --no-xattrs
++This option causes @command{tar} not to store the current extended attributes in
++the archive and not to extract any extended attributes in an archive.
++
++The @option{--no-xattrs} option has no equivalent short option name.
++
+ @end table
+
+ @node Portability
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -20,7 +20,7 @@
+
+ bin_PROGRAMS = tar
+
+-noinst_HEADERS = arith.h common.h tar.h
++noinst_HEADERS = arith.h common.h tar.h xattrs.h
+ tar_SOURCES = \
+ buffer.c\
+ checkpoint.c\
+@@ -42,10 +42,11 @@ tar_SOURCES = \
+ unlink.c\
+ update.c\
+ utf8.c\
+- warning.c
++ warning.c\
++ xattrs.c
+
+ INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib
+
+ LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
+
+-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)
++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)
+--- a/src/common.h
++++ b/src/common.h
+@@ -253,6 +253,9 @@ GLOBAL int same_owner_option;
+ /* If positive, preserve permissions when extracting. */
+ GLOBAL int same_permissions_option;
+
++/* If positive, save the user and root xattrs. */
++GLOBAL int xattrs_option;
++
+ /* When set, strip the given number of file name components from the file name
+ before extracting */
+ GLOBAL size_t strip_name_components;
+@@ -707,6 +710,9 @@ extern char *output_start;
+
+ void update_archive (void);
+
++/* Module attrs.c. */
++#include "xattrs.h"
++
+ /* Module xheader.c. */
+
+ void xheader_decode (struct tar_stat_info *stat);
+@@ -727,6 +733,12 @@ bool xheader_string_end (struct xheader *xhdr, char const *keyword);
+ bool xheader_keyword_deleted_p (const char *kw);
+ char *xheader_format_name (struct tar_stat_info *st, const char *fmt,
+ size_t n);
++void xheader_xattr_init (struct tar_stat_info *st);
++void xheader_xattr_free (struct xattr_array *vals, size_t sz);
++void xheader_xattr_copy (const struct tar_stat_info *st,
++ struct xattr_array **vals, size_t *sz);
++void xheader_xattr_add (struct tar_stat_info *st,
++ const char *key, const char *val, size_t len);
+
+ /* Module system.c */
+
+--- a/src/create.c
++++ b/src/create.c
+@@ -936,6 +936,21 @@ start_header (struct tar_stat_info *st)
+ GNAME_TO_CHARS (st->gname, header->header.gname);
+ }
+
++ if (archive_format == POSIX_FORMAT)
++ {
++ if (xattrs_option > 0)
++ {
++ size_t scan_xattr = 0;
++ struct xattr_array *xattr_map = st->xattr_map;
++
++ while (scan_xattr < st->xattr_map_size)
++ {
++ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr);
++ ++scan_xattr;
++ }
++ }
++ }
++
+ return header;
+ }
+
+@@ -1711,6 +1726,11 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
+ bool ok;
+ struct stat final_stat;
+
++ if (fd == 0)
++ xattrs_xattrs_get (st, p, -1);
++ else
++ xattrs_xattrs_get (st, p, fd);
++
+ if (is_dir)
+ {
+ const char *tag_file_name;
+@@ -1829,6 +1849,8 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
+ if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT) < size)
+ write_long_link (st);
+
++ xattrs_xattrs_get (st, p, -1);
++
+ block_ordinal = current_block_ordinal ();
+ st->stat.st_size = 0; /* force 0 size on symlink */
+ header = start_header (st);
+@@ -1847,11 +1869,20 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
+ }
+ #endif
+ else if (S_ISCHR (st->stat.st_mode))
+- type = CHRTYPE;
++ {
++ type = CHRTYPE;
++ xattrs_xattrs_get (st, p, -1);
++ }
+ else if (S_ISBLK (st->stat.st_mode))
+- type = BLKTYPE;
++ {
++ type = BLKTYPE;
++ xattrs_xattrs_get (st, p, -1);
++ }
+ else if (S_ISFIFO (st->stat.st_mode))
+- type = FIFOTYPE;
++ {
++ type = FIFOTYPE;
++ xattrs_xattrs_get (st, p, -1);
++ }
+ else if (S_ISSOCK (st->stat.st_mode))
+ {
+ WARNOPT (WARN_FILE_IGNORED,
+--- a/src/extract.c
++++ b/src/extract.c
+@@ -97,6 +97,9 @@ struct delayed_set_stat
+ /* Directory that the name is relative to. */
+ int change_dir;
+
++ /* extended attributes*/
++ size_t xattr_map_size; /* Size of the xattr map */
++ struct xattr_array *xattr_map;
+ /* Length and contents of name. */
+ size_t file_name_len;
+ char file_name[1];
+@@ -134,6 +137,9 @@ struct delayed_link
+ hard-linked together. */
+ struct string_list *sources;
+
++ size_t xattr_map_size; /* Size of the xattr map */
++ struct xattr_array *xattr_map;
++
+ /* The desired target of the desired link. */
+ char target[1];
+ };
+@@ -335,6 +341,8 @@ set_stat (char const *file_name,
+ utime_error (file_name);
+ }
+
++ xattrs_xattrs_set (st, file_name, typeflag);
++
+ if (0 < same_owner_option && ! interdir)
+ {
+ /* Some systems allow non-root users to give files away. Once this
+@@ -431,6 +439,13 @@ delay_set_stat (char const *file_name, struct tar_stat_info const *st,
+ data->atflag = atflag;
+ data->after_links = 0;
+ data->change_dir = chdir_current;
++ if (st)
++ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size);
++ else
++ {
++ data->xattr_map = NULL;
++ data->xattr_map_size = 0;
++ }
+ strcpy (data->file_name, file_name);
+ delayed_set_stat_head = data;
+ if (must_be_dot_or_slash (file_name))
+@@ -673,6 +688,31 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
+ return RECOVER_NO;
+ }
+
++/* Restore stat extended attributes (xattr) for FILE_NAME, using information
++ given in *ST. Restore before extraction because they may affect layout.
++ If not restoring permissions, invert the
++ INVERT_PERMISSIONS bits from the file's current permissions.
++ TYPEFLAG specifies the type of the file.
++ FILE_CREATED indicates set_xattr has created the file */
++static int
++set_xattr (char const *file_name, struct tar_stat_info const *st,
++ mode_t invert_permissions, char typeflag, int *file_created)
++{
++ int status = 0;
++ bool interdir_made = false;
++
++ if ((xattrs_option >= 0) && st->xattr_map_size) {
++ mode_t mode = current_stat_info.stat.st_mode & MODE_RWX & ~ current_umask;
++
++ do
++ status = mknod (file_name, mode ^ invert_permissions, 0);
++ while (status && maybe_recoverable ((char *)file_name, false, &interdir_made));
++ xattrs_xattrs_set (st, file_name, typeflag);
++ *file_created = 1;
++ }
++ return(status);
++}
++
+ /* Fix the statuses of all directories whose statuses need fixing, and
+ which are not ancestors of FILE_NAME. If AFTER_LINKS is
+ nonzero, do this for all such directories; otherwise, stop at the
+@@ -733,12 +773,15 @@ apply_nonancestor_delayed_set_stat (char const *file_name, bool after_links)
+ sb.stat.st_gid = data->gid;
+ sb.atime = data->atime;
+ sb.mtime = data->mtime;
++ sb.xattr_map = data->xattr_map;
++ sb.xattr_map_size = data->xattr_map_size;
+ set_stat (data->file_name, &sb,
+ -1, current_mode, current_mode_mask,
+ DIRTYPE, data->interdir, data->atflag);
+ }
+
+ delayed_set_stat_head = data->next;
++ xheader_xattr_free (data->xattr_map, data->xattr_map_size);
+ free (data);
+ }
+ }
+@@ -854,6 +897,7 @@ extract_dir (char *file_name, int typeflag)
+
+ static int
+ open_output_file (char const *file_name, int typeflag, mode_t mode,
++ int file_created,
+ mode_t *current_mode, mode_t *current_mode_mask)
+ {
+ int fd;
+@@ -864,6 +908,10 @@ open_output_file (char const *file_name, int typeflag, mode_t mode,
+ ? O_TRUNC | (dereference_option ? 0 : O_NOFOLLOW)
+ : O_EXCL));
+
++ /* File might be created in set_xattr. So clear O_EXCL to avoid open() failure */
++ if (file_created)
++ openflag = openflag & ~O_EXCL;
++
+ if (typeflag == CONTTYPE)
+ {
+ static int conttype_diagnosed;
+@@ -934,6 +982,7 @@ extract_file (char *file_name, int typeflag)
+ bool interdir_made = false;
+ mode_t mode = (current_stat_info.stat.st_mode & MODE_RWX
+ & ~ (0 < same_owner_option ? S_IRWXG | S_IRWXO : 0));
++ mode_t invert_permissions = 0 < same_owner_option ? mode & (S_IRWXG | S_IRWXO) : 0;
+ mode_t current_mode = 0;
+ mode_t current_mode_mask = 0;
+
+@@ -950,7 +999,17 @@ extract_file (char *file_name, int typeflag)
+ }
+ else
+ {
++ int file_created = 0;
++ if (set_xattr (file_name, &current_stat_info, invert_permissions,
++ typeflag, &file_created))
++ {
++ skip_member ();
++ open_error (file_name);
++ return 1;
++ }
++
+ while ((fd = open_output_file (file_name, typeflag, mode,
++ file_created,
+ &current_mode, &current_mode_mask))
+ < 0)
+ {
+@@ -1091,6 +1150,7 @@ create_placeholder_file (char *file_name, bool is_symlink, bool *interdir_made)
+ + strlen (file_name) + 1);
+ p->sources->next = 0;
+ strcpy (p->sources->string, file_name);
++ xheader_xattr_copy (&current_stat_info, &p->xattr_map, &p->xattr_map_size);
+ strcpy (p->target, current_stat_info.link_name);
+
+ h = delayed_set_stat_head;
+@@ -1525,6 +1585,8 @@ apply_delayed_links (void)
+ st1.stat.st_gid = ds->gid;
+ st1.atime = ds->atime;
+ st1.mtime = ds->mtime;
++ st1.xattr_map = ds->xattr_map;
++ st1.xattr_map_size = ds->xattr_map_size;
+ set_stat (source, &st1, -1, 0, 0, SYMTYPE,
+ false, AT_SYMLINK_NOFOLLOW);
+ valid_source = source;
+@@ -1539,6 +1601,8 @@ apply_delayed_links (void)
+ sources = next;
+ }
+
++ xheader_xattr_free (ds->xattr_map, ds->xattr_map_size);
++
+ {
+ struct delayed_link *next = ds->next;
+ free (ds);
+--- a/src/list.c
++++ b/src/list.c
+@@ -604,6 +604,8 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
+ assign_string (&stat_info->gname,
+ header->header.gname[0] ? header->header.gname : NULL);
+
++ xheader_xattr_init (stat_info);
++
+ if (format == OLDGNU_FORMAT && incremental_option)
+ {
+ stat_info->atime.tv_sec = TIME_FROM_HEADER (header->oldgnu_header.atime);
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -304,6 +304,7 @@ enum
+ NO_UNQUOTE_OPTION,
+ NO_WILDCARDS_MATCH_SLASH_OPTION,
+ NO_WILDCARDS_OPTION,
++ NO_XATTR_OPTION,
+ NULL_OPTION,
+ NUMERIC_OWNER_OPTION,
+ OCCURRENCE_OPTION,
+@@ -340,7 +341,8 @@ enum
+ VOLNO_FILE_OPTION,
+ WARNING_OPTION,
+ WILDCARDS_MATCH_SLASH_OPTION,
+- WILDCARDS_OPTION
++ WILDCARDS_OPTION,
++ XATTR_OPTION
+ };
+
+ const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION;
+@@ -516,6 +518,10 @@ static struct argp_option options[] = {
+ {"preserve-order", 's', 0, 0,
+ N_("sort names to extract to match archive"), GRID+1 },
+ {"same-order", 0, 0, OPTION_ALIAS, NULL, GRID+1 },
++ {"xattrs", XATTR_OPTION, 0, 0,
++ N_("Save the user/root xattrs to the archive"), GRID+1 },
++ {"no-xattrs", NO_XATTR_OPTION, 0, 0,
++ N_("Don't extract the user/root xattrs from the archive"), GRID+1 },
+ {"preserve", PRESERVE_OPTION, 0, 0,
+ N_("same as both -p and -s"), GRID+1 },
+ {"delay-directory-restore", DELAY_DIRECTORY_RESTORE_OPTION, 0, 0,
+@@ -2079,6 +2085,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ same_permissions_option = -1;
+ break;
+
++ case XATTR_OPTION:
++ set_archive_format ("posix");
++ xattrs_option = 1;
++ break;
++
++ case NO_XATTR_OPTION:
++ xattrs_option = -1;
++ break;
++
+ case RECURSION_OPTION:
+ recursion_option = FNM_LEADING_DIR;
+ break;
+@@ -2461,6 +2476,15 @@ decode_options (int argc, char **argv)
+ || subcommand_option != LIST_SUBCOMMAND))
+ USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives")));
+
++ /* star create's non-POSIX typed archives with xattr support, so allow the
++ extra headers */
++ if ((xattrs_option > 0)
++ && archive_format != POSIX_FORMAT
++ && (subcommand_option != EXTRACT_SUBCOMMAND
++ || subcommand_option != DIFF_SUBCOMMAND
++ || subcommand_option != LIST_SUBCOMMAND))
++ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives")));
++
+ /* If ready to unlink hierarchies, so we are for simpler files. */
+ if (recursive_unlink_option)
+ old_files_option = UNLINK_FIRST_OLD_FILES;
+@@ -2713,6 +2737,7 @@ void
+ tar_stat_destroy (struct tar_stat_info *st)
+ {
+ tar_stat_close (st);
++ xheader_xattr_free (st->xattr_map, st->xattr_map_size);
+ free (st->orig_file_name);
+ free (st->file_name);
+ free (st->link_name);
+--- a/src/tar.h
++++ b/src/tar.h
+@@ -276,6 +276,14 @@ struct xheader
+ uintmax_t string_length;
+ };
+
++/* Information about xattrs for a file. */
++struct xattr_array
++ {
++ char *xkey;
++ char *xval_ptr;
++ size_t xval_len;
++ };
++
+ struct tar_stat_info
+ {
+ char *orig_file_name; /* name of file read from the archive header */
+@@ -287,6 +295,7 @@ struct tar_stat_info
+
+ char *uname; /* user name of owner */
+ char *gname; /* group name of owner */
++
+ struct stat stat; /* regular filesystem stat */
+
+ /* STAT doesn't always have access, data modification, and status
+@@ -309,6 +318,9 @@ struct tar_stat_info
+ size_t sparse_map_size; /* Size of the sparse map */
+ struct sp_array *sparse_map;
+
++ size_t xattr_map_size; /* Size of the xattr map */
++ struct xattr_array *xattr_map;
++
+ /* Extended headers */
+ struct xheader xhdr;
+
+--- /dev/null
++++ b/src/xattrs.c
+@@ -0,0 +1,181 @@
++/* Create a tar archive.
++
++ Copyright (C) 2006 Free Software Foundation, Inc.
++
++ Written by James Antill, on 2006-07-27.
++
++ This program is free software; you can redistribute it and/or modify it
++ under the terms of the GNU General Public License as published by the
++ Free Software Foundation; either version 2, or (at your option) any later
++ version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++ Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation, Inc.,
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
++
++#include <system.h>
++
++#include <quotearg.h>
++
++#include "common.h"
++
++
++#ifndef HAVE_ATTR_XATTR_H
++# undef HAVE_XATTRS
++#endif
++
++#ifdef HAVE_ATTR_XATTR_H
++# include <attr/xattr.h>
++#endif
++
++
++void xattrs_xattrs_get (struct tar_stat_info *st, char const *file_name, int fd)
++{
++ if (xattrs_option > 0)
++ { /* get all xattrs ... this include security.* and system.* if
++ available. We filter them here, but we have to filter them
++ in xattrs_xattrs_set() anyway.
++ */
++ static ssize_t xsz = 1024;
++ static char *xatrs = NULL;
++ ssize_t xret = -1;
++
++#ifndef HAVE_XATTRS
++ static int done = 0;
++ if ((xattrs_option > 0) && !done)
++ WARN ((0, 0, _("Xattr support requested, but not available")));
++ done = 1;
++#else
++
++ if (!xatrs) xatrs = xmalloc (xsz);
++
++ while (((fd == -1) ?
++ ((xret = llistxattr (file_name, xatrs, xsz)) == -1) :
++ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) &&
++ (errno == ERANGE))
++ {
++ xsz <<= 1;
++ xatrs = xrealloc (xatrs, xsz);
++ }
++
++ if (xret == -1)
++ call_arg_warn ((fd == -1) ? "llistxattrs" : "flistxattrs", file_name);
++ else
++ {
++ const char *attr = xatrs;
++ static ssize_t asz = 1024;
++ static char *val = NULL;
++
++ if (!val) val = xmalloc (asz);
++
++ while (xret > 0)
++ {
++ size_t len = strlen (attr);
++ ssize_t aret = 0;
++
++ /* Archive all xattrs during creation, decide at extraction time
++ * which ones are of interest/use for the target filesystem. */
++ while (((fd == -1) ?
++ ((aret = lgetxattr (file_name, attr, val, asz)) == -1) :
++ ((aret = fgetxattr (fd, attr, val, asz)) == -1)) &&
++ (errno == ERANGE))
++ {
++ asz <<= 1;
++ val = xrealloc (val, asz);
++ }
++
++ if (aret != -1)
++ xheader_xattr_add (st, attr, val, aret);
++ else if (errno != ENOATTR)
++ call_arg_warn ((fd==-1) ? "lgetxattr" : "fgetxattr", file_name);
++
++ attr += len + 1;
++ xret -= len + 1;
++ }
++ }
++#endif
++ }
++}
++
++static void xattrs__fd_set (struct tar_stat_info const *st,
++ char const *file_name, char typeflag,
++ const char *attr,
++ const char *ptr, size_t len)
++{
++#ifdef HAVE_XATTRS
++ if (ptr)
++ {
++ const char *sysname = "setxattr";
++ int ret = -1;
++
++ if (typeflag != SYMTYPE)
++ ret = setxattr (file_name, attr, ptr, len, 0);
++ else
++ {
++ sysname = "lsetxattr";
++ ret = lsetxattr (file_name, attr, ptr, len, 0);
++ }
++
++ /* do not print warnings when SELinux is disabled */
++ if ((ret == -1) && (errno != EPERM) && (errno != ENOTSUP))
++ call_arg_error (sysname, file_name);
++ }
++#endif
++}
++
++static char *skip_to_ext_fields (char *ptr)
++{
++ ptr += strcspn (ptr, ":,\n"); /* skip tag name. Ie. user/group/default/mask */
++
++ if (*ptr != ':')
++ return (ptr); /* error? no user/group field */
++ ++ptr;
++
++ ptr += strcspn (ptr, ":,\n"); /* skip user/group name */
++
++ if (*ptr != ':')
++ return (ptr); /* error? no perms field */
++ ++ptr;
++
++ ptr += strcspn (ptr, ":,\n"); /* skip perms */
++
++ if (*ptr != ':')
++ return (ptr); /* no extra fields */
++
++ return (ptr);
++}
++
++void xattrs_xattrs_set (struct tar_stat_info const *st,
++ char const *file_name, char typeflag)
++{
++ if ((xattrs_option >= 0) && st->xattr_map_size)
++ {
++ size_t scan = 0;
++
++#ifndef HAVE_XATTRS
++ static int done = 0;
++ if (!done)
++ WARN ((0, 0, _("Xattr support requested, but not available")));
++ done = 1;
++#else
++ while (scan < st->xattr_map_size)
++ {
++ char *keyword = st->xattr_map[scan].xkey;
++
++ /* assert (!memcpy (keyword, "SCHILY.xattr.", strlen("SCHILY.xattr."))); */
++ keyword += strlen ("SCHILY.xattr.");
++
++ xattrs__fd_set (st, file_name, typeflag, keyword,
++ st->xattr_map[scan].xval_ptr,
++ st->xattr_map[scan].xval_len);
++
++ ++scan;
++ }
++#endif
++ }
++}
+--- /dev/null
++++ b/src/xattrs.h
+@@ -0,0 +1,6 @@
++
++extern void xattrs_xattrs_get (struct tar_stat_info *st,
++ char const *file_name, int fd);
++
++extern void xattrs_xattrs_set (struct tar_stat_info const *st,
++ char const *file_name, char typeflag);
+--- a/src/xheader.c
++++ b/src/xheader.c
+@@ -460,6 +460,74 @@ xheader_write_global (struct xheader *xhdr)
+ }
+ }
+
++void xheader_xattr_init (struct tar_stat_info *st)
++{
++ st->xattr_map = NULL;
++ st->xattr_map_size = 0;
++}
++
++void xheader_xattr_free (struct xattr_array *xattr_map, size_t xattr_map_size)
++{
++ size_t scan = 0;
++
++ while (scan < xattr_map_size)
++ {
++ free (xattr_map[scan].xkey);
++ free (xattr_map[scan].xval_ptr);
++
++ ++scan;
++ }
++ free (xattr_map);
++}
++
++static void xheader_xattr__add (struct xattr_array **xattr_map,
++ size_t *xattr_map_size,
++ const char *key, const char *val, size_t len)
++{
++ size_t pos = (*xattr_map_size)++;
++
++ *xattr_map = xrealloc (*xattr_map,
++ *xattr_map_size * sizeof (struct xattr_array));
++ (*xattr_map)[pos].xkey = xstrdup (key);
++ (*xattr_map)[pos].xval_ptr = xmemdup (val, len + 1);
++ (*xattr_map)[pos].xval_len = len;
++}
++
++void xheader_xattr_add (struct tar_stat_info *st,
++ const char *key, const char *val, size_t len)
++{
++ size_t klen = strlen (key);
++ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1);
++ char *tmp = xkey;
++
++ tmp = stpcpy (tmp, "SCHILY.xattr.");
++ tmp = stpcpy (tmp, key);
++
++ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len);
++
++ free (xkey);
++}
++
++void xheader_xattr_copy (const struct tar_stat_info *st,
++ struct xattr_array **xattr_map, size_t *xattr_map_size)
++{
++ size_t scan = 0;
++
++ *xattr_map = NULL;
++ *xattr_map_size = 0;
++
++ while (scan < st->xattr_map_size)
++ {
++ char *key = st->xattr_map[scan].xkey;
++ char *val = st->xattr_map[scan].xval_ptr;
++ size_t len = st->xattr_map[scan].xval_len;
++
++ xheader_xattr__add (xattr_map, xattr_map_size, key, val, len);
++
++ ++scan;
++ }
++}
++
+
+ /* General Interface */
+
+@@ -473,6 +541,7 @@ struct xhdr_tab
+ struct xheader *, void const *data);
+ void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t);
+ int flags;
++ bool prefix;
+ };
+
+ /* This declaration must be extern, because ISO C99 section 6.9.2
+@@ -489,8 +558,17 @@ locate_handler (char const *keyword)
+ struct xhdr_tab const *p;
+
+ for (p = xhdr_tab; p->keyword; p++)
+- if (strcmp (p->keyword, keyword) == 0)
+- return p;
++ if (p->prefix)
++ {
++ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0)
++ return p;
++ }
++ else
++ {
++ if (strcmp (p->keyword, keyword) == 0)
++ return p;
++ }
++
+ return NULL;
+ }
+
+@@ -500,7 +578,7 @@ xheader_protected_pattern_p (const char *pattern)
+ struct xhdr_tab const *p;
+
+ for (p = xhdr_tab; p->keyword; p++)
+- if ((p->flags & XHDR_PROTECTED) && fnmatch (pattern, p->keyword, 0) == 0)
++ if (!p->prefix && (p->flags & XHDR_PROTECTED) && fnmatch (pattern, p->keyword, 0) == 0)
+ return true;
+ return false;
+ }
+@@ -511,7 +589,7 @@ xheader_protected_keyword_p (const char *keyword)
+ struct xhdr_tab const *p;
+
+ for (p = xhdr_tab; p->keyword; p++)
+- if ((p->flags & XHDR_PROTECTED) && strcmp (p->keyword, keyword) == 0)
++ if (!p->prefix && (p->flags & XHDR_PROTECTED) && strcmp (p->keyword, keyword) == 0)
+ return true;
+ return false;
+ }
+@@ -1470,6 +1548,27 @@ volume_filename_decoder (struct tar_stat_info *st,
+ }
+
+ static void
++xattr_coder (struct tar_stat_info const *st , char const *keyword,
++ struct xheader *xhdr, void const *data)
++{
++ struct xattr_array *xattr_map = st->xattr_map;
++ const size_t *off = data;
++ xheader_print_n (xhdr, keyword,
++ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len);
++}
++
++static void
++xattr_decoder (struct tar_stat_info *st,
++ char const *keyword, char const *arg, size_t size)
++{
++ char *xstr = NULL;
++
++ xstr = xmemdup (arg, size + 1);
++ xheader_xattr_add (st, keyword + strlen("SCHILY.xattr."), xstr, size);
++ free (xstr);
++}
++
++static void
+ sparse_major_coder (struct tar_stat_info const *st, char const *keyword,
+ struct xheader *xhdr, void const *data)
+ {
+@@ -1506,53 +1605,53 @@ sparse_minor_decoder (struct tar_stat_info *st,
+ }
+
+ struct xhdr_tab const xhdr_tab[] = {
+- { "atime", atime_coder, atime_decoder, 0 },
+- { "comment", dummy_coder, dummy_decoder, 0 },
+- { "charset", dummy_coder, dummy_decoder, 0 },
+- { "ctime", ctime_coder, ctime_decoder, 0 },
+- { "gid", gid_coder, gid_decoder, 0 },
+- { "gname", gname_coder, gname_decoder, 0 },
+- { "linkpath", linkpath_coder, linkpath_decoder, 0 },
+- { "mtime", mtime_coder, mtime_decoder, 0 },
+- { "path", path_coder, path_decoder, 0 },
+- { "size", size_coder, size_decoder, 0 },
+- { "uid", uid_coder, uid_decoder, 0 },
+- { "uname", uname_coder, uname_decoder, 0 },
++ { "atime", atime_coder, atime_decoder, 0, false },
++ { "comment", dummy_coder, dummy_decoder, 0, false },
++ { "charset", dummy_coder, dummy_decoder, 0, false },
++ { "ctime", ctime_coder, ctime_decoder, 0, false },
++ { "gid", gid_coder, gid_decoder, 0, false },
++ { "gname", gname_coder, gname_decoder, 0, false },
++ { "linkpath", linkpath_coder, linkpath_decoder, 0, false },
++ { "mtime", mtime_coder, mtime_decoder, 0, false },
++ { "path", path_coder, path_decoder, 0, false },
++ { "size", size_coder, size_decoder, 0, false },
++ { "uid", uid_coder, uid_decoder, 0, false },
++ { "uname", uname_coder, uname_decoder, 0, false },
+
+ /* Sparse file handling */
+ { "GNU.sparse.name", path_coder, path_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ { "GNU.sparse.major", sparse_major_coder, sparse_major_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ { "GNU.sparse.minor", sparse_minor_coder, sparse_minor_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ { "GNU.sparse.realsize", sparse_size_coder, sparse_size_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ { "GNU.sparse.numblocks", sparse_numblocks_coder, sparse_numblocks_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+
+ /* tar 1.14 - 1.15.90 keywords. */
+ { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ /* tar 1.14 - 1.15.1 keywords. Multiple instances of these appeared in 'x'
+ headers, and each of them was meaningful. It confilcted with POSIX specs,
+ which requires that "when extended header records conflict, the last one
+ given in the header shall take precedence." */
+ { "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ { "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+ /* tar 1.15.90 keyword, introduced to remove the above-mentioned conflict. */
+ { "GNU.sparse.map", NULL /* Unused, see pax_dump_header() */,
+- sparse_map_decoder, 0 },
++ sparse_map_decoder, 0, false },
+
+ { "GNU.dumpdir", dumpdir_coder, dumpdir_decoder,
+- XHDR_PROTECTED },
++ XHDR_PROTECTED, false },
+
+ /* Keeps the tape/volume label. May be present only in the global headers.
+ Equivalent to GNUTYPE_VOLHDR. */
+ { "GNU.volume.label", volume_label_coder, volume_label_decoder,
+- XHDR_PROTECTED | XHDR_GLOBAL },
++ XHDR_PROTECTED | XHDR_GLOBAL, false },
+
+ /* These may be present in a first global header of the archive.
+ They provide the same functionality as GNUTYPE_MULTIVOL header.
+@@ -1561,11 +1660,14 @@ struct xhdr_tab const xhdr_tab[] = {
+ GNU.volume.offset keeps the offset of the start of this volume,
+ otherwise kept in oldgnu_header.offset. */
+ { "GNU.volume.filename", volume_label_coder, volume_filename_decoder,
+- XHDR_PROTECTED | XHDR_GLOBAL },
++ XHDR_PROTECTED | XHDR_GLOBAL, false },
+ { "GNU.volume.size", volume_size_coder, volume_size_decoder,
+- XHDR_PROTECTED | XHDR_GLOBAL },
++ XHDR_PROTECTED | XHDR_GLOBAL, false },
+ { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder,
+- XHDR_PROTECTED | XHDR_GLOBAL },
++ XHDR_PROTECTED | XHDR_GLOBAL, false },
++
++ /* xattrs use the star format. note we only save some variants... */
++ { "SCHILY.xattr", xattr_coder, xattr_decoder, 0, true },
+
+- { NULL, NULL, NULL, 0 }
++ { NULL, NULL, NULL, 0, false }
+ };
diff --git a/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch b/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch
new file mode 100644
index 000000000000..47973c394baf
--- /dev/null
+++ b/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch
@@ -0,0 +1,25 @@
+From 2bd9c15391b0bd6ef0bff76aebf09cfb53003199 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Thu, 09 Jan 2014 22:13:15 +0000
+Subject: Fix the use of --no-recursion and --recursion options.
+
+Each option remains in effect until cancelled by the next ocurrence
+of its counterpart, as stated in the documentation.
+
+* src/names.c (name_next_elt): Restore recursion_option from the
+value of matching_flags.
+---
+diff --git a/src/names.c b/src/names.c
+index fc9841e..7777dc1 100644
+--- a/src/names.c
++++ b/src/names.c
+@@ -570,6 +570,7 @@ name_next_elt (int change_dirs)
+
+ case NELT_FMASK:
+ matching_flags = ep->v.matching_flags;
++ recursion_option = matching_flags & FNM_LEADING_DIR;
+ name_list_advance ();
+ continue;
+
+--
+cgit v0.9.0.2
diff --git a/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch b/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch
new file mode 100644
index 000000000000..14cf90a5f4cc
--- /dev/null
+++ b/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch
@@ -0,0 +1,196 @@
+http://lists.gnu.org/archive/html/bug-tar/2013-12/msg00023.html
+https://bugs.gentoo.org/489170
+
+--- tar-1.27.1/configure 2013-11-17 17:18:39.000000000 +0100
++++ tar-1.27.1/configure 2013-11-17 17:18:39.000000000 +0100
+@@ -33619,19 +33619,20 @@
+ fi
+
+
+- for ac_header in attr/xattr.h
++ for ac_header in sys/xattr.h attr/xattr.h
+ do :
+- ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
+-if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_ATTR_XATTR_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+
+ fi
+
+ done
+
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
++ if test "$ac_cv_header_sys_xattr_h" = yes -o "$ac_cv_header_attr_xattr_h" = yes; then
+ TAR_COND_XATTR_H_TRUE=
+ TAR_COND_XATTR_H_FALSE='#'
+ else
+@@ -33639,30 +33640,130 @@
+ TAR_COND_XATTR_H_FALSE=
+ fi
+
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
+- for ac_func in getxattr fgetxattr lgetxattr \
+- setxattr fsetxattr lsetxattr \
+- listxattr flistxattr llistxattr
+-do :
+- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++
++ if test "$with_xattrs" != no; then
++ # If <sys/xattr.h> doesn't exist and <attr/xattr.h> does,
++ # then link against libattr.so and not libc
++ if test "$ac_cv_header_sys_xattr_h" = no -a "$ac_cv_header_attr_xattr_h" = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
++$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
++if ${ac_cv_lib_attr_fgetxattr+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lattr $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fgetxattr ();
++int
++main ()
++{
++return fgetxattr ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_attr_fgetxattr=yes
++else
++ ac_cv_lib_attr_fgetxattr=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
++$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
++if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_LIBATTR 1
+ _ACEOF
+- # only when functions are present
+
+-$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
++ LIBS="-lattr $LIBS"
+
+- if test "$with_xattrs" != no; then
++fi
+
+-$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
++ fi
++ have_functions=yes
++ for xattr_func in getxattr fgetxattr lgetxattr \
++ setxattr fsetxattr lsetxattr \
++ listxattr flistxattr llistxattr; do \
++ as_ac_Search=`$as_echo "ac_cv_search_$xattr_func" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $xattr_func" >&5
++$as_echo_n "checking for library containing $xattr_func... " >&6; }
++if eval \${$as_ac_Search+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $xattr_func ();
++int
++main ()
++{
++return $xattr_func ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' attr; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ eval "$as_ac_Search=\$ac_res"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if eval \${$as_ac_Search+:} false; then :
++ break
++fi
++done
++if eval \${$as_ac_Search+:} false; then :
+
+- fi
++else
++ eval "$as_ac_Search=no"
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++eval ac_res=\$$as_ac_Search
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Search
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
++else
++ have_functions=no
+ fi
+-done
+
++ test $have_functions = no && break
++ done
++ if test $have_functions = yes; then
++
++$as_echo "#define HAVE_XATTRS 1" >>confdefs.h
++
++ else
++ test "$with_xattrs" = yes && as_fn_error $? "xattr support requested but not found." "$LINENO" 5
++ fi
+ fi
+
+
+--- tar-1.27.1/lib/xattr-at.h 2013-03-14 21:18:10.000000000 +0100
++++ tar-1.27.1/lib/xattr-at.h 2013-03-14 21:18:10.000000000 +0100
+@@ -20,7 +20,15 @@
+ #define XATTRS_AT_H
+
+ #include <sys/types.h>
+-#include <attr/xattr.h>
++#if defined(HAVE_SYS_XATTR_H)
++# include <sys/xattr.h>
++#elif defined(HAVE_ATTR_XATTR_H)
++# include <attr/xattr.h>
++#endif
++
++#ifndef ENOATTR
++# define ENOATTR ENODATA /* No such attribute */
++#endif
+
+ /* These are the dir-fd-relative variants of the functions without the
+ "at" suffix. For example, setxattrat (AT_FDCWD, path, name, value, size,
diff --git a/app-arch/tar/files/tar-1.28-concat-listed.patch b/app-arch/tar/files/tar-1.28-concat-listed.patch
new file mode 100644
index 000000000000..28dc57824155
--- /dev/null
+++ b/app-arch/tar/files/tar-1.28-concat-listed.patch
@@ -0,0 +1,117 @@
+https://bugs.gentoo.org/546294
+https://lists.gnu.org/archive/html/bug-tar/2015-04/msg00006.html
+
+From 15c02c2b9d383446b3ea35dbea5a048e136b020d Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org.ua>
+Date: Thu, 16 Apr 2015 13:02:10 +0300
+Subject: [PATCH] Fix extraction from concatenated incremental archives.
+
+* src/common.h (remove_delayed_set_stat): New proto.
+* src/extract.c (free_delayed_set_stat)
+(remove_delayed_set_stat): New function.
+(apply_nonancestor_delayed_set_stat): Use free_delayed_set_stat.
+* src/misc.c (safer_rmdir): Remove delayed_set_stat entry
+corresponding to the removed directory.
+* tests/incr10.at: New test case.
+* tests/Makefile.am: Add new test.
+* tests/testsuite.at: Likewise.
+---
+ src/common.h | 2 ++
+ src/extract.c | 38 +++++++++++++++++++++++++++-----
+ src/misc.c | 7 +++++-
+ tests/Makefile.am | 1 +
+ tests/incr10.at | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/testsuite.at | 1 +
+ 6 files changed, 107 insertions(+), 6 deletions(-)
+ create mode 100644 tests/incr10.at
+
+diff --git a/src/common.h b/src/common.h
+index 20cbb64..2904183 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -523,6 +523,8 @@ void extract_archive (void);
+ void extract_finish (void);
+ bool rename_directory (char *src, char *dst);
+
++void remove_delayed_set_stat (const char *fname);
++
+ /* Module delete.c. */
+
+ void delete_archive_members (void);
+diff --git a/src/extract.c b/src/extract.c
+index ca25603..5aaeb1b 100644
+--- a/src/extract.c
++++ b/src/extract.c
+@@ -537,6 +537,38 @@ repair_delayed_set_stat (char const *dir,
+ quotearg_colon (dir)));
+ }
+
++static void
++free_delayed_set_stat (struct delayed_set_stat *data)
++{
++ xheader_xattr_free (data->xattr_map, data->xattr_map_size);
++ free (data->cntx_name);
++ free (data->acls_a_ptr);
++ free (data->acls_d_ptr);
++ free (data);
++}
++
++void
++remove_delayed_set_stat (const char *fname)
++{
++ struct delayed_set_stat *data, *next, *prev = NULL;
++ for (data = delayed_set_stat_head; data; data = next)
++ {
++ next = data->next;
++ if (chdir_current == data->change_dir
++ && strcmp (data->file_name, fname) == 0)
++ {
++ free_delayed_set_stat (data);
++ if (prev)
++ prev->next = next;
++ else
++ delayed_set_stat_head = next;
++ return;
++ }
++ else
++ prev = data;
++ }
++}
++
+ /* After a file/link/directory creation has failed, see if
+ it's because some required directory was not present, and if so,
+ create all required directories. Return zero if all the required
+@@ -846,11 +878,7 @@ apply_nonancestor_delayed_set_stat (char const *file_name, bool after_links)
+ }
+
+ delayed_set_stat_head = data->next;
+- xheader_xattr_free (data->xattr_map, data->xattr_map_size);
+- free (data->cntx_name);
+- free (data->acls_a_ptr);
+- free (data->acls_d_ptr);
+- free (data);
++ free_delayed_set_stat (data);
+ }
+ }
+
+diff --git a/src/misc.c b/src/misc.c
+index 8e66643..d263c07 100644
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -586,7 +586,12 @@ safer_rmdir (const char *file_name)
+ return -1;
+ }
+
+- return unlinkat (chdir_fd, file_name, AT_REMOVEDIR);
++ if (unlinkat (chdir_fd, file_name, AT_REMOVEDIR) == 0)
++ {
++ remove_delayed_set_stat (file_name);
++ return 0;
++ }
++ return -1;
+ }
+
+ /* Remove FILE_NAME, returning 1 on success. If FILE_NAME is a directory,
+--
+2.3.5
+
diff --git a/app-arch/tar/files/tar-1.28-xattr.patch b/app-arch/tar/files/tar-1.28-xattr.patch
new file mode 100644
index 000000000000..a8f91fd8b200
--- /dev/null
+++ b/app-arch/tar/files/tar-1.28-xattr.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/548024
+
+From 9c2b57232e3bc2e5ba85387560bcdd851849a128 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 5 Jan 2015 20:24:18 -0800
+Subject: [PATCH] tar: port xattr-at.c to Solaris 10
+
+* lib/xattr-at.c (setxattrat, lsetxattrat, getxattrat, lgetxattrat)
+(listxattrat, llistxattrat): Compile only if HAVE_XATTRS, so that
+the code doesn't call functions that are not declared.
+---
+ lib/xattr-at.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/xattr-at.c b/lib/xattr-at.c
+index 443ccae..66427e9 100644
+--- a/lib/xattr-at.c
++++ b/lib/xattr-at.c
+@@ -31,6 +31,8 @@
+
+ #include "openat-priv.h"
+
++#ifdef HAVE_XATTRS
++
+ /* setxattrat */
+ #define AT_FUNC_NAME setxattrat
+ #define AT_FUNC_F1 setxattr
+@@ -108,3 +110,5 @@
+ #undef AT_FUNC_RESULT
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
++
++#endif /* HAVE_XATTRS */
+--
+2.4.0
+
diff --git a/app-arch/tar/files/tar.1 b/app-arch/tar/files/tar.1
new file mode 100644
index 000000000000..5d6012728c68
--- /dev/null
+++ b/app-arch/tar/files/tar.1
@@ -0,0 +1,813 @@
+.TH TAR 1 "Mar 2010" "GNU" "tar"
+.SH NAME
+tar \- The GNU version of the tape archiver (tar) utility
+.SH SYNOPSIS
+.B tar
+.I <operation> [options]
+
+.I Operations:
+.nf
+.B [-]A --catenate --concatenate
+.B [-]c --create
+.B [-]d --diff --compare
+.B [-]r --append
+.B [-]t --list
+.B [-]u --update
+.B [-]x --extract --get
+.B --delete
+.fi
+
+.I Common Options:
+.nf
+.BR -C ", " --directory " DIR"
+.BR -f ", " --file " FILE"
+.BR -j ", " --bzip2
+.BR -J ", " --xz
+.BR -p ", " --preserve-permissions
+.BR -v ", " --verbose
+.BR -z ", " --gzip
+.fi
+
+.I All Options:
+.br
+[
+.BR -a ", " --auto-compress
+]
+[
+.BR --add-file " FILE"
+]
+[
+.BR --anchored
+]
+[
+.BR --atime-preserve
+]
+[
+.BR -b ", " --blocking-factor " N"
+]
+[
+.BR -B ", " --read-full-records
+]
+[
+.BR --backup " BACKUP-TYPE"
+]
+[
+.BR --block-compress
+]
+[
+.BR -C ", " --directory " DIR"
+]
+[
+.BR --checkpoint
+]
+[
+.BR --delay-directory-restore
+]
+[
+.BR --exclude " PATTERN"
+]
+[
+.BR --exclude-caches
+]
+[
+.BR --exclude-caches-all
+]
+[
+.BR --exclude-caches-under
+]
+[
+.BR --exclude-tag " FILE"
+]
+[
+.BR --exclude-tag-all " FILE"
+]
+[
+.BR --exclude-tag-under " FILE"
+]
+[
+.BR -f ", " --file " [HOSTNAME:]FILE"
+]
+[
+.BR -F ", " --info-script " FILE, " --new-volume-script " FILE"
+]
+[
+.BR --force-local
+]
+[
+.BR --format " FORMAT"
+]
+[
+.BR -g ", " --listed-incremental " SNAPSHOT"
+]
+[
+.BR -G ", " --incremental
+]
+[
+.BR --group " GROUP"
+]
+[
+.BR -h ", " --dereference
+]
+[
+.BR --help
+]
+[
+.BR -i ", " --ignore-zeros
+]
+[
+.BR -I ", " --use-compress-program " PROG"
+]
+[
+.BR --ignore-case
+]
+[
+.BR --ignore-command-error
+]
+[
+.BR --ignore-failed-read
+]
+[
+.BR --index-file " FILE"
+]
+[
+.BR -j ", " --bzip2
+]
+[
+.BR -J ", " --xz
+]
+[
+.BR -k ", " --keep-old-files
+]
+[
+.BR -K ", " --starting-file " FILE"
+]
+[
+.BR --keep-newer-files
+]
+[
+.BR -l ", " --check-links
+]
+[
+.BR -L ", " --tape-length " N"
+]
+[
+.BR --lzip
+]
+[
+.BR --lzma
+]
+[
+.BR --lzop
+]
+[
+.BR -m ", " --touch ", " --modification-time
+]
+[
+.BR -M ", " --multi-volume
+]
+[
+.BR --mode " PERMISSIONS"
+]
+[
+.BR --mtime " DATE"
+]
+[
+.BR -N ", " --after-date " DATE, " --newer " DATE"
+]
+[
+.BR --newer-mtime " DATE"
+]
+[
+.BR --no-anchored
+]
+[
+.BR --no-auto-compress
+]
+[
+.BR --no-delay-directory-restore
+]
+[
+.BR --no-ignore-case
+]
+[
+.BR --no-ignore-command-error
+]
+[
+.BR --no-overwrite-dir
+]
+[
+.BR --no-quote-chars
+]
+[
+.BR --no-recursion
+]
+[
+.BR --no-same-permissions
+]
+[
+.BR --no-unquote
+]
+[
+.BR --no-wildcards
+]
+[
+.BR --no-wildcards-match-slash
+]
+[
+.BR --null
+]
+[
+.BR --numeric-owner
+]
+[
+.BR -o ", " --old-archive ", " --portability ", " --no-same-owner
+]
+[
+.BR -O ", " --to-stdout
+]
+[
+.BR --occurrence " NUM"
+]
+[
+.BR --one-file-system
+]
+[
+.BR --overwrite
+]
+[
+.BR --overwrite-dir
+]
+[
+.BR --owner " USER"
+]
+[
+.BR -p ", " --same-permissions ", " --preserve-permissions
+]
+[
+.BR -P ", " --absolute-names
+]
+[
+.BR --pax-option " KEYWORD-LIST"
+]
+[
+.BR --posix
+]
+[
+.BR --preserve
+]
+[
+.BR --quote-chars " STRING"
+]
+[
+.BR --quote-style " STYLE"
+]
+[
+.BR -R ", " --block-number
+]
+[
+.BR --record-size " SIZE"
+]
+[
+.BR --recursion
+]
+[
+.BR --recursive-unlink
+]
+[
+.BR --remove-files
+]
+[
+.BR --restrict
+]
+[
+.BR --rmt-command " CMD"
+]
+[
+.BR --rsh-command " CMD"
+]
+[
+.BR -s ", " --same-order ", " --preserve-order
+]
+[
+.BR -S ", " --sparse
+]
+[
+.BR --same-owner
+]
+[
+.BR --show-defaults
+]
+[
+.BR --show-omitted-dirs
+]
+[
+.BR --show-transformed-names ", " --show-stored-names
+]
+[
+.BR --strip-components " NUMBER"
+]
+[
+.BR --suffix " SUFFIX"
+]
+[
+.BR -T ", " --files-from " FILE"
+]
+[
+.BR --test-label
+]
+[
+.BR --to-command " COMMAND"
+]
+[
+.BR --transform " EXPRESSION"
+]
+[
+.BR --totals
+]
+[
+.BR -U ", " --unlink-first
+]
+[
+.BR --unquote
+]
+[
+.BR --utc
+]
+[
+.BR -v ", " --verbose
+]
+[
+.BR -V ", " --label " NAME"
+]
+[
+.BR --version
+]
+[
+.BR --volno-file " FILE"
+]
+[
+.BR -w ", " --interactive ", " --confirmation
+]
+[
+.BR -W ", " --verify
+]
+[
+.BR --wildcards
+]
+[
+.BR --wildcards-match-slash
+]
+[
+.BR -X ", " --exclude-from " FILE"
+]
+[
+.BR -z ", " --gzip ", " --gunzip ", " --ungzip
+]
+[
+.BR -Z ", " --compress ", " --uncompress
+]
+[
+.BR -[0-7][lmh]
+]
+.SH DESCRIPTION
+This manual page documents the GNU version of \fBtar\fR, an archiving
+program designed to store and extract files from an archive file known
+as a \fItarfile\fR. A \fItarfile\fR may be made on a tape drive,
+however, it is also common to write a \fItarfile\fR to a normal file.
+The first argument to \fBtar\fR must be one of the options \fBAcdrtux\fR,
+followed by any optional functions. The final arguments to \fBtar\fR
+are the names of the files or directories which should be archived. The
+use of a directory name always implies that the subdirectories below
+should be included in the archive.
+.SH EXAMPLES
+.TP
+.B tar -xvf foo.tar
+verbosely extract foo.tar
+.TP
+.B tar -xzf foo.tar.gz
+extract gzipped foo.tar.gz
+.TP
+.B tar -cjf foo.tar.bz2 bar/
+create bzipped tar archive of the directory bar called foo.tar.bz2
+.TP
+.B tar -xjf foo.tar.bz2 -C bar/
+extract bzipped foo.tar.bz2 after changing directory to bar
+.TP
+.B tar -xzf foo.tar.gz blah.txt
+extract the file blah.txt from foo.tar.gz
+.P
+Note: When working with archives, specifying the compression option is often
+times unnecessary as \fBtar\fR will automatically detect the compression type
+based on the suffix of the archive.
+.SH "FUNCTION LETTERS"
+.TP
+.B One of the following options must be used:
+.TP
+.BR -A ", " --catenate ", " --concatenate
+append tar files to an archive
+.TP
+.BR -c ", " --create
+create a new archive
+.TP
+.BR -d ", " --diff ", " --compare
+find differences between archive and file system
+.TP
+.BR -r ", " --append
+append files to the end of an archive
+.TP
+.BR -t ", " --list
+list the contents of an archive
+.TP
+.BR -u ", " --update
+only append files that are newer than the existing in archive
+.TP
+.BR -x ", " --extract ", " --get
+extract files from an archive
+.TP
+.BR --delete
+delete from the archive (not for use on magnetic tapes!)
+.SH "COMMON OPTIONS"
+.TP
+.BR -C ", " --directory " DIR"
+change to directory DIR
+.TP
+.BR -f ", " --file " [HOSTNAME:]FILE"
+use archive file or device FILE (default is "-", meaning stdin/stdout)
+.TP
+.BR -j ", " --bzip2
+filter archive through bzip2; use to decompress .bz2 files
+.TP
+.BR -J ", " --xz
+filter archive through xz; use to decompress .xz files
+.TP
+.BR -p ", " --preserve-permissions
+extract all protection information
+.TP
+.BR -v ", " --verbose
+verbosely list files processed
+.TP
+.BR -z ", " --gzip ", " --ungzip
+filter the archive through gzip
+.SH "ALL OPTIONS"
+.TP
+.BR -a ", " --auto-compress
+use archive suffix to determine the compression program
+.TP
+.BR --add-file " FILE"
+add specified FILE to the archive (useful if FILE starts with a dash)
+.TP
+.BR --anchored
+patterns will match the start of file names
+.TP
+.BR --atime-preserve
+don't change access times of files that are archived
+.TP
+.BR -b ", " --blocking-factor " N"
+block size of Nx512 bytes (default N=20)
+.TP
+.BR -B ", " --read-full-blocks
+reblock as we read (for reading 4.2BSD pipes)
+.TP
+.BR --backup " BACKUP-TYPE"
+backup files instead of deleting them using BACKUP-TYPE simple or
+numbered
+.TP
+.BR --block-compress
+block the output of compression program for tapes
+.TP
+.BR -C ", " --directory " DIR"
+change to directory DIR
+.TP
+.BR --checkpoint
+print directory names while reading the archive
+.TP
+.BR --delay-directory-restore
+delay setting modification times and permissions of extracted directories
+until the end of extraction
+.TP
+.BR --exclude " PATTERN"
+exclude files based upon PATTERN
+.TP
+.BR --exclude-caches
+exclude directories that contain a cache directory tag
+.TP
+.BR --exclude-tag " FILE"
+exclude directories that contain a file named FILE
+.TP
+.BR -f ", " --file " [HOSTNAME:]FILE"
+use archive file or device FILE (default "-", meaning stdin/stdout)
+.TP
+.BR -F ", " --info-script " FILE, " --new-volume-script " FILE"
+run script at end of each tape (implies \fI--multi-volume\fR)
+.TP
+.BR --force-local
+archive file is local even if its name contains a colon
+.TP
+.BR --format " FORMAT"
+selects the format of the created archive
+.nf
+\fIv7\fR - Unix V7
+\fIoldgnu\fR - GNU tar <=1.12
+\fIgnu\fR - GNU tar 1.13
+\fIustar\fR - POSIX.1-1988
+\fIposix\fR - POSIX.1-2001
+.fi
+.TP
+.BR -g ", " --listed-incremental " SNAPSHOT"
+create/list/extract new GNU-format incremental backup
+.TP
+.BR --group " GROUP"
+give files added to the archive a group id of GROUP instead of the group id
+of the source file; this option does not affect extraction
+.TP
+.BR -G ", " --incremental
+create/list/extract old GNU-format incremental backup
+.TP
+.BR -h ", " --dereference
+don't archive symlinks; archive the files they point to
+.TP
+.BR --help
+like this manpage, but not as cool
+.TP
+.BR -i ", " --ignore-zeros
+ignore blocks of zeros in archive (normally mean EOF)
+.TP
+.BR -I ", " --use-compress-program " PROG"
+access the archive through PROG (which is generally a compression program;
+it must accept the \fI-d\fR option)
+.TP
+.BR --ignore-case
+ignore case when excluding files
+.TP
+.BR --ignore-command-error
+ignore exit codes of subprocesses
+.TP
+.BR --ignore-failed-read
+don't exit with non-zero status on unreadable files
+.TP
+.BR --index-file " FILE"
+send verbose output to FILE instead of stdout
+.TP
+.BR -j ", " --bzip2
+filter archive through bzip2, use to decompress .bz2 files
+.TP
+.BR -J ", " --xz
+filter archive through xz; use to decompress .xz files
+.TP
+.BR -k ", " --keep-old-files
+keep existing files; don't overwrite them from archive
+.TP
+.BR -K ", " --starting-file " FILE"
+begin at file FILE in the archive
+.TP
+.BR --keep-newer-files
+do not overwrite files which are newer than the archive
+.TP
+.BR -l ", " --check-links
+warn if number of hard links to the file on the filesystem mismatchs
+the number of links recorded in the archive
+.TP
+.BR -L ", " --tape-length " N"
+change tapes after writing N*1024 bytes
+.TP
+.BR -m ", " --touch ", " --modification-time
+don't extract file modified time
+.TP
+.BR -M ", " --multi-volume
+create/list/extract multi-volume archive
+.TP
+.BR --mode " PERMISSIONS"
+apply PERMISSIONS while adding files (see \fBchmod\fR(1))
+.TP
+.BR --mtime " DATE"
+when creating archives, use DATE as the modification time of the members,
+instead of their actual modification times
+.TP
+.BR -N ", " --after-date " DATE, " --newer " DATE"
+only store files that were modified or had status updates (permissions,
+ACLs, extended attributes, ...) since DATE
+.TP
+.BR --newer-mtime " DATE"
+like \fI--newer\fR, but only store files that were modified since DATE
+.TP
+.BR --no-anchored
+match any subsequenceof the name's components with \fI--exclude\fR
+.TP
+.BR --no-auto-compress
+do not use archive suffix to determine the compression program
+.TP
+.BR --no-delay-directory-restore
+modification times and permissions of extracted directories are set when
+all files from this directory have been extracted; this is the default
+.TP
+.BR --no-ignore-command-error
+print warnings about subprocesses that terminated with a non-zero exit code
+.TP
+.BR --no-ignore-case
+use case-sensitive matching with \fI--exclude\fR
+.TP
+.BR --no-overwrite-dir
+preserve metadata of existing directories when extracting files from an
+archive
+.TP
+.BR --no-quote-chars " STRING"
+remove characters listed in STRING from the list of quoted characters
+set by a previous \fI--quote-chars\fR option
+.TP
+.BR --no-recursion
+don't recurse into directories
+.TP
+.BR --no-same-permissions
+apply user's umask when extracting files instead of recorded permissions
+.TP
+.BR --no-unquote
+treat all input file or member names literally, do not interpret
+escape sequences
+.TP
+.BR --no-wildcards
+don't use wildcards with \fI--exclude\fR
+.TP
+.BR --no-wildcards-match-slash
+wildcards do not match slashes (/) with \fI--exclude\fR
+.TP
+.BR --null
+\fI--files-from\fR reads null-terminated names, disable \fI--directory\fR
+.TP
+.BR --numeric-owner
+always use numbers for user/group names
+.TP
+.BR -o ", " --old-archive ", " --portability
+like \fI--format=v7\fR; \fI-o\fR exhibits this behavior when creating an
+archive (deprecated behavior)
+.TP
+.BR -o ", " --no-same-owner
+do not attempt to restore ownership when extracting; \fI-o\fR exhibits
+this behavior when extracting an archive
+.TP
+.BR -O ", " --to-stdout
+extract files to standard output
+.TP
+.BR --occurrence " NUM"
+process only NUM occurrences of each named file; used with
+\fI--delete\fR, \fI--diff\fR, \fI--extract\fR, or \fI--list\fR
+.TP
+.BR --one-file-system
+stay in local file system when creating an archive
+.TP
+.BR --overwrite
+overwrite existing files and directory metadata when extracting
+.TP
+.BR --overwrite-dir
+overwrite directory metadata when extracting
+.TP
+.BR --owner " USER"
+give files added to the archive a user id of USER instead of the user id
+of the source file; this option does not affect extraction
+.TP
+.BR -p ", " --preserve-permissions ", " --same-permissions
+extract all protection information
+.TP
+.BR -P ", " --absolute-names
+don't strip leading `/'s from file names
+.TP
+.BR --pax-option " KEYWORD-LIST"
+used only with POSIX.1-2001 archives to modify the way \fBtar\fR handles
+extended header keywords
+.TP
+.BR --posix
+like \fI--format=posix\fR
+.TP
+.BR --preserve
+like \fI--preserve-permissions\fR plus \fI--same-order\fR
+.TP
+.BR --quote-chars " STRING"
+always quote the characters from STRING, even if the selected quoting
+style would not quote them
+.TP
+.BR --quote-style " STYLE"
+set the quoting style to be used when printing member and file names
+.TP
+.BR -R ", " --record-number
+show record number within archive with each message
+.TP
+.BR --record-size " SIZE"
+use SIZE bytes per record when accessing archives
+.TP
+.BR --recursion
+recurse into directories
+.TP
+.BR --recursive-unlink
+remove existing directories before extracting directories of the same name
+.TP
+.BR --remove-files
+remove files after adding them to the archive
+.TP
+.BR --restrict
+disable the use of some potentially harmful options; currently this
+disables shell invocation from the multi-volume menu
+.TP
+.BR --rmt-command " CMD"
+use CMD instead of the default /usr/sbin/rmt
+.TP
+.BR --rsh-command " CMD"
+use remote CMD instead of \fBrsh\fR(1)
+.TP
+.BR -s ", " --same-order ", " --preserve-order
+list of names to extract is sorted to match archive
+.TP
+.BR -S ", " --sparse
+handle sparse files efficiently
+.TP
+.BR --same-owner
+create extracted files with the same ownership
+.TP
+.BR --show-defaults
+display the default options used by \fBtar\fR
+.TP
+.BR --show-omitted-dirs
+print directories \fBtar\fR skips while operating on an archive
+.TP
+.BR --show-transformed-names ", " --show-stored-names
+display file or member names after applying any \fBsed\fR transformations
+.TP
+.BR --strip-components " NUMBER"
+strip NUMBER of leading path components from file names before extraction
+.TP
+.BR --suffix " SUFFIX"
+use SUFFIX instead of default '~' when backing up files
+.TP
+.BR -T ", " --files-from " FILE"
+get names to extract or create from file FILE
+.TP
+.BR --test-label
+read the volume label; if an argument is specified, test whether it
+matches the volume label
+.TP
+.BR --to-command " COMMAND"
+during extraction, pipe extracted files to the standard input of COMMAND
+.TP
+.BR --totals
+print total bytes written with --create
+.TP
+.BR --transform " EXPRESSION"
+transform file or member names using the \fBsed\fR replacement expression
+EXPRESSION
+.TP
+.BR -U ", " --unlink-first
+remove existing files before extracting files of the same name
+.TP
+.BR --unquote
+enable unquoting input file or member names; this is the default
+.TP
+.BR --utc
+display file modification dates in UTC
+.TP
+.BR -v ", " --verbose
+verbosely list files processed
+.TP
+.BR -V ", " --label " NAME"
+create archive with volume name NAME
+.TP
+.BR --version
+print \fBtar\fR program version number
+.TP
+.BR --volno-file " FILE"
+keep track of which volume of a multi-volume archive its working in
+FILE; used with \fI--multi-volume\fR
+.TP
+.BR -w ", " --interactive ", " --confirmation
+ask for confirmation for every action
+.TP
+.BR -W ", " --verify
+attempt to verify the archive after writing it
+.TP
+.BR --wildcards
+use wildcards with \fI--exclude\fR
+.TP
+.BR --wildcards-match-slash
+wildcards match slashes (/) with \fI--exclude\fR
+.TP
+.BR -X ", " --exclude-from " FILE"
+exclude files listed in FILE
+.TP
+.BR -z ", " --gzip ", " --gunzip ", " --ungzip
+filter the archive through gzip
+.TP
+.BR -Z ", " --compress ", " --uncompress
+filter the archive through compress
+.TP
+.BR -[0-7][lmh]
+specify drive and density
+.SH BUGS
+The GNU folks, in general, abhor man pages and create info documents instead.
+The maintainer of \fBtar\fR falls into this category. Thus, this man page may
+not be complete nor current, and it is included in the Gentoo portage tree
+because man is a great tool :). This man page was first taken from Debian
+Linux and has since been lovingly updated here.
+.SH "REPORTING BUGS"
+Please report bugs via http://bugs.gentoo.org/
+.SH "AUTHORS"
+.nf
+Debian Linux http://www.debian.org/
+Mike Frysinger <vapier@gentoo.org>
+.fi
diff --git a/app-arch/tar/files/tar.1-1.27 b/app-arch/tar/files/tar.1-1.27
new file mode 100644
index 000000000000..700b569a57c6
--- /dev/null
+++ b/app-arch/tar/files/tar.1-1.27
@@ -0,0 +1,388 @@
+.\" generated by script on Mon Oct 21 08:29:21 2013
+.Dd Oct 21, 2013
+.Dt TAR 1
+.Sh NAME
+.Nm tar
+.Nd The GNU version of the tar archiving utility
+.Sh SYNOPSIS
+.Nm tar
+.Oo Fl Oc Cm A Fl \-catenate \-concatenate Cm \||\| c Fl \-create Cm \||\| d Fl \-diff \-compare Cm \||\| Fl \-delete Cm \||\| r Fl \-append Cm \||\| t Fl \-list Cm \||\| Fl \-test\-label Cm \||\| u Fl \-update Cm \||\| x Fl \-extract \-get
+.Op Ar options
+.Op Ar pathname ...
+.Sh DESCRIPTION
+.Nm Tar
+stores and extracts files from a tape or disk archive.
+.Pp
+The first argument to
+tar
+should be a function; either one of the letters
+.Cm Acdrtux ,
+or one of the long function names.
+A function letter need not be prefixed with ``\-'', and may be combined
+with other single-letter options.
+A long function name must be prefixed with
+.Cm \\-\\- .
+Some options take a parameter; with the single-letter form
+these must be given as separate arguments.
+With the long form, they may be given by appending
+.Cm = Ns Ar value
+to the option.
+.Sh FUNCTION LETTERS
+Main operation mode:
+.Bl -tag -width flag
+.It Fl A , Fl \-catenate , Fl \-concatenate
+append tar files to an archive
+.It Fl c , Fl \-create
+create a new archive
+.It Fl d , Fl \-diff , Fl \-compare
+find differences between archive and file system
+.It Fl \-delete
+delete from the archive (not on mag tapes!)
+.It Fl r , Fl \-append
+append files to the end of an archive
+.It Fl t , Fl \-list
+list the contents of an archive
+.It Fl \-test\-label
+test the archive volume label and exit
+.It Fl u , Fl \-update
+only append files newer than copy in archive
+.It Fl x , Fl \-extract , Fl \-get
+extract files from an archive
+.El
+.Sh OTHER OPTIONS
+Operation modifiers:
+.Bl -tag -width flag
+.It \-[0\-7][lmh]
+specify drive and density
+.It Fl a , Fl \-auto\-compress
+use archive suffix to determine the compression program
+.It Fl \-acls
+Enable the POSIX ACLs support
+.It Fl \-no\-acls
+Disable the POSIX ACLs support
+.It Fl \-add\-file Ns \= Ns Ar FILE
+add given FILE to the archive (useful if its name starts with a dash)
+.It Fl \-anchored
+patterns match file name start
+.It Fl \-no\-anchored
+patterns match after any '/' (default for exclusion)
+.It Fl \-atime\-preserve
+preserve access times on dumped files, either by restoring the times
+.It Fl \-no\-auto\-compress
+do not use archive suffix to determine the compression program
+.It Fl b , Fl \-blocking\-factor Ar BLOCKS
+BLOCKS x 512 bytes per record
+.It Fl B , Fl \-read\-full\-records
+reblock as we read (for 4.2BSD pipes)
+.It Fl \-backup
+backup before removal, choose version CONTROL
+.It Fl C , Fl \-directory Ar DIR
+change to directory DIR
+.It Fl \-check\-device
+check device numbers when creating incremental archives (default)
+.It Fl \-no\-check\-device
+do not check device numbers when creating incremental archives
+.It Fl \-checkpoint
+display progress messages every NUMBERth record (default 10)
+.It Fl \-checkpoint\-action Ns \= Ns Ar ACTION
+execute ACTION on each checkpoint
+.It Fl \-delay\-directory\-restore
+delay setting modification times and permissions of extracted
+.It Fl \-no\-delay\-directory\-restore
+cancel the effect of --delay-directory-restore option
+.It Fl \-exclude Ns \= Ns Ar PATTERN
+exclude files, given as a PATTERN
+.It Fl \-exclude\-backups
+exclude backup and lock files
+.It Fl \-exclude\-caches
+exclude contents of directories containing CACHEDIR.TAG,
+.It Fl \-exclude\-caches\-all
+exclude directories containing CACHEDIR.TAG
+.It Fl \-exclude\-caches\-under
+exclude everything under directories containing CACHEDIR.TAG
+.It Fl \-exclude\-tag Ns \= Ns Ar FILE
+exclude contents of directories containing FILE, except
+.It Fl \-exclude\-tag\-all Ns \= Ns Ar FILE
+exclude directories containing FILE
+.It Fl \-exclude\-tag\-under Ns \= Ns Ar FILE
+exclude everything under directories containing FILE
+.It Fl \-exclude\-vcs
+exclude version control system directories
+.It Fl f , Fl \-file Ar ARCHIVE
+use archive file or device ARCHIVE
+.It Fl F , Fl \-info\-script , Fl \-new\-volume\-script Ar NAME
+run script at end of each tape (implies -M)
+.It Fl \-force\-local
+archive file is local even if it has a colon
+.It Fl \-full\-time
+print file time to its full resolution
+.It Fl g , Fl \-listed\-incremental Ar FILE
+handle new GNU-format incremental backup
+.It Fl G , Fl \-incremental
+handle old GNU-format incremental backup
+.It Fl \-group Ns \= Ns Ar NAME
+force NAME as group for added files
+.It Fl h , Fl \-dereference
+follow symlinks; archive and dump the files they point to
+.It Fl H , Fl \-format Ar FORMAT
+create archive of the given formatFORMAT is one of the following:
+.Bl -tag -width flag
+.It Fl \-format=gnu
+GNU tar 1.13.x format
+.It Fl \-format=oldgnu
+GNU format as per tar <= 1.12
+.It Fl \-format=pax
+POSIX 1003.1-2001 (pax) format
+.It Fl \-format=posix
+same as pax
+.It Fl \-format=ustar
+POSIX 1003.1-1988 (ustar) format
+.It Fl \-format=v7
+old V7 tar format
+.El
+.It Fl \-hard\-dereference
+follow hard links; archive and dump the files they refer to
+.It Fl i , Fl \-ignore\-zeros
+ignore zeroed blocks in archive (means EOF)
+.It Fl I , Fl \-use\-compress\-program Ar PROG
+filter through PROG (must accept -d)
+.It Fl \-ignore\-case
+ignore case
+.It Fl \-no\-ignore\-case
+case sensitive matching (default)
+.It Fl \-ignore\-command\-error
+ignore exit codes of children
+.It Fl \-no\-ignore\-command\-error
+treat non-zero exit codes of children as error
+.It Fl \-ignore\-failed\-read
+do not exit with nonzero on unreadable files
+.It Fl \-index\-file Ns \= Ns Ar FILE
+send verbose output to FILE
+.It Fl j , Fl \-bzip2
+
+.It Fl J , Fl \-xz
+
+.It Fl k , Fl \-keep\-old\-files
+don't replace existing files when extracting,
+.It Fl K , Fl \-starting\-file Ar MEMBER-NAME
+begin at member MEMBER-NAME when reading the archive
+.It Fl \-keep\-directory\-symlink
+preserve existing symlinks to directories when extracting
+.It Fl \-keep\-newer\-files
+don't replace existing files that are newer than their archive copies
+.It Fl l , Fl \-check\-links
+print a message if not all links are dumped
+.It Fl L , Fl \-tape\-length Ar NUMBER
+change tape after writing NUMBER x 1024 bytes
+.It Fl \-level Ns \= Ns Ar NUMBER
+dump level for created listed-incremental archive
+.It Fl \-lzip
+
+.It Fl \-lzma
+
+.It Fl \-lzop
+
+.It Fl m , Fl \-touch
+don't extract file modified time
+.It Fl M , Fl \-multi\-volume
+create/list/extract multi-volume archive
+.It Fl \-mode Ns \= Ns Ar CHANGES
+force (symbolic) mode CHANGES for added files
+.It Fl \-mtime Ns \= Ns Ar DATE-OR-FILE
+set mtime for added files from DATE-OR-FILE
+.It Fl n , Fl \-seek
+archive is seekable
+.It Fl N , Fl \-newer , Fl \-after\-date Ar DATE-OR-FILE
+only store files newer than DATE-OR-FILE
+.It Fl \-newer\-mtime Ns \= Ns Ar DATE
+compare date and time when data changed only
+.It Fl \-null
+-T reads null-terminated names, disable -C
+.It Fl \-no\-null
+disable the effect of the previous --null option
+.It Fl \-numeric\-owner
+always use numbers for user/group names
+.It Fl O , Fl \-to\-stdout
+extract files to standard output
+.It Fl \-occurrence
+process only the NUMBERth occurrence of each file in the archive;
+.It Fl \-old\-archive , Fl \-portability
+same as --format=v7
+.It Fl \-one\-file\-system
+stay in local file system when creating archive
+.It Fl \-overwrite
+overwrite existing files when extracting
+.It Fl \-overwrite\-dir
+overwrite metadata of existing directories when extracting (default)
+.It Fl \-no\-overwrite\-dir
+preserve metadata of existing directories
+.It Fl \-owner Ns \= Ns Ar NAME
+force NAME as owner for added files
+.It Fl p , Fl \-preserve\-permissions , Fl \-same\-permissions
+extract information about file permissions (default for superuser)
+.It Fl P , Fl \-absolute\-names
+don't strip leading '/'s from file names
+.It Fl \-pax\-option Ns \= Ns Ar keyword[[:]=value][,keyword[[:]=value]]...
+control pax keywords
+.It Fl \-posix
+same as --format=posix
+.It Fl \-preserve
+same as both -p and -s
+.It Fl \-quote\-chars Ns \= Ns Ar STRING
+additionally quote characters from STRING
+.It Fl \-no\-quote\-chars Ns \= Ns Ar STRING
+disable quoting for characters from STRING
+.It Fl \-quoting\-style Ns \= Ns Ar STYLE
+set name quoting style; see below for valid STYLE values
+.It Fl R , Fl \-block\-number
+show block number within archive with each message
+.It Fl \-record\-size Ns \= Ns Ar NUMBER
+NUMBER of bytes per record, multiple of 512
+.It Fl \-recursion
+recurse into directories (default)
+.It Fl \-no\-recursion
+avoid descending automatically in directories
+.It Fl \-recursive\-unlink
+empty hierarchies prior to extracting directory
+.It Fl \-remove\-files
+remove files after adding them to the archive
+.It Fl \-restrict
+disable use of some potentially harmful options
+.It Fl \-rmt\-command Ns \= Ns Ar COMMAND
+use given rmt COMMAND instead of rmt
+.It Fl \-rsh\-command Ns \= Ns Ar COMMAND
+use remote COMMAND instead of rsh
+.It Fl s , Fl \-preserve\-order , Fl \-same\-order
+member arguments are listed in the same order as the
+.It Fl S , Fl \-sparse
+handle sparse files efficiently
+.It Fl \-same\-owner
+try extracting files with the same ownership as exists in the archive (default for superuser)
+.It Fl \-no\-same\-owner
+extract files as yourself (default for ordinary users)
+.It Fl \-no\-same\-permissions
+apply the user's umask when extracting permissions from the archive (default for ordinary users)
+.It Fl \-no\-seek
+archive is not seekable
+.It Fl \-selinux
+Enable the SELinux context support
+.It Fl \-no\-selinux
+Disable the SELinux context support
+.It Fl \-show\-defaults
+show tar defaults
+.It Fl \-show\-omitted\-dirs
+when listing or extracting, list each directory that does not match search criteria
+.It Fl \-show\-snapshot\-field\-ranges
+show valid ranges for snapshot-file fields
+.It Fl \-show\-transformed\-names , Fl \-show\-stored\-names
+show file or archive names after transformation
+.It Fl \-skip\-old\-files
+don't replace existing files when extracting, silently skip over them
+.It Fl \-sparse\-version Ns \= Ns Ar MAJOR[.MINOR]
+set version of the sparse format to use (implies --sparse)
+.It Fl \-strip\-components Ns \= Ns Ar NUMBER
+strip NUMBER leading components from file names on extraction
+.It Fl \-suffix Ns \= Ns Ar STRING
+backup before removal, override usual suffix ('~' unless overridden by environment variable SIMPLE_BACKUP_SUFFIX)
+.It Fl T , Fl \-files\-from Ar FILE
+get names to extract or create from FILE
+.It Fl \-to\-command Ns \= Ns Ar COMMAND
+pipe extracted files to another program
+.It Fl \-totals
+print total bytes after processing the archive;
+.It Fl \-transform , Fl \-xform Ar EXPRESSION
+use sed replace EXPRESSION to transform file names
+.It Fl U , Fl \-unlink\-first
+remove each file prior to extracting over it
+.It Fl \-unquote
+unquote filenames read with -T (default)
+.It Fl \-no\-unquote
+do not unquote filenames read with -T
+.It Fl \-utc
+print file modification times in UTC
+.It Fl v , Fl \-verbose
+verbosely list files processed
+.It Fl V , Fl \-label Ar TEXT
+create archive with volume name TEXT; at list/extract time, use TEXT as a globbing pattern for volume name
+.It Fl \-volno\-file Ns \= Ns Ar FILE
+use/update the volume number in FILE
+.It Fl w , Fl \-interactive , Fl \-confirmation
+ask for confirmation for every action
+.It Fl W , Fl \-verify
+attempt to verify the archive after writing it
+.It Fl \-warning Ns \= Ns Ar KEYWORD
+warning control
+.It Fl \-wildcards
+use wildcards (default for exclusion)
+.It Fl \-wildcards\-match\-slash
+wildcards match '/' (default for exclusion)
+.It Fl \-no\-wildcards\-match\-slash
+wildcards do not match '/'
+.It Fl \-no\-wildcards
+verbatim string matching
+.It Fl X , Fl \-exclude\-from Ar FILE
+exclude patterns listed in FILE
+.It Fl \-xattrs
+Enable extended attributes support
+.It Fl \-xattrs\-exclude Ns \= Ns Ar MASK
+specify the exclude pattern for xattr keys
+.It Fl \-xattrs\-include Ns \= Ns Ar MASK
+specify the include pattern for xattr keys
+.It Fl \-no\-xattrs
+Disable extended attributes support
+.It Fl z , Fl \-gzip , Fl \-gunzip Fl \-ungzip
+
+.It Fl Z , Fl \-compress , Fl \-uncompress
+
+.El
+.Sh ENVIRONMENT
+The behavior of tar is controlled by the following environment variables,
+among others:
+.Bl -tag -width Ds
+.It Ev SIMPLE_BACKUP_SUFFIX
+Backup prefix to use when extracting, if
+.Fl \-suffix
+is not specified.
+The backup suffix defaults to `~' if neither is specified.
+.It Ev TAR_OPTIONS
+Options to prepend to those specified on the command line, separated by
+whitespace. Embedded backslashes may be used to escape whitespace or
+backslashes within an option.
+.It Ev TAPE
+Device or file to use for the archive if
+.Fl \-file
+is not specified.
+If this environment variable is unset, use stdin or stdout instead.
+.El
+.Sh EXAMPLES
+Create archive.tar from files foo and bar.
+.Bd -literal -offset indent -compact
+tar \-cf archive.tar foo bar
+.Ed
+List all files in archive.tar verbosely.
+.Bd -literal -offset indent -compact
+tar \-tvf archive.tar
+.Ed
+Extract all files from archive.tar.
+.Bd -literal -offset indent -compact
+tar \-xf archive.tar
+.Ed
+.Sh SEE ALSO
+.\" libarchive
+.Xr tar 5 ,
+.\" man-pages
+.Xr symlink 7 ,
+.Xr rmt 8
+.Sh HISTORY
+The
+.Nm tar
+command appeared in
+.At v7 .
+.Sh BUGS
+The GNU folks, in general, abhor man pages, and create info documents instead.
+Unfortunately, the info document describing tar is licensed under the GFDL with
+invariant cover texts, which makes it impossible to include any text
+from that document in this man page.
+Most of the text in this document was automatically extracted from the usage
+text in the source.
+It may not completely describe all features of the program.
diff --git a/app-arch/tar/metadata.xml b/app-arch/tar/metadata.xml
new file mode 100644
index 000000000000..f8de3a933ff2
--- /dev/null
+++ b/app-arch/tar/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<use>
+ <flag name='minimal'>just install `tar`</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:tar</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/app-arch/tar/tar-1.26-r1.ebuild b/app-arch/tar/tar-1.26-r1.ebuild
new file mode 100644
index 000000000000..3f9604adc580
--- /dev/null
+++ b/app-arch/tar/tar-1.26-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit flag-o-matic eutils autotools
+
+DESCRIPTION="Use this to make tarballs :)"
+HOMEPAGE="http://www.gnu.org/software/tar/"
+SRC_URI="mirror://gnu/tar/${P}.tar.bz2
+ mirror://gnu-alpha/tar/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="minimal nls static userland_GNU xattr"
+
+RDEPEND="xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.10.35 )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-xattr.patch #382067
+ epatch "${FILESDIR}"/${P}-no-gets.patch
+ eautoreconf
+
+ if ! use userland_GNU ; then
+ sed -i \
+ -e 's:/backup\.sh:/gbackup.sh:' \
+ scripts/{backup,dump-remind,restore}.in \
+ || die "sed non-GNU"
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ FORCE_UNSAFE_CONFIGURE=1 \
+ econf \
+ --enable-backup-scripts \
+ --bindir="${EPREFIX}"/bin \
+ --libexecdir="${EPREFIX}"/usr/sbin \
+ $(usex userland_GNU "" "--program-prefix=g") \
+ $(use_enable nls) \
+ $(use_enable xattr)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ local p=$(usex userland_GNU "" "g")
+ if [[ -z ${p} ]] ; then
+ # a nasty yet required piece of baggage
+ exeinto /etc
+ doexe "${FILESDIR}"/rmt || die
+ fi
+
+ # autoconf looks for gtar before tar (in configure scripts), hence
+ # in Prefix it is important that it is there, otherwise, a gtar from
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead
+ # of the Prefix provided (GNU) tar
+ if use prefix ; then
+ dosym tar /bin/gtar
+ fi
+
+ dodoc AUTHORS ChangeLog* NEWS README* THANKS
+ newman "${FILESDIR}"/tar.1 ${p}tar.1
+ mv "${ED}"/usr/sbin/${p}backup{,-tar}
+ mv "${ED}"/usr/sbin/${p}restore{,-tar}
+
+ if use minimal ; then
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+ -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
+ -delete
+ fi
+}
diff --git a/app-arch/tar/tar-1.27.1-r2.ebuild b/app-arch/tar/tar-1.27.1-r2.ebuild
new file mode 100644
index 000000000000..41b50678d723
--- /dev/null
+++ b/app-arch/tar/tar-1.27.1-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Use this to make tarballs :)"
+HOMEPAGE="http://www.gnu.org/software/tar/"
+SRC_URI="mirror://gnu/tar/${P}.tar.bz2
+ mirror://gnu-alpha/tar/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl minimal nls selinux static userland_GNU xattr"
+
+RDEPEND="acl? ( virtual/acl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.10.35 )
+ xattr? ( sys-apps/attr )"
+
+src_prepare() {
+ EPATCH_OPTS="-Z" \
+ epatch "${FILESDIR}/${P}-xattr_build_fix.patch"
+ epatch "${FILESDIR}/${P}-recursion_norecursion.patch"
+ if ! use userland_GNU ; then
+ sed -i \
+ -e 's:/backup\.sh:/gbackup.sh:' \
+ scripts/{backup,dump-remind,restore}.in \
+ || die "sed non-GNU"
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ FORCE_UNSAFE_CONFIGURE=1 \
+ econf \
+ --enable-backup-scripts \
+ --bindir="${EPREFIX}"/bin \
+ --libexecdir="${EPREFIX}"/usr/sbin \
+ $(usex userland_GNU "" "--program-prefix=g") \
+ $(use_with acl posix-acls) \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ $(use_with xattr xattrs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ local p=$(usex userland_GNU "" "g")
+ if [[ -z ${p} ]] ; then
+ # a nasty yet required piece of baggage
+ exeinto /etc
+ doexe "${FILESDIR}"/rmt
+ fi
+
+ # autoconf looks for gtar before tar (in configure scripts), hence
+ # in Prefix it is important that it is there, otherwise, a gtar from
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead
+ # of the Prefix provided (GNU) tar
+ if use prefix ; then
+ dosym tar /bin/gtar
+ fi
+
+ dodoc AUTHORS ChangeLog* NEWS README* THANKS
+ newman "${FILESDIR}"/tar.1-1.27 ${p}tar.1
+ mv "${ED}"/usr/sbin/${p}backup{,-tar} || die
+ mv "${ED}"/usr/sbin/${p}restore{,-tar} || die
+
+ if use minimal ; then
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+ -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
+ -delete || die
+ fi
+}
diff --git a/app-arch/tar/tar-1.28-r1.ebuild b/app-arch/tar/tar-1.28-r1.ebuild
new file mode 100644
index 000000000000..df935f42ca23
--- /dev/null
+++ b/app-arch/tar/tar-1.28-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Use this to make tarballs :)"
+HOMEPAGE="http://www.gnu.org/software/tar/"
+SRC_URI="mirror://gnu/tar/${P}.tar.bz2
+ mirror://gnu-alpha/tar/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl minimal nls selinux static userland_GNU xattr"
+
+RDEPEND="acl? ( virtual/acl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.10.35 )
+ xattr? ( sys-apps/attr )"
+
+src_prepare() {
+ if ! use userland_GNU ; then
+ sed -i \
+ -e 's:/backup\.sh:/gbackup.sh:' \
+ scripts/{backup,dump-remind,restore}.in \
+ || die "sed non-GNU"
+ fi
+ epatch "${FILESDIR}"/${P}-concat-listed.patch #546294
+ epatch "${FILESDIR}"/${P}-xattr.patch #548024
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ FORCE_UNSAFE_CONFIGURE=1 \
+ econf \
+ --enable-backup-scripts \
+ --bindir="${EPREFIX}"/bin \
+ --libexecdir="${EPREFIX}"/usr/sbin \
+ $(usex userland_GNU "" "--program-prefix=g") \
+ $(use_with acl posix-acls) \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ $(use_with xattr xattrs)
+}
+
+src_install() {
+ default
+
+ local p=$(usex userland_GNU "" "g")
+ if [[ -z ${p} ]] ; then
+ # a nasty yet required piece of baggage
+ exeinto /etc
+ doexe "${FILESDIR}"/rmt
+ fi
+
+ # autoconf looks for gtar before tar (in configure scripts), hence
+ # in Prefix it is important that it is there, otherwise, a gtar from
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead
+ # of the Prefix provided (GNU) tar
+ if use prefix ; then
+ dosym tar /bin/gtar
+ fi
+
+ mv "${ED}"/usr/sbin/${p}backup{,-tar} || die
+ mv "${ED}"/usr/sbin/${p}restore{,-tar} || die
+
+ if use minimal ; then
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+ -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
+ -delete || die
+ fi
+}
diff --git a/app-arch/tar/tar-1.28.ebuild b/app-arch/tar/tar-1.28.ebuild
new file mode 100644
index 000000000000..5cedad195412
--- /dev/null
+++ b/app-arch/tar/tar-1.28.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Use this to make tarballs :)"
+HOMEPAGE="http://www.gnu.org/software/tar/"
+SRC_URI="mirror://gnu/tar/${P}.tar.bz2
+ mirror://gnu-alpha/tar/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl minimal nls selinux static userland_GNU xattr"
+
+RDEPEND="acl? ( virtual/acl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.10.35 )
+ xattr? ( sys-apps/attr )"
+
+src_prepare() {
+ if ! use userland_GNU ; then
+ sed -i \
+ -e 's:/backup\.sh:/gbackup.sh:' \
+ scripts/{backup,dump-remind,restore}.in \
+ || die "sed non-GNU"
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ FORCE_UNSAFE_CONFIGURE=1 \
+ econf \
+ --enable-backup-scripts \
+ --bindir="${EPREFIX}"/bin \
+ --libexecdir="${EPREFIX}"/usr/sbin \
+ $(usex userland_GNU "" "--program-prefix=g") \
+ $(use_with acl posix-acls) \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ $(use_with xattr xattrs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ local p=$(usex userland_GNU "" "g")
+ if [[ -z ${p} ]] ; then
+ # a nasty yet required piece of baggage
+ exeinto /etc
+ doexe "${FILESDIR}"/rmt
+ fi
+
+ # autoconf looks for gtar before tar (in configure scripts), hence
+ # in Prefix it is important that it is there, otherwise, a gtar from
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead
+ # of the Prefix provided (GNU) tar
+ if use prefix ; then
+ dosym tar /bin/gtar
+ fi
+
+ dodoc AUTHORS ChangeLog* NEWS README* THANKS
+ mv "${ED}"/usr/sbin/${p}backup{,-tar} || die
+ mv "${ED}"/usr/sbin/${p}restore{,-tar} || die
+
+ if use minimal ; then
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+ -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
+ -delete || die
+ fi
+}
diff --git a/app-arch/tardelta/Manifest b/app-arch/tardelta/Manifest
new file mode 100644
index 000000000000..2d0c43e1f6e6
--- /dev/null
+++ b/app-arch/tardelta/Manifest
@@ -0,0 +1 @@
+DIST tardelta-1.0.1.tar.gz 3672 SHA256 49a8057d304bbe9d916ba3a3331f63e304f84846538ebe1bb23e6bc706749f69 SHA512 e2ef4fffd484c8e76d2c8b2c148e31e8af8dc6ff7d11625375c50353898f3051b22c4c36bd2c8eb9f3aee4fd5009d0b6a133eccf605ef3d50c27f381af17de57 WHIRLPOOL 0c33e634ab18fa7572d6f63b42fe0ee739fbcff0ed325b21989a4c3c77902887e071e1986e1afc16fe58333734c566ff0b26d07862ea159f2b93fff0e68741a6
diff --git a/app-arch/tardelta/metadata.xml b/app-arch/tardelta/metadata.xml
new file mode 100644
index 000000000000..f5453e0a6cd0
--- /dev/null
+++ b/app-arch/tardelta/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="github">zmedico/tardelta</remote-id>
+ </upstream>
+ <maintainer>
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/tardelta/tardelta-1.0.1.ebuild b/app-arch/tardelta/tardelta-1.0.1.ebuild
new file mode 100644
index 000000000000..3552e82f4442
--- /dev/null
+++ b/app-arch/tardelta/tardelta-1.0.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python3_{3,4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Generate a tarball of differences between two tarballs"
+HOMEPAGE="https://github.com/zmedico/tardelta"
+SRC_URI="https://github.com/zmedico/tardelta/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+src_prepare() {
+ sed -i "s:^\(__version__ =\).*:\\1 \"${PV}\":" src/${PN}.py || die
+ distutils-r1_src_prepare
+}
diff --git a/app-arch/tardy/Manifest b/app-arch/tardy/Manifest
new file mode 100644
index 000000000000..af09d7cef301
--- /dev/null
+++ b/app-arch/tardy/Manifest
@@ -0,0 +1 @@
+DIST tardy-1.28.D001.tar.gz 1848303 SHA256 79b4652a1d90745e131efcfc8512f4427b1388695036718938ec79fa5bc6c26f SHA512 d8f02d8a310cd3d84f89a67f3bf4e91689e33631b1701a98b70d32b801b1a7cafee5755f13ed18e31bb9d5b1ec147da21b13b57722e1bf15a9efc355ea5438df WHIRLPOOL 5e2db025e6243bb7f04ed1b39673e24fc7e3ef9c1c391c7c45fc55ae6aa5e689b9a26c3c8cc156c3f5364d496834902b6d0d77630e72a641360258b07c239fe4
diff --git a/app-arch/tardy/files/tardy-1.28-test-utc.patch b/app-arch/tardy/files/tardy-1.28-test-utc.patch
new file mode 100644
index 000000000000..3f15c38020e7
--- /dev/null
+++ b/app-arch/tardy/files/tardy-1.28-test-utc.patch
@@ -0,0 +1,10 @@
+--- tardy-1.28/test/00/t0075a.sh
++++ tardy-1.28/test/00/t0075a.sh
+@@ -19,6 +19,7 @@
+
+ TEST_SUBJECT="tarballs >2GB"
+ . test_prelude
++export TZ=UTC
+
+ # |||||
+ # beware potential timezone mismatch: vvvvv
diff --git a/app-arch/tardy/metadata.xml b/app-arch/tardy/metadata.xml
new file mode 100644
index 000000000000..4bc0f72ff7ab
--- /dev/null
+++ b/app-arch/tardy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>Tardy is a tar post-processor for manipulating the file headers.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tardy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/tardy/tardy-1.28.ebuild b/app-arch/tardy/tardy-1.28.ebuild
new file mode 100644
index 000000000000..b887141ade7a
--- /dev/null
+++ b/app-arch/tardy/tardy-1.28.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A tar post-processor"
+HOMEPAGE="http://tardy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tardy/${P}.D001.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+RDEPEND="app-arch/bzip2
+ app-arch/xz-utils
+ dev-libs/libexplain
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+src_prepare() {
+ sed -e 's/$(CXX) .* $(CXXFLAGS) -I./\0 -o $@/' \
+ -e '/mv \(.*\)\.o $@/d' \
+ -e '/@sleep 1/d' \
+ -e 's#^\(install-man: $(mandir)/man1/tardy.1\).*#\1#' \
+ -i Makefile.in || die
+
+ epatch "${FILESDIR}"/${P}-test-utc.patch
+ tc-export AR
+}
diff --git a/app-arch/tarsync/Manifest b/app-arch/tarsync/Manifest
new file mode 100644
index 000000000000..f079307332e1
--- /dev/null
+++ b/app-arch/tarsync/Manifest
@@ -0,0 +1 @@
+DIST tarsync-0.2.1.tar.bz2 13593 SHA256 5cbfdcb637b899c29bfb74e97a09daff6173c45201840aa5ac251eb93aef1775 SHA512 bebf8e495ad196c002414c41f9fe9737b5300de18b7c3b16576a7d3bfd94608f36f1b86cb6ed4879c600b71c7706255d9b2d4140b73c5743a473fa2500dbca2d WHIRLPOOL 27ec7ee1942b553aa05e47789b5d0c227a7ba4b239cf6837aeadf168420ebb671b0ac237dbf739d83d538b18d24f054a1e62364b7bd93811ed132958a1ab0417
diff --git a/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch b/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch
new file mode 100644
index 000000000000..f11c86bb248a
--- /dev/null
+++ b/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch
@@ -0,0 +1,59 @@
+diff --git a/excludes.c b/excludes.c
+index b7c928d..fa43cef 100644
+--- a/excludes.c
++++ b/excludes.c
+@@ -106,7 +106,7 @@ build_exclude(fnm_exclude **ex_ptr, const char *pattern)
+ }
+
+
+-inline int
++int
+ match_excludes(const char *dir, const char *file, fnm_exclude **excludes)
+ {
+ char *p;
+diff --git a/main.c b/main.c
+index 84feed4..2c2da3e 100644
+--- a/main.c
++++ b/main.c
+@@ -42,8 +42,8 @@ int remove_node(const char *path, struct stat *st);
+ int ensure_files_layout(const tar_entry **ttar, const unsigned int ttar_count, tar_entry ***missing,
+ unsigned int *missing_count, tar_entry ***existing, unsigned int *existing_count,
+ fnm_exclude **excludes);
+-inline int check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st);
+-inline int enforce_owner(const char *path, const tar_entry *t, struct stat *st);
++int check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st);
++int enforce_owner(const char *path, const tar_entry *t, struct stat *st);
+ int copy_whole_file(cfile *tar_cfh, const tar_entry *ttent);
+
+ static int check_mtime = 1;
+@@ -669,7 +669,7 @@ recursively_delete_dir(const char *path)
+ return ret;
+ }
+
+-inline int
++int
+ check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st)
+ {
+ int type;
+@@ -685,7 +685,7 @@ check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st
+ return 0;
+ }
+
+-inline int
++int
+ enforce_owner(const char *path, const tar_entry *t, struct stat *st)
+ {
+ struct stat st2;
+diff --git a/tar.c b/tar.c
+index 792ccd4..42dc8e7 100644
+--- a/tar.c
++++ b/tar.c
+@@ -40,7 +40,7 @@ int check_str_chksum(const char *block)
+
+ /* possibly this could be done different, what of endptr of strtol?
+ Frankly I worry about strtol trying to go too far and causing a segfault, due to tar fields not always having trailing \0 */
+-inline unsigned long octal_str2long(const char *string, unsigned int length)
++unsigned long octal_str2long(const char *string, unsigned int length)
+ {
+ if(string[length]) {
+ char *ptr = strndup(string, length);
diff --git a/app-arch/tarsync/files/tarsync-0.2.1-make.patch b/app-arch/tarsync/files/tarsync-0.2.1-make.patch
new file mode 100644
index 000000000000..72591115a45a
--- /dev/null
+++ b/app-arch/tarsync/files/tarsync-0.2.1-make.patch
@@ -0,0 +1,13 @@
+Respect CC and LDFLAGS.
+
+--- Makefile
++++ Makefile
+@@ -2,7 +2,7 @@
+ CC=gcc
+ endif
+ tarsync: main.o names.o tar.o string-misc.o fs.o options.o excludes.o
+- gcc $(CFLAGS) $^ -o tarsync -lcfile
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o tarsync -lcfile
+ all: tarsync
+
+ clean:
diff --git a/app-arch/tarsync/metadata.xml b/app-arch/tarsync/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/app-arch/tarsync/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/tarsync/tarsync-0.2.1-r1.ebuild b/app-arch/tarsync/tarsync-0.2.1-r1.ebuild
new file mode 100644
index 000000000000..608e53a35739
--- /dev/null
+++ b/app-arch/tarsync/tarsync-0.2.1-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Delta compression suite for using/generating binary patches"
+HOMEPAGE="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/tarsync/tarsync-0.2.1-r1.ebuild?view=markup"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86 ~amd64-linux"
+IUSE=""
+
+DEPEND=">=dev-util/diffball-0.7"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ epatch "${FILESDIR}"/${P}-gcc5.patch
+}
+
+src_install() {
+ dobin "${PN}" #make install doesn't support prefix
+}
diff --git a/app-arch/threadzip/Manifest b/app-arch/threadzip/Manifest
new file mode 100644
index 000000000000..c6ea7d072093
--- /dev/null
+++ b/app-arch/threadzip/Manifest
@@ -0,0 +1 @@
+DIST threadzip-1.2.tar.gz 17600 SHA256 217575871a0e8b9ea51574eca29eb2cbf3b08fb27d72c2659557f3cab813fa77 SHA512 01685cec04aaf0ab07fb754e8966da89f975fd3558d596716d12ec56e70b44bf5cd874bef5e32eef963843239eeed846859ff9f4562022e198702e9a16f1c855 WHIRLPOOL 6dc631a632248e420f27e774438b824144a5a7ccb1e8d16ed074e0e97c823e4759913d76bc78ac4badf183b729d6565c36e3cb46751bcb1ec5fd6157c58122dd
diff --git a/app-arch/threadzip/metadata.xml b/app-arch/threadzip/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/app-arch/threadzip/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/threadzip/threadzip-1.2-r1.ebuild b/app-arch/threadzip/threadzip-1.2-r1.ebuild
new file mode 100644
index 000000000000..e3996c7aa740
--- /dev/null
+++ b/app-arch/threadzip/threadzip-1.2-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="threaded compressor logic for zlib/lzma"
+HOMEPAGE="http://code.google.com/p/threadzip/"
+SRC_URI="http://threadzip.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="lzma"
+
+DEPEND=""
+RDEPEND="lzma? ( dev-python/pylzma[${PYTHON_USEDEP}] )"
+
+src_install() {
+ local x
+ for x in un '' ; do
+ newbin python/thread${x}zip.py thread${x}zip
+ done
+ python_fix_shebang "${ED}"/usr/bin
+}
diff --git a/app-arch/torrentzip/Manifest b/app-arch/torrentzip/Manifest
new file mode 100644
index 000000000000..36f46d915661
--- /dev/null
+++ b/app-arch/torrentzip/Manifest
@@ -0,0 +1 @@
+DIST trrntzip_v02_src.tar.gz 46971 SHA256 9e55f378ef5c75c452b3f52728a7503ca76e147e0ab2395b8c41de8c20995efd SHA512 802dd1bf55e0a31df75d8195c9d2d5610be8cb7f14d14278eba72b580aff3ad415711999db05a5425303380ebfc82a68896e276319e0ead5635d0a07615ba700 WHIRLPOOL 79c96f51a0b547b2651625a3b3aee6b7a769955e10b092654086a1d91a494d08f8dd732eee45b432ca97f4f6314af0f76907fa81b422ef94676e6d729994a61d
diff --git a/app-arch/torrentzip/files/fix-perms.patch b/app-arch/torrentzip/files/fix-perms.patch
new file mode 100644
index 000000000000..ea013663443f
--- /dev/null
+++ b/app-arch/torrentzip/files/fix-perms.patch
@@ -0,0 +1,11 @@
+--- src/trrntzip.c
++++ src/trrntzip.c
+@@ -782,7 +782,7 @@
+
+ if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR))
+ {
+- chmod (direntp->d_name, S_IWUSR);
++ chmod (direntp->d_name, S_IWUSR | S_IRUSR);
+ mig.cEncounteredZips++;
+
+ if (!mig.fProcessLog)
diff --git a/app-arch/torrentzip/metadata.xml b/app-arch/torrentzip/metadata.xml
new file mode 100644
index 000000000000..207b29f7ce14
--- /dev/null
+++ b/app-arch/torrentzip/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <longdescription>
+ TorrentZip is a replacement for MameZip. The goal of the program is to
+ use standard values when creating zips to create identical files over
+ multiple systems. It has the ability to create a torrentzip format
+ from a zip file.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">trrntzip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/torrentzip/torrentzip-0.2-r1.ebuild b/app-arch/torrentzip/torrentzip-0.2-r1.ebuild
new file mode 100644
index 000000000000..41d5f4b21d3d
--- /dev/null
+++ b/app-arch/torrentzip/torrentzip-0.2-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator eutils autotools
+
+DESCRIPTION="Archiver that creates standard zips to create identical files over multiple systems"
+HOMEPAGE="https://sourceforge.net/projects/trrntzip"
+
+MY_PN=trrntzip
+MY_PV="$(replace_version_separator 1 '')"
+MY_P=${MY_PN}_v${MY_PV}
+S="${WORKDIR}"/${MY_PN}
+
+SRC_URI="mirror://sourceforge/trrntzip/${MY_P}_src.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="sys-libs/zlib"
+RDEPEND=""
+
+S=${WORKDIR}/trrntzip
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/fix-perms.patch
+
+ eautoreconf
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "install failed"
+ dodoc README AUTHORS
+}
diff --git a/app-arch/unace/Manifest b/app-arch/unace/Manifest
new file mode 100644
index 000000000000..82aedea1d765
--- /dev/null
+++ b/app-arch/unace/Manifest
@@ -0,0 +1,2 @@
+DIST unace-nonfree_2.5-7.debian.tar.gz 16205 SHA256 9cc12ae2fe1af2356164800390316501a82293e1692268edc9781275058ff809 SHA512 f381e68fe27f9e892bf76b0b976e89b801829fdb7d25caf3bab758a7d4cc9cf6d5157d6cccf08df94fa895b5cf75c8c0b8f4a0f5bd87e2b71811f88ec4e94b12 WHIRLPOOL a27dfa86f5e58a970187307cfc846ed92198dbadad885df2b62b44506ddb66662a9bb2e1df6a4c58e3676db4381670cae04c4309311a28f55adfd1cf7242c152
+DIST unace-nonfree_2.5.orig.tar.gz 122509 SHA256 5a85480ed0d39672962a05dc835efc0876be4f0d47b0fa7741b955ae7b148566 SHA512 f7e9f3431f882160693cb55a90449e881aead9dc501bb4bb8303f04530bd3f6e1d84bbc2775d23e7c680e1e2d55a06872658c4b14c7bf51dd2db73fdcdea953b WHIRLPOOL 9aaa3098ef45dad66a00c42d13cd916206751e37042ad5ce9cd5704a88219b0941bca69612a4c102acc2b6877d33b8b50f4fcbdc5b1853cadc2d7e3e5a1f3361
diff --git a/app-arch/unace/metadata.xml b/app-arch/unace/metadata.xml
new file mode 100644
index 000000000000..39289d9ba1c7
--- /dev/null
+++ b/app-arch/unace/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<longdescription>Unace is a archive opener for the Ace format.</longdescription>
+</pkgmetadata>
diff --git a/app-arch/unace/unace-2.5-r3.ebuild b/app-arch/unace/unace-2.5-r3.ebuild
new file mode 100644
index 000000000000..5d849b1826e8
--- /dev/null
+++ b/app-arch/unace/unace-2.5-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DEB_VER="7"
+DESCRIPTION="ACE unarchiver"
+HOMEPAGE="http://www.winace.com/"
+SRC_URI="mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}.orig.tar.gz
+ mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}-${DEB_VER}.debian.tar.gz"
+
+LICENSE="freedist"
+SLOT="1"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 s390 x86 ~amd64-linux ~x86-linux ~sparc-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch $(sed 's:^:../debian/patches/:' "${WORKDIR}"/debian/patches/series)
+}
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ dobin unace
+ doman "${WORKDIR}"/debian/manpage/unace.1
+}
diff --git a/app-arch/unadf/Manifest b/app-arch/unadf/Manifest
new file mode 100644
index 000000000000..d27aa86899a8
--- /dev/null
+++ b/app-arch/unadf/Manifest
@@ -0,0 +1,2 @@
+DIST adflib-0.7.12.tar.bz2 135412 SHA256 41c4d0bd369f789a615118b9206905fcd07241d486cda6dece71384dbb42a1bb SHA512 d63846f0780bd57cae5ff667eb70f98a0ba3659cfd0b12b3ae2f29ac96631e522088f911b1ba6e5ee3b00620a28a802f14d93cdf8462e18a7e3f749915ab5af3 WHIRLPOOL 78399e5f9d4554bf46c1c40e0502fdc317173c36eec6196972babf9ba97a207cfd39ba3e992260528a927fe57869cbc6a875ed24e9f0797d33bd5b901b57211b
+DIST adflib.zip 254914 SHA256 d78dbc554e6bf0465ad3cf075968f5479b2a983fc1f29b482500b9f9eebb42df SHA512 fe8edf5247ba82e475f62f96fcb72d50bf80641e14e957c99694def98735eb327a67208e3460504a0d109c9497d6e81f0cd8ce07ddc73486adc9e7070a75074a WHIRLPOOL f071b5d4f6131f01db132015783f59fa680391a2fe0e8e9bc7fcb79c6b2e745ec26e1369b3e8b5e2b8ac7b8842afb2f42b4f85eab068abf10b13b8d1afbf1633
diff --git a/app-arch/unadf/files/no.in_path.patch b/app-arch/unadf/files/no.in_path.patch
new file mode 100644
index 000000000000..51de8f989fa1
--- /dev/null
+++ b/app-arch/unadf/files/no.in_path.patch
@@ -0,0 +1,39 @@
+diff -r -u ../unchanged/Lib/Makefile ./Lib/Makefile
+--- ../unchanged/Lib/Makefile 2004-08-26 00:39:58.847605592 +1000
++++ ./Lib/Makefile 2004-08-26 00:41:12.307438000 +1000
+@@ -41,7 +41,7 @@
+ # to define LITT_ENDIAN on little endian machines (intel)
+ # checks for sizeof(long)=4, sizeof(short)=2, sizeof(int)=4
+ defendian.h: myconf
+- myconf
++ ./myconf
+
+ adf_nativ.o: ${NATIV_DIR}/adf_nativ.c ${NATIV_DIR}/adf_nativ.h
+ $(CC) ${CFLAGS} -c ${NATIV_DIR}/adf_nativ.c
+Only in ../unchanged/Lib: Makefile.orig
+Only in ../unchanged/Lib: Makefile.rej
+diff -r -u ../unchanged/Lib/myconf ./Lib/myconf
+--- ../unchanged/Lib/myconf 2000-08-19 11:08:08.000000000 +1000
++++ ./Lib/myconf 2004-08-26 00:41:28.344000072 +1000
+@@ -31,17 +31,17 @@
+ gcc myctest.c -o myctest
+ rm myctest.c
+
+-if [ `myctest |cut -d' ' -f 1` != 4 ]
++if [ `./myctest |cut -d' ' -f 1` != 4 ]
+ then echo "Error : sizeof(long)!=4"
+ fi
+-if [ `myctest |cut -d' ' -f 2` != 2 ]
++if [ `./myctest |cut -d' ' -f 2` != 2 ]
+ then echo "Error : sizeof(short)!=2"
+ fi
+-if [ `myctest |cut -d' ' -f 3` != 4 ]
++if [ `./myctest |cut -d' ' -f 3` != 4 ]
+ then echo "Error :sizeof(int)!=4"
+ fi
+
+-if [ `myctest |cut -d' ' -f 4` = LITTLE ]
++if [ `./myctest |cut -d' ' -f 4` = LITTLE ]
+ then
+ echo "#ifndef LITT_ENDIAN" >defendian.h
+ echo "#define LITT_ENDIAN 1" >>defendian.h
diff --git a/app-arch/unadf/metadata.xml b/app-arch/unadf/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/app-arch/unadf/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/unadf/unadf-0.7.12.ebuild b/app-arch/unadf/unadf-0.7.12.ebuild
new file mode 100644
index 000000000000..2743c89d23fb
--- /dev/null
+++ b/app-arch/unadf/unadf-0.7.12.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+MY_PN="adflib"
+
+DESCRIPTION="Extract files from Amiga adf disk images"
+SRC_URI="http://lclevy.free.fr/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
+HOMEPAGE="http://lclevy.free.fr/adflib/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc-macos ~sparc-solaris ~x86 ~x86-interix ~x86-linux ~x86-solaris"
+IUSE="static-libs"
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/app-arch/unadf/unadf-0.7.9b.ebuild b/app-arch/unadf/unadf-0.7.9b.ebuild
new file mode 100644
index 000000000000..f79f9060faa5
--- /dev/null
+++ b/app-arch/unadf/unadf-0.7.9b.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Extract files from Amiga adf disk images"
+SRC_URI="http://perso.club-internet.fr/lclevy/adflib/adflib.zip"
+HOMEPAGE="http://perso.club-internet.fr/lclevy/adflib/adflib.html"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="hppa ppc x86 ~x86-interix ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+DEPEND="app-arch/unzip
+ x11-misc/makedepend"
+RDEPEND=""
+
+src_unpack() {
+ mkdir "${S}"
+ cd "${S}"
+ unzip "${DISTDIR}"/adflib.zip
+ epatch "${FILESDIR}"/no.in_path.patch
+}
+
+src_compile() {
+ cd "${S}"/Lib && make depend || die "make failed"
+ cd "${S}"/Demo && make depend || die "make failed"
+ cd "${S}" && emake lib demo || die "emake failed"
+}
+
+src_install() {
+ dobin Demo/unadf
+ dodoc README CHANGES Faq/adf_info.txt
+ docinto Docs
+ dodoc Docs/*
+ docinto Faq
+ dodoc Faq/*
+ docinto Faq/image
+ dodoc Faq/image/*
+}
diff --git a/app-arch/unar/Manifest b/app-arch/unar/Manifest
new file mode 100644
index 000000000000..44d44dd0a18b
--- /dev/null
+++ b/app-arch/unar/Manifest
@@ -0,0 +1,5 @@
+DIST unar1.1_src.zip 3530742 SHA256 478f5ffd9707f3f295e088df42e1cd26dcf203590297a4bd35a95e9de186ed0e SHA512 9d2ca145497961cc9b8c786e49810394c0abed8077e806d873420c65eabef70b57a70f93741890f8e7ee231d145d45c9b3a614ddc8ef5d17f8f1603c7ac419a2 WHIRLPOOL 5494edc1b488ddc516fd7abd1e3697eb5b95b6046bcd99b308318f450049008252b781bc74411c716de38ecef523afbc684867db047d72f5cb020e3d68df03ec
+DIST unar1.2_src.zip 3599730 SHA256 653ebb2bb6568e6de9f5513aeaabf13b12ae55159e64709a6c20a4f45387c8d6 SHA512 9d78b90e04a4200a77cddcbc33b655d9ea841602ee1d2e59e77e7d103abeba0609e2fed6183d243b6a7ad24ed4680d2001206b6663b70df3d4bc404ecc116267 WHIRLPOOL 7dffdb3bc1a92ccec6496d3344df0ce528bd0f792ccec338f17f7dea6b645b3d2f2a79355ff5d6d613486405a116619638e3420ab1e3ce1a8a9034cc55dec046
+DIST unar1.5_src.zip 2530160 SHA256 22e9b6c31fb6dea27e59222bfaaa8aee08af92aed1cfcbff407d1cf11be6ea78 SHA512 a6239279b9706f43feb02f7a80993c360ed21d79e448f08fcc40f14ef078f24b21daf3974fc7f5880f3e5188880e903e028e5aaeaeb4565593d9945fbeced27b WHIRLPOOL 7242af7ba9c7a470bf31ca4860b35d00b1e88611083c6fcab872b0c2a6e2e53a6bcf03309c76f322e4334ead736ac0d7f93f5e66863268d334ea1fcf9ab57bf3
+DIST unar1.6_src.zip 2531920 SHA256 818e6b8c3a6d54218acb13693191fdeb99d6d622e9eb480e615f68267dc6ff51 SHA512 4d48d04e89c67d35fb3b186850b4426ba90e1cbb7afca70bdea2d0dd1e92178c773494fda23fa58d44e8e92d5342b9a2efa3695d25f6d1104e481b9f6234b3a1 WHIRLPOOL e9bba9f6fadf3ef0537b653ca7d0063a47bb2746277d1e48354ba59aed3743a7509b38c72fe15eb3a4c58659355952aa0bb44cf346e48e08f235ed8fea32ae0b
+DIST unar1.8.1_src.zip 2526220 SHA256 67ccb1c780150840f38de63b8e7047717ef4c71b7574d9ef57bd9d9c93255709 SHA512 3c899f11ace75a9976f3b9d13ed7d700fe16a56783aab0b8581f72ce886229de696c9f1286b6d6a407e5f6151973588bfe14754ea81af94214bb662fc856e0e3 WHIRLPOOL d5f11810129c7a91443b0a9ca2a47fdbe4e9fcd08c2438c5e914344d238258cd387a65ffa15ec245fc927b38311700e14dd3e1dba89a8e34d2a4494e4442c286
diff --git a/app-arch/unar/metadata.xml b/app-arch/unar/metadata.xml
new file mode 100644
index 000000000000..197a63b678b5
--- /dev/null
+++ b/app-arch/unar/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">theunarchiver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/unar/unar-1.1.ebuild b/app-arch/unar/unar-1.1.ebuild
new file mode 100644
index 000000000000..910ef1de37c3
--- /dev/null
+++ b/app-arch/unar/unar-1.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Unpacker for various archiving formats, e.g. rar v3"
+HOMEPAGE="http://unarchiver.c3.cx/"
+SRC_URI="http://theunarchiver.googlecode.com/files/${PN}${PV}_src.zip"
+LICENSE="LGPL-2.1"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-base
+ >=gnustep-base/gnustep-make-2.6.0[native-exceptions]
+ dev-libs/icu"
+DEPEND="${RDEPEND}
+ sys-devel/gcc[objc]"
+
+S="${WORKDIR}/The Unarchiver/XADMaster"
+
+src_compile() {
+ emake -f Makefile.linux \
+ CC="$(tc-getCC)" \
+ OBJCC="$(tc-getCC)" \
+ C_OPTS="-std=gnu99 ${CFLAGS}" \
+ OBJC_OPTS="-std=gnu99 ${CFLAGS}" \
+ LD="$(tc-getCC)" \
+ LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime \
+ ${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin unar lsar || die "dobin failed"
+ doman ../Extra/lsar.1 ../Extra/unar.1 || die "doman failed"
+}
diff --git a/app-arch/unar/unar-1.2.ebuild b/app-arch/unar/unar-1.2.ebuild
new file mode 100644
index 000000000000..910ef1de37c3
--- /dev/null
+++ b/app-arch/unar/unar-1.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Unpacker for various archiving formats, e.g. rar v3"
+HOMEPAGE="http://unarchiver.c3.cx/"
+SRC_URI="http://theunarchiver.googlecode.com/files/${PN}${PV}_src.zip"
+LICENSE="LGPL-2.1"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-base
+ >=gnustep-base/gnustep-make-2.6.0[native-exceptions]
+ dev-libs/icu"
+DEPEND="${RDEPEND}
+ sys-devel/gcc[objc]"
+
+S="${WORKDIR}/The Unarchiver/XADMaster"
+
+src_compile() {
+ emake -f Makefile.linux \
+ CC="$(tc-getCC)" \
+ OBJCC="$(tc-getCC)" \
+ C_OPTS="-std=gnu99 ${CFLAGS}" \
+ OBJC_OPTS="-std=gnu99 ${CFLAGS}" \
+ LD="$(tc-getCC)" \
+ LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime \
+ ${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin unar lsar || die "dobin failed"
+ doman ../Extra/lsar.1 ../Extra/unar.1 || die "doman failed"
+}
diff --git a/app-arch/unar/unar-1.5.ebuild b/app-arch/unar/unar-1.5.ebuild
new file mode 100644
index 000000000000..fc1b6a28bd43
--- /dev/null
+++ b/app-arch/unar/unar-1.5.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="unpacker for various archiving formats, e.g. rar v3"
+HOMEPAGE="http://unarchiver.c3.cx/"
+SRC_URI="http://theunarchiver.googlecode.com/files/${PN}${PV}_src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-base
+ >=gnustep-base/gnustep-make-2.6.0[native-exceptions]
+ dev-libs/icu"
+DEPEND="${RDEPEND}
+ sys-devel/gcc[objc]"
+
+S="${WORKDIR}/The Unarchiver/XADMaster"
+
+src_compile() {
+ emake -f Makefile.linux \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ OBJCC="$(tc-getCC)" \
+ C_OPTS="-std=gnu99 ${CFLAGS} ${CPPFLAGS}" \
+ CXX_OPTS="${CXXFLAGS} ${CPPFLAGS}" \
+ OBJC_OPTS="-std=gnu99 ${CFLAGS} ${CPPFLAGS}" \
+ LD="$(tc-getCXX)" \
+ LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime ${LDFLAGS}"
+}
+
+src_install() {
+ dobin {ls,un}ar
+ doman ../Extra/{ls,un}ar.1
+}
diff --git a/app-arch/unar/unar-1.6.ebuild b/app-arch/unar/unar-1.6.ebuild
new file mode 100644
index 000000000000..7d838ec0be54
--- /dev/null
+++ b/app-arch/unar/unar-1.6.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="unpacker for various archiving formats, e.g. rar v3"
+HOMEPAGE="http://unarchiver.c3.cx/"
+SRC_URI="http://theunarchiver.googlecode.com/files/${PN}${PV}_src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-base
+ >=gnustep-base/gnustep-make-2.6.0[native-exceptions]
+ dev-libs/icu:="
+DEPEND="${RDEPEND}
+ sys-devel/gcc[objc]"
+
+S="${WORKDIR}/The Unarchiver/XADMaster"
+
+src_compile() {
+ emake -f Makefile.linux \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ OBJCC="$(tc-getCC)" \
+ C_OPTS="-std=gnu99 ${CFLAGS} ${CPPFLAGS}" \
+ CXX_OPTS="${CXXFLAGS} ${CPPFLAGS}" \
+ OBJC_OPTS="-std=gnu99 ${CFLAGS} ${CPPFLAGS}" \
+ LD="$(tc-getCXX)" \
+ LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime ${LDFLAGS}"
+}
+
+src_install() {
+ dobin {ls,un}ar
+ doman ../Extra/{ls,un}ar.1
+}
diff --git a/app-arch/unar/unar-1.8.1.ebuild b/app-arch/unar/unar-1.8.1.ebuild
new file mode 100644
index 000000000000..459c8bb33d7d
--- /dev/null
+++ b/app-arch/unar/unar-1.8.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="unpacker for various archiving formats, e.g. rar v3"
+HOMEPAGE="http://unarchiver.c3.cx/"
+SRC_URI="http://theunarchiver.googlecode.com/files/${PN}${PV}_src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-base
+ >=gnustep-base/gnustep-make-2.6.0[native-exceptions]
+ dev-libs/icu:="
+DEPEND="${RDEPEND}
+ sys-devel/gcc[objc]"
+
+S="${WORKDIR}/The Unarchiver/XADMaster"
+
+src_compile() {
+ emake -f Makefile.linux \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ OBJCC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ OBJCFLAGS="${CFLAGS}" \
+ LD="$(tc-getCXX)" \
+ LDFLAGS="-Wl,--whole-archive -fexceptions -fgnu-runtime ${LDFLAGS}"
+}
+
+src_install() {
+ dobin {ls,un}ar
+ doman ../Extra/{ls,un}ar.1
+}
diff --git a/app-arch/unarj/Manifest b/app-arch/unarj/Manifest
new file mode 100644
index 000000000000..7149bd6ccb3c
--- /dev/null
+++ b/app-arch/unarj/Manifest
@@ -0,0 +1 @@
+DIST unarj-2.65.tgz 21568 SHA256 092869f3b4d4943b3d999db4f266f39ab9e474f2984b813b20735283af068304 SHA512 1b152063017042a343f49e487e5284c3d4c548222baa52e2066cefe6d2add60213ffd2653f42e38582681a1fd89efb8f1d3a6ef6389fc33e5397760ad9e72386 WHIRLPOOL 431d8b43d58f05bf0a9213e98c5c15e3ae4b32089426d2b89b2832b0249390d8491293c0ed0f97e6c3c44f30056e497ce0f1ad807302f0d36c738e4a6085374a
diff --git a/app-arch/unarj/files/unarj-2.65-CAN-2004-0947.patch b/app-arch/unarj/files/unarj-2.65-CAN-2004-0947.patch
new file mode 100644
index 000000000000..f52af83ac2ca
--- /dev/null
+++ b/app-arch/unarj/files/unarj-2.65-CAN-2004-0947.patch
@@ -0,0 +1,49 @@
+Index: unarj-2.65/unarj.c
+===================================================================
+--- unarj-2.65.orig/unarj.c
++++ unarj-2.65/unarj.c
+@@ -217,7 +217,7 @@ static uchar arj_flags;
+ static short method;
+ static uint file_mode;
+ static ulong time_stamp;
+-static short entry_pos;
++static ushort entry_pos;
+ static ushort host_data;
+ static uchar *get_ptr;
+ static UCRC file_crc;
+@@ -608,6 +608,7 @@ char *name;
+ error(M_BADHEADR, "");
+
+ crc = CRC_MASK;
++ memset(header, 0, sizeof(header));
+ fread_crc(header, (int) headersize, fd);
+ header_crc = fget_crc(fd);
+ if ((crc ^ CRC_MASK) != header_crc)
+@@ -632,9 +633,13 @@ char *name;
+
+ if (origsize < 0 || compsize < 0)
+ error(M_HEADRCRC, "");
++ if(first_hdr_size > headersize-2) /* need two \0 for file and comment */
++ error(M_BADHEADR, "");
+
+ hdr_filename = (char *)&header[first_hdr_size];
+ strncopy(filename, hdr_filename, sizeof(filename));
++ if(entry_pos >= strlen(filename))
++ error(M_BADHEADR, "");
+ if (host_os != OS)
+ strparity((uchar *)filename);
+ if ((arj_flags & PATHSYM_FLAG) != 0)
+@@ -733,11 +738,11 @@ extract()
+
+ no_output = 0;
+ if (command == 'E')
+- strcpy(name, &filename[entry_pos]);
++ strncopy(name, &filename[entry_pos], sizeof(name));
+ else
+ {
+ strcpy(name, DEFAULT_DIR);
+- strcat(name, filename);
++ strncopy(name+strlen(name), filename, sizeof(name)-strlen(name));
+ }
+
+ if (host_os != OS)
diff --git a/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch
new file mode 100644
index 000000000000..755b9b696cc9
--- /dev/null
+++ b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch
@@ -0,0 +1,9 @@
+--- environ.c 2007-06-19 12:44:09 +0200
++++ environ.c.new 2007-06-19 12:44:37 +0200
+@@ -437,7 +437,6 @@
+ #endif
+
+ extern struct tm *localtime();
+-extern time_t time();
+ extern char *strcpy();
+ extern voidp *malloc(); \ No newline at end of file
diff --git a/app-arch/unarj/files/unarj-2.65-sanitation.patch b/app-arch/unarj/files/unarj-2.65-sanitation.patch
new file mode 100644
index 000000000000..f37784ed2491
--- /dev/null
+++ b/app-arch/unarj/files/unarj-2.65-sanitation.patch
@@ -0,0 +1,126 @@
+Index: unarj-2.65/sanitize.c
+===================================================================
+--- /dev/null
++++ unarj-2.65/sanitize.c
+@@ -0,0 +1,81 @@
++/*
++ * Path sanitation code by Ludwig Nussel <ludwig.nussel@suse.de>. Public Domain.
++ */
++
++#include "unarj.h"
++
++#include <string.h>
++#include <limits.h>
++#include <stdio.h>
++
++#ifndef PATH_CHAR
++#define PATH_CHAR '/'
++#endif
++#ifndef MIN
++#define MIN(x,y) ((x)<(y)?(x):(y))
++#endif
++
++/* copy src into dest converting the path to a relative one inside the current
++ * directory. dest must hold at least len bytes */
++void copy_path_relative(char *dest, char *src, size_t len)
++{
++ char* o = dest;
++ char* p = src;
++
++ *o = '\0';
++
++ while(*p && *p == PATH_CHAR) ++p;
++ for(; len && *p;)
++ {
++ src = p;
++ p = strchr(src, PATH_CHAR);
++ if(!p) p = src+strlen(src);
++
++ /* . => skip */
++ if(p-src == 1 && *src == '.' )
++ {
++ if(*p) src = ++p;
++ }
++ /* .. => pop one */
++ else if(p-src == 2 && *src == '.' && src[1] == '.')
++ {
++ if(o != dest)
++ {
++ char* tmp;
++ *o = '\0';
++ tmp = strrchr(dest, PATH_CHAR);
++ if(!tmp)
++ {
++ len += o-dest;
++ o = dest;
++ if(*p) ++p;
++ }
++ else
++ {
++ len += o-tmp;
++ o = tmp;
++ if(*p) ++p;
++ }
++ }
++ else /* nothing to pop */
++ if(*p) ++p;
++ }
++ else
++ {
++ size_t copy;
++ if(o != dest)
++ {
++ --len;
++ *o++ = PATH_CHAR;
++ }
++ copy = MIN(p-src,len);
++ memcpy(o, src, copy);
++ len -= copy;
++ src += copy;
++ o += copy;
++ if(*p) ++p;
++ }
++ while(*p && *p == PATH_CHAR) ++p;
++ }
++ o[len?0:-1] = '\0';
++}
+Index: unarj-2.65/unarj.c
+===================================================================
+--- unarj-2.65.orig/unarj.c
++++ unarj-2.65/unarj.c
+@@ -235,6 +235,8 @@ static UCRC crctable[UCHAR_MAX + 1];
+
+ /* Functions */
+
++void copy_path_relative(char *dest, char *src, size_t len);
++
+ static void
+ make_crctable()
+ {
+@@ -738,11 +740,11 @@ extract()
+
+ no_output = 0;
+ if (command == 'E')
+- strncopy(name, &filename[entry_pos], sizeof(name));
++ copy_path_relative(name, &filename[entry_pos], sizeof(name));
+ else
+ {
+ strcpy(name, DEFAULT_DIR);
+- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name));
++ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name));
+ }
+
+ if (host_os != OS)
+--- unarj-2.65.orig/Makefile Mon Nov 29 16:47:24 2004
++++ unarj-2.65/Makefile Mon Nov 29 22:46:56 2004
+@@ -9,7 +9,9 @@
+
+ decode.o: decode.c unarj.h
+
+-OBJS = unarj.o decode.o environ.o
++sanitize.o: sanitize.c unarj.h
++
++OBJS = unarj.o decode.o environ.o sanitize.o
+
+ unarj: $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) -o unarj
diff --git a/app-arch/unarj/metadata.xml b/app-arch/unarj/metadata.xml
new file mode 100644
index 000000000000..d4771b00896e
--- /dev/null
+++ b/app-arch/unarj/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>nitro@legroom.net</email>
+ <name>Jared B.</name>
+</maintainer>
+<longdescription>A utility that is designed to open arj archives.</longdescription>
+</pkgmetadata>
diff --git a/app-arch/unarj/unarj-2.65.ebuild b/app-arch/unarj/unarj-2.65.ebuild
new file mode 100644
index 000000000000..ac6215deac3b
--- /dev/null
+++ b/app-arch/unarj/unarj-2.65.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Utility for opening arj archives"
+HOMEPAGE="http://www.arjsoftware.com/"
+SRC_URI="mirror://freebsd/ports/local-distfiles/ache/${P}.tgz"
+
+LICENSE="arj"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-CAN-2004-0947.patch
+ epatch "${FILESDIR}"/${P}-sanitation.patch
+ epatch "${FILESDIR}"/${P}-gentoo-fbsd.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dobin unarj || die 'dobin failed'
+ dodoc unarj.txt technote.txt || die 'dodoc failed'
+}
diff --git a/app-arch/undms/Manifest b/app-arch/undms/Manifest
new file mode 100644
index 000000000000..294698d7b8c6
--- /dev/null
+++ b/app-arch/undms/Manifest
@@ -0,0 +1,2 @@
+DIST undms-1.3.c.Z 13186 SHA256 d5c5396d1003f4d4125b4fe4833043e207b7315e87db3be92c2188ffbe27e8ac SHA512 9b8249bf2bc01bac755b65eb07c976c3341200469849546d8cb73c3663e475a2bd36fb12f6498d9516a5dba146a060fdf7e7f1705ff8a2d7c95f3efed013402e WHIRLPOOL 2e2687563613bdd1c0a9bfaf2bacd2afb22f2ce2cab14fb3c49d9769988bcd8ecfe5848a76a22ed440775aa67ada6e2b2d1883b0b6e8bf1a9ae7828492f4f884
+DIST undms-1.3.c.Z.readme 228 SHA256 a9e5e9ce8a0d8da3b699203b4cece10a25e159f5523086aa274f82427d9f8320 SHA512 03bed1aa29d52068d8196877374acfc715f8c729b56cfb4e8874c06509380250b70310ad50602a54cb30d8e7dbfe95e4d793626ed3950f0516d9ec42146c7fcd WHIRLPOOL dd0f8ae649a83cd338cef4b6d16957bb2a424255586711593ebacefc0fcd1cd65f27a124580e99de0a4c6f1c55175e1e38dc2d492039f2031b477686998a793e
diff --git a/app-arch/undms/metadata.xml b/app-arch/undms/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/app-arch/undms/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/undms/undms-1.3-r1.ebuild b/app-arch/undms/undms-1.3-r1.ebuild
new file mode 100644
index 000000000000..4d27ed1f5662
--- /dev/null
+++ b/app-arch/undms/undms-1.3-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Decompress Amiga DMS disk images to ADF"
+SRC_URI="ftp://us.aminet.net/pub/aminet/misc/unix/${P}.c.Z ftp://us.aminet.net/pub/aminet/misc/unix/${P}.c.Z.readme"
+HOMEPAGE="ftp://us.aminet.net/pub/aminet/misc/unix/"
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+S="${WORKDIR}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} ${P}.c || die "Compilation failed"
+}
+
+src_install() {
+ dobin undms
+ newdoc "${DISTDIR}"/${P}.c.Z.readme readme
+}
diff --git a/app-arch/unlzx/Manifest b/app-arch/unlzx/Manifest
new file mode 100644
index 000000000000..852f7bac67cb
--- /dev/null
+++ b/app-arch/unlzx/Manifest
@@ -0,0 +1,2 @@
+DIST unlzx.c.gz 9680 SHA256 3cfd5dfe34482f91b6fbfc6a5fdd44c7454ce4867061e99cda8aaba628208f7d SHA512 f88812e06c0de47ace6ef2d405193ebbfde9091da8ab6a493ea57054e1c2c08b3217510b8564756b9e54392afe88fe822b77317c541be0dda90deac96db61057 WHIRLPOOL 64423d590fd056fe7e755324d05bfcd3c206a8299bb40c95c35b12275bfa6c2d73c3f6c9a5865e023268ce770f5930b710798d9d87e6d3bc5e9e0ce7d7961ac9
+DIST unlzx.c.gz.readme 642 SHA256 d7b014b2f04a5112bb1e7a441816cdb0cf71a26bd5ffb31b951f8b5423e4e4b7 SHA512 1ddd75fd4ad181f7c4887508d58c84d149407e94ff7715d68c4be5d0b69fc1237aeaf82851b6d45ca3d3a60098a6b83e118c66ffa573bd616bba8ff0838db4bb WHIRLPOOL 1d9cf30088aa3ea895c135b69534f6f1f14042418e269a89ccf4d865562f679c365ee57f28a96d4ae916f18ced905bcfaf0a0fd123a0ce1b8eec899590269d00
diff --git a/app-arch/unlzx/metadata.xml b/app-arch/unlzx/metadata.xml
new file mode 100644
index 000000000000..f9d50da18d39
--- /dev/null
+++ b/app-arch/unlzx/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/unlzx/unlzx-1.1.ebuild b/app-arch/unlzx/unlzx-1.1.ebuild
new file mode 100644
index 000000000000..c735acba9581
--- /dev/null
+++ b/app-arch/unlzx/unlzx-1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Unarchiver for Amiga LZX archives"
+SRC_URI="ftp://us.aminet.net/pub/aminet/misc/unix/${PN}.c.gz ftp://us.aminet.net/pub/aminet/misc/unix/${PN}.c.gz.readme"
+HOMEPAGE="ftp://us.aminet.net/pub/aminet/misc/unix/${PN}.c.gz.readme"
+
+SLOT="0"
+LICENSE="freedist"
+IUSE=""
+KEYWORDS="alpha amd64 ~hppa ppc sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+
+src_unpack() {
+ mkdir "${S}"
+ gzip -dc "${DISTDIR}"/${PN}.c.gz > "${S}"/unlzx.c
+ cp "${DISTDIR}"/${PN}.c.gz.readme "${S}"/${PN}.c.gz.readme
+}
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o unlzx unlzx.c || die
+}
+
+src_install() {
+ dobin unlzx
+ dodoc unlzx.c.gz.readme
+}
diff --git a/app-arch/unmakeself/Manifest b/app-arch/unmakeself/Manifest
new file mode 100644
index 000000000000..8a8d294b147d
--- /dev/null
+++ b/app-arch/unmakeself/Manifest
@@ -0,0 +1,2 @@
+DIST unmakeself-1.0.tar.bz2 3015 SHA256 076be9222830d36b4ce32ec1b0349284380dd1c35297332db51d8d994cfeee7e SHA512 d9722c6de549d30a9901174515e100ab2dfeeed2900af52031adc8d8a265e62414aee7b005068e6d2c2d9b24766b5e220b84deee34f3e21abadcd977814b1c02 WHIRLPOOL e1a2e5b1b548ad65e84b6f91f8f456d5f6220d4ccb8818f223998db3d61ae633f54f8b01b8b7da6af64623e36e0058e80994b75d5e67947b3af0b7a2052a34ee
+DIST unmakeself-1.1.tar.gz 3635 SHA256 b89e3f8406050050c04d2f4dced4e0bc6d5e2e7062ab5c640357a11e4a6ec48e SHA512 3e8a05a907b8807080208300f6c20577587a0e87000c6746ba457c276e4dff37c8d61227bd1db37e60ac20d9532290c4110a1204c8389a8a1e97a121b68c682b WHIRLPOOL 5cda3534bf5db9d3624d501d9a41cb67581a3c6911a8c44f70584cdfc8d4040d7195000efbdbdf5d0337b24d5082b0c1908820cfc26383c72cfa606a3c7ce209
diff --git a/app-arch/unmakeself/metadata.xml b/app-arch/unmakeself/metadata.xml
new file mode 100644
index 000000000000..cc160542fb5e
--- /dev/null
+++ b/app-arch/unmakeself/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/unmakeself/unmakeself-1.0.ebuild b/app-arch/unmakeself/unmakeself-1.0.ebuild
new file mode 100644
index 000000000000..cb7906b57440
--- /dev/null
+++ b/app-arch/unmakeself/unmakeself-1.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="extracting Makeself archives without having to run the self-extracting shell script"
+HOMEPAGE="http://www.freshports.org/archivers/unmakeself"
+SRC_URI="http://gentooexperimental.org/~genstef/dist/${P}.tar.bz2"
+#http://cvsup.pt.freebsd.org/cgi-bin/cvsweb/cvsweb.cgi/~checkout~/root/ports/ports/archivers/unmakeself/files/unmakeself.c
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/bzip2
+ sys-libs/zlib
+ app-arch/libarchive"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} unmakeself.c -larchive -lbz2 -lz -o unmakeself
+}
+
+src_install() {
+ dobin unmakeself
+}
diff --git a/app-arch/unmakeself/unmakeself-1.1.ebuild b/app-arch/unmakeself/unmakeself-1.1.ebuild
new file mode 100644
index 000000000000..efdec06744e5
--- /dev/null
+++ b/app-arch/unmakeself/unmakeself-1.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Makeself archive extractor"
+HOMEPAGE="http://www.freshports.org/archivers/unmakeself"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/libarchive[bzip2,zlib]"
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS=-larchive ${PN} || die "emake failed"
+}
+
+src_install() {
+ dobin unmakeself || die "dobin failed"
+}
diff --git a/app-arch/unp/Manifest b/app-arch/unp/Manifest
new file mode 100644
index 000000000000..09340e6de478
--- /dev/null
+++ b/app-arch/unp/Manifest
@@ -0,0 +1,2 @@
+DIST unp_2.0~pre7+nmu1.tar.bz2 17537 SHA256 7c2d6f2835a5a59ee2588b66d8015d97accd62e71e38ba90ebd4d71d8fd78227 SHA512 1b30f14c8d17e0a6b149ca4795f2219e9180f814347410e7ff7fa2b9720a9d308190f2ded8fcfd11bac9b5bb7a64ffd93f140bdaffcba1127f0e15e3d2737362 WHIRLPOOL 28fcec4dd271f952bac9313e5f4bff8fc244361831dc7829a5746d0af26c89586744d158a79808c02f3be9b41240b5eb082cfe11cf151e38ac8fd962e72af8bb
+DIST unp_2.0~pre7.tar.bz2 14492 SHA256 dddf23bf81444a876d4dba67c25c934e077f290499ada531ef70a930aa8fd6a7 SHA512 b90238a3e359d45e4b0ec3e5559a682fce3a7a37f74dd5419b005bb7bd3e3e5be03dde2e5d40d1671c0274ff1d795560fa238a572fe6cf3ab12f17dd1e2bcd1d WHIRLPOOL 21b1c7ded3b861739cd5e94d858e98b3ec785c777cd924c41599a36735824faebf845ec40a0bb206c1573aa20f0afb240e0356e4ab25a6547a29905c127217c7
diff --git a/app-arch/unp/files/unp-2.0_pre7_p1-remove-deprecated-have.diff b/app-arch/unp/files/unp-2.0_pre7_p1-remove-deprecated-have.diff
new file mode 100644
index 000000000000..a0838a82559f
--- /dev/null
+++ b/app-arch/unp/files/unp-2.0_pre7_p1-remove-deprecated-have.diff
@@ -0,0 +1,10 @@
+diff -Naur unp-2.0~pre7+nmu1/bash_completion.d/unp unp-2.0~pre7+nmu1-1/bash_completion.d/unp
+--- unp-2.0~pre7+nmu1/bash_completion.d/unp 2012-05-16 22:05:13.000000000 +0200
++++ unp-2.0~pre7+nmu1-1/bash_completion.d/unp 2014-10-22 10:34:20.343233166 +0200
+@@ -1,6 +1,5 @@
+ # bash completion for unp
+
+-have unp &&
+ _unp()
+ {
+ local cur
diff --git a/app-arch/unp/metadata.xml b/app-arch/unp/metadata.xml
new file mode 100644
index 000000000000..8cb548491f4e
--- /dev/null
+++ b/app-arch/unp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>hanno@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/app-arch/unp/unp-2.0_pre7.ebuild b/app-arch/unp/unp-2.0_pre7.ebuild
new file mode 100644
index 000000000000..85511e36448b
--- /dev/null
+++ b/app-arch/unp/unp-2.0_pre7.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils bash-completion-r1
+
+DESCRIPTION="Script for unpacking various file formats"
+HOMEPAGE="http://packages.qa.debian.org/u/unp.html"
+SRC_URI="mirror://debian/pool/main/u/unp/${PN}_${PV/_/$'\x7e'}.tar.bz2"
+S="${WORKDIR}/${PN}-${PV/_/$'\x7e'}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+
+RDEPEND="${DEPEND}
+ dev-lang/perl"
+
+src_compile() {
+ if use nls; then
+ cd po
+ emake
+ fi
+}
+
+src_install() {
+ dobin unp || die "dobin failed"
+ dosym /usr/bin/unp /usr/bin/ucat
+ doman debian/unp.1 || die "doman failed"
+ dodoc debian/changelog debian/README.Debian
+ dobashcomp bash_completion.d/unp
+
+ if use nls; then
+ cd po
+ emake DESTDIR="${D}" install
+ fi
+}
diff --git a/app-arch/unp/unp-2.0_pre7_p1.ebuild b/app-arch/unp/unp-2.0_pre7_p1.ebuild
new file mode 100644
index 000000000000..06e2e4ef25de
--- /dev/null
+++ b/app-arch/unp/unp-2.0_pre7_p1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+DESCRIPTION="Script for unpacking various file formats"
+HOMEPAGE="http://packages.qa.debian.org/u/unp.html"
+TEMP_PV="${PV/_pre/$'\x7e'pre}"
+MY_PV="${TEMP_PV/_p/+nmu}"
+SRC_URI="mirror://debian/pool/main/u/unp/${PN}_${MY_PV}.tar.bz2"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+
+RDEPEND="${DEPEND}
+ dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-remove-deprecated-have.diff"
+}
+
+src_compile() {
+ if use nls; then
+ cd po
+ emake
+ fi
+}
+
+src_install() {
+ dobin unp || die "dobin failed"
+ dosym /usr/bin/unp /usr/bin/ucat
+ doman debian/unp.1 || die "doman failed"
+ dodoc debian/changelog debian/README.Debian
+ dobashcomp bash_completion.d/unp
+
+ if use nls; then
+ cd po
+ emake DESTDIR="${D}" install
+ fi
+}
diff --git a/app-arch/unrar-gpl/Manifest b/app-arch/unrar-gpl/Manifest
new file mode 100644
index 000000000000..2d46fb1daeda
--- /dev/null
+++ b/app-arch/unrar-gpl/Manifest
@@ -0,0 +1 @@
+DIST unrar-gpl-0.0.1_p20080417.tar.bz2 138495 SHA256 6a9605aabf53693105d04accb70c4bec49b4c313f0078828cccafbfb9d1966fe SHA512 2d0a7ee92d1ba25185b4e35c4c8aad1b5818472a48b597bf8fb7c673c8ad3c6553c29108766bd85ca8b724486ec4466a09a1f3622951dba7ffafcd8dd8d3d2a1 WHIRLPOOL 6371b79529f376c9d73dc0531104d8d03da3f2b0fdf511c6c2829bfd1bbb8aceb02c40891df0417f6f29b8603d0ac61d40661d513e0b984b0bf34677468bf883
diff --git a/app-arch/unrar-gpl/metadata.xml b/app-arch/unrar-gpl/metadata.xml
new file mode 100644
index 000000000000..f187a7c8effb
--- /dev/null
+++ b/app-arch/unrar-gpl/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>hanno@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/unrar-gpl/unrar-gpl-0.0.1_p20080417-r1.ebuild b/app-arch/unrar-gpl/unrar-gpl-0.0.1_p20080417-r1.ebuild
new file mode 100644
index 000000000000..3159f1f9d431
--- /dev/null
+++ b/app-arch/unrar-gpl/unrar-gpl-0.0.1_p20080417-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="Free rar unpacker for old (pre v3) rar files"
+HOMEPAGE="http://home.gna.org/unrar/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DOCS="AUTHORS README"
+
+S=${WORKDIR}/${PN/-gpl}
+
+src_prepare() {
+ sed -i configure.ac -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' || die
+ eautoreconf
+}
+src_configure() { econf --program-suffix="-gpl"; }
diff --git a/app-arch/unrar/Manifest b/app-arch/unrar/Manifest
new file mode 100644
index 000000000000..8c849dd36c1e
--- /dev/null
+++ b/app-arch/unrar/Manifest
@@ -0,0 +1,6 @@
+DIST unrarsrc-5.0.14.tar.gz 209707 SHA256 e276ea30a2dc9b8961a4268772e5b6caccaa984664e2d5255a43fcb0f5d59806 SHA512 91b05bd2974e0a1cb8bd8f01ee90637c9c48da71a4ffa74e161de969f17bedbcda0cfbac128d366ffa5065e8195004fe82763a2a1e8628f0016621b1c2d364f2 WHIRLPOOL 665833a5cac5cfddaa6bf852b6820e8447604019286f7f81dce910ad49b8eccf5a4ceab2c1177837e71492ba0c37d2d288b78eb0a531fd47d34cdd8256fd7f19
+DIST unrarsrc-5.1.6.tar.gz 215185 SHA256 3c38eaabc655527244fd0c3ba3beff567ea24aad37d448488643242fd4cf41a5 SHA512 a7a7800ac94850320ce3e2dd24c5005694dd59360b7f3fc7886ef241153e471459b0b9397d1dacbc3adcd19044cdcb8a8a847e16d7b224af149a1455f46fcaa0 WHIRLPOOL bcb9d1b60f42357cb236cbb5e86eb19dd4ed623244036fc1e8fc3759eef3d4002e6ffc90d3cf5b5200e81fe018a2215c0238ee2aac7148e51f130e43ad3e5ea0
+DIST unrarsrc-5.2.1.tar.gz 217272 SHA256 a075a8943412abb2ff5600038330a3d5a8f5a39cbe8e92543cc2c45b6247d05d SHA512 bd89acbed0377f48c88e5b9f6c3701dff1d0a5a65e74e9668690daf0ce0188c74914ed7edb093c0139b0507cf0785790fd8505be7d54204d16bcfced64b4dc29 WHIRLPOOL 6e21e981663eaa14e5d94553cb8fb93db601fe1058f73fc32d3f9a30f399210e71c657d342495d1be18b0e011a5677084242e01b5dff8aa476379bcbae1f7857
+DIST unrarsrc-5.2.2.tar.gz 217481 SHA256 4c134a739467dd0a18bd8aaa48f32750335c842d8a27e11b955ccc33a73ac834 SHA512 ae1d9c3009b9e632bffff54553c0ccc347e59a77236b0a76d9fe603285e17229ce295e718ca6e7658fb050a3145a03dcb2daa6e704cd459d2b7a6eb1a101daa3 WHIRLPOOL 6e3e98be8df13729b89a0c64e775c148ac560c31bb2ff8d61c7ba3ba75421da698e702336604944787eee5e3edc774ee09df62395610c4af0f6262f5870134be
+DIST unrarsrc-5.2.3.tar.gz 217841 SHA256 d249d34541dba39234cdf661ccec80e44334efe50c3ca1d7c51186cd5d26e072 SHA512 94ff765c2aa4ede7d5f2f35c3c35c634b7691559ac9bc978a4f760e22e005422a3a0d36ab09e4c492cea456161cc13dbf256eb2ead23a7976e79bf3cc89903ed WHIRLPOOL dbb7408444078a0ad507fba2d2a483c91a9519193635b25a04c076b92c27c7af9e53481cd89927ca040e03422b5a36e1192f906043706bf9ad2a80f867c27b0f
+DIST unrarsrc-5.2.7.tar.gz 218880 SHA256 ef14757e943787b439fedf2c564c1f38d0db315528a928e0de170860717e2fac SHA512 95e06451e2bec46a12e5b9b1423c3ea31ce86859f8086812d9c442aaa69627f72635a6a8c197b30dbc7e99bbf7c7caaa25d703caecbe03c697cc0e5b7644d638 WHIRLPOOL 49f5492a7441192d96616f892012ca2dac8a94063e806ece3c62bf13d29beb9d2d0368a186c0f0bff8814c9e6af542ba6b447a61683295f560f120ff75507379
diff --git a/app-arch/unrar/files/unrar-5.0.2-build.patch b/app-arch/unrar/files/unrar-5.0.2-build.patch
new file mode 100644
index 000000000000..61de7ee06891
--- /dev/null
+++ b/app-arch/unrar/files/unrar-5.0.2-build.patch
@@ -0,0 +1,45 @@
+do not let these targets depend on clean, otherwise it could run in
+parallel with the object compile which runs into races
+https://bugs.gentoo.org/461806
+
+While we're in here, fix up a few other things:
+ - append -pthread to LDFLAGS instead of replacing them
+ - do not bother with `rm` in the output since linking will clober it
+ - use CXXFLAGS when linking
+ - append LIBFLAGS to the individual targets instead of the final link
+
+--- a/makefile
++++ b/makefile
+@@ -7,7 +7,7 @@
+ LIBFLAGS=-fPIC
+ DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
+ STRIP=strip
+-LDFLAGS=-pthread
++LDFLAGS+=-pthread
+ DESTDIR=/usr
+
+ # Linux using LCC
+@@ -119,8 +119,7 @@
+ @rm -f *.o *.bak *~
+
+ unrar: clean $(OBJECTS) $(UNRAR_OBJ)
+- @rm -f unrar
+- $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
++ $(LINK) -o unrar $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
+ $(STRIP) unrar
+
+ sfx: WHAT=SFX_MODULE
+@@ -130,10 +129,9 @@
+ $(STRIP) default.sfx
+
+ lib: WHAT=RARDLL
+-lib: CXXFLAGS+=$(LIBFLAGS)
+-lib: clean $(OBJECTS) $(LIB_OBJ)
+- @rm -f libunrar.so
+- $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
++$(OBJECTS) $(LIB_OBJ): CXXFLAGS+=$(LIBFLAGS)
++lib: $(OBJECTS) $(LIB_OBJ)
++ $(LINK) -shared -o libunrar.so $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+
+ install-unrar:
+ install -D unrar $(DESTDIR)/bin/unrar
diff --git a/app-arch/unrar/files/unrar-5.2.2-no-auto-clean.patch b/app-arch/unrar/files/unrar-5.2.2-no-auto-clean.patch
new file mode 100644
index 000000000000..ff78363cd5c0
--- /dev/null
+++ b/app-arch/unrar/files/unrar-5.2.2-no-auto-clean.patch
@@ -0,0 +1,17 @@
+if clean runs in parallel with $(OBJECTS), it is possible to build some
+objects first, then the clean target fires and deletes some, and then we
+try to link and fail.
+
+https://bugs.gentoo.org/528218
+
+--- a/makefile
++++ b/makefile
+@@ -118,7 +118,7 @@
+ clean:
+ @rm -f *.o *.bak *~
+
+-unrar: clean $(OBJECTS) $(UNRAR_OBJ)
++unrar: $(OBJECTS) $(UNRAR_OBJ)
+ $(LINK) -o unrar $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
+ $(STRIP) unrar
+
diff --git a/app-arch/unrar/metadata.xml b/app-arch/unrar/metadata.xml
new file mode 100644
index 000000000000..0ae854f6c4bc
--- /dev/null
+++ b/app-arch/unrar/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:rarlab:unrar</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/app-arch/unrar/unrar-5.0.14.ebuild b/app-arch/unrar/unrar-5.0.14.ebuild
new file mode 100644
index 000000000000..a2af02f07d76
--- /dev/null
+++ b/app-arch/unrar/unrar-5.0.14.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417"
+
+S=${WORKDIR}/unrar
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ sed -i \
+ -e "/libunrar/s:.so:$(get_libname ${PV%.*.*}):" \
+ -e "s:-shared:& -Wl,-soname -Wl,libunrar$(get_libname ${PV%.*.*}):" \
+ makefile || die
+}
+
+src_compile() {
+ unrar_make() {
+ emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
+ }
+
+ unrar_make CXXFLAGS+=" -fPIC" lib
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname)
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname ${PV})
+
+ # The stupid code compiles a lot of objects differently if
+ # they're going into a lib (-DRARDLL) or into the main app.
+ # So for now, we can't link the main app against the lib.
+ unrar_make clean
+ unrar_make
+}
+
+src_install() {
+ dobin unrar
+ dodoc readme.txt
+
+ dolib.so libunrar*
+
+ insinto /usr/include/libunrar${PV%.*.*}
+ doins *.hpp
+ dosym libunrar${PV%.*.*} /usr/include/libunrar
+}
diff --git a/app-arch/unrar/unrar-5.1.6.ebuild b/app-arch/unrar/unrar-5.1.6.ebuild
new file mode 100644
index 000000000000..035a18b6699b
--- /dev/null
+++ b/app-arch/unrar/unrar-5.1.6.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+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
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ epatch "${FILESDIR}"/${PN}-5.2.2-no-auto-clean.patch #528218
+ 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
+}
+
+src_compile() {
+ unrar_make() {
+ emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
+ }
+
+ unrar_make CXXFLAGS+=" -fPIC" lib
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname)
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname ${PV})
+
+ # The stupid code compiles a lot of objects differently if
+ # they're going into a lib (-DRARDLL) or into the main app.
+ # So for now, we can't link the main app against the lib.
+ unrar_make clean
+ unrar_make
+}
+
+src_install() {
+ dobin unrar
+ dodoc readme.txt
+
+ dolib.so libunrar*
+
+ insinto /usr/include/libunrar${PV%.*.*}
+ doins *.hpp
+ dosym libunrar${PV%.*.*} /usr/include/libunrar
+}
diff --git a/app-arch/unrar/unrar-5.2.1.ebuild b/app-arch/unrar/unrar-5.2.1.ebuild
new file mode 100644
index 000000000000..5e3d2006df93
--- /dev/null
+++ b/app-arch/unrar/unrar-5.2.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+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
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ epatch "${FILESDIR}"/${PN}-5.2.2-no-auto-clean.patch #528218
+ 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
+}
+
+src_compile() {
+ unrar_make() {
+ emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
+ }
+
+ unrar_make CXXFLAGS+=" -fPIC" lib
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname)
+ ln -s libunrar$(get_libname ${PV%.*.*}) libunrar$(get_libname ${PV})
+
+ # The stupid code compiles a lot of objects differently if
+ # they're going into a lib (-DRARDLL) or into the main app.
+ # So for now, we can't link the main app against the lib.
+ unrar_make clean
+ unrar_make
+}
+
+src_install() {
+ dobin unrar
+ dodoc readme.txt
+
+ dolib.so libunrar*
+
+ insinto /usr/include/libunrar${PV%.*.*}
+ doins *.hpp
+ dosym libunrar${PV%.*.*} /usr/include/libunrar
+}
diff --git a/app-arch/unrar/unrar-5.2.2.ebuild b/app-arch/unrar/unrar-5.2.2.ebuild
new file mode 100644
index 000000000000..1abc1e6075f3
--- /dev/null
+++ b/app-arch/unrar/unrar-5.2.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+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
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ epatch "${FILESDIR}"/${PN}-5.2.2-no-auto-clean.patch #528218
+ 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
+}
+
+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)
+ ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV})
+
+ 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
+}
diff --git a/app-arch/unrar/unrar-5.2.3.ebuild b/app-arch/unrar/unrar-5.2.3.ebuild
new file mode 100644
index 000000000000..1abc1e6075f3
--- /dev/null
+++ b/app-arch/unrar/unrar-5.2.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+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
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ epatch "${FILESDIR}"/${PN}-5.2.2-no-auto-clean.patch #528218
+ 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
+}
+
+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)
+ ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV})
+
+ 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
+}
diff --git a/app-arch/unrar/unrar-5.2.7.ebuild b/app-arch/unrar/unrar-5.2.7.ebuild
new file mode 100644
index 000000000000..216c2955e672
--- /dev/null
+++ b/app-arch/unrar/unrar-5.2.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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"
+
+LICENSE="unRAR"
+SLOT="0"
+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
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.2-build.patch
+ epatch "${FILESDIR}"/${PN}-5.2.2-no-auto-clean.patch #528218
+ 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
+}
+
+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)
+ ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV})
+
+ 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
+}
diff --git a/app-arch/unrpa/Manifest b/app-arch/unrpa/Manifest
new file mode 100644
index 000000000000..394ba27649ed
--- /dev/null
+++ b/app-arch/unrpa/Manifest
@@ -0,0 +1 @@
+DIST unrpa-1.4.1.tar.gz 14367 SHA256 a6f20fca0e00e09220933060c98180ad11d5a7633fc902684099b5f2c4806b0a SHA512 9b058adda9a39178950df4c39af40726cdca410f0fca699d0dec1bd5d7046c75c8811c8914c0c8756c29988b6362d3b4ad3756aa77f238eafb13d4414d3266cc WHIRLPOOL fc01837fa7a68e5121413c551abb1f9231adf04b677caec1017aaafb112da5546e5f68ea10b7cc68329bacb6499468c5b595196a4abe93ac9b7bcacb1aa5f89a
diff --git a/app-arch/unrpa/metadata.xml b/app-arch/unrpa/metadata.xml
new file mode 100644
index 000000000000..f35062a7ed79
--- /dev/null
+++ b/app-arch/unrpa/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <longdescription>
+ Unrpa is a script to extract files from archives created for
+ the Ren'Py Visual Novel Engine (http://www.renpy.org/)
+ </longdescription>
+ <upstream>
+ <remote-id type="github">Lattyware/unrpa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/unrpa/unrpa-1.4.1.ebuild b/app-arch/unrpa/unrpa-1.4.1.ebuild
new file mode 100644
index 000000000000..ee99fdb00de8
--- /dev/null
+++ b/app-arch/unrpa/unrpa-1.4.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Lattyware/unrpa.git"
+else
+ SRC_URI="https://github.com/Lattyware/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Ren'Py's RPA data file extractor"
+HOMEPAGE="https://github.com/Lattyware/unrpa"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND=${DEPEND}
+
+src_install() {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/app-arch/unrpa/unrpa-9999.ebuild b/app-arch/unrpa/unrpa-9999.ebuild
new file mode 100644
index 000000000000..ee99fdb00de8
--- /dev/null
+++ b/app-arch/unrpa/unrpa-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Lattyware/unrpa.git"
+else
+ SRC_URI="https://github.com/Lattyware/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Ren'Py's RPA data file extractor"
+HOMEPAGE="https://github.com/Lattyware/unrpa"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND=${DEPEND}
+
+src_install() {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/app-arch/unshield/Manifest b/app-arch/unshield/Manifest
new file mode 100644
index 000000000000..cb5bc6c21b57
--- /dev/null
+++ b/app-arch/unshield/Manifest
@@ -0,0 +1 @@
+DIST unshield-0.6_p20120308.tar.xz 31924 SHA256 5f857a496ff54b9e1121b8ce2ceaba78133e91e254203e81340010ee05224da6 SHA512 7eec3c401af4c43f599e1b1abae3efdc6b91bd132a86b6658656bec4f00040eed2b0addede7b555953ecc7b1c976fa03013820a25a68a226cf1b973caffb25c4 WHIRLPOOL 12d307b8345b604d10c42b52c28e1eb4eb9745a7b542da188b2a24c4a993b45cfd98a01740f3f30362c9b2714ba61d5e4c6f66a26e599356b5cef5b76130fc34
diff --git a/app-arch/unshield/files/unshield-bootstrap.patch b/app-arch/unshield/files/unshield-bootstrap.patch
new file mode 100644
index 000000000000..565b9e520f5c
--- /dev/null
+++ b/app-arch/unshield/files/unshield-bootstrap.patch
@@ -0,0 +1,32 @@
+This is replaced by `AT_M4DIR=m4 eautoreconf` in the ebuild.
+
+--- bootstrap
++++ bootstrap
+@@ -26,17 +26,17 @@
+ INCLUDES="-I m4"
+ fi
+ set -x
+-aclocal $INCLUDES
+-autoheader
++# aclocal $INCLUDES
++# autoheader
+
+ # Check For OSX
+ # rhcp011235@gmail.com
+
+-KERNEL_NAME=`uname -s`
+-if [ "$KERNEL_NAME" = "Darwin" ]; then
+- glibtoolize --copy --automake
+-else
+- libtoolize --copy --automake
+-fi
+-automake --copy --foreign --add-missing
+-autoconf
++# KERNEL_NAME=`uname -s`
++# if [ "$KERNEL_NAME" = "Darwin" ]; then
++# glibtoolize --copy --automake
++# else
++# libtoolize --copy --automake
++# fi
++# automake --copy --foreign --add-missing
++# autoconf
diff --git a/app-arch/unshield/metadata.xml b/app-arch/unshield/metadata.xml
new file mode 100644
index 000000000000..1e9221eec842
--- /dev/null
+++ b/app-arch/unshield/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>pda</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">twogood/unshield</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/unshield/unshield-0.6_p20120308.ebuild b/app-arch/unshield/unshield-0.6_p20120308.ebuild
new file mode 100644
index 000000000000..781cc978e7e5
--- /dev/null
+++ b/app-arch/unshield/unshield-0.6_p20120308.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="InstallShield CAB file extractor"
+HOMEPAGE="http://github.com/twogood/unshield http://sourceforge.net/projects/synce/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc x86"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/openssl:0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-bootstrap.patch
+ ./bootstrap
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #467548
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --with-ssl
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README
+
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/app-arch/unzip/Manifest b/app-arch/unzip/Manifest
new file mode 100644
index 000000000000..64da7a524a27
--- /dev/null
+++ b/app-arch/unzip/Manifest
@@ -0,0 +1,2 @@
+DIST unzip552.tar.gz 1140291 SHA256 145d95e2ef1ef9add2e3c97d1340907e33ab8749eb1235372e7f0b7af600a8e9 SHA512 9b852687a7cbce3a6696f8da176f97eded1e99b1f10ae5e4b29bf870df374fea3e4266b3a731d7cdfc28ce5c060a01dd8d3f9c3d8250d1d774273de16d70528b WHIRLPOOL 4148fe091cf9847245be67c7d85fc6fcdcc2a385dad0434757a0c7dea41131085f9bcd5ca6eedc065091a473f27780341921f90ddcae32e73618319da9122d70
+DIST unzip60.tar.gz 1376845 SHA256 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 SHA512 0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d WHIRLPOOL eab32d6d0ab100d302b608658a3ae290d3dad4beddccebaf6cb6527102bb238f751ec6482dea68ae62474005de89f11f9e0cf1b1e12bee2ca5a2336a3c0c9808
diff --git a/app-arch/unzip/files/unzip-5.52-CVE-2008-0888.patch b/app-arch/unzip/files/unzip-5.52-CVE-2008-0888.patch
new file mode 100644
index 000000000000..368b3eeb122d
--- /dev/null
+++ b/app-arch/unzip/files/unzip-5.52-CVE-2008-0888.patch
@@ -0,0 +1,35 @@
+http://bugs.gentoo.org/213761
+
+fix for CVE-2008-0888
+
+--- inflate.c
++++ inflate.c
+@@ -983,6 +983,7 @@
+ unsigned l; /* last length */
+ unsigned m; /* mask for bit lengths table */
+ unsigned n; /* number of lengths to get */
++ struct huft *tlp;
+ struct huft *tl; /* literal/length code table */
+ struct huft *td; /* distance code table */
+ unsigned bl; /* lookup bits for tl */
+@@ -996,6 +997,8 @@
+ int retval = 0; /* error code returned: initialized to "no error" */
+
+
++ td = tlp = tl = (struct huft *)NULL;
++
+ /* make local bit buffer */
+ Trace((stderr, "\ndynamic block"));
+ b = G.bb;
+@@ -1047,9 +1050,9 @@
+ while (i < n)
+ {
+ NEEDBITS(bl)
+- j = (td = tl + ((unsigned)b & m))->b;
++ j = (tlp = tl + ((unsigned)b & m))->b;
+ DUMPBITS(j)
+- j = td->v.n;
++ j = tlp->v.n;
+ if (j < 16) /* length of code in bits (0..15) */
+ ll[i++] = l = j; /* save last length in l */
+ else if (j == 16) /* repeat last length 3 to 6 times */
diff --git a/app-arch/unzip/files/unzip-5.52-no-exec-stack.patch b/app-arch/unzip/files/unzip-5.52-no-exec-stack.patch
new file mode 100644
index 000000000000..e2869bfe80de
--- /dev/null
+++ b/app-arch/unzip/files/unzip-5.52-no-exec-stack.patch
@@ -0,0 +1,13 @@
+Make sure that the asm files don't incorrectly trigger an executable
+stack marking in the final shared library. That's bad, mmmkay.
+
+--- unzip/crc_i386.S
++++ unzip/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/app-arch/unzip/files/unzip-6.0-natspec.patch b/app-arch/unzip/files/unzip-6.0-natspec.patch
new file mode 100644
index 000000000000..a1aa83f79787
--- /dev/null
+++ b/app-arch/unzip/files/unzip-6.0-natspec.patch
@@ -0,0 +1,382 @@
+This patch makes zip use libnatspec to recode file names is national charset.
+Initially this patch was written for altlinux:
+http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches
+
+Later it was a bit improved and improved version was posted here (in Russian):
+http://www.opennet.ru/tips/info/2494.shtml
+
+Gentoo reference:
+https://bugs.gentoo.org/show_bug.cgi?id=275244
+
+diff -pur unzip60orig/unix/configure unzip60/unix/configure
+--- unzip60orig/unix/configure 2009-04-16 23:25:12.000000000 +0400
++++ unzip60/unix/configure 2010-11-26 19:07:43.000000000 +0300
+@@ -17,7 +17,7 @@ CFLAGSR=${CFLAGS}
+ IZ_BZIP2=${3}
+ CFLAGS="${CFLAGS} -I. -DUNIX"
+ LFLAGS1=""
+-LFLAGS2="-s"
++LFLAGS2="-l natspec"
+ LN="ln -s"
+
+ CFLAGS_OPT=''
+diff -pur unzip60orig/unix/Makefile unzip60/unix/Makefile
+--- unzip60orig/unix/Makefile 2009-01-19 01:41:18.000000000 +0300
++++ unzip60/unix/Makefile 2010-11-29 14:25:58.461000001 +0300
+@@ -45,14 +45,14 @@
+ CC = cc# try using "gcc" target rather than changing this (CC and LD
+ LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
+ AS = as
+-LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
++LOC = $(D_USE_BZ2) -DNO_SETLOCALE $(LOCAL_UNZIP)
+ AF = $(LOC)
+ CFLAGS = -O
+ CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
+ CF = $(CFLAGS) $(CF_NOOPT)
+ LFLAGS1 =
+ LF = -o unzip$E $(LFLAGS1)
+-LF2 = -s
++LF2 = -l natspec
+
+ # UnZipSFX flags
+ SL = -o unzipsfx$E $(LFLAGS1)
+@@ -121,7 +121,7 @@ INSTALL_PROGRAM = $(INSTALL)
+ INSTALL_D = mkdir -p
+ # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
+ manext = 1
+-prefix = /usr/local
++prefix = /usr
+ BINDIR = $(prefix)/bin# where to install executables
+ MANDIR = $(prefix)/man/man$(manext)# where to install man pages
+ INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/unzip$E $(BINDIR)/unzipsfx$E \
+diff -pur unzip60orig/unix/unix.c unzip60/unix/unix.c
+--- unzip60orig/unix/unix.c 2009-01-24 02:31:26.000000000 +0300
++++ unzip60/unix/unix.c 2010-11-26 16:58:35.000000000 +0300
+@@ -30,6 +30,9 @@
+ #define UNZIP_INTERNAL
+ #include "unzip.h"
+
++#include <iconv.h>
++#include <natspec.h>
++
+ #ifdef SCO_XENIX
+ # define SYSNDIR
+ #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */
+@@ -1874,3 +1877,44 @@ static void qlfix(__G__ ef_ptr, ef_len)
+ }
+ }
+ #endif /* QLZIP */
++
++
++char OEM_CP[MAX_CP_NAME] = "";
++char ISO_CP[MAX_CP_NAME] = "";
++
++/* Getr the default value of OEM_CP based on the current locale.
++ * ISO_CP is left alone for now. */
++void init_conversion_charsets()
++{
++ /* Make a guess only if OEM_CP not already set. */
++ if(*OEM_CP == '\0') {
++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ strncpy(OEM_CP, archive_charset, sizeof(OEM_CP));
++ }
++
++ if(*ISO_CP == '\0') {
++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_WINCS, "");
++ strncpy(ISO_CP, archive_charset, sizeof(ISO_CP));
++ }
++
++}
++
++/* Convert a string from OEM_CP to the current locale charset. */
++inline void oem_intern(char *string)
++{
++ char *buf = natspec_convert(string, 0, OEM_CP, 0);
++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE],
++ use FILNAMSIZ as string size */
++ strncpy(string, buf, FILNAMSIZ);
++ free (buf);
++}
++
++/* Convert a string from ISO_CP to the current locale charset. */
++inline void iso_intern(char *string)
++{
++ char *buf = natspec_convert(string, 0, ISO_CP, 0);
++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE],
++ use FILNAMSIZ as string size */
++ strncpy(string, buf, FILNAMSIZ);
++ free (buf);
++}
+diff -pur unzip60orig/unix/unxcfg.h unzip60/unix/unxcfg.h
+--- unzip60orig/unix/unxcfg.h 2009-04-16 22:36:12.000000000 +0400
++++ unzip60/unix/unxcfg.h 2010-11-26 16:58:35.000000000 +0300
+@@ -227,4 +227,30 @@ typedef struct stat z_stat;
+ /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
+ /* and notfirstcall are used by do_wild(). */
+
++
++#define MAX_CP_NAME 25
++
++#ifdef SETLOCALE
++# undef SETLOCALE
++#endif
++#define SETLOCALE(category, locale) setlocale(category, locale)
++#include <locale.h>
++
++#ifdef _ISO_INTERN
++# undef _ISO_INTERN
++#endif
++#define _ISO_INTERN(str1) iso_intern(str1)
++
++#ifdef _OEM_INTERN
++# undef _OEM_INTERN
++#endif
++#ifndef IZ_OEM2ISO_ARRAY
++# define IZ_OEM2ISO_ARRAY
++#endif
++#define _OEM_INTERN(str1) oem_intern(str1)
++
++void iso_intern(char *);
++void oem_intern(char *);
++void init_conversion_charsets(void);
++
+ #endif /* !__unxcfg_h */
+diff -pur unzip60orig/unzip.c unzip60/unzip.c
+--- unzip60orig/unzip.c 2009-04-16 22:26:52.000000000 +0400
++++ unzip60/unzip.c 2010-11-26 16:58:35.000000000 +0300
+@@ -331,7 +331,9 @@ static ZCONST char Far ZipInfoUsageLine3
+ -h print header line -t print totals for listed files or for all\n\
+ -z print zipfile comment -T print file times in sortable decimal format\
+ \n -C be case-insensitive %s\
+- -x exclude filenames that follow from listing\n";
++ -x exclude filenames that follow from listing\n\
++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\
++ -I CHARSET specify a character encoding for UNIX and other archives\n";
+ #ifdef MORE
+ static ZCONST char Far ZipInfoUsageLine4[] =
+ " -M page output through built-in \"more\"\n";
+@@ -570,8 +572,7 @@ Send bug reports using //www.info-zip.or
+ #else /* !VMS */
+ # ifdef COPYRIGHT_CLEAN
+ static ZCONST char Far UnzipUsageLine1[] = "\
+-UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\
+-bug reports using http://www.info-zip.org/zip-bug.html; see README for details.\
++UnZip %d.%d%d%s of %s, by ALT Linux Team. Original by Info-ZIP.\
+ \n\n";
+ # else
+ static ZCONST char Far UnzipUsageLine1[] = "\
+@@ -673,7 +674,9 @@ modifiers:\n\
+ -j junk paths (do not make directories) -aa treat ALL files as text\n\
+ -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\
+ -C match filenames case-insensitively -L make (some) names \
+-lowercase\n %-42s -V retain VMS version numbers\n%s";
++lowercase\n %-42s -V retain VMS version numbers\n%s\
++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\
++ -I CHARSET specify a character encoding for UNIX and other archives\n";
+ #endif /* ?VMS */
+ #else /* !UNICODE_SUPPORT */
+ #ifdef VMS
+@@ -692,7 +695,9 @@ modifiers:\n\
+ -o overwrite files WITHOUT prompting -a auto-convert any text files\n\
+ -j junk paths (do not make directories) -aa treat ALL files as text\n\
+ -C match filenames case-insensitively -L make (some) names \
+-lowercase\n %-42s -V retain VMS version numbers\n%s";
++lowercase\n %-42s -V retain VMS version numbers\n%s\
++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\
++ -I CHARSET specify a character encoding for UNIX and other archives\n";
+ #endif /* ?VMS */
+ #endif /* ?UNICODE_SUPPORT */
+
+@@ -803,6 +808,10 @@ int unzip(__G__ argc, argv)
+ #endif /* UNICODE_SUPPORT */
+
+
++#ifdef UNIX
++ init_conversion_charsets();
++#endif
++
+ #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__))
+ extern void DebugMalloc(void);
+
+@@ -1336,6 +1345,11 @@ int uz_opts(__G__ pargc, pargv)
+ argc = *pargc;
+ argv = *pargv;
+
++#ifdef UNIX
++ extern char OEM_CP[MAX_CP_NAME];
++ extern char ISO_CP[MAX_CP_NAME];
++#endif
++
+ while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) {
+ s = *argv + 1;
+ while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */
+@@ -1517,6 +1531,35 @@ int uz_opts(__G__ pargc, pargv)
+ }
+ break;
+ #endif /* MACOS */
++#ifdef UNIX
++ case ('I'):
++ if (negative) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: encodings can't be negated"));
++ return(PK_PARAM);
++ } else {
++ if(*s) { /* Handle the -Icharset case */
++ /* Assume that charsets can't start with a dash to spot arguments misuse */
++ if(*s == '-') {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ strncpy(ISO_CP, s, sizeof(ISO_CP));
++ } else { /* -I charset */
++ ++argv;
++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ s = *argv;
++ strncpy(ISO_CP, s, sizeof(ISO_CP));
++ }
++ while(*(++s)); /* No params straight after charset name */
++ }
++ break;
++#endif /* ?UNIX */
+ case ('j'): /* junk pathnames/directory structure */
+ if (negative)
+ uO.jflag = FALSE, negative = 0;
+@@ -1592,6 +1635,35 @@ int uz_opts(__G__ pargc, pargv)
+ } else
+ ++uO.overwrite_all;
+ break;
++#ifdef UNIX
++ case ('O'):
++ if (negative) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: encodings can't be negated"));
++ return(PK_PARAM);
++ } else {
++ if(*s) { /* Handle the -Ocharset case */
++ /* Assume that charsets can't start with a dash to spot arguments misuse */
++ if(*s == '-') {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ strncpy(OEM_CP, s, sizeof(OEM_CP));
++ } else { /* -O charset */
++ ++argv;
++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -O argument"));
++ return(PK_PARAM);
++ }
++ s = *argv;
++ strncpy(OEM_CP, s, sizeof(OEM_CP));
++ }
++ while(*(++s)); /* No params straight after charset name */
++ }
++ break;
++#endif /* ?UNIX */
+ case ('p'): /* pipes: extract to stdout, no messages */
+ if (negative) {
+ uO.cflag = FALSE;
+diff -pur unzip60orig/unzpriv.h unzip60/unzpriv.h
+--- unzip60orig/unzpriv.h 2009-04-20 03:59:26.000000000 +0400
++++ unzip60/unzpriv.h 2010-11-26 16:58:35.000000000 +0300
+@@ -3008,7 +3008,7 @@ char *GetLoadPath OF((__GPRO));
+ !(((islochdr) || (isuxatt)) && \
+ ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
+ (hostnum) == FS_HPFS_ || \
+- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
++ ((hostnum) == FS_NTFS_/* && (hostver) == 50*/)) { \
+ _OEM_INTERN((string)); \
+ } else { \
+ _ISO_INTERN((string)); \
+diff -pur unzip60orig/zipinfo.c unzip60/zipinfo.c
+--- unzip60orig/zipinfo.c 2009-02-08 20:04:30.000000000 +0300
++++ unzip60/zipinfo.c 2010-11-26 16:58:35.000000000 +0300
+@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv)
+ int tflag_slm=TRUE, tflag_2v=FALSE;
+ int explicit_h=FALSE, explicit_t=FALSE;
+
++#ifdef UNIX
++ extern char OEM_CP[MAX_CP_NAME];
++ extern char ISO_CP[MAX_CP_NAME];
++#endif
+
+ #ifdef MACOS
+ uO.lflag = LFLAG; /* reset default on each call */
+@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv)
+ uO.lflag = 0;
+ }
+ break;
++#ifdef UNIX
++ case ('I'):
++ if (negative) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: encodings can't be negated"));
++ return(PK_PARAM);
++ } else {
++ if(*s) { /* Handle the -Icharset case */
++ /* Assume that charsets can't start with a dash to spot arguments misuse */
++ if(*s == '-') {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ strncpy(ISO_CP, s, sizeof(ISO_CP));
++ } else { /* -I charset */
++ ++argv;
++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ s = *argv;
++ strncpy(ISO_CP, s, sizeof(ISO_CP));
++ }
++ while(*(++s)); /* No params straight after charset name */
++ }
++ break;
++#endif /* ?UNIX */
+ case 'l': /* longer form of "ls -l" type listing */
+ if (negative)
+ uO.lflag = -2, negative = 0;
+@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv)
+ G.M_flag = TRUE;
+ break;
+ #endif
++#ifdef UNIX
++ case ('O'):
++ if (negative) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: encodings can't be negated"));
++ return(PK_PARAM);
++ } else {
++ if(*s) { /* Handle the -Ocharset case */
++ /* Assume that charsets can't start with a dash to spot arguments misuse */
++ if(*s == '-') {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -I argument"));
++ return(PK_PARAM);
++ }
++ strncpy(OEM_CP, s, sizeof(OEM_CP));
++ } else { /* -O charset */
++ ++argv;
++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++ Info(slide, 0x401, ((char *)slide,
++ "error: a valid character encoding should follow the -O argument"));
++ return(PK_PARAM);
++ }
++ s = *argv;
++ strncpy(OEM_CP, s, sizeof(OEM_CP));
++ }
++ while(*(++s)); /* No params straight after charset name */
++ }
++ break;
++#endif /* ?UNIX */
+ case 's': /* default: shorter "ls -l" type listing */
+ if (negative)
+ uO.lflag = -2, negative = 0;
diff --git a/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch b/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch
new file mode 100644
index 000000000000..7973378704e1
--- /dev/null
+++ b/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch
@@ -0,0 +1,13 @@
+Make sure that the asm files don't incorrectly trigger an executable
+stack marking in the final shared library. That's bad, mmmkay.
+
+--- unzip/crc_i386.S
++++ unzip/crc_i386.S
+@@ -302,3 +302,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/app-arch/unzip/metadata.xml b/app-arch/unzip/metadata.xml
new file mode 100644
index 000000000000..a186eb633331
--- /dev/null
+++ b/app-arch/unzip/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <use>
+ <flag name="natspec">Use <pkg>dev-libs/libnatspec</pkg> to correctly decode non-ascii file names archived in Windows.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">infozip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/unzip/unzip-5.52-r2.ebuild b/app-arch/unzip/unzip-5.52-r2.ebuild
new file mode 100644
index 000000000000..9f97ed1ae8c0
--- /dev/null
+++ b/app-arch/unzip/unzip-5.52-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="unzipper for pkzip-compressed files"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://gentoo/${PN}${PV/.}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-no-exec-stack.patch
+ epatch "${FILESDIR}"/${P}-CVE-2008-0888.patch #213761
+ sed -i \
+ -e 's:-O3:$(CFLAGS) $(CPPFLAGS):' \
+ -e 's:-O :$(CFLAGS) $(CPPFLAGS) :' \
+ -e "s:CC=gcc :CC=$(tc-getCC) :" \
+ -e "s:LD=gcc :LD=$(tc-getCC) :" \
+ -e "s:AS=gcc :AS=$(tc-getCC) :" \
+ -e 's:LF2 = -s:LF2 = :' \
+ -e 's:LF = :LF = $(LDFLAGS) :' \
+ -e 's:SL = :SL = $(LDFLAGS) :' \
+ -e 's:FL = :FL = $(LDFLAGS) :' \
+ unix/Makefile \
+ || die "sed unix/Makefile failed"
+}
+
+src_compile() {
+ local TARGET
+ case ${CHOST} in
+ i?86*-linux*) TARGET=linux_asm ;;
+ *-linux*) TARGET=linux_noasm ;;
+ i?86*-freebsd* | i?86*-dragonfly* | i?86*-openbsd* | i?86*-netbsd*)
+ TARGET=freebsd ;; # mislabelled bsd with x86 asm
+ *-freebsd* | *-dragonfly* | *-openbsd* | *-netbsd*)
+ TARGET=bsd ;;
+ *-darwin*) TARGET=macosx ;;
+ *) die "Unknown target, you suck" ;;
+ esac
+ append-lfs-flags #104315
+ emake -f unix/Makefile ${TARGET} || die "emake failed"
+}
+
+src_install() {
+ dobin unzip funzip unzipsfx unix/zipgrep || die "dobin failed"
+ dosym unzip /usr/bin/zipinfo || die
+ doman man/*.1
+ dodoc BUGS History* README ToDo WHERE
+}
diff --git a/app-arch/unzip/unzip-6.0-r1.ebuild b/app-arch/unzip/unzip-6.0-r1.ebuild
new file mode 100644
index 000000000000..cdb7572ab5e2
--- /dev/null
+++ b/app-arch/unzip/unzip-6.0-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P="${PN}${PV/.}"
+
+DESCRIPTION="unzipper for pkzip-compressed files"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 m68k ppc ppc64 s390 sh ~sparc x86"
+IUSE="bzip2 unicode"
+
+DEPEND="bzip2? ( app-arch/bzip2 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-no-exec-stack.patch
+ sed -i \
+ -e '/^CFLAGS/d' \
+ -e '/CFLAGS/s:-O[0-9]\?:$(CFLAGS) $(CPPFLAGS):' \
+ -e '/^STRIP/s:=.*:=true:' \
+ -e "s:\<CC=gcc\>:CC=\"$(tc-getCC)\":" \
+ -e "s:\<LD=gcc\>:LD=\"$(tc-getCC)\":" \
+ -e "s:\<AS=gcc\>:AS=\"$(tc-getCC)\":" \
+ -e 's:LF2 = -s:LF2 = :' \
+ -e 's:LF = :LF = $(LDFLAGS) :' \
+ -e 's:SL = :SL = $(LDFLAGS) :' \
+ -e 's:FL = :FL = $(LDFLAGS) :' \
+ -e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \
+ unix/Makefile \
+ || die "sed unix/Makefile failed"
+}
+
+src_compile() {
+ local TARGET
+ case ${CHOST} in
+ i?86*-*linux*) TARGET=linux_asm ;;
+ *linux*) TARGET=linux_noasm ;;
+ i?86*-*bsd* | \
+ i?86*-dragonfly*) TARGET=freebsd ;; # mislabelled bsd with x86 asm
+ *bsd* | *dragonfly*) TARGET=bsd ;;
+ *-darwin*) TARGET=macosx ;;
+ *) die "Unknown target, you suck" ;;
+ esac
+
+ [[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
+ use bzip2 && append-cppflags -DUSE_BZIP2
+ use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE
+ append-cppflags -DLARGE_FILE_SUPPORT #281473
+
+ emake \
+ -f unix/Makefile \
+ ${TARGET} || die "emake failed"
+}
+
+src_install() {
+ dobin unzip funzip unzipsfx unix/zipgrep || die "dobin failed"
+ dosym unzip /usr/bin/zipinfo || die
+ doman man/*.1
+ dodoc BUGS History* README ToDo WHERE
+}
diff --git a/app-arch/unzip/unzip-6.0-r2.ebuild b/app-arch/unzip/unzip-6.0-r2.ebuild
new file mode 100644
index 000000000000..1d350a12fcea
--- /dev/null
+++ b/app-arch/unzip/unzip-6.0-r2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P="${PN}${PV/.}"
+
+DESCRIPTION="unzipper for pkzip-compressed files"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="bzip2 natspec unicode"
+
+DEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-exec-stack.patch
+ use natspec && epatch "${FILESDIR}/${PN}-6.0-natspec.patch" #275244
+ sed -i \
+ -e '/^CFLAGS/d' \
+ -e '/CFLAGS/s:-O[0-9]\?:$(CFLAGS) $(CPPFLAGS):' \
+ -e '/^STRIP/s:=.*:=true:' \
+ -e "s:\<CC=gcc\>:CC=\"$(tc-getCC)\":" \
+ -e "s:\<LD=gcc\>:LD=\"$(tc-getCC)\":" \
+ -e "s:\<AS=gcc\>:AS=\"$(tc-getCC)\":" \
+ -e 's:LF2 = -s:LF2 = :' \
+ -e 's:LF = :LF = $(LDFLAGS) :' \
+ -e 's:SL = :SL = $(LDFLAGS) :' \
+ -e 's:FL = :FL = $(LDFLAGS) :' \
+ -e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \
+ unix/Makefile \
+ || die "sed unix/Makefile failed"
+}
+
+src_compile() {
+ local TARGET
+ case ${CHOST} in
+ i?86*-*linux*) TARGET=linux_asm ;;
+ *linux*) TARGET=linux_noasm ;;
+ i?86*-*bsd* | \
+ i?86*-dragonfly*) TARGET=freebsd ;; # mislabelled bsd with x86 asm
+ *bsd* | *dragonfly*) TARGET=bsd ;;
+ *-darwin*) TARGET=macosx ;;
+ *) die "Unknown target, you suck" ;;
+ esac
+
+ [[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
+ use bzip2 && append-cppflags -DUSE_BZIP2
+ use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE
+ append-cppflags -DLARGE_FILE_SUPPORT #281473
+
+ emake \
+ -f unix/Makefile \
+ ${TARGET} || die "emake failed"
+}
+
+src_install() {
+ dobin unzip funzip unzipsfx unix/zipgrep || die "dobin failed"
+ dosym unzip /usr/bin/zipinfo || die
+ doman man/*.1
+ dodoc BUGS History* README ToDo WHERE
+}
diff --git a/app-arch/unzip/unzip-6.0-r3.ebuild b/app-arch/unzip/unzip-6.0-r3.ebuild
new file mode 100644
index 000000000000..210563bcb5a1
--- /dev/null
+++ b/app-arch/unzip/unzip-6.0-r3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P="${PN}${PV/.}"
+
+DESCRIPTION="unzipper for pkzip-compressed files"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="bzip2 natspec unicode"
+
+DEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-exec-stack.patch
+ use natspec && epatch "${FILESDIR}/${PN}-6.0-natspec.patch" #275244
+ sed -i \
+ -e '/^CFLAGS/d' \
+ -e '/CFLAGS/s:-O[0-9]\?:$(CFLAGS) $(CPPFLAGS):' \
+ -e '/^STRIP/s:=.*:=true:' \
+ -e "s:\<CC=gcc\>:CC=\"$(tc-getCC)\":" \
+ -e "s:\<LD=gcc\>:LD=\"$(tc-getCC)\":" \
+ -e "s:\<AS=gcc\>:AS=\"$(tc-getCC)\":" \
+ -e 's:LF2 = -s:LF2 = :' \
+ -e 's:LF = :LF = $(LDFLAGS) :' \
+ -e 's:SL = :SL = $(LDFLAGS) :' \
+ -e 's:FL = :FL = $(LDFLAGS) :' \
+ -e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \
+ -e 's:$(AS) :$(AS) $(ASFLAGS) :g' \
+ unix/Makefile \
+ || die "sed unix/Makefile failed"
+}
+
+src_compile() {
+ local TARGET
+ case ${CHOST} in
+ i?86*-*linux*) TARGET=linux_asm ;;
+ *linux*) TARGET=linux_noasm ;;
+ i?86*-*bsd* | \
+ i?86*-dragonfly*) TARGET=freebsd ;; # mislabelled bsd with x86 asm
+ *bsd* | *dragonfly*) TARGET=bsd ;;
+ *-darwin*) TARGET=macosx ;;
+ *) die "Unknown target, you suck" ;;
+ esac
+
+ [[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
+ use bzip2 && append-cppflags -DUSE_BZIP2
+ use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE
+ append-cppflags -DLARGE_FILE_SUPPORT #281473
+
+ ASFLAGS="${ASFLAGS} $(get_abi_var CFLAGS)" emake \
+ -f unix/Makefile \
+ ${TARGET} || die "emake failed"
+}
+
+src_install() {
+ dobin unzip funzip unzipsfx unix/zipgrep || die "dobin failed"
+ dosym unzip /usr/bin/zipinfo || die
+ doman man/*.1
+ dodoc BUGS History* README ToDo WHERE
+}
diff --git a/app-arch/upx-bin/Manifest b/app-arch/upx-bin/Manifest
new file mode 100644
index 000000000000..686566e9b91b
--- /dev/null
+++ b/app-arch/upx-bin/Manifest
@@ -0,0 +1,5 @@
+DIST upx-3.91-amd64_linux.tar.bz2 373664 SHA256 ec709333175503c7388fb6e91054de4db1b34ca214b0574c98ed43dfc1aee1f0 SHA512 7f57564c89baf1bad89d6038c17a83268a3f528d2cb3cc992160c6dd4842a6b3ef7123fea86480a491d8df7f7b099d8444effa6f677532f4bf756f72a51066e9 WHIRLPOOL db06d0d4016043640ff8e7aba7931c60aa3f113abb1a4cba81b948ea1bbeba4f27f426270b583e79fe8f473e768f185798b77194630e18a19d6c65d5e669a43a
+DIST upx-3.91-armeb_linux.tar.bz2 363100 SHA256 b127bfbedea0cb95c779ee55838f7ff795b9258e12bd5cbc42e4ceb560af0c1d SHA512 730fcf1b8b2a81043f1c1ff611c94c8b4e26850c7dbbbd9fdcb6a6603878792873ef6a48f073feb12e1db3cdf0a7964f747ba4d7daa75cc2bfb8844b234b4332 WHIRLPOOL f0ee5a1e20d649e0f902529a408c869111cbe1431db3d68399ba06a482a6c7fb04bec7cd160ed2a28e1c422a23aa230a2075a2f9ab4140b89f59924295506bb0
+DIST upx-3.91-i386_linux.tar.bz2 366446 SHA256 af4a4682a3a1980d3e09dcc08df3066f670778461e9087c4f4ce2fd6fe296ac3 SHA512 b679fc54a4e4bbf1ed7bf11473b85ae33df82752815bdf7fae9499f6d1cb1df0251a284596d7303fcba8465b77c6dd233e1cff288806a73c84a50a48ec13aec4 WHIRLPOOL 42045dada5aaad6921ec40d2ff40338c885e13ae80e2a0b2a2adb9b9280d06e2c33f31c294e7acfd6b036765cd8b54ee1144caf0dcd49345801fc4373c680111
+DIST upx-3.91-mipsel_linux.tar.bz2 530222 SHA256 471865d5482571599f8254322c6c6927f9437e4652d9f1672f8381a3587e6ce2 SHA512 66a256127104266350e32cffe6914790586c3f35b4aea49a12ce8c37a911f7b2195eeea72b9a9e4ad32e12e8efe16fda36f93cdff85e15983b496211c961f71f WHIRLPOOL 37410889abf67f87d80e979936f0ca029f61b241e4962708b18db56063297e48376730e72a3a4bcccd9c58b59293eb4b6afa0fdb6f98ac73a0584442c2911828
+DIST upx-3.91-powerpc_linux.tar.bz2 474332 SHA256 a4872c83d6223445ddaf7159274656a612abefe9e8846cbeb103584e403735b2 SHA512 1ea12baf9f8cf7a40fc58be7b41255f2e65044937faa44232f3ef5d4cfcc6d98ac1cbf7511c941df7610cf5c2378f9c9dfb323a6a1c5c59526b67d38eb800afe WHIRLPOOL 8fa78c20bc991fede40a03d708b4062311c6b189a47327283765e0b2c9cbefc9213e23db9ba6c3d46f557174752439b3a6dfbff3bc37f5e51cbaf5a19f4a87c7
diff --git a/app-arch/upx-bin/metadata.xml b/app-arch/upx-bin/metadata.xml
new file mode 100644
index 000000000000..d33738a6a701
--- /dev/null
+++ b/app-arch/upx-bin/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>UPX is a versatile executable packer with a excellent
+ compression ratio.</longdescription>
+</pkgmetadata>
diff --git a/app-arch/upx-bin/upx-bin-3.91.ebuild b/app-arch/upx-bin/upx-bin-3.91.ebuild
new file mode 100644
index 000000000000..261b8d7e9fa7
--- /dev/null
+++ b/app-arch/upx-bin/upx-bin-3.91.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit pax-utils
+
+MY_P="${PN/-bin}-${PV}"
+DESCRIPTION="Ultimate Packer for eXecutables (binary version with proprietary NRV compression)"
+HOMEPAGE="http://upx.sourceforge.net/"
+SRC_URI="x86? ( http://upx.sourceforge.net/download/${MY_P}-i386_linux.tar.bz2 )
+ amd64? ( http://upx.sourceforge.net/download/${MY_P}-amd64_linux.tar.bz2 )
+ ppc? ( http://upx.sourceforge.net/download/${MY_P}-powerpc_linux.tar.bz2 )
+ arm? ( http://upx.sourceforge.net/download/${MY_P}-armeb_linux.tar.bz2 )
+ mips? ( http://upx.sourceforge.net/download/${MY_P}-mipsel_linux.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+RESTRICT="strip"
+
+RDEPEND="!app-arch/upx-ucl"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/bin/upx"
+
+src_install() {
+ cd ${MY_P}*
+ into /opt
+ dobin upx
+ pax-mark -m "${ED}"/opt/bin/upx
+ doman upx.1
+ dodoc upx.doc BUGS NEWS README* THANKS TODO
+ dohtml upx.html
+}
diff --git a/app-arch/upx-ucl/Manifest b/app-arch/upx-ucl/Manifest
new file mode 100644
index 000000000000..c92b232e2a7e
--- /dev/null
+++ b/app-arch/upx-ucl/Manifest
@@ -0,0 +1,2 @@
+DIST lzma465.tar.bz2 288122 SHA256 c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e SHA512 690f005cfa9d3a65db03baddad57cf8dd79f861ac72d2e1bc18a151f3673d5f8043e3331f5dc3fba713dfd7b01ebf0817a2c0b6a1b22e1f7d8255a42b85ea4ac WHIRLPOOL 34a08888ac6874c1ac4ff181774b02eec993cc90a28531596122183c975c2e29fd9852d066acd24c0fe1f213ae9e03e7daf3fc9417c587043e968d973551027f
+DIST upx-3.91-src.tar.bz2 904747 SHA256 527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c SHA512 7e9a392fe11daf7baf9632f2c448ef9936da7dfab215f86ba417e9f097770949acb653aaabe6cc5ed812efc486cb35e0c1e128c80026b02825713d8b12251cf5 WHIRLPOOL 1e20491528c9c7da50985c4484c0062799a243adebfd8292ea3c136b93d865842e85e164e15f1005d0e821b83aa7162e7113553cafd5f0b584d9b08aa6c7938e
diff --git a/app-arch/upx-ucl/metadata.xml b/app-arch/upx-ucl/metadata.xml
new file mode 100644
index 000000000000..0fc231e1b2bf
--- /dev/null
+++ b/app-arch/upx-ucl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>UPX is a versatile executable packer with a excellent compression ratio</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">sevenzip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/upx-ucl/upx-ucl-3.91.ebuild b/app-arch/upx-ucl/upx-ucl-3.91.ebuild
new file mode 100644
index 000000000000..3f47c3176e29
--- /dev/null
+++ b/app-arch/upx-ucl/upx-ucl-3.91.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+LZMA_VER=465
+#LZMA_VER=920
+MY_P="${P/-ucl}-src"
+DESCRIPTION="Ultimate Packer for eXecutables (free version using UCL compression and not NRV)"
+HOMEPAGE="http://upx.sourceforge.net/"
+SRC_URI="http://upx.sourceforge.net/download/${MY_P}.tar.bz2
+ lzma? ( mirror://sourceforge/sevenzip/lzma${LZMA_VER}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="lzma zlib"
+
+RDEPEND=">=dev-libs/ucl-1.02
+ !app-arch/upx
+ !app-arch/upx-bin"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ use zlib && append-cppflags -DWITH_ZLIB=1
+}
+
+src_compile() {
+ tc-export CXX
+ emake UPX_LZMADIR="${WORKDIR}" all
+}
+
+src_install() {
+ newbin src/upx.out upx
+ dodoc BUGS NEWS PROJECTS README* THANKS TODO doc/*.txt
+ dohtml doc/upx.html
+ doman doc/upx.1
+}
diff --git a/app-arch/vimball/Manifest b/app-arch/vimball/Manifest
new file mode 100644
index 000000000000..1ba9af37d4c2
--- /dev/null
+++ b/app-arch/vimball/Manifest
@@ -0,0 +1 @@
+DIST vimball-0.5.1.tar.gz 5246 SHA256 74c7bb873e5e530645b0735995244adc9de4eafbd157498f27c096f074a37544 SHA512 f89ba7291e3f4146f2ada7934b0ca74524abc639e586da12e19882e9aebe3f14858a6145b830a32dc19b0deb61f652375d8a56dc7847fd0061d14a2d77208549 WHIRLPOOL 4c05aafd7c78124b637665aade84404c1a445b1eb3eaacc8b21c77848267c289b3246acf2b32b7e41c812216920f9550627b4bf27e5e66d534d880f1b1c7bd16
diff --git a/app-arch/vimball/metadata.xml b/app-arch/vimball/metadata.xml
new file mode 100644
index 000000000000..fe150bdd9ce7
--- /dev/null
+++ b/app-arch/vimball/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">vimball</remote-id>
+ <remote-id type="github">radhermit/vimball</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/vimball/vimball-0.5.1.ebuild b/app-arch/vimball/vimball-0.5.1.ebuild
new file mode 100644
index 000000000000..9e15599fe1d3
--- /dev/null
+++ b/app-arch/vimball/vimball-0.5.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{3_3,3_4} )
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/radhermit/vimball.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a command-line vimball archive extractor"
+HOMEPAGE="https://github.com/radhermit/vimball"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+python_test() {
+ esetup.py test
+}
diff --git a/app-arch/vimball/vimball-9999.ebuild b/app-arch/vimball/vimball-9999.ebuild
new file mode 100644
index 000000000000..9e15599fe1d3
--- /dev/null
+++ b/app-arch/vimball/vimball-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{3_3,3_4} )
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/radhermit/vimball.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a command-line vimball archive extractor"
+HOMEPAGE="https://github.com/radhermit/vimball"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+python_test() {
+ esetup.py test
+}
diff --git a/app-arch/xar/Manifest b/app-arch/xar/Manifest
new file mode 100644
index 000000000000..8f4cdf65d43e
--- /dev/null
+++ b/app-arch/xar/Manifest
@@ -0,0 +1 @@
+DIST xar-1.5.2.tar.gz 137973 SHA256 4c5d5682803cdfab16d72365cf51fc4075d597c5eeaa8c7d1990fea98cdae3e6 SHA512 975861324ee31805eb107f51f2f6c43029b25601d4c1daa2dfee49ec7e25351e94798de9fb5c011b90d93dd6a3bbd3fe15c97ab0fc32f0b36b3000dd48cbf46b WHIRLPOOL b820921ab7412495bda671774338ca6eacb6666b2ae50ebc76c0ff5e965d24042ffa98dbe306ce46de71a375beb2ae8cbaf6814c085ee3b3b3a4efae897ebd5e
diff --git a/app-arch/xar/files/xar-1.5.2-automagic_acl_and_bzip2.patch b/app-arch/xar/files/xar-1.5.2-automagic_acl_and_bzip2.patch
new file mode 100644
index 000000000000..54ad8f725314
--- /dev/null
+++ b/app-arch/xar/files/xar-1.5.2-automagic_acl_and_bzip2.patch
@@ -0,0 +1,46 @@
+diff -ur xar-1.5.2.orig/configure.ac xar-1.5.2/configure.ac
+--- xar-1.5.2.orig/configure.ac 2007-12-29 20:49:57.000000000 +0200
++++ xar-1.5.2/configure.ac 2008-05-19 17:07:23.000000000 +0300
+@@ -181,8 +181,13 @@
+ )
+ AC_SUBST([enable_autogen])
+
++AC_ARG_ENABLE(acl, AC_HELP_STRING([--disable-acl], [disable support for libacl (default=autodetect)]), [ enable_acl=$enableval ], [ enable_acl=yes ])
++
++if test "x$enable_acl" = "xyes"; then
+ AC_TRY_COMPILE([#include <sys/types.h>
+ #include <sys/acl.h>], [acl_t a], [AC_DEFINE([HAVE_SYS_ACL_H],[1], [define if you have sys/acl.h and it has a working acl_t type])])
++fi
++
+ AC_CHECK_HEADERS(ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
+ AC_CHECK_FUNCS(lgetxattr)
+ AC_CHECK_FUNCS(lsetxattr)
+@@ -251,7 +256,9 @@
+ AC_ERROR(can not detect the size of your system's dev_t type)
+ fi
+
+-AC_CHECK_LIB(acl, acl_get_file)
++if test "x$enable_acl" = "xyes"; then
++ AC_CHECK_LIB(acl, acl_get_file)
++fi
+
+ dnl Check for paths
+ AC_PREFIX_DEFAULT(/usr/local)
+@@ -342,9 +349,14 @@
+ dnl
+ dnl Configure libbz2.
+ dnl
+-have_libbz2="1"
+-AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
+-AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
++AC_ARG_ENABLE(bzip2, AC_HELP_STRING([--disable-bzip2], [disable support for libbz2 (default=autodetect)]), [ enable_bzip2=$enableval ], [ enable_bzip2=yes ])
++
++if test "x$enable_bzip2" = "xyes"; then
++ have_libbz2="1"
++ AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
++ AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
++fi
++
+ if test "x${have_libbz2}" = "x1" ; then
+ AC_DEFINE([HAVE_LIBBZ2])
+ fi
diff --git a/app-arch/xar/files/xar-1.5.2-respect_ldflags.patch b/app-arch/xar/files/xar-1.5.2-respect_ldflags.patch
new file mode 100644
index 000000000000..1ac090d94863
--- /dev/null
+++ b/app-arch/xar/files/xar-1.5.2-respect_ldflags.patch
@@ -0,0 +1,21 @@
+diff -ur xar-1.5.2.orig/lib/Makefile.inc.in xar-1.5.2/lib/Makefile.inc.in
+--- xar-1.5.2.orig/lib/Makefile.inc.in 2007-12-29 20:49:57.000000000 +0200
++++ xar-1.5.2/lib/Makefile.inc.in 2010-04-07 01:18:59.027890429 +0300
+@@ -134,7 +134,7 @@
+ $(LIBRXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
+ @mkdir -p $(@D)
+ ifeq (elf, @abi@)
+- $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
++ $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
+ endif
+ ifeq (macho, @abi@)
+ $(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name @abs_objroot@$(LIBRXAR_S) -o $@ $+ $(LDFLAGS) @LIBS@
+@@ -150,7 +150,7 @@
+ $(LIBXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
+ @mkdir -p $(@D)
+ ifeq (elf, @abi@)
+- $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
++ $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
+ endif
+ ifeq (macho, @abi@)
+ $(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name $(LIBDIR)/$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
diff --git a/app-arch/xar/metadata.xml b/app-arch/xar/metadata.xml
new file mode 100644
index 000000000000..1babb0999ee5
--- /dev/null
+++ b/app-arch/xar/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ The XAR project aims to provide an easily extensible archive format.
+ Important design decisions include an easily extensible XML table of
+ contents for random access to archived files, storing the toc at the
+ beginning of the archive to allow for efficient handling of streamed
+ archives, the ability to handle files of arbitrarily large sizes, the
+ ability to choose independent encodings for individual files in the
+ archive, the ability to store checksums for individual files in both
+ compressed and uncompressed form, and the ability to query the table of
+ content's rich meta-data.
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">xar</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/xar/xar-1.5.2-r1.ebuild b/app-arch/xar/xar-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..f5467f7d9b07
--- /dev/null
+++ b/app-arch/xar/xar-1.5.2-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools base eutils
+
+DESCRIPTION="An easily extensible archive format"
+HOMEPAGE="http://code.google.com/p/xar"
+SRC_URI="http://xar.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="acl +bzip2"
+
+DEPEND="dev-libs/openssl
+ dev-libs/libxml2
+ sys-libs/zlib
+ acl? ( sys-apps/acl )
+ bzip2? ( app-arch/bzip2 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( TODO )
+PATCHES=( "${FILESDIR}/${P}-automagic_acl_and_bzip2.patch"
+ "${FILESDIR}/${P}-respect_ldflags.patch" )
+
+src_prepare() {
+ base_src_prepare
+ eautoconf
+}
+
+src_configure() {
+ econf $(use_enable acl) $(use_enable bzip2)
+}
diff --git a/app-arch/xarchiver/Manifest b/app-arch/xarchiver/Manifest
new file mode 100644
index 000000000000..4d954e777423
--- /dev/null
+++ b/app-arch/xarchiver/Manifest
@@ -0,0 +1 @@
+DIST xarchiver-0.5.4.tar.bz2 1003045 SHA256 e63fa73979fcc56efe8cca9095fd915d31a1714ce9676246b8626f164e452ef4 SHA512 3b767c2601d94104e2fc72aa8d168afa5a154b5747a9b0518d1c348417e56e4c19d872a0029fb78decc897e0f3bc9573e17d0317b85f584e7275b0e519f5f30d WHIRLPOOL 3f5a277b05147daf29db0be26718ed51fa0bb6d2416ee41cdd8ce6c54bc66064fc5f313af39a32b428997f906c9fd4d1a0b8d60fe5d2d867b1137960b0cbe4d1
diff --git a/app-arch/xarchiver/files/xarchiver-0.5.3-add-mime-types.patch b/app-arch/xarchiver/files/xarchiver-0.5.3-add-mime-types.patch
new file mode 100644
index 000000000000..ec427b99aeee
--- /dev/null
+++ b/app-arch/xarchiver/files/xarchiver-0.5.3-add-mime-types.patch
@@ -0,0 +1,17 @@
+diff -Naur xarchiver-0.5.3.orig/xarchiver.desktop.in xarchiver-0.5.3/xarchiver.desktop.in
+--- xarchiver-0.5.3.orig/xarchiver.desktop.in 2014-05-12 01:08:12.159131913 +0000
++++ xarchiver-0.5.3/xarchiver.desktop.in 2014-05-12 01:09:02.585526393 +0000
+@@ -4,11 +4,11 @@
+ _Name=Xarchiver
+ _Comment=A GTK+2 only archive manager
+ _GenericName=Archive manager
+-Exec=xarchiver
++Exec=xarchiver %f
+ Icon=xarchiver
+ Terminal=false
+ Type=Application
+ X-MultipleArgs=false
+ Categories=GTK;Archiving;Utility;
+ StartupNotify=true
+-MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;multipart/x-zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar;
++MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-xz;application/x-xz-compressed-tar;application/x-deb;application/x-rpm;
diff --git a/app-arch/xarchiver/files/xarchiver-0.5.3-fix-password-protected.patch b/app-arch/xarchiver/files/xarchiver-0.5.3-fix-password-protected.patch
new file mode 100644
index 000000000000..00969349db01
--- /dev/null
+++ b/app-arch/xarchiver/files/xarchiver-0.5.3-fix-password-protected.patch
@@ -0,0 +1,42 @@
+diff -Naur xarchiver-0.5.3.orig/src/window.c xarchiver-0.5.2/src/window.c
+--- xarchiver-0.5.3.orig/src/window.c 2014-01-24 08:10:09.305990000 +0100
++++ xarchiver-0.5.3/src/window.c 2014-01-24 08:42:45.110729290 +0100
+@@ -1694,7 +1694,7 @@
+ {
+ if (archive->passwd == NULL)
+ {
+- archive->passwd = xa_create_password_dialog(NULL);
++ archive->passwd = xa_create_password_dialog(archive);
+ if ( archive->passwd == NULL)
+ {
+ gtk_drag_finish (dc,FALSE,FALSE,t);
+@@ -2702,9 +2702,12 @@
+
+ if (entry->is_encrypted)
+ {
+- archive[idx]->passwd = xa_create_password_dialog(archive[idx]);
+ if (archive[idx]->passwd == NULL)
+- return;
++ {
++ archive[idx]->passwd = xa_create_password_dialog(archive[idx]);
++ if (archive[idx]->passwd == NULL)
++ return;
++ }
+ }
+ filename = g_strconcat(archive[idx]->tmp,"/",entry->filename,NULL);
+ if (g_file_test(filename,G_FILE_TEST_EXISTS))
+@@ -2768,8 +2771,12 @@
+ {
+ if (entry->is_encrypted)
+ {
+- if (archive->passwd == NULL)
+- return;
++ if (archive->passwd == NULL)
++ {
++ archive->passwd = xa_create_password_dialog(archive);
++ if (archive->passwd == NULL)
++ return;
++ }
+ }
+ if (archive->extraction_path)
+ {
diff --git a/app-arch/xarchiver/files/xarchiver-0.5.3-fix-rpm-support.patch b/app-arch/xarchiver/files/xarchiver-0.5.3-fix-rpm-support.patch
new file mode 100644
index 000000000000..cf17ff7385cb
--- /dev/null
+++ b/app-arch/xarchiver/files/xarchiver-0.5.3-fix-rpm-support.patch
@@ -0,0 +1,86 @@
+diff -Naur xarchiver-0.5.3.orig/src/rpm.c xarchiver-0.5.3/src/rpm.c
+--- xarchiver-0.5.3.orig/src/rpm.c 2014-02-09 16:26:24.000000000 +0100
++++ xarchiver-0.5.3/src/rpm.c 2014-02-19 07:54:27.744136749 +0100
+@@ -23,8 +23,11 @@
+
+ void xa_open_rpm (XArchive *archive)
+ {
++ unsigned char bytes[8];
+ unsigned short int i;
+- int response;
++ int dl,il,sigsize,offset,response;
++ gchar *ibs,*executable;
++ gchar *gzip_tmp = NULL;
+ GSList *list = NULL;
+ FILE *stream;
+ gboolean result;
+@@ -53,14 +56,68 @@
+ archive->column_types[i] = types[i];
+
+ xa_create_liststore (archive,names);
++ if (fseek ( stream, 104 , SEEK_CUR ) )
++ {
++ fclose (stream);
++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek to position 104:"),g_strerror(errno));
++ return;
++ }
++ if ( fread ( bytes, 1, 8, stream ) == 0 )
++ {
++ fclose ( stream );
++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno));
++ return;
++ }
++ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3];
++ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7];
++ sigsize = 8 + 16 * il + dl;
++ offset = 104 + sigsize + ( 8 - ( sigsize % 8 ) ) % 8 + 8;
++ if (fseek ( stream, offset , SEEK_SET ) )
++ {
++ fclose (stream);
++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek in file:"),g_strerror(errno));
++ return;
++ }
++ if ( fread ( bytes, 1, 8, stream ) == 0 )
++ {
++ fclose ( stream );
++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno));
++ return;
++ }
++ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3];
++ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7];
++ sigsize = 8 + 16 * il + dl;
++ offset = offset + sigsize;
++ fclose (stream);
+
+ /* Create a unique temp dir in /tmp */
+ result = xa_create_temp_directory (archive);
+ if (!result)
+ return;
+
++ gzip_tmp = g_strconcat (archive->tmp,"/file.gz_bz",NULL);
++ ibs = g_strdup_printf ( "%u" , offset );
++
+ /* Now I run dd to have the bzip2 / gzip compressed cpio archive in /tmp */
+- gchar *command = g_strconcat ( "sh -c \"rpm2cpio ",archive->escaped_path," > ",archive->tmp, "/file.cpio\"",NULL);
++ gchar *command = g_strconcat ( "dd if=",archive->escaped_path," ibs=",ibs," skip=1 of=",gzip_tmp,NULL);
++ g_free (ibs);
++ list = g_slist_append(list,command);
++ batch_mode = TRUE;
++ result = xa_run_command (archive,list);
++ if (result == FALSE)
++ {
++ g_free (gzip_tmp);
++ return;
++ }
++ if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_GZIP)
++ executable = "gzip -dc ";
++ else if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_BZIP2)
++ executable = "bzip2 -dc ";
++ else
++ executable = "xz -dc ";
++
++ command = g_strconcat("sh -c \"",executable,gzip_tmp," > ",archive->tmp,"/file.cpio\"",NULL);
++ g_free(gzip_tmp);
+ list = NULL;
+ list = g_slist_append(list,command);
+ result = xa_run_command (archive,list);
diff --git a/app-arch/xarchiver/metadata.xml b/app-arch/xarchiver/metadata.xml
new file mode 100644
index 000000000000..90fb5bcceaae
--- /dev/null
+++ b/app-arch/xarchiver/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xfce@gentoo.org</email>
+ <name>XFCE Team</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">xarchiver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/xarchiver/xarchiver-0.5.4.ebuild b/app-arch/xarchiver/xarchiver-0.5.4.ebuild
new file mode 100644
index 000000000000..a2f5d8accf87
--- /dev/null
+++ b/app-arch/xarchiver/xarchiver-0.5.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit xfconf
+
+DESCRIPTION="a GTK+ based and advanced archive manager that can be used with Thunar"
+HOMEPAGE="http://xarchiver.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+RDEPEND=">=dev-libs/glib-2
+ >=x11-libs/gtk+-2.24:2"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup() {
+ PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.3-add-mime-types.patch
+ "${FILESDIR}"/${PN}-0.5.3-fix-password-protected.patch
+ "${FILESDIR}"/${PN}-0.5.3-fix-rpm-support.patch
+ )
+
+ XFCONF=(
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS ChangeLog README TODO )
+}
+
+src_prepare() {
+ sed -e '/COPYING/d' -e '/NEWS/d' -i doc/Makefile.in || die
+ xfconf_src_prepare
+}
+
+src_install() {
+ xfconf_src_install DOCDIR="${ED}/usr/share/doc/${PF}"
+}
+
+pkg_postinst() {
+ xfconf_pkg_postinst
+ elog "You need external programs for some formats, including:"
+ elog "7zip - app-arch/p7zip"
+ elog "arj - app-arch/unarj app-arch/arj"
+ elog "lha - app-arch/lha"
+ elog "lzop - app-arch/lzop"
+ elog "rar - app-arch/unrar app-arch/rar"
+ elog "zip - app-arch/unzip app-arch/zip"
+}
diff --git a/app-arch/xdms/Manifest b/app-arch/xdms/Manifest
new file mode 100644
index 000000000000..cbc9f6ebfa9e
--- /dev/null
+++ b/app-arch/xdms/Manifest
@@ -0,0 +1 @@
+DIST xdms-1.3.2.tar.bz2 43010 SHA256 367ec4f02dd6a3a225b4338ea7b961b87fb144f7388b2ea1eb3a5593fc53f47e SHA512 e29dd1d2373c635ba953ef526849e0b8fa645a0da91fff3a3512ce26eee43fb2c1280f27fae0a42a4fd47106494d6e44c5684eff3581661e538780927b851cac WHIRLPOOL 1dd14c88b29f8f6dd7dc3e72321d654f47287b61b47509d4b5ce56d9ee98f5e55b8a0287ff5fcca51a6c4b74a48e749a6aa7eaefe7f9ef8ee8ce39de2029eda6
diff --git a/app-arch/xdms/metadata.xml b/app-arch/xdms/metadata.xml
new file mode 100644
index 000000000000..123069e44581
--- /dev/null
+++ b/app-arch/xdms/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Supports decompression of files compressed using all known DMS compression modes, including old and obsolete ones, and also encrypted files, for 100% compatibility.
+ Can test DMS files integrity, view file informations and show attached Banners and FILEID.DIZ .
+ Can generate standard disk images and compressed disk images, using gzip, if you want to store your files in ADF or ADZ formats.
+ Can extract the files contained inside the DMS archives, if the compressed disk is an AmigaDOS disk, using readdisk made by Bernd Schmidt.
+ Can process multiple files in batch with a single command, and also use stdin and stdout for input and output of data.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-arch/xdms/xdms-1.3.2.ebuild b/app-arch/xdms/xdms-1.3.2.ebuild
new file mode 100644
index 000000000000..14424a2e4edc
--- /dev/null
+++ b/app-arch/xdms/xdms-1.3.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="xDMS - Amiga DMS disk image decompressor"
+HOMEPAGE="http://zakalwe.fi/~shd/foss/xdms"
+SRC_URI="http://zakalwe.fi/~shd/foss/xdms/${P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ sed -i -e 's:COPYING::' "${S}"/Makefile.in
+}
+
+src_compile() {
+ ./configure --prefix=/usr --package-prefix="${D}" \
+ || die "configure failed."
+ emake CC="$(tc-getCC)" || die "emake failed."
+}
+
+src_install() {
+ emake install || die "emake install failed."
+ prepalldocs
+}
diff --git a/app-arch/xz-utils/Manifest b/app-arch/xz-utils/Manifest
new file mode 100644
index 000000000000..4366d52486ed
--- /dev/null
+++ b/app-arch/xz-utils/Manifest
@@ -0,0 +1,5 @@
+DIST xz-5.0.5.tar.gz 1305685 SHA256 5dcffe6a3726d23d1711a65288de2e215b4960da5092248ce63c99d50093b93a SHA512 dc36f305bc2abf97da8c86e44b661d9ac2d5ed58e89e83f007f49e0d7cf4871d7b6defa51b9348d3f725793517f7ac47de572f6d23212e074c32032dd8357772 WHIRLPOOL 7e95d6d064239ebe6f1231ec8a5a1390e3c5d71863d7e8d1339bed5f20255d750e3f9df953ed7e95ae2b43607aab93747a5a2d948e4bb6745d3adcf7ea25c455
+DIST xz-5.0.7.tar.gz 1317771 SHA256 f4d2165553b9d0d82fd08bc2eacddeb48ebeb862a5686a603f8c044a2e52c93f SHA512 dc2716c2a5d8c8cec0e7034c5dbb8d745196f4e6c8344d5ff164e20fc284d703a93a75d8a062215a2c613f19152d6b996807baf5b7c0e7ff20a5b865d6466ed8 WHIRLPOOL b9b1ce8c1374211e56f0b5a70d35e3ce6e3431d4ddfd45f01f97f44c932b3b372d7b9314d2d024ac51d8e3dd3c997ccedde366cee68a3d5e2dac6d61d7a7d681
+DIST xz-5.0.8.tar.gz 1329117 SHA256 cac71b31ed322a487f1da1f10dfcf47f8855f97ff2c23b92680c7ae7be58babb SHA512 402079001c280e0e957d666da724158b134fd0b17320c4c387413dd2cc88400ea0a7f88819e06de3b35d864f51cb3e3a50495265382cabd6c1080920b4c70847 WHIRLPOOL d8a5748ef85000e81d535a98448fbf4198c59da7183fa8e25d5311b0e122f8b9342d706fceb1a6151a1b40a2a4bc264d4e799c65a89dd5ed80d1fbebf29e5049
+DIST xz-5.2.0.tar.gz 1445562 SHA256 231ef369982240bb20ed7cffa52bb12a4a297ce6871f480ab85e8a7ba98bf3d6 SHA512 dc272d4f8d437bfe22ed75355fcd647018a2514e4b011552c913074c0ae7d306ae2a20f3227895ea8123918088d826b2c5595dc15ba6ba2d8062e780d8707a28 WHIRLPOOL a629c42215c5c8ee366d757a4a08ecf9773aea3422f8c51cf8dffcb74edaab4fa3f760a7a3c11e85564b3a2d6154e06f9a76afc460c1120406539233254caa9e
+DIST xz-5.2.1.tar.gz 1454491 SHA256 b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681 SHA512 61d059c51c7cdbab803d006ee47b0be116fd6ba4ba05b9234c43c8b1d8b0021b44735c1335a911a4bccb8543548563cef16dafd7d76dd8ef6c4f763fc023afc2 WHIRLPOOL d4d90f7230c0880c1c392a2767c398510a69e24c18f5c5947472e108902aebb6e94aad0245f16720c60729a7a50199fb4250ae3f6801a0cc25086e7858c55d19
diff --git a/app-arch/xz-utils/metadata.xml b/app-arch/xz-utils/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/app-arch/xz-utils/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild b/app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild
new file mode 100644
index 000000000000..4157eeffabd9
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/xz-utils/xz-utils-5.0.7.ebuild b/app-arch/xz-utils/xz-utils-5.0.7.ebuild
new file mode 100644
index 000000000000..f73bba31ba1d
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.0.7.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/xz-utils/xz-utils-5.0.8.ebuild b/app-arch/xz-utils/xz-utils-5.0.8.ebuild
new file mode 100644
index 000000000000..d736bdbfc8b3
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.0.8.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/xz-utils/xz-utils-5.2.0.ebuild b/app-arch/xz-utils/xz-utils-5.2.0.ebuild
new file mode 100644
index 000000000000..f73bba31ba1d
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.2.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/xz-utils/xz-utils-5.2.1-r1.ebuild b/app-arch/xz-utils/xz-utils-5.2.1-r1.ebuild
new file mode 100644
index 000000000000..7c2bae60b2a5
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.2.1-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="elibc_FreeBSD nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/xz-utils/xz-utils-9999.ebuild b/app-arch/xz-utils/xz-utils-9999.ebuild
new file mode 100644
index 000000000000..da8e29b44d4d
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs libtool multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://git.tukaani.org/xz.git"
+ inherit git-2 autotools
+ SRC_URI=""
+ EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
+else
+ MY_P="${PN/-utils}-${PV/_}"
+ SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ S=${WORKDIR}/${MY_P}
+ EXTRA_DEPEND=
+fi
+
+DESCRIPTION="utils for managing LZMA compressed files"
+HOMEPAGE="http://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="elibc_FreeBSD nls static-libs +threads"
+
+RDEPEND="!<app-arch/lzma-4.63
+ !app-arch/lzma-utils
+ !<app-arch/p7zip-4.57"
+DEPEND="${RDEPEND}
+ ${EXTRA_DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautopoint
+ eautoreconf
+ else
+ elibtoolize # to allow building shared libs on Solaris/x64
+ fi
+}
+
+multilib_src_configure() {
+ use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/xz/COPYING* || die
+ mv "${ED}"/usr/share/doc/{xz,${PF}} || die
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
diff --git a/app-arch/zip/Manifest b/app-arch/zip/Manifest
new file mode 100644
index 000000000000..feb2ba6fad98
--- /dev/null
+++ b/app-arch/zip/Manifest
@@ -0,0 +1,2 @@
+DIST zip232.tar.gz 807180 SHA256 d0d3743f732a9baa162f80d0c4567b9c545b41a3385825042113810f2a56eb2f SHA512 706646115440597f361b77569ef0301a72c4c990ace5053d4c3b730f20ba0f08af2a8c4fe27c4df5808649cad52d477a6e36e731e82057d6b426a3983836fde2 WHIRLPOOL 3bf33c495c004089c06a17e4146b9542f21fdef6ee45368d9891893d84101ee62e0ca3190ce9eb318a5f1e02f8f4d94bcf361b90350190584d5e28833ffeb8da
+DIST zip30.zip 1287223 SHA256 7061ceac0407682b6dc54bb480347205f680f4e56cf34fe1423df2309f18968a SHA512 642ea6768d79adc1499251a3fb7bfc7ddc8d708699cbf9e0cfe849deda94165cb93e21dc2606bea1166ae5d8531e1e2cb056a7246bf2ab86ea7587bd4712d8d8 WHIRLPOOL 9e25cd9bcc25645667438019ab3423056a43b62d137c176e7aabad4ed8b7f7ddf6a7ccdedd9ada848c22d33b7f50f442910c39c4b2a5a188ad872109519cae7f
diff --git a/app-arch/zip/files/zip-2.3-unix_configure-pic.patch b/app-arch/zip/files/zip-2.3-unix_configure-pic.patch
new file mode 100644
index 000000000000..45b137b0ed85
--- /dev/null
+++ b/app-arch/zip/files/zip-2.3-unix_configure-pic.patch
@@ -0,0 +1,12 @@
+--- unix/configure.orig 2004-09-28 06:45:33.000000000 +0000
++++ unix/configure 2004-09-28 06:54:53.000000000 +0000
+@@ -29,6 +29,9 @@
+
+ echo Check if we can use asm code
+ OBJA=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :
diff --git a/app-arch/zip/files/zip-2.31-exec-stack.patch b/app-arch/zip/files/zip-2.31-exec-stack.patch
new file mode 100644
index 000000000000..d3efbd902cb1
--- /dev/null
+++ b/app-arch/zip/files/zip-2.31-exec-stack.patch
@@ -0,0 +1,20 @@
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/app-arch/zip/files/zip-2.32-build.patch b/app-arch/zip/files/zip-2.32-build.patch
new file mode 100644
index 000000000000..61a2bae34b3f
--- /dev/null
+++ b/app-arch/zip/files/zip-2.32-build.patch
@@ -0,0 +1,89 @@
+respect build environment settings
+
+--- zip/unix/Makefile
++++ zip/unix/Makefile
+@@ -12,15 +12,15 @@
+
+ list: all
+
+-MAKE = make -f unix/Makefile
++MAKE := $(MAKE) -f unix/Makefile
+ SHELL = /bin/sh
+ LN = ln -s
+
+ # (to use the Gnu compiler, change cc to gcc in CC)
+-CC = cc
++CC ?= gcc
+ BIND = $(CC)
+ AS = $(CC) -c
+-CPP = /lib/cpp
++CPP ?= $(CC)
+ EXE =
+
+ # probably can change this to 'install' if you have it
+@@ -47,7 +47,7 @@
+ # LFLAGS1 flags after output file spec, before obj file list
+ # LFLAGS2 flags after obj file list (libraries, etc)
+ CFLAGS_NOOPT = -I. -DUNIX $(LOCAL_ZIP)
+-CFLAGS = -O2 $(CFLAGS_NOOPT)
++CFLAGS ?= -O2 $(CFLAGS_NOOPT)
+ LFLAGS1 =
+ LFLAGS2 = -s
+
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -13,52 +13,13 @@
+
+ CC=${1-cc}
+-CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=""
++CFLAGS="${2--I. -DUNIX} ${CFLAGS} ${CPPFLAGS}"
++LFLAGS1="${LDFLAGS}"
+ LN="ln -s"
+-echo "Check C compiler type (optimization option)"
+-cat > conftest.c << _EOF_
+-int main()
+-{
+-#ifndef __SUNPRO_C
+- bad code
+-#endif
+- return 0;
+-}
+-_EOF_
+-$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+-if test $? -eq 0; then
+- echo ' Sun C (-xO3)'
+- CFLAGS="${CFLAGS} -xO3"
+-else
+- cat > conftest.c << _EOF_
+-int main()
+-{
+-#ifndef __DECC
+- bad code
+-#endif
+- return 0;
+-}
+-_EOF_
+- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+- if test $? -eq 0; then
+- echo ' DEC C (-O3)'
+- CFLAGS="${CFLAGS} -O3"
+- else
+- echo ' Other (gcc?) (-O2)'
+- CFLAGS="${CFLAGS} -O2"
+- fi
+-fi
+
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+ # solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/app-arch/zip/files/zip-3.0-build.patch b/app-arch/zip/files/zip-3.0-build.patch
new file mode 100644
index 000000000000..595303cc48d4
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-build.patch
@@ -0,0 +1,36 @@
+respect build environment settings
+
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -18,7 +18,7 @@
+
+ CC=${1-cc}
+ CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=''
++LFLAGS1="${LDFLAGS}"
+ LFLAGS2=''
+ LN="ln -s"
+
+@@ -118,7 +118,7 @@ _EOF_
+ fi
+
+ # optimization flags
+-if test -n "${CFLAGS_OPT}"; then
++if false; then
+ CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
+ CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
+ fi
+@@ -220,13 +220,6 @@ fi
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+-# solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/app-arch/zip/files/zip-3.0-exec-stack.patch b/app-arch/zip/files/zip-3.0-exec-stack.patch
new file mode 100644
index 000000000000..80719c961298
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-exec-stack.patch
@@ -0,0 +1,22 @@
+add proper GNU stack markings so we dont get the default: executable
+
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/app-arch/zip/files/zip-3.0-format-security.patch b/app-arch/zip/files/zip-3.0-format-security.patch
new file mode 100644
index 000000000000..1edc2d6a1b88
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-format-security.patch
@@ -0,0 +1,20 @@
+--- zip.c
++++ zip.c
+@@ -1028,7 +1028,7 @@
+
+ for (i = 0; i < sizeof(text)/sizeof(char *); i++)
+ {
+- printf(text[i]);
++ fputs(text[i], stdout);
+ putchar('\n');
+ }
+ #ifdef DOS
+@@ -1225,7 +1225,7 @@
+ CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
+ for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
+ {
+- printf(cryptnote[i]);
++ fputs(cryptnote[i], stdout);
+ putchar('\n');
+ }
+ ++i; /* crypt support means there IS at least one compilation option */
diff --git a/app-arch/zip/files/zip-3.0-natspec.patch b/app-arch/zip/files/zip-3.0-natspec.patch
new file mode 100644
index 000000000000..1dfce09d1331
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-natspec.patch
@@ -0,0 +1,214 @@
+This patch makes zip use libnatspec to recode file names is national charset.
+Initially this patch was written for altlinux:
+http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches
+
+Later it was a bit improved and improved version was posted here (in Russian):
+http://www.opennet.ru/tips/info/2494.shtml
+
+Also I've added natspec support to output of zipnote (thank vapier for notice).
+
+Gentoo reference:
+https://bugs.gentoo.org/show_bug.cgi?id=275244
+
+--
+pva@gentoo.org
+
+=== modified file 'fileio.c'
+--- fileio.c 2010-12-22 13:02:43 +0000
++++ fileio.c 2010-12-22 13:03:00 +0000
+@@ -929,7 +929,7 @@
+ }
+ if ((zname = in2ex(iname)) == NULL)
+ return ZE_MEM;
+-#ifdef UNICODE_SUPPORT
++#if defined(UNICODE_SUPPORT) && !defined(UNIX)
+ /* Convert name to display or OEM name */
+ oname = local_to_display_string(iname);
+ #else
+
+=== modified file 'globals.c'
+--- globals.c 2010-12-22 13:02:43 +0000
++++ globals.c 2010-12-22 13:03:00 +0000
+@@ -32,7 +32,7 @@
+ int scanimage = 1; /* 1=scan through image files */
+ #endif
+ int method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */
+-int dosify = 0; /* 1=make new entries look like MSDOS */
++int dosify = 1; /* 1=make new entries look like MSDOS */
+ int verbose = 0; /* 1=report oddities in zip file structure */
+ int fix = 0; /* 1=fix the zip file, 2=FF, 3=ZipNote */
+ int filesync = 0; /* 1=file sync, delete entries not on file system */
+
+=== modified file 'unix/Makefile'
+--- unix/Makefile 2010-12-22 13:02:43 +0000
++++ unix/Makefile 2010-12-22 15:43:40 +0000
+@@ -38,7 +38,7 @@
+ MANFLAGS = 644
+
+ # target directories - where to install executables and man pages to
+-prefix = /usr/local
++prefix = /usr
+ BINDIR = $(prefix)/bin
+ MANEXT=1
+ MANDIR = $(prefix)/man/man$(MANEXT)
+@@ -61,6 +61,7 @@
+ CFLAGS = -O2 $(CFLAGS_NOOPT)
+ LFLAGS1 =
+ LFLAGS2 = -s
++LDADD = -lnatspec
+
+ # object file lists
+ OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
+@@ -125,9 +126,9 @@
+ zipsman: $(ZIPS) $(ZIPMANUALs)
+
+ zip$E: $(OBJZ) $(OBJI) $(OBJA) $(LIB_BZ)
+- $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
++ $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) $(LDADD)
+ zipnote$E: $(OBJN)
+- $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
++ $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) $(LDADD)
+ zipcloak$E: $(OBJC) $(OCRCTB)
+ $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
+ zipsplit$E: $(OBJS)
+
+=== modified file 'unix/osdep.h'
+--- unix/osdep.h 2010-12-22 13:02:43 +0000
++++ unix/osdep.h 2010-12-22 15:45:29 +0000
+@@ -78,3 +78,6 @@
+ #if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
+ # define USE_EF_UT_TIME
+ #endif
++
++/* Set Windows code as archive type */
++# define OS_CODE 0xb00
+
+=== modified file 'unix/unix.c'
+--- unix/unix.c 2010-12-22 13:02:43 +0000
++++ unix/unix.c 2010-12-22 13:03:00 +0000
+@@ -14,6 +14,11 @@
+
+ #include <time.h>
+
++#ifdef UNIX
++# include <natspec.h>
++# include <locale.h>
++#endif
++
+ #if defined(MINIX) || defined(__mpexl)
+ # ifdef S_IWRITE
+ # undef S_IWRITE
+@@ -60,6 +65,7 @@
+
+ /* Local functions */
+ local char *readd OF((DIR *));
++local const char *oem_charset = NULL;
+
+
+ #ifdef NO_DIR /* for AT&T 3B1 */
+@@ -262,6 +268,16 @@
+ if (!pathput)
+ t = last(t, PATH_END);
+
++#ifdef UNIX
++ if (!oem_charset) {
++ setlocale(LC_CTYPE, "");
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ }
++ /* Convert to internal encoding */
++ if ((n = natspec_convert(t, oem_charset, 0, 0)) == NULL)
++ return NULL;
++ return n;
++#else
+ /* Malloc space for internal name and copy it */
+ if ((n = malloc(strlen(t) + 1)) == NULL)
+ return NULL;
+@@ -269,6 +285,7 @@
+
+ if (dosify)
+ msname(n);
++#endif
+
+ #ifdef EBCDIC
+ strtoasc(n, n); /* here because msname() needs native coding */
+@@ -289,8 +306,19 @@
+ {
+ char *x; /* external file name */
+
++#ifdef UNIX
++ if (!oem_charset) {
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ setlocale(LC_CTYPE, "");
++ }
++ /* Convert to internal encoding */
++ if ((x = natspec_convert(n, 0, oem_charset, 0)) == NULL)
++ return NULL;
++ return x;
++#else
+ if ((x = malloc(strlen(n) + 1 + PAD)) == NULL)
+ return NULL;
++#endif
+ #ifdef EBCDIC
+ strtoebc(x, n);
+ #else
+
+=== modified file 'zip.c'
+--- zip.c 2010-12-22 13:02:43 +0000
++++ zip.c 2010-12-22 13:03:00 +0000
+@@ -2025,6 +2025,7 @@
+ #endif /* ?MACOS */
+ {"J", "junk-sfx", o_NO_VALUE, o_NOT_NEGATABLE, 'J', "strip self extractor from archive"},
+ {"k", "DOS-names", o_NO_VALUE, o_NOT_NEGATABLE, 'k', "force use of 8.3 DOS names"},
++ {"K", "no DOS-names",o_NO_VALUE, o_NOT_NEGATABLE, 'K', "no use 8.3 DOS names"},
+ {"l", "to-crlf", o_NO_VALUE, o_NOT_NEGATABLE, 'l', "convert text file line ends - LF->CRLF"},
+ {"ll", "from-crlf", o_NO_VALUE, o_NOT_NEGATABLE, o_ll, "convert text file line ends - CRLF->LF"},
+ {"lf", "logfile-path",o_REQUIRED_VALUE, o_NOT_NEGATABLE, o_lf, "log to log file at path (default overwrite)"},
+@@ -2289,7 +2290,7 @@
+ dispose = 0; /* 1=remove files after put in zip file */
+ pathput = 1; /* 1=store path with name */
+ method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */
+- dosify = 0; /* 1=make new entries look like MSDOS */
++ dosify = 1; /* 1=make new entries look like MSDOS */
+ verbose = 0; /* 1=report oddities in zip file structure */
+ fix = 0; /* 1=fix the zip file */
+ adjust = 0; /* 1=adjust offsets for sfx'd file (keep preamble) */
+@@ -2859,6 +2860,8 @@
+ junk_sfx = 1; break;
+ case 'k': /* Make entries using DOS names (k for Katz) */
+ dosify = 1; break;
++ case 'K': /* Make entries using DOS names (K for Kompat) */
++ dosify = 0; break;
+ case 'l': /* Translate end-of-line */
+ translate_eol = 1; break;
+ case o_ll:
+
+=== modified file 'zipnote.c'
+--- zipnote.c 2010-12-22 13:02:43 +0000
++++ zipnote.c 2010-12-22 15:42:45 +0000
+@@ -21,6 +21,11 @@
+ #include "revision.h"
+ #include <signal.h>
+
++#ifdef UNIX
++# include <natspec.h>
++# include <locale.h>
++#endif
++
+ /* Calculate size of static line buffer used in write (-w) mode. */
+ #define WRBUFSIZ 2047
+ /* The line buffer size should be at least as large as FNMAX. */
+@@ -537,7 +542,13 @@
+ {
+ for (z = zfiles; z != NULL; z = z->nxt)
+ {
++#ifdef UNIX
++ char *oem_charset = NULL;
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ printf("%c %s\n", MARK, natspec_convert(z->zname, 0, oem_charset, 0));
++#else
+ printf("%c %s\n", MARK, z->zname);
++#endif
+ putclean(z->comment, z->com);
+ printf("%c%s\n", MARK, MARKE);
+ }
+
diff --git a/app-arch/zip/files/zip-3.0-no-crypt.patch b/app-arch/zip/files/zip-3.0-no-crypt.patch
new file mode 100644
index 000000000000..2858b51ec2c9
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-no-crypt.patch
@@ -0,0 +1,57 @@
+fix building when NO_CRYPT is used
+
+forward ported from zip-2.32
+
+http://bugs.gentoo.org/238398
+
+--- zip.c
++++ zip.c
+@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */
+
+ /* Key not yet specified. If needed, get/verify it now. */
+ if (key_needed) {
++#if !CRYPT
++ ZIPERR(ZE_PARMS, "encryption not supported");
++#else /* CRYPT */
+ if ((key = malloc(IZ_PWLEN+1)) == NULL) {
+ ZIPERR(ZE_MEM, "was getting encryption password");
+ }
+@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */
+ if (r) {
+ ZIPERR(ZE_PARMS, "password verification failed");
+ }
++#endif
+ }
+ if (key) {
+ /* if -P "" could get here */
+--- zipcloak.c
++++ zipcloak.c
+@@ -744,6 +744,28 @@ struct option_struct far options[] = {
+
+ int main OF((void));
+
++void zipmessage_nl(a, nl)
++ZCONST char *a;
++int nl;
++{
++}
++
++void zipmessage(a, b)
++ZCONST char *a, *b;
++{
++}
++
++int set_filetype(out_path)
++ char *out_path;
++{
++}
++
++int rename_split(temp_name, out_path)
++ char *temp_name;
++ char *out_path;
++{
++}
++
+ void zipwarn(msg1, msg2)
+ ZCONST char *msg1, *msg2;
+ {
diff --git a/app-arch/zip/files/zip-3.0-pic.patch b/app-arch/zip/files/zip-3.0-pic.patch
new file mode 100644
index 000000000000..b4c53de694f7
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-pic.patch
@@ -0,0 +1,15 @@
+if our toolchain generates PIC by default, then do not use the hand written
+assembly files as none of it is PIC friendly.
+
+--- unix/configure
++++ unix/configure
+@@ -29,6 +29,9 @@
+ echo Check if we can use asm code
+ OBJA=""
+ OCRCU8=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :
diff --git a/app-arch/zip/files/zip-3.0-zipnote-freeze.patch b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
new file mode 100644
index 000000000000..cfe78f0a100a
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
@@ -0,0 +1,61 @@
+diff -dupr zip30-old/fileio.c zip30/fileio.c
+--- zip30-old/fileio.c 2008-05-28 20:13:24.000000000 +0200
++++ zip30/fileio.c 2012-06-12 17:30:29.794547493 +0200
+@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin
+ if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
+ ZIPERR(ZE_MEM, "local_to_wide_string");
+ }
+- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1);
++ wsize = mbstowcs(wc_string, local_string, wsize + 1);
+ wc_string[wsize] = (wchar_t) 0;
+
+ /* in case wchar_t is not zwchar */
+diff -dupr zip30-old/zipfile.c zip30/zipfile.c
+--- zip30/zipfile.c 2008-07-01 00:15:30.000000000 +0200
++++ zip30/zipfile.c 2012-06-10 01:59:42.571706181 +0200
+@@ -5406,6 +5406,8 @@ int putlocal(z, rewrite)
+ if (z->flg & UTF8_BIT) {
+ /* If this flag is set, then restore UTF-8 as path name */
+ use_uname = 1;
++ tempzn -= nam;
+ nam = strlen(z->uname);
++ tempzn += nam;
+ } else {
+ /* use extra field */
+ add_Unicode_Path_local_extra_field(z);
+@@ -5647,7 +5650,9 @@ int putcentral(z)
+ if (z->flg & UTF8_BIT) {
+ /* If this flag is set, then restore UTF-8 as path name */
+ use_uname = 1;
++ tempzn -= nam;
+ nam = strlen(z->uname);
++ tempzn += nam;
+ } else {
+ add_Unicode_Path_cen_extra_field(z);
+ }
+diff -dupr zip30/zipnote.c zip30/zipnote.c
+--- zip30/zipnote.c 2008-05-08 04:17:08.000000000 +0200
++++ zip30/zipnote.c 2012-06-10 02:33:36.372663528 +0200
+@@ -575,6 +575,13 @@ char **argv; /* command line
+ strcpy(z->iname, a+2);
+ #endif
+
++#ifdef UNICODE_SUPPORT
++#define UTF8_BIT (1 << 11)
++ if (using_utf8) {
++ z->uname = z->iname;
++ }
++#endif
++
+ /*
+ * Don't update z->nam here, we need the old value a little later.....
+ * The update is handled in zipcopy().
+@@ -661,7 +668,7 @@ char **argv; /* command line
+ if ((r = zipcopy(z)) != ZE_OK)
+ ziperr(r, "was copying an entry");
+ }
+- fclose(x);
++ fclose(in_file);
+
+ /* Write central directory and end of central directory with new comments */
+ if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */
diff --git a/app-arch/zip/metadata.xml b/app-arch/zip/metadata.xml
new file mode 100644
index 000000000000..87a70240b179
--- /dev/null
+++ b/app-arch/zip/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <longdescription>Application that supports the Info Zip series of encryption.</longdescription>
+ <use>
+ <flag name="natspec">Use <pkg>dev-libs/libnatspec</pkg> to correctly decode non-ascii file names archived in Windows.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">infozip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/zip/zip-2.32-r1.ebuild b/app-arch/zip/zip-2.32-r1.ebuild
new file mode 100644
index 000000000000..51a3bc2cacf7
--- /dev/null
+++ b/app-arch/zip/zip-2.32-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs eutils flag-o-matic
+
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="ftp://ftp.info-zip.org/pub/infozip/src/zip${PV//.}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="crypt"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/zip-2.3-unix_configure-pic.patch
+ epatch "${FILESDIR}"/${PN}-2.31-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-2.32-build.patch
+}
+
+src_compile() {
+ tc-export CC CPP
+ use crypt || append-flags -DNO_CRYPT
+ append-lfs-flags
+ emake -f unix/Makefile generic || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip.1
+ dosym zip.1 /usr/share/man/man1/zipnote.1
+ dosym zip.1 /usr/share/man/man1/zipsplit.1
+ if use crypt ; then
+ dobin zipcloak || die
+ dosym zip.1 /usr/share/man/man1/zipcloak.1
+ fi
+ dodoc BUGS CHANGES MANUAL README TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r1.ebuild b/app-arch/zip/zip-3.0-r1.ebuild
new file mode 100644
index 000000000000..6297c7cdb7c9
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_compile() {
+ use bzip2 || append-flags -DNO_BZIP2_SUPPORT
+ use crypt || append-flags -DNO_CRYPT
+ use unicode || append-flags -DNO_UNICODE_SUPPORT
+ emake \
+ CC="$(tc-getCC)" \
+ LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" \
+ -f unix/Makefile generic \
+ || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak || die
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r2.ebuild b/app-arch/zip/zip-3.0-r2.ebuild
new file mode 100644
index 000000000000..2547eca56685
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_configure() {
+ append-cppflags \
+ -DLARGE_FILE_SUPPORT \
+ -DUIDGID_NOT_16BIT \
+ -D$(usex bzip2 '' NO)BZIP2_SUPPORT \
+ -D$(usex crypt '' NO)CRYPT \
+ -D$(usex unicode '' NO)UNICODE_SUPPORT
+ # Third arg disables bzip2 logic as we handle it ourselves above.
+ sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die
+ if use bzip2 ; then
+ sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CPP="$(tc-getCPP)" \
+ -f unix/Makefile generic
+}
+
+src_install() {
+ dobin zip zipnote zipsplit
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r3.ebuild b/app-arch/zip/zip-3.0-r3.ebuild
new file mode 100644
index 000000000000..0c7e6d185c00
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${P}-pic.patch
+ epatch "${FILESDIR}"/${P}-exec-stack.patch #122849
+ epatch "${FILESDIR}"/${P}-build.patch #200995
+ epatch "${FILESDIR}"/${P}-zipnote-freeze.patch #322047
+ epatch "${FILESDIR}"/${P}-format-security.patch #512414
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_configure() {
+ append-cppflags \
+ -DLARGE_FILE_SUPPORT \
+ -DUIDGID_NOT_16BIT \
+ -D$(usex bzip2 '' NO)BZIP2_SUPPORT \
+ -D$(usex crypt '' NO)CRYPT \
+ -D$(usex unicode '' NO)UNICODE_SUPPORT
+ # Third arg disables bzip2 logic as we handle it ourselves above.
+ sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die
+ if use bzip2 ; then
+ sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CPP="$(tc-getCPP)" \
+ -f unix/Makefile generic
+}
+
+src_install() {
+ dobin zip zipnote zipsplit
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0.ebuild b/app-arch/zip/zip-3.0.ebuild
new file mode 100644
index 000000000000..cc674c2b956a
--- /dev/null
+++ b/app-arch/zip/zip-3.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="bzip2 crypt unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+}
+
+src_compile() {
+ use bzip2 || append-flags -DNO_BZIP2_SUPPORT
+ use crypt || append-flags -DNO_CRYPT
+ use unicode || append-flags -DNO_UNICODE_SUPPORT
+ emake \
+ CC="$(tc-getCC)" \
+ LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" \
+ -f unix/Makefile generic \
+ || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak || die
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zoo/Manifest b/app-arch/zoo/Manifest
new file mode 100644
index 000000000000..7024a3ea8c55
--- /dev/null
+++ b/app-arch/zoo/Manifest
@@ -0,0 +1,2 @@
+DIST zoo-2.10-gcc-issues-fix.patch 19467 SHA256 0215efd7aa218048f5f8bc085810f89cad6a9f710234f0d0e93be959a02f582b SHA512 a5b5e857b3d38633224ca8a28717cb529a11a2e66ca974fb9b7e326d18443657439b88b4af4867492399813845496dc0812a7e07885b01116e0163416562ce3c WHIRLPOOL dcf18afbfb097e4edf35dd0b9a10f8253c949d0017ad4c26b7bf3f0acfaa090bc32a3d06e5fa55960073baa06b6d4a8721674a355a060d31ee6acf32c13ec247
+DIST zoo-2.10pl1.tar.gz 172096 SHA256 ad8d8fee5e524aca0e1e9a1e431c21cd59943d8373d5dffe4edca03a7e4284f4 SHA512 cf69b15020ebcbd10bda19967a52ac6f8fe09dc598e8034b82449c50f4c5000571a5be284452f5e7801d134e1581f8f9e871fbef65518dc9c69a77fb536f2c12 WHIRLPOOL 430fe2bd185dc1845afd36426966d0c29a2df5495d6c5c8e3092de5da48a77b781430cf95c93467826da03b646ab4641b881c5bacd4e6e763cb409dcbcf11762
diff --git a/app-arch/zoo/files/zoo-2.10-CAN-2005-2349.patch b/app-arch/zoo/files/zoo-2.10-CAN-2005-2349.patch
new file mode 100644
index 000000000000..3752728c8e5a
--- /dev/null
+++ b/app-arch/zoo/files/zoo-2.10-CAN-2005-2349.patch
@@ -0,0 +1,36 @@
+Taken from Fedora
+
+--- portable.c
++++ portable.c
+@@ -364,6 +364,31 @@
+ show_dir(direntry);
+ }
+ #endif
++ char *p;
++ /* take off '../' */
++ while ((p = strstr( direntry->dirname, "../" )) != NULL) {
++ while (*(p+3) != '\0') {
++ *p = *(p + 3);
++ p++;
++ }
++ *p = *(p+3); /* move last null */
++ //printf("zoo: skipped \"../\" path component in '%s'\n", direntry->dirname);
++ }
++ /* take off '/' */
++ if ( direntry->dirname[0] == '/' ) {
++ p = direntry->dirname;
++ while (*p != '\0') {
++ *p = *(p + 1);
++ p++;
++ }
++ *p = *(p+1); /* move last null */
++ //printf("zoo: skipped \"/\" path component in '%s'\n", direntry->dirname);
++ }
++ /* take off '..' */
++ if(!strcmp(direntry->dirname, ".."))
++ direntry->dirname[0] = '\0';
++ /* direntry->dirlen = strlen(direntry->dirname); */
++
+ return (0);
+ }
+
diff --git a/app-arch/zoo/files/zoo-2.10-febz-183426.patch b/app-arch/zoo/files/zoo-2.10-febz-183426.patch
new file mode 100644
index 000000000000..d8e34d628094
--- /dev/null
+++ b/app-arch/zoo/files/zoo-2.10-febz-183426.patch
@@ -0,0 +1,16 @@
+Taken from Fedora
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=183426
+http://bugs.gentoo.org/125622
+
+--- zoo/parse.c
++++ zoo/parse.c
+@@ -39,7 +39,7 @@
+ char *namep; /* points to relevant part of tempname */
+
+ char *p;
+- strcpy (tempname, fname);
++ strncpy(tempname, fname, LFNAMESIZE);
+
+ #ifdef DEBUG
+ printf ("parse: supplied name is [%s].\n", tempname);
diff --git a/app-arch/zoo/files/zoo-2.10-gentoo-fbsd.patch b/app-arch/zoo/files/zoo-2.10-gentoo-fbsd.patch
new file mode 100644
index 000000000000..64eabaf40586
--- /dev/null
+++ b/app-arch/zoo/files/zoo-2.10-gentoo-fbsd.patch
@@ -0,0 +1,25 @@
+--- sysv.c 2007-06-16 15:01:53 +0200
++++ sysv.c.new 2007-06-16 14:38:38 +0200
+@@ -63,8 +63,8 @@
+ return (fname); /* default is no-op */
+ }
+
+-extern long timezone; /* defined by library routine */
+-long time ();
++/*extern long timezone; defined by library routine */
++/* long time (); */
+ struct tm *localtime ();
+
+ /* Function gettz(), returns the offset from GMT in seconds of the
+--- zoo.h 2007-06-16 15:01:53 +0200
++++ zoo.h.new 2007-06-16 14:57:58 +0200
+@@ -95,6 +95,9 @@
+ #endif
+
+ typedef unsigned char uchar;
++typedef unsigned int uint;
++typedef unsigned long ulong;
++typedef unsigned short ushort;
+
+ /* WARNING: Static initialization in zooadd.c or zooext.c depends on the
+ order of fields in struct zoo_header */ \ No newline at end of file
diff --git a/app-arch/zoo/files/zoo-2.10-multiple-dos-fix.patch b/app-arch/zoo/files/zoo-2.10-multiple-dos-fix.patch
new file mode 100644
index 000000000000..b37cee0c94dc
--- /dev/null
+++ b/app-arch/zoo/files/zoo-2.10-multiple-dos-fix.patch
@@ -0,0 +1,71 @@
+diff -ur zoo-2.10-r2/zooext.c zoo-2.10-r3/zooext.c
+--- zoo-2.10-r2/zooext.c 2007-05-23 23:39:14.000000000 +0200
++++ zoo-2.10-r3/zooext.c 2007-05-23 23:36:37.000000000 +0200
+@@ -89,6 +89,7 @@
+ #endif
+ struct direntry direntry; /* directory entry */
+ int first_dir = 1; /* first dir entry seen? */
++ unsigned long zoo_pointer = 0; /* Track our position in the file */
+
+ static char extract_ver[] = "Zoo %d.%d is needed to extract %s.\n";
+ static char no_space[] = "Insufficient disk space to extract %s.\n";
+@@ -169,6 +170,9 @@
+ exit_status = 1;
+ }
+ zooseek (zoo_file, zoo_header.zoo_start, 0); /* seek to where data begins */
++
++ /* Begin tracking our position in the file */
++ zoo_pointer = zoo_header.zoo_start;
+ }
+
+ #ifndef PORTABLE
+@@ -597,6 +601,11 @@
+ } /* end if */
+
+ loop_again:
++ /* Make sure we are not seeking to already processed data */
++ if (next_ptr <= zoo_pointer)
++ prterror ('f', "ZOO chain structure is corrupted\n");
++ zoo_pointer = next_ptr;
++
+ zooseek (zoo_file, next_ptr, 0); /* ..seek to next dir entry */
+ } /* end while */
+
+Nur in zoo-2.10-r3: zooext.c~.
+Nur in zoo-2.10-r3: zooext.c.orig.
+diff -ur zoo-2.10-r2/zoolist.c zoo-2.10-r3/zoolist.c
+--- zoo-2.10-r2/zoolist.c 1991-07-20 00:57:27.000000000 +0200
++++ zoo-2.10-r3/zoolist.c 2007-05-23 23:38:19.000000000 +0200
+@@ -92,7 +92,7 @@
+ int show_mode = 0; /* show file protection */
+ #endif
+ int first_dir = 1; /* if first direntry -- to adjust dat_ofs */
+-
++unsigned long zoo_pointer = 0; /* Track our position in the file */
+ while (*option) {
+ switch (*option) {
+ case 'a': show_name++; break;
+@@ -211,6 +211,9 @@
+ show_acmt (&zoo_header, zoo_file, 0); /* show archive comment */
+ }
+
++ /* Begin tracking our position in the file */
++ zoo_pointer = zoo_header.zoo_start;
++
+ /* Seek to the beginning of the first directory entry */
+ if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) {
+ ercount++;
+@@ -437,6 +440,11 @@
+ if (verb_list && !fast)
+ show_comment (&direntry, zoo_file, 0, (char *) NULL);
+ } /* end if (lots of conditions) */
++
++ /* Make sure we are not seeking to already processed data */
++ if (direntry.next <= zoo_pointer)
++ prterror ('f', "ZOO chain structure is corrupted\n");
++ zoo_pointer = direntry.next;
+
+ /* ..seek to next dir entry */
+ zooseek (zoo_file, direntry.next, 0);
+Nur in zoo-2.10-r3: zoolist.c~.
+Nur in zoo-2.10-r3: zoolist.c.orig.
diff --git a/app-arch/zoo/files/zoo-2.10-security_pathsize.patch b/app-arch/zoo/files/zoo-2.10-security_pathsize.patch
new file mode 100644
index 000000000000..4f89530f43e7
--- /dev/null
+++ b/app-arch/zoo/files/zoo-2.10-security_pathsize.patch
@@ -0,0 +1,23 @@
+Taken from Fedora
+
+--- misc.c
++++ misc.c
+@@ -135,11 +135,17 @@
+ char *fullpath (direntry)
+ struct direntry *direntry;
+ {
+- static char result[PATHSIZE];
++ static char result[PATHSIZE+LFNAMESIZE+12]; /* Room for enough space.*/
+ combine (result,
+ direntry->dirlen != 0 ? direntry->dirname : "",
+ (direntry->namlen != 0) ? direntry->lfname : direntry->fname
+ );
++
++ if (strlen (result) >= PATHSIZE) {
++ prterror ('f', "Combined dirname and filename too long!\n");
++ *result = '\0';
++ }
++
+ return (result);
+ }
+
diff --git a/app-arch/zoo/metadata.xml b/app-arch/zoo/metadata.xml
new file mode 100644
index 000000000000..f9d50da18d39
--- /dev/null
+++ b/app-arch/zoo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/zoo/zoo-2.10-r4.ebuild b/app-arch/zoo/zoo-2.10-r4.ebuild
new file mode 100644
index 000000000000..16e50d87379b
--- /dev/null
+++ b/app-arch/zoo/zoo-2.10-r4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Manipulate archives of files in compressed form"
+HOMEPAGE="ftp://ftp.kiarchive.ru/pub/unix/arcers"
+SRC_URI="ftp://ftp.kiarchive.ru/pub/unix/arcers/${P}pl1.tar.gz
+ mirror://gentoo/${P}-gcc-issues-fix.patch"
+
+LICENSE="zoo"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ epatch "${DISTDIR}"/${P}-gcc-issues-fix.patch
+ epatch "${FILESDIR}"/${P}-CAN-2005-2349.patch
+ epatch "${FILESDIR}"/${P}-febz-183426.patch
+ epatch "${FILESDIR}"/${P}-security_pathsize.patch
+ epatch "${FILESDIR}"/${P}-multiple-dos-fix.patch
+ epatch "${FILESDIR}"/${P}-gentoo-fbsd.patch
+}
+
+src_compile() {
+ # emake no workie on FreeBSD
+ make CC="$(tc-getCC)" linux || die
+}
+
+src_install() {
+ dobin zoo fiz || die
+ doman zoo.1 fiz.1
+}
diff --git a/app-arch/zopfli/Manifest b/app-arch/zopfli/Manifest
new file mode 100644
index 000000000000..991ccb4f9fd4
--- /dev/null
+++ b/app-arch/zopfli/Manifest
@@ -0,0 +1,3 @@
+DIST zopfli-1.0.0.zip 57873 SHA256 e20d73b56620285e6cce5b510d8e5da6835a81940e48cdf35a69090e666f3adb SHA512 77182f700531bdca8be869efc3d7c235ba3615990d0e50539862af960f3b345061afd1817861614d1238aed901e37dad4737ef0a1e3631c2f125f326b69a27ed WHIRLPOOL b83970e22dad089c2717d81e783c290dd0919a7a278f814f780f9549428130c900208fac9852f4f00d31493eaca994309194eeff661ccf3cd3ecc17ecf5d34ff
+DIST zopfli-1.0.0_p20140705.tar.gz 125759 SHA256 d0a1db54477c8da8b59b4ffe620e7fcb0bcb9192d6e5ef08d849bb463c05ffd1 SHA512 ce5b3eb016b0d734a775dbb45842de4aa4a00bc1490edfdbbf81c4640da94994d08f336b313c45b785e17c61ecf58f370edb2cb6523c963798cad739af2282ca WHIRLPOOL 9affa8b1eb7ec9d509c90e26a385644cbf1f7c031813eab5986c297f47881454a74023cb1548e338cebe8c293d0f8876c048998185035377fa5a187d62e46fac
+DIST zopfli-1.0.0_p20141006.tar.gz 127391 SHA256 6f67f1680d88721a5f753e63e914e4a8d38f57f80f0ccb592e5ce5495d7b889a SHA512 298be8b56addd93310b40cadc4cb4232666f32886fd78404fb13a9369952c0f8c92a69423d95915362a99fc2f6da1fe9c3155ea452f66c28b98446da19794ff1 WHIRLPOOL de534045b36970f208453786a16c7f902422c558817ec4f3b920964bbb1ebc5608949d0f898e1471e1afa529524208f976297d92444c47e9578ff802d5135b0e
diff --git a/app-arch/zopfli/metadata.xml b/app-arch/zopfli/metadata.xml
new file mode 100644
index 000000000000..3a504ace717a
--- /dev/null
+++ b/app-arch/zopfli/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>alex_y_xu@yahoo.ca</email>
+ <name>Alex Xu</name>
+ <description>Proxied maintainer</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <longdescription>Compression library programmed in C to perform very good, but slow, deflate or zlib compression.</longdescription>
+ <upstream>
+ <remote-id type="github">Hello71/zopfli</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/zopfli/zopfli-1.0.0.ebuild b/app-arch/zopfli/zopfli-1.0.0.ebuild
new file mode 100644
index 000000000000..8fb225151e83
--- /dev/null
+++ b/app-arch/zopfli/zopfli-1.0.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Compression library programmed in C to perform very good, but slow, deflate or zlib compression"
+HOMEPAGE="https://code.google.com/p/zopfli/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-arch/unzip"
+
+src_compile() {
+ # Show what we run for a more verbose build log.
+ local command="$(tc-getCC) src/${PN}/*.c -o ${PN} \
+ -W -Wall -Wextra -ansi -pedantic -lm ${CFLAGS} ${LDFLAGS}"
+
+ echo ${command} ; ${command} || die "Compilation failed."
+}
+
+src_install() {
+ dobin ${PN}
+
+ dodoc README CONTRIBUTORS
+
+ insinto /usr/include/${PN}/
+ doins src/${PN}/*.h
+}
diff --git a/app-arch/zopfli/zopfli-1.0.0_p20140705.ebuild b/app-arch/zopfli/zopfli-1.0.0_p20140705.ebuild
new file mode 100644
index 000000000000..558fb9560879
--- /dev/null
+++ b/app-arch/zopfli/zopfli-1.0.0_p20140705.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs vcs-snapshot
+
+DESCRIPTION="Compression library programmed in C to perform very good, but slow, deflate or zlib compression"
+HOMEPAGE="https://github.com/Hello71/zopfli/"
+SRC_URI="https://github.com/Hello71/zopfli/archive/1c07f374419ccb352412fd6403acc2b59ab6cce7.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/1"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ tc-export CC CXX
+
+ epatch_user
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" libdir="${EPREFIX}/usr/$(get_libdir)" install
+ dodoc CONTRIBUTORS README README.${PN}png
+}
diff --git a/app-arch/zopfli/zopfli-1.0.0_p20141006.ebuild b/app-arch/zopfli/zopfli-1.0.0_p20141006.ebuild
new file mode 100644
index 000000000000..739909462c49
--- /dev/null
+++ b/app-arch/zopfli/zopfli-1.0.0_p20141006.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs vcs-snapshot
+
+DESCRIPTION="Compression library programmed in C to perform very good, but slow, deflate or zlib compression"
+HOMEPAGE="https://github.com/Hello71/zopfli/"
+SRC_URI="https://github.com/Hello71/zopfli/archive/1a2f1148efd07e16adb5702e8820abf6162292d5.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/1"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ tc-export CC CXX
+
+ epatch_user
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" libdir="${EPREFIX}/usr/$(get_libdir)" install
+ dodoc CONTRIBUTORS README README.${PN}png
+}
diff --git a/app-arch/zpaq-extras/Manifest b/app-arch/zpaq-extras/Manifest
new file mode 100644
index 000000000000..dbdc0f79db6f
--- /dev/null
+++ b/app-arch/zpaq-extras/Manifest
@@ -0,0 +1,13 @@
+DIST bmp_j4b.zip 2654 SHA256 131a4cce96a56a5f4c61fd9a226b22b5d19f1838076b25f91e5815d9b40f32de SHA512 deb3aaffbe8f1e1e2fa33bbc4c87446ac1f0144788098c468a9218871715ef87e7f63b406ed43db77b6d02a5a3b73e38c230707766cb4a32162c5c8978c312dc WHIRLPOOL c0d5c5bd4d77c24478744daab6c929688ff12a3f9c75c89d5208e7d6b22a42e7d9e59af079d289fe3fee3573a7614ea716abd3693f67be1bbcd38d1db2574f94
+DIST bmp_j4c.zip 2511 SHA256 98fe722a89ac107f637d54bf609673402fa9ede87d19ed68ee28633e64e879a7 SHA512 36e51f9ccef19069cb5bc93f3f8139e458406c8f1bd50b8e15440bed8808c43284248e0e2d436c613bb8afd1953703d5e9b681f95857b801d891e9497992bc6d WHIRLPOOL cda7d004d40102c198557e18d8e8fd08d16fe1aa4f2d66869349c7e75bd12b0c000a1388658e593b9ad971fb37c8638e7183addc94fe4ac3b42dca8c42c3f56e
+DIST bwt_j3.zip 16535 SHA256 c5e75abdd8d8a3fb6effa3c467e98aeb3175068bd454a635baae79de024b9120 SHA512 8a34909cd70cae76ee2c19b1d90895ab75422b7b2053cf6a4555250871a9ec1f585fe6d115abd6c0ea4cf092711ab71ab48906b4ec5b0230b4fe62b989177f33 WHIRLPOOL 153dd0f98201218d867360f73ef3eceda4f7a784e4e46927c34615a442bd63ecaca00ad59cf42ce2da3a80461ea5e8a6d3bff02d51b5d33d4226876fb4ffbf3e
+DIST bwt_slowmode1.zip 138176 SHA256 3b7fb3c4a2491b4f8b2c243f7f67a4f2c7d2b793558207001b2565f06e145a92 SHA512 d415b049f284dc4d3d2211830db260489f26e6b1cc00fd60c16b6d138196299ce247fd0e20b58bef016451a3d5aaf9f55e53585ce97f95d1cfa5672735e4316a WHIRLPOOL fc4b56621de29fd1ec424924678e80191247b64e8f07a84ea1d9fd4dd273ca2e4a4c6eb6102a668e837aafe53035a542741b614ce76dc51ee165e229da764de5
+DIST exe_j1.zip 9828 SHA256 8e13ca38ed6fb7fd9ae5244c44b045f179b068c3d3281f1f2690c352e45ca239 SHA512 9b62486823a21b91ffefbf8de78e6fcd4a291c98549226b1e17a6a4c71ce510c678b71cb74cf9b38364385b3310f0b6dfecaf96652f82a0eab367a2122176596 WHIRLPOOL f7973d7b68614363a2f06d16e4fa96b9f54cda0d9b93a72d61f9ed7b78382c854808dc080cde09553d33d0dadcfa0a6c4b1c1aa70799cb533e7d8df440628b6a
+DIST jpg_test2.zip 12189 SHA256 b09eedf0760826fa6822d266c1e262e67ad4ac119e11235e192e208e558e4855 SHA512 a866812a9d9e77a777d06b6acfef4bd09e7af1b55e3d47eb75bd24d8f5b02ec455991efda7f7ee2a5db035602cf9843e01133fa8a7f75488cd94f1eeeac70bb0 WHIRLPOOL 82915421c0c22d31472d61421bc503426d07ed725568ed3548c9b3e1e8536ca056094b1115457cda018adef13dd216d88afca310e498d128f0acd3ee18559f35
+DIST lazy100.zip 14958 SHA256 6c4366a7260c3013eb85db0aa7209ea19d41d3d2427b95a4526595cc9b64b44e SHA512 2102d268bd15843773653fae8934b9f5ebbdb98a5c519a465c57ee58a6cd104228ab79b885f1c7a6cc127930b890c1ca14b09b799d9129d973c2cf83bd03be3d WHIRLPOOL a462ffa7fd30537b7937479203de02521c01a29af2fd3c6df1d719c172d57f8d80bec4923795a1e55428419c0df0eb3db298353c0eea3d273003b15026042bae
+DIST lazy210.zip 15867 SHA256 7c6d55c316b366328d711ada5fd8302e4db89916dfd66449d696416d7f60d735 SHA512 9a45b281f3e0c2a24d2679b7eecfa9b5e8b5a13894faf23924784cec09f90edb17513ec3e13001ed283dc4ef2a56b764f32808c45443b5871d8acdd919a4f353 WHIRLPOOL 10cde6b1f3139579c48465e6066dfe6c9476d608503261890dcf0556df3e978a5d662f956b71f5e73d8074f02a962c94cb50ce8116975187121f8fcdae26a055
+DIST lz1.zip 10012 SHA256 2817e3d300edee5c1d65d702feb58b51bd459817dc32a2a29d82d0f92a0ea7d9 SHA512 b03c84351a361531e59242904763f7cd13ec9b809bcbfbec5c270b139ab80ac1a99ccf745ba7a797587c0e71cb7dbc083f643fd62cd3b56906ff5bde8944a1a1 WHIRLPOOL 4f73c5ce636d968c65582ec313a91c0315267719140aeecfb1c8b471bc8ea43f4cea3e0cea4b8738ef5be07ba9bdc4003946801c415328fc79d74e7bd9c1682a
+DIST min.zip 9560 SHA256 7209ffaf0d48f5e10e3134826d766e2dc52ed914ed5dbad415023db10b4e1113 SHA512 e2ce1283438793abf5c8f62e6419249fb86f9d386a2cdc40acc72c4fbaa44469be2cb7c7271355af13d40070d386d87e12268aedccbf4cd6ec9feb91cd92e65e WHIRLPOOL e73a58647dccdcf5db1de8709929b4e72600d61c1f6b474b34c3a661b972d39769327ef8c0cc1203f694f62798e4414dc1a9d76a72f99a29b0359226a86521ec
+DIST zpaq-fast.cfg 359 SHA256 2cf9605ba5eb73a58146509844d4b360c07ae55ebc2ab92d485d0c907166cfda SHA512 3f1118bdb61bea4c8df4e7a88a9ae079aecbe9f1dfc2aa7935334d330d374a248ab2327da9524857ca9c2b214ac32f3d2dad6ad420f0688b65384c2263147e57 WHIRLPOOL 79f8d8e6e75dfd44148e42271a2c34a74fbd3f7fbc0ee9dca26f4a5a7fa3332810207784e0ccc9df39b2978b2e8f1a402a385ce3bf73de69ba7066347c3d7d86
+DIST zpaq-max.cfg 1754 SHA256 7965863923d5558409f5792167c74914a9c0d07f813ef385587450e7b5a156b7 SHA512 12758ea633cb37619c26753f8a4f368a1adc1b682a3ec738e36b8f39bff06f81dd9b37f9b58839ad43488d9b821690a9cb43e276da88f36d1b20f842cbcab70e WHIRLPOOL 2653a3eb7c33cc9d6ee13511919f3f79664d2df0d3fc692df2c14f8b7b5c2b08567c1963fc3140f432a1e631f56aee76e74d3447fd793f1c751078bed3d35b74
+DIST zpaq-mid.cfg 786 SHA256 51dd9dc78513e36217033c501f4a3331d30820df875e466052b6b6175bc9bafa SHA512 ef08f70b5541396a690b7df630ddbb9fb3093b7617acb26394e9f7da40d5191343500bb0b6f0e66ed73fc840b7d5666cbc47a74f7eabba6abbe3743de7db7235 WHIRLPOOL c7ff0e6497e0f03083d1cc7d787800194092f03db292831ba1d07dfa3f8f00f52c60d8e948d84cd121fcfc2040ac4f71e9556c2885971ae3d99921bfaa962160
diff --git a/app-arch/zpaq-extras/metadata.xml b/app-arch/zpaq-extras/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/zpaq-extras/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/zpaq-extras/zpaq-extras-2.ebuild b/app-arch/zpaq-extras/zpaq-extras-2.ebuild
new file mode 100644
index 000000000000..a768771df5d7
--- /dev/null
+++ b/app-arch/zpaq-extras/zpaq-extras-2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit base toolchain-funcs
+
+DESCRIPTION="A set of additional compression profiles for app-arch/zpaq"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/bwt_j3.zip
+ http://mattmahoney.net/dc/bwt_slowmode1.zip
+ http://mattmahoney.net/dc/exe_j1.zip
+ http://mattmahoney.net/dc/jpg_test2.zip
+ http://mattmahoney.net/dc/min.zip
+ http://mattmahoney.net/dc/fast.cfg -> zpaq-fast.cfg
+ http://mattmahoney.net/dc/mid.cfg -> zpaq-mid.cfg
+ http://mattmahoney.net/dc/max.cfg -> zpaq-max.cfg
+ http://mattmahoney.net/dc/bmp_j4b.zip
+ http://mattmahoney.net/dc/lz1.zip
+ http://mattmahoney.net/dc/lazy100.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=app-arch/zpaq-6"
+
+S=${WORKDIR}
+
+src_unpack() {
+ local x
+ for x in ${A}; do
+ if [[ ${x} == *.cfg ]]; then
+ cp "${DISTDIR}"/${x} ${x#zpaq-} || die
+ fi
+ done
+
+ default
+}
+
+src_configure() {
+ sed \
+ -e "/^pcomp zpaq/s:-m:-m${EPREFIX}/usr/share/zpaq/:" \
+ -e "s:^pcomp zpaq:pcomp ${EPREFIX}/usr/bin/zpaq:" \
+ -e "s:^pcomp \([^/]\):pcomp ${EPREFIX}/usr/libexec/zpaq/\1:" \
+ -i *.cfg || die
+
+ local sources=( *.cpp )
+ # (the following assignment flattens the array)
+ progs=${sources[@]%.cpp}
+}
+
+src_compile() {
+ tc-export CXX
+ emake ${progs} || die
+}
+
+src_install() {
+ exeinto /usr/libexec/zpaq
+ doexe ${progs} || die
+
+ insinto /usr/share/zpaq
+ doins *.cfg || die
+}
diff --git a/app-arch/zpaq-extras/zpaq-extras-3.ebuild b/app-arch/zpaq-extras/zpaq-extras-3.ebuild
new file mode 100644
index 000000000000..14707bb513fa
--- /dev/null
+++ b/app-arch/zpaq-extras/zpaq-extras-3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="A set of additional compression profiles for app-arch/zpaq"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/bwt_j3.zip
+ http://mattmahoney.net/dc/bwt_slowmode1.zip
+ http://mattmahoney.net/dc/exe_j1.zip
+ http://mattmahoney.net/dc/jpg_test2.zip
+ http://mattmahoney.net/dc/min.zip
+ http://mattmahoney.net/dc/fast.cfg -> zpaq-fast.cfg
+ http://mattmahoney.net/dc/mid.cfg -> zpaq-mid.cfg
+ http://mattmahoney.net/dc/max.cfg -> zpaq-max.cfg
+ http://mattmahoney.net/dc/bmp_j4c.zip
+ http://mattmahoney.net/dc/lz1.zip
+ http://mattmahoney.net/dc/lazy100.zip
+ http://mattmahoney.net/dc/lazy210.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=app-arch/zpaq-6.19"
+
+S=${WORKDIR}
+
+src_unpack() {
+ local x
+ for x in ${A}; do
+ if [[ ${x} == *.cfg ]]; then
+ cp "${DISTDIR}"/${x} ${x#zpaq-} || die
+ fi
+ done
+
+ default
+}
+
+src_configure() {
+ sed \
+ -e "/^pcomp zpaq/s:-m:-m${EPREFIX}/usr/share/zpaq/:" \
+ -e "s:^pcomp zpaq:pcomp ${EPREFIX}/usr/bin/zpaq:" \
+ -e "s:^pcomp \([^/]\):pcomp ${EPREFIX}/usr/lib/zpaq/\1:" \
+ -i *.cfg || die
+
+ local sources=( *.cpp )
+ # (the following assignment flattens the array)
+ progs=${sources[@]%.cpp}
+}
+
+src_compile() {
+ tc-export CXX
+ emake ${progs} || die
+}
+
+src_install() {
+ exeinto /usr/lib/zpaq
+ doexe ${progs} || die
+
+ insinto /usr/share/zpaq
+ doins *.cfg || die
+}
diff --git a/app-arch/zpaq/Manifest b/app-arch/zpaq/Manifest
new file mode 100644
index 000000000000..6450e5eb8ea3
--- /dev/null
+++ b/app-arch/zpaq/Manifest
@@ -0,0 +1,4 @@
+DIST zpaq641.zip 576673 SHA256 0d90a6be9a70c9c2b337116da4044385821c3b7bbd1988bff8d21171e5daf86c SHA512 48ee840496ee3b61b33117a7a421903635b515040c1a4414c83be66ae6da2516e26511fb3a09ecd1448a84f6b1e7f6df5069af6806d53361110a11590270e7eb WHIRLPOOL a27c3a06854face7e6a6558863e351700601459b354904d61733e75d3719a047a041fff3b315954801ca610355facdf1242b232edfd630d25bef94a321179e6e
+DIST zpaq649.zip 609714 SHA256 d6162d40f17649573ca355038ef7b79baf337696f8c14ca58706dcb6519b5767 SHA512 67e5fb2fb5d0c6f8b05e126aeaf3b9b2173c343487627ebaddbf63ce56ef044842e6e7b7ed20c80e813fe04c625421101ef157e21fc72d6411daec4ad25c77ae WHIRLPOOL e3bac2a75d4e5288b5093eb8989155c212a8260ffbd0d0a6a90acbae7c59a9ad20ade591744e573c557e510cd2b32c2d562cfe6c805aba90cd837fd5288279b3
+DIST zpaq653.zip 536808 SHA256 295e4e491958c222bf51a30d36eb2d013a6f427422b91ee9d5be7f1c332590b3 SHA512 7999f0e35e8b0f46b586e5a0f5346b3501f21ab39fa25d57b9bdf5b87eee16d9e846f6b60fc7c447195bbdd0345ec4e220606d8c100167611231afe36f5558ed WHIRLPOOL 9d66fc51d2d48df1853c68686a65bc492756e11378c8e9075d6c976f11e69941fe52405ce66a57497fcde0524879ce04ef0430df3ff84da28e7d2f9d2cc70034
+DIST zpaq704.zip 630426 SHA256 21b595f8452b32c780f6ff29e0fc716cdf3595338774e1f72d4d4b5df212da39 SHA512 2655febd6e1352858c4daa7abe743c77e2b4b554b6c5961e1dde2c4011b1b4dd647decf60b7a86585eb5a1606253789afb85551923c6f542cf31dfecd984eaaa WHIRLPOOL 8a4ff4dd0c9e53d2f4a85c600537d83d7876f24ba4d4371d5a647d873c5ecc92ed80626f7abc3127f62346a1ffa69bc88172366a4fe4e0ea4236086c55a5ee72
diff --git a/app-arch/zpaq/files/zpaq-4-autotools.patch b/app-arch/zpaq/files/zpaq-4-autotools.patch
new file mode 100644
index 000000000000..099054bc0d00
--- /dev/null
+++ b/app-arch/zpaq/files/zpaq-4-autotools.patch
@@ -0,0 +1,307 @@
+From 0120bcc43898ebc26af64befabc5552b31fa2992 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 4 Jan 2011 21:04:53 +0100
+Subject: [PATCH] Add autotools files.
+
+---
+ Makefile.am | 7 ++
+ configure.ac | 19 +++++
+ m4/ax_pthread.m4 | 246 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 272 insertions(+)
+ create mode 100644 Makefile.am
+ create mode 100644 configure.ac
+ create mode 100644 m4/ax_pthread.m4
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..c1135e5
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,7 @@
++bin_PROGRAMS = zpaq
++
++ACLOCAL_AMFLAGS = -I m4
++
++zpaq_SOURCES = zpaq.cpp
++zpaq_CXXFLAGS = $(PTHREAD_CFLAGS) $(LIBDIVSUFSORT_CFLAGS)
++zpaq_LDADD = -lzpaq $(LIBDIVSUFSORT_LIBS)
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..d0f5bb2
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,19 @@
++AC_PREREQ([2.60])
++AC_INIT([zpaq], [na])
++AC_CONFIG_AUX_DIR([build-aux])
++AM_INIT_AUTOMAKE([1.6 foreign no-dependencies])
++
++AC_LANG([C++])
++AC_PROG_CXX
++ACX_PTHREAD
++PKG_CHECK_MODULES([LIBDIVSUFSORT], [libdivsufsort])
++
++AC_ARG_ENABLE([debug],
++ [AS_HELP_STRING([--enable-debug],
++ [Enable debug])])
++AS_IF([test x"$enable_debug" = x"yes"], [
++ AC_DEFINE([DEBUG], [1], [Set this to enable debug])
++])
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
+new file mode 100644
+index 0000000..3d0806d
+--- /dev/null
++++ b/m4/ax_pthread.m4
+@@ -0,0 +1,246 @@
++# note: dropped PTHREAD_CC, joinable and stuff
++
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
++#
++# DESCRIPTION
++#
++# This macro figures out how to build C programs using POSIX threads. It
++# sets the PTHREAD_LIBS output variable to the threads library and linker
++# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
++# flags that are needed. (The user can also force certain compiler
++# flags/libs to be tested by setting these environment variables.)
++#
++# Also sets PTHREAD_CC to any special C compiler that is needed for
++# multi-threaded programs (defaults to the value of CC otherwise). (This
++# is necessary on AIX to use the special cc_r compiler alias.)
++#
++# NOTE: You are assumed to not only compile your program with these flags,
++# but also link it with them as well. e.g. you should link with
++# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
++#
++# If you are only building threads programs, you may wish to use these
++# variables in your default LIBS, CFLAGS, and CC:
++#
++# LIBS="$PTHREAD_LIBS $LIBS"
++# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++# CC="$PTHREAD_CC"
++#
++# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
++# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
++# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
++#
++# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
++# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
++# PTHREAD_CFLAGS.
++#
++# ACTION-IF-FOUND is a list of shell commands to run if a threads library
++# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
++# is not found. If ACTION-IF-FOUND is not specified, the default action
++# will define HAVE_PTHREAD.
++#
++# Please let the authors know if this macro fails on any platform, or if
++# you have any other suggestions or comments. This macro was based on work
++# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
++# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
++# Alejandro Forero Cuervo to the autoconf macro repository. We are also
++# grateful for the helpful feedback of numerous users.
++#
++# Updated for Autoconf 2.68 by Daniel Richard G.
++#
++# LICENSE
++#
++# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
++# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
++#
++# This program is free software: you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by the
++# Free Software Foundation, either version 3 of the License, or (at your
++# option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++# Public License for more details.
++#
++# You should have received a copy of the GNU General Public License along
++# with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++# As a special exception, the respective Autoconf Macro's copyright owner
++# gives unlimited permission to copy, distribute and modify the configure
++# scripts that are the output of Autoconf when processing the Macro. You
++# need not follow the terms of the GNU General Public License when using
++# or distributing such scripts, even though portions of the text of the
++# Macro appear in them. The GNU General Public License (GPL) does govern
++# all other use of the material that constitutes the Autoconf Macro.
++#
++# This special exception to the GPL applies to versions of the Autoconf
++# Macro released by the Autoconf Archive. When you make and distribute a
++# modified version of the Autoconf Macro, you may extend this special
++# exception to the GPL to apply to your modified version as well.
++
++#serial 16
++
++AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
++AC_DEFUN([AX_PTHREAD], [
++AC_REQUIRE([AC_CANONICAL_HOST])
++AC_LANG_PUSH([C])
++ax_pthread_ok=no
++
++# We used to check for pthread.h first, but this fails if pthread.h
++# requires special compiler flags (e.g. on True64 or Sequent).
++# It gets checked for in the link test anyway.
++
++# First of all, check if the user has set any of the PTHREAD_LIBS,
++# etcetera environment variables, and if threads linking works using
++# them:
++if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
++ save_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++ save_LIBS="$LIBS"
++ LIBS="$PTHREAD_LIBS $LIBS"
++ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
++ AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
++ AC_MSG_RESULT($ax_pthread_ok)
++ if test x"$ax_pthread_ok" = xno; then
++ PTHREAD_LIBS=""
++ PTHREAD_CFLAGS=""
++ fi
++ LIBS="$save_LIBS"
++ CFLAGS="$save_CFLAGS"
++fi
++
++# We must check for the threads library under a number of different
++# names; the ordering is very important because some systems
++# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
++# libraries is broken (non-POSIX).
++
++# Create a list of thread flags to try. Items starting with a "-" are
++# C compiler flags, and other items are library names, except for "none"
++# which indicates that we try without any flags at all, and "pthread-config"
++# which is a program returning the flags for the Pth emulation library.
++
++ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
++
++# The ordering *is* (sometimes) important. Some notes on the
++# individual items follow:
++
++# pthreads: AIX (must check this before -lpthread)
++# none: in case threads are in libc; should be tried before -Kthread and
++# other compiler flags to prevent continual compiler warnings
++# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
++# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
++# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
++# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
++# -pthreads: Solaris/gcc
++# -mthreads: Mingw32/gcc, Lynx/gcc
++# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
++# doesn't hurt to check since this sometimes defines pthreads too;
++# also defines -D_REENTRANT)
++# ... -mt is also the pthreads flag for HP/aCC
++# pthread: Linux, etcetera
++# --thread-safe: KAI C++
++# pthread-config: use pthread-config program (for GNU Pth library)
++
++case "${host_cpu}-${host_os}" in
++ *solaris*)
++
++ # On Solaris (at least, for some versions), libc contains stubbed
++ # (non-functional) versions of the pthreads routines, so link-based
++ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
++ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
++ # a function called by this macro, so we could check for that, but
++ # who knows whether they'll stub that too in a future libc.) So,
++ # we'll just look for -pthreads and -lpthread first:
++
++ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
++ ;;
++
++ *-darwin*)
++ ax_pthread_flags="-pthread $ax_pthread_flags"
++ ;;
++esac
++
++if test x"$ax_pthread_ok" = xno; then
++for flag in $ax_pthread_flags; do
++
++ case $flag in
++ none)
++ AC_MSG_CHECKING([whether pthreads work without any flags])
++ ;;
++
++ -*)
++ AC_MSG_CHECKING([whether pthreads work with $flag])
++ PTHREAD_CFLAGS="$flag"
++ ;;
++
++ pthread-config)
++ AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
++ if test x"$ax_pthread_config" = xno; then continue; fi
++ PTHREAD_CFLAGS="`pthread-config --cflags`"
++ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
++ ;;
++
++ *)
++ AC_MSG_CHECKING([for the pthreads library -l$flag])
++ PTHREAD_LIBS="-l$flag"
++ ;;
++ esac
++
++ save_LIBS="$LIBS"
++ save_CFLAGS="$CFLAGS"
++ LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++
++ # Check for various functions. We must include pthread.h,
++ # since some functions may be macros. (On the Sequent, we
++ # need a special flag -Kthread to make this header compile.)
++ # We check for pthread_join because it is in -lpthread on IRIX
++ # while pthread_create is in libc. We check for pthread_attr_init
++ # due to DEC craziness with -lpthreads. We check for
++ # pthread_cleanup_push because it is one of the few pthread
++ # functions on Solaris that doesn't have a non-functional libc stub.
++ # We try pthread_create on general principles.
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
++ static void routine(void *a) { a = 0; }
++ static void *start_routine(void *a) { return a; }],
++ [pthread_t th; pthread_attr_t attr;
++ pthread_create(&th, 0, start_routine, 0);
++ pthread_join(th, 0);
++ pthread_attr_init(&attr);
++ pthread_cleanup_push(routine, 0);
++ pthread_cleanup_pop(0) /* ; */])],
++ [ax_pthread_ok=yes],
++ [])
++
++ LIBS="$save_LIBS"
++ CFLAGS="$save_CFLAGS"
++
++ AC_MSG_RESULT($ax_pthread_ok)
++ if test "x$ax_pthread_ok" = xyes; then
++ break;
++ fi
++
++ PTHREAD_LIBS=""
++ PTHREAD_CFLAGS=""
++done
++fi
++
++AC_SUBST(PTHREAD_LIBS)
++AC_SUBST(PTHREAD_CFLAGS)
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$ax_pthread_ok" = xyes; then
++ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
++ :
++else
++ ax_pthread_ok=no
++ $2
++fi
++AC_LANG_POP
++])dnl AX_PTHREAD
+--
+1.9.0
+
diff --git a/app-arch/zpaq/metadata.xml b/app-arch/zpaq/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/zpaq/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/zpaq/zpaq-6.41.ebuild b/app-arch/zpaq/zpaq-6.41.ebuild
new file mode 100644
index 000000000000..b3fe2f697a23
--- /dev/null
+++ b/app-arch/zpaq/zpaq-6.41.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils
+
+MY_P=${PN}${PV/./}
+DESCRIPTION="Journaling incremental deduplicating archiving compressor"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="=app-arch/libzpaq-${PV}
+ dev-libs/libdivsufsort"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/${PN}-4-autotools.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ # man-page is no longer there
+ ac_cv_prog_POD2MAN=
+ )
+
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ elog "You may also want to install app-arch/zpaq-extras package which provides"
+ elog "few additional configs and preprocessors for use with zpaq."
+}
diff --git a/app-arch/zpaq/zpaq-6.49.ebuild b/app-arch/zpaq/zpaq-6.49.ebuild
new file mode 100644
index 000000000000..7667a97ca024
--- /dev/null
+++ b/app-arch/zpaq/zpaq-6.49.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic
+
+MY_P=${PN}${PV/./}
+DESCRIPTION="Journaling incremental deduplicating archiving compressor"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="~app-arch/libzpaq-${PV}
+ dev-libs/libdivsufsort"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/${PN}-4-autotools.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ )
+
+ append-cppflags -Dunix
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ elog "You may also want to install app-arch/zpaq-extras package which provides"
+ elog "few additional configs and preprocessors for use with zpaq."
+}
diff --git a/app-arch/zpaq/zpaq-6.53.ebuild b/app-arch/zpaq/zpaq-6.53.ebuild
new file mode 100644
index 000000000000..7667a97ca024
--- /dev/null
+++ b/app-arch/zpaq/zpaq-6.53.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic
+
+MY_P=${PN}${PV/./}
+DESCRIPTION="Journaling incremental deduplicating archiving compressor"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="~app-arch/libzpaq-${PV}
+ dev-libs/libdivsufsort"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/${PN}-4-autotools.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ )
+
+ append-cppflags -Dunix
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ elog "You may also want to install app-arch/zpaq-extras package which provides"
+ elog "few additional configs and preprocessors for use with zpaq."
+}
diff --git a/app-arch/zpaq/zpaq-7.04.ebuild b/app-arch/zpaq/zpaq-7.04.ebuild
new file mode 100644
index 000000000000..19f402a7f95c
--- /dev/null
+++ b/app-arch/zpaq/zpaq-7.04.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic
+
+MY_P=${PN}${PV/./}
+DESCRIPTION="Journaling incremental deduplicating archiving compressor"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="~app-arch/libzpaq-${PV}
+ dev-libs/libdivsufsort"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ EPATCH_OPTS+=-p1 epatch "${FILESDIR}"/${PN}-4-autotools.patch
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ )
+
+ append-cppflags -Dunix
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ elog "You may also want to install app-arch/zpaq-extras package which provides"
+ elog "few additional configs and preprocessors for use with zpaq."
+}
diff --git a/app-arch/zpipe/Manifest b/app-arch/zpipe/Manifest
new file mode 100644
index 000000000000..f8eb2a0d78cc
--- /dev/null
+++ b/app-arch/zpipe/Manifest
@@ -0,0 +1 @@
+DIST zpipe.201.zip 42173 SHA256 742f0da404fd279683e87e66001093bef7cca268b59a774d580c54bfeff4f1a5 SHA512 4c7fc5afd96c3db806679a56863752a18889d8e8dad7648b993a32bfa7ceb426782ec5f83567ad58ca5c5b79f145e8953667dc1a3b854fc8a76eaac165e28cb7 WHIRLPOOL 1ec1f7ca647fe6375900fdf61dc43a1a6a69f62ebd574b2190d5f12a0c45a6852d09fd856aa23ac1ac53f048d438b6179810cc0bf1e6c28091509601e8925b07
diff --git a/app-arch/zpipe/metadata.xml b/app-arch/zpipe/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-arch/zpipe/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-arch/zpipe/zpipe-2.01-r1.ebuild b/app-arch/zpipe/zpipe-2.01-r1.ebuild
new file mode 100644
index 000000000000..53985a440783
--- /dev/null
+++ b/app-arch/zpipe/zpipe-2.01-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+MY_P=${PN}.${PV/./}
+DESCRIPTION="Pipe compressor/decompressor for ZPAQ"
+HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
+SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="<app-arch/libzpaq-7"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CXX="$(tc-getCXX)" LDLIBS=-lzpaq "${PN}"
+}
+
+src_install() {
+ dobin ${PN}
+}