pkgsrc-Bugs archive

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

pkg/45091: games/cmatrix add ncurses option



>Number:         45091
>Category:       pkg
>Synopsis:       games/cmatrix add ncurses option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 21 15:00:01 +0000 2011
>Originator:     Thomas Cort
>Release:        N/A
>Organization:
Minix3
>Environment:
Minix 192.168.122.210 3.2.0 i686
>Description:
games/cmatrix can use ncurses or curses for displaying it's
character waterfall. Without ncurses, it fails to build on
Minix. Additionally, the cmatrix README says "You'll probably
need a decent ncurses library to get this to work."
The patch below adds an ncurses option to the cmatrix package.
>How-To-Repeat:
On a Minix system without ncurses do this:

# cd /usr/pkgsrc/games/cmatrix && bmake install
...
gcc -DHAVE_CONFIG_H -I. -I. -I.   -D_MINIX -D_POSIX_SOURCE 
-I/usr/pkg/gcc44/include -I/usr/pkg/gcc44/lib/gcc/i386-pc-minix/4.4.5/include  
-Wno-error -I/usr/pkg/gcc44/include 
-I/usr/pkg/gcc44/lib/gcc/i386-pc-minix/4.4.5/include -Wall -Wno-comment -c 
cmatrix.c
cmatrix.c: In function 'main':
cmatrix.c:250: error: 'COLOR_GREEN' undeclared (first use in this function)
cmatrix.c:250: error: (Each undeclared identifier is reported only once
cmatrix.c:250: error: for each function it appears in.)
cmatrix.c:278: error: 'COLOR_RED' undeclared (first use in this function)
cmatrix.c:280: error: 'COLOR_BLUE' undeclared (first use in this function)
cmatrix.c:282: error: 'COLOR_WHITE' undeclared (first use in this function)
cmatrix.c:284: error: 'COLOR_YELLOW' undeclared (first use in this function)
cmatrix.c:286: error: 'COLOR_CYAN' undeclared (first use in this function)
cmatrix.c:288: error: 'COLOR_MAGENTA' undeclared (first use in this function)
cmatrix.c:290: error: 'COLOR_BLACK' undeclared (first use in this function)
cmatrix.c:341: warning: implicit declaration of function 'timeout'
cmatrix.c:362: warning: implicit declaration of function 'has_colors'
cmatrix.c:363: warning: implicit declaration of function 'start_color'
cmatrix.c:379: warning: implicit declaration of function 'init_pair'
cmatrix.c:582: warning: implicit declaration of function 'COLOR_PAIR'
cmatrix.c:627: warning: implicit declaration of function 'napms'
*** Error code 1

Stop.
bmake: stopped in /usr/tmp/work/games/cmatrix/work/cmatrix-1.2a
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/games/cmatrix
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/games/cmatrix
# 

>Fix:
diff --git a/games/cmatrix/Makefile b/games/cmatrix/Makefile
index 5f32f20..13e5b61 100644
--- a/games/cmatrix/Makefile
+++ b/games/cmatrix/Makefile
@@ -23,4 +23,5 @@ do-install:
        ${INSTALL_DATA} ${WRKSRC}/mtx.pcf \
                ${DESTDIR}${PREFIX}/share/cmatrix/mtx.pcf
 
+.include "options.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/games/cmatrix/options.mk b/games/cmatrix/options.mk
new file mode 100644
index 0000000..aceb634
--- /dev/null
+++ b/games/cmatrix/options.mk
@@ -0,0 +1,11 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=        PKG_OPTIONS.cmatrix
+PKG_SUPPORTED_OPTIONS=  ncurses
+PKG_SUGGESTED_OPTIONS=  ncurses
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mncurses)
+.include "../../devel/ncurses/buildlink3.mk"
+.endif



Home | Main Index | Thread Index | Old Index