tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Using ncursesw with p5-Curses



> The following seems to work:
I needed two more patches, one to have -lcurses transformed to -lncursesw, 
not -lcurses; another to have Curses's Makefile.PL choose the w variants 
of panel, menu, and form (otherwise the non-w variants pull in ncurses).


Index: devel/ncurses/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncurses/buildlink3.mk,v
retrieving revision 1.43
diff -u -r1.43 buildlink3.mk
--- devel/ncurses/buildlink3.mk 1 Dec 2013 02:18:14 -0000       1.43
+++ devel/ncurses/buildlink3.mk 4 Mar 2014 20:52:23 -0000
@@ -20,7 +20,6 @@
 BUILDLINK_TARGETS+=            buildlink-ncurses-curses-h
 BUILDLINK_TARGETS+=            buildlink-ncurses-ncurses-h
 BUILDLINK_TARGETS+=            buildlink-ncurses-term-h
-BUILDLINK_TRANSFORM+=          l:curses:${BUILDLINK_LIBNAME.ncurses}
 BUILDLINK_INCDIRS.ncurses+=    include/ncurses
 
 # Many packages will prefer ncursesw over ncurses if its available (say as
@@ -30,6 +29,9 @@
 .  include "../../mk/bsd.fast.prefs.mk"
 .  if empty(BUILDLINK_TREE:Mncursesw) && empty(PKGPATH:Mdevel/ncursesw)
 BUILDLINK_TRANSFORM+=          l:ncursesw:__nonexistent__
+BUILDLINK_TRANSFORM+=          l:curses:${BUILDLINK_LIBNAME.ncurses}
+.else
+BUILDLINK_TRANSFORM+=          l:curses:${BUILDLINK_LIBNAME.ncursesw}
 .  endif
 
 .PHONY: buildlink-ncurses-curses-h buildlink-ncurses-ncurses-h


Index: devel/p5-Curses/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/p5-Curses/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- devel/p5-Curses/Makefile    16 Oct 2013 16:27:26 -0000      1.43
+++ devel/p5-Curses/Makefile    4 Mar 2014 20:52:09 -0000
@@ -41,4 +41,19 @@
        ${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h
 .endif
 
+# Pass appropriate CURSES_LIBTYPE so Curses will link to the matching 
panel/menu/form library
+.if ${CURSES_TYPE} == "curses"
+CURSES_LIBTYPE=        bsd
+.elif ${CURSES_TYPE} == "ncurses"
+CURSES_LIBTYPE=        ncurses
+.elif ${CURSES_TYPE} == "ncursesw"
+CURSES_LIBTYPE=        ncursesw
+.endif
+
+.if defined(CURSES_LIBTYPE)
+MAKE_ENV+=             CURSES_LIBTYPE=${CURSES_LIBTYPE}
+MAKE_ENV+=             
CURSES_CFLAGS=${BUILDLINK_INCDIRS.${CURSES_TYPE}:S/^/-I/}
+MAKE_ENV+=             CURSES_LDFLAGS=${BUILDLINK_LDADD.${CURSES_TYPE}}
+.endif
+
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index