Commit f5b1b2aebcff856db1deeadbf62a719f2772aa2f

Thomas de Grivel 2023-11-20T14:17:36

quartz demo configure

diff --git a/libc3/window/cairo/quartz/demo/configure b/libc3/window/cairo/quartz/demo/configure
index 8dd3f18..d687539 100755
--- a/libc3/window/cairo/quartz/demo/configure
+++ b/libc3/window/cairo/quartz/demo/configure
@@ -33,9 +33,9 @@ APP_COV=c3_window_cairo_quartz_demo_cov.app
 APP_DEBUG=c3_window_cairo_quartz_demo_debug.app
 
 echo "APP = $APP" >> ${CONFIG_MK}
-echo "APP_ASAN = $APP_ASAN" >> ${CONFIG_MK}
-echo "APP_COV = $APP_COV" >> ${CONFIG_MK}
-echo "APP_DEBUG = $APP_DEBUG" >> ${CONFIG_MK}
+echo "APP_ASAN = ${APP_ASAN}" >> ${CONFIG_MK}
+echo "APP_COV = ${APP_COV}" >> ${CONFIG_MK}
+echo "APP_DEBUG = ${APP_DEBUG}" >> ${CONFIG_MK}
 
 APP_PROG=${APP}/Contents/MacOS/${PROG}
 APP_PROG_ASAN=${APP_ASAN}/Contents/MacOS/${PROG_ASAN}
@@ -78,6 +78,8 @@ LDFLAGS="$LDFLAGS -framework Cocoa"
 LIBS="$LIBS"
 config_asan
 config_gnu
+pkg_config cairo
+pkg_config xkbcommon
 
 # Asan config
 CFLAGS_ASAN="$CFLAGS -fsanitize=address -O1 -fno-omit-frame-pointer -g"
@@ -210,7 +212,7 @@ for BUNDLE_LIB in ${BUNDLE_LIBS}; do
     L=$(basename $BUNDLE_LIB)
     echo "	install_name_tool -id @executable_path/../Frameworks/ ${APP}/Contents/Frameworks/$L" >> ${CONFIG_MK}
     echo "	install_name_tool -change ${LIBDIR}/$L @executable_path/../Frameworks/$L ${APP}/Contents/MacOS/${PROG}" >> ${CONFIG_MK}
-    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f $APP/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D $APP/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
+    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP}/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
 done
 echo >> ${CONFIG_MK}
 echo ".PHONY: \\" >> ${CONFIG_MK}
@@ -226,7 +228,7 @@ for BUNDLE_LIB in ${BUNDLE_LIBS_ASAN}; do
     L=$(basename $BUNDLE_LIB)
     echo "	install_name_tool -id @executable_path/../Frameworks/ ${APP_ASAN}/Contents/Frameworks/$L" >> ${CONFIG_MK}
     echo "	install_name_tool -change ${LIBDIR}/$L @executable_path/../Frameworks/$L ${APP_ASAN}/Contents/MacOS/${PROG_ASAN}" >> ${CONFIG_MK}
-    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f $APP/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D $APP/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
+    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP_ASAN}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP_ASAN}/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
 done
 echo >> ${CONFIG_MK}
 echo ".PHONY: \\" >> ${CONFIG_MK}
@@ -242,7 +244,7 @@ for BUNDLE_LIB in ${BUNDLE_LIBS_COV}; do
     L=$(basename $BUNDLE_LIB)
     echo "	install_name_tool -id @executable_path/../Frameworks/ ${APP_COV}/Contents/Frameworks/$L" >> ${CONFIG_MK}
     echo "	install_name_tool -change ${LIBDIR}/$L @executable_path/../Frameworks/$L ${APP_COV}/Contents/MacOS/${PROG}" >> ${CONFIG_MK}
-    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f $APP/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D $APP/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
+    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP_COV}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP_COV}/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
 done
 echo >> ${CONFIG_MK}
 echo ".PHONY: \\" >> ${CONFIG_MK}
@@ -258,7 +260,7 @@ for BUNDLE_LIB in ${BUNDLE_LIBS_DEBUG}; do
     L=$(basename $BUNDLE_LIB)
     echo "	install_name_tool -id @executable_path/../Frameworks/ ${APP_DEBUG}/Contents/Frameworks/$L" >> ${CONFIG_MK}
     echo "	install_name_tool -change ${LIBDIR}/$L @executable_path/../Frameworks/$L ${APP_DEBUG}/Contents/MacOS/${PROG_DEBUG}" >> ${CONFIG_MK}
-    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f $APP/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D $APP/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
+    echo "	DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP_DEBUG}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP_DEBUG}/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
 done
 echo >> ${CONFIG_MK}
 echo ".PHONY: \\" >> ${CONFIG_MK}