fix(json-glib)

closes #6560
This commit is contained in:
Jacob Heider 2024-06-30 14:48:32 -04:00 committed by Jacob Heider
parent 1bb1a1180c
commit b9a4a06ac6

View file

@ -1,14 +1,17 @@
distributable: distributable:
url: https://download.gnome.org/sources/json-glib/{{version.marketing}}/json-glib-{{version}}.tar.xz url: https://download.gnome.org/sources/json-glib/{{version.marketing}}/json-glib-{{version}}.tar.xz
strip-components: 1 strip-components: 1
versions: versions:
url: https://download.gnome.org/sources/json-glib/cache.json url: https://download.gnome.org/sources/json-glib/cache.json
match: /json-glib-\d+\.\d+\.\d+\.tar\.xz/ match: /json-glib-\d+\.\d+\.\d+\.tar\.xz/
strip: strip:
- /^json-glib-/ - /^json-glib-/
- /\.tar\.xz/ - /\.tar\.xz/
dependencies: dependencies:
gnome.org/glib: ^2.78 gnome.org/glib: ^2.78
build: build:
dependencies: dependencies:
gnu.org/gettext: '*' gnu.org/gettext: '*'
@ -16,11 +19,20 @@ build:
mesonbuild.com: '*' mesonbuild.com: '*'
ninja-build.org: '*' ninja-build.org: '*'
script: script:
# clang-15 finds some kind of syntax error here
- run: sed -i 's/guint fchar/;guint fchar/' json-scanner.c
if: darwin
working-directory: json-glib
# avoid requiring a bunch more stuff
- run: MESON_ARGS="$MESON_ARGS -Ddocumentation=disabled"
if: '>=1.9.2'
- meson setup build $MESON_ARGS - meson setup build $MESON_ARGS
- meson compile -C build --verbose - meson compile -C build --verbose
- meson install -C build - meson install -C build
- run: ln -s json-glib-1.0/json-glib json-glib - run: ln -s json-glib-1.0/json-glib json-glib
working-directory: "{{prefix}}/include" working-directory: '{{prefix}}/include'
env: env:
MESON_ARGS: MESON_ARGS:
- --prefix="{{prefix}}" - --prefix="{{prefix}}"
@ -29,6 +41,7 @@ build:
- --wrap-mode=nofallback - --wrap-mode=nofallback
- -Dintrospection=enabled - -Dintrospection=enabled
- -Dman=false - -Dman=false
test: test:
script: script:
- cc test.c $ARGS -o test - cc test.c $ARGS -o test