p7zip: forgot recipe and patch.

This commit is contained in:
Jerome Duval
2019-11-23 23:12:11 +01:00
parent e45bb6aed0
commit e8c0fbf5a5
2 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
SUMMARY="7-zip file compression program"
DESCRIPTION="
p7zip is a port of 7za.exe for POSIX systems like Unix (Linux, Solaris, \
OpenBSD, FreeBSD, Cygwin, AIX, ...), MacOS X and also for BeOS and Amiga."
HOMEPAGE="http://p7zip.sourceforge.net"
COPYRIGHT="1999-2011 7-Zip Igor Pavlov."
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/project/p7zip/p7zip/$portVersion/p7zip_${portVersion}_src_all.tar.bz2"
CHECKSUM_SHA256="5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f"
SOURCE_DIR="p7zip_$portVersion"
PATCHES="p7zip-$portVersion.patchset"
ADDITIONAL_FILES="p7zip-expander-rules"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
p7zip = $portVersion
cmd:7za = $portVersion compat >= 9
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel
cmd:gcc
cmd:ld
cmd:make
"
BUILD()
{
cp makefile.haiku makefile.machine
make
}
INSTALL()
{
make install DEST_DIR="" DEST_HOME=$prefix DEST_SHARE_DOC=$docDir \
DEST_MAN=$manDir
expanderRulesDir=$dataDir/expander/rules
mkdir -p $expanderRulesDir
cp "$portDir/additional-files/p7zip-expander-rules" \
"$expanderRulesDir/p7zip"
}

View File

@@ -0,0 +1,54 @@
From 1efb55bb4d6997f5ea85a873c5cae442eb77df73 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 14 Feb 2016 10:08:25 +0100
Subject: applying patch p7zip-9.20.1.patch
diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp
index 322fce2..69a9f43 100644
--- a/CPP/Windows/System.cpp
+++ b/CPP/Windows/System.cpp
@@ -15,7 +15,7 @@
#include <sys/sysinfo.h>
#endif
-#if defined(ENV_BEOS)
+#if defined(ENV_BEOS) || defined(ENV_HAIKU)
#include <be/kernel/OS.h>
#endif
@@ -79,7 +79,7 @@ namespace NWindows
if (nbcpu < 1) nbcpu = 1;
return nbcpu;
}
- #elif defined(ENV_BEOS)
+ #elif defined(ENV_BEOS) || defined(ENV_HAIKU)
UInt32 GetNumberOfProcessors() {
system_info info;
get_system_info(&info);
--
2.24.0
From 2dd149a5be8a9b67f5be5bc840759777881436b3 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 14 Feb 2016 10:15:58 +0100
Subject: Fix detection of RAM size.
diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp
index 69a9f43..5b4e0d9 100644
--- a/CPP/Windows/System.cpp
+++ b/CPP/Windows/System.cpp
@@ -154,7 +154,7 @@ namespace NWindows
if ( pstat( PSTAT_STATIC, pu, (size_t)sizeof(pst), (size_t)0, 0 ) != -1 ) {
size = ((UInt64)pst.physical_memory)*pst.page_size;
}
-#elif defined(ENV_BEOS)
+#elif defined(ENV_BEOS) || defined(ENV_HAIKU)
system_info info;
get_system_info(&info);
size = info.max_pages;
--
2.24.0