From 9d88e00a56899ce63020c23210ec48bab040505c Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 15 Mar 2026 21:25:40 +0200 Subject: [PATCH] Switch to new download format, fix dependencies and disable mt --- pkg.info | 17 ++++++++-- source-files/cpio-c23-comformity.patch | 45 ++++++++++++++++++++++++++ source.sh | 13 +++----- 3 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 source-files/cpio-c23-comformity.patch diff --git a/pkg.info b/pkg.info index 00be07e..e5ce702 100644 --- a/pkg.info +++ b/pkg.info @@ -1,8 +1,21 @@ name: cpio description: Cpio tar archive management tool -version: 2.15 -revision: 2 +version: "2.15" +revision: 3 url: https://www.gnu.org/software/cpio license: GPL3-or-later +maintainers: + - enumdev@enumerated.dev architecture: any type: source +depends: + - glibc +make_depends: + - rsync + - wget + - bzip2 +downloads: + - url: https://ftpmirror.gnu.org/gnu/cpio/cpio-${BPM_PKG_VERSION}.tar.bz2 + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db diff --git a/source-files/cpio-c23-comformity.patch b/source-files/cpio-c23-comformity.patch new file mode 100644 index 0000000..70433c0 --- /dev/null +++ b/source-files/cpio-c23-comformity.patch @@ -0,0 +1,45 @@ +From f42137f5ab9cf07d1e62edc05e0212688d3ebaa2 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Tue, 6 May 2025 21:02:43 +0300 +Subject: Fix c23 conformity + +--- + src/extern.h | 4 ++-- + src/global.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/extern.h b/src/extern.h +index bf3d5b3..455119b 100644 +--- a/src/extern.h ++++ b/src/extern.h +@@ -96,8 +96,8 @@ extern char input_is_special; + extern char output_is_special; + extern char input_is_seekable; + extern char output_is_seekable; +-extern int (*xstat) (); +-extern void (*copy_function) (); ++extern int (*xstat) (const char *, struct stat *); ++extern void (*copy_function) (void); + extern char *change_directory_option; + + #define STRINGIFY_BIGINT(i, b) umaxtostr (i, b) +diff --git a/src/global.c b/src/global.c +index 66686f2..5c6ab16 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -184,10 +184,10 @@ bool to_stdout_option = false; + + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ +-int (*xstat) (); ++int (*xstat) (const char *, struct stat *); + + /* Which copy operation to perform. (-i, -o, -p) */ +-void (*copy_function) () = 0; ++void (*copy_function) (void) = 0; + + char *change_directory_option; + +-- +cgit v1.2.3 + diff --git a/source.sh b/source.sh index 81f9c82..2781aec 100644 --- a/source.sh +++ b/source.sh @@ -2,22 +2,17 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://ftpmirror.gnu.org/gnu/cpio/cpio-${BPM_PKG_VERSION}.tar.bz2" -FILENAME="${DOWNLOAD##*/}" - # The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location +# This function is used for putting downloaded files to the correct location or applying patches prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/cpio-c23-comformity.patch } # The build function is executed in the source directory # This function is used to compile the source code build() { - ./configure --prefix=/usr \ - --enable-mt \ - --with-rmt=/usr/libexec/rmt + ./configure --prefix=/usr --with-rmt=/dev/null make }