redox/recipes/dev/gdk-pixbuf/recipe.toml
2025-05-01 12:24:59 -06:00

67 lines
1.6 KiB
TOML

[source]
tar = "https://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.38/gdk-pixbuf-2.38.1.tar.xz"
blake3 = "131cf94d458bf353e42993714477e746fe3f1e4d39cb4acd4c82a5d5e341679b"
patches = ["redox.patch"]
[build]
dependencies = [
"gettext",
"glib",
"libffi",
"libiconv",
"libjpeg",
"libpng",
"pcre",
"shared-mime-info",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
# TODO: Fix this annoying shite
echo "[binaries]" > cross_file.txt
echo "c = '${CC}'" >> cross_file.txt
echo "cpp = '${CXX}'" >> cross_file.txt
echo "ar = '${AR}'" >> cross_file.txt
echo "strip = '${STRIP}'" >> cross_file.txt
echo "pkgconfig = '${PKG_CONFIG}'" >> cross_file.txt
echo "[host_machine]" >> cross_file.txt
echo "system = 'redox'" >> cross_file.txt
echo "cpu_family = '$(echo "${TARGET}" | cut -d - -f1)'" >> cross_file.txt
echo "cpu = '$(echo "${TARGET}" | cut -d - -f1)'" >> cross_file.txt
echo "endian = 'little'" >> cross_file.txt
echo "[paths]" >> cross_file.txt
echo "prefix = '${COOKBOOK_SYSROOT}'" >> cross_file.txt
echo "libdir = 'lib'" >> cross_file.txt
echo "bindir = 'bin'" >> cross_file.txt
unset AR
unset AS
unset CC
unset CXX
unset LD
unset NM
unset OBJCOPY
unset OBJDUMP
unset PKG_CONFIG
unset RANLIB
unset READELF
unset STRIP
meson setup "${COOKBOOK_SOURCE}" . \
--cross-file cross_file.txt \
--buildtype release \
--strip \
-Ddefault_library=shared \
-Dprefix=/ \
-Dlibdir=lib \
-Dbuiltin_loaders=all \
-Dgir=false \
-Dinstalled_tests=false \
-Dx11=false
ninja -v
DESTDIR="${COOKBOOK_STAGE}" ninja -v install
"""