From tkato432@yahoo.com  Mon Dec 16 18:03:24 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 E6BE238B
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:02:18 +0000 (UTC)
Received: from omta01.auone-net.jp (mail-or0-f67.auone-net.jp [106.187.230.67])
	by mx1.freebsd.org (Postfix) with ESMTP id 929F0185F
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:02:18 +0000 (UTC)
Received: from coppermine.my.domain (ZT030106.ppp.dion.ne.jp [59.128.30.106])
	by omta01.auone-net.jp (au one net mail) with ESMTP id 93D47980179
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 17 Dec 2013 03:02:16 +0900 (JST)
Message-Id: <20131217024801.95e01f3c8014fdfa321bcf8b@yahoo.com>
Date: Tue, 17 Dec 2013 02:48:01 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: games/bastet: Fix build on -current

>Number:         184894
>Category:       ports
>Synopsis:       games/bastet: Fix build on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:26 UTC 2013
>Closed-Date:    Thu Feb 06 15:45:42 UTC 2014
>Last-Modified:  Thu Feb 06 15:45:42 UTC 2014
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build on -current

New file:
files/patch-BastetBlockChooser.hpp

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/bastet/Makefile games/bastet/Makefile
--- /usr/ports/games/bastet/Makefile	2013-12-12 21:50:20.000000000 +0900
+++ games/bastet/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -9,36 +9,45 @@
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	An ncurses Tetris clone which is harder than every other Tetris
+COMMENT=	Ncurses Tetris clone which is harder than every other Tetris
 
 LICENSE=	GPLv3 # (or later)
 
 LIB_DEPENDS=	libboost_program_options.so:${PORTSDIR}/devel/boost-libs
 
-USES=		ncurses
-USE_GMAKE=	yes
+USES=		gmake ncurses
 
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-MAN6=		bastet.6
-PLIST_FILES=	bin/bastet
+PLIST_FILES=	bin/bastet man/man6/bastet.6.gz
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} != "i386"
+.if ${OSVERSION} < 1000024
+.if exists(/usr/bin/clang)
+CC=		clang
+CXX=		clang++
+CPP=		clang-cpp
+.else
+.if ${ARCH} == "i386"
+CXXFLAGS+=	-fexceptions
+.else
 USE_GCC=	yes
 .endif
+.endif
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
-		 s|$$(CXX) -MM|$$(CXX) $$(CPPFLAGS) -MM| ; \
+		 s|$$(CXX) -MM|$$(CXX) $$(CXXFLAGS) -MM| ; \
 		 s| -ggdb | |' ${WRKSRC}/Makefile
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/bastet.6 ${MAN6PREFIX}/man/man6
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} bastet \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC} && ${INSTALL_MAN} bastet.6 \
+		${STAGEDIR}${MAN6PREFIX}/man/man6)
 
 .include <bsd.port.post.mk>
diff -urN /usr/ports/games/bastet/files/patch-BastetBlockChooser.hpp games/bastet/files/patch-BastetBlockChooser.hpp
--- /usr/ports/games/bastet/files/patch-BastetBlockChooser.hpp	1970-01-01 09:00:00.000000000 +0900
+++ games/bastet/files/patch-BastetBlockChooser.hpp	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,47 @@
+--- BastetBlockChooser.hpp.orig	2009-03-21 06:49:31.000000000 +0900
++++ BastetBlockChooser.hpp	2013-11-29 22:35:48.000000000 +0900
+@@ -23,19 +23,32 @@
+ 
+ #include "Well.hpp"
+ 
++#if !defined(_LIBCPP_VERSION)
+ #include <tr1/unordered_set>
++#else
++#include <unordered_set>
++#endif
+ #include <set>
+ #include <boost/functional/hash.hpp>
+ 
++#if !defined(_LIBCPP_VERSION)
+ //boilerplate to use boost::hash as std::tr1::hash
+ namespace std{namespace tr1{
++#else
++//boilerplate to use boost::hash as std::hash
++namespace std{
++#endif
+     template<> struct hash<Bastet::BlockPosition>{
+       size_t operator()(const Bastet::BlockPosition &fb) const{
+ 	static boost::hash<Bastet::BlockPosition> h;
+ 	return h(fb);
+       }
+     };
++#if !defined(_LIBCPP_VERSION)
+   }}
++#else
++  }
++#endif
+ 
+ namespace Bastet{
+ 
+@@ -83,7 +96,11 @@
+   public:
+     Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
+   private:
++#if !defined(_LIBCPP_VERSION)
+     std::tr1::unordered_set<Vertex> _visited;
++#else
++    std::unordered_set<Vertex> _visited;
++#endif
+     //std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
+     BlockType _block;
+     const Well *_well;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Thu Jan 23 15:45:58 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184894: commit references a PR
Date: Sat, 25 Jan 2014 16:54:01 +0000 (UTC)

 Author: miwi
 Date: Sat Jan 25 16:53:54 2014
 New Revision: 341056
 URL: http://svnweb.freebsd.org/changeset/ports/341056
 QAT: https://qat.redports.org/buildarchive/r341056/
 
 Log:
   - Fix build
   - Stage support
   
   PR:		184894
   Submitted by:	ports fury
 
 Added:
   head/games/bastet/files/
   head/games/bastet/files/patch-BastetBlockChooser.hpp   (contents, props changed)
 Modified:
   head/games/bastet/Makefile
 
 Modified: head/games/bastet/Makefile
 ==============================================================================
 --- head/games/bastet/Makefile	Sat Jan 25 16:51:55 2014	(r341055)
 +++ head/games/bastet/Makefile	Sat Jan 25 16:53:54 2014	(r341056)
 @@ -9,36 +9,45 @@ MASTER_SITES=	http://fph.altervista.org/
  EXTRACT_SUFX=	.tgz
  
  MAINTAINER=	ports@FreeBSD.org
 -COMMENT=	An ncurses Tetris clone which is harder than every other Tetris
 +COMMENT=	Ncurses Tetris clone which is harder than every other Tetris
  
  LICENSE=	GPLv3 # (or later)
  
  LIB_DEPENDS=	libboost_program_options.so:${PORTSDIR}/devel/boost-libs
  
 -USES=		ncurses
 -USE_GMAKE=	yes
 +USES=		gmake ncurses
  
  CPPFLAGS+=	-I${LOCALBASE}/include
  LDFLAGS+=	-L${LOCALBASE}/lib
  
 -MAN6=		bastet.6
 -PLIST_FILES=	bin/bastet
 +PLIST_FILES=	bin/bastet man/man6/bastet.6.gz
  
 -NO_STAGE=	yes
  .include <bsd.port.pre.mk>
  
 -.if ${ARCH} != "i386"
 +.if ${OSVERSION} < 1000024
 +.if exists(/usr/bin/clang)
 +CC=		clang
 +CXX=		clang++
 +CPP=		clang-cpp
 +.else
 +.if ${ARCH} == "i386"
 +CXXFLAGS+=	-fexceptions
 +.else
  USE_GCC=	yes
  .endif
 +.endif
 +.endif
  
  post-patch:
  	@${REINPLACE_CMD} -e \
  		's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
 -		 s|$$(CXX) -MM|$$(CXX) $$(CPPFLAGS) -MM| ; \
 +		 s|$$(CXX) -MM|$$(CXX) $$(CXXFLAGS) -MM| ; \
  		 s| -ggdb | |' ${WRKSRC}/Makefile
  
  do-install:
 -	${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin
 -	${INSTALL_MAN} ${WRKSRC}/bastet.6 ${MAN6PREFIX}/man/man6
 +	(cd ${WRKSRC} && ${INSTALL_PROGRAM} bastet \
 +		${STAGEDIR}${PREFIX}/bin)
 +	(cd ${WRKSRC} && ${INSTALL_MAN} bastet.6 \
 +		${STAGEDIR}${MAN6PREFIX}/man/man6)
  
  .include <bsd.port.post.mk>
 
 Added: head/games/bastet/files/patch-BastetBlockChooser.hpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/games/bastet/files/patch-BastetBlockChooser.hpp	Sat Jan 25 16:53:54 2014	(r341056)
 @@ -0,0 +1,47 @@
 +--- BastetBlockChooser.hpp.orig	2009-03-21 06:49:31.000000000 +0900
 ++++ BastetBlockChooser.hpp	2013-11-29 22:35:48.000000000 +0900
 +@@ -23,19 +23,32 @@
 + 
 + #include "Well.hpp"
 + 
 ++#if !defined(_LIBCPP_VERSION)
 + #include <tr1/unordered_set>
 ++#else
 ++#include <unordered_set>
 ++#endif
 + #include <set>
 + #include <boost/functional/hash.hpp>
 + 
 ++#if !defined(_LIBCPP_VERSION)
 + //boilerplate to use boost::hash as std::tr1::hash
 + namespace std{namespace tr1{
 ++#else
 ++//boilerplate to use boost::hash as std::hash
 ++namespace std{
 ++#endif
 +     template<> struct hash<Bastet::BlockPosition>{
 +       size_t operator()(const Bastet::BlockPosition &fb) const{
 + 	static boost::hash<Bastet::BlockPosition> h;
 + 	return h(fb);
 +       }
 +     };
 ++#if !defined(_LIBCPP_VERSION)
 +   }}
 ++#else
 ++  }
 ++#endif
 + 
 + namespace Bastet{
 + 
 +@@ -83,7 +96,11 @@
 +   public:
 +     Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
 +   private:
 ++#if !defined(_LIBCPP_VERSION)
 +     std::tr1::unordered_set<Vertex> _visited;
 ++#else
 ++    std::unordered_set<Vertex> _visited;
 ++#endif
 +     //std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
 +     BlockType _block;
 +     const Well *_well;
 _______________________________________________
 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"
 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Feb 6 15:45:41 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184894 
>Unformatted:
