View | Details | Raw Unified | Return to bug 184894
Collapse All | Expand All

(-)games/bastet/Makefile (-10 / +19 lines)
Lines 9-44 Link Here
9
EXTRACT_SUFX=	.tgz
9
EXTRACT_SUFX=	.tgz
10
10
11
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	ports@FreeBSD.org
12
COMMENT=	An ncurses Tetris clone which is harder than every other Tetris
12
COMMENT=	Ncurses Tetris clone which is harder than every other Tetris
13
13
14
LICENSE=	GPLv3 # (or later)
14
LICENSE=	GPLv3 # (or later)
15
15
16
LIB_DEPENDS=	libboost_program_options.so:${PORTSDIR}/devel/boost-libs
16
LIB_DEPENDS=	libboost_program_options.so:${PORTSDIR}/devel/boost-libs
17
17
18
USES=		ncurses
18
USES=		gmake ncurses
19
USE_GMAKE=	yes
20
19
21
CPPFLAGS+=	-I${LOCALBASE}/include
20
CPPFLAGS+=	-I${LOCALBASE}/include
22
LDFLAGS+=	-L${LOCALBASE}/lib
21
LDFLAGS+=	-L${LOCALBASE}/lib
23
22
24
MAN6=		bastet.6
23
PLIST_FILES=	bin/bastet man/man6/bastet.6.gz
25
PLIST_FILES=	bin/bastet
26
24
27
NO_STAGE=	yes
28
.include <bsd.port.pre.mk>
25
.include <bsd.port.pre.mk>
29
26
30
.if ${ARCH} != "i386"
27
.if ${OSVERSION} < 1000024
28
.if exists(/usr/bin/clang)
29
CC=		clang
30
CXX=		clang++
31
CPP=		clang-cpp
32
.else
33
.if ${ARCH} == "i386"
34
CXXFLAGS+=	-fexceptions
35
.else
31
USE_GCC=	yes
36
USE_GCC=	yes
32
.endif
37
.endif
38
.endif
39
.endif
33
40
34
post-patch:
41
post-patch:
35
	@${REINPLACE_CMD} -e \
42
	@${REINPLACE_CMD} -e \
36
		's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
43
		's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
37
		 s|$$(CXX) -MM|$$(CXX) $$(CPPFLAGS) -MM| ; \
44
		 s|$$(CXX) -MM|$$(CXX) $$(CXXFLAGS) -MM| ; \
38
		 s| -ggdb | |' ${WRKSRC}/Makefile
45
		 s| -ggdb | |' ${WRKSRC}/Makefile
39
46
40
do-install:
47
do-install:
41
	${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin
48
	(cd ${WRKSRC} && ${INSTALL_PROGRAM} bastet \
42
	${INSTALL_MAN} ${WRKSRC}/bastet.6 ${MAN6PREFIX}/man/man6
49
		${STAGEDIR}${PREFIX}/bin)
50
	(cd ${WRKSRC} && ${INSTALL_MAN} bastet.6 \
51
		${STAGEDIR}${MAN6PREFIX}/man/man6)
43
52
44
.include <bsd.port.post.mk>
53
.include <bsd.port.post.mk>
(-)games/bastet/files/patch-BastetBlockChooser.hpp (+47 lines)
Line 0 Link Here
1
--- BastetBlockChooser.hpp.orig	2009-03-21 06:49:31.000000000 +0900
2
+++ BastetBlockChooser.hpp	2013-11-29 22:35:48.000000000 +0900
3
@@ -23,19 +23,32 @@
4
 
5
 #include "Well.hpp"
6
 
7
+#if !defined(_LIBCPP_VERSION)
8
 #include <tr1/unordered_set>
9
+#else
10
+#include <unordered_set>
11
+#endif
12
 #include <set>
13
 #include <boost/functional/hash.hpp>
14
 
15
+#if !defined(_LIBCPP_VERSION)
16
 //boilerplate to use boost::hash as std::tr1::hash
17
 namespace std{namespace tr1{
18
+#else
19
+//boilerplate to use boost::hash as std::hash
20
+namespace std{
21
+#endif
22
     template<> struct hash<Bastet::BlockPosition>{
23
       size_t operator()(const Bastet::BlockPosition &fb) const{
24
 	static boost::hash<Bastet::BlockPosition> h;
25
 	return h(fb);
26
       }
27
     };
28
+#if !defined(_LIBCPP_VERSION)
29
   }}
30
+#else
31
+  }
32
+#endif
33
 
34
 namespace Bastet{
35
 
36
@@ -83,7 +96,11 @@
37
   public:
38
     Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
39
   private:
40
+#if !defined(_LIBCPP_VERSION)
41
     std::tr1::unordered_set<Vertex> _visited;
42
+#else
43
+    std::unordered_set<Vertex> _visited;
44
+#endif
45
     //std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
46
     BlockType _block;
47
     const Well *_well;

Return to bug 184894