1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= RAR uncompression program and library
8 HOMEPAGE= https://www.rarlab.com/
12 SITES[main]= https://www.rarlab.com/rar/
13 DISTFILE[1]= unrarsrc-5.6.5.tar.gz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
24 LICENSE= CUSTOM1:single
25 LICENSE_NAME= CUSTOM1:"unRAR License"
26 LICENSE_FILE= CUSTOM1:{{WRKSRC}}/license.txt
29 BUILD_TARGET= unrar lib
32 CPPFLAGS= -I{{OPENSSLINC}}
34 LDFLAGS= -L{{OPENSSLLIB}}
38 @${MKDIR} ${STAGEDIR}${PREFIX}/include/unrar
39 ${INSTALL_PROGRAM} ${WRKSRC}/unrar ${STAGEDIR}${PREFIX}/bin/
40 ${INSTALL_DATA} ${WRKSRC}/libunrar.a ${STAGEDIR}${PREFIX}/lib/
41 ${INSTALL_LIB} ${WRKSRC}/libunrar.so ${STAGEDIR}${PREFIX}/lib/libunrar.so.5
42 ${LN} -s libunrar.so.5 ${STAGEDIR}${PREFIX}/lib/libunrar.so
43 ${INSTALL_DATA} ${WRKSRC}/dll.hpp ${STAGEDIR}${PREFIX}/include/unrar/dll.hpp
45 [FILE:428:descriptions/desc.single]
46 The unRAR utility is a freeware program, distributed with source code and
47 developed for extracting, testing and viewing the contents of archives
48 created with the RAR archiver, version 1.50 and above.
50 The UnRAR library and utility are a minor part of the RAR archiver and
51 contain the RAR uncompression algorithm. UnRAR requires a very small
52 amount of memory to operate. It can be used by other programs to extract
57 eba36a421bf41491818dee9507d934064622bc0bd9db6bbb8422a4706f200898 226296 unrarsrc-5.6.5.tar.gz
60 [FILE:77:manifests/plist.single]
69 [FILE:1557:patches/patch-makefile]
70 --- makefile.orig 2017-11-22 06:53:39 UTC
73 # Makefile for UNIX - unrar
77 -CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
79 -DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
85 +CXXFLAGS?= -O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
86 +DEFINES= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
94 @@ -128,9 +127,16 @@ OBJECTS=rar.o strlist.o strfn.o pathfn.o
95 rijndael.o getbits.o sha1.o sha256.o blake2s.o hash.o extinfo.o extract.o volume.o \
96 list.o find.o unpack.o headers.o threadpool.o rs16.o cmddata.o ui.o
100 +SOBJECTS= ${OBJECTS:.o=.so} ${LIB_OBJ:.o=.so}
103 $(COMPILE) -D$(WHAT) -c $<
106 + $(COMPILE) -DRARDLL -fPIC -o ${.TARGET} -c ${.IMPSRC}
110 install: install-unrar
111 @@ -151,13 +157,11 @@ sfx: clean $(OBJECTS)
112 $(LINK) -o default.sfx $(LDFLAGS) $(OBJECTS)
116 -lib: CXXFLAGS+=$(LIBFLAGS)
117 -lib: clean $(OBJECTS) $(LIB_OBJ)
121 - $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
122 - $(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
123 + $(LINK) -shared -o libunrar.so $(LDFLAGS) -Wl,-soname,libunrar.so.5 $(SOBJECTS)
124 + $(AR) rcs libunrar.a $(SOBJECTS)
127 install -D unrar $(DESTDIR)/bin/unrar
130 [FILE:213:patches/patch-os.hpp]
131 --- os.hpp.orig 2018-06-24 15:10:31 UTC
138 +#include <openssl/evp.h>
139 +#endif // OPENSSL_AES
146 [FILE:3006:patches/patch-rijndael.cpp]
147 --- rijndael.cpp.orig 2018-06-24 15:10:31 UTC
150 ***************************************************************************/
156 #include <wmmintrin.h>
158 @@ -56,6 +58,7 @@ inline void Copy128(byte *dest,const byt
162 +#endif // OPENSSL_AES
164 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
166 @@ -63,14 +66,35 @@ inline void Copy128(byte *dest,const byt
173 +#endif // OPENSSL_AES
174 CBCMode = true; // Always true for RAR.
178 void Rijndael::Init(bool Encrypt,const byte *key,uint keyLen,const byte * initVector)
181 + const EVP_CIPHER *cipher;
185 + cipher = EVP_aes_128_cbc();
188 + cipher = EVP_aes_192_cbc();
191 + cipher = EVP_aes_256_cbc();
195 + EVP_CIPHER_CTX_init(&ctx);
196 + EVP_CipherInit_ex(&ctx, cipher, NULL, key, initVector, Encrypt);
197 + EVP_CIPHER_CTX_set_padding(&ctx, 0);
198 +#else // OPENSSL_AES
200 // Check SSE here instead of constructor, so if object is a part of some
201 // structure memset'ed before use, this variable is not lost.
202 @@ -111,6 +135,7 @@ void Rijndael::Init(bool Encrypt,const b
206 +#endif // OPENSSL_AES
209 void Rijndael::blockEncrypt(const byte *input,size_t inputLen,byte *outBuffer)
210 @@ -118,6 +143,11 @@ void Rijndael::blockEncrypt(const byte *
216 + EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen);
218 +#else // OPENSSL_AES
219 size_t numBlocks = inputLen/16;
222 @@ -176,6 +206,7 @@ void Rijndael::blockEncrypt(const byte *
225 Copy128(m_initVector,prevBlock);
226 +#endif // OPENSSL_AES
230 @@ -217,6 +248,11 @@ void Rijndael::blockDecrypt(const byte *
236 + EVP_CipherUpdate(&ctx, outBuffer, &outLen, input, inputLen);
238 +#else // OPENSSL_AES
239 size_t numBlocks=inputLen/16;
242 @@ -279,6 +315,8 @@ void Rijndael::blockDecrypt(const byte *
245 memcpy(m_initVector,iv,16);
247 +#endif // OPENSSL_AES
251 @@ -314,7 +352,7 @@ void Rijndael::blockDecryptSSE(const byt
257 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
259 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
260 @@ -454,7 +492,7 @@ void Rijndael::GenerateTables()
261 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);
265 +#endif // OPENSSL_AES
268 static void TestRijndael();
271 [FILE:662:patches/patch-rijndael.hpp]
272 --- rijndael.hpp.orig 2018-06-24 15:10:31 UTC
279 + EVP_CIPHER_CTX ctx;
280 +#else // OPENSSL_AES
282 void blockEncryptSSE(const byte *input,size_t numBlocks,byte *outBuffer);
283 void blockDecryptSSE(const byte *input, size_t numBlocks, byte *outBuffer);
284 @@ -25,6 +28,7 @@ class Rijndael
285 void keySched(byte key[_MAX_KEY_COLUMNS][4]);
287 void GenerateTables();
288 +#endif // OPENSSL_AES
290 // RAR always uses CBC, but we may need to turn it off when calling
291 // this code from other archive formats with CTR and other modes.