diff --git a/NvimServer/NvimServer/bin/build_neovim.sh b/NvimServer/NvimServer/bin/build_neovim.sh index ff0634fa1..1e8d2b770 100755 --- a/NvimServer/NvimServer/bin/build_neovim.sh +++ b/NvimServer/NvimServer/bin/build_neovim.sh @@ -10,7 +10,7 @@ build_neovim() { # Brew's gettext does not get sym-linked to PATH export PATH="/opt/homebrew/opt/gettext/bin:/usr/local/opt/gettext/bin:${PATH}" - + export MACOSX_DEPLOYMENT_TARGET export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) cmake -S cmake.deps -B .deps -G Ninja \ @@ -19,11 +19,18 @@ build_neovim() { -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ -D CMAKE_FIND_FRAMEWORK=NEVER cmake --build .deps + + # See https://matrix.to/#/!cylwlNXSwagQmZSkzs:matrix.org/$WxndooGmUtD0a4IqjnALvZ_okHw3Gb0TZJIrc77T-SM?via=matrix.org&via=gitter.im&via=envs.net for libintl + cmake -B build -G Ninja \ -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ - -D CMAKE_FIND_FRAMEWORK=NEVER + -D CMAKE_FIND_FRAMEWORK=NEVER \ + -D LIBINTL_INCLUDE_DIR=../NvimServer/NvimServer/third-party/gettext/include \ + -D LIBINTL_LIBRARY=../NvimServer/NvimServer/third-party/gettext/lib/libintl.a +cmake --build build + cmake --build build cpack --config build/CPackConfig.cmake } diff --git a/NvimServer/NvimServer/bin/prepare_libintl.sh b/NvimServer/NvimServer/bin/prepare_libintl.sh index e5bcd1c6b..47b1ae6f2 100755 --- a/NvimServer/NvimServer/bin/prepare_libintl.sh +++ b/NvimServer/NvimServer/bin/prepare_libintl.sh @@ -23,7 +23,7 @@ main() { local version; version=$(brew info gettext --json | jq -r ".[0].versions.stable"); readonly version echo "### gettext version ${version}" - + local temp_dir; temp_dir="$(mktemp -d)"; readonly temp_dir echo "${temp_dir}" @@ -39,9 +39,15 @@ main() { popd >/dev/null mkdir universal - cp -r "${arm64_bottle}/gettext/${version}/include" ./universal/ + #cp -r "${arm64_bottle}/gettext/${version}/include" ./universal/ mkdir universal/lib lipo "${arm64_bottle}/gettext/${version}/lib/libintl.a" "${x86_64_bottle}/gettext/${version}/lib/libintl.a" -create -output ./universal/lib/libintl.a + + pushd ./universal >/dev/null + ln -s /opt/homebrew/opt/gettext/bin . + ln -s /opt/homebrew/opt/gettext/share . + ln -s /opt/homebrew/opt/gettext/include . + popd >/dev/null popd >/dev/null mv "${temp_dir}/universal" gettext