From a612606bce92485fb89b19b0989d87f6ba640c9a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 12 Jun 2017 02:14:45 +0200 Subject: [PATCH] unrar: Update from 5.4.5 to 5.5.4 --- packages/unrar/build.sh | 4 +- packages/unrar/cmddata.cpp.patch | 75 -------------------------------- packages/unrar/file.cpp.patch | 29 ------------ packages/unrar/filefn.cpp.patch | 45 ------------------- packages/unrar/makefile.patch | 26 +++++++++-- packages/unrar/os.hpp.patch | 12 +++-- packages/unrar/rar.hpp.patch | 12 ----- packages/unrar/strfn.cpp.patch | 14 ------ 8 files changed, 29 insertions(+), 188 deletions(-) delete mode 100644 packages/unrar/cmddata.cpp.patch delete mode 100644 packages/unrar/file.cpp.patch delete mode 100644 packages/unrar/filefn.cpp.patch delete mode 100644 packages/unrar/rar.hpp.patch delete mode 100644 packages/unrar/strfn.cpp.patch diff --git a/packages/unrar/build.sh b/packages/unrar/build.sh index 5c30a7026..3c9a3a402 100644 --- a/packages/unrar/build.sh +++ b/packages/unrar/build.sh @@ -1,8 +1,8 @@ TERMUX_PKG_HOMEPAGE=http://www.rarlab.com/ TERMUX_PKG_DESCRIPTION="Tool for extracting files from .rar archives" -TERMUX_PKG_VERSION=5.4.5 +TERMUX_PKG_VERSION=5.5.4 TERMUX_PKG_SRCURL=http://www.rarlab.com/rar/unrarsrc-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=e470c584332422893fb52e049f2cbd99e24dc6c6da971008b4e2ae4284f8796c +TERMUX_PKG_SHA256=c8217d311c8b3fbbd00737721f8d43d2b306192e1e39d7a858dcb714b2853517 TERMUX_PKG_DEPENDS="libandroid-support" TERMUX_PKG_FOLDERNAME=unrar TERMUX_PKG_BUILD_IN_SRC=yes diff --git a/packages/unrar/cmddata.cpp.patch b/packages/unrar/cmddata.cpp.patch deleted file mode 100644 index f0e3345d5..000000000 --- a/packages/unrar/cmddata.cpp.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -u -r ../unrar/cmddata.cpp ./cmddata.cpp ---- ../unrar/cmddata.cpp 2016-08-14 21:17:47.000000000 +0200 -+++ ./cmddata.cpp 2017-01-31 12:55:33.898965827 +0100 -@@ -43,7 +43,7 @@ - } - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::ParseCommandLine(bool Preprocess,int argc, char *argv[]) - { - *Command=0; -@@ -85,7 +85,7 @@ - #endif - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::ParseArg(wchar *Arg) - { - if (IsSwitch(*Arg) && !NoMoreSwitches) -@@ -177,7 +177,7 @@ - } - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::ParseEnvVar() - { - char *EnvStr=getenv("RAR"); -@@ -192,7 +192,7 @@ - - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - // Preprocess those parameters, which must be processed before the rest of - // command line. Return 'false' to stop further processing. - void CommandData::PreprocessArg(const wchar *Arg) -@@ -230,7 +230,7 @@ - #endif - - --#if !defined(GUI) && !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(GUI) && !defined(SFX_MODULE) - void CommandData::ReadConfig() - { - StringList List; -@@ -265,7 +265,7 @@ - #endif - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::ProcessSwitchesString(const wchar *Str) - { - wchar *Par; -@@ -279,7 +279,7 @@ - #endif - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::ProcessSwitch(const wchar *Switch) - { - -@@ -909,7 +909,7 @@ - #endif - - --#if !defined(SFX_MODULE) && !defined(_ANDROID) -+#if !defined(SFX_MODULE) - void CommandData::BadSwitch(const wchar *Switch) - { - mprintf(St(MUnknownOption),Switch); diff --git a/packages/unrar/file.cpp.patch b/packages/unrar/file.cpp.patch deleted file mode 100644 index 8d690e667..000000000 --- a/packages/unrar/file.cpp.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -u -r ../unrar/file.cpp ./file.cpp ---- ../unrar/file.cpp 2016-08-14 21:17:47.000000000 +0200 -+++ ./file.cpp 2017-01-31 12:53:12.968683760 +0100 -@@ -121,12 +121,6 @@ - hNewFile=fdopen(handle,UpdateMode ? UPDATEBINARY:READBINARY); - #endif - } --#ifdef _ANDROID -- // If we open an existing file in r&w mode and external card is read-only -- // for usual file API. -- if (hNewFile==FILE_BAD_HANDLE && UpdateMode && errno!=ENOENT) -- hNewFile=JniOpenFile(Name); --#endif - if (hNewFile==FILE_BAD_HANDLE && errno==ENOENT) - ErrorType=FILE_NOTFOUND; - #endif -@@ -196,12 +190,6 @@ - WideToChar(Name,NameA,ASIZE(NameA)); - #ifdef FILE_USE_OPEN - hFile=open(NameA,(O_CREAT|O_TRUNC) | (WriteMode ? O_WRONLY : O_RDWR)); --#ifdef _ANDROID -- if (hFile==FILE_BAD_HANDLE) -- hFile=JniCreateFile(Name); // If external card is read-only for usual file API. -- if (hFile!=FILE_BAD_HANDLE) -- JniFileNotify(Name,false); --#endif - #else - hFile=fopen(NameA,WriteMode ? WRITEBINARY:CREATEBINARY); - #endif diff --git a/packages/unrar/filefn.cpp.patch b/packages/unrar/filefn.cpp.patch deleted file mode 100644 index ae2e906cc..000000000 --- a/packages/unrar/filefn.cpp.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -u -r ../unrar/filefn.cpp ./filefn.cpp ---- ../unrar/filefn.cpp 2016-08-14 21:17:47.000000000 +0200 -+++ ./filefn.cpp 2017-01-31 12:52:24.009280586 +0100 -@@ -29,12 +29,6 @@ - WideToChar(Name,NameA,ASIZE(NameA)); - mode_t uattr=SetAttr ? (mode_t)Attr:0777; - int ErrCode=mkdir(NameA,uattr); --#ifdef _ANDROID -- if (ErrCode==-1 && errno!=ENOENT) -- ErrCode=JniMkdir(Name) ? 0 : -1; // If external card is read-only for usual file API. -- if (ErrCode!=-1) -- JniFileNotify(Name,false); --#endif - if (ErrCode==-1) - return errno==ENOENT ? MKDIR_BADPATH:MKDIR_ERROR; - return MKDIR_SUCCESS; -@@ -426,15 +420,6 @@ - WideToChar(SrcName,SrcNameA,ASIZE(SrcNameA)); - WideToChar(DestName,DestNameA,ASIZE(DestNameA)); - bool Success=rename(SrcNameA,DestNameA)==0; --#ifdef _ANDROID -- if (!Success) -- Success=JniRename(SrcName,DestName); // If external card is read-only for usual file API. -- if (Success) -- { -- JniFileNotify(SrcName,true); -- JniFileNotify(DestName,false); -- } --#endif - return Success; - #endif - } -@@ -455,12 +440,6 @@ - char NameA[NM]; - WideToChar(Name,NameA,ASIZE(NameA)); - bool Success=remove(NameA)==0; --#ifdef _ANDROID -- if (!Success) -- Success=JniDelete(Name); -- if (Success) -- JniFileNotify(Name,true); --#endif - return Success; - #endif - } diff --git a/packages/unrar/makefile.patch b/packages/unrar/makefile.patch index ef4b54474..99e4ae927 100644 --- a/packages/unrar/makefile.patch +++ b/packages/unrar/makefile.patch @@ -1,7 +1,7 @@ diff -u -r ../unrar/makefile ./makefile ---- ../unrar/makefile 2016-05-10 11:51:35.000000000 +0200 -+++ ./makefile 2017-01-31 12:48:13.868329984 +0100 -@@ -2,13 +2,13 @@ +--- ../unrar/makefile 2017-06-11 11:31:05.000000000 +0000 ++++ ./makefile 2017-06-12 00:07:26.385451540 +0000 +@@ -2,14 +2,14 @@ # Makefile for UNIX - unrar # Linux using GCC @@ -13,10 +13,28 @@ diff -u -r ../unrar/makefile ./makefile +LIBFLAGS=$(LDFLAGS) DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -STRIP=strip +-AR=ar -LDFLAGS=-pthread -DESTDIR=/usr +STRIP?=strip ++AR?=ar +LDFLAGS?=-pthread -+DESTDIR=@TERMUX_PREFIX@ ++DESTDIR=$(PREFIX) # Linux using LCC + #CXX=lcc +@@ -20,14 +20,6 @@ + #DESTDIR=/usr + + # CYGWIN using GCC +-CXX=c++ +-CXXFLAGS=-O2 +-LIBFLAGS= +-DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP +-STRIP=strip +-AR=ar +-LDFLAGS=-pthread +-DESTDIR=/usr + + # HP UX using aCC + #CXX=aCC diff --git a/packages/unrar/os.hpp.patch b/packages/unrar/os.hpp.patch index 3f362f3bc..4bc0da6d4 100644 --- a/packages/unrar/os.hpp.patch +++ b/packages/unrar/os.hpp.patch @@ -1,14 +1,12 @@ -Patch submitted to dev@rarlab.com on 2015-08-25. - diff -u -r ../unrar/os.hpp ./os.hpp ---- ../unrar/os.hpp 2015-08-04 06:22:40.000000000 -0400 -+++ ./os.hpp 2015-08-25 16:58:59.525380417 -0400 -@@ -160,7 +160,7 @@ +--- ../unrar/os.hpp 2017-06-10 13:59:52.000000000 +0000 ++++ ./os.hpp 2017-06-12 00:11:04.591100580 +0000 +@@ -154,7 +154,7 @@ #define SAVE_LINKS #endif --#if defined(__linux) && !defined (_ANDROID) || defined(__FreeBSD__) -+#if defined(__linux) && !defined(__ANDROID__) || defined(__FreeBSD__) +-#if defined(__linux) || defined(__FreeBSD__) ++#if (defined(__linux) && !defined(__ANDROID__)) || defined(__FreeBSD__) #include #define USE_LUTIMES #endif diff --git a/packages/unrar/rar.hpp.patch b/packages/unrar/rar.hpp.patch deleted file mode 100644 index 23cbfd1ae..000000000 --- a/packages/unrar/rar.hpp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../unrar/rar.hpp ./rar.hpp ---- ../unrar/rar.hpp 2016-08-14 21:17:47.000000000 +0200 -+++ ./rar.hpp 2017-01-31 12:49:39.451286637 +0100 -@@ -87,8 +87,5 @@ - - - --#ifdef _ANDROID --#include "GUI/rarjni.hpp" --#endif - - #endif diff --git a/packages/unrar/strfn.cpp.patch b/packages/unrar/strfn.cpp.patch deleted file mode 100644 index 5f6bdc127..000000000 --- a/packages/unrar/strfn.cpp.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -u -r ../unrar/strfn.cpp ./strfn.cpp ---- ../unrar/strfn.cpp 2016-08-14 21:17:47.000000000 +0200 -+++ ./strfn.cpp 2017-01-31 12:50:41.922525083 +0100 -@@ -21,10 +21,6 @@ - DestSize=SrcLength; - OemToCharBuffA(Src,Dest,(DWORD)DestSize); - Dest[DestSize-1]=0; --#elif defined(_ANDROID) -- wchar DestW[NM]; -- JniCharToWide(Src,DestW,ASIZE(DestW),true); -- WideToChar(DestW,Dest,DestSize); - #else - if (Dest!=Src) - strncpyz(Dest,Src,DestSize);