From 87b1b284aec8b48fb9c239196282d63d8f48058f Mon Sep 17 00:00:00 2001 From: madomado Date: Tue, 23 Jul 2024 23:08:19 +0800 Subject: [PATCH] fix pkg-config cflags maybe? Signed-off-by: madomado --- anda/devs/tracy/tracy.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/anda/devs/tracy/tracy.spec b/anda/devs/tracy/tracy.spec index 945bbc1c57..960bf61a7a 100644 --- a/anda/devs/tracy/tracy.spec +++ b/anda/devs/tracy/tracy.spec @@ -31,8 +31,12 @@ This package contains the development files for the tracy package. %build -export CXX="g++ -fPIE -I/usr/include/freetype2/ -I/usr/include/capstone/ $CXXFLAGS" -export LD="mold $LDFLAGS" +for lib in `pkg-config --list-all | sed -E 's/ .+$//'`; do pkg-config --cflags-only-I $lib >> cflags;done +for lib in `pkg-config --list-all | sed -E 's/ .+$//'`; do pkg-config --libs $lib >> lflags;done +cflags=$(cat cflags | tr -s '\n' | tr '\n' ' ') +lflags=$(cat lflags | tr -s '\n' | tr '\n' ' ') +export CXX="g++ -fuse-ld=mold -fPIE $CXXFLAGS $cflags" +export LD="mold $LDFLAGS $lflags" %meson %meson_build %make_build -C capture/build/unix release