Hedgewars provides a server component for multiplayer games over network. This enhanced ebuild adds in-game and dedicated server support. Reproducible: Always
Created attachment 172016 [details] Ebuild with server support
Created attachment 177911 [details] New ebuild for hedgewars-0.9.8 Hedgewars 0.9.8 is out. The ebuild needed some minor modifications. Attached Ebuild works and provides server support.
This isn't what the dedicated use flag means. For USE=dedicated it should just build the server.
Created attachment 177920 [details] New ebuild for hedgewars 0.9.8 Ok, but the describtion of euse is a little bit confusing: "dedicated - Adds support for dedicated game servers (some packages do not provide clients and servers at the same time)" My Flag adds an additional binary that starts a dedicated server. I renamed it to "server" and removed the monolithic QT dependency.
Created attachment 179239 [details] Ebuild for Hedgewars 0.9.9 Just a bump for the new version. Tested on a amd64 machine.
Created attachment 193714 [details] new version with the server flag support
You will need only one package from the haskell overlay : dev-haskell/utf8-string
Somebody from Gentoo Games could add this FLAG in the portage tree ? Thank you very much.
I also needed to get bytestring and dataenc from the Haskell overlay.
Hi all, Does anybody working on it? Without server it's only a half of a game. Yes, we can play localy, or via network with another OS, but we cannot play between Gentoo boxes only. As I see there is no bugs for the adding of Haskell packages. Could somebody clarify, is it needed to raise one bug per package, or it's shall be only one bug? -- BR, Mike.
You should probably ask about it on #gentoo-haskell or mail haskell@gentoo.org
Have to check with kolmodin, but it appears his official policy regarding bytestring is that whilst we use it in the overlay, it's not appearing in the tree (as it ships with GHC). As such, the only ebuild you need is dataenc, which is raring to go! I'll ping kolmodin about getting dataenc into the tree later on (slight changes need to be made to it to remove testing features we have in the overlay).
I should mention that - depending on how Hedgewars builds its server component - it might be better to rely on >= 6.8 for GHC, since they did some weird library merging thing with bytestring (which they then undid) around the 6.6 era. As such, I'm not sure how well it will build with 6.6.
Created attachment 215838 [details] hedgewars-0.9.12.ebuild w/ hedgewars-server Tested on amd64 with ghc 6.12.1
Mind updating this for 0.9.13 (which includes server changes for things like flags).
Created attachment 233941 [details] ebuild for 0.9.13 w/ server support Simple version bump to version 0.9.13. Tested on ~x86 with ghc-6.10.4-r1. I guess it is ready for the official portage tree.
This ebuild doesn't work for me on x86_64. Compiling the server fails with: /var/tmp/portage/games-strategy/hedgewars-0.9.13/work/hedgewars-src-0.9.13/gameServer/ClientIO.hs:37:11: Illegal signature in pattern: Exception.IOException Use -XPatternSignatures to permit it /var/tmp/portage/games-strategy/hedgewars-0.9.13/work/hedgewars-src-0.9.13/gameServer/ClientIO.hs:43:28: Illegal signature in pattern: Exception.IOException Use -XPatternSignatures to permit it [ 29%] make[2]: *** [bin/hedgewars-server] Error 1
Oh, I used ghc 6.8.2, I will update it and report back if it made any change.
Created attachment 248289 [details] Fixed ghc dep to >=dev-lang/ghc-6.10.4-r1 You are right, does not build with ghc-6.8.2. I have tested the ebuild with ghc-6.10.4-r1 on not up-to-date ~amd64 system, and with ghc-6.12.3 on an up-to-date ~x86 system.
Created attachment 256372 [details] ebuild for 0.9.14.1 w/ server support Version bump. Tested ok on ~x86 with ghc-6.12.3 and on ~amd64 with ghc-6.10.4-r1.
(In reply to comment #20) > Created an attachment (id=256372) [details] > ebuild for 0.9.14.1 w/ server support > > Version bump. Tested ok on ~x86 with ghc-6.12.3 and on ~amd64 with > ghc-6.10.4-r1. > Tested on x86 ghc-6.12.3, fpc-2.4.0, gcc-4.4.4. Works fine.
Created attachment 260811 [details] ebuild for 0.9.15 w/ server support. Again tested on the two machines as before.
Works here on x86_64, please merge this ebuild into the tree, thanks. Else users wonder why there is no possibility to create a local server. Fuchs
Created attachment 287127 [details] hedgewars-0.9.16.ebuild The ebuild for 0.9.16 is attached. Unfortunately, this version depends on >=Base-4.3. It means that now it requires >=ghc-7. Also, looks line >=dev-haskell/mtl-2.0.1.0 is required (because of usage 'state' transformer). And also, it depends on dev-haskell/bytestring-show, so if you want to use it, add haskell overlay.
Created attachment 291041 [details] hedgewars-0.9.16.ebuild: fixed hslogger dep Thanks very much for the ebuild, works for me. Just a minor fix: >=dev-haskell/hslogger-1.1.5 from the gentoo-haskel overlay is required. The complete list of required packages from the overlay is following: >=dev-haskell/mtl-2.0.1.0 >=dev-haskell/hslogger-1.1.5 dev-haskell/bytestring-show dev-haskell/transformers
Created attachment 295465 [details] hedgewars-0.9.17.ebuild Version bump. Tested on ~x86 (up to date) + gentoo-haskell overlay.
Thanks to many dev-haskell/* version bumps, now the only package needed from the gentoo-haskell overlay is dev-haskell/bytestring-show. I have reported bug #394343 for that.
(In reply to comment #27) > Thanks to many dev-haskell/* version bumps, now the only package needed from > the gentoo-haskell overlay is dev-haskell/bytestring-show. I have reported bug > #394343 for that. Finally the gentoo-haskell overlay is not needed at all, thanks to slyfox who promptly pushed bytestring-show. So everyone is welcome to test the new ebuild. games herd: Now that all the haskell deps are resolved, can you please push the ebuild to the tree?
Created attachment 299749 [details] build failure on a stable x86 I tried to build hedgewars with the ebuild from comment #26 on a stable x86 system. It failed. The build log is attached. $ emerge -pq hedgewars [ebuild N ] dev-lang/ghc-7.0.4 [ebuild N ] dev-haskell/syb-0.3.6 [ebuild N ] app-admin/haskell-updater-1.2.0.3 [ebuild N ] dev-haskell/cabal-1.10.2.0 [ebuild N ] dev-haskell/time-1.1.2.0 [ebuild N ] dev-haskell/utf8-string-0.3.6 [ebuild N ] dev-haskell/deepseq-1.1.0.2 [ebuild N ] dev-haskell/stm-2.1.2.2 [ebuild N ] dev-haskell/dataenc-0.14.0.2 [ebuild N ] dev-haskell/parsec-2.1.0.1 [ebuild N ] dev-haskell/transformers-0.2.2.0 [ebuild N ] dev-haskell/binary-0.5.0.2 [ebuild N ] dev-haskell/mtl-2.0.1.0 [ebuild N ] dev-haskell/network-2.2.1.7 [ebuild N ] dev-haskell/bytestring-show-0.3.5 [ebuild N ] dev-haskell/hslogger-1.1.5 [ebuild R ] games-strategy/hedgewars-0.9.17
(In reply to comment #29) > Created attachment 299749 [details] > build failure on a stable x86 > > I tried to build hedgewars with the ebuild from comment #26 on a stable x86 > system. It failed. The build log is attached. > > $ emerge -pq hedgewars [...] > [ebuild N ] dev-haskell/network-2.2.1.7 The problem is too old dev-haskel/network, you need >=2.3, which is unfortunately not in stable yet.
Created attachment 317578 [details] hedgewars-0.9.17.ebuild: fixed network dep Ebuild with fixed network dep. Anyone running stable, could you please test the ebuild and identify if there are other problems? We can then ask for stabilization of needed hackages and keyword the ebuild for stable. Maybe that will help getting it to the tree ;)
(In reply to comment #31) > Anyone running stable, could you please test the ebuild and identify if > there are other problems? I retried with the new ebuild on stable amd64. It worked. The following list are packages that I had to unmask (given by portage itself) : > =dev-haskell/bytestring-show-0.3.5.1 > =dev-haskell/transformers-0.3.0.0 > =dev-lang/ghc-7.4.1-r1 > =dev-haskell/network-2.3.0.14 > =dev-haskell/deepseq-1.3.0.0 > =dev-haskell/mtl-2.1.1 But in the middle of the installation process I had some build failures on following haskell packages, this forced me to unmask newer versions : > =dev-haskell/dataenc-0.14.0.3 > =dev-haskell/cabal-1.14.0 (Seems to be related to bug #420073)
(In reply to comment #32) > But in the middle of the installation process I had some build failures on > following haskell packages, this forced me to unmask newer versions : > > =dev-haskell/dataenc-0.14.0.3 > > =dev-haskell/cabal-1.14.0 > (Seems to be related to bug #420073) The reason that you need to unmask new cabal and dataenc is that you using ghc-7.4. If you downgrade to ghc-7.0 (which is much more stable for me) you will not need to upgrade it to most recent versions.
Created attachment 328268 [details] hedgewars-0.9.18-r2.ebuild Ebuild for Hedgewars 0.9.18, tested on ~amd64. I also added a "video" USE flag (not sure if it's the best name for it) to fix automagic dependency on ffmpeg (I did not test with libav).
Created attachment 328272 [details, diff] Patch against hedgewars-0.9.18-r1.ebuild
you could also support HCFLAGS variable for haskell (although they are rarely used) -DGHFLAGS="${HCFLAGS}"
(In reply to comment #34) > Ebuild for Hedgewars 0.9.18, tested on ~amd64. > src_prepare() { > epatch \ > "${FILESDIR}"/${P}-cflags.patch \ > "${FILESDIR}"/${P}-cmake.patch > } > CMake Error at hedgewars/cmake_install.cmake:36 (FILE): > file INSTALL cannot find Can you attach the missing patchs please ? thanks.
(In reply to comment #34) > I also added a "video" USE flag (not sure if it's the best name for it) to > fix automagic dependency on ffmpeg (I did not test with libav). it's not automagic. (In reply to comment #37) > Can you attach the missing patchs please ? thanks. they are in portage.
(In reply to comment #38) > they are in portage. Ah thanks, I had not seen that 0.9.18-r1 was commited into portage.
Created attachment 340762 [details] Patch for dev-haskell/bytestring-show-0.3.5.4 With recent bytestring-show I get following error: /tmp/paludis/games-strategy-hedgewars-0.9.18-r1/work/hedgewars-src-0.9.18/gameServer/Actions.hs:86 Duplicate instance declarations: instance NFData B.ByteString -- Defined at /tmp/paludis/games-strategy-hedgewars-0.9.18-r1/work/hedgewars-src-0.9.18/ga instance NFData B.ByteString -- Defined in `Data.ByteString.Internal' make[2]: *** [bin/hedgewars-server] Error 1 The attached simple patch fixes it, cf. http://www.hedgewars.org/node/4164.
Created attachment 366466 [details] hedgewars-0.9.20.ebuild Ebuild for 0.9.20 is attached. No additional patches are required.
(In reply to Mike Limansky from comment #41) > Created attachment 366466 [details] > hedgewars-0.9.20.ebuild > > Ebuild for 0.9.20 is attached. No additional patches are required. On my system, trying to compile it ends like this : > /var/tmp/portage/games-strategy/hedgewars-0.9.20/work/hedgewars-src-0.9.20/gameServer/Actions.hs:23:8: > Could not find module `System.Random' > Use -v to see a list of the files searched for. > make[2]: *** [bin/hedgewars-server] Error 1 > make[2]: Leaving directory `/var/tmp/portage/games-strategy/hedgewars-0.9.20/work/hedgewars-0.9.20_build' > make[1]: *** [gameServer/CMakeFiles/hedgewars-server.dir/all] Error 2 > make[1]: *** Waiting for unfinished jobs... emerge -1 dev-haskell/random helps.
(In reply to Fab from comment #42) > emerge -1 dev-haskell/random helps. Thanks, missed it.
Created attachment 388552 [details, diff] patch fixing the build w/ dev-lang/ghc-7.8.3 With dev-lang/ghc-7.8.3 build fails: [...] /tmp/paludis/games-strategy-hedgewars-0.9.20.5/work/hedgewars-src-0.9.20/gameServer/Actions.hs:565:30: Cannot instantiate unification variable `a0' with a type involving foralls: forall a. IO a -> IO a Perhaps you want ImpredicativeTypes In the first argument of `mask', namely `(forkIO . clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci)' In a stmt of a 'do' block: _ <- mask (forkIO . clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci) In the second argument of `($)', namely `do { ci <- addClient rnc cl; _ <- mask (forkIO . clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci); infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime cl)); return ci }' [...] See also: http://code.google.com/p/hedgewars/issues/detail?id=798
Created attachment 388554 [details] hedgewars-0.9.20.5.ebuild Here is my complete ebuild. It contains the previous patch and also: - 2 more haskell deps (dev-haskell/random, dev-haskell/parsec) - patch fixing build w/ dev-util/cmake-3.0, see bug #526624 - USE flag to make ffmpeg optional
0.9.21.1 has a few more dependencies: dev-haskell/sha dev-haskell/entropy dev-haskell/zlib Also, I think the haskell deps can be DEPEND instead of RDEPEND.
If somebody is not aware, fixed ebuild is in games-overlay (https://github.com/hasufell/games-overlay).
Created attachment 506448 [details, diff] hedgewars-0.9.23.ebuild server patch Here's a patch against 0.9.23 ebuild to add optional server support.
(In reply to Dylan Simon from comment #48) > Created attachment 506448 [details, diff] [details, diff] > hedgewars-0.9.23.ebuild server patch > > Here's a patch against 0.9.23 ebuild to add optional server support. Works perfectly here on ~amd64 with profile 17.0 and gcc 7.2, no need for overlays. Thanks a lot.
hedgewars 0.9.23 needs both these patches for being able to build server: https://hg.hedgewars.org/hedgewars/rev/31615a2e0db1 https://hg.hedgewars.org/hedgewars/rev/e9caada3aac1
Created attachment 527884 [details] 0.9.24 ebuild with server support As others made before, here is what should be the ebuild with local server support.
commit 658c4d77a103e272be6dd82f031f5754fb3e16c2 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: Thu Apr 19 09:59:32 2018 games-strategy/hedgewars: Bump to version 0.9.24.1 Closes: https://github.com/gentoo/gentoo/pull/8057