unrar: Update from 5.3.2 to 5.4.5
This commit is contained in:
parent
538812ae64
commit
39b61263b5
@ -1,7 +1,8 @@
|
||||
TERMUX_PKG_VERSION=5.3.2
|
||||
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_SRCURL=http://www.rarlab.com/rar/unrarsrc-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=e470c584332422893fb52e049f2cbd99e24dc6c6da971008b4e2ae4284f8796c
|
||||
TERMUX_PKG_DEPENDS="libandroid-support"
|
||||
TERMUX_PKG_FOLDERNAME=unrar
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
75
packages/unrar/cmddata.cpp.patch
Normal file
75
packages/unrar/cmddata.cpp.patch
Normal file
@ -0,0 +1,75 @@
|
||||
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);
|
29
packages/unrar/file.cpp.patch
Normal file
29
packages/unrar/file.cpp.patch
Normal file
@ -0,0 +1,29 @@
|
||||
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
|
45
packages/unrar/filefn.cpp.patch
Normal file
45
packages/unrar/filefn.cpp.patch
Normal file
@ -0,0 +1,45 @@
|
||||
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
|
||||
}
|
@ -1,28 +1,22 @@
|
||||
diff -u -r ../unrar/makefile ./makefile
|
||||
--- ../unrar/makefile 2013-04-29 16:27:05.000000000 +0200
|
||||
+++ ./makefile 2014-02-13 00:29:04.000000000 +0100
|
||||
@@ -2,13 +2,9 @@
|
||||
--- ../unrar/makefile 2016-05-10 11:51:35.000000000 +0200
|
||||
+++ ./makefile 2017-01-31 12:48:13.868329984 +0100
|
||||
@@ -2,13 +2,13 @@
|
||||
# Makefile for UNIX - unrar
|
||||
|
||||
# Linux using GCC
|
||||
-CXX=g++
|
||||
-CXX=c++
|
||||
-CXXFLAGS=-O2
|
||||
-LIBFLAGS=-fPIC
|
||||
+CXX?=c++
|
||||
+CXXFLAGS?=-O2
|
||||
+LIBFLAGS=$(LDFLAGS)
|
||||
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
|
||||
-STRIP=strip
|
||||
-LDFLAGS=-pthread
|
||||
-DESTDIR=/usr
|
||||
+STRIP?=strip
|
||||
+LDFLAGS?=-pthread
|
||||
+DESTDIR=@TERMUX_PREFIX@
|
||||
|
||||
# Linux using LCC
|
||||
#CXX=lcc
|
||||
@@ -136,7 +132,7 @@
|
||||
$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
|
||||
|
||||
install-unrar:
|
||||
- install -D unrar $(DESTDIR)/bin/unrar
|
||||
+ install unrar $(DESTDIR)/bin/unrar
|
||||
|
||||
uninstall-unrar:
|
||||
rm -f $(DESTDIR)/bin/unrar
|
||||
|
12
packages/unrar/rar.hpp.patch
Normal file
12
packages/unrar/rar.hpp.patch
Normal file
@ -0,0 +1,12 @@
|
||||
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
|
14
packages/unrar/strfn.cpp.patch
Normal file
14
packages/unrar/strfn.cpp.patch
Normal file
@ -0,0 +1,14 @@
|
||||
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);
|
Loading…
Reference in New Issue
Block a user