Build form and menu support now.

Perl Curses can use system curses fine, but we need to hand edit the
c-config.h file to so as not to conflict the system forms.h file
with the perl one. This is as documented in the package.
NetBSD system curses does not support panels.

If we're using ncurses we also build support for panels.
This commit is contained in:
roy 2013-10-16 16:27:26 +00:00
parent f25aa6eca6
commit 4aadc97271
3 changed files with 23 additions and 40 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.42 2013/05/31 12:40:12 wiz Exp $ # $NetBSD: Makefile,v 1.43 2013/10/16 16:27:26 roy Exp $
DISTNAME= Curses-1.28 DISTNAME= Curses-1.28
PKGNAME= p5-${DISTNAME} PKGNAME= p5-${DISTNAME}
PKGREVISION= 4 PKGREVISION= 5
SVR4_PKGNAME= p5cur SVR4_PKGNAME= p5cur
CATEGORIES= devel perl5 CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/} MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/}
@ -16,17 +16,29 @@ LICENSE= ${PERL5_LICENSE}
PKG_INSTALLATION_TYPES= overwrite pkgviews PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_NCURSES= yes
PERL5_PACKLIST= auto/Curses/.packlist PERL5_PACKLIST= auto/Curses/.packlist
MAKE_PARAMS+= PANELS # We should really work out the location of the system forms.h
# does not compile on 2.0 because of conflicts between perl internal header SUBST_STAGE.h_form = post-configure
# files and stdbool.h SUBST_MESSAGE.h_form = Hard wiring form.h
#MAKE_PARAMS+= FORMS MENUS SUBST_FILES.h_form = c-config.h
SUBST_SED.h_form = -e 's,<form.h>,"/usr/include/form.h",g'
pre-configure: MAKE_PARAMS+= FORMS MENUS
${LN} -sf ${WRKSRC}/hints/c-netbsd.ncurses.h ${WRKSRC}/c-config.h
.include "../../devel/ncurses/buildlink3.mk"
.include "../../lang/perl5/module.mk" .include "../../lang/perl5/module.mk"
.include "../../mk/curses.buildlink3.mk"
.if ${CURSES_TYPE} == "curses"
SUBST_CLASSES+= h_form
.elif ${CURSES_TYPE} == "ncurses" || ${CURSES_TYPE} == "ncursesw"
MAKE_PARAMS+= PANELS
# Don't link to system termcap as we're using ncurses
BUILDLINK_TRANSFORM+= rm:-ltermcap
# Use the FreeBSD ncurses config as that works fine for pkgsrc
pre-configure:
${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h
.endif
.include "../../mk/bsd.pkg.mk" .include "../../mk/bsd.pkg.mk"

View file

@ -1,6 +1,5 @@
$NetBSD: distinfo,v 1.12 2010/02/23 20:26:24 sno Exp $ $NetBSD: distinfo,v 1.13 2013/10/16 16:27:26 roy Exp $
SHA1 (Curses-1.28.tgz) = 1f778ad08f5e2668e2457a61fca9b5d2a1e30d7e SHA1 (Curses-1.28.tgz) = 1f778ad08f5e2668e2457a61fca9b5d2a1e30d7e
RMD160 (Curses-1.28.tgz) = 7d3c621fa27424fcc2b270bb511c04b00e0f4329 RMD160 (Curses-1.28.tgz) = 7d3c621fa27424fcc2b270bb511c04b00e0f4329
Size (Curses-1.28.tgz) = 127412 bytes Size (Curses-1.28.tgz) = 127412 bytes
SHA1 (patch-ab) = 578e6b65a930fd561254d8b6f3da7014debd271c

View file

@ -1,28 +0,0 @@
$NetBSD: patch-ab,v 1.3 2000/08/28 18:20:43 jlam Exp $
--- /dev/null Mon Aug 28 13:46:05 2000
+++ hints/c-netbsd.ncurses.h Mon Aug 28 13:51:36 2000
@@ -0,0 +1,23 @@
+/* Hint file for the NetBSD platform, ncurses version of libcurses.
+ *
+ * If this configuration doesn't work, look at the file "c-none.h"
+ * for how to set the configuration options.
+ */
+
+/* These hints copied from FreeBSD file, with adjustments. */
+
+#include <ncurses.h>
+
+#ifdef C_PANELSUPPORT
+#include <panel.h>
+#endif
+
+#undef instr
+
+#define C_LONGNAME
+#define C_LONG0ARGS
+#undef C_LONG2ARGS
+
+#define C_TOUCHLINE
+#define C_TOUCH3ARGS
+#undef C_TOUCH4ARGS