1 |
commit: a3f67754346ac4fc694059dc38790058aa37cc40 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 11 19:12:05 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 11 19:12:05 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3f67754 |
7 |
|
8 |
games-board/pokerth: Unbundle dev-cpp/websocketpp |
9 |
|
10 |
Closes: https://bugs.gentoo.org/689298 |
11 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
.../pokerth/files/pokerth-1.1.2-boost-1.66.patch | 38 ++++++++ |
15 |
.../pokerth/files/pokerth-1.1.2-fix-includes.patch | 106 +++++++++++++++++++++ |
16 |
.../files/pokerth-1.1.2-system-websockets.patch | 17 ++++ |
17 |
games-board/pokerth/pokerth-1.1.2.ebuild | 10 +- |
18 |
4 files changed, 170 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/games-board/pokerth/files/pokerth-1.1.2-boost-1.66.patch b/games-board/pokerth/files/pokerth-1.1.2-boost-1.66.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..94eb5b2c570 |
23 |
--- /dev/null |
24 |
+++ b/games-board/pokerth/files/pokerth-1.1.2-boost-1.66.patch |
25 |
@@ -0,0 +1,38 @@ |
26 |
+Description: Fix build failure with deprecated io_control in boost 1.66 |
27 |
+Origin: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224123 |
28 |
+Last-Update: 2018-09-11 |
29 |
+ |
30 |
+Index: pokerth-1.1.2/src/net/common/clientthread.cpp |
31 |
+=================================================================== |
32 |
+--- pokerth-1.1.2.orig/src/net/common/clientthread.cpp |
33 |
++++ pokerth-1.1.2/src/net/common/clientthread.cpp |
34 |
+@@ -993,8 +993,12 @@ |
35 |
+ newSock.reset(new boost::asio::ip::tcp::socket(*m_ioService, tcp::v6())); |
36 |
+ else |
37 |
+ newSock.reset(new boost::asio::ip::tcp::socket(*m_ioService, tcp::v4())); |
38 |
++#if BOOST_VERSION < 106600 |
39 |
+ boost::asio::socket_base::non_blocking_io command(true); |
40 |
+ newSock->io_control(command); |
41 |
++#else |
42 |
++ newSock->non_blocking(true); |
43 |
++#endif |
44 |
+ newSock->set_option(tcp::no_delay(true)); |
45 |
+ newSock->set_option(boost::asio::socket_base::keep_alive(true)); |
46 |
+ |
47 |
+Index: pokerth-1.1.2/src/net/serveraccepthelper.h |
48 |
+=================================================================== |
49 |
+--- pokerth-1.1.2.orig/src/net/serveraccepthelper.h |
50 |
++++ pokerth-1.1.2/src/net/serveraccepthelper.h |
51 |
+@@ -122,8 +122,12 @@ |
52 |
+ const boost::system::error_code &error) |
53 |
+ { |
54 |
+ if (!error) { |
55 |
++#if BOOST_VERSION < 106600 |
56 |
+ boost::asio::socket_base::non_blocking_io command(true); |
57 |
+ acceptedSocket->io_control(command); |
58 |
++#else |
59 |
++ acceptedSocket->non_blocking(true); |
60 |
++#endif |
61 |
+ acceptedSocket->set_option(typename P::no_delay(true)); |
62 |
+ acceptedSocket->set_option(boost::asio::socket_base::keep_alive(true)); |
63 |
+ boost::shared_ptr<SessionData> sessionData(new SessionData(acceptedSocket, m_lobbyThread->GetNextSessionId(), m_lobbyThread->GetSessionDataCallback(), *m_ioService)); |
64 |
|
65 |
diff --git a/games-board/pokerth/files/pokerth-1.1.2-fix-includes.patch b/games-board/pokerth/files/pokerth-1.1.2-fix-includes.patch |
66 |
new file mode 100644 |
67 |
index 00000000000..f03ff0dae4d |
68 |
--- /dev/null |
69 |
+++ b/games-board/pokerth/files/pokerth-1.1.2-fix-includes.patch |
70 |
@@ -0,0 +1,106 @@ |
71 |
+Description: fix build failure due to including -isystem /usr/include before everything else |
72 |
+ (usr/include is already included by the compiler itself) |
73 |
+Author: Gianfranco Costamagna <locutusofborg@××××××.org> |
74 |
+Last-Update: 2018-10-02 |
75 |
+ |
76 |
+--- a/chatcleaner.pro |
77 |
++++ b/chatcleaner.pro |
78 |
+@@ -49,7 +49,6 @@ |
79 |
+ !win32{ |
80 |
+ ##### My release static build options |
81 |
+ #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections |
82 |
+- INCLUDEPATH += $${PREFIX}/include |
83 |
+ } |
84 |
+ mac { |
85 |
+ # make it x86_64 only |
86 |
+--- a/connectivity.pro |
87 |
++++ b/connectivity.pro |
88 |
+@@ -40,7 +40,6 @@ |
89 |
+ #QMAKE_LFLAGS += -Wl,--gc-sections |
90 |
+ |
91 |
+ QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib |
92 |
+- INCLUDEPATH += $${PREFIX}/include |
93 |
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS) |
94 |
+ BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt |
95 |
+ BOOST_SYS = boost_system boost_system-mt |
96 |
+--- a/load.pro |
97 |
++++ b/load.pro |
98 |
+@@ -41,7 +41,6 @@ |
99 |
+ #QMAKE_LFLAGS += -Wl,--gc-sections |
100 |
+ |
101 |
+ QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib |
102 |
+- INCLUDEPATH += $${PREFIX}/include |
103 |
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS) |
104 |
+ BOOST_THREAD = boost_thread boost_thread-mt |
105 |
+ BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt |
106 |
+--- a/pokerth_dbofficial.pro |
107 |
++++ b/pokerth_dbofficial.pro |
108 |
+@@ -73,7 +73,7 @@ |
109 |
+ !win32 { |
110 |
+ # #### My release static build options |
111 |
+ # QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections |
112 |
+- INCLUDEPATH += /usr/include \ |
113 |
++ INCLUDEPATH += \ |
114 |
+ /usr/include/mysql \ |
115 |
+ /usr/include/mysql++ |
116 |
+ INCLUDEPATH += /opt/boost/include |
117 |
+--- a/pokerth_db.pro |
118 |
++++ b/pokerth_db.pro |
119 |
+@@ -52,7 +52,6 @@ |
120 |
+ !win32{ |
121 |
+ ##### My release static build options |
122 |
+ #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections |
123 |
+- INCLUDEPATH += $${PREFIX}/include |
124 |
+ } |
125 |
+ |
126 |
+ mac{ |
127 |
+--- a/pokerth_game.pro |
128 |
++++ b/pokerth_game.pro |
129 |
+@@ -405,7 +405,6 @@ |
130 |
+ # #### My release static build options |
131 |
+ # QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections |
132 |
+ # QMAKE_LFLAGS += -Wl,--gc-sections |
133 |
+- INCLUDEPATH += $${PREFIX}/include |
134 |
+ QMAKE_LIBDIR += lib |
135 |
+ !android{ |
136 |
+ LIBPATH += $${PREFIX}/lib /opt/gsasl/lib |
137 |
+--- a/pokerth_lib.pro |
138 |
++++ b/pokerth_lib.pro |
139 |
+@@ -269,7 +269,7 @@ |
140 |
+ src/dbofficial/asyncdbadminplayers.cpp \ |
141 |
+ src/dbofficial/asyncdbblockplayer.cpp \ |
142 |
+ src/dbofficial/dbidmanager.cpp |
143 |
+- INCLUDEPATH += /usr/include \ |
144 |
++ INCLUDEPATH += \ |
145 |
+ /usr/include/mysql \ |
146 |
+ /usr/include/mysql++ |
147 |
+ } |
148 |
+@@ -286,7 +286,7 @@ |
149 |
+ !win32{ |
150 |
+ ##### My release static build options |
151 |
+ #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections |
152 |
+- INCLUDEPATH += $${PREFIX}/include /opt/gsasl/include |
153 |
++ INCLUDEPATH += opt/gsasl/include |
154 |
+ } |
155 |
+ |
156 |
+ mac{ |
157 |
+--- a/pokerth_protocol.pro |
158 |
++++ b/pokerth_protocol.pro |
159 |
+@@ -40,7 +40,6 @@ |
160 |
+ system(protoc pokerth.proto --java_out=tests/src) |
161 |
+ } |
162 |
+ unix : !mac { |
163 |
+- INCLUDEPATH += $${PREFIX}/include |
164 |
+ system(protoc pokerth.proto --cpp_out=src/third_party/protobuf) |
165 |
+ system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf) |
166 |
+ system(protoc pokerth.proto --java_out=tests/src) |
167 |
+--- a/pokerth_server.pro |
168 |
++++ b/pokerth_server.pro |
169 |
+@@ -177,7 +177,6 @@ |
170 |
+ #QMAKE_LFLAGS += -Wl,--gc-sections |
171 |
+ |
172 |
+ LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib |
173 |
+- INCLUDEPATH += $${PREFIX}/include |
174 |
+ # see issue https://github.com/pokerth/pokerth/issues/282 |
175 |
+ INCLUDEPATH += $${PREFIX}/include/libircclient |
176 |
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS) |
177 |
|
178 |
diff --git a/games-board/pokerth/files/pokerth-1.1.2-system-websockets.patch b/games-board/pokerth/files/pokerth-1.1.2-system-websockets.patch |
179 |
new file mode 100644 |
180 |
index 00000000000..25c757bc905 |
181 |
--- /dev/null |
182 |
+++ b/games-board/pokerth/files/pokerth-1.1.2-system-websockets.patch |
183 |
@@ -0,0 +1,17 @@ |
184 |
+Description: force use of system websocketpp library |
185 |
+Author: Gianfranco Costamagna <locutusofborg@××××××.org> |
186 |
+ |
187 |
+Index: pokerth-1.1.2/pokerth_lib.pro |
188 |
+=================================================================== |
189 |
+--- pokerth-1.1.2.orig/pokerth_lib.pro |
190 |
++++ pokerth-1.1.2/pokerth_lib.pro |
191 |
+@@ -30,8 +30,7 @@ |
192 |
+ src/engine/local_engine \ |
193 |
+ src/engine/network_engine \ |
194 |
+ src/config \ |
195 |
+- src/core \ |
196 |
+- src/third_party/websocketpp |
197 |
++ src/core |
198 |
+ |
199 |
+ DEPENDPATH += . \ |
200 |
+ src \ |
201 |
|
202 |
diff --git a/games-board/pokerth/pokerth-1.1.2.ebuild b/games-board/pokerth/pokerth-1.1.2.ebuild |
203 |
index 5aa49bfc497..685ac05c300 100644 |
204 |
--- a/games-board/pokerth/pokerth-1.1.2.ebuild |
205 |
+++ b/games-board/pokerth/pokerth-1.1.2.ebuild |
206 |
@@ -15,7 +15,7 @@ KEYWORDS="~amd64 ~x86" |
207 |
IUSE="dedicated" |
208 |
|
209 |
RDEPEND="dev-db/sqlite:3 |
210 |
- <dev-libs/boost-1.70:0=[threads(+)] |
211 |
+ dev-libs/boost:0=[threads(+)] |
212 |
dev-libs/libgcrypt:0 |
213 |
dev-libs/protobuf:0= |
214 |
dev-libs/tinyxml[stl] |
215 |
@@ -31,6 +31,7 @@ RDEPEND="dev-db/sqlite:3 |
216 |
media-libs/sdl-mixer[mod,vorbis] |
217 |
)" |
218 |
DEPEND="${RDEPEND} |
219 |
+ dev-cpp/websocketpp |
220 |
!dedicated? ( dev-qt/qtsql:5 ) |
221 |
virtual/pkgconfig" |
222 |
|
223 |
@@ -39,11 +40,18 @@ S="${WORKDIR}/${P}-rc" |
224 |
PATCHES=( |
225 |
"${FILESDIR}"/${PN}-1.1.1-boost-1.65-ambiguous-advance.patch |
226 |
"${FILESDIR}"/${PN}-1.1.2-protobuf.patch |
227 |
+ "${FILESDIR}"/${PN}-1.1.2-boost-1.66.patch |
228 |
+ "${FILESDIR}"/${PN}-1.1.2-fix-includes.patch |
229 |
+ # unbundle dev-cpp/websocketpp |
230 |
+ "${FILESDIR}"/${PN}-1.1.2-system-websockets.patch |
231 |
) |
232 |
|
233 |
src_prepare() { |
234 |
default |
235 |
sed -i 's/!client//' *.pro || die |
236 |
+ |
237 |
+ # delete bundled dev-cpp/websocketpp to be safe |
238 |
+ rm -r src/third_party/websocketpp || die |
239 |
} |
240 |
|
241 |
src_configure() { |