Last active
December 18, 2015 06:09
-
-
Save maman/5737564 to your computer and use it in GitHub Desktop.
Homebrew recipe for ncursesw - ncurses with wide-chars support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- configure 2011-04-01 10:35:51.000000000 +1100 | |
+++ configure 2011-08-04 17:33:06.000000000 +1000 | |
@@ -3216,7 +3216,7 @@ | |
program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
rm conftest.sed | |
-for ac_prog in mawk gawk nawk awk | |
+for ac_prog in mawk gawk awk | |
do | |
# Extract the first word of "$ac_prog", so it can be a program name with args. | |
set dummy $ac_prog; ac_word=$2 | |
@@ -7813,7 +7813,6 @@ | |
echo "$as_me:7813: result: $with_widec" >&5 | |
echo "${ECHO_T}$with_widec" >&6 | |
if test "$with_widec" = yes ; then | |
- LIB_SUFFIX="w${LIB_SUFFIX}" | |
cat >>confdefs.h <<\EOF | |
#define USE_WIDEC_SUPPORT 1 | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- c++/cursesf.h 2011-07-23 10:05:34.000000000 +0200 | |
+++ c++/cursesf.h 2011-07-23 10:06:20.000000000 +0200 | |
@@ -677,7 +677,7 @@ | |
} | |
public: | |
- NCursesUserForm (NCursesFormField Fields[], | |
+ NCursesUserForm (NCursesFormField* Fields[], | |
const T* p_UserData = STATIC_CAST(T*)(0), | |
bool with_frame=FALSE, | |
bool autoDelete_Fields=FALSE) | |
@@ -686,7 +686,7 @@ | |
set_user (const_cast<void *>(p_UserData)); | |
}; | |
- NCursesUserForm (NCursesFormField Fields[], | |
+ NCursesUserForm (NCursesFormField* Fields[], | |
int nlines, | |
int ncols, | |
int begin_y = 0, | |
--- c++/cursesm.h.orig 2011-07-23 10:05:50.000000000 +0200 | |
+++ c++/cursesm.h 2011-07-23 10:06:46.000000000 +0200 | |
@@ -635,7 +635,7 @@ | |
} | |
public: | |
- NCursesUserMenu (NCursesMenuItem Items[], | |
+ NCursesUserMenu (NCursesMenuItem* Items[], | |
const T* p_UserData = STATIC_CAST(T*)(0), | |
bool with_frame=FALSE, | |
bool autoDelete_Items=FALSE) | |
@@ -644,7 +644,7 @@ | |
set_user (const_cast<void *>(p_UserData)); | |
}; | |
- NCursesUserMenu (NCursesMenuItem Items[], | |
+ NCursesUserMenu (NCursesMenuItem* Items[], | |
int nlines, | |
int ncols, | |
int begin_y = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Nru ./misc/terminfo.src ../ncurses-5.4+hex/misc/terminfo.src | |
--- ./misc/terminfo.src 2004-01-17 17:37:18.000000000 -0800 | |
+++ ../ncurses-5.4+hex/misc/terminfo.src 2004-11-27 15:10:30.000000000 -0800 | |
@@ -5754,7 +5754,7 @@ | |
# hp2621 with function labels. Most of the time they are off, | |
# but inside vi, the function key labels appear. You have to | |
# hold down shift to get them to xmit. | |
-hp2621|hp2621a|hp2621A|2621|2621a|2621A|hp2621-wl|2621-wl|hp 2621 w/labels, | |
+hp2621|hp2621a|2621|2621a|hp2621-wl|2621-wl|hp 2621 w/labels, | |
is2=\E&jA\r, rmkx=\E&jA, use=hp2621-fl, | |
hp2621-fl|hp 2621, | |
xhp@, xon, | |
@@ -6247,7 +6247,7 @@ | |
ri=\Ej, rmir=\Er, rmso=\EG0$<10/>, rmul=\EG0$<10/>, | |
sgr0=\EG0$<10/>, smir=\Eq, smso=\EG4$<10/>, | |
smul=\EG8$<10/>, tbc=\E0, vpa=\E[%p1%{32}%+%c, | |
-hp70092|hp70092a|hp70092A|HP 700/92, | |
+hp70092|hp70092a|HP 700/92, | |
am, da, db, xhp, | |
cols#80, lh#2, lines#24, lm#0, lw#8, nlab#8, | |
acsc=0cjgktlrmfn/q\,t5u6v8w7x., bel=^G, blink=\E&dA, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Ncursesw <Formula | |
url 'http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz' | |
md5 '8cb9c412e5f2d96bc6f459aa8c6282a1' | |
homepage 'http://www.gnu.org/software/ncurses/ncurses.html' | |
def patches | |
# from http://www.opensource.apple.com/source/ncurses/ncurses-27/patches/ | |
[ | |
"https://gist.github.com/maman/5737564/raw/ungetch_guard.diff", | |
"https://gist.github.com/maman/5737564/raw/configure.diff", | |
"https://gist.github.com/maman/5737564/raw/constructor_types.diff" | |
] | |
end | |
def install | |
system "./configure", "--prefix=#{prefix}", | |
"--mandir=#{man}", | |
"--disable-debug", | |
"--disable-dependency-tracking", | |
"--enable-widec", | |
"--disable-rpath", | |
"--with-shared", | |
"--without-ada", | |
"--enable-safe-sprintf", | |
"--enable-sigwinch", | |
"--enable-ext-colors" | |
system "make install" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- configure 2013-02-12 17:23:04.000000000 +1100 | |
+++ configure 2013-02-12 17:27:05.000000000 +1100 | |
@@ -3626,7 +3626,7 @@ | |
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig | |
fi | |
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` | |
- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then | |
+ if test -n "$PKG_CONFIG_LIBDIR" ; then | |
# Check whether --enable-pc-files or --disable-pc-files was given. | |
if test "${enable_pc_files+set}" = set; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ncurses/base/lib_ungetch.c 2009-10-25 09:12:21.000000000 +1100 | |
+++ ncurses/base/lib_ungetch.c 2011-03-03 08:00:06.000000000 +1100 | |
@@ -64,6 +64,10 @@ safe_ungetch(SCREEN *sp, int ch) | |
T((T_CALLED("ungetch(%p,%s)"), (void *) sp, _nc_tracechar(sp, ch))); | |
+ if (!sp) { | |
+ returnCode(ERR); | |
+ } | |
+ | |
if (tail != -1) { | |
if (head == -1) { | |
head = 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment