From dc4060218a00ad6c3ba5c6378dffa8c2630575ce Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 22 Dec 2023 11:09:35 -0500 Subject: [PATCH] fix(glib) closes #4565 --- projects/gnome.org/glib/package.yml | 55 ++++++++++++++++------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/projects/gnome.org/glib/package.yml b/projects/gnome.org/glib/package.yml index 65f50bbf..645d0121 100644 --- a/projects/gnome.org/glib/package.yml +++ b/projects/gnome.org/glib/package.yml @@ -20,41 +20,46 @@ dependencies: build: dependencies: - mesonbuild.com: ^0.63 + mesonbuild.com: ^1.2 ninja-build.org: 1 freedesktop.org/pkg-config: ^0.29 python.org: '>=3.5<3.12' - script: | - meson out $ARGS + script: + # needs python packaging module + - run: | + python -m venv venv + source venv/bin/activate + python -m pip install packaging + deactivate + PYTHONPATH="$(pwd)/venv/lib/python{{deps.python.org.version.marketing}}/site-packages:$PYTHONPATH" - cd out - ninja -v - ninja install + - meson out $ARGS + - cd out - GT='${prefix}/../../../gnu.org/gettext/v{{ deps.gnu.org/gettext.version.major }}' + - ninja install - cd {{prefix}}/lib/pkgconfig + - GT='${prefix}/../../../gnu.org/gettext/v{{ deps.gnu.org/gettext.version.major }}' - sed -i.bak -e \ - 's|Libs: -L${libdir} -lglib-2.0 -lintl|Libs: -L${libdir} -lglib-2.0'\ -L$GT/lib\ -lintl\| \ - ./glib-2.0.pc - sed -i.bak -e \ - 's|Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include|Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include'\ -I$GT/include\| \ - ./glib-2.0.pc + - run: | + sed -i -e \ + 's|Libs: -L${libdir} -lglib-2.0 -lintl|Libs: -L${libdir} -lglib-2.0'\ -L$GT/lib\ -lintl\| \ + ./glib-2.0.pc + sed -i -e \ + 's|Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include|Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include'\ -I$GT/include\| \ + ./glib-2.0.pc + working-directory: '{{prefix}}/lib/pkgconfig' - rm *.bak + - run: | + mv glib-{{version.major}}.0/* . + rmdir glib-{{version.major}}.0 + ln -s . glib-{{version.major}}.0 - cd ../../include + mv gio-unix-{{version.major}}.0/gio/* gio/ + rmdir -p gio-unix-{{version.major}}.0/gio + ln -s . gio-unix-{{version.major}}.0 - mv glib-{{version.major}}.0/* . - rmdir glib-{{version.major}}.0 - ln -s . glib-{{version.major}}.0 - - mv gio-unix-{{version.major}}.0/gio/* gio/ - rmdir -p gio-unix-{{version.major}}.0/gio - ln -s . gio-unix-{{version.major}}.0 - - ln -s ../lib/glib-{{version.major}}.0/include/* . + ln -s ../lib/glib-{{version.major}}.0/include/* . + working-directory: '{{prefix}}/include' #REF https://github.com/Homebrew/homebrew-core/blob/d0e65698ccd502335bea68ce879ae02e1735db0d/Formula/glib.rb#L66-L67 #FIXME hardcoded paths ^^