Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions projects/github.com/argp-standalone/argp-standalone/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
distributable:
url: https://github.com/argp-standalone/argp-standalone/archive/refs/tags/{{version}}.tar.gz
strip-components: 1

versions:
github: argp-standalone/argp-standalone/tags

# Standalone GNU argp argument parser, for systems whose libc does not provide
# argp.h (macOS, FreeBSD, musl). On glibc Linux it is not needed but the build
# is harmless.

build:
dependencies:
mesonbuild.com: "*"
ninja-build.org: "*"
freedesktop.org/pkg-config: "*"
script:
- meson setup build $ARGS
- meson compile -C build --jobs {{ hw.concurrency }}
- meson install -C build
env:
ARGS:
- --prefix={{prefix}}
- --buildtype=release
- --default-library=static

test:
- cc test.c -I{{prefix}}/include -L{{prefix}}/lib -largp -o test
- ./test --version | grep -F 1.0
10 changes: 10 additions & 0 deletions projects/github.com/argp-standalone/argp-standalone/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <argp.h>
#include <stdio.h>

const char *argp_program_version = "argp-standalone-test 1.0";

int main(int argc, char **argv)
{
error_t err = argp_parse(0, argc, argv, 0, 0, 0);
return err ? 1 : 0;
}
67 changes: 67 additions & 0 deletions projects/github.com/zchunk/zchunk/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
distributable:
url: https://github.com/zchunk/zchunk/archive/refs/tags/{{version}}.tar.gz
strip-components: 1

versions:
github: zchunk/zchunk/tags

# Reference C implementation of the zchunk container format used by Fedora's
# DNF/librepo for delta-downloaded repository metadata.

dependencies:
openssl.org: ^1.1
facebook.com/zstd: ^1
curl.se: ^8

build:
dependencies:
mesonbuild.com: "*"
ninja-build.org: "*"
freedesktop.org/pkg-config: "*"
script:
# macOS' libc has no <argp.h>, so zchunk's meson build falls back to
# the `argp-standalone` subproject shipped in upstream's tarball. The
# upstream wrap file is `wrap-git`, which needs git+network at build
# time; rewrite it as `wrap-file` so meson can fetch a verified
# tarball via curl (already available in our build env) and build the
# sources from source as a meson subproject. Linux glibc provides
# argp.h directly and never touches the subproject.
- run: |
cat > subprojects/argp-standalone.wrap <<'WRAP'
[wrap-file]
directory = argp-standalone-1.5.0
source_url = https://github.com/argp-standalone/argp-standalone/archive/refs/tags/1.5.0.tar.gz
source_filename = argp-standalone-1.5.0.tar.gz
source_hash = c29eae929dfebd575c38174f2c8c315766092cec99a8f987569d0cad3c6d64f6

[provide]
dependency_names = argp-standalone
WRAP
if: darwin
- meson setup build $ARGS
- meson compile -C build --jobs {{ hw.concurrency }}
- meson install -C build
env:
ARGS:
- --prefix={{prefix}}
- --buildtype=release
- -Ddocs=false
- -Dtests=false
- --wrap-mode=default
- --force-fallback-for=argp-standalone

provides:
- bin/zck
- bin/unzck
- bin/zck_delta_size
- bin/zck_gen_zdict
- bin/zck_read_header
- bin/zckdl

test:
- echo "hello zchunk roundtrip" > greeting.txt
- zck greeting.txt
- test -f greeting.txt.zck
- rm greeting.txt
- unzck greeting.txt.zck
- test "$(cat greeting.txt)" = "hello zchunk roundtrip"
Loading