From tkato432@yahoo.com  Mon Dec 16 18:04:51 2013
Return-Path: <tkato432@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 5E8BE3B4
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:04:00 +0000 (UTC)
Received: from omta03.auone-net.jp (mail-or0-f67.auone-net.jp [106.187.230.67])
	by mx1.freebsd.org (Postfix) with ESMTP id 06038187B
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:03:59 +0000 (UTC)
Received: from coppermine.my.domain (ZT030106.ppp.dion.ne.jp [59.128.30.106])
	by omta03.auone-net.jp (au one net mail) with ESMTP id BD9F91880004
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 17 Dec 2013 03:03:57 +0900 (JST)
Message-Id: <20131217024904.36361350bd5d2c32466a81f2@yahoo.com>
Date: Tue, 17 Dec 2013 02:49:04 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: games/xminehunter: Support CXX/CXXFLAGS properly

>Number:         184883
>Category:       ports
>Synopsis:       games/xminehunter: Support CXX/CXXFLAGS properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:23 UTC 2013
>Closed-Date:    Fri Dec 20 19:43:15 UTC 2013
>Last-Modified:  Fri Dec 20 19:50:00 UTC 2013
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CXX/CXXFLAGS properly
- Support STRIP properly
- Add DESKTOP_ENTRIES

Remove file:
files/patch-aa

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/xminehunter/Makefile games/xminehunter/Makefile
--- /usr/ports/games/xminehunter/Makefile	2013-11-14 06:46:16.000000000 +0900
+++ games/xminehunter/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -3,17 +3,44 @@
 
 PORTNAME=	xminehunter
 PORTVERSION=	0.4
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_XCONTRIB}
-MASTER_SITE_SUBDIR=	games
+MASTER_SITES=	XCONTRIB/games
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Motif minesweeper game
 
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
 USES=		motif
 USE_XORG=	xpm
-WRKSRC=		${WRKDIR}/xminehunter
-ALL_TARGET=	xminehunter
+ALL_TARGET=	${PORTNAME}
+
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+DESKTOP_ENTRIES="XMineHunter" "" "${PREFIX}/share/pixmaps/${PORTNAME}.xpm" \
+		"${PORTNAME}" "" ""
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/^INSTALL_BIN/s|=.*|= $${PREFIX}/bin| ; \
+		 /^INSTALL_SCORE/s|=.*|= $${PREFIX}/lib/X11/${PORTNAME}| ; \
+		 /^INCLUDES/s|-I/.*/include|$${CPPFLAGS}| ; \
+		 /^LIBS/s|-L/.*/lib|$${LDFLAGS}| ; \
+		 s|-lXm |$${MOTIFLIB} | ; \
+		 s|^CC =|CXX ?=| ; \
+		 s|^CFLAGS =|CXXFLAGS +=| ; \
+		 s|$${CC}|$${CXX}| ; \
+		 s|$${CFLAGS}|$${CXXFLAGS}| ; \
+		 s| \($${INSTALL_SCORE_PATH}\)| $${DESTDIR}\1| ; \
+        	 s|chmod 333|chmod 633| ; \
+		 s|cp |$${BSD_INSTALL_DATA} | ; \
+		 s| \($${INSTALL_BIN_PATH}\)| $${DESTDIR}\1|' \
+		${WRKSRC}/${MAKEFILE}
+
+post-install:
+	(cd ${WRKSRC}/bitmaps && ${INSTALL_DATA} normal.xpm \
+		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.xpm)
 
 .include <bsd.port.mk>
diff -urN /usr/ports/games/xminehunter/files/patch-aa games/xminehunter/files/patch-aa
--- /usr/ports/games/xminehunter/files/patch-aa	2013-11-14 06:46:16.000000000 +0900
+++ games/xminehunter/files/patch-aa	1970-01-01 09:00:00.000000000 +0900
@@ -1,26 +0,0 @@
---- ./Makefile.orig	1996-07-22 03:11:34.000000000 -0300
-+++ ./Makefile	2013-11-13 18:22:58.000000000 -0200
-@@ -1,9 +1,9 @@
--INSTALL_BIN_PATH = /usr/local/bin
--INSTALL_SCORE_PATH = /usr/local/lib/xminehunter
--
--INCLUDES = -I/usr/local/X11R5/include
--LIBS = -L/usr/local/X11R5/lib -lXm -lXt -lXpm -lXext -lX11
-+INSTALL_BIN_PATH = ${DESTDIR}${PREFIX}/bin
-+INSTALL_SCORE_PATH = ${DESTDIR}${PREFIX}/lib/X11/xminehunter
- 
-+INCLUDES = -I${LOCALBASE}/include
-+LIBS = -L${LOCALBASE}/lib ${MOTIFLIB} -lXt -lXpm -lXext -lX11
-+LIBS+= -Wl,-rpath,${LOCALBASE}/lib
- 
- CC = g++
- 
-@@ -50,7 +50,7 @@
- 
- install:
- 	mkdir -p ${INSTALL_SCORE_PATH}
--	chmod 333 ${INSTALL_SCORE_PATH}
-+	chmod 633 ${INSTALL_SCORE_PATH}
- 	cp xminehunter ${INSTALL_BIN_PATH}
- 
- clean:
diff -urN /usr/ports/games/xminehunter/pkg-plist games/xminehunter/pkg-plist
--- /usr/ports/games/xminehunter/pkg-plist	2013-11-06 22:00:45.000000000 +0900
+++ games/xminehunter/pkg-plist	2013-12-17 00:00:00.000000000 +0900
@@ -1,4 +1,5 @@
 bin/xminehunter
-@exec mkdir %D/lib/X11/xminehunter
+share/pixmaps/xminehunter.xpm
+@exec mkdir -p %D/lib/X11/xminehunter
 @exec chmod 333 %D/lib/X11/xminehunter
-@dirrm lib/X11/xminehunter
+@dirrmtry lib/X11/xminehunter
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Fri Dec 20 19:34:01 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184883 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Fri Dec 20 19:43:14 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184883 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184883: commit references a PR
Date: Fri, 20 Dec 2013 19:43:12 +0000 (UTC)

 Author: pawel
 Date: Fri Dec 20 19:43:05 2013
 New Revision: 337083
 URL: http://svnweb.freebsd.org/changeset/ports/337083
 
 Log:
   - Respect CXX/CXXFLAGS
   - Add desktop entry file
   
   PR:		ports/184883
   Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
 
 Deleted:
   head/games/xminehunter/files/
 Modified:
   head/games/xminehunter/Makefile   (contents, props changed)
   head/games/xminehunter/pkg-plist   (contents, props changed)
 
 Modified: head/games/xminehunter/Makefile
 ==============================================================================
 --- head/games/xminehunter/Makefile	Fri Dec 20 19:31:11 2013	(r337082)
 +++ head/games/xminehunter/Makefile	Fri Dec 20 19:43:05 2013	(r337083)
 @@ -3,17 +3,44 @@
  
  PORTNAME=	xminehunter
  PORTVERSION=	0.4
 -PORTREVISION=	3
 +PORTREVISION=	4
  CATEGORIES=	games
 -MASTER_SITES=	${MASTER_SITE_XCONTRIB}
 -MASTER_SITE_SUBDIR=	games
 +MASTER_SITES=	XCONTRIB/games
  
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	Motif minesweeper game
  
 +WRKSRC=		${WRKDIR}/${PORTNAME}
 +
  USES=		motif
  USE_XORG=	xpm
 -WRKSRC=		${WRKDIR}/xminehunter
 -ALL_TARGET=	xminehunter
 +ALL_TARGET=	${PORTNAME}
 +
 +CPPFLAGS+=	-I${LOCALBASE}/include
 +LDFLAGS+=	-L${LOCALBASE}/lib
 +
 +DESKTOP_ENTRIES="XMineHunter" "" "${PREFIX}/share/pixmaps/${PORTNAME}.xpm" \
 +		"${PORTNAME}" "" ""
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e \
 +		'/^INSTALL_BIN/s|=.*|= $${PREFIX}/bin| ; \
 +		 /^INSTALL_SCORE/s|=.*|= $${PREFIX}/lib/X11/${PORTNAME}| ; \
 +		 /^INCLUDES/s|-I/.*/include|$${CPPFLAGS}| ; \
 +		 /^LIBS/s|-L/.*/lib|$${LDFLAGS}| ; \
 +		 s|-lXm |$${MOTIFLIB} | ; \
 +		 s|^CC =|CXX ?=| ; \
 +		 s|^CFLAGS =|CXXFLAGS +=| ; \
 +		 s|$${CC}|$${CXX}| ; \
 +		 s|$${CFLAGS}|$${CXXFLAGS}| ; \
 +		 s| \($${INSTALL_SCORE_PATH}\)| $${DESTDIR}\1| ; \
 +        	 s|chmod 333|chmod 633| ; \
 +		 s|cp |$${BSD_INSTALL_DATA} | ; \
 +		 s| \($${INSTALL_BIN_PATH}\)| $${DESTDIR}\1|' \
 +		${WRKSRC}/${MAKEFILE}
 +
 +post-install:
 +	(cd ${WRKSRC}/bitmaps && ${INSTALL_DATA} normal.xpm \
 +		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.xpm)
  
  .include <bsd.port.mk>
 
 Modified: head/games/xminehunter/pkg-plist
 ==============================================================================
 --- head/games/xminehunter/pkg-plist	Fri Dec 20 19:31:11 2013	(r337082)
 +++ head/games/xminehunter/pkg-plist	Fri Dec 20 19:43:05 2013	(r337083)
 @@ -1,4 +1,5 @@
  bin/xminehunter
 -@exec mkdir %D/lib/X11/xminehunter
 +share/pixmaps/xminehunter.xpm
 +@exec mkdir -p %D/lib/X11/xminehunter
  @exec chmod 333 %D/lib/X11/xminehunter
 -@dirrm lib/X11/xminehunter
 +@dirrmtry lib/X11/xminehunter
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
