From 80c7e5a4387008cdd90e0b3256d12c26e986be62 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Mon, 13 Jan 2025 13:49:55 +1100 Subject: [PATCH] Revert "feat(mesa): dynamic" This reverts commit c284034cff0dcefd7fc8ac2983e231ec4c23af5c. --- recipes/libs/mesa/recipe.toml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/recipes/libs/mesa/recipe.toml b/recipes/libs/mesa/recipe.toml index a3c731603..9fd73d094 100644 --- a/recipes/libs/mesa/recipe.toml +++ b/recipes/libs/mesa/recipe.toml @@ -11,13 +11,12 @@ dependencies = [ "zlib", ] script = """ -DYNAMIC_INIT #TODO: do this in cook instead unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP export CFLAGS="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1" export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1" -export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib --static" export LLVM_CONFIG="${TARGET}-llvm-config" # TODO: Fix this annoying shite @@ -47,23 +46,18 @@ meson "${COOKBOOK_SOURCE}" . \ --cross-file cross_file.txt \ --buildtype release \ --strip \ - -Ddefault_library=shared \ + -Ddefault_library=static \ -Dglx=disabled \ -Dllvm=enabled \ - -Dshared-llvm=enabled \ -Dosmesa=true \ -Dplatforms= \ -Dshader-cache=disabled \ + -Dshared-llvm=disabled \ -Dshared-glapi=disabled -ninja -j${COOKBOOK_MAKE_JOBS} +ninja -v DESTDIR="${COOKBOOK_STAGE}" ninja install + +# Hack to add LLVM libs +#TODO: only add necessary LLVM libs, not all of them +sed -i "s/ -lOSMesa / -lOSMesa $("${TARGET}-llvm-config" --libs) -lstdc++ /" "${COOKBOOK_STAGE}/lib/pkgconfig/osmesa.pc" """ - -[package] -dependencies = [ - "libgcc", - "zlib", - "llvm18", - "expat" -] -