redox/recipes/libs/gstreamer/recipe.toml
2025-04-10 17:32:28 -06:00

81 lines
1.8 KiB
TOML

[source]
tar = "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.24.12/gstreamer-1.24.12.tar.gz"
blake3 = "181daf73050f7472ec656e7461b7f67028d6002c1133870576033a32e43a364f"
patches = ["redox.patch"]
[build]
template = "custom"
dependencies = [
"cairo",
"expat",
"ffmpeg6",
"freetype2",
"fontconfig",
"gettext",
"glib",
"harfbuzz",
"libffi",
"libiconv",
"libjpeg",
"libogg",
"libpng",
"libvorbis",
"libxml2",
#TODO "pango",
"pcre",
"pixman",
"zlib"
]
script = """
DYNAMIC_INIT
export GLIB_GENMARSHAL="$(which glib-genmarshal)"
export GLIB_MKENUMS="$(which glib-mkenums)"
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
# 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 "pkg-config = '${TARGET}-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}" \
_build \
--cross-file cross_file.txt \
--buildtype release \
--strip \
-Dprefix=/ \
-Dlibdir=lib \
-Dauto_features=disabled
ninja -C _build -v
DESTDIR="${COOKBOOK_STAGE}" ninja -C _build -v install
"""