summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/p7zip')
-rw-r--r--app-arch/p7zip/Manifest1
-rw-r--r--app-arch/p7zip/files/p7zip-17.05-natspec.patch117
-rw-r--r--app-arch/p7zip/files/p7zip-17.05-unit64.patch21
-rw-r--r--app-arch/p7zip/metadata.xml5
-rw-r--r--app-arch/p7zip/p7zip-16.02-r4.ebuild165
-rw-r--r--app-arch/p7zip/p7zip-16.02-r5.ebuild168
-rw-r--r--app-arch/p7zip/p7zip-16.02-r8.ebuild (renamed from app-arch/p7zip/p7zip-16.02-r6.ebuild)76
-rw-r--r--app-arch/p7zip/p7zip-17.05-r1.ebuild116
8 files changed, 287 insertions, 382 deletions
diff --git a/app-arch/p7zip/Manifest b/app-arch/p7zip/Manifest
index 29b37f25e4d4..c03f71b7e19b 100644
--- a/app-arch/p7zip/Manifest
+++ b/app-arch/p7zip/Manifest
@@ -1 +1,2 @@
+DIST p7zip-17.05.tar.gz 6722154 BLAKE2B 0bcba638d3acaf2aa270e02693ad4295dfcc6b388037bdb446e25f3f4e1cb34f1b05bbc9a845364ca770625c32b2d7f55f63f504ad8e0863fff4bf940ae1fddd SHA512 97a7cfd15287998eb049c320548477be496c4ddf6b45c833c42adca4ab88719b07a442ae2e71cf2dc3b30a0777a3acab0a1a30f01fd85bacffa3fa9bd22c3f7d
DIST p7zip_16.02_src_all.tar.bz2 4239909 BLAKE2B 075356fba5284cbb124e30c36364a910ae5a7ac6bee8a8fb682c5a7ce2f1870ef83d3160c84f8dabad1d616c13d642cba1f19fb9384160d21590cf678dd8f1a6 SHA512 d2c4d53817f96bb4c7683f42045198d4cd509cfc9c3e2cb85c8d9dc4ab6dfa7496449edeac4e300ecf986a9cbbc90bd8f8feef8156895d94617c04e507add55f
diff --git a/app-arch/p7zip/files/p7zip-17.05-natspec.patch b/app-arch/p7zip/files/p7zip-17.05-natspec.patch
new file mode 100644
index 000000000000..7487924af306
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-17.05-natspec.patch
@@ -0,0 +1,117 @@
+commit f25f0b75bbeb485961dc139aed6b5b474552d043 (HEAD -> main)
+Author: Taiki Sugawara <buzz.taiki@gmail.com>
+Date: Wed May 12 18:26:11 2021 +0900
+
+ natspec patch for p7zip 17.x
+
+diff --git a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp
+index 353e895..44071f3 100644
+--- a/CPP/7zip/Archive/Zip/ZipItem.cpp
++++ b/CPP/7zip/Archive/Zip/ZipItem.cpp
+@@ -1,9 +1,7 @@
+ // Archive/ZipItem.cpp
+
+-#if (!defined _WIN32) && (!defined __CYGWIN__) && (!defined __APPLE__)
+ #include <iconv.h>
+-#include <locale.h>
+-#endif
++#include <natspec.h>
+
+ #include "StdAfx.h"
+
+@@ -355,87 +353,15 @@ void CItem::GetUnicodeString(UString &res, const AString &s, bool isComment, boo
+ #endif
+ }
+
+- #if (!defined _WIN32) && (!defined __CYGWIN__) && (!defined __APPLE__)
+- // Convert OEM char set to UTF-8 if needed
+- // Use system locale to select code page
+-
+- Byte hostOS = GetHostOS();
+- if (!isUtf8 && ((hostOS == NFileHeader::NHostOS::kFAT) || (hostOS == NFileHeader::NHostOS::kNTFS))) {
+-
+- const char *oemcp;
+- oemcp = getenv("OEMCP");
+- if (!oemcp) {
+- oemcp = "CP437\0"; // CP name is 6 chars max
+-
+- const char *lc_to_cp_table[] = {
+- "af_ZA", "CP850", "ar_SA", "CP720", "ar_LB", "CP720", "ar_EG", "CP720",
+- "ar_DZ", "CP720", "ar_BH", "CP720", "ar_IQ", "CP720", "ar_JO", "CP720",
+- "ar_KW", "CP720", "ar_LY", "CP720", "ar_MA", "CP720", "ar_OM", "CP720",
+- "ar_QA", "CP720", "ar_SY", "CP720", "ar_TN", "CP720", "ar_AE", "CP720",
+- "ar_YE", "CP720","ast_ES", "CP850", "az_AZ", "CP866", "az_AZ", "CP857",
+- "be_BY", "CP866", "bg_BG", "CP866", "br_FR", "CP850", "ca_ES", "CP850",
+- "zh_CN", "CP936", "zh_TW", "CP950", "kw_GB", "CP850", "cs_CZ", "CP852",
+- "cy_GB", "CP850", "da_DK", "CP850", "de_AT", "CP850", "de_LI", "CP850",
+- "de_LU", "CP850", "de_CH", "CP850", "de_DE", "CP850", "el_GR", "CP737",
+- "en_AU", "CP850", "en_CA", "CP850", "en_GB", "CP850", "en_IE", "CP850",
+- "en_JM", "CP850", "en_BZ", "CP850", "en_PH", "CP437", "en_ZA", "CP437",
+- "en_TT", "CP850", "en_US", "CP437", "en_ZW", "CP437", "en_NZ", "CP850",
+- "es_PA", "CP850", "es_BO", "CP850", "es_CR", "CP850", "es_DO", "CP850",
+- "es_SV", "CP850", "es_EC", "CP850", "es_GT", "CP850", "es_HN", "CP850",
+- "es_NI", "CP850", "es_CL", "CP850", "es_MX", "CP850", "es_ES", "CP850",
+- "es_CO", "CP850", "es_ES", "CP850", "es_PE", "CP850", "es_AR", "CP850",
+- "es_PR", "CP850", "es_VE", "CP850", "es_UY", "CP850", "es_PY", "CP850",
+- "et_EE", "CP775", "eu_ES", "CP850", "fa_IR", "CP720", "fi_FI", "CP850",
+- "fo_FO", "CP850", "fr_FR", "CP850", "fr_BE", "CP850", "fr_CA", "CP850",
+- "fr_LU", "CP850", "fr_MC", "CP850", "fr_CH", "CP850", "ga_IE", "CP437",
+- "gd_GB", "CP850", "gv_IM", "CP850", "gl_ES", "CP850", "he_IL", "CP862",
+- "hr_HR", "CP852", "hu_HU", "CP852", "id_ID", "CP850", "is_IS", "CP850",
+- "it_IT", "CP850", "it_CH", "CP850", "iv_IV", "CP437", "ja_JP", "CP932",
+- "kk_KZ", "CP866", "ko_KR", "CP949", "ky_KG", "CP866", "lt_LT", "CP775",
+- "lv_LV", "CP775", "mk_MK", "CP866", "mn_MN", "CP866", "ms_BN", "CP850",
+- "ms_MY", "CP850", "nl_BE", "CP850", "nl_NL", "CP850", "nl_SR", "CP850",
+- "nn_NO", "CP850", "nb_NO", "CP850", "pl_PL", "CP852", "pt_BR", "CP850",
+- "pt_PT", "CP850", "rm_CH", "CP850", "ro_RO", "CP852", "ru_RU", "CP866",
+- "sk_SK", "CP852", "sl_SI", "CP852", "sq_AL", "CP852", "sr_RS", "CP855",
+- "sr_RS", "CP852", "sv_SE", "CP850", "sv_FI", "CP850", "sw_KE", "CP437",
+- "th_TH", "CP874", "tr_TR", "CP857", "tt_RU", "CP866", "uk_UA", "CP866",
+- "ur_PK", "CP720", "uz_UZ", "CP866", "uz_UZ", "CP857", "vi_VN", "CP1258",
+- "wa_BE", "CP850", "zh_HK", "CP950", "zh_SG", "CP936"};
+- int table_len = sizeof(lc_to_cp_table) / sizeof(char *);
+- int lc_len, i;
+-
+- char *lc = setlocale(LC_CTYPE, "");
+-
+- if (lc && lc[0]) {
+- // Compare up to the dot, if it exists, e.g. en_US.UTF-8
+- for (lc_len = 0; lc[lc_len] != '.' && lc[lc_len] != '\0'; ++lc_len)
+- ;
+- for (i = 0; i < table_len; i += 2)
+- if (strncmp(lc, lc_to_cp_table[i], lc_len) == 0)
+- oemcp = lc_to_cp_table[i + 1];
+- }
+- }
+-
+- iconv_t cd;
+- if ((cd = iconv_open("UTF-8", oemcp)) != (iconv_t)-1) {
+-
+- AString s_utf8;
+- const char* src = s.Ptr();
+- size_t slen = s.Len();
+- size_t dlen = slen * 4;
+- const char* dest = s_utf8.GetBuf_SetEnd(dlen + 1); // (source length * 4) + null termination
+-
+- size_t done = iconv(cd, (char**)&src, &slen, (char**)&dest, &dlen);
+- bzero((size_t*)dest + done, 1);
+-
+- iconv_close(cd);
+-
+- if (ConvertUTF8ToUnicode(s_utf8, res) || ignore_Utf8_Errors)
+- return;
+- }
++ if (!isUtf8) {
++ const char *oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ char *p = natspec_convert(s.Ptr(), NULL, oem_charset, 0);
++ AString utf = p;
++ free(p);
++ if (ConvertUTF8ToUnicode(utf, res))
++ return;
+ }
+- #endif
+-
++
+ if (isUtf8)
+ if (ConvertUTF8ToUnicode(s, res) || ignore_Utf8_Errors)
+ return;
diff --git a/app-arch/p7zip/files/p7zip-17.05-unit64.patch b/app-arch/p7zip/files/p7zip-17.05-unit64.patch
new file mode 100644
index 000000000000..0aa19e329ac0
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-17.05-unit64.patch
@@ -0,0 +1,21 @@
+--- p7zip-17.05-orig/C/hashes/hash.h 2023-03-03 23:16:28.000000000 +1100
++++ p7zip-17.05/C/hashes/hash.h 2023-04-15 09:05:20.357955971 +1000
+@@ -42,17 +42,7 @@
+
+ #include "../7zTypes.h"
+
+-#ifndef _UINT32_T_DECLARED
+-typedef UInt32 uint32_t;
+-#define _UINT32_T_DECLARED
+-#endif
+-
+-#ifndef _UINT64_T_DECLARED
+-typedef UInt64 uint64_t;
+-#define _UINT64_T_DECLARED
+-#endif
+-
+-//#include <stdint.h>
++#include <stdint.h>
+
+ #ifndef min
+ #define min(a,b) (((a)>(b))?(b):(a))
diff --git a/app-arch/p7zip/metadata.xml b/app-arch/p7zip/metadata.xml
index 17c1bda0021e..6a21e35bb813 100644
--- a/app-arch/p7zip/metadata.xml
+++ b/app-arch/p7zip/metadata.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>prometheanfire@gentoo.org</email>
</maintainer>
<use>
+ <flag name="natspec">Use <pkg>dev-libs/libnatspec</pkg> to correctly decode non-ascii file names archived in Windows.</flag>
<flag name="rar">Enable support for non-free rar decoder</flag>
</use>
<upstream>
- <remote-id type="sourceforge">p7zip</remote-id>
+ <remote-id type="github">p7zip-project/p7zip</remote-id>
</upstream>
</pkgmetadata>
diff --git a/app-arch/p7zip/p7zip-16.02-r4.ebuild b/app-arch/p7zip/p7zip-16.02-r4.ebuild
deleted file mode 100644
index 4474ae1c94c8..000000000000
--- a/app-arch/p7zip/p7zip-16.02-r4.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-WX_GTK_VER="3.0"
-
-inherit eutils 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 arm64 hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
-IUSE="abi_x86_x32 doc kde +pch rar static wxwidgets"
-
-REQUIRED_USE="kde? ( wxwidgets )"
-
-RDEPEND="wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
-DEPEND="${RDEPEND}
- abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
- amd64? ( dev-lang/yasm )
- x86? ( dev-lang/nasm )"
-
-S=${WORKDIR}/${PN}_${PV}
-
-DOCS=( ChangeLog README TODO )
-
-PATCHES=(
- "${FILESDIR}"/${P}-darwin.patch
- "${FILESDIR}"/CVE-2016-9296.patch
- "${FILESDIR}"/CVE-2017-17969.patch
- "${FILESDIR}"/CVE-2018-5996.patch
- "${FILESDIR}"/CVE-2018-10115.patch
-)
-
-src_prepare() {
- default
-
- 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|-pipe||g' \
- -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* || die
- 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, it doesn't matter so much for bitwidth, for it doesn't
- # do anything with it
- cp -f makefile.macosx_llvm_64bits 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.list \
- $(use rar && echo CPP/7zip/Compress/Rar/makefile.list) || 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
- need-wxwidgets unicode
- einfo "Preparing dependency list"
- emake depend
- fi
-}
-
-src_compile() {
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) all3
- if use kde || use wxwidgets; then
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 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}
- doexe bin/7zG
-
- insinto /usr/$(get_libdir)/${PN}
- doins -r GUI/Lang
- doins -r DOC/MANUAL
-
- 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/kservices5/ServiceMenus
- doins GUI/kde4/*.desktop
- dodir /usr/share/kde4/services/ServiceMenus # drop these lines after konqueror:4/krusader:4 are gone
- for item in "${ED}"usr/share/kservices5/ServiceMenus/*.desktop; do
- item="$(basename ${item})"
- dosym "/usr/share/kservices5/ServiceMenus/${item}" "/usr/share/kde4/services/ServiceMenus/${item}"
- done
- 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
-
- if use doc; then
- dodoc DOC/*.txt
- dohtml -r DOC/MANUAL/*
- fi
-}
diff --git a/app-arch/p7zip/p7zip-16.02-r5.ebuild b/app-arch/p7zip/p7zip-16.02-r5.ebuild
deleted file mode 100644
index 9dbf6467cede..000000000000
--- a/app-arch/p7zip/p7zip-16.02-r5.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-WX_GTK_VER="3.0"
-
-inherit eutils 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 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
-IUSE="abi_x86_x32 doc kde +pch rar static wxwidgets"
-
-REQUIRED_USE="kde? ( wxwidgets )"
-
-RDEPEND="wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
-DEPEND="${RDEPEND}
- abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
- amd64? ( dev-lang/yasm )
- x86? ( dev-lang/nasm )"
-
-S=${WORKDIR}/${PN}_${PV}
-
-DOCS=( ChangeLog README TODO )
-
-PATCHES=(
- "${FILESDIR}"/${P}-darwin.patch
- "${FILESDIR}"/CVE-2016-9296.patch
- "${FILESDIR}"/CVE-2017-17969.patch
- "${FILESDIR}"/CVE-2018-5996.patch
- "${FILESDIR}"/CVE-2018-10115.patch
- "${FILESDIR}"/WimHandler.cpp.patch
-)
-
-src_prepare() {
- default
-
- 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|-pipe||g' \
- -e "/[ALL|OPT]FLAGS/s|-s||;/OPTIMIZE/s|-s||" \
- -e "/CFLAGS=/s|=|+=|" \
- -e "/CXXFLAGS=/s|=|+=|" \
- -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* || die
- 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, it doesn't matter so much for bitwidth, for it doesn't
- # do anything with it
- cp -f makefile.macosx_llvm_64bits 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.list \
- $(use rar && echo CPP/7zip/Compress/Rar/makefile.list) || 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
- need-wxwidgets unicode
- einfo "Preparing dependency list"
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) depend
- fi
-}
-
-src_compile() {
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) all3
- if use kde || use wxwidgets; then
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 7zG
-# emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 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}
- doexe bin/7zG
-
- insinto /usr/$(get_libdir)/${PN}
- doins -r GUI/Lang
- doins -r DOC/MANUAL
-
- 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/kservices5/ServiceMenus
- doins GUI/kde4/*.desktop
- dodir /usr/share/kde4/services/ServiceMenus # drop these lines after konqueror:4/krusader:4 are gone
- for item in "${ED}"/usr/share/kservices5/ServiceMenus/*.desktop; do
- item="$(basename ${item})"
- dosym ${EROOT}"/usr/share/kservices5/ServiceMenus/${item}" "/usr/share/kde4/services/ServiceMenus/${item}"
- done
- 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
-
- if use doc; then
- dodoc DOC/*.txt
- docinto html
- dodoc -r DOC/MANUAL/*
- fi
-}
diff --git a/app-arch/p7zip/p7zip-16.02-r6.ebuild b/app-arch/p7zip/p7zip-16.02-r8.ebuild
index 3717156c8ded..6cba1cb6085c 100644
--- a/app-arch/p7zip/p7zip-16.02-r6.ebuild
+++ b/app-arch/p7zip/p7zip-16.02-r8.ebuild
@@ -1,33 +1,29 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-WX_GTK_VER="3.0"
-
-inherit eutils toolchain-funcs wxwidgets
+WX_GTK_VER="3.0-gtk3"
+inherit multilib toolchain-funcs wrapper wxwidgets xdg
DESCRIPTION="Port of 7-Zip archiver for Unix"
HOMEPAGE="http://p7zip.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${PN}_${PV}_src_all.tar.bz2"
+S="${WORKDIR}/${PN}_${PV}"
LICENSE="LGPL-2.1 rar? ( unRAR )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
-IUSE="abi_x86_x32 doc kde +pch rar static wxwidgets"
-
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="abi_x86_x32 kde +pch rar static wxwidgets"
REQUIRED_USE="kde? ( wxwidgets )"
RDEPEND="wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
amd64? ( dev-lang/yasm )
x86? ( dev-lang/nasm )"
-S=${WORKDIR}/${PN}_${PV}
-
-DOCS=( ChangeLog README TODO )
-
PATCHES=(
"${FILESDIR}"/${P}-darwin.patch
"${FILESDIR}"/CVE-2016-9296.patch
@@ -61,7 +57,7 @@ src_prepare() {
-e '/Rar/d' \
-e '/RAR/d' \
-i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die
- rm -rf CPP/7zip/Compress/Rar || die
+ rm -r CPP/7zip/Compress/Rar || die
fi
if use abi_x86_x32; then
@@ -75,7 +71,7 @@ src_prepare() {
# Mac OS X needs this special makefile, because it has a non-GNU
# linker, it doesn't matter so much for bitwidth, for it doesn't
# do anything with it
- cp -f makefile.macosx_llvm_64bits makefile.machine
+ cp -f makefile.macosx_llvm_64bits makefile.machine || die
# bundles have extension .bundle but don't die because USE=-rar
# removes the Rar directory
sed -i -e '/strcpy(name/s/\.so/.bundle/' \
@@ -83,9 +79,6 @@ src_prepare() {
sed -i -e '/^PROG=/s/\.so/.bundle/' \
CPP/7zip/Bundles/Format7zFree/makefile.list \
$(use rar && echo CPP/7zip/Compress/Rar/makefile.list) || 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
@@ -93,17 +86,16 @@ src_prepare() {
fi
if use kde || use wxwidgets; then
- need-wxwidgets unicode
+ setup-wxwidgets unicode
einfo "Preparing dependency list"
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) depend
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" depend
fi
}
src_compile() {
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) all3
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" all3
if use kde || use wxwidgets; then
- emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 7zG
-# emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 7zFM
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -- 7zG
fi
}
@@ -112,23 +104,19 @@ src_test() {
}
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"
+ # these wrappers cannot be symlinks, p7zip should be called with full path
+ make_wrapper 7zr /usr/$(get_libdir)/p7zip/7zr
+ make_wrapper 7za /usr/$(get_libdir)/p7zip/7za
+ make_wrapper 7z /usr/$(get_libdir)/p7zip/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"
+ make_wrapper 7zG /usr/$(get_libdir)/p7zip/7zG
dobin GUI/p7zipForFilemanager
- exeinto /usr/$(get_libdir)/${PN}
-# doexe bin/7z{G,FM}
+ exeinto /usr/$(get_libdir)/p7zip
doexe bin/7zG
- insinto /usr/$(get_libdir)/${PN}
+ insinto /usr/$(get_libdir)/p7zip
doins -r GUI/Lang
insinto /usr/share/icons/hicolor/16x16/apps/
@@ -138,30 +126,24 @@ src_install() {
rm GUI/kde4/p7zip_compress.desktop || die
insinto /usr/share/kservices5/ServiceMenus
doins GUI/kde4/*.desktop
- dodir /usr/share/kde4/services/ServiceMenus # drop these lines after konqueror:4/krusader:4 are gone
- for item in "${ED}"/usr/share/kservices5/ServiceMenus/*.desktop; do
- item="$(basename ${item})"
- dosym ${EROOT}"/usr/share/kservices5/ServiceMenus/${item}" "/usr/share/kde4/services/ServiceMenus/${item}"
- done
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}
+ exeinto /usr/$(get_libdir)/p7zip
doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
doexe bin/*$(get_modname)
if use rar; then
- exeinto /usr/$(get_libdir)/${PN}/Codecs/
+ exeinto /usr/$(get_libdir)/p7zip/Codecs
doexe bin/Codecs/*$(get_modname)
fi
doman man1/7z.1 man1/7za.1 man1/7zr.1
- if use doc; then
- dodoc DOC/*.txt
- docinto html
- dodoc -r DOC/MANUAL/*
- fi
+ dodoc ChangeLog README TODO
+ dodoc DOC/*.txt
+ docinto html
+ dodoc -r DOC/MANUAL/.
}
diff --git a/app-arch/p7zip/p7zip-17.05-r1.ebuild b/app-arch/p7zip/p7zip-17.05-r1.ebuild
new file mode 100644
index 000000000000..324ae0051c52
--- /dev/null
+++ b/app-arch/p7zip/p7zip-17.05-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs wrapper xdg
+
+DESCRIPTION="Port of 7-Zip archiver for Unix"
+HOMEPAGE="https://github.com/p7zip-project/p7zip"
+SRC_URI="https://github.com/p7zip-project/p7zip/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+#S="${WORKDIR}/${PN}-${PV}"
+
+LICENSE="LGPL-2.1 rar? ( unRAR )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="abi_x86_x32 natspec +pch rar static"
+
+RDEPEND="natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
+ amd64? ( dev-lang/yasm )
+ x86? ( dev-lang/nasm )"
+
+PATCHES=(
+ "${FILESDIR}/p7zip-17.05-unit64.patch"
+)
+
+src_prepare() {
+ default
+
+ if use natspec; then
+ eapply "${FILESDIR}"/${P}-natspec.patch
+ sed -i '/^LOCAL_LIBS/s/$/ -lnatspec/' makefile.* || die
+ fi
+
+ 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|-pipe||g' \
+ -e "/[ALL|OPT]FLAGS/s|-s||;/OPTIMIZE/s|-s||" \
+ -e "/CFLAGS=/s|=|+=|" \
+ -e "/CXXFLAGS=/s|=|+=|" \
+ -i makefile* || die
+
+ # remove non-free RAR codec
+ if ! use rar; then
+ sed \
+ -e '/Rar/d' \
+ -e '/RAR/d' \
+ -i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die
+ rm -r CPP/7zip/Compress/Rar || die
+ fi
+
+ if use abi_x86_x32; then
+ sed -i -e "/^ASM=/s:amd64:x32:" makefile* || die
+ 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, it doesn't matter so much for bitwidth, for it doesn't
+ # do anything with it
+ cp -f makefile.macosx_llvm_64bits makefile.machine || die
+ # 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.list \
+ $(use rar && echo CPP/7zip/Compress/Rar/makefile.list) || die
+ fi
+
+ if use static; then
+ sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" all3
+}
+
+src_test() {
+ emake test test_7z test_7zr
+}
+
+src_install() {
+ # these wrappers cannot be symlinks, p7zip should be called with full path
+ make_wrapper 7zr /usr/$(get_libdir)/p7zip/7zr
+ make_wrapper 7za /usr/$(get_libdir)/p7zip/7za
+ make_wrapper 7z /usr/$(get_libdir)/p7zip/7z
+
+ dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
+ doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
+
+ exeinto /usr/$(get_libdir)/p7zip
+ doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
+ doexe bin/*$(get_modname)
+ if use rar; then
+ exeinto /usr/$(get_libdir)/p7zip/Codecs
+ doexe bin/Codecs/*$(get_modname)
+ fi
+
+ doman man1/7z.1 man1/7za.1 man1/7zr.1
+
+ dodoc ChangeLog README TODO
+ dodoc DOC/*.txt
+ docinto html
+ dodoc -r DOC/MANUAL/.
+}