summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz>2014-04-15 20:57:35 +0000
committerwiz <wiz>2014-04-15 20:57:35 +0000
commitd45ac2523c6b00c99cac0a0a54ccf69c1c7af525 (patch)
treea8c395d6b94b612314d2864107b94fe8a4192485
parent0d4ace3937b131461f9b8f63f7c00580b350dfbb (diff)
downloadpkgsrc-d45ac2523c6b00c99cac0a0a54ccf69c1c7af525.tar.gz
Pass curses type to package to stop it from guessing.
From Edgar Fuß.
-rw-r--r--devel/p5-Curses/Makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/devel/p5-Curses/Makefile b/devel/p5-Curses/Makefile
index 97de1de5853..9874db51604 100644
--- a/devel/p5-Curses/Makefile
+++ b/devel/p5-Curses/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2014/04/12 09:00:36 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2014/04/15 20:57:35 wiz Exp $
DISTNAME= Curses-1.29
PKGNAME= p5-${DISTNAME}
@@ -40,4 +40,19 @@ pre-configure:
${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"