Skip to content

Commit

Permalink
Adapt build_neovim.sh
Browse files Browse the repository at this point in the history
Now we can use neovim/neovim repository
  • Loading branch information
qvacua committed Nov 13, 2023
1 parent 6124ab1 commit ffd0cfd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
11 changes: 9 additions & 2 deletions NvimServer/NvimServer/bin/build_neovim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
}
Expand Down
10 changes: 8 additions & 2 deletions NvimServer/NvimServer/bin/prepare_libintl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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
Expand Down

0 comments on commit ffd0cfd

Please sign in to comment.