diff options
author | jlam <jlam> | 2008-02-20 20:07:25 +0000 |
---|---|---|
committer | jlam <jlam> | 2008-02-20 20:07:25 +0000 |
commit | bd37d8d16f1f246bff103170a0a23ee9ae8de4c1 (patch) | |
tree | 9c45cd040c84eab5317ad4ba9a7a39f5bc616cc6 | |
parent | 52fea4d3c69ea5b9c744ed55f7f7b49014ee9def (diff) | |
download | pkgsrc-bd37d8d16f1f246bff103170a0a23ee9ae8de4c1.tar.gz |
Overwrite symlinks for <ncurses.h> and <curses.h> to point to
<ncursesw/ncurses.h> so that including any of the curses headers will
consistently pull in the same information.
-rw-r--r-- | devel/ncursesw/builtin.mk | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/devel/ncursesw/builtin.mk b/devel/ncursesw/builtin.mk index dab431f9f10..d6eccf44cae 100644 --- a/devel/ncursesw/builtin.mk +++ b/devel/ncursesw/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.1 2008/02/20 17:17:46 jlam Exp $ +# $NetBSD: builtin.mk,v 1.2 2008/02/20 20:07:25 jlam Exp $ BUILTIN_PKG:= ncursesw @@ -114,8 +114,15 @@ BUILDLINK_CPPFLAGS.ncursesw+= -DHAVE_WCHAR=1 . endif BUILDLINK_TARGETS+= buildlink-ncursesw-curses-h -# Most packages expect <ncursesw/curses.h> to provide declarations for -# ncursesw. +# Packages will expect the following includes to provide declarations +# for ncursesw if wide curses are supported: +# +# <ncursesw/curses.h> +# <ncurses.h> +# <curses.h> +# +# We must explicitly force the symlinks to be created as we have to +# overwrite any that ncurses/buildlink3.mk might create ahead of us. # . if !target(buildlink-ncursesw-curses-h) .PHONY: buildlink-ncursesw-curses-h @@ -124,12 +131,15 @@ buildlink-ncursesw-curses-h: curses_h="ncursesw/ncurses.h curses.h"; \ for f in $$curses_h; do \ src=${BUILDLINK_PREFIX.ncursesw:Q}"/include/$$f"; \ - dest=${BUILDLINK_DIR:Q}"/include/ncursesw/curses.h"; \ - if ${TEST} ! -f "$$dest" -a -f "$$src"; then \ - ${ECHO_BUILDLINK_MSG} "Linking ncursesw/curses.h -> $$f."; \ - ${MKDIR} `${DIRNAME} "$$dest"`; \ - ${LN} -s "$$src" "$$dest"; \ - fi; \ + dests="ncursesw/curses.h ncurses.h curses.h"; \ + for dest in $$dests; do \ + dest=${BUILDLINK_DIR:Q}"/include/$$dest"; \ + if ${TEST} -f "$$src"; then \ + ${ECHO_BUILDLINK_MSG} "Linking $$dest -> $$f."; \ + ${MKDIR} `${DIRNAME} "$$dest"`; \ + ${LN} -fs "$$src" "$$dest"; \ + fi; \ + done; \ done . endif |