diff --git a/app-arch/unrar/additional-files/unrar.rdef b/app-arch/unrar/additional-files/unrar.rdef index a0ef9fd2c..332ffd392 100644 --- a/app-arch/unrar/additional-files/unrar.rdef +++ b/app-arch/unrar/additional-files/unrar.rdef @@ -9,5 +9,5 @@ resource app_version { variety = 0, internal = 0, short_info = "UnRAR", - long_info = "UnRAR ©1993-2016 Alexander Roshal" + long_info = "UnRAR ©1993-2018 Alexander Roshal" }; diff --git a/app-arch/unrar/patches/unrar-5.4.5.patchset b/app-arch/unrar/patches/unrar-5.4.5.patchset deleted file mode 100644 index c7e7defcd..000000000 --- a/app-arch/unrar/patches/unrar-5.4.5.patchset +++ /dev/null @@ -1,79 +0,0 @@ -From 3f427096f02cb880d1cf881f54903bb9652cf4f5 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 6d15156..a55bff9 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 83c0713..6ada466 100644 ---- a/makefile -+++ b/makefile -@@ -5,10 +5,14 @@ - CXX=c++ - CXXFLAGS=-O2 - LIBFLAGS=-fPIC --DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -+DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -D_BSD_SOURCE - 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 1b0813f..a07a741 100644 ---- a/os.hpp -+++ b/os.hpp -@@ -196,6 +196,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 --- -2.2.2 - diff --git a/app-arch/unrar/patches/unrar-5.6.1.patchset b/app-arch/unrar/patches/unrar-5.6.1.patchset new file mode 100644 index 000000000..57fa12651 --- /dev/null +++ b/app-arch/unrar/patches/unrar-5.6.1.patchset @@ -0,0 +1,21 @@ +From 1c19dea55d375f6968ce54a51ab42958347726a8 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 da59973..df45baf 100644 +--- a/archive.hpp ++++ b/archive.hpp +@@ -64,7 +64,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); +-- +2.16.2 + diff --git a/app-arch/unrar/unrar-5.4.5.recipe b/app-arch/unrar/unrar-5.6.1.recipe similarity index 51% rename from app-arch/unrar/unrar-5.4.5.recipe rename to app-arch/unrar/unrar-5.6.1.recipe index f08c058d2..ad0b81574 100644 --- a/app-arch/unrar/unrar-5.4.5.recipe +++ b/app-arch/unrar/unrar-5.6.1.recipe @@ -17,12 +17,12 @@ decompress the following file formats: - 7Z - XZ - Z (Unix Compress)" -HOMEPAGE="http://www.rarlab.com/rar_add.htm" -COPYRIGHT="1993-2016 Alexander Roshal" +HOMEPAGE="https://www.rarlab.com/rar_add.htm" +COPYRIGHT="1993-2018 Alexander Roshal" LICENSE="UnRAR" -REVISION="2" -SOURCE_URI="http://www.rarlab.com/rar/unrarsrc-$portVersion.tar.gz" -CHECKSUM_SHA256="e470c584332422893fb52e049f2cbd99e24dc6c6da971008b4e2ae4284f8796c" +REVISION="1" +SOURCE_URI="https://www.rarlab.com/rar/unrarsrc-$portVersion.tar.gz" +CHECKSUM_SHA256="67c339dffa95f6c1bedcca40045e99de5852919dbfaa06e4a9c8f18cd5064e70" SOURCE_DIR="unrar" PATCHES="unrar-$portVersion.patchset" ADDITIONAL_FILES="unrar.rdef" @@ -32,6 +32,8 @@ ARCHITECTURES="x86_gcc2 x86 x86_64" PROVIDES=" unrar = $portVersion cmd:unrar = $portVersion + lib:libunrar = $portVersion + devel:libunrar = $portVersion " REQUIRES=" haiku @@ -47,6 +49,17 @@ BUILD_PREREQUIRES=" cmd:sed " +PATCH() +{ + if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then + sed -i \ + -e "/^CXXFLAGS=/ s/ -Wno-logical-op-parentheses//;" \ + -e "/^CXXFLAGS=/ s/ -Wno-dangling-else//;" \ + makefile + fi + sed -i -e "/^LDFLAGS=/ d;" makefile +} + BUILD() { local MAJOR="`echo "$portVersion" | cut -d. -f1`" @@ -58,10 +71,25 @@ BUILD() -e "s|@MINOR@|$MINOR|" \ $portDir/additional-files/unrar.rdef > unrar.rdef - make DESTDIR=$prefix + for i in unrar lib sfx; do + mkdir -p $i + pushd $i + ln -f -s ../*.cpp ../*.hpp ../makefile . + CPPFLAGS="-D_BSD_SOURCE" LDFLAGS="-lbsd" make $i + popd + done } INSTALL() { - make DESTDIR=$prefix install + install -d "$libDir"/unrar + install -t "$libDir"/unrar sfx/default.sfx + for i in unrar lib; do + make -C $i DESTDIR="$prefix" install-$i + done + + prepareInstalledDevelLib libunrar + + addResourcesToBinaries unrar.rdef "$binDir"/unrar + mimeset -f "$binDir"/unrar }