diff options
author | madpilot <madpilot@FreeBSD.org> | 2017-12-14 16:31:21 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 06:08:31 +0800 |
commit | f629db053333314b7deb5866fd65322466fd8f95 (patch) | |
tree | ff736fa9a4e4f87ca08feea3296e2fb3da0659ae /games | |
parent | 9f0ae422c4e1ac4fae2246af042a47eec80b3e31 (diff) | |
download | freebsd-ports-gnome-f629db053333314b7deb5866fd65322466fd8f95.tar.gz freebsd-ports-gnome-f629db053333314b7deb5866fd65322466fd8f95.tar.zst freebsd-ports-gnome-f629db053333314b7deb5866fd65322466fd8f95.zip |
- Unbreak and fix build after protobuf 3.5.0 update
Diffstat (limited to 'games')
-rw-r--r-- | games/pokerth/Makefile | 11 | ||||
-rw-r--r-- | games/pokerth/files/patch-pokerth.proto | 11 | ||||
-rw-r--r-- | games/pokerth/files/patch-src_net_common_netpacket.cpp | 11 |
3 files changed, 30 insertions, 3 deletions
diff --git a/games/pokerth/Makefile b/games/pokerth/Makefile index 83ce5b0ae474..05c3c1d66d10 100644 --- a/games/pokerth/Makefile +++ b/games/pokerth/Makefile @@ -14,8 +14,6 @@ COMMENT= Poker game written in C++/Qt4 LICENSE= AGPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN= Fails to compile with protobuf 3.5.0 - LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libmikmod.so:audio/libmikmod \ libgnutls.so:security/gnutls \ @@ -23,7 +21,8 @@ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libgsasl.so:security/gsasl \ libtinyxml.so:textproc/tinyxml \ libprotobuf.so:devel/protobuf -BUILD_DEPENDS= ${LOCALBASE}/include/libircclient.h:irc/libircclient +BUILD_DEPENDS= ${LOCALBASE}/include/libircclient.h:irc/libircclient \ + protoc:devel/protobuf USES= iconv gmake qmake tar:bzip2 USE_QT4= gui corelib network sql sql-sqlite3 \ @@ -45,6 +44,12 @@ post-patch: @${FIND} ${WRKSRC} -name '*.cpp' -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's|[io]fstream|std::&|' +pre-build: + (cd ${WRKSRC} && \ + protoc --cpp_out=src/third_party/protobuf chatcleaner.proto && \ + protoc --cpp_out=src/third_party/protobuf pokerth.proto \ + ) + post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pokerth ${INSTALL_PROGRAM} ${WRKSRC}/bin/pokerth_server ${STAGEDIR}${PREFIX}/bin diff --git a/games/pokerth/files/patch-pokerth.proto b/games/pokerth/files/patch-pokerth.proto new file mode 100644 index 000000000000..f0d3dcc1baac --- /dev/null +++ b/games/pokerth/files/patch-pokerth.proto @@ -0,0 +1,11 @@ +--- pokerth.proto.orig 2014-01-10 21:18:20 UTC ++++ pokerth.proto +@@ -701,7 +701,7 @@ message ReportGameAckMessage { + + message ErrorMessage { + enum ErrorReason { +- reserved = 0; ++ pthreserved = 0; + initVersionNotSupported = 1; + initServerFull = 2; + initAuthFailure = 3; diff --git a/games/pokerth/files/patch-src_net_common_netpacket.cpp b/games/pokerth/files/patch-src_net_common_netpacket.cpp new file mode 100644 index 000000000000..9899d40ce1d9 --- /dev/null +++ b/games/pokerth/files/patch-src_net_common_netpacket.cpp @@ -0,0 +1,11 @@ +--- src/net/common/netpacket.cpp.orig 2014-01-10 21:18:20 UTC ++++ src/net/common/netpacket.cpp +@@ -249,7 +249,7 @@ NetPacket::GameErrorToNetError(int gameErrorReason) + retVal = ErrorMessage::sessionTimeout; + break; + default : +- retVal = ErrorMessage::reserved; ++ retVal = ErrorMessage::pthreserved; + break; + } + return retVal; |