- Support CC properly.

- Support PORTDOCS/PLIST_FILES.
- Add LICENSE.
- Add MAKE_JOBS_SAFE.

PR:		ports/174161
Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
This commit is contained in:
Marcelo Araujo 2013-01-16 07:46:34 +00:00
parent 52fe4e2e94
commit a28250188c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=310478
5 changed files with 48 additions and 54 deletions

View File

@ -1,33 +1,44 @@
# New ports collection makefile for: xmastermind
# Date created: 23 March 1998
# Whom: Andrey Zakhvatov
#
# Whom: Andrey Zakhvatov
# $FreeBSD$
#
PORTNAME= xmastermind
PORTVERSION= 0.1
PORTNAME= xmastermind
PORTVERSION= 0.1
PORTREVISION= 5
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= games/strategy
CATEGORIES= games
MASTER_SITES= SUNSITE/games/strategy
MAINTAINER= ports@FreeBSD.org
MAINTAINER= ports@FreeBSD.org
COMMENT= Mastermind game for X Window System
LIB_DEPENDS= forms.2:${PORTSDIR}/x11-toolkits/xforms
LICENSE= GPLv2
LIB_DEPENDS= forms:${PORTSDIR}/x11-toolkits/xforms
USE_XORG= x11 xpm
MAKE_ENV= GRAPHLIBS="${LDFLAGS}"
MAKE_JOBS_SAFE= yes
pre-patch:
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
${WRKSRC}/list.h
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -lforms -lXpm -lX11
PORTDOCS= BUGS README.for.developers README.for.users
PLIST_FILES= bin/${PORTNAME}
post-patch:
@${REINPLACE_CMD} -e \
'/^CC/s| =| ?=| ; \
/^CFLAGS/s| =| ?=| ; \
/^GRAPHLIBS/s| =| ?=|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e \
's|malloc.h|stdlib.h|' ${WRKSRC}/list.h
do-install:
@ ${INSTALL_PROGRAM} ${WRKSRC}/xmastermind ${PREFIX}/bin
@ ${MKDIR} ${PREFIX}/share/doc/xmastermind
.for file in BUGS README.for.developers README.for.users
@ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/xmastermind
(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin)
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR})
.endfor
.endif
.include <bsd.port.mk>

View File

@ -1,18 +0,0 @@
--- Makefile.orig Tue Dec 30 05:30:25 1997
+++ Makefile Mon Jul 1 02:25:43 2002
@@ -1,10 +1,13 @@
OBJS = main.o mymath.o mastermind.o guiglobal.o apptogui.o guitoapp.o mainwindowdesign.o
CC = gcc
-CFLAGS = -O2 -Wall -Wpointer-arith -Wstrict-prototypes -pedantic -ansi
+.if exists(${LOCALBASE}/include/X11/forms.h)
+XFORMSINC=-I${LOCALBASE}/include/X11
+.endif
+CFLAGS+= -Wall -Wpointer-arith -Wstrict-prototypes -pedantic -ansi -I${LOCALBASE}/include ${XFORMSINC}
CLIBS = -lm
#GRAPHLIBS = -lforms -L/usr/X11R6/lib/ -lX11 -static
-GRAPHLIBS = -lforms -L/usr/X11R6/lib/ -lX11
+GRAPHLIBS = -lforms -L${LOCALBASE}/lib -lX11 -lXpm
MF = Makefile
ALLLIBS = $(GRAPHLIBS) $(CLIBS)

View File

@ -0,0 +1,7 @@
--- mymath.c.orig 1997-12-30 19:30:25.000000000 +0900
+++ mymath.c 2012-10-17 01:08:29.000000000 +0900
@@ -1,3 +1,4 @@
+#include <string.h>
#include <math.h>
#include "configure.h"

View File

@ -1,16 +1,15 @@
The computer calculates a combination of five characters (each between
A and J) and you have to try to find out the combination the computer
has calculated. Your questions to the computer are also combinations
of five characters (each between A and J).
A and J) and you have to try to find out the combination the computer
has calculated. Your questions to the computer are also combinations of
five characters (each between A and J).
You get sets of black and/or white blocks as answers to your
questions.
You get sets of black and/or white blocks as answers to your questions.
If you get a black block as answer it means that there is one
character in your try at the correct position (but you don't know
which one it is).
If you get a black block as answer it means that there is one character
in your try at the correct position (but you don't know which one it
is).
If you get a white block as answer it means that there is a character
in your guess that also occurs in the solution, but at another
position (but you don't know which one it is and at which position it
would be correct).
If you get a white block as answer it means that there is a character in
your guess that also occurs in the solution, but at another position
(but you don't know which one it is and at which position it would be
correct).

View File

@ -1,5 +0,0 @@
bin/xmastermind
share/doc/xmastermind/BUGS
share/doc/xmastermind/README.for.developers
share/doc/xmastermind/README.for.users
@dirrm share/doc/xmastermind