diff --git a/app-arch/unrar/patches/unrar-4.2.4.patch b/app-arch/unrar/patches/unrar-4.2.4.patch deleted file mode 100644 index bd12da35b..000000000 --- a/app-arch/unrar/patches/unrar-4.2.4.patch +++ /dev/null @@ -1,263 +0,0 @@ -diff -aur unrar/arcread.cpp unrar.4.2.4.haiku/arcread.cpp ---- unrar/arcread.cpp 2012-06-09 15:21:04.066584576 +0200 -+++ unrar.4.2.4.haiku/arcread.cpp 2013-01-17 21:57:19.749207552 +0100 -@@ -666,7 +666,7 @@ - { - if (*s=='/' || *s=='\\') - *s=CPATHDIVIDER; --#if defined(_APPLE) && !defined(UNICODE_SUPPORTED) -+#if (defined(_APPLE) || defined(_BEOS)) && !defined(UNICODE_SUPPORTED) - if ((byte)*s<32 || (byte)*s>127) - *s='_'; - #endif -diff -aur unrar/consio.cpp unrar.4.2.4.haiku/consio.cpp ---- unrar/consio.cpp 2012-06-09 15:21:04.000524288 +0200 -+++ unrar.4.2.4.haiku/consio.cpp 2013-01-21 22:23:37.662437888 +0100 -@@ -141,7 +141,7 @@ - SetConsoleMode(hConOut,ConOutMode); - #else - char StrA[MAXPASSWORD]; --#if defined(_EMX) || defined(_BEOS) || defined(__sparc) || defined(sparc) || defined (__VMS) -+#if defined(_EMX) || defined(__sparc) || defined(sparc) || defined (__VMS) - fgets(StrA,ASIZE(StrA)-1,stdin); - #else - strncpyz(StrA,getpass(""),ASIZE(StrA)); -diff -aur unrar/extract.cpp unrar.4.2.4.haiku/extract.cpp ---- unrar/extract.cpp 2012-06-09 15:21:04.002097152 +0200 -+++ unrar.4.2.4.haiku/extract.cpp 2013-01-17 21:42:21.914620416 +0100 -@@ -311,7 +311,7 @@ - bool WideName=false; - #endif - --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (WideName) - { - // Prepare UTF-8 name for OS X. Since we are sure that destination -diff -aur unrar/file.cpp unrar.4.2.4.haiku/file.cpp ---- unrar/file.cpp 2012-06-09 15:21:04.002621440 +0200 -+++ unrar.4.2.4.haiku/file.cpp 2013-01-21 22:12:02.543162368 +0100 -@@ -304,6 +304,8 @@ - hFile=stderr; - #endif - break; -+ default: -+ break; - } - #endif - while (1) -diff -aur unrar/find.cpp unrar.4.2.4.haiku/find.cpp ---- unrar/find.cpp 2012-06-09 15:21:04.003145728 +0200 -+++ unrar.4.2.4.haiku/find.cpp 2013-01-17 21:43:25.860618752 +0100 -@@ -104,7 +104,7 @@ - } - } - *fd->NameW=0; --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (!LowAscii(fd->Name)) - UtfToWide(fd->Name,fd->NameW,sizeof(fd->NameW)); - #elif defined(UNICODE_SUPPORTED) -@@ -170,7 +170,7 @@ - strcpy(fd->Name,FindMask); - - *fd->NameW=0; --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (!LowAscii(fd->Name)) - UtfToWide(fd->Name,fd->NameW,sizeof(fd->NameW)); - #elif defined(UNICODE_SUPPORTED) -diff -aur unrar/makefile.unix unrar.4.2.4.haiku/makefile.unix ---- unrar/makefile.unix 2012-05-15 07:31:03.004980736 +0200 -+++ unrar.4.2.4.haiku/makefile.unix 2013-01-21 22:17:15.800325632 +0100 -@@ -7,7 +7,11 @@ - LIBFLAGS=-fPIC - DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - STRIP=strip --DESTDIR=/usr -+LDFLAGS=-lbsd -+RC=rc -+XRES=xres -+MIMESET=mimeset -+DESTDIR=$(shell finddir B_COMMON_DIRECTORY) - - # Linux using LCC - #CXX=lcc -@@ -114,12 +118,14 @@ - uninstall: uninstall-unrar - - clean: -- @rm -f *.o *.bak *~ -+ @rm -f *.o *.bak *~ *.rsrc - - unrar: clean $(OBJECTS) $(UNRAR_OBJ) - @rm -f unrar - $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS) -- $(STRIP) unrar -+ $(RC) -o unrar.rsrc unrar.rdef -+ $(XRES) -o unrar unrar.rsrc -+ $(MIMESET) unrar - - sfx: WHAT=SFX_MODULE - sfx: clean $(OBJECTS) -@@ -144,3 +150,29 @@ - - uninstall-lib: - rm -f $(DESTDIR)/lib/libunrar.so -+ -+MACHINE=$(shell uname -m) -+ifeq ($(MACHINE), BePC) -+ MACHINE = x86-gcc$(word 1, $(subst -, , $(subst ., , $(shell $(CC) -dumpversion)))) -+endif -+ -+VERSION=4.2.4 -+DATE := `date +%F` -+PACKAGE_NAME := unrar-$(VERSION)-$(MACHINE)-$(DATE) -+COMMENT = .OptionalPackageDescription -+DESCRIPTION = dist/$(COMMENT) -+ -+haiku_package: unrar -+ -rm -rf dist/common -+ -mkdir -p dist/common/bin -+ -cp unrar dist/common/bin -+ -mkdir -p dist/common/data/licenses -+ -cp license.txt dist/common/data/licenses/UnRAR -+ echo "Package: UnRAR" > $(DESCRIPTION) -+ echo "Version: $(VERSION)-$(MACHINE)-$(DATE)" >> $(DESCRIPTION) -+ echo "Copyright: Alexander Roshal." >> $(DESCRIPTION) -+ echo "Description: Utility to list, test and expand RAR archives." >> $(DESCRIPTION) -+ echo "License: UnRAR" >> $(DESCRIPTION) -+ echo "URL: http://www.rarlab.com/" >> $(DESCRIPTION) -+ cd dist && zip -9 -r -z -y $(PACKAGE_NAME).zip common $(COMMENT) < $(COMMENT) -+ -diff -aur unrar/os.hpp unrar.4.2.4.haiku/os.hpp ---- unrar/os.hpp 2012-06-09 15:21:04.005767168 +0200 -+++ unrar.4.2.4.haiku/os.hpp 2013-01-21 22:25:04.170655744 +0100 -@@ -134,8 +134,9 @@ - #define NM 1024 - - #ifdef _BEOS --#include --#include -+#include -+#include -+#include - #endif - - #include -@@ -206,6 +207,16 @@ - #endif - #endif - -+#ifdef _BEOS -+#if LITTLE_ENDIAN -+ #undef BIG_ENDIAN -+#elif BIG_ENDIAN -+ #undef LITTLE_ENDIAN -+#else -+ #error "Byte order must be defined!" -+#endif -+#endif -+ - #if defined(__sparc) || defined(sparc) || defined(__hpux) - #ifndef BIG_ENDIAN - #define BIG_ENDIAN -diff -aur unrar/raros.hpp unrar.4.2.4.haiku/raros.hpp ---- unrar/raros.hpp 2012-06-09 15:21:04.006553600 +0200 -+++ unrar.4.2.4.haiku/raros.hpp 2013-01-16 19:50:06.066060288 +0100 -@@ -29,7 +29,7 @@ - #endif - #endif - --#ifdef __BEOS__ -+#if defined(__BEOS__) || defined(__HAIKU__) - #define _UNIX - #define _BEOS - #endif -diff -aur unrar/rartypes.hpp unrar.4.2.4.haiku/rartypes.hpp ---- unrar/rartypes.hpp 2012-06-09 15:21:04.006815744 +0200 -+++ unrar.4.2.4.haiku/rartypes.hpp 2013-01-19 23:12:46.715653120 +0100 -@@ -7,6 +7,7 @@ - - #define PRESENT_INT32 // undefine if signed 32 bits is not available - -+#ifndef _BEOS - typedef unsigned int uint32; // 32 bits exactly - typedef signed int int32; // signed 32 bits exactly - -@@ -20,6 +21,7 @@ - typedef unsigned long long uint64; // unsigned 64 bits - typedef signed long long int64; // signed 64 bits - #endif -+#endif // #ifndef _BEOS - - - #if defined(_WIN_ALL) || defined(__GNUC__) || defined(__sgi) || defined(_AIX) || defined(__sun) || defined(__hpux) || defined(_OSF_SOURCE) -diff -aur unrar/rarvm.cpp unrar.4.2.4.haiku/rarvm.cpp ---- unrar/rarvm.cpp 2012-06-09 15:21:04.007077888 +0200 -+++ unrar.4.2.4.haiku/rarvm.cpp 2013-01-21 22:12:02.605814784 +0100 -@@ -792,6 +792,8 @@ - case VM_CMP: - Cmd->OpCode=Cmd->ByteMode ? VM_CMPB:VM_CMPD; - continue; -+ default: -+ break; - } - if ((VM_CmdFlags[Cmd->OpCode] & VMCF_CHFLAGS)==0) - continue; -@@ -835,6 +837,8 @@ - case VM_NEG: - Cmd->OpCode=Cmd->ByteMode ? VM_NEGB:VM_NEGD; - continue; -+ default: -+ break; - } - } - } -@@ -1102,6 +1106,8 @@ - SET_VALUE(false,&Mem[VM_GLOBALMEMADDR+0x20],DataSize); - } - break; -+ default: -+ break; - } - } - -diff -aur unrar/unicode.cpp unrar.4.2.4.haiku/unicode.cpp ---- unrar/unicode.cpp 2012-06-09 15:21:04.010747904 +0200 -+++ unrar.4.2.4.haiku/unicode.cpp 2013-01-17 21:41:15.856686592 +0100 -@@ -13,7 +13,7 @@ - if (WideCharToMultiByte(CP_ACP,0,Src,-1,Dest,(int)DestSize,NULL,NULL)==0) - RetCode=false; - --#elif defined(_APPLE) -+#elif defined(_APPLE) || defined(_BEOS) - WideToUtf(Src,Dest,DestSize); - - #elif defined(MBFUNCTIONS) -@@ -73,7 +73,7 @@ - if (MultiByteToWideChar(CP_ACP,0,Src,-1,Dest,(int)DestSize)==0) - RetCode=false; - --#elif defined(_APPLE) -+#elif defined(_APPLE) || defined(_BEOS) - UtfToWide(Src,Dest,DestSize); - - #elif defined(MBFUNCTIONS) -diff -aur unrar/unrar.rdef unrar.4.2.4.haiku/unrar.rdef ---- unrar/unrar.rdef 1970-01-01 01:00:00.000000000 +0100 -+++ unrar.4.2.4.haiku/unrar.rdef 2013-01-16 20:43:32.898629632 +0100 -@@ -0,0 +1,13 @@ -+ -+resource app_signature "application/x-vnd.Roshal-UnRAR"; -+resource app_flags B_MULTIPLE_LAUNCH | B_BACKGROUND_APP; -+ -+resource app_version { -+ major = 4, -+ middle = 2, -+ minor = 4, -+ variety = 0, -+ internal = 0, -+ short_info = "4.2.4", -+ long_info = "4.2.4 Alexander Roshal" -+}; diff --git a/app-arch/unrar/patches/unrar-4.2.4.patchset b/app-arch/unrar/patches/unrar-4.2.4.patchset deleted file mode 100644 index f2e6779cf..000000000 --- a/app-arch/unrar/patches/unrar-4.2.4.patchset +++ /dev/null @@ -1,285 +0,0 @@ -From 8f6a22fb6cb4dcaf80049a7c82973251ffd07f80 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Wed, 2 Oct 2013 18:45:05 +0200 -Subject: Convert existing patch to patchset format. - - -diff --git a/arcread.cpp b/arcread.cpp -index a524a96..19cca29 100644 ---- a/arcread.cpp -+++ b/arcread.cpp -@@ -666,7 +666,7 @@ void Archive::ConvertUnknownHeader() - { - if (*s=='/' || *s=='\\') - *s=CPATHDIVIDER; --#if defined(_APPLE) && !defined(UNICODE_SUPPORTED) -+#if (defined(_APPLE) || defined(_BEOS)) && !defined(UNICODE_SUPPORTED) - if ((byte)*s<32 || (byte)*s>127) - *s='_'; - #endif -diff --git a/consio.cpp b/consio.cpp -index 42b72a6..90d22c9 100644 ---- a/consio.cpp -+++ b/consio.cpp -@@ -141,7 +141,7 @@ void GetPasswordText(wchar *Str,uint MaxLength) - SetConsoleMode(hConOut,ConOutMode); - #else - char StrA[MAXPASSWORD]; --#if defined(_EMX) || defined(_BEOS) || defined(__sparc) || defined(sparc) || defined (__VMS) -+#if defined(_EMX) || defined(__sparc) || defined(sparc) || defined (__VMS) - fgets(StrA,ASIZE(StrA)-1,stdin); - #else - strncpyz(StrA,getpass(""),ASIZE(StrA)); -diff --git a/extract.cpp b/extract.cpp -index ddd71a0..adccadf 100644 ---- a/extract.cpp -+++ b/extract.cpp -@@ -311,7 +311,7 @@ bool CmdExtract::ExtractCurrentFile(CommandData *Cmd,Archive &Arc,size_t HeaderS - bool WideName=false; - #endif - --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (WideName) - { - // Prepare UTF-8 name for OS X. Since we are sure that destination -diff --git a/file.cpp b/file.cpp -index dcf4e61..7a26155 100644 ---- a/file.cpp -+++ b/file.cpp -@@ -304,6 +304,8 @@ void File::Write(const void *Data,size_t Size) - hFile=stderr; - #endif - break; -+ default: -+ break; - } - #endif - while (1) -diff --git a/find.cpp b/find.cpp -index 7ba14c0..0f7c3c0 100644 ---- a/find.cpp -+++ b/find.cpp -@@ -104,7 +104,7 @@ bool FindFile::Next(struct FindData *fd,bool GetSymLink) - } - } - *fd->NameW=0; --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (!LowAscii(fd->Name)) - UtfToWide(fd->Name,fd->NameW,sizeof(fd->NameW)); - #elif defined(UNICODE_SUPPORTED) -@@ -170,7 +170,7 @@ bool FindFile::FastFind(const char *FindMask,const wchar *FindMaskW,FindData *fd - strcpy(fd->Name,FindMask); - - *fd->NameW=0; --#ifdef _APPLE -+#if defined(_APPLE) || defined(_BEOS) - if (!LowAscii(fd->Name)) - UtfToWide(fd->Name,fd->NameW,sizeof(fd->NameW)); - #elif defined(UNICODE_SUPPORTED) -diff --git a/makefile.unix b/makefile.unix -index bd06092..b5e3815 100644 ---- a/makefile.unix -+++ b/makefile.unix -@@ -7,7 +7,11 @@ CXXFLAGS=-O2 - LIBFLAGS=-fPIC - DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - STRIP=strip --DESTDIR=/usr -+LDFLAGS=-lbsd -+RC=rc -+XRES=xres -+MIMESET=mimeset -+DESTDIR=$(shell finddir B_COMMON_DIRECTORY) - - # Linux using LCC - #CXX=lcc -@@ -114,12 +118,14 @@ install: install-unrar - uninstall: uninstall-unrar - - clean: -- @rm -f *.o *.bak *~ -+ @rm -f *.o *.bak *~ *.rsrc - - unrar: clean $(OBJECTS) $(UNRAR_OBJ) - @rm -f unrar - $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS) -- $(STRIP) unrar -+ $(RC) -o unrar.rsrc unrar.rdef -+ $(XRES) -o unrar unrar.rsrc -+ $(MIMESET) unrar - - sfx: WHAT=SFX_MODULE - sfx: clean $(OBJECTS) -@@ -144,3 +150,29 @@ install-lib: - - uninstall-lib: - rm -f $(DESTDIR)/lib/libunrar.so -+ -+MACHINE=$(shell uname -m) -+ifeq ($(MACHINE), BePC) -+ MACHINE = x86-gcc$(word 1, $(subst -, , $(subst ., , $(shell $(CC) -dumpversion)))) -+endif -+ -+VERSION=4.2.4 -+DATE := `date +%F` -+PACKAGE_NAME := unrar-$(VERSION)-$(MACHINE)-$(DATE) -+COMMENT = .OptionalPackageDescription -+DESCRIPTION = dist/$(COMMENT) -+ -+haiku_package: unrar -+ -rm -rf dist/common -+ -mkdir -p dist/common/bin -+ -cp unrar dist/common/bin -+ -mkdir -p dist/common/data/licenses -+ -cp license.txt dist/common/data/licenses/UnRAR -+ echo "Package: UnRAR" > $(DESCRIPTION) -+ echo "Version: $(VERSION)-$(MACHINE)-$(DATE)" >> $(DESCRIPTION) -+ echo "Copyright: Alexander Roshal." >> $(DESCRIPTION) -+ echo "Description: Utility to list, test and expand RAR archives." >> $(DESCRIPTION) -+ echo "License: UnRAR" >> $(DESCRIPTION) -+ echo "URL: http://www.rarlab.com/" >> $(DESCRIPTION) -+ cd dist && zip -9 -r -z -y $(PACKAGE_NAME).zip common $(COMMENT) < $(COMMENT) -+ -diff --git a/os.hpp b/os.hpp -index 21488a8..ae2d0be 100644 ---- a/os.hpp -+++ b/os.hpp -@@ -134,8 +134,9 @@ - #define NM 1024 - - #ifdef _BEOS --#include --#include -+#include -+#include -+#include - #endif - - #include -@@ -206,6 +207,16 @@ - #endif - #endif - -+#ifdef _BEOS -+#if LITTLE_ENDIAN -+ #undef BIG_ENDIAN -+#elif BIG_ENDIAN -+ #undef LITTLE_ENDIAN -+#else -+ #error "Byte order must be defined!" -+#endif -+#endif -+ - #if defined(__sparc) || defined(sparc) || defined(__hpux) - #ifndef BIG_ENDIAN - #define BIG_ENDIAN -diff --git a/raros.hpp b/raros.hpp -index ce853bd..b63d0f0 100644 ---- a/raros.hpp -+++ b/raros.hpp -@@ -29,7 +29,7 @@ - #endif - #endif - --#ifdef __BEOS__ -+#if defined(__BEOS__) || defined(__HAIKU__) - #define _UNIX - #define _BEOS - #endif -diff --git a/rartypes.hpp b/rartypes.hpp -index a2d8b44..d8249b1 100644 ---- a/rartypes.hpp -+++ b/rartypes.hpp -@@ -7,6 +7,7 @@ typedef unsigned int uint; // 32 bits or more - - #define PRESENT_INT32 // undefine if signed 32 bits is not available - -+#ifndef _BEOS - typedef unsigned int uint32; // 32 bits exactly - typedef signed int int32; // signed 32 bits exactly - -@@ -20,6 +21,7 @@ typedef signed __int64 int64; // signed 64 bits - typedef unsigned long long uint64; // unsigned 64 bits - typedef signed long long int64; // signed 64 bits - #endif -+#endif // #ifndef _BEOS - - - #if defined(_WIN_ALL) || defined(__GNUC__) || defined(__sgi) || defined(_AIX) || defined(__sun) || defined(__hpux) || defined(_OSF_SOURCE) -diff --git a/rarvm.cpp b/rarvm.cpp -index 8b85800..1f06581 100644 ---- a/rarvm.cpp -+++ b/rarvm.cpp -@@ -792,6 +792,8 @@ void RarVM::Optimize(VM_PreparedProgram *Prg) - case VM_CMP: - Cmd->OpCode=Cmd->ByteMode ? VM_CMPB:VM_CMPD; - continue; -+ default: -+ break; - } - if ((VM_CmdFlags[Cmd->OpCode] & VMCF_CHFLAGS)==0) - continue; -@@ -835,6 +837,8 @@ void RarVM::Optimize(VM_PreparedProgram *Prg) - case VM_NEG: - Cmd->OpCode=Cmd->ByteMode ? VM_NEGB:VM_NEGD; - continue; -+ default: -+ break; - } - } - } -@@ -1102,6 +1106,8 @@ void RarVM::ExecuteStandardFilter(VM_StandardFilters FilterType) - SET_VALUE(false,&Mem[VM_GLOBALMEMADDR+0x20],DataSize); - } - break; -+ default: -+ break; - } - } - -diff --git a/unicode.cpp b/unicode.cpp -index a3022d2..3e29127 100644 ---- a/unicode.cpp -+++ b/unicode.cpp -@@ -13,7 +13,7 @@ bool WideToChar(const wchar *Src,char *Dest,size_t DestSize) - if (WideCharToMultiByte(CP_ACP,0,Src,-1,Dest,(int)DestSize,NULL,NULL)==0) - RetCode=false; - --#elif defined(_APPLE) -+#elif defined(_APPLE) || defined(_BEOS) - WideToUtf(Src,Dest,DestSize); - - #elif defined(MBFUNCTIONS) -@@ -73,7 +73,7 @@ bool CharToWide(const char *Src,wchar *Dest,size_t DestSize) - if (MultiByteToWideChar(CP_ACP,0,Src,-1,Dest,(int)DestSize)==0) - RetCode=false; - --#elif defined(_APPLE) -+#elif defined(_APPLE) || defined(_BEOS) - UtfToWide(Src,Dest,DestSize); - - #elif defined(MBFUNCTIONS) -diff --git a/unrar.rdef b/unrar.rdef -new file mode 100644 -index 0000000..ab085d2 ---- /dev/null -+++ b/unrar.rdef -@@ -0,0 +1,13 @@ -+ -+resource app_signature "application/x-vnd.Roshal-UnRAR"; -+resource app_flags B_MULTIPLE_LAUNCH | B_BACKGROUND_APP; -+ -+resource app_version { -+ major = 4, -+ middle = 2, -+ minor = 4, -+ variety = 0, -+ internal = 0, -+ short_info = "4.2.4", -+ long_info = "4.2.4 Alexander Roshal" -+}; --- -1.8.3.4 - diff --git a/app-arch/unrar/patches/unrar-5.1.6.patchset b/app-arch/unrar/patches/unrar-5.1.6.patchset new file mode 100644 index 000000000..16e4d7e4e --- /dev/null +++ b/app-arch/unrar/patches/unrar-5.1.6.patchset @@ -0,0 +1,95 @@ +From ebe959af19ad3f72d3119444f9afc0ab15caaa7a Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 12 May 2014 18:07:44 +0000 +Subject: initial Haiku patch + + +diff --git a/archive.hpp b/archive.hpp +index 1d8444b..252b850 100644 +--- a/archive.hpp ++++ b/archive.hpp +@@ -67,7 +67,6 @@ class Archive:public File + size_t SearchSubBlock(const wchar *Type); + size_t SearchRR(); + void WriteBlock(HEADER_TYPE HeaderType,BaseBlock *wb=NULL,bool OnlySetSize=false,bool NonFinalWrite=false); +- void SetBlockSize(HEADER_TYPE HeaderType,BaseBlock *wb=NULL) {WriteBlock(HeaderType,wb,true);} + size_t ReadHeader(); + void CheckArc(bool EnableBroken); + void CheckOpen(const wchar *Name); +diff --git a/makefile b/makefile +index 3c38027..5d69089 100644 +--- a/makefile ++++ b/makefile +@@ -7,8 +7,12 @@ CXXFLAGS=-O2 + LIBFLAGS=-fPIC + DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP + STRIP=strip +-LDFLAGS=-pthread ++LDFLAGS=-lbsd + DESTDIR=/usr ++RC=rc ++XRES=xres ++MIMESET=mimeset ++DESTDIR=(shell finddir B_SYSTEM_DIRECTORY) + + # Linux using LCC + #CXX=lcc +@@ -116,12 +120,14 @@ install: install-unrar + uninstall: uninstall-unrar + + clean: +- @rm -f *.o *.bak *~ ++ @rm -f *.o *.bak *~ *.rsrc + + unrar: clean $(OBJECTS) $(UNRAR_OBJ) + @rm -f unrar + $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS) +- $(STRIP) unrar ++ $(RC) -o unrar.rsrc unrar.rdef ++ $(XRES) -o unrar unrar.rsrc ++ $(MIMESET) unrar + + sfx: WHAT=SFX_MODULE + sfx: clean $(OBJECTS) +diff --git a/os.hpp b/os.hpp +index 95fa5d6..2ae36ba 100644 +--- a/os.hpp ++++ b/os.hpp +@@ -189,6 +189,15 @@ + #endif + #endif + ++#ifdef __HAIKU__ ++ #include ++ #if LITTLE_ENDIAN ++ #undef BIG_ENDIAN ++ #elif BIG_ENDIAN ++ #undef LITTLE_ENDIAN ++ #endif ++#endif ++ + #if defined(__sparc) || defined(sparc) || defined(__hpux) + #ifndef BIG_ENDIAN + #define BIG_ENDIAN +diff --git a/unrar.rdef b/unrar.rdef +new file mode 100644 +index 0000000..28bb5e2 +--- /dev/null ++++ b/unrar.rdef +@@ -0,0 +1,13 @@ ++ ++resource app_signature "application/x-vnd.Roshal-UnRAR"; ++resource app_flags B_MULTIPLE_LAUNCH | B_BACKGROUND_APP; ++ ++resource app_version { ++ major = 5, ++ middle = 1, ++ minor = 5, ++ variety = 0, ++ internal = 0, ++ short_info = "5.1.5", ++ long_info = "5.1.5 Alexander Roshal" ++}; +-- +1.8.3.4 + diff --git a/app-arch/unrar/unrar-4.2.4.recipe b/app-arch/unrar/unrar-5.1.6.recipe similarity index 68% rename from app-arch/unrar/unrar-4.2.4.recipe rename to app-arch/unrar/unrar-5.1.6.recipe index 804eabbab..732886ce7 100644 --- a/app-arch/unrar/unrar-4.2.4.recipe +++ b/app-arch/unrar/unrar-5.1.6.recipe @@ -20,10 +20,12 @@ following file formats: - Z (Unix Compress) " HOMEPAGE="http://www.rarlab.com/" -SRC_URI="http://www.rarlab.com/rar/unrarsrc-4.2.4.tar.gz" -CHECKSUM_SHA256="9432bf798e5f7123f3060f37b75b7c07f36f0091305f46473dcae9154f8cd686" +SRC_URI="http://www.rarlab.com/rar/unrarsrc-$portVersion.tar.gz" +CHECKSUM_SHA256="3c38eaabc655527244fd0c3ba3beff567ea24aad37d448488643242fd4cf41a5" REVISION="1" -ARCHITECTURES="x86_gcc2 x86" +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PATCHES="unrar-$portVersion.patchset" PROVIDES=" unrar = $portVersion @@ -34,6 +36,7 @@ REQUIRES=" haiku >= $haikuVersion " BUILD_REQUIRES=" + haiku_devel >= $haikuVersion cmd:make cmd:g++ " @@ -41,12 +44,12 @@ BUILD_REQUIRES=" SOURCE_DIR="unrar" BUILD() { - LDFLAGS=-lbsd make -f makefile.unix DESTDIR=$prefix + make DESTDIR=$prefix } INSTALL() { - make -f makefile.unix DESTDIR=$prefix install + make DESTDIR=$prefix install } LICENSE="UnRAR"