From 79c43789a9f1df002be0651dae6bbf5c9d31ccb1 Mon Sep 17 00:00:00 2001 From: mcuee Date: Mon, 24 Oct 2022 08:47:02 +0800 Subject: [PATCH 1/2] Update build.sh to use readline keg For macOS Homebrew, readline is a keg. This change makes avrdude uses readline keg. --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 879c0a73..08f0a7bf 100755 --- a/build.sh +++ b/build.sh @@ -53,9 +53,9 @@ case "${ostype}" in # Apple M1 (may be new version of homebrew also) if [ -d /opt/homebrew ] then - build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/opt/homebrew/include -D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar -D HAVE_LIBREADLINE:FILEPATH=/opt/homebrew/lib/libreadline.dylib" + build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/opt/homebrew/include -D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar -D HAVE_LIBREADLINE:FILEPATH=/opt/homebrew/opt/readline/lib/libreadline.dylib" else - build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/usr/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar -D HAVE_LIBREADLINE:FILEPATH=/usr/local/lib/libreadline.dylib" + build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/usr/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar -D HAVE_LIBREADLINE:FILEPATH=/usr/local/opt/readline/lib/libreadline.dylib" fi fi ;; From 5862a5b7e912c5f652318f65e483891de296a1be Mon Sep 17 00:00:00 2001 From: mcuee Date: Mon, 24 Oct 2022 08:50:57 +0800 Subject: [PATCH 2/2] Use readline for github action macOS Homebrew Update github action to use readline keg and not the default libedit under Homebrew --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ac4313c..030f7ca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -161,6 +161,7 @@ jobs: libusb hidapi libftdi + readline - name: Configure run: >- cmake @@ -168,6 +169,7 @@ jobs: -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar -D DEBUG_CMAKE=1 -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -D HAVE_LIBREADLINE:FILEPATH=/usr/local/opt/readline/lib/libreadline.dylib -B build - name: Build run: cmake --build build