FreeBSD Bugzilla – Attachment 184723 Details for
Bug 219294
games/openlierox: fails to build with lang/gcc6 or later
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
openlierox.diff (text/plain), 6.64 KB, created by
Raphael Kubo da Costa
on 2017-07-26 13:29:32 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Raphael Kubo da Costa
Created:
2017-07-26 13:29:32 UTC
Size:
6.64 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 446651) >+++ Makefile (working copy) >@@ -19,7 +19,6 @@ > USES= tar:bzip2 cmake openal:al,alut pkgconfig > USE_SDL= sdl image > USE_GNOME= libxml2 >-USE_GCC= any # too many gcc'isms > > CFLAGS+= -I${LOCALBASE}/include > CXXFLAGS+= -I${LOCALBASE}/include >@@ -60,6 +59,9 @@ > s|/usr/local|${LOCALBASE}|' ${WRKSRC}/CMakeOlxCommon.cmake > @${FIND} ${WRKSRC} \( -name "*.cpp" -o -name "*.h" -o -name "*.cc" \) -print0 | ${XARGS} -0 -n1 \ > ${REINPLACE_CMD} -e '/include.*curl\/types.h/ d' >+# Convert the static_assert calls to regular, C++ ones. >+ @${FIND} ${WRKSRC} \( -name "*.cpp" -o -name "*.h" -o -name "*.cc" \) -print0 | ${XARGS} -0 -n1 \ >+ ${REINPLACE_CMD} -E -e 's/static_assert\((.+), (.+)\)/static_assert\(\1, "\2"\)/g' > > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/bin/openlierox ${STAGEDIR}${PREFIX}/bin/ >Index: files/patch-include_GfxPrimitives.h >=================================================================== >--- files/patch-include_GfxPrimitives.h (nonexistent) >+++ files/patch-include_GfxPrimitives.h (working copy) >@@ -0,0 +1,32 @@ >+Provide missing constructor. >+ >+./include/CMap.h:423:18: error: no matching constructor for initialization of 'SDLRect' (aka 'OLXRect<SDLRectBasic>') >+ if(!r.clipWith(SDLRect(0, 0, Width, Height))) >+ ^ ~~~~~~~~~~~~~~~~~~~ >+./include/GfxPrimitives.h:161:2: note: candidate constructor not viable: requires single argument 'r', but 4 arguments were provided >+ OLXRect(const _RectBasic & r): _RectBasic(r) {} >+ ^ >+--- include/GfxPrimitives.h.orig 2017-07-26 12:33:41 UTC >++++ include/GfxPrimitives.h >+@@ -106,6 +106,12 @@ class SDLRectBasic : public SDL_Rect { (public) >+ typedef Uint16 TypeS; >+ >+ SDLRectBasic() { this->SDL_Rect::x = this->SDL_Rect::y = this->SDL_Rect::w = this->SDL_Rect::h = 0; } >++ SDLRectBasic(Type x_, Type y_, TypeS w_, TypeS h_) { >++ this->SDL_Rect::x = x_; >++ this->SDL_Rect::y = y_; >++ this->SDL_Rect::w = w_; >++ this->SDL_Rect::h = h_; >++ } >+ SDLRectBasic(const SDL_Rect & r): SDL_Rect(r) {} >+ Type& x() { return this->SDL_Rect::x; } >+ Type& y() { return this->SDL_Rect::y; } >+@@ -158,6 +164,8 @@ template<typename _RectBasic> >+ class OLXRect : public _RectBasic { >+ public: >+ >++ OLXRect(typename _RectBasic::Type x_, typename _RectBasic::Type y_, >++ typename _RectBasic::TypeS w_, typename _RectBasic::TypeS h_): _RectBasic(x_, y_, w_, h_) {} >+ OLXRect(const _RectBasic & r): _RectBasic(r) {} >+ >+ class GetX2 { > >Property changes on: files/patch-include_GfxPrimitives.h >___________________________________________________________________ >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 >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-include_StaticAssert.h >=================================================================== >--- files/patch-include_StaticAssert.h (nonexistent) >+++ files/patch-include_StaticAssert.h (working copy) >@@ -0,0 +1,16 @@ >+Use static_assert provided by the compiler to avoid redefining it and breaking >+headers which use the official version. >+--- include/StaticAssert.h.orig 2009-10-11 20:53:01 UTC >++++ include/StaticAssert.h >+@@ -10,11 +10,5 @@ >+ #ifndef __OLX__STATICASSERT_H__ >+ #define __OLX__STATICASSERT_H__ >+ >+-template <bool b> class static_assert_failure; >+-template <> class static_assert_failure<true> { char foo; }; >+-template <int s> class static_assert_test{}; >+- >+-#define static_assert(X, desc) \ >+- typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc; >+ >+ #endif > >Property changes on: files/patch-include_StaticAssert.h >___________________________________________________________________ >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 >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-libs_pstreams_pstream.h >=================================================================== >--- files/patch-libs_pstreams_pstream.h (nonexistent) >+++ files/patch-libs_pstreams_pstream.h (working copy) >@@ -0,0 +1,49 @@ >+Use the type basic_pstreambuf::fd_type is a typedef of. >+ >+./libs/pstreams/pstream.h:1742:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::wpipe' differs from that in the declaration >+ basic_pstreambuf<C,T>::wpipe() >+ ^ >+./libs/pstreams/pstream.h:221:7: note: previous declaration is here >+ wpipe(); >+ ^ >+./libs/pstreams/pstream.h:1750:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::rpipe' differs from that in the declaration >+ basic_pstreambuf<C,T>::rpipe() >+ ^ >+./libs/pstreams/pstream.h:225:7: note: previous declaration is here >+ rpipe(); >+ ^ >+./libs/pstreams/pstream.h:1758:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::rpipe' differs from that in the declaration >+ basic_pstreambuf<C,T>::rpipe(buf_read_src which) >+ ^ >+./libs/pstreams/pstream.h:229:7: note: previous declaration is here >+ rpipe(buf_read_src which); >+ ^ >+--- libs/pstreams/pstream.h.orig 2017-07-26 12:51:55 UTC >++++ libs/pstreams/pstream.h >+@@ -1738,7 +1738,7 @@ namespace redi >+ >+ /** @return a reference to the output file descriptor */ >+ template <typename C, typename T> >+- inline typename basic_pstreambuf<C,T>::fd_type& >++ inline typename pstreams::fd_type& >+ basic_pstreambuf<C,T>::wpipe() >+ { >+ return wpipe_; >+@@ -1746,7 +1746,7 @@ namespace redi >+ >+ /** @return a reference to the active input file descriptor */ >+ template <typename C, typename T> >+- inline typename basic_pstreambuf<C,T>::fd_type& >++ inline typename pstreams::fd_type& >+ basic_pstreambuf<C,T>::rpipe() >+ { >+ return rpipe_[rsrc_]; >+@@ -1754,7 +1754,7 @@ namespace redi >+ >+ /** @return a reference to the specified input file descriptor */ >+ template <typename C, typename T> >+- inline typename basic_pstreambuf<C,T>::fd_type& >++ inline typename pstreams::fd_type& >+ basic_pstreambuf<C,T>::rpipe(buf_read_src which) >+ { >+ return rpipe_[which]; > >Property changes on: files/patch-libs_pstreams_pstream.h >___________________________________________________________________ >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 >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219294
: 184723