2022-08-10 21:58:22 +03:00
|
|
|
distributable:
|
|
|
|
url: https://download.gnome.org/sources/glib/{{ version.major }}.{{ version.minor }}/glib-{{ version }}.tar.xz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-03 01:49:15 +03:00
|
|
|
gitlab: gitlab.gnome.org:GNOME/glib
|
2022-08-10 21:58:22 +03:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
gnu.org/gettext: ^0.21
|
|
|
|
sourceware.org/libffi: 3
|
2023-05-03 01:49:15 +03:00
|
|
|
# FIXME: this isn't great, but we need to bump to build new glibs.
|
|
|
|
# versioned dependencies would be needed to fix this, which could break
|
|
|
|
# any number of things in the version solver. However, this shouldn't be
|
|
|
|
# too dangerous, since they produce different libraries (libpcre vs libpcre2)
|
|
|
|
# glib bumped this in 2.73.2, after claiming for years they'd rather remove
|
|
|
|
# GRegex than bump the version. :(
|
|
|
|
# ref: https://gitlab.gnome.org/GNOME/glib/-/issues/1085
|
2022-08-10 21:58:22 +03:00
|
|
|
pcre.org: 8
|
2023-05-03 01:49:15 +03:00
|
|
|
pcre.org/v2: 10
|
2022-08-10 21:58:22 +03:00
|
|
|
|
2024-04-27 22:36:02 +03:00
|
|
|
companions:
|
|
|
|
gnome.org/gsettings-desktop-schemas: '*'
|
|
|
|
|
2023-12-27 21:40:31 +03:00
|
|
|
runtime:
|
|
|
|
env:
|
|
|
|
PYTHONPATH: '{{prefix}}/lib/python{{deps.python.org.version.major}}/site-packages:$PYTHONPATH'
|
|
|
|
|
2022-08-10 21:58:22 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
2023-12-22 19:09:35 +03:00
|
|
|
mesonbuild.com: ^1.2
|
2022-08-10 21:58:22 +03:00
|
|
|
ninja-build.org: 1
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
2023-10-03 18:23:56 +03:00
|
|
|
python.org: '>=3.5<3.12'
|
2023-12-22 19:09:35 +03:00
|
|
|
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"
|
2022-08-10 21:58:22 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
- meson out $ARGS
|
|
|
|
- cd out
|
2022-08-10 21:58:22 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
- ninja install
|
2022-09-30 03:10:43 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
- GT='${prefix}/../../../gnu.org/gettext/v{{ deps.gnu.org/gettext.version.major }}'
|
2022-10-24 22:29:00 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
- 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'
|
2022-10-24 22:29:00 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
- run: |
|
|
|
|
mv glib-{{version.major}}.0/* .
|
|
|
|
rmdir glib-{{version.major}}.0
|
|
|
|
ln -s . glib-{{version.major}}.0
|
2022-08-10 21:58:22 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
mv gio-unix-{{version.major}}.0/gio/* gio/
|
|
|
|
rmdir -p gio-unix-{{version.major}}.0/gio
|
|
|
|
ln -s . gio-unix-{{version.major}}.0
|
2023-09-23 18:17:51 +03:00
|
|
|
|
2023-12-22 19:09:35 +03:00
|
|
|
ln -s ../lib/glib-{{version.major}}.0/include/* .
|
|
|
|
working-directory: '{{prefix}}/include'
|
2023-09-23 17:36:32 +03:00
|
|
|
|
2023-12-27 21:40:31 +03:00
|
|
|
- cp -a ../venv/lib/python{{deps.python.org.version.marketing}} "{{prefix}}"/lib
|
|
|
|
- run: ln -s python{{deps.python.org.version.marketing}} python{{deps.python.org.version.major}}
|
|
|
|
working-directory: '{{prefix}}/lib'
|
|
|
|
|
2022-08-10 21:58:22 +03:00
|
|
|
#REF https://github.com/Homebrew/homebrew-core/blob/d0e65698ccd502335bea68ce879ae02e1735db0d/Formula/glib.rb#L66-L67
|
|
|
|
#FIXME hardcoded paths ^^
|
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- --prefix={{prefix}}
|
2022-10-24 22:29:00 +03:00
|
|
|
- --libdir={{prefix}}/lib
|
2022-08-10 21:58:22 +03:00
|
|
|
- --wrap-mode=nofallback
|
|
|
|
- --buildtype=release
|
|
|
|
# tests fail to build with `error: target emulation unknown: -m or at least one .o file required`
|
|
|
|
- -Dtests=false
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
2023-12-05 19:48:38 +03:00
|
|
|
script:
|
2022-10-24 22:29:00 +03:00
|
|
|
# unset these since we only want to test via pkg-config
|
2023-12-05 19:48:38 +03:00
|
|
|
- unset LIBRARY_PATH
|
|
|
|
- unset CPATH
|
|
|
|
- LD_LIBRARY_PATH_BAK=$LD_LIBRARY_PATH
|
|
|
|
- unset LD_LIBRARY_PATH
|
|
|
|
- DYLD_FALLBACK_LIBRARY_PATH_BAK=$DYLD_FALLBACK_LIBRARY_PATH
|
|
|
|
- unset DYLD_FALLBACK_LIBRARY_PATH
|
|
|
|
- cc $CFLAGS $LDFLAGS test.c
|
|
|
|
|
|
|
|
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_BAK
|
|
|
|
- export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH_BAK
|
|
|
|
- ./a.out
|
2022-08-10 21:58:22 +03:00
|
|
|
env:
|
|
|
|
# using pkg-config as pixman puts its headers in `include/pixman-1`
|
|
|
|
LDFLAGS: $(pkg-config --libs glib-2.0)
|
|
|
|
CFLAGS: $(pkg-config --cflags glib-2.0)
|
2022-12-05 22:10:34 +03:00
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/gdbus
|
|
|
|
- bin/gdbus-codegen
|
|
|
|
- bin/gio
|
|
|
|
- bin/gio-querymodules
|
|
|
|
- bin/glib-compile-resources
|
|
|
|
- bin/glib-compile-schemas
|
|
|
|
- bin/glib-genmarshal
|
|
|
|
- bin/glib-gettextize
|
|
|
|
- bin/glib-mkenums
|
|
|
|
- bin/gobject-query
|
|
|
|
- bin/gresource
|
|
|
|
- bin/gsettings
|
|
|
|
- bin/gtester
|
|
|
|
- bin/gtester-report
|