From owner-svn-ports-all@freebsd.org Sat Dec 31 18:34:20 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53EC3C990AF; Sat, 31 Dec 2016 18:34:20 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14CDF1F55; Sat, 31 Dec 2016 18:34:20 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBVIYJOo032841; Sat, 31 Dec 2016 18:34:19 GMT (envelope-from jhale@FreeBSD.org) Received: (from jhale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBVIYI70032832; Sat, 31 Dec 2016 18:34:18 GMT (envelope-from jhale@FreeBSD.org) Message-Id: <201612311834.uBVIYI70032832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhale set sender to jhale@FreeBSD.org using -f From: "Jason E. Hale" Date: Sat, 31 Dec 2016 18:34:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r430150 - in head/archivers: . libunrar5 libunrar5/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2016 18:34:20 -0000 Author: jhale Date: Sat Dec 31 18:34:18 2016 New Revision: 430150 URL: https://svnweb.freebsd.org/changeset/ports/430150 Log: New port: archivers/libunrar5 (copied from archivers/libunrar4) Update to 5.4.5 OpenSSL patches copied from archivers/unrar The UnRAR library is a minor part of the RAR archiver and contains the RAR uncompression algorithm. UnRAR requires a very small amount of memory to operate. It can be used by other programs to extract RAR archives. WWW: http://www.rarsoft.com/ Added: head/archivers/libunrar5/ - copied from r430147, head/archivers/libunrar4/ head/archivers/libunrar5/files/ head/archivers/libunrar5/files/patch-makefile (contents, props changed) head/archivers/libunrar5/files/patch-os.hpp - copied unchanged from r430147, head/archivers/unrar/files/patch-os.hpp head/archivers/libunrar5/files/patch-rijndael.cpp - copied unchanged from r430147, head/archivers/unrar/files/patch-rijndael.cpp head/archivers/libunrar5/files/patch-rijndael.hpp - copied unchanged from r430147, head/archivers/unrar/files/patch-rijndael.hpp Deleted: head/archivers/libunrar5/pkg-plist Modified: head/archivers/Makefile head/archivers/libunrar5/Makefile head/archivers/libunrar5/distinfo head/archivers/libunrar5/pkg-descr Modified: head/archivers/Makefile ============================================================================== --- head/archivers/Makefile Sat Dec 31 18:14:09 2016 (r430149) +++ head/archivers/Makefile Sat Dec 31 18:34:18 2016 (r430150) @@ -69,6 +69,7 @@ SUBDIR += librtfcomp SUBDIR += libunrar SUBDIR += libunrar4 + SUBDIR += libunrar5 SUBDIR += libzip SUBDIR += lrzip SUBDIR += lua-lzlib Modified: head/archivers/libunrar5/Makefile ============================================================================== --- head/archivers/libunrar4/Makefile Sat Dec 31 17:43:48 2016 (r430147) +++ head/archivers/libunrar5/Makefile Sat Dec 31 18:34:18 2016 (r430150) @@ -1,29 +1,58 @@ -# Created by: Joris Vandalon # $FreeBSD$ -PORTNAME= libunrar4 -PORTVERSION= 4.2.4 +PORTNAME= libunrar5 +PORTVERSION= 5.4.5 CATEGORIES= archivers MASTER_SITES= http://www.rarlab.com/rar/ DISTNAME= unrarsrc-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org -COMMENT= Library to work with RAR archives +MAINTAINER= jhale@FreeBSD.org +COMMENT= RAR archive extraction library -WRKSRC= ${WRKDIR}/unrar +LICENSE= UNRAR +LICENSE_NAME= UnRAR License +LICENSE_FILE= ${WRKSRC}/license.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept USES= gmake -MAKE_ARGS= CC="${CC}" CXX="${CXX}" -MAKEFILE= makefile.unix -ALL_TARGET= lib USE_LDCONFIG= yes -MAKE_JOBS_UNSAFE= yes +ALL_TARGET= lib liba +MAKEFILE= makefile +MAKE_ARGS= AR="${AR}" \ + CXX="${CXX}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="-Wl,-soname,${SONAME} -pthread ${LDFLAGS}" \ + STRIP="${STRIP_CMD}" +SONAME= libunrar.so.5 +WRKSRC= ${WRKDIR}/unrar + +CONFLICTS_INSTALL= libunrar-3* libunrar4-4* + +OPTIONS_DEFINE= OPENSSL_AES +OPTIONS_DEFAULT= OPENSSL_AES + +OPENSSL_AES_DESC= Use OpenSSL implementation of AES +OPENSSL_AES_CPPFLAGS= -DOPENSSL_AES -I${OPENSSLINC} +OPENSSL_AES_LDFLAGS= -L${OPENSSLLIB} -lcrypto +OPENSSL_AES_USES= ssl + +PLIST_FILES= lib/libunrar.a \ + lib/libunrar.so \ + lib/${SONAME} \ + include/libunrar5/dll.hpp do-install: - ${INSTALL_LIB} ${WRKSRC}/libunrar.so ${STAGEDIR}${PREFIX}/lib/libunrar.so.4 - cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf libunrar.so.4 libunrar.so - @${MKDIR} ${STAGEDIR}${PREFIX}/include/libunrar4 - ${INSTALL_DATA} ${WRKSRC}/dll.hpp ${STAGEDIR}${PREFIX}/include/libunrar4/dll.hpp + ${INSTALL_DATA} ${WRKSRC}/libunrar.a ${STAGEDIR}${PREFIX}/lib/libunrar.a + ${INSTALL_LIB} ${WRKSRC}/libunrar.so ${STAGEDIR}${PREFIX}/lib/${SONAME} + (cd ${STAGEDIR}${PREFIX}/lib; ${LN} -sf ${SONAME} libunrar.so) + @${MKDIR} ${STAGEDIR}${PREFIX}/include/libunrar5 + ${INSTALL_DATA} ${WRKSRC}/dll.hpp ${STAGEDIR}${PREFIX}/include/libunrar5/dll.hpp + +.include + +.if ${PORT_OPTIONS:MOPENSSL_AES} && ${SSL_DEFAULT:Mopenssl-devel} +BROKEN= OPENSSL_AES option does not build with openssl-devel +.endif -.include +.include Modified: head/archivers/libunrar5/distinfo ============================================================================== --- head/archivers/libunrar4/distinfo Sat Dec 31 17:43:48 2016 (r430147) +++ head/archivers/libunrar5/distinfo Sat Dec 31 18:34:18 2016 (r430150) @@ -1,2 +1,3 @@ -SHA256 (unrarsrc-4.2.4.tar.gz) = 9432bf798e5f7123f3060f37b75b7c07f36f0091305f46473dcae9154f8cd686 -SIZE (unrarsrc-4.2.4.tar.gz) = 164641 +TIMESTAMP = 1483207045 +SHA256 (unrarsrc-5.4.5.tar.gz) = e470c584332422893fb52e049f2cbd99e24dc6c6da971008b4e2ae4284f8796c +SIZE (unrarsrc-5.4.5.tar.gz) = 226320 Added: head/archivers/libunrar5/files/patch-makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/libunrar5/files/patch-makefile Sat Dec 31 18:34:18 2016 (r430150) @@ -0,0 +1,28 @@ +--- makefile.orig 2016-05-10 09:51:35 UTC ++++ makefile +@@ -98,7 +98,7 @@ LINK=$(CXX) + WHAT=UNRAR + + UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o qopen.o +-LIB_OBJ=filestr.o scantree.o dll.o qopen.o ++LIB_OBJ=dll.o + + OBJECTS=rar.o strlist.o strfn.o pathfn.o smallfn.o global.o file.o filefn.o filcreat.o \ + archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \ +@@ -131,9 +131,14 @@ sfx: clean $(OBJECTS) + + lib: WHAT=RARDLL + lib: CXXFLAGS+=$(LIBFLAGS) +-lib: clean $(OBJECTS) $(LIB_OBJ) ++lib: $(OBJECTS) $(LIB_OBJ) $(UNRAR_OBJ) + @rm -f libunrar.so +- $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ) ++ $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ) $(UNRAR_OBJ) ++ ++liba: WHAT=RARDLL ++liba: $(OBJECTS) $(LIB_OBJ) $(UNRAR_OBJ) ++ @rm -f libunrar.a ++ $(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ) $(UNRAR_OBJ) + + install-unrar: + install -D unrar $(DESTDIR)/bin/unrar Copied: head/archivers/libunrar5/files/patch-os.hpp (from r430147, head/archivers/unrar/files/patch-os.hpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/libunrar5/files/patch-os.hpp Sat Dec 31 18:34:18 2016 (r430150, copy of r430147, head/archivers/unrar/files/patch-os.hpp) @@ -0,0 +1,13 @@ +--- os.hpp.orig 2013-12-01 08:10:14 UTC ++++ os.hpp +@@ -151,6 +151,10 @@ + #include + #include + ++#ifdef OPENSSL_AES ++#include ++#endif // OPENSSL_AES ++ + #ifdef S_IFLNK + #define SAVE_LINKS + #endif Copied: head/archivers/libunrar5/files/patch-rijndael.cpp (from r430147, head/archivers/unrar/files/patch-rijndael.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/libunrar5/files/patch-rijndael.cpp Sat Dec 31 18:34:18 2016 (r430150, copy of r430147, head/archivers/unrar/files/patch-rijndael.cpp) @@ -0,0 +1,102 @@ +--- rijndael.cpp.orig 2014-06-10 17:14:06 UTC ++++ rijndael.cpp +@@ -7,6 +7,8 @@ + ***************************************************************************/ + #include "rar.hpp" + ++#ifndef OPENSSL_AES ++ + #ifdef USE_SSE + #include + #endif +@@ -56,6 +58,7 @@ + #endif + } + ++#endif // OPENSSL_AES + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // API +@@ -63,14 +66,35 @@ + + Rijndael::Rijndael() + { ++#ifndef OPENSSL_AES + if (S[0]==0) + GenerateTables(); ++#endif // OPENSSL_AES + CBCMode = true; // Always true for RAR. + } + + + 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, cipher, NULL, key, initVector, Encrypt); ++ EVP_CIPHER_CTX_set_padding(&ctx, 0); ++#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 @@ + + if(!Encrypt) + keyEncToDec(); ++#endif // OPENSSL_AES + } + + +@@ -120,6 +145,11 @@ + if (inputLen <= 0) + return; + ++#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) +@@ -182,6 +212,8 @@ + } + + memcpy(m_initVector,iv,16); ++ ++#endif // OPENSSL_AES + } + + +@@ -217,7 +249,7 @@ + } + #endif + +- ++#ifndef OPENSSL_AES + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // ALGORITHM + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +@@ -357,7 +389,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 + static void TestRijndael(); Copied: head/archivers/libunrar5/files/patch-rijndael.hpp (from r430147, head/archivers/unrar/files/patch-rijndael.hpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/libunrar5/files/patch-rijndael.hpp Sat Dec 31 18:34:18 2016 (r430150, copy of r430147, head/archivers/unrar/files/patch-rijndael.hpp) @@ -0,0 +1,20 @@ +--- rijndael.hpp.orig 2014-06-10 17:14:06 UTC ++++ rijndael.hpp +@@ -16,6 +16,9 @@ + class Rijndael + { + private: ++#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 @@ + void keySched(byte key[_MAX_KEY_COLUMNS][4]); + void keyEncToDec(); + void GenerateTables(); ++#endif // OPENSSL_AES + + // 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. Modified: head/archivers/libunrar5/pkg-descr ============================================================================== --- head/archivers/libunrar4/pkg-descr Sat Dec 31 17:43:48 2016 (r430147) +++ head/archivers/libunrar5/pkg-descr Sat Dec 31 18:34:18 2016 (r430150) @@ -1,7 +1,6 @@ - The UnRAR library is a minor part of the RAR archiver and contains - RAR uncompression algorithm. UnRAR requires very small volume of - memory to operate. - UnRAR library can be used by other programs to extract RAR archives. - This package contains small fixes from the http://mcmcc.bat.ru/clamav/. +The UnRAR library is a minor part of the RAR archiver and contains +the RAR uncompression algorithm. UnRAR requires a very small amount +of memory to operate. It can be used by other programs to extract +RAR archives. WWW: http://www.rarsoft.com/