diff options
author | maya <maya@pkgsrc.org> | 2018-07-22 21:32:34 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2018-07-22 21:32:34 +0000 |
commit | 48b0384702b0d798a9a57a6a728dfef15d42bc87 (patch) | |
tree | 8cfb2201f22b99e6f031b9944b9db31f145f01d8 /chat/weechat/patches | |
parent | 4334577ea335219eaa4758fd9c947f3a3b3119ff (diff) | |
download | pkgsrc-48b0384702b0d798a9a57a6a728dfef15d42bc87.tar.gz |
weechat: make curses detection logic handle netbsd curses, at the possible
expense of causing problems due to pkgsrc infrastructure not hiding a base
curses well enough.
We now search in the following order:
ncursesw, curses, ncurses.
With cmake under pkgsrc, it will search your /usr/lib, so I don't have a
way to hide a base curses if requested to do so.
if you're trying to use pkgsrc ncurses and have a base curses, this
will use your base curses.
bump pkgrevision.
Diffstat (limited to 'chat/weechat/patches')
-rw-r--r-- | chat/weechat/patches/patch-cmake_FindNcurses.cmake | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/chat/weechat/patches/patch-cmake_FindNcurses.cmake b/chat/weechat/patches/patch-cmake_FindNcurses.cmake new file mode 100644 index 00000000000..d9f342671c6 --- /dev/null +++ b/chat/weechat/patches/patch-cmake_FindNcurses.cmake @@ -0,0 +1,67 @@ +$NetBSD: patch-cmake_FindNcurses.cmake,v 1.1 2018/07/22 21:32:34 maya Exp $ + +Try the following order: +ncursesw, then plain curses, then ncurses. +NCURSES_LIBRARY must be defined. +(for netbsd curses) + +--- cmake/FindNcurses.cmake.orig 2018-03-18 06:41:40.000000000 +0000 ++++ cmake/FindNcurses.cmake +@@ -22,7 +22,7 @@ if(NCURSES_FOUND) + endif() + + find_path(NCURSES_INCLUDE_PATH +- NAMES ncurses.h curses.h ++ NAMES curses.h + PATHS /usr/include/ncursesw /usr/include/ncurses /usr/include + /usr/local/include/ncursesw /usr/local/include/ncurses /usr/local/include + /usr/pkg/include/ncursesw /usr/pkg/include/ncurses /usr/pkg/include +@@ -33,6 +33,16 @@ find_library(NCURSESW_LIBRARY + PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib + ) + ++find_library(NCURSES_LIBRARY ++ NAMES ncurses ++ PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib ++) ++ ++find_library(CURSES_LIBRARY ++ NAMES curses ++ PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib ++) ++ + if(NCURSESW_LIBRARY) + find_package(PkgConfig QUIET) + if(PKG_CONFIG_FOUND) +@@ -40,21 +50,21 @@ if(NCURSESW_LIBRARY) + set(NCURSESW_LIBRARY ${NCURSES_LIBRARIES} ${NCURSES_CFLAGS_OTHER}) + endif() + set(NCURSES_LIBRARY ${NCURSESW_LIBRARY}) +-else() +- find_library(NCURSES_LIBRARY +- NAMES ncurses +- PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib +- ) ++ ++ ++elseif(CURSES_LIBRARY) ++ set(NCURSES_LIBRARY ${CURSES_LIBRARY}) ++ ++ ++elseif(NCURSES_LIBRARY) + find_package(PkgConfig QUIET) + if(PKG_CONFIG_FOUND) + pkg_search_module(NCURSES ncurses) + set(NCURSES_LIBRARY ${NCURSES_LIBRARIES} ${NCURSES_CFLAGS_OTHER}) + endif() +- if(NCURSES_LIBRARY) +- message("*** WARNING:\n" +- "*** ncursesw library not found! Falling back to \"ncurses\"\n" +- "*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.") +- endif() ++ message("*** WARNING:\n" ++ "*** ncursesw library not found! Falling back to \"ncurses\"\n" ++ "*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.") + endif() + + if(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY) |