From 6255c4e0533961e8e9989a53071a38b6bd6949dd Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 May 2017 13:44:02 +0200 Subject: [PATCH 1/3] build: FreeBSD: Disable -Wc11-extensions only for clang From FreeBSD ports patch: https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-CMakeLists.txt?revision=425833&view=markup References #4363 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab7595eb11..3e296308d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,7 @@ else() # On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang # 3.4.1 used there. - if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang") add_definitions(-Wno-c11-extensions) endif() endif() From 17a46dc5e0c814e8c5581fc3b62d67f7e5961670 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 May 2017 13:47:39 +0200 Subject: [PATCH 2/3] pty_process_unix.c: include on DragonFly BSD From FreeBSD ports patch: https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-src_nvim_os_pty__process__unix.c?revision=425833&view=markup References https://github.com/neovim/neovim/issues/6771#issuecomment-302921368 --- src/nvim/os/pty_process_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index eb9335b03c..ee3ab96a83 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -12,7 +12,7 @@ #include // forkpty is not in POSIX, so headers are platform-specific -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) # include #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include From a84926763f153ee2a97c1882223ecf925c05ba78 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 May 2017 14:05:38 +0200 Subject: [PATCH 3/3] install: bsd: install manpages to /usr/local/man https://svnweb.freebsd.org/ports/head/editors/neovim/Makefile?revision=428479&view=markup#l28 Closes #6771 --- CMakeLists.txt | 1 - cmake/InstallHelpers.cmake | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e296308d8..b67f75576b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -460,7 +460,6 @@ include(InstallHelpers) file(GLOB MANPAGES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} man/nvim.1) - install_helper( FILES ${MANPAGES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) diff --git a/cmake/InstallHelpers.cmake b/cmake/InstallHelpers.cmake index ee07ba2c66..ca20ddf354 100644 --- a/cmake/InstallHelpers.cmake +++ b/cmake/InstallHelpers.cmake @@ -1,3 +1,12 @@ +# Fix CMAKE_INSTALL_MANDIR on BSD before including GNUInstallDirs. #6771 +if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR) + if(DEFINED ENV{MANPREFIX}) + set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man") + else() + set(CMAKE_INSTALL_MANDIR "/usr/local/man") + endif() +endif() + # For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR include(GNUInstallDirs)