diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 30f82be2040..8b1036754bc 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -31,6 +31,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`cmatrix`](cmatrix/) | cmatrix | 3112b12 | https://github.com/abishekvashok/cmatrix | | [`composer`](composer/) | Composer | 2.3.5 | https://getcomposer.org/ | | [`coreutils`](coreutils/) | GNU core utilities | 9.1 | https://www.gnu.org/software/coreutils/ | +| [`cpio`](cpio/) | GNU cpio archive utility | 2.13 | https://www.gnu.org/software/cpio/ | | [`curl`](curl/) | curl | 7.83.1 | https://curl.se/ | | [`dash`](dash/) | DASH | 0.5.10.2 | http://gondor.apana.org.au/~herbert/dash | | [`dialog`](dialog/) | Dialog | 1.3-20220526 | https://invisible-island.net/dialog/ | diff --git a/Ports/cpio/package.sh b/Ports/cpio/package.sh new file mode 100755 index 00000000000..16da303d8eb --- /dev/null +++ b/Ports/cpio/package.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port='cpio' +version='2.13' +useconfigure='true' +use_fresh_config_sub='true' +config_sub_paths=('build-aux/config.sub') +files="https://ftp.gnu.org/gnu/cpio/cpio-${version}.tar.gz cpio-${version}.tar.gz e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" +auth_type='sha256' diff --git a/Ports/cpio/patches/0001-Use-global-program_name-variable-from-gnu-dir.patch b/Ports/cpio/patches/0001-Use-global-program_name-variable-from-gnu-dir.patch new file mode 100644 index 00000000000..e8adc2b9014 --- /dev/null +++ b/Ports/cpio/patches/0001-Use-global-program_name-variable-from-gnu-dir.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Liav A +Date: Sat, 25 Jun 2022 05:45:29 +0300 +Subject: [PATCH] Use global program_name variable from gnu dir + +Without this patch being applied, there would be a conflict between the +variables between the 2 locations, so it will not compile otherwise. + +--- + src/global.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/global.c b/src/global.c +index fb3abe9..9ea63aa 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -20,6 +20,7 @@ + #include + + #include ++#include "gnu/progname.h" + #include "cpiohdr.h" + #include "dstring.h" + #include "extern.h" +@@ -184,9 +185,6 @@ unsigned int warn_option = 0; + /* Extract to standard output? */ + bool to_stdout_option = false; + +-/* The name this program was run with. */ +-char *program_name; +- + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); diff --git a/Ports/cpio/patches/ReadMe.md b/Ports/cpio/patches/ReadMe.md new file mode 100644 index 00000000000..d4a47c47147 --- /dev/null +++ b/Ports/cpio/patches/ReadMe.md @@ -0,0 +1,8 @@ +# Patches for cpio on SerenityOS + +## `0001-Use-global-program_name-variable-from-gnu-dir.patch` + +Use global program_name variable from gnu dir + +Without this patch being applied, there would be a conflict between the +variables between the 2 locations, so it will not compile otherwise.