diff --git a/projects/github.com/google/open-vcdiff/package.yml b/projects/github.com/google/open-vcdiff/package.yml new file mode 100644 index 0000000000..dc164beddd --- /dev/null +++ b/projects/github.com/google/open-vcdiff/package.yml @@ -0,0 +1,67 @@ +# open-vcdiff — VCDIFF (RFC 3284) encoder/decoder by Google. +# +# Generic-differencing format used by Chrome's SDCH (Shared Dictionary +# Compression over HTTP), Google's Update protocol, and various delta +# compression schemes. Apache-2.0. +# +# Upstream marked the repo archived on 2023-08-26 — no active +# development but it's RFC-compliant and remains the canonical +# reference C++ implementation. Worth packaging precisely because +# nothing replaces it. + +distributable: + url: https://github.com/google/open-vcdiff/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + # Upstream publishes git tags but ZERO GitHub Releases. Default + # `github: ` mode queries /releases and returns empty + # (hence `not-found: version` on first CI runs). Force /tags. + github: google/open-vcdiff/tags + # Tag scheme changed: older releases used `open-vcdiff-X.Y` (dashes), + # recent ones use `openvcdiff-X.Y.Z` (no dash). Single combined regex. + strip: /^open-?vcdiff-/ + # First tag `open-vcdiff-0.8` is 2-part — invalid strict semver. + ignore: + - /^open-vcdiff-0\.8$/ + +platforms: + - linux/x86-64 + - linux/aarch64 + - darwin/x86-64 + - darwin/aarch64 + +build: + dependencies: + gnu.org/autoconf: '*' + gnu.org/automake: '*' + gnu.org/libtool: '*' + gnu.org/make: '*' + freedesktop.org/pkg-config: '*' + linux: + gnu.org/gcc: '*' + script: + # Upstream ships configure.ac only; run autoreconf to generate + # configure. Submodules (`gflags`, `gtest`) are NOT in the + # GitHub archive tarball — autoreconf's `aclocal` scans + # `gflags/m4` and bails with "no such file" without them. + # Create the empty directories so autoreconf proceeds; the + # actual gflags/gtest content is only needed for the test + # suite which we don't run. + - mkdir -p gflags/m4 gtest + - autoreconf -fi + - ./configure --prefix={{prefix}} + - make --jobs {{ hw.concurrency }} + - make install + +provides: + - bin/vcdiff + +test: + # Round-trip: create dict, target; encode; decode; check identity. + - run: | + printf 'the quick brown fox jumps over the lazy dog\n' > dict.txt + printf 'the quick brown FOX jumps over the lazy DOG\n' > target.txt + vcdiff encode -dictionary dict.txt -target target.txt -delta delta.vcdiff + vcdiff decode -dictionary dict.txt -delta delta.vcdiff -target out.txt + diff -q target.txt out.txt