diff --git a/recipes/libs/cairo/recipe.toml b/recipes/libs/cairo/recipe.toml index 17e81b9b5..47b1d5ebd 100644 --- a/recipes/libs/cairo/recipe.toml +++ b/recipes/libs/cairo/recipe.toml @@ -28,9 +28,8 @@ script = """ DYNAMIC_INIT #TODO: fix mutex implementation #TODO: why are math defines missing? -#TODO: why is -lexpat not automatic? +CFLAGS="${CFLAGS} -DCAIRO_NO_MUTEX=1 -DM_SQRT2=1.41421356237309504880 -DM_LN2=0.69314718055994530942" cookbook_meson \ - -Dc_args="-DCAIRO_NO_MUTEX=1 -DM_SQRT2=1.41421356237309504880 -DM_LN2=0.69314718055994530942 -lexpat" \ -Dxlib-xcb=enabled \ -Dtests=disabled """ diff --git a/recipes/libs/gstreamer/recipe.toml b/recipes/libs/gstreamer/recipe.toml index ec9309186..4944a00b2 100644 --- a/recipes/libs/gstreamer/recipe.toml +++ b/recipes/libs/gstreamer/recipe.toml @@ -62,8 +62,8 @@ DYNAMIC_INIT export GLIB_GENMARSHAL="$(which glib-genmarshal)" export GLIB_MKENUMS="$(which glib-mkenums)" +CFLAGS="${CFLAGS} -DM_LN2=0.69314718055994530942" cookbook_meson \ - -Dc_args="-DM_LN2=0.69314718055994530942" \ -Ddevtools=disabled \ -Dexamples=disabled \ -Dlibav=disabled \ diff --git a/recipes/libs/mesa/recipe.toml b/recipes/libs/mesa/recipe.toml index d473cc8c2..d581c1b31 100644 --- a/recipes/libs/mesa/recipe.toml +++ b/recipes/libs/mesa/recipe.toml @@ -13,8 +13,8 @@ dependencies = [ script = """ DYNAMIC_INIT -export CFLAGS+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1" -export CPPFLAGS+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1" +export CFLAGS+=" -DHAVE_PTHREAD=1" +export CPPFLAGS+=" -DHAVE_PTHREAD=1" export LLVM_CONFIG="${TARGET}-llvm-config" if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then diff --git a/recipes/libs/pango/recipe.toml b/recipes/libs/pango/recipe.toml index ce771723f..6ea4fcb58 100644 --- a/recipes/libs/pango/recipe.toml +++ b/recipes/libs/pango/recipe.toml @@ -33,9 +33,7 @@ dependencies = [ template = "custom" script = """ DYNAMIC_INIT -#TODO: why are these libs not automatic? cookbook_meson \ - -Dc_args="-lfontconfig -lexpat -lpixman-1 -lpng -lz -lcairo" \ -Dbuild-examples=false \ -Dbuild-testsuite=false """ diff --git a/recipes/wip/libs/gtk/gtk3/recipe.toml b/recipes/wip/libs/gtk/gtk3/recipe.toml index 63def6794..da2310916 100644 --- a/recipes/wip/libs/gtk/gtk3/recipe.toml +++ b/recipes/wip/libs/gtk/gtk3/recipe.toml @@ -43,9 +43,8 @@ dependencies = [ template = "custom" script = """ DYNAMIC_INIT -#TODO: why are libs not automatically detected? +CFLAGS="${CFLAGS} -DM_SQRT2=1.41421356237309504880" cookbook_meson \ - -Dc_args="-DM_SQRT2=1.41421356237309504880 -lXext -lX11 -lxcb -lXau" \ -Dintrospection=false \ -Dwayland_backend=false """ diff --git a/src/bin/cook.rs b/src/bin/cook.rs index 567a0eef3..ca2e4484b 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -965,6 +965,9 @@ function cookbook_meson { echo "[properties]" >> cross_file.txt echo "needs_exe_wrapper = true" >> cross_file.txt echo "sys_root = '${COOKBOOK_SYSROOT}'" >> cross_file.txt + echo "c_args = [$(printf "'%s', " $CFLAGS | sed 's/, $//')]" >> cross_file.txt + echo "cpp_args = [$(printf "'%s', " $CPPFLAGS | sed 's/, $//')]" >> cross_file.txt + echo "c_link_args = [$(printf "'%s', " $LDFLAGS | sed 's/, $//')]" >> cross_file.txt unset AR unset AS