tech-pkg archive

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

Patch adding curses option to devel/cunit



Hello,

The attached patch gives users of devel/cunit the ability to build with
the curses interface.

It's a pretty straight-forward options.mk-izing of the package, the only
caveat being explicitly setting NCURSES_OPAQUE=0, which I did because
it's possible that some OS defaults it to 1, which would bork the build
process (Darwin appears to do this at the time of this writing).

Tested on NetBSD 6.1.4, NetBSD 7.0, and Debian GNU/Linux 8.2 "jessie".

Regards,

Alexander
Index: devel/cunit/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cunit/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- devel/cunit/Makefile	6 Dec 2013 21:50:12 -0000	1.4
+++ devel/cunit/Makefile	19 Oct 2015 02:27:08 -0000
@@ -19,4 +19,6 @@ WRKSRC=			${WRKDIR}/CUnit-2.1-0
 INSTALLATION_DIRS+=	include/CUnit share/doc/CUnit
 INSTALLATION_DIRS+=	share/CUnit share/doc/CUnit/headers
 
+.include "options.mk"
+
 .include "../../mk/bsd.pkg.mk"
Index: devel/cunit/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cunit/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- devel/cunit/PLIST	14 Jun 2009 17:48:38 -0000	1.2
+++ devel/cunit/PLIST	19 Oct 2015 02:27:08 -0000
@@ -3,6 +3,7 @@ include/CUnit/Automated.h
 include/CUnit/Basic.h
 include/CUnit/CUError.h
 include/CUnit/CUnit.h
+${PLIST.curses}include/CUnit/CUCurses.h
 include/CUnit/Console.h
 include/CUnit/MyMem.h
 include/CUnit/TestDB.h
Index: devel/cunit/options.mk
===================================================================
RCS file: devel/cunit/options.mk
diff -N devel/cunit/options.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/cunit/options.mk	19 Oct 2015 02:27:08 -0000
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.cunit
+PKG_SUPPORTED_OPTIONS=	curses
+PKG_SUGGESTED_OPTIONS=	# empty
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=		curses
+
+.if !empty(PKG_OPTIONS:Mcurses)
+.include "../../devel/ncurses/buildlink3.mk"
+PLIST.curses=		yes
+USE_NCURSES=		yes
+CONFIGURE_ARGS+=	--enable-curses
+LDFLAGS+=		-lcurses
+CFLAGS+=		-DNCURSES_OPAQUE=0
+.endif

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index