Mon Sep 22 10:49:57 2014 UTC ()
Fix build on Linux where the default curses implementation is ncurses.


(jperkin)
diff -r1.46 -r1.47 pkgsrc/devel/p5-Curses/Makefile

cvs diff -r1.46 -r1.47 pkgsrc/devel/p5-Curses/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/p5-Curses/Makefile 2014/05/29 23:35:47 1.46
+++ pkgsrc/devel/p5-Curses/Makefile 2014/09/22 10:49:57 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.46 2014/05/29 23:35:47 wiz Exp $ 1# $NetBSD: Makefile,v 1.47 2014/09/22 10:49:57 jperkin Exp $
2 2
3DISTNAME= Curses-1.29 3DISTNAME= Curses-1.29
4PKGNAME= p5-${DISTNAME} 4PKGNAME= p5-${DISTNAME}
5PKGREVISION= 1 5PKGREVISION= 1
6SVR4_PKGNAME= p5cur 6SVR4_PKGNAME= p5cur
7CATEGORIES= devel perl5 7CATEGORIES= devel perl5
8MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/} 8MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/}
9EXTRACT_SUFX= .tgz 9EXTRACT_SUFX= .tgz
10 10
11MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= http://search.cpan.org/dist/Curses/ 12HOMEPAGE= http://search.cpan.org/dist/Curses/
13COMMENT= Perl5 module for terminal screen handling and optimization 13COMMENT= Perl5 module for terminal screen handling and optimization
14# really it's gnu-gpl-v1+ OR artistic-1.0, but currently we don't have gplv1 14# really it's gnu-gpl-v1+ OR artistic-1.0, but currently we don't have gplv1
@@ -33,27 +33,31 @@ MAKE_PARAMS+= FORMS MENUS @@ -33,27 +33,31 @@ MAKE_PARAMS+= FORMS MENUS
33SUBST_CLASSES+= h_form 33SUBST_CLASSES+= h_form
34.elif ${CURSES_TYPE} == "ncurses" || ${CURSES_TYPE} == "ncursesw" 34.elif ${CURSES_TYPE} == "ncurses" || ${CURSES_TYPE} == "ncursesw"
35MAKE_PARAMS+= PANELS 35MAKE_PARAMS+= PANELS
36# Don't link to system termcap as we're using ncurses 36# Don't link to system termcap as we're using ncurses
37BUILDLINK_TRANSFORM+= rm:-ltermcap 37BUILDLINK_TRANSFORM+= rm:-ltermcap
38 38
39# Use the FreeBSD ncurses config as that works fine for pkgsrc 39# Use the FreeBSD ncurses config as that works fine for pkgsrc
40pre-configure: 40pre-configure:
41 ${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h 41 ${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h
42.endif 42.endif
43 43
44# Pass appropriate CURSES_LIBTYPE so Curses will link to the matching panel/menu/form library 44# Pass appropriate CURSES_LIBTYPE so Curses will link to the matching panel/menu/form library
45.if ${CURSES_TYPE} == "curses" 45.if ${CURSES_TYPE} == "curses"
 46. if ${OPSYS} == "Linux"
 47CURSES_LIBTYPE= ncurses
 48. else
46CURSES_LIBTYPE= bsd 49CURSES_LIBTYPE= bsd
 50. endif
47.elif ${CURSES_TYPE} == "ncurses" 51.elif ${CURSES_TYPE} == "ncurses"
48CURSES_LIBTYPE= ncurses 52CURSES_LIBTYPE= ncurses
49.elif ${CURSES_TYPE} == "ncursesw" 53.elif ${CURSES_TYPE} == "ncursesw"
50CURSES_LIBTYPE= ncursesw 54CURSES_LIBTYPE= ncursesw
51.endif 55.endif
52 56
53.if defined(CURSES_LIBTYPE) 57.if defined(CURSES_LIBTYPE)
54MAKE_ENV+= CURSES_LIBTYPE=${CURSES_LIBTYPE} 58MAKE_ENV+= CURSES_LIBTYPE=${CURSES_LIBTYPE}
55MAKE_ENV+= CURSES_CFLAGS=${BUILDLINK_INCDIRS.${CURSES_TYPE}:S/^/-I/} 59MAKE_ENV+= CURSES_CFLAGS=${BUILDLINK_INCDIRS.${CURSES_TYPE}:S/^/-I/}
56MAKE_ENV+= CURSES_LDFLAGS=${BUILDLINK_LDADD.${CURSES_TYPE}} 60MAKE_ENV+= CURSES_LDFLAGS=${BUILDLINK_LDADD.${CURSES_TYPE}}
57.endif 61.endif
58 62
59.include "../../mk/bsd.pkg.mk" 63.include "../../mk/bsd.pkg.mk"