On Thu, 13 Mar 2014 12:31:43 +0100 Rusmir Dusko wrote:
> Hello
>
> Trainm Game not build more in FreeBSD 10.
>
> With FreeBSD 9.1, 9.2 have all good worked.
>
>
> 10.0-RELEASE-p4 FreeBSD 10.0-RELEASE-p4 #0: Tue Jan 14 20:48:07 UTC 2014 amd64
>
> This is first Cmake and then GCC Port.
>
> Have too not worked in FreeBSD 10 with older boost 1.52.0.
>
> With Clang not works at all.
Because the port depends on a C++ library like boost, it needs to be
build with the same C++ runtime library as boost. On FreeBSD 10 that
is libc++.
I've attached a patch that makes the port build with clang/libc++ but
I haven't run-tested it.
Index: games/traingame/Makefile
===================================================================
--- games/traingame/Makefile (revision 348266)
+++ games/traingame/Makefile (working copy)
@@ -22,10 +22,12 @@ LIB_DEPENDS= libfreetype.so:${PORTSDIR}/
WRKSRC= ${WRKDIR}/TrainGame-${PORTVERSION}
-USES= cmake pkgconfig
+USES= cmake compiler:c++11-lib pkgconfig
+USE_CXXSTD= gnu++11
USE_SDL= sdl image
USE_GL= glew
-USE_GCC= yes
+
+LDFLAGS+= -L${LOCALBASE}/lib
PORTDOCS= model_notes.txt models.gnuplot
Index: games/traingame/files/patch-libc++
===================================================================
--- games/traingame/files/patch-libc++ (revision 0)
+++ games/traingame/files/patch-libc++ (working copy)
@@ -0,0 +1,27 @@
+--- src/CrossoverTrack.cpp.orig
++++ src/CrossoverTrack.cpp
+@@ -215,5 +215,5 @@
+
+ ITrackSegmentPtr make_crossover_track()
+ {
+- return ITrackSegmentPtr(new CrossoverTrack);
++ return ITrackSegmentPtr(static_cast<ITrackSegment *>(new CrossoverTrack));
+ }
+--- src/SDLWindow.cpp.orig
++++ src/SDLWindow.cpp
+@@ -406,5 +406,5 @@
+ // Construct and initialise an OpenGL SDL window
+ IWindowPtr make_sdl_window()
+ {
+- return shared_ptr<IWindow>(new SDLWindow);
++ return shared_ptr<IWindow>(static_cast<IWindow *>(new SDLWindow));
+ }
+--- src/StraightTrack.cpp.orig
++++ src/StraightTrack.cpp
+@@ -259,5 +259,5 @@
+ throw runtime_error("Illegal straight track direction: "
+ + lexical_cast<string>(a_direction));
+
+- return ITrackSegmentPtr(new StraightTrack(real_dir));
++ return ITrackSegmentPtr(static_cast<ITrackSegment *>(new StraightTrack(real_dir)));
+ }
Property changes on: games/traingame/files/patch-libc++
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"