Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2012 02:32:17 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/174161: games/xmastermind: Support CC properly
Message-ID:  <20121206023217.8a0b3d26481992cb33e9b241@yahoo.com>
Resent-Message-ID: <201212051810.qB5IA1Il033368@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174161
>Category:       ports
>Synopsis:       games/xmastermind: Support CC properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 05 18:10:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- Support CC properly
- Support PORTDOCS/PLIST_FILES
- Add LICENSE
- Add MAKE_JOBS_SAFE

New file:
files/patch-mymath.c

Remove file:
files/patch-aa
pkg-plist

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/xmastermind/Makefile games/xmastermind/Makefile
--- /usr/ports/games/xmastermind/Makefile	2012-11-08 07:34:11.000000000 +0900
+++ games/xmastermind/Makefile	2012-11-12 05:22:15.000000000 +0900
@@ -1,33 +1,44 @@
-# New ports collection makefile for:	xmastermind
-# Date created:				23 March 1998
-# Whom:					Andrey Zakhvatov
-#
+# Whom: Andrey Zakhvatov
 # $FreeBSD: head/games/xmastermind/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
 
-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 -urN /usr/ports/games/xmastermind/files/patch-aa games/xmastermind/files/patch-aa
--- /usr/ports/games/xmastermind/files/patch-aa	2012-11-08 07:34:11.000000000 +0900
+++ games/xmastermind/files/patch-aa	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/games/xmastermind/files/patch-mymath.c games/xmastermind/files/patch-mymath.c
--- /usr/ports/games/xmastermind/files/patch-mymath.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xmastermind/files/patch-mymath.c	2012-10-17 01:08:56.000000000 +0900
@@ -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 -urN /usr/ports/games/xmastermind/pkg-descr games/xmastermind/pkg-descr
--- /usr/ports/games/xmastermind/pkg-descr	2012-11-08 07:34:11.000000000 +0900
+++ games/xmastermind/pkg-descr	2012-10-17 00:29:14.000000000 +0900
@@ -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 -urN /usr/ports/games/xmastermind/pkg-plist games/xmastermind/pkg-plist
--- /usr/ports/games/xmastermind/pkg-plist	2012-11-08 07:34:11.000000000 +0900
+++ games/xmastermind/pkg-plist	1970-01-01 09:00:00.000000000 +0900
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121206023217.8a0b3d26481992cb33e9b241>