Date: Fri, 28 Feb 2014 15:15:15 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r346526 - in head/archivers/unrar: . files Message-ID: <201402281515.s1SFFFdD040292@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Fri Feb 28 15:15:14 2014 New Revision: 346526 URL: http://svnweb.freebsd.org/changeset/ports/346526 QAT: https://qat.redports.org/buildarchive/r346526/ Log: - Update to 5.01 (5.0.14) - Use CONFLICTS_INSTALL instead off CONFLICTS - Respect LDFLAGS - Remove contiguous blank lines - Cosmetic change Thanks to: naddy, vanilla Modified: head/archivers/unrar/Makefile head/archivers/unrar/distinfo head/archivers/unrar/files/patch-os.hpp head/archivers/unrar/files/patch-rijndael.cpp head/archivers/unrar/files/patch-rijndael.hpp Modified: head/archivers/unrar/Makefile ============================================================================== --- head/archivers/unrar/Makefile Fri Feb 28 15:12:37 2014 (r346525) +++ head/archivers/unrar/Makefile Fri Feb 28 15:15:14 2014 (r346526) @@ -2,13 +2,12 @@ # $FreeBSD$ PORTNAME= unrar -PORTVERSION= 4.20 -PORTREVISION= 1 +PORTVERSION= 5.01 PORTEPOCH= 5 CATEGORIES+= archivers MASTER_SITES= http://www.rarlab.com/rar/ \ LOCAL/sunpoet -DISTNAME= unrarsrc-4.2.4 +DISTNAME= unrarsrc-5.0.14 MAINTAINER?= sunpoet@FreeBSD.org COMMENT= Extract, view & test RAR archives @@ -17,10 +16,11 @@ OPTIONS_DEFINE= DOCS OPENSSL_AES OPTIONS_DEFAULT=OPENSSL_AES OPENSSL_AES_DESC= Use OpenSSL implementation of AES -CONFLICTS?= zh-unrar-[0-9].* unrar-iconv-[0-9].* +CONFLICTS_INSTALL?= zh-unrar-[0-9].* unrar-iconv-[0-9].* -MAKE_ARGS= STRIP=${STRIP_CMD} CXX="${CXX}" -MAKEFILE= makefile.unix +LDFLAGS+= -pthread +MAKE_ARGS= CXX=${CXX} LDFLAGS="${LDFLAGS}" STRIP=${STRIP_CMD} +MAKEFILE= makefile USES+= gmake WRKSRC= ${WRKDIR}/${PORTNAME} @@ -30,9 +30,8 @@ PORTDOCS= license.txt readme.txt SLAVEDIRS= archivers/unrar-iconv chinese/unrar OPENSSL_AES_CPPFLAGS= -DOPENSSL_AES -I${OPENSSLINC} -OPENSSL_AES_USE= OPENSSL=yes OPENSSL_AES_LDFLAGS= -L${OPENSSLLIB} -lcrypto - +OPENSSL_AES_USE= OPENSSL=yes do-install: ${INSTALL_PROGRAM} ${WRKSRC}/unrar ${STAGEDIR}${PREFIX}/bin/ Modified: head/archivers/unrar/distinfo ============================================================================== --- head/archivers/unrar/distinfo Fri Feb 28 15:12:37 2014 (r346525) +++ head/archivers/unrar/distinfo Fri Feb 28 15:15:14 2014 (r346526) @@ -1,2 +1,2 @@ -SHA256 (unrarsrc-4.2.4.tar.gz) = 9432bf798e5f7123f3060f37b75b7c07f36f0091305f46473dcae9154f8cd686 -SIZE (unrarsrc-4.2.4.tar.gz) = 164641 +SHA256 (unrarsrc-5.0.14.tar.gz) = e276ea30a2dc9b8961a4268772e5b6caccaa984664e2d5255a43fcb0f5d59806 +SIZE (unrarsrc-5.0.14.tar.gz) = 209707 Modified: head/archivers/unrar/files/patch-os.hpp ============================================================================== --- head/archivers/unrar/files/patch-os.hpp Fri Feb 28 15:12:37 2014 (r346525) +++ head/archivers/unrar/files/patch-os.hpp Fri Feb 28 15:15:14 2014 (r346526) @@ -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 @@ +--- os.hpp.orig 2013-12-01 16:10:14.000000000 +0800 ++++ os.hpp 2014-02-04 08:46:43.448882590 +0800 +@@ -151,6 +151,10 @@ #include <utime.h> #include <locale.h> +#ifdef OPENSSL_AES +#include <openssl/evp.h> -+#endif ++#endif // OPENSSL_AES + #ifdef S_IFLNK #define SAVE_LINKS Modified: head/archivers/unrar/files/patch-rijndael.cpp ============================================================================== --- head/archivers/unrar/files/patch-rijndael.cpp Fri Feb 28 15:12:37 2014 (r346525) +++ head/archivers/unrar/files/patch-rijndael.cpp Fri Feb 28 15:15:14 2014 (r346526) @@ -1,15 +1,15 @@ ---- rijndael.cpp.orig 2012-01-09 14:46:08.000000000 +0100 -+++ rijndael.cpp 2012-04-05 23:36:23.000000000 +0200 +--- rijndael.cpp.orig 2013-12-01 16:10:14.000000000 +0800 ++++ rijndael.cpp 2014-02-04 08:42:17.943981810 +0800 @@ -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 + static byte T1[256][4],T2[256][4],T3[256][4],T4[256][4]; + static byte T5[256][4],T6[256][4],T7[256][4],T8[256][4]; +@@ -52,6 +54,7 @@ #endif } @@ -17,37 +17,50 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // API -@@ -61,13 +64,21 @@ inline void Copy128(byte *dest,const byt +@@ -59,13 +62,34 @@ Rijndael::Rijndael() { +#ifndef OPENSSL_AES if (S[0]==0) GenerateTables(); -+#endif ++#endif // OPENSSL_AES } - 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; - - byte keyMatrix[_MAX_KEY_COLUMNS][4]; -@@ -82,6 +93,7 @@ void Rijndael::init(Direction dir,const ++#else // OPENSSL_AES + uint uKeyLenInBytes; + switch(keyLen) + { +@@ -95,6 +119,7 @@ - if(m_direction == Decrypt) + if(!Encrypt) keyEncToDec(); +#endif // OPENSSL_AES } -@@ -91,6 +103,11 @@ size_t Rijndael::blockDecrypt(const byte +@@ -104,6 +129,11 @@ if (input == 0 || inputLen <= 0) return 0; @@ -55,11 +68,11 @@ + int outLen; + EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen); + return outLen; -+#else ++#else // OPENSSL_AES byte block[16], iv[4][4]; memcpy(iv,m_initVector,16); -@@ -113,9 +130,11 @@ size_t Rijndael::blockDecrypt(const byte +@@ -126,9 +156,11 @@ memcpy(m_initVector,iv,16); return 16*numBlocks; @@ -71,9 +84,11 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ALGORITHM ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -@@ -296,3 +315,5 @@ void Rijndael::GenerateTables() +@@ -309,6 +341,7 @@ 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 Modified: head/archivers/unrar/files/patch-rijndael.hpp ============================================================================== --- head/archivers/unrar/files/patch-rijndael.hpp Fri Feb 28 15:12:37 2014 (r346525) +++ head/archivers/unrar/files/patch-rijndael.hpp Fri Feb 28 15:15:14 2014 (r346526) @@ -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 2013-12-01 16:10:14.000000000 +0800 ++++ rijndael.hpp 2014-02-04 08:48:42.137144316 +0800 +@@ -16,6 +16,9 @@ + class Rijndael + { private: -+#ifndef OPENSSL_AES ++#ifdef OPENSSL_AES ++ EVP_CIPHER_CTX ctx; ++#else // OPENSSL_AES 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 - -+#ifdef OPENSSL_AES -+ EVP_CIPHER_CTX ctx; -+#else - Direction m_direction; +@@ -25,6 +28,7 @@ + int m_uRounds; byte m_initVector[MAX_IV_SIZE]; byte m_expandedKey[_MAX_ROUNDS+1][4][4]; -+#endif ++#endif // OPENSSL_AES public: Rijndael(); - void init(Direction dir,const byte *key,byte *initVector); + void Init(bool Encrypt,const byte *key,uint keyLen,const byte *initVector);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402281515.s1SFFFdD040292>