summaryrefslogtreecommitdiff
path: root/chat/weechat/patches
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2017-11-04 17:16:58 +0000
committermaya <maya@pkgsrc.org>2017-11-04 17:16:58 +0000
commit87b552c7f604ea2085a64bb39b705c2c66d5ddab (patch)
treed9c1d5ac8e0aa09d4f6598b0c057b9618e884d7f /chat/weechat/patches
parent4c82283100e45de813c942030c2147648ca18964 (diff)
downloadpkgsrc-87b552c7f604ea2085a64bb39b705c2c66d5ddab.tar.gz
weechat: add configure check that eat_newline_glitch can be assigned to
Fixes netbsd-7 build.
Diffstat (limited to 'chat/weechat/patches')
-rw-r--r--chat/weechat/patches/patch-CMakeLists.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/chat/weechat/patches/patch-CMakeLists.txt b/chat/weechat/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..f1dc3d374e2
--- /dev/null
+++ b/chat/weechat/patches/patch-CMakeLists.txt
@@ -0,0 +1,48 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2017/11/04 17:16:58 maya Exp $
+
+--- CMakeLists.txt.orig 2017-09-23 11:08:45.000000000 +0000
++++ CMakeLists.txt
+@@ -25,7 +25,7 @@ project(weechat C)
+
+ # CMake options
+ set(CMAKE_VERBOSE_MAKEFILE OFF)
+-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
++set (CMAKE_MODULE_PATH "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" "/usr/pkgsrc/chat/weechat/work/.buildlink/cmake-Modules" ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
+ set(CMAKE_SKIP_RPATH ON)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror-implicit-function-declaration")
+ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror-implicit-function-declaration")
+@@ -150,7 +150,33 @@ check_include_files("sys/resource.h" HAV
+
+ check_function_exists(mallinfo HAVE_MALLINFO)
+
+-check_symbol_exists("eat_newline_glitch" "term.h" HAVE_EAT_NEWLINE_GLITCH)
++include(CheckCSourceCompiles)
++find_package(Ncurses)
++check_include_files(ncursesw/term.h HAVE_NCURSESW_TERM_H)
++check_include_files(ncurses/term.h HAVE_NCURSES_TERM_H)
++
++
++set(OLD_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
++
++if(NCURSES_FOUND)
++ set(CMAKE_REQUIRED_LIBRARIES "ncurses")
++else()
++ set(CMAKE_REQUIRED_LIBRARIES "curses")
++endif()
++
++CHECK_C_SOURCE_COMPILES("
++ #ifdef HAVE_NCURSES_TERM_H
++ #include <ncurses/term.h>
++ #endif
++ #include <term.h>
++
++ int main() {
++ eat_newline_glitch = 1;
++ return 0;
++ }
++ " HAVE_EAT_NEWLINE_GLITCH)
++
++set(CMAKE_REQUIRED_LIBRARIES "${OLD_CMAKE_REQUIRED_LIBRARIES}")
+
+ # Check for Large File Support
+ if(ENABLE_LARGEFILE)