fix(glib)

closes #4565
This commit is contained in:
Jacob Heider 2023-12-22 11:09:35 -05:00 committed by Jacob Heider
parent d11f61e163
commit dc4060218a

View file

@ -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 ^^