mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-02 22:24:26 +00:00
Ports: Add lrzip port
This commit is contained in:
parent
50cef4708c
commit
7448db9940
|
@ -153,6 +153,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
|
|||
| [`links`](links/) | Links web browser | 2.26 | http://links.twibright.com/ |
|
||||
| [`lite-xl`](lite-xl/) | Lite-XL | 2.1.0 | https://lite-xl.com/ |
|
||||
| [`llvm`](llvm/) | LLVM | 15.0.3 | https://llvm.org/ |
|
||||
| [`lrzip`](lrzip/) | lrzip | 0.651 | https://github.com/ckolivas/lrzip |
|
||||
| [`lua`](lua/) | Lua | 5.4.4 | https://www.lua.org/ |
|
||||
| [`luajit`](luajit/) | LuaJIT | 2.1.0-beta3 | https://luajit.org/luajit.html |
|
||||
| [`luarocks`](luarocks/) | LuaRocks | 3.8.0 | https://luarocks.org/ |
|
||||
|
|
16
Ports/lrzip/package.sh
Executable file
16
Ports/lrzip/package.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port='lrzip'
|
||||
version='0.651'
|
||||
useconfigure='true'
|
||||
files="https://github.com/ckolivas/lrzip/archive/refs/tags/v${version}.tar.gz v${version}.tar.gz f4c84de778a059123040681fd47c17565fcc4fec0ccc68fcf32d97fad16cd892"
|
||||
auth_type='sha256'
|
||||
depends=(
|
||||
'bzip2'
|
||||
'lz4'
|
||||
'lzo'
|
||||
'zlib'
|
||||
)
|
||||
|
||||
configure() {
|
||||
run ./autogen.sh --host="${SERENITY_ARCH}-pc-serenity"
|
||||
}
|
38
Ports/lrzip/patches/0001-Remove-Linux-specific-code.patch
Normal file
38
Ports/lrzip/patches/0001-Remove-Linux-specific-code.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Dellwing <fabian.dellwing@gmail.com>
|
||||
Date: Sat, 11 Mar 2023 16:18:09 +0100
|
||||
Subject: [PATCH] Remove Linux specific code
|
||||
|
||||
---
|
||||
main.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index eb0985feb1f537533f9f6a983fa3c0e39de730bf..be172ee0758d7da6e8cefa2bf6e318e7b50b7ef5 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -119,7 +119,9 @@ static void usage(bool compat)
|
||||
}
|
||||
if (!compat)
|
||||
print_output(" -L, --level level set lzma/bzip2/gzip compression level (1-9, default 7)\n");
|
||||
+#ifndef __serenity__
|
||||
print_output(" -N, --nice-level value Set nice value to value (default %d)\n", compat ? 0 : 19);
|
||||
+#endif
|
||||
print_output(" -p, --threads value Set processor count to override number of threads\n");
|
||||
print_output(" -m, --maxram size Set maximum available ram in hundreds of MB\n");
|
||||
print_output(" overrides detected amount of available ram\n");
|
||||
@@ -449,12 +451,14 @@ int main(int argc, char *argv[])
|
||||
failure("Extra characters after ramsize: \'%s\'\n", endptr);
|
||||
break;
|
||||
case 'N':
|
||||
+#ifndef __serenity__
|
||||
nice_set = true;
|
||||
control->nice_val = strtol(optarg, &endptr, 10);
|
||||
if (control->nice_val < PRIO_MIN || control->nice_val > PRIO_MAX)
|
||||
failure("Invalid nice value (must be %d...%d)\n", PRIO_MIN, PRIO_MAX);
|
||||
if (*endptr)
|
||||
failure("Extra characters after nice level: \'%s\'\n", endptr);
|
||||
+#endif
|
||||
break;
|
||||
case 'o':
|
||||
if (control->outdir)
|
7
Ports/lrzip/patches/ReadMe.md
Normal file
7
Ports/lrzip/patches/ReadMe.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Patches for lrzip on SerenityOS
|
||||
|
||||
## `0001-Remove-Linux-specific-code.patch`
|
||||
|
||||
Remove Linux `nice` specific code as SerenityOS does not support it.
|
||||
|
||||
|
Loading…
Reference in a new issue