Changes between Version 7 and Version 8 of Ticket #70420, comment 9


Ignore:
Timestamp:
Aug 8, 2024, 12:52:26 AM (3 months ago)
Author:
wryfi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #70420, comment 9

    v7 v8  
    1414
    1515The fix for this is to get the compiler to look in `/opt/local/include/lua5.1` so that it uses the `lua.h` header from the `lua51` port. ''See'' [https://github.com/macports/macports-ports/pull/25223 GitHub PR].
    16 
    17 {{{
    18 diff --git a/editors/neovim/Portfile b/editors/neovim/Portfile
    19 index 6c79bb4bd3e..1d0825f863e 100644
    20 --- a/editors/neovim/Portfile
    21 +++ b/editors/neovim/Portfile
    22 @@ -48,7 +48,7 @@ cmake.build_type        Release
    23  configure.args-append   -DLUA_PRG=${prefix}/bin/luajit
    24 
    25  # Building parsers is normally an extra step, see https://github.com/neovim/neovim/issues/29042
    26 -patchfiles              embed-parsers-build.diff
    27 +patchfiles              embed-parsers-build.diff  patch-nlua0-includes.diff
    28 
    29  subport neovim-devel {
    30      github.setup    neovim neovim 0c2860d9e5ec5417a94db6e3edd237578b76d418
    31 diff --git a/editors/neovim/files/patch-nlua0-includes.diff b/editors/neovim/files/patch-nlua0-includes.diff
    32 new file mode 100644
    33 index 00000000000..4e6f7c8faef
    34 --- /dev/null
    35 +++ b/editors/neovim/files/patch-nlua0-includes.diff
    36 @@ -0,0 +1,12 @@
    37 +diff --git src/nvim/CMakeLists.txt src/nvim/CMakeLists.txt
    38 +index a100e733d..9c601819b 100644
    39 +--- src/nvim/CMakeLists.txt
    40 ++++ src/nvim/CMakeLists.txt
    41 +@@ -66,6 +66,7 @@ else()
    42 +   target_include_directories(main_lib SYSTEM BEFORE INTERFACE ${LUAJIT_INCLUDE_DIR})
    43 +   target_link_libraries(main_lib INTERFACE ${LUAJIT_LIBRARY})
    44 +   target_include_directories(nlua0 SYSTEM BEFORE PUBLIC ${LUAJIT_INCLUDE_DIR})
    45 ++  target_include_directories(nlua0 AFTER PUBLIC /opt/local/include/lua5.1)
    46 +   if(WIN32)
    47 +     target_link_libraries(nlua0 PUBLIC ${LUAJIT_LIBRARY})
    48 +   endif()
    49 }}}
    5016
    5117(Note that I'm not a CMake expert, and I'm not certain that `target_include_directories(nlua0 AFTER PUBLIC /opt/local/include/lua5.1)` is strictly correct; but it does the job.)