diff --git a/recipes/gstreamer/recipe.sh b/recipes/gstreamer/recipe.sh index 7fcf18a5d8d8b5ec37c9e48bce33ad36873795f4..d67fad183e91f7f35708fc08200abea4b0c496be 100644 --- a/recipes/gstreamer/recipe.sh +++ b/recipes/gstreamer/recipe.sh @@ -1,4 +1,4 @@ -VERSION=1.14.4 +VERSION=1.20.6 TAR=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$VERSION.tar.xz BUILD_DEPENDS=(gettext glib libffi libiconv pcre zlib) @@ -9,20 +9,53 @@ function recipe_version { function recipe_build { sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib --static" export GLIB_GENMARSHAL="$(which glib-genmarshal)" export GLIB_MKENUMS="$(which glib-mkenums)" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix=/ \ - --disable-shared \ - --enable-static \ - --disable-benchmarks \ - --disable-examples \ - --disable-tests - "$REDOX_MAKE" -j"$($NPROC)" V=1 + export LDFLAGS="-static" + + # 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 = '${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 . _build \ + --cross-file cross_file.txt \ + --buildtype release \ + --strip \ + -Ddefault_library=static \ + -Dprefix=/ \ + -Dlibdir=lib \ + -Dbenchmarks=disabled \ + -Dexamples=disabled \ + -Dtests=disabled + ninja -C _build -v skip=1 } @@ -32,8 +65,8 @@ function recipe_clean { } function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - rm -f "$dest/lib/"*.la + dest="$(realpath $1)" + DESTDIR="$dest" ninja -C _build -v install + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/gstreamer/redox.patch b/recipes/gstreamer/redox.patch index e2509f79942969dc852f973fb9f29252801dc48d..bffd8ffe53af3cccf60f5e3bef782b95cf991a06 100644 --- a/recipes/gstreamer/redox.patch +++ b/recipes/gstreamer/redox.patch @@ -1,6 +1,6 @@ diff -ruwN source/gst/gstpoll.c source-new/gst/gstpoll.c ---- source/gst/gstpoll.c 2018-03-23 14:44:36.000000000 -0600 -+++ source-new/gst/gstpoll.c 2019-01-05 15:17:35.861961634 -0700 +--- source/gst/gstpoll.c 2023-02-23 11:23:11.000000000 -0700 ++++ source-new/gst/gstpoll.c 2023-05-19 13:22:32.365660597 -0600 @@ -85,6 +85,10 @@ #include <sys/socket.h> #endif @@ -22,3 +22,36 @@ diff -ruwN source/gst/gstpoll.c source-new/gst/gstpoll.c goto no_socket_pair; nset->control_read_fd.fd = control_sock[0]; +diff -ruwN source/libs/gst/check/libcheck/meson.build source-new/libs/gst/check/libcheck/meson.build +--- source/libs/gst/check/libcheck/meson.build 2023-02-23 11:23:11.000000000 -0700 ++++ source-new/libs/gst/check/libcheck/meson.build 2023-05-19 13:26:51.285620215 -0600 +@@ -40,13 +40,13 @@ + endif + + # FIXME: check that timer_create, timer_settime, timer_delete are in rt_lib +-if not rt_lib.found() ++#if not rt_lib.found() + libcheck_files += files( + 'libcompat/timer_create.c', + 'libcompat/timer_settime.c', + 'libcompat/timer_delete.c' + ) +-endif ++#endif + + configure_file(input : 'check.h.in', + output : 'check.h', +diff -ruwN source/plugins/elements/gstfilesink.c source-new/plugins/elements/gstfilesink.c +--- source/plugins/elements/gstfilesink.c 2023-02-23 11:23:11.000000000 -0700 ++++ source-new/plugins/elements/gstfilesink.c 2023-05-19 13:23:26.885652108 -0600 +@@ -148,8 +148,10 @@ + else + g_assert_not_reached (); + ++#if !defined(__redox__) + if (o_sync) + flags |= O_SYNC; ++#endif + + fd = open (filename, flags, 0666); +