From f9d74ffc1ef6a4bc24b54dbcf81b6db47770304e Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 24 Aug 2025 00:06:21 +0700 Subject: [PATCH] Fix ffmpeg6 linking --- recipes/demos/osdemo/recipe.toml | 5 ++++- recipes/dev/llvm18/recipe.toml | 4 ---- recipes/dev/pkg-config/recipe.toml | 3 +-- recipes/libs/ffmpeg6/recipe.toml | 1 + recipes/libs/sdl2/recipe.toml | 11 ++++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/demos/osdemo/recipe.toml b/recipes/demos/osdemo/recipe.toml index 3fd27e849..720f1315f 100644 --- a/recipes/demos/osdemo/recipe.toml +++ b/recipes/demos/osdemo/recipe.toml @@ -8,8 +8,11 @@ dependencies = [ "zlib" ] script = """ +DYNAMIC_INIT + cp "${COOKBOOK_SOURCE}/../osdemo.c" ./osdemo.c -${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz +${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS osdemo.c -o osdemo \ + -lorbital $("${PKG_CONFIG}" --libs glu) -lz mkdir -pv "${COOKBOOK_STAGE}/usr/bin" cp -v "osdemo" "${COOKBOOK_STAGE}/usr/bin/osdemo" """ diff --git a/recipes/dev/llvm18/recipe.toml b/recipes/dev/llvm18/recipe.toml index 938511e0b..da8be3e49 100644 --- a/recipes/dev/llvm18/recipe.toml +++ b/recipes/dev/llvm18/recipe.toml @@ -31,8 +31,6 @@ case "${TARGET}" in ;; esac -export LDFLAGS="-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib $LDFLAGS" - COOKBOOK_CMAKE_FLAGS=( -DCMAKE_CXX_FLAGS="--std=gnu++11" -DBUILD_SHARED_LIBS=False @@ -68,7 +66,5 @@ COOKBOOK_CMAKE_FLAGS=( -DLLVM_ENABLE_PROJECTS="llvm" ) -set -x cookbook_cmake "${COOKBOOK_SOURCE}/llvm" -set +x """ diff --git a/recipes/dev/pkg-config/recipe.toml b/recipes/dev/pkg-config/recipe.toml index 5c87b7535..0560e2dac 100644 --- a/recipes/dev/pkg-config/recipe.toml +++ b/recipes/dev/pkg-config/recipe.toml @@ -2,7 +2,7 @@ tar = "https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" blake3 = "713372b09a1fafeec130dc9bf812a3880f2a90496af5d2194e508d91ccf667d0" script = """ -wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" +GNU_CONFIG_GET config.sub """ [build] @@ -15,6 +15,5 @@ dependencies = [ template = "custom" script = """ DYNAMIC_INIT -export LIBS="-lpcre2-8" cookbook_configure """ diff --git a/recipes/libs/ffmpeg6/recipe.toml b/recipes/libs/ffmpeg6/recipe.toml index 3808c2f91..bc63a4ec5 100644 --- a/recipes/libs/ffmpeg6/recipe.toml +++ b/recipes/libs/ffmpeg6/recipe.toml @@ -18,6 +18,7 @@ dependencies = [ script = """ DYNAMIC_INIT +export LDFLAGS="$LDFLAGS -lSDL2 -lorbital -lOSMesa -lstdc++" ARCH="${TARGET%%-*}" COOKBOOK_CONFIGURE_FLAGS=( --enable-cross-compile diff --git a/recipes/libs/sdl2/recipe.toml b/recipes/libs/sdl2/recipe.toml index c7550df6a..9cc943ac2 100644 --- a/recipes/libs/sdl2/recipe.toml +++ b/recipes/libs/sdl2/recipe.toml @@ -6,14 +6,15 @@ git = "https://gitlab.redox-os.org/redox-os/sdl2.git" template = "custom" dependencies = [ "liborbital", + "llvm18", "mesa", + "zlib", ] script = """ -COOKBOOK_CONFIGURE_FLAGS=( - --host="${TARGET}" - --prefix="/" +DYNAMIC_INIT +export LDFLAGS="$LDFLAGS -lorbital -lOSMesa -lstdc++" +COOKBOOK_CONFIGURE_FLAGS+=( --disable-pulseaudio - --disable-shared --disable-video-x11 --enable-audio --enable-dummyaudio @@ -24,5 +25,5 @@ COOKBOOK_CONFIGURE_FLAGS=( cookbook_configure # Hack to add OSMesa -sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/lib/pkgconfig/sdl2.pc" +sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/sdl2.pc" """