diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-04-14 17:46:07 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-04-14 17:46:07 +0100 |
commit | 234dc35b5df19cfe20396a10855ce4e70b8b43bc (patch) | |
tree | ac566e09df315eef8fd8be0d3233e33355fe92fa /app-arch/p7zip | |
parent | ee6e636931804ef8c1d7f395e3a3400b9f8f5614 (diff) |
gentoo auto-resync : 14:04:2023 - 17:46:06
Diffstat (limited to 'app-arch/p7zip')
-rw-r--r-- | app-arch/p7zip/Manifest | 7 | ||||
-rw-r--r-- | app-arch/p7zip/files/p7zip-17.05-natspec.patch | 130 | ||||
-rw-r--r-- | app-arch/p7zip/metadata.xml | 3 | ||||
-rw-r--r-- | app-arch/p7zip/p7zip-17.05-r1.ebuild (renamed from app-arch/p7zip/p7zip-17.05.ebuild) | 10 |
4 files changed, 141 insertions, 9 deletions
diff --git a/app-arch/p7zip/Manifest b/app-arch/p7zip/Manifest index b7258eb84bbb..059b2c297541 100644 --- a/app-arch/p7zip/Manifest +++ b/app-arch/p7zip/Manifest @@ -4,8 +4,9 @@ AUX CVE-2018-10115.patch 8946 BLAKE2B 21fc8367ec1c811119bd43b5ca8ac1399748d4fe0c AUX CVE-2018-5996.patch 6427 BLAKE2B a60d4c51470d9a1ee58afc4ced5190dc589c78604dfd8cefdb5f4caca74d73f175722f777c4c13839951178b394c44b69577c8b5125f45581890dfaf1325d47d SHA512 7962a03430b94aec7c93d6dabee340f4f5915d728ba4df0dcaae483ab9c29115818e5e944572a3fd910addad8799c6a1e3911f6a0a02b661f804eea11c3a0f40 AUX WimHandler.cpp.patch 413 BLAKE2B 06e1ef38fbb8ae11f9c28df68c7e15db52060974930f61bdd5a04d970bc71f724a5122b05ad24b0e89d6b2142f54762ce4b6467d25345fca89075d6626abf9b3 SHA512 c246a7d912ec965b5212a510893aa1c9bd47b66b8f0fb47c03d46e5f3f891e2134cb8733594fd84f7e6034ebf07a9aac633230e2a0eebfb476f6429469058a75 AUX p7zip-16.02-darwin.patch 2134 BLAKE2B f8890b8b3e0a3ade007f162e5d3b7fdc9925e8960c6e22463a5ebc474e4ebb2577f0cc0312fda6c129bd1a02dc3ac6d3de17f2c551ee710ab36d0658acfaec52 SHA512 ed8689e39e5bd55eb9cc74c02c94782ac893fc30079492dbde459f24d07037ca63c91526ea428934814febbfbcd1f80c0683cd40d48eab055a3f856b1d78fb37 -DIST p7zip-17.05.tar.gz 6722048 BLAKE2B 3aa653b7875bb1b5ce96af7f7b8f4097860a9e5f0e172803fde6917ae4b7ef9c9e06d1daa31b7e33bb4ff91302972e8ece10f846bfa152fa6c783b234ac77ed3 SHA512 973fd906eaf376ca7d1d0738bb9aa137dcae3a6b17f974d3afc6bbb4efab4c7afa78e3dc9fbdf7b6d37630c9986ddaca7afc209ba18da1ed27944ee88a321a55 +AUX p7zip-17.05-natspec.patch 5485 BLAKE2B 2a84c98b0be0b113151f35ceced7a4140c25cee24b07fdd9de04ee50be0f4538decbb9992b07aec27493bb3a785501fcecd0194696521c7e7def53f34ee17b9d SHA512 76413b491a59783849a20f11acd98c234725c92f6a97bdc41ec1fa90cc805f0d510a1386207304c9fa5a0267c171518b6d55b709e905107ea81548ef3f8c1704 +DIST p7zip-17.05.tar.gz 6722154 BLAKE2B 0bcba638d3acaf2aa270e02693ad4295dfcc6b388037bdb446e25f3f4e1cb34f1b05bbc9a845364ca770625c32b2d7f55f63f504ad8e0863fff4bf940ae1fddd SHA512 97a7cfd15287998eb049c320548477be496c4ddf6b45c833c42adca4ab88719b07a442ae2e71cf2dc3b30a0777a3acab0a1a30f01fd85bacffa3fa9bd22c3f7d DIST p7zip_16.02_src_all.tar.bz2 4239909 BLAKE2B 075356fba5284cbb124e30c36364a910ae5a7ac6bee8a8fb682c5a7ce2f1870ef83d3160c84f8dabad1d616c13d642cba1f19fb9384160d21590cf678dd8f1a6 SHA512 d2c4d53817f96bb4c7683f42045198d4cd509cfc9c3e2cb85c8d9dc4ab6dfa7496449edeac4e300ecf986a9cbbc90bd8f8feef8156895d94617c04e507add55f EBUILD p7zip-16.02-r8.ebuild 4121 BLAKE2B 4ef2d330b6101f3b7d483063aaf43a11c4bf534a47232964907b36406588636211203cea3677dd5a84033599011cdcba2fdc74a6582eac713678acfda5164025 SHA512 b6ef5b20415ee9c4d458ae973c1b5334de3814268c8edf8ffdc7a9dff81a18cf5a30183e1bdd48a2edaf35123945db39814d2f55073b08fb4c71c067243ee954 -EBUILD p7zip-17.05.ebuild 3118 BLAKE2B 205bfbd5f670fac786879781bacc37c33df15cd5c3df2212d24d0629f8c64da5b37bc35c48c0f13eb0bd90d21849e856ad7a359eb87b355da22a9aac130bce5e SHA512 170c380c83f034da658db8efde6a7038dd88cba3163c656fa4bb0033186b4b24ee356e347df91d13ed1c2a4f7208bedb1d16a22a08c5b0c873b38ff16d9628c0 -MISC metadata.xml 394 BLAKE2B b24ef3a3f4e4c20632e2c01682aad6050ac6e988e0126064fc445ec167c0d60b991a98d45eafcf5c18b58ff26f7ccddd80bb120c07689cf894e75f9cf60cf8b5 SHA512 498c69a7e2a9643c3e2584a6fcb20afcc46ee10645e3b77e2ac517cbeac6a3013bd3526832cbb4c274a1a97d1cf94d958d71496407db5633fe33a59276463057 +EBUILD p7zip-17.05-r1.ebuild 3156 BLAKE2B 1a5cf6a7d94f30dad2f44c04b33e28b83e70233777787ed8fc293dfc7880baf8f3964b1da5a2b00b1caa4b41595f2e2d12379ce2aef26d9db2aedc06ed33a6fc SHA512 158c208b2a8263720d74741d169ffe2c8da919d261938157fb26d055c9e23c5a1811bf19f8776f72b1bdea34e4b2f1fb777ea7b34a4efa174ab1783338a7c947 +MISC metadata.xml 532 BLAKE2B 9ffdc29d8d8f6a82e7a55f4448870a4dd019468a440ade6df10ad1336617d14c1d975a7db032fce3397358132cee15bb317c9bed554de57e8f3ecbb284931a32 SHA512 807a53919ad3b19c280be0033ae264d89ad438b9d51763c7a27be3576ca496af9966d2f62594a707a1242c0b813298b01da6c2a55469af777e47944a80b00f25 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..45f24559a4c8 --- /dev/null +++ b/app-arch/p7zip/files/p7zip-17.05-natspec.patch @@ -0,0 +1,130 @@ +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/makefile.machine b/makefile.machine +index a89b568..3e12592 100644 +--- a/makefile.machine ++++ b/makefile.machine +@@ -16,7 +16,7 @@ CC=gcc + CC_SHARED=-fPIC + LINK_SHARED=-fPIC -shared + +-LOCAL_LIBS=-lpthread ++LOCAL_LIBS=-lpthread -lnatspec + LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + + OBJ_CRC32=$(OBJ_CRC32_C) diff --git a/app-arch/p7zip/metadata.xml b/app-arch/p7zip/metadata.xml index 762c5a16f7fe..6a21e35bb813 100644 --- a/app-arch/p7zip/metadata.xml +++ b/app-arch/p7zip/metadata.xml @@ -5,9 +5,10 @@ <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-17.05.ebuild b/app-arch/p7zip/p7zip-17.05-r1.ebuild index 0d5e544d4797..dbb6ca8a3567 100644 --- a/app-arch/p7zip/p7zip-17.05.ebuild +++ b/app-arch/p7zip/p7zip-17.05-r1.ebuild @@ -3,7 +3,6 @@ EAPI=7 -WX_GTK_VER="3.0-gtk3" inherit multilib toolchain-funcs wrapper xdg DESCRIPTION="Port of 7-Zip archiver for Unix" @@ -14,8 +13,9 @@ SRC_URI="https://github.com/p7zip-project/p7zip/archive/v${PV}.tar.gz -> ${P}.ta LICENSE="LGPL-2.1 rar? ( unRAR )" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris" -IUSE="abi_x86_x32 doc +pch rar static" +IUSE="abi_x86_x32 doc natspec +pch rar static" +RDEPEND="natspec? ( dev-libs/libnatspec )" DEPEND="${RDEPEND}" BDEPEND=" abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 ) @@ -25,6 +25,8 @@ BDEPEND=" src_prepare() { default + use natspec && eapply "${FILESDIR}"/${P}-natspec.patch + if ! use pch; then sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die fi @@ -39,9 +41,7 @@ src_prepare() { -i makefile* || die # remove non-free RAR codec - if use rar; then - ewarn "Enabling nonfree RAR decompressor" - else + if ! use rar; then sed \ -e '/Rar/d' \ -e '/RAR/d' \ |