git: f2851d33547f - main - archivers/unrar: Update to 7.00
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 09 Mar 2024 14:09:51 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=f2851d33547f765b2973040ccd5c7f8c3090203e commit f2851d33547f765b2973040ccd5c7f8c3090203e Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-03-09 13:44:42 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-03-09 14:05:17 +0000 archivers/unrar: Update to 7.00 - Use = instead of += for CATEGORIES after chinese/unrar removal (1377dcaf29d80a1de9682aa9eb111caf9e3c5a3e) - Simplify CONFLICTS_INSTALL Changes: https://www.rarlab.com/rarnew.htm --- archivers/unrar/Makefile | 12 ++--- archivers/unrar/distinfo | 6 +-- archivers/unrar/files/patch-os.hpp | 10 ++-- archivers/unrar/files/patch-rijndael.cpp | 83 ++++++++++++++++++++------------ archivers/unrar/files/patch-rijndael.hpp | 16 +++--- 5 files changed, 75 insertions(+), 52 deletions(-) diff --git a/archivers/unrar/Makefile b/archivers/unrar/Makefile index b8c803c5cdda..3165be2cf16c 100644 --- a/archivers/unrar/Makefile +++ b/archivers/unrar/Makefile @@ -1,20 +1,20 @@ PORTNAME= unrar -PORTVERSION= 6.24 +PORTVERSION= 7.00 PORTEPOCH= 6 -CATEGORIES+= archivers +CATEGORIES= archivers MASTER_SITES= https://www.rarlab.com/rar/ -DISTNAME= unrarsrc-6.2.12 +DISTNAME= unrarsrc-7.0.7 MAINTAINER?= sunpoet@FreeBSD.org COMMENT= Extract, view & test RAR archives WWW= https://www.rarlab.com/ LICENSE= UNRAR -LICENSE_FILE= ${WRKSRC}/license.txt LICENSE_NAME= UnRAR license +LICENSE_FILE= ${WRKSRC}/license.txt LICENSE_PERMS= auto-accept dist-mirror pkg-mirror -USES+= compiler:c++11-lang cpe +USES= compiler:c++11-lang cpe LDFLAGS+= -lpthread MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" STRIP="${STRIP_CMD}" @@ -25,7 +25,7 @@ PLIST_FILES= bin/unrar SLAVEDIRS= archivers/unrar-iconv -CONFLICTS_INSTALL?= unrar-iconv +CONFLICTS_INSTALL= unrar unrar-iconv CPE_VENDOR= rarlab diff --git a/archivers/unrar/distinfo b/archivers/unrar/distinfo index 34b058ff6cf0..4103e4a3a998 100644 --- a/archivers/unrar/distinfo +++ b/archivers/unrar/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1703227796 -SHA256 (unrarsrc-6.2.12.tar.gz) = a008b5f949bca9bb4ffa1bebbfc8b3c14b89df10a10354809b845232d5f582e5 -SIZE (unrarsrc-6.2.12.tar.gz) = 246918 +TIMESTAMP = 1709390346 +SHA256 (unrarsrc-7.0.7.tar.gz) = da95829c7e66fe461c06eb4bea8145e58d88d76909432d0875cd1ff86669f728 +SIZE (unrarsrc-7.0.7.tar.gz) = 258219 diff --git a/archivers/unrar/files/patch-os.hpp b/archivers/unrar/files/patch-os.hpp index ef633fb42257..1407daa40c51 100644 --- a/archivers/unrar/files/patch-os.hpp +++ b/archivers/unrar/files/patch-os.hpp @@ -1,10 +1,10 @@ ---- os.hpp.orig 2023-01-17 16:25:54 UTC +--- os.hpp.orig 2024-02-26 09:03:52 UTC +++ os.hpp -@@ -173,6 +173,10 @@ - #include <locale.h> - +@@ -165,6 +165,10 @@ + #endif + #endif -+#ifdef OPENSSL_AES ++#if defined(OPENSSL_AES) +#include <openssl/evp.h> +#endif // OPENSSL_AES + diff --git a/archivers/unrar/files/patch-rijndael.cpp b/archivers/unrar/files/patch-rijndael.cpp index 92b411d99b5c..5a4d38cb0abf 100644 --- a/archivers/unrar/files/patch-rijndael.cpp +++ b/archivers/unrar/files/patch-rijndael.cpp @@ -1,37 +1,44 @@ ---- rijndael.cpp.orig 2023-01-17 16:25:54 UTC +--- rijndael.cpp.orig 2024-02-26 09:03:53 UTC +++ rijndael.cpp -@@ -3,6 +3,8 @@ +@@ -3,6 +3,7 @@ **************************************************************************/ #include "rar.hpp" -+#ifndef OPENSSL_AES -+ ++#if !defined(OPENSSL_AES) #ifdef USE_SSE #include <wmmintrin.h> #endif -@@ -75,6 +77,7 @@ inline void Copy128(byte *dest,const byte *src) +@@ -74,6 +75,7 @@ inline void Copy128(byte *dest,const byte *src) + dest[I]=src[I]; #endif } - +#endif // OPENSSL_AES + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // API -@@ -82,14 +85,41 @@ inline void Copy128(byte *dest,const byte *src) +@@ -82,20 +84,49 @@ Rijndael::Rijndael() Rijndael::Rijndael() { -+#ifndef OPENSSL_AES ++#if !defined(OPENSSL_AES) if (S5[0]==0) GenerateTables(); +#endif // OPENSSL_AES CBCMode = true; // Always true for RAR. ++#if !defined(OPENSSL_AES) + #ifdef USE_SSE + AES_NI=false; + #endif + #ifdef USE_NEON_AES + AES_Neon=false; + #endif ++#endif // OPENSSL_AES } void Rijndael::Init(bool Encrypt,const byte *key,uint keyLen,const byte * initVector) { -+#ifdef OPENSSL_AES ++#if defined(OPENSSL_AES) + const EVP_CIPHER *cipher; + switch(keyLen) + { @@ -50,16 +57,16 @@ + EVP_CIPHER_CTX_init(&ctx); + EVP_CipherInit_ex(&ctx, cipher, NULL, key, initVector, Encrypt); + EVP_CIPHER_CTX_set_padding(&ctx, 0); -+#else ++#else // OPENSSL_VERSION_NUMBER + EVP_CIPHER_CTX_init(ctx); + EVP_CipherInit_ex(ctx, cipher, NULL, key, initVector, Encrypt); + EVP_CIPHER_CTX_set_padding(ctx, 0); -+#endif ++#endif // OPENSSL_VERSION_NUMBER +#else // OPENSSL_AES // Check SIMD here instead of constructor, so if object is a part of some // structure memset'ed before use, these variables are not lost. #if defined(USE_SSE) -@@ -141,6 +171,7 @@ void Rijndael::Init(bool Encrypt,const byte *key,uint +@@ -165,6 +196,7 @@ void Rijndael::Init(bool Encrypt,const byte *key,uint if(!Encrypt) keyEncToDec(); @@ -67,23 +74,23 @@ } -@@ -149,6 +180,15 @@ void Rijndael::blockEncrypt(const byte *input,size_t i +@@ -173,6 +205,15 @@ void Rijndael::blockEncrypt(const byte *input,size_t i if (inputLen <= 0) return; -+#ifdef OPENSSL_AES ++#if defined(OPENSSL_AES) + int outLen; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen); -+#else ++#else // OPENSSL_VERSION_NUMBER + EVP_CipherUpdate(ctx, outBuffer, &outLen, input, inputLen); -+#endif ++#endif // OPENSSL_VERSION_NUMBER + return; +#else // OPENSSL_AES size_t numBlocks = inputLen/16; #if defined(USE_SSE) if (AES_NI) -@@ -213,6 +253,7 @@ void Rijndael::blockEncrypt(const byte *input,size_t i +@@ -237,9 +278,11 @@ void Rijndael::blockEncrypt(const byte *input,size_t i input += 16; } Copy128(m_initVector,prevBlock); @@ -91,46 +98,62 @@ } -@@ -288,6 +329,15 @@ void Rijndael::blockDecrypt(const byte *input, size_t ++#if !defined(OPENSSL_AES) + #ifdef USE_SSE + void Rijndael::blockEncryptSSE(const byte *input,size_t numBlocks,byte *outBuffer) + { +@@ -305,6 +348,7 @@ void Rijndael::blockEncryptNeon(const byte *input,size + return; + } + #endif ++#endif // OPENSSL_AES + + + void Rijndael::blockDecrypt(const byte *input, size_t inputLen, byte *outBuffer) +@@ -312,6 +356,15 @@ void Rijndael::blockDecrypt(const byte *input, size_t if (inputLen <= 0) return; -+#ifdef OPENSSL_AES ++#if defined(OPENSSL_AES) + int outLen; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen); -+#else ++#else // OPENSSL_VERSION_NUMBER + EVP_CipherUpdate(ctx, outBuffer, &outLen, input, inputLen); -+#endif ++#endif // OPENSSL_VERSION_NUMBER + return; +#else // OPENSSL_AES size_t numBlocks=inputLen/16; #if defined(USE_SSE) if (AES_NI) -@@ -356,6 +406,8 @@ void Rijndael::blockDecrypt(const byte *input, size_t +@@ -380,9 +433,11 @@ void Rijndael::blockDecrypt(const byte *input, size_t } memcpy(m_initVector,iv,16); -+ +#endif // OPENSSL_AES } -@@ -426,7 +478,7 @@ void Rijndael::blockDecryptNeon(const byte *input, siz ++#if !defined(OPENSSL_AES) + #ifdef USE_SSE + void Rijndael::blockDecryptSSE(const byte *input, size_t numBlocks, byte *outBuffer) + { +@@ -449,8 +504,10 @@ void Rijndael::blockDecryptNeon(const byte *input, siz + memcpy(m_initVector,iv,16); } #endif ++#endif // OPENSSL_AES -- -+#ifndef OPENSSL_AES + ++#if !defined(OPENSSL_AES) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ALGORITHM ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -@@ -555,7 +607,7 @@ void Rijndael::GenerateTables() +@@ -579,6 +636,7 @@ void Rijndael::GenerateTables() U1[b][0]=U2[b][1]=U3[b][2]=U4[b][3]=T5[I][0]=T6[I][1]=T7[I][2]=T8[I][3]=gmul(b,0xe); } } -- +#endif // OPENSSL_AES + #if 0 - static void TestRijndael(); diff --git a/archivers/unrar/files/patch-rijndael.hpp b/archivers/unrar/files/patch-rijndael.hpp index 0e1ccbfbd379..09ab2a798f94 100644 --- a/archivers/unrar/files/patch-rijndael.hpp +++ b/archivers/unrar/files/patch-rijndael.hpp @@ -1,20 +1,20 @@ ---- rijndael.hpp.orig 2023-01-17 16:25:54 UTC +--- rijndael.hpp.orig 2024-02-26 09:03:53 UTC +++ rijndael.hpp -@@ -12,6 +12,13 @@ +@@ -12,6 +12,13 @@ class Rijndael class Rijndael { private: -+#ifdef OPENSSL_AES ++#if defined(OPENSSL_AES) +#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CIPHER_CTX ctx; -+#else ++#else // OPENSSL_VERSION_NUMBER + EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); -+#endif ++#endif // OPENSSL_VERSION_NUMBER +#else // OPENSSL_AES + #ifdef USE_SSE - void blockEncryptSSE(const byte *input,size_t numBlocks,byte *outBuffer); - void blockDecryptSSE(const byte *input, size_t numBlocks, byte *outBuffer); -@@ -31,6 +38,7 @@ class Rijndael + #ifdef __GNUC__ +@@ -40,6 +47,7 @@ class Rijndael void keySched(byte key[_MAX_KEY_COLUMNS][4]); void keyEncToDec(); void GenerateTables();