Browse Source

Ports: Add lzop compression utility port

Liav A 2 years ago
parent
commit
4b27c6e688

+ 1 - 0
Ports/AvailablePorts.md

@@ -148,6 +148,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
 | [`lure`](lure/)                                     | Lure of the Temptress                                           | 1.1                      | https://www.scummvm.org/games/#games-lure                                      |
 | [`lz4`](lz4/)                                       | lz4 - Extremely Fast Compression algorithm                      | 1.9.4                    | https://github.com/lz4/lz4                                                     |
 | [`lzo`](lzo/)                                       | LZO lossless data compression algorithm                         | 2.10                     | https://www.oberhumer.com/opensource/lzo/                                      |
+| [`lzop`](lzop/)                                     | LZO lossless data compression utility                           | 1.04                     | https://www.lzop.org/                                                          |
 | [`m4`](m4/)                                         | GNU M4                                                          | 1.4.19                   | https://www.gnu.org/software/m4/                                               |
 | [`make`](make/)                                     | GNU make                                                        | 4.3                      | https://www.gnu.org/software/make/                                             |
 | [`mandoc`](mandoc/)                                 | mandoc                                                          | 1.14.5                   | https://mandoc.bsd.lv/                                                         |

+ 9 - 0
Ports/lzop/package.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port='lzop'
+version='1.04'
+useconfigure='true'
+use_fresh_config_sub='true'
+config_sub_paths=('autoconf/config.sub')
+files="https://www.lzop.org/download/lzop-${version}.tar.gz lzop-${version}.tar.gz 7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41"
+auth_type='sha256'
+depends=("lzo")

+ 35 - 0
Ports/lzop/patches/0001-Don-t-try-to-use-malloc.h-header-file-in-the-codebas.patch

@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Liav A <liavalb@gmail.com>
+Date: Sun, 16 Oct 2022 13:14:06 +0300
+Subject: [PATCH] Don't try to use <malloc.h> header file in the codebase
+
+---
+ configure     | 2 +-
+ src/miniacc.h | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 77ac278aaf10a04c0a4d97ffaef5f083912f3f51..7a00285647bf78fdeb3e159dbd55be412b841743 100755
+--- a/configure
++++ b/configure
+@@ -5759,7 +5759,7 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+ 
+ fi
+ 
+-for ac_header in assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h
++for ac_header in assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h
+ do :
+   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+diff --git a/src/miniacc.h b/src/miniacc.h
+index 5f44085fad3e906785b090320a6d03e5fdcc17d3..4d75d7bb60ead2560f7db454ff52ee677b8dbcf6 100644
+--- a/src/miniacc.h
++++ b/src/miniacc.h
+@@ -3365,7 +3365,6 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast6
+ #define HAVE_FCNTL_H 1
+ #define HAVE_FLOAT_H 1
+ #define HAVE_LIMITS_H 1
+-#define HAVE_MALLOC_H 1
+ #define HAVE_MEMORY_H 1
+ #define HAVE_SETJMP_H 1
+ #define HAVE_SIGNAL_H 1

+ 7 - 0
Ports/lzop/patches/ReadMe.md

@@ -0,0 +1,7 @@
+# Patches for lzop on SerenityOS
+
+## `0001-Don-t-try-to-use-malloc.h-header-file-in-the-codebas.patch`
+
+Don't try to use <malloc.h> header file in the codebase
+
+