mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
unrar: add recipe for version 5.5.3.
This commit is contained in:
80
app-arch/unrar/patches/unrar-5.5.3.patchset
Normal file
80
app-arch/unrar/patches/unrar-5.5.3.patchset
Normal file
@@ -0,0 +1,80 @@
|
||||
From 1c19dea55d375f6968ce54a51ab42958347726a8 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 12 May 2014 18:07:44 +0000
|
||||
Subject: initial Haiku patch
|
||||
|
||||
|
||||
diff --git a/archive.hpp b/archive.hpp
|
||||
index 6e85b9f..a85afc5 100644
|
||||
--- a/archive.hpp
|
||||
+++ b/archive.hpp
|
||||
@@ -65,7 +65,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 259b907..ccf1a54 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -5,11 +5,15 @@
|
||||
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
|
||||
AR=ar
|
||||
-LDFLAGS=-pthread
|
||||
+LDFLAGS=-lbsd
|
||||
DESTDIR=/usr
|
||||
+RC=rc
|
||||
+XRES=xres
|
||||
+MIMESET=mimeset
|
||||
+DESTDIR=(shell finddir B_SYSTEM_DIRECTORY)
|
||||
|
||||
# Linux using LCC
|
||||
#CXX=lcc
|
||||
@@ -128,12 +132,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 795dd96..ce70f69 100644
|
||||
--- a/os.hpp
|
||||
+++ b/os.hpp
|
||||
@@ -190,6 +190,15 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+ #include <endian.h>
|
||||
+ #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.12.2
|
||||
|
||||
67
app-arch/unrar/unrar-5.5.3.recipe
Normal file
67
app-arch/unrar/unrar-5.5.3.recipe
Normal file
@@ -0,0 +1,67 @@
|
||||
SUMMARY="Uncompress rar files"
|
||||
DESCRIPTION="UnRAR decompresses rar files. It is a powerful archive manager \
|
||||
that can backup your data and reduce the size of email attachments. UnRAR can \
|
||||
decompress the following file formats:
|
||||
- RAR
|
||||
- ZIP
|
||||
- CAB
|
||||
- ARJ
|
||||
- JZH
|
||||
- TAR
|
||||
- GZ and TAR.GZ
|
||||
- BZ2 and TAR.BZ2
|
||||
- ACE
|
||||
- UUE
|
||||
- JAR (Java Archive)
|
||||
- ISO
|
||||
- 7Z
|
||||
- XZ
|
||||
- Z (Unix Compress)"
|
||||
HOMEPAGE="http://www.rarlab.com/rar_add.htm"
|
||||
COPYRIGHT="1993-2016 Alexander Roshal"
|
||||
LICENSE="UnRAR"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.rarlab.com/rar/unrarsrc-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d1d9ef4a9247db088f825666de8f8bb69006d8d8b0e004ff366b3e04c103a2b3"
|
||||
SOURCE_DIR="unrar"
|
||||
PATCHES="unrar-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="unrar.rdef"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
unrar = $portVersion
|
||||
cmd:unrar = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cut
|
||||
cmd:g++
|
||||
cmd:make
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
sed \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
$portDir/additional-files/unrar.rdef > unrar.rdef
|
||||
|
||||
make DESTDIR=$prefix
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make DESTDIR=$prefix install
|
||||
}
|
||||
Reference in New Issue
Block a user