diff options
author | araujo <araujo@FreeBSD.org> | 2013-01-16 15:46:34 +0800 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2013-01-16 15:46:34 +0800 |
commit | aa86ff02c04d34a84546fca729abb03fca35a40d (patch) | |
tree | bf59573c1d6a96398c9310c1c6d4601ff58ed148 /games | |
parent | 9173a51658d33eb768a8a1e92a76968a8ad7d807 (diff) | |
download | freebsd-ports-gnome-aa86ff02c04d34a84546fca729abb03fca35a40d.tar.gz freebsd-ports-gnome-aa86ff02c04d34a84546fca729abb03fca35a40d.tar.zst freebsd-ports-gnome-aa86ff02c04d34a84546fca729abb03fca35a40d.zip |
- Support CC properly.
- Support PORTDOCS/PLIST_FILES.
- Add LICENSE.
- Add MAKE_JOBS_SAFE.
PR: ports/174161
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'games')
-rw-r--r-- | games/xmastermind/Makefile | 49 | ||||
-rw-r--r-- | games/xmastermind/files/patch-aa | 18 | ||||
-rw-r--r-- | games/xmastermind/files/patch-mymath.c | 7 | ||||
-rw-r--r-- | games/xmastermind/pkg-descr | 23 | ||||
-rw-r--r-- | games/xmastermind/pkg-plist | 5 |
5 files changed, 48 insertions, 54 deletions
diff --git a/games/xmastermind/Makefile b/games/xmastermind/Makefile index 8c082039fdf0..232b6cf08f26 100644 --- a/games/xmastermind/Makefile +++ b/games/xmastermind/Makefile @@ -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 + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -lforms -lXpm -lX11 + +PORTDOCS= BUGS README.for.developers README.for.users +PLIST_FILES= bin/${PORTNAME} -pre-patch: - @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \ - ${WRKSRC}/list.h +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> diff --git a/games/xmastermind/files/patch-aa b/games/xmastermind/files/patch-aa deleted file mode 100644 index afb6f3547394..000000000000 --- a/games/xmastermind/files/patch-aa +++ /dev/null @@ -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) diff --git a/games/xmastermind/files/patch-mymath.c b/games/xmastermind/files/patch-mymath.c new file mode 100644 index 000000000000..50cbb2f411f0 --- /dev/null +++ b/games/xmastermind/files/patch-mymath.c @@ -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" diff --git a/games/xmastermind/pkg-descr b/games/xmastermind/pkg-descr index d8e21e31f48e..fd538e93ed63 100644 --- a/games/xmastermind/pkg-descr +++ b/games/xmastermind/pkg-descr @@ -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). diff --git a/games/xmastermind/pkg-plist b/games/xmastermind/pkg-plist deleted file mode 100644 index 9252f3cc087a..000000000000 --- a/games/xmastermind/pkg-plist +++ /dev/null @@ -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 |