diff options
author | matthew <matthew@FreeBSD.org> | 2016-06-10 03:01:27 +0800 |
---|---|---|
committer | matthew <matthew@FreeBSD.org> | 2016-06-10 03:01:27 +0800 |
commit | 3652fa3665e28ff3d0887235ec1f8bf5ad416403 (patch) | |
tree | bac39c9e6e6b7e80dca13a6b8bb66e9d6e857af1 /editors | |
parent | 65b962ad4488747c6b8b271f651e9576d4c38fdb (diff) | |
download | freebsd-ports-gnome-3652fa3665e28ff3d0887235ec1f8bf5ad416403.tar.gz freebsd-ports-gnome-3652fa3665e28ff3d0887235ec1f8bf5ad416403.tar.zst freebsd-ports-gnome-3652fa3665e28ff3d0887235ec1f8bf5ad416403.zip |
Fix be64toh() detection on BSDs from upstream
Use patch names as generated by 'make makepatch'
PR: 210054
Submitted by: gor@clogic.com.ua
Diffstat (limited to 'editors')
-rw-r--r-- | editors/neovim/files/patch-config_CMakeLists.txt | 11 | ||||
-rw-r--r-- | editors/neovim/files/patch-config__CMakeLists.txt | 26 | ||||
-rw-r--r-- | editors/neovim/files/patch-config__config.h.in | 9 | ||||
-rw-r--r-- | editors/neovim/files/patch-src__nvim__shada.c (renamed from editors/neovim/files/patch-src_nvim_shada.c) | 5 |
4 files changed, 38 insertions, 13 deletions
diff --git a/editors/neovim/files/patch-config_CMakeLists.txt b/editors/neovim/files/patch-config_CMakeLists.txt deleted file mode 100644 index 1b7ff6f9a2a0..000000000000 --- a/editors/neovim/files/patch-config_CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- config/CMakeLists.txt.orig 2016-06-09 12:33:52 UTC -+++ config/CMakeLists.txt -@@ -74,7 +74,7 @@ check_c_source_compiles(" - #define _BSD_SOURCE 1 - #define _DEFAULT_SOURCE 1 - ${SI} -- #include <endian.h> -+ #include <sys/endian.h> - #ifndef be64toh - # error No be64toh macros - #endif diff --git a/editors/neovim/files/patch-config__CMakeLists.txt b/editors/neovim/files/patch-config__CMakeLists.txt new file mode 100644 index 000000000000..833dad3a0cfb --- /dev/null +++ b/editors/neovim/files/patch-config__CMakeLists.txt @@ -0,0 +1,26 @@ +--- config/CMakeLists.txt.orig 2016-06-05 14:13:28 UTC ++++ config/CMakeLists.txt +@@ -67,6 +67,14 @@ if(HAVE_LANGINFO_H) + check_symbol_exists(CODESET "langinfo.h" HAVE_NL_LANGINFO_CODESET) + endif() + ++check_include_files("endian.h" HAVE_ENDIAN_H) ++check_include_files("sys/endian.h" HAVE_SYS_ENDIAN_H) ++ ++set(ENDIAN_INCLUDE_FILE "endian.h") ++if(HAVE_SYS_ENDIAN_H AND NOT HAVE_ENDIAN_H) ++ set(ENDIAN_INCLUDE_FILE "sys/endian.h") ++endif() ++ + set(SI "#include <stdint.h>\n") + set(MS "int main(int argc,char**argv)\n{\n uint64_t i=0x0102030405060708ULL;") + set(ME "}") +@@ -74,7 +82,7 @@ check_c_source_compiles(" + #define _BSD_SOURCE 1 + #define _DEFAULT_SOURCE 1 + ${SI} +- #include <endian.h> ++ #include <${ENDIAN_INCLUDE_FILE}> + #ifndef be64toh + # error No be64toh macros + #endif diff --git a/editors/neovim/files/patch-config__config.h.in b/editors/neovim/files/patch-config__config.h.in new file mode 100644 index 000000000000..72fb3e957c9f --- /dev/null +++ b/editors/neovim/files/patch-config__config.h.in @@ -0,0 +1,9 @@ +--- config/config.h.in.orig 2016-06-05 14:13:28 UTC ++++ config/config.h.in +@@ -57,5 +57,6 @@ + + #cmakedefine HAVE_BE64TOH + #cmakedefine ORDER_BIG_ENDIAN ++#define ENDIAN_INCLUDE_FILE <@ENDIAN_INCLUDE_FILE@> + + #endif // AUTO_CONFIG_H diff --git a/editors/neovim/files/patch-src_nvim_shada.c b/editors/neovim/files/patch-src__nvim__shada.c index 83a6966af367..c665c7c5695d 100644 --- a/editors/neovim/files/patch-src_nvim_shada.c +++ b/editors/neovim/files/patch-src__nvim__shada.c @@ -1,10 +1,11 @@ ---- src/nvim/shada.c.orig 2016-04-25 01:46:34 UTC +--- src/nvim/shada.c.orig 2016-06-05 14:13:28 UTC +++ src/nvim/shada.c -@@ -46,7 +46,6 @@ +@@ -46,7 +46,7 @@ #ifdef HAVE_BE64TOH # define _BSD_SOURCE 1 # define _DEFAULT_SOURCE 1 -# include <endian.h> ++# include ENDIAN_INCLUDE_FILE #endif // Note: when using bufset hash pointers are intentionally casted to uintptr_t |