From e96d4a0a3289ec2c57f5f446026f6ba74176ae73 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Tue, 4 Oct 2016 16:07:06 -0400 Subject: [PATCH 1/2] Allow OS X to build without libintl --- tools/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/kconfig/lxdialog/check-lxdialog.sh b/tools/kconfig/lxdialog/check-lxdialog.sh index 6964d2b0c..48c19278a 100755 --- a/tools/kconfig/lxdialog/check-lxdialog.sh +++ b/tools/kconfig/lxdialog/check-lxdialog.sh @@ -5,8 +5,8 @@ ldflags() { if [ $(uname -s) == "Darwin" ]; then - #OSX seems to need intl too - echo -n "-lintl " + #OSX seems to need ncurses too + echo -n "-lncurses" fi pkg-config --libs ncursesw 2>/dev/null && exit pkg-config --libs ncurses 2>/dev/null && exit @@ -41,6 +41,10 @@ ccflags() else echo '-DCURSES_LOC=""' fi + if [ $(uname -s) == "Darwin" ]; then + #OSX doesn't have libintl + echo -n "-DKBUILD_NO_NLS" + fi } # Temp file, try to clean up after us From b6dd8a55cd4d17750491f56c33d21a392bdd2840 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 7 Nov 2016 12:27:53 +0800 Subject: [PATCH 2/2] Fix build with macports/pkgconfig, silence format string warnings on OS X Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space). -Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs. --- tools/kconfig/lxdialog/check-lxdialog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kconfig/lxdialog/check-lxdialog.sh b/tools/kconfig/lxdialog/check-lxdialog.sh index 48c19278a..79df5ed4f 100755 --- a/tools/kconfig/lxdialog/check-lxdialog.sh +++ b/tools/kconfig/lxdialog/check-lxdialog.sh @@ -6,7 +6,7 @@ ldflags() { if [ $(uname -s) == "Darwin" ]; then #OSX seems to need ncurses too - echo -n "-lncurses" + echo -n "-lncurses " fi pkg-config --libs ncursesw 2>/dev/null && exit pkg-config --libs ncurses 2>/dev/null && exit @@ -43,7 +43,7 @@ ccflags() fi if [ $(uname -s) == "Darwin" ]; then #OSX doesn't have libintl - echo -n "-DKBUILD_NO_NLS" + echo -n "-DKBUILD_NO_NLS -Wno-format-security " fi }