[Midnightbsd-cvs] mports [24386] U trunk/archivers/unrar/files: update to 5.50
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Sep 25 16:36:11 EDT 2018
Revision: 24386
http://svnweb.midnightbsd.org/mports/?rev=24386
Author: laffer1
Date: 2018-09-25 16:36:10 -0400 (Tue, 25 Sep 2018)
Log Message:
-----------
update to 5.50
Modified Paths:
--------------
trunk/archivers/unrar/Makefile
trunk/archivers/unrar/distinfo
trunk/archivers/unrar/files/patch-os.hpp
trunk/archivers/unrar/files/patch-rijndael.cpp
trunk/archivers/unrar/files/patch-rijndael.hpp
Property Changed:
----------------
trunk/archivers/unrar/files/patch-os.hpp
trunk/archivers/unrar/files/patch-rijndael.cpp
trunk/archivers/unrar/files/patch-rijndael.hpp
Modified: trunk/archivers/unrar/Makefile
===================================================================
--- trunk/archivers/unrar/Makefile 2018-09-25 20:30:15 UTC (rev 24385)
+++ trunk/archivers/unrar/Makefile 2018-09-25 20:36:10 UTC (rev 24386)
@@ -2,23 +2,31 @@
# $FreeBSD: ports/archivers/unrar/Makefile,v 1.46 2006/08/17 01:46:32 ache Exp $
PORTNAME= unrar
-PORTVERSION= 4.20
+PORTVERSION= 5.50
PORTREVISION= 0
PORTEPOCH= 5
CATEGORIES+= archivers
MASTER_SITES= http://www.rarlab.com/rar/ \
FREEBSD_LOCAL/sunpoet
-DISTNAME= unrarsrc-4.2.4
+DISTNAME= unrarsrc-5.5.8
MAINTAINER?= ports at MidnightBSD.org
COMMENT= Extract, view & test RAR archives
-LICENSE= other
+LICENSE=UNRAR
+LICENSE_FILE=${WRKSRC}/license.txt
+LICENSE_NAME=UnRAR license
+LICENSE_PERMS=auto-accept dist-mirror pkg-mirror
+BROKEN_SSL= openssl-devel
+
+OPTIONS_DEFINE= OPENSSL_AES
+OPTIONS_DEFAULT=OPENSSL_AES
+OPENSSL_AES_DESC= Use OpenSSL implementation of AES
+
WRKSRC= ${WRKDIR}/unrar
-USES= gmake
-MAKEFILE= makefile.unix
+MAKEFILE= makefile
CONFIGURE_TARGET= ${ARCH}-portbld-freebsd10.4
PLIST_FILES= bin/unrar
Modified: trunk/archivers/unrar/distinfo
===================================================================
--- trunk/archivers/unrar/distinfo 2018-09-25 20:30:15 UTC (rev 24385)
+++ trunk/archivers/unrar/distinfo 2018-09-25 20:36:10 UTC (rev 24386)
@@ -1,3 +1,3 @@
-SHA256 (unrarsrc-4.2.4.tar.gz) = 9432bf798e5f7123f3060f37b75b7c07f36f0091305f46473dcae9154f8cd686
-RMD160 (unrarsrc-4.2.4.tar.gz) = 53a590ed2a71be86a0a7abfe9c37ddc8dc869800
-SIZE (unrarsrc-4.2.4.tar.gz) = 164641
+TIMESTAMP = 1537907717
+SHA256 (unrarsrc-5.5.8.tar.gz) = 9b66e4353a9944bc140eb2a919ff99482dd548f858f5e296d809e8f7cdb2fcf4
+SIZE (unrarsrc-5.5.8.tar.gz) = 222285
Modified: trunk/archivers/unrar/files/patch-os.hpp
===================================================================
--- trunk/archivers/unrar/files/patch-os.hpp 2018-09-25 20:30:15 UTC (rev 24385)
+++ trunk/archivers/unrar/files/patch-os.hpp 2018-09-25 20:36:10 UTC (rev 24386)
@@ -1,12 +1,12 @@
---- os.hpp.orig 2012-04-05 22:20:56.000000000 +0200
-+++ os.hpp 2012-04-05 22:21:36.000000000 +0200
-@@ -193,6 +193,10 @@
- #include <utime.h>
+--- os.hpp.orig 2017-04-28 17:28:46 UTC
++++ os.hpp
+@@ -150,6 +150,10 @@
#include <locale.h>
+
+#ifdef OPENSSL_AES
+#include <openssl/evp.h>
-+#endif
++#endif // OPENSSL_AES
+
#ifdef S_IFLNK
#define SAVE_LINKS
Property changes on: trunk/archivers/unrar/files/patch-os.hpp
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Modified: trunk/archivers/unrar/files/patch-rijndael.cpp
===================================================================
--- trunk/archivers/unrar/files/patch-rijndael.cpp 2018-09-25 20:30:15 UTC (rev 24385)
+++ trunk/archivers/unrar/files/patch-rijndael.cpp 2018-09-25 20:36:10 UTC (rev 24386)
@@ -1,16 +1,16 @@
---- rijndael.cpp.orig 2012-01-09 14:46:08.000000000 +0100
-+++ rijndael.cpp 2012-04-05 23:36:23.000000000 +0200
+--- rijndael.cpp.orig 2017-04-28 17:28:47 UTC
++++ rijndael.cpp
@@ -7,6 +7,8 @@
- **************************************************************************/
+ ***************************************************************************/
#include "rar.hpp"
+#ifndef OPENSSL_AES
+
- const int uKeyLenInBytes=16, m_uRounds=10;
-
- static byte S[256],S5[256],rcon[30];
-@@ -54,6 +56,7 @@ inline void Copy128(byte *dest,const byt
+ #ifdef USE_SSE
+ #include <wmmintrin.h>
#endif
+@@ -56,6 +58,7 @@ inline void Copy128(byte *dest,const byt
+ #endif
}
+#endif // OPENSSL_AES
@@ -17,7 +17,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// API
-@@ -61,13 +64,21 @@ inline void Copy128(byte *dest,const byt
+@@ -63,14 +66,35 @@ inline void Copy128(byte *dest,const byt
Rijndael::Rijndael()
{
@@ -24,56 +24,99 @@
+#ifndef OPENSSL_AES
if (S[0]==0)
GenerateTables();
-+#endif
++#endif // OPENSSL_AES
+ CBCMode = true; // Always true for RAR.
}
- void Rijndael::init(Direction dir,const byte * key,byte * initVector)
+ void Rijndael::Init(bool Encrypt,const byte *key,uint keyLen,const byte * initVector)
{
+#ifdef OPENSSL_AES
++ const EVP_CIPHER *cipher;
++ switch(keyLen)
++ {
++ case 128:
++ cipher = EVP_aes_128_cbc();
++ break;
++ case 192:
++ cipher = EVP_aes_192_cbc();
++ break;
++ case 256:
++ cipher = EVP_aes_256_cbc();
++ break;
++ }
++
+ EVP_CIPHER_CTX_init(&ctx);
-+ EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, initVector,
-+ dir == Decrypt ? 0 : 1);
++ EVP_CipherInit_ex(&ctx, cipher, NULL, key, initVector, Encrypt);
+ EVP_CIPHER_CTX_set_padding(&ctx, 0);
-+#else
- m_direction = dir;
++#else // OPENSSL_AES
+ #ifdef USE_SSE
+ // Check SSE here instead of constructor, so if object is a part of some
+ // structure memset'ed before use, this variable is not lost.
+@@ -111,6 +135,7 @@ void Rijndael::Init(bool Encrypt,const b
- byte keyMatrix[_MAX_KEY_COLUMNS][4];
-@@ -82,6 +93,7 @@ void Rijndael::init(Direction dir,const
-
- if(m_direction == Decrypt)
+ if(!Encrypt)
keyEncToDec();
+#endif // OPENSSL_AES
}
+ void Rijndael::blockEncrypt(const byte *input,size_t inputLen,byte *outBuffer)
+@@ -118,6 +143,11 @@ void Rijndael::blockEncrypt(const byte *
+ if (inputLen <= 0)
+ return;
-@@ -91,6 +103,11 @@ size_t Rijndael::blockDecrypt(const byte
- if (input == 0 || inputLen <= 0)
- return 0;
++#ifdef OPENSSL_AES
++ int outLen;
++ EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen);
++ return;
++#else // OPENSSL_AES
+ size_t numBlocks = inputLen/16;
+ #ifdef USE_SSE
+ if (AES_NI)
+@@ -176,6 +206,7 @@ void Rijndael::blockEncrypt(const byte *
+ input += 16;
+ }
+ Copy128(m_initVector,prevBlock);
++#endif // OPENSSL_AES
+ }
+
+@@ -217,6 +248,11 @@ void Rijndael::blockDecrypt(const byte *
+ if (inputLen <= 0)
+ return;
+
+#ifdef OPENSSL_AES
+ int outLen;
+ EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen);
-+ return outLen;
-+#else
- byte block[16], iv[4][4];
- memcpy(iv,m_initVector,16);
++ return;
++#else // OPENSSL_AES
+ size_t numBlocks=inputLen/16;
+ #ifdef USE_SSE
+ if (AES_NI)
+@@ -279,6 +315,8 @@ void Rijndael::blockDecrypt(const byte *
+ }
-@@ -113,9 +130,11 @@ size_t Rijndael::blockDecrypt(const byte
memcpy(m_initVector,iv,16);
-
- return 16*numBlocks;
++
+#endif // OPENSSL_AES
}
+@@ -314,7 +352,7 @@ void Rijndael::blockDecryptSSE(const byt
+ }
+ #endif
+
+-
+#ifndef OPENSSL_AES
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ALGORITHM
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -296,3 +315,5 @@ void Rijndael::GenerateTables()
+@@ -454,7 +492,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]=FFmul0e(b);
}
}
-+
+-
+#endif // OPENSSL_AES
+
+ #if 0
+ static void TestRijndael();
Property changes on: trunk/archivers/unrar/files/patch-rijndael.cpp
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Modified: trunk/archivers/unrar/files/patch-rijndael.hpp
===================================================================
--- trunk/archivers/unrar/files/patch-rijndael.hpp 2018-09-25 20:30:15 UTC (rev 24385)
+++ trunk/archivers/unrar/files/patch-rijndael.hpp 2018-09-25 20:36:10 UTC (rev 24386)
@@ -1,24 +1,20 @@
---- rijndael.hpp.orig 2012-01-09 14:46:08.000000000 +0100
-+++ rijndael.hpp 2012-04-05 22:42:56.000000000 +0200
-@@ -18,15 +18,21 @@ class Rijndael
- public:
- enum Direction { Encrypt , Decrypt };
+--- rijndael.hpp.orig 2017-04-28 17:28:47 UTC
++++ rijndael.hpp
+@@ -16,6 +16,9 @@
+ class Rijndael
+ {
private:
-+#ifndef OPENSSL_AES
++#ifdef OPENSSL_AES
++ EVP_CIPHER_CTX ctx;
++#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);
+@@ -25,6 +28,7 @@ class Rijndael
void keySched(byte key[_MAX_KEY_COLUMNS][4]);
void keyEncToDec();
- void encrypt(const byte a[16], byte b[16]);
- void decrypt(const byte a[16], byte b[16]);
void GenerateTables();
-+#endif
++#endif // OPENSSL_AES
-+#ifdef OPENSSL_AES
-+ EVP_CIPHER_CTX ctx;
-+#else
- Direction m_direction;
- byte m_initVector[MAX_IV_SIZE];
- byte m_expandedKey[_MAX_ROUNDS+1][4][4];
-+#endif
- public:
- Rijndael();
- void init(Direction dir,const byte *key,byte *initVector);
+ // RAR always uses CBC, but we may need to turn it off when calling
+ // this code from other archive formats with CTR and other modes.
Property changes on: trunk/archivers/unrar/files/patch-rijndael.hpp
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list