From 8ae95898ac13c030e6b3bafba996370998c065b4 Mon Sep 17 00:00:00 2001 From: Julius Michaelis Date: Sat, 25 Sep 2021 23:36:46 +0900 Subject: [PATCH] Stop rolling my own wrap patching mechanism --- do.sh | 18 ------------------ meson/lz4.wrap | 6 +++--- .../lz4/COPYING.meson-wrap-from-upstream.build | 0 .../packagefiles}/lz4/LICENSE.build | 0 .../lz4/LICENSE.meson-wrap-from-upstream.build | 0 .../packagefiles}/lz4/meson.build | 0 .../packagefiles}/lz4/meson_options.txt | 0 .../packagefiles}/rdkafka/examples/meson.build | 0 .../librdkafka/meson.build | 0 .../packagefiles}/rdkafka/meson.build | 0 .../packagefiles}/rdkafka/meson_options.txt | 0 .../include-workaround-meson/sys/meson.build | 0 .../rdkafka/tests/interceptor_test/meson.build | 0 .../packagefiles}/rdkafka/tests/meson.build | 0 meson/rdkafka.wrap | 7 ++++--- 15 files changed, 7 insertions(+), 24 deletions(-) rename {wrappatch => meson/packagefiles}/lz4/COPYING.meson-wrap-from-upstream.build (100%) rename {wrappatch => meson/packagefiles}/lz4/LICENSE.build (100%) rename {wrappatch => meson/packagefiles}/lz4/LICENSE.meson-wrap-from-upstream.build (100%) rename {wrappatch => meson/packagefiles}/lz4/meson.build (100%) rename {wrappatch => meson/packagefiles}/lz4/meson_options.txt (100%) rename {wrappatch => meson/packagefiles}/rdkafka/examples/meson.build (100%) rename {wrappatch => meson/packagefiles}/rdkafka/include-workaround-meson/librdkafka/meson.build (100%) rename {wrappatch => meson/packagefiles}/rdkafka/meson.build (100%) rename {wrappatch => meson/packagefiles}/rdkafka/meson_options.txt (100%) rename {wrappatch => meson/packagefiles}/rdkafka/tests/include-workaround-meson/sys/meson.build (100%) rename {wrappatch => meson/packagefiles}/rdkafka/tests/interceptor_test/meson.build (100%) rename {wrappatch => meson/packagefiles}/rdkafka/tests/meson.build (100%) diff --git a/do.sh b/do.sh index 23d1d92..41f7afa 100755 --- a/do.sh +++ b/do.sh @@ -9,24 +9,6 @@ mkdir -p src tar --strip-components=1 -xvf src-$ver.tgz -C src cp -r --reflink=auto -t src meson* -mkdir -p src/meson/packagecache/ -mkdir -p wrappatch/tmp -for p in wrappatch/*; do - if test "$p" == wrappatch/tmp; then - continue - fi - w="src/meson/$(basename "$p").wrap" - test -f "$w" || (echo no $w && exit -1) - d="$(sed -rn 's/^directory *= *//p' "$w")" - s="wrappatch/tmp/$d" - rm -rf "$s" - cp -r "$p" "$s" - f=src/meson/packagecache/$(sed -rn 's/^patch_filename *= *//p' "$w") - echo "Generating $f" - (cd wrappatch/tmp; zip -r "../../$f" "$d") - sed -ri 's/^(patch_hash *=).*$/\1 '$(sha256sum $f | cut -d\ -f1)/ "$w" -done - export CC=${CC-musl-gcc} meson build src \ --wrap-mode forcefallback \ diff --git a/meson/lz4.wrap b/meson/lz4.wrap index 54a1c5b..92349c3 100644 --- a/meson/lz4.wrap +++ b/meson/lz4.wrap @@ -4,7 +4,7 @@ directory = lz4-1.9.3 source_url = https://github.com/lz4/lz4/archive/v1.9.3.tar.gz source_filename = lz4-1.9.3.tgz source_hash = 030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1 +patch_directory = lz4 -patch_url = https://wrapdb.mesonbuild.com/v1/projects/lz4/1.9.3/1/get_zip -patch_filename = lz4-1.9.3-1-wrap.zip -patch_hash = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +[provide] +liblz4 = liblz4_dep diff --git a/wrappatch/lz4/COPYING.meson-wrap-from-upstream.build b/meson/packagefiles/lz4/COPYING.meson-wrap-from-upstream.build similarity index 100% rename from wrappatch/lz4/COPYING.meson-wrap-from-upstream.build rename to meson/packagefiles/lz4/COPYING.meson-wrap-from-upstream.build diff --git a/wrappatch/lz4/LICENSE.build b/meson/packagefiles/lz4/LICENSE.build similarity index 100% rename from wrappatch/lz4/LICENSE.build rename to meson/packagefiles/lz4/LICENSE.build diff --git a/wrappatch/lz4/LICENSE.meson-wrap-from-upstream.build b/meson/packagefiles/lz4/LICENSE.meson-wrap-from-upstream.build similarity index 100% rename from wrappatch/lz4/LICENSE.meson-wrap-from-upstream.build rename to meson/packagefiles/lz4/LICENSE.meson-wrap-from-upstream.build diff --git a/wrappatch/lz4/meson.build b/meson/packagefiles/lz4/meson.build similarity index 100% rename from wrappatch/lz4/meson.build rename to meson/packagefiles/lz4/meson.build diff --git a/wrappatch/lz4/meson_options.txt b/meson/packagefiles/lz4/meson_options.txt similarity index 100% rename from wrappatch/lz4/meson_options.txt rename to meson/packagefiles/lz4/meson_options.txt diff --git a/wrappatch/rdkafka/examples/meson.build b/meson/packagefiles/rdkafka/examples/meson.build similarity index 100% rename from wrappatch/rdkafka/examples/meson.build rename to meson/packagefiles/rdkafka/examples/meson.build diff --git a/wrappatch/rdkafka/include-workaround-meson/librdkafka/meson.build b/meson/packagefiles/rdkafka/include-workaround-meson/librdkafka/meson.build similarity index 100% rename from wrappatch/rdkafka/include-workaround-meson/librdkafka/meson.build rename to meson/packagefiles/rdkafka/include-workaround-meson/librdkafka/meson.build diff --git a/wrappatch/rdkafka/meson.build b/meson/packagefiles/rdkafka/meson.build similarity index 100% rename from wrappatch/rdkafka/meson.build rename to meson/packagefiles/rdkafka/meson.build diff --git a/wrappatch/rdkafka/meson_options.txt b/meson/packagefiles/rdkafka/meson_options.txt similarity index 100% rename from wrappatch/rdkafka/meson_options.txt rename to meson/packagefiles/rdkafka/meson_options.txt diff --git a/wrappatch/rdkafka/tests/include-workaround-meson/sys/meson.build b/meson/packagefiles/rdkafka/tests/include-workaround-meson/sys/meson.build similarity index 100% rename from wrappatch/rdkafka/tests/include-workaround-meson/sys/meson.build rename to meson/packagefiles/rdkafka/tests/include-workaround-meson/sys/meson.build diff --git a/wrappatch/rdkafka/tests/interceptor_test/meson.build b/meson/packagefiles/rdkafka/tests/interceptor_test/meson.build similarity index 100% rename from wrappatch/rdkafka/tests/interceptor_test/meson.build rename to meson/packagefiles/rdkafka/tests/interceptor_test/meson.build diff --git a/wrappatch/rdkafka/tests/meson.build b/meson/packagefiles/rdkafka/tests/meson.build similarity index 100% rename from wrappatch/rdkafka/tests/meson.build rename to meson/packagefiles/rdkafka/tests/meson.build diff --git a/meson/rdkafka.wrap b/meson/rdkafka.wrap index 1f17bb3..9105766 100644 --- a/meson/rdkafka.wrap +++ b/meson/rdkafka.wrap @@ -4,7 +4,8 @@ directory = librdkafka-1.7.0 source_url = https://github.com/edenhill/librdkafka/archive/v1.7.0.tar.gz source_filename = rdkafka-1.7.0.tgz source_hash = c71b8c5ff419da80c31bb8d3036a408c87ad523e0c7588e7660ee5f3c8973057 +patch_directory = rdkafka -patch_url = https://wrapdb.mesonbuild.com/v1/projects/rdkafka/1.7.0/1/get_zip -patch_filename = rdkafka-1.7.0-1-wrap.zip -patch_hash = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +[provide] +rdkafka = rdkafka_dep +rdkafka++ = rdkafkapp_dep