Subject: Re: symlink for curses.h in buildlink? (Re: pkg/26849: misc/dialog fix for Interix)
To: Jeremy C. Reed <reed@reedmedia.net>
From: Hiramatsu Yoshifumi <hiramatu@boreas.dti.ne.jp>
List: tech-pkg
Date: 09/17/2004 01:44:30
How about this patch? 

This patch modifies builtin.mk to make ${BUILDLINK_DIR}/include/ncurses.h -> /usr/include/curses.h
symbolic link when USE_BUILTIN.ncurses is "yes".

At Sat, 4 Sep 2004 16:24:40 -0700 (PDT),
"Jeremy C. Reed" <reed@reedmedia.net> wrote:
> Or I do see
> BUILDLINK_TRANSFORM.ncurses+=   -e "s|/curses\.h|/ncurses.h|g
> in the devel/ncurses/builtin.mk but I guess it is not used.

This transform is ignored because _BLNK_LIBNCURSES_FOUND is "yes" on Interix.

--- ncurses.orig/builtin.mk     Fri Sep 17 00:15:29 2004
+++ ncurses/builtin.mk  Fri Sep 17 01:31:18 2004
@@ -125,13 +125,22 @@
 .if !target(buildlink-ncurses-curses-h)
 .PHONY: buildlink-ncurses-curses-h
 buildlink-ncurses-curses-h:
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        if [ ! -f ${BUILDLINK_DIR}/include/curses.h -a                  \
             -f ${BUILDLINK_PREFIX.ncurses}/include/ncurses.h ]; then   \
                ${ECHO_BUILDLINK_MSG} "Linking curses.h -> ncurses.h."; \
                ${LN} -s ${BUILDLINK_PREFIX.ncurses}/include/ncurses.h  \
                        ${BUILDLINK_DIR}/include/curses.h;              \
        fi
+.if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
+       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
+       if [ ! -f ${BUILDLINK_DIR}/include/ncurses.h -a                 \
+            -f ${BUILDLINK_PREFIX.ncurses}/include/curses.h ]; then    \
+               ${ECHO_BUILDLINK_MSG} "Linking ncurses.h -> curses.h."; \
+               ${LN} -s ${BUILDLINK_PREFIX.ncurses}/include/curses.h   \
+                       ${BUILDLINK_DIR}/include/ncurses.h;             \
+       fi
+.endif
 .endif

 .endif # CHECK_BUILTIN.ncurses

-- 
// Hiramatsu Yoshifumi
// hiramatu@boreas.dti.ne.jp