diff options
author | jlam <jlam> | 2008-02-20 22:29:48 +0000 |
---|---|---|
committer | jlam <jlam> | 2008-02-20 22:29:48 +0000 |
commit | 826b38dda6e22f8275554909daeaac4848a34217 (patch) | |
tree | 3d4ec19f5d1e94ed63bb929f81d16941d97ea582 | |
parent | bd37d8d16f1f246bff103170a0a23ee9ae8de4c1 (diff) | |
download | pkgsrc-826b38dda6e22f8275554909daeaac4848a34217.tar.gz |
Try to get this working with FreeBSD's native ncurses (untested).
-rw-r--r-- | devel/ncursesw/builtin.mk | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/devel/ncursesw/builtin.mk b/devel/ncursesw/builtin.mk index d6eccf44cae..b9ac497287d 100644 --- a/devel/ncursesw/builtin.mk +++ b/devel/ncursesw/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.2 2008/02/20 20:07:25 jlam Exp $ +# $NetBSD: builtin.mk,v 1.3 2008/02/20 22:29:48 jlam Exp $ BUILTIN_PKG:= ncursesw @@ -8,11 +8,12 @@ BUILTIN_PKG:= ncursesw # XXX Need to deal with Solaris <curses.h> # BUILTIN_FIND_LIBS:= ncursesw -BUILTIN_FIND_FILES_VAR:= H_NB_CURSESW H_NCURSESW_CURSES -BUILTIN_FIND_FILES.H_NB_CURSESW= /usr/include/curses.h +BUILTIN_FIND_FILES_VAR:= H_NB_CURSESW H_NCURSESW +BUILTIN_FIND_FILES.H_NB_CURSESW= /usr/include/curses.h BUILTIN_FIND_GREP.H_NB_CURSESW= \#ifdef[ ]*HAVE_WCHAR -BUILTIN_FIND_FILES.H_NCURSESW_CURSES= /usr/include/ncursesw/curses.h -BUILTIN_FIND_GREP.H_NCURSESW_CURSES= \#define[ ]*NCURSES_VERSION +BUILTIN_FIND_FILES.H_NCURSESW= /usr/include/ncursesw/curses.h \ + /usr/include/curses.h +BUILTIN_FIND_GREP.H_NCURSESW= \Id: curses.wide,v .include "../../mk/buildlink3/bsd.builtin.mk" @@ -22,8 +23,8 @@ BUILTIN_FIND_GREP.H_NCURSESW_CURSES= \#define[ ]*NCURSES_VERSION ### .if !defined(IS_BUILTIN.ncursesw) IS_BUILTIN.ncursesw= no -. if empty(H_NCURSESW_CURSES:M__nonexistent__) && \ - empty(H_NCURSESW_CURSES:M${LOCALBASE}/*) && \ +. if empty(H_NCURSESW:M__nonexistent__) && \ + empty(H_NCURSESW:M${LOCALBASE}/*) && \ !empty(BUILTIN_LIB_FOUND.ncursesw:M[yY][eE][sS]) IS_BUILTIN.ncursesw= yes . endif @@ -112,6 +113,15 @@ BUILDLINK_TRANSFORM+= l:ncursesw:curses BUILDLINK_CPPFLAGS.ncursesw+= -DHAVE_WCHAR=1 . endif . endif + +# According to the ncurses(3) manual page, applications that want to use +# the wide curses definitions need to define _XOPEN_SOURCE_EXTENDED. +# +. if !empty(USE_BUILTIN.ncursesw:M[nN][oO]) || \ + (!empty(USE_BUILTIN.ncursesw:M[yY][eE][sS]) && + !empty(IS_BUILTIN.ncursesw:M[yY][eE][sS])) +BUILDLINK_CPPFLAGS.ncursesw+= -D_XOPEN_SOURCE_EXTENDED=1 +. endif BUILDLINK_TARGETS+= buildlink-ncursesw-curses-h # Packages will expect the following includes to provide declarations |