View | Details | Raw Unified | Return to bug 174161
Collapse All | Expand All

(-)games/xmastermind/Makefile (-19 / +30 lines)
Lines 1-33 Link Here
1
# New ports collection makefile for:	xmastermind
1
# Whom: Andrey Zakhvatov
2
# Date created:				23 March 1998
3
# Whom:					Andrey Zakhvatov
4
#
5
# $FreeBSD: head/games/xmastermind/Makefile 300896 2012-07-14 13:54:48Z beat $
2
# $FreeBSD: head/games/xmastermind/Makefile 300896 2012-07-14 13:54:48Z beat $
6
#
7
3
8
PORTNAME=		xmastermind
4
PORTNAME=	xmastermind
9
PORTVERSION=		0.1
5
PORTVERSION=	0.1
10
PORTREVISION=	5
6
PORTREVISION=	5
11
CATEGORIES=		games
7
CATEGORIES=	games
12
MASTER_SITES=		${MASTER_SITE_SUNSITE}
8
MASTER_SITES=	SUNSITE/games/strategy
13
MASTER_SITE_SUBDIR=	games/strategy
14
9
15
MAINTAINER=		ports@FreeBSD.org
10
MAINTAINER=	ports@FreeBSD.org
16
COMMENT=	Mastermind game for X Window System
11
COMMENT=	Mastermind game for X Window System
17
12
18
LIB_DEPENDS=		forms.2:${PORTSDIR}/x11-toolkits/xforms
13
LICENSE=	GPLv2
14
15
LIB_DEPENDS=	forms:${PORTSDIR}/x11-toolkits/xforms
19
16
20
USE_XORG=	x11 xpm
17
USE_XORG=	x11 xpm
18
MAKE_ENV=	GRAPHLIBS="${LDFLAGS}"
19
MAKE_JOBS_SAFE=	yes
20
21
CFLAGS+=	-I${LOCALBASE}/include
22
LDFLAGS+=	-L${LOCALBASE}/lib -lforms -lXpm -lX11
23
24
PORTDOCS=	BUGS README.for.developers README.for.users
25
PLIST_FILES=	bin/${PORTNAME}
21
26
22
pre-patch:
27
post-patch:
23
	@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
28
	@${REINPLACE_CMD} -e \
24
		${WRKSRC}/list.h
29
		'/^CC/s| =| ?=| ; \
30
		 /^CFLAGS/s| =| ?=| ; \
31
		 /^GRAPHLIBS/s| =| ?=|' ${WRKSRC}/Makefile
32
	@${REINPLACE_CMD} -e \
33
		's|malloc.h|stdlib.h|' ${WRKSRC}/list.h
25
34
26
do-install:
35
do-install:
27
	@ ${INSTALL_PROGRAM} ${WRKSRC}/xmastermind ${PREFIX}/bin
36
	(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin)
28
	@ ${MKDIR} ${PREFIX}/share/doc/xmastermind
37
.if !defined(NOPORTDOCS)
29
.for file in BUGS README.for.developers README.for.users
38
	@${MKDIR} ${DOCSDIR}
30
	@ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/xmastermind
39
.for i in ${PORTDOCS}
40
	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR})
31
.endfor
41
.endfor
42
.endif
32
43
33
.include <bsd.port.mk>
44
.include <bsd.port.mk>
(-)games/xmastermind/files/patch-aa (-18 lines)
Lines 1-18 Link Here
1
--- Makefile.orig	Tue Dec 30 05:30:25 1997
2
+++ Makefile	Mon Jul  1 02:25:43 2002
3
@@ -1,10 +1,13 @@
4
 OBJS = main.o mymath.o mastermind.o guiglobal.o apptogui.o guitoapp.o mainwindowdesign.o
5
 
6
 CC = gcc
7
-CFLAGS = -O2 -Wall -Wpointer-arith -Wstrict-prototypes -pedantic -ansi              
8
+.if exists(${LOCALBASE}/include/X11/forms.h)
9
+XFORMSINC=-I${LOCALBASE}/include/X11
10
+.endif
11
+CFLAGS+= -Wall -Wpointer-arith -Wstrict-prototypes -pedantic -ansi -I${LOCALBASE}/include ${XFORMSINC}
12
 CLIBS = -lm
13
 #GRAPHLIBS = -lforms -L/usr/X11R6/lib/ -lX11 -static
14
-GRAPHLIBS = -lforms -L/usr/X11R6/lib/ -lX11
15
+GRAPHLIBS = -lforms -L${LOCALBASE}/lib -lX11 -lXpm
16
 MF = Makefile
17
 
18
 ALLLIBS = $(GRAPHLIBS) $(CLIBS)
(-)games/xmastermind/files/patch-mymath.c (+7 lines)
Line 0 Link Here
1
--- mymath.c.orig	1997-12-30 19:30:25.000000000 +0900
2
+++ mymath.c	2012-10-17 01:08:29.000000000 +0900
3
@@ -1,3 +1,4 @@
4
+#include <string.h>
5
 #include <math.h>
6
 
7
 #include "configure.h"
(-)games/xmastermind/pkg-descr (-12 / +11 lines)
Lines 1-16 Link Here
1
The computer calculates a combination of five characters (each between
1
The computer calculates a combination of five characters (each between
2
A and J) and you have to try to find out  the combination the computer
2
A and J) and you have to try to find out the combination the computer
3
has calculated.  Your questions to  the computer are also combinations
3
has calculated. Your questions to the computer are also combinations of
4
of five characters (each between A and J).
4
five characters (each between A and J).
5
5
6
You   get sets  of black  and/or   white  blocks as   answers  to your
6
You get sets of black and/or white blocks as answers to your questions.
7
questions.
8
7
9
If  you  get a  black block  as  answer it  means  that  there  is one
8
If you get a black block as answer it means that there is one character
10
character  in your  try at  the correct position  (but  you don't know
9
in your try at the correct position (but you don't know which one it
11
which one it is).
10
is).
12
11
13
If you get a white block as answer it means that  there is a character
12
If you get a white block as answer it means that there is a character in
14
in  your  guess that also   occurs  in the  solution,  but at  another
13
your guess that also occurs in the solution, but at another position
15
position (but you don't know which one it  is and at which position it
14
(but you don't know which one it is and at which position it would be
16
would be correct).
15
correct).
(-)games/xmastermind/pkg-plist (-5 lines)
Lines 1-5 Link Here
1
bin/xmastermind
2
share/doc/xmastermind/BUGS
3
share/doc/xmastermind/README.for.developers
4
share/doc/xmastermind/README.for.users
5
@dirrm share/doc/xmastermind

Return to bug 174161