Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247114 - games-strategy/hedgewars: enhanced ebuild for server support
Summary: games-strategy/hedgewars: enhanced ebuild for server support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement with 2 votes (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 441686
  Show dependency tree
 
Reported: 2008-11-16 19:25 UTC by Mario Kicherer
Modified: 2018-04-19 10:13 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild with server support (hedgewars-0.9.7.ebuild,1.26 KB, text/plain)
2008-11-16 19:26 UTC, Mario Kicherer
Details
New ebuild for hedgewars-0.9.8 (hedgewars-0.9.8.ebuild,1.21 KB, text/plain)
2009-01-09 21:36 UTC, Mario Kicherer
Details
New ebuild for hedgewars 0.9.8 (hedgewars-0.9.8.ebuild,1.17 KB, text/plain)
2009-01-09 23:04 UTC, Mario Kicherer
Details
Ebuild for Hedgewars 0.9.9 (hedgewars-0.9.9.ebuild,1.17 KB, text/plain)
2009-01-21 23:14 UTC, Mario Kicherer
Details
new version with the server flag support (hedgewars-0.9.11-r1.ebuild,1.53 KB, text/plain)
2009-06-06 12:44 UTC, Guillaume BINET
Details
hedgewars-0.9.12.ebuild w/ hedgewars-server (hedgewars-0.9.12.ebuild,1.50 KB, text/plain)
2010-01-09 18:08 UTC, Daniel Douglas
Details
ebuild for 0.9.13 w/ server support (hedgewars-0.9.13.ebuild,1.53 KB, text/plain)
2010-06-03 10:23 UTC, Petr Zima
Details
Fixed ghc dep to >=dev-lang/ghc-6.10.4-r1 (hedgewars-0.9.13.ebuild,1.54 KB, text/plain)
2010-09-21 19:11 UTC, Petr Zima
Details
ebuild for 0.9.14.1 w/ server support (hedgewars-0.9.14.1.ebuild,1.57 KB, text/plain)
2010-12-05 11:02 UTC, Petr Zima
Details
ebuild for 0.9.15 w/ server support. (hedgewars-0.9.15.ebuild,1.65 KB, text/plain)
2011-01-26 20:57 UTC, Petr Zima
Details
hedgewars-0.9.16.ebuild (hedgewars-0.9.16.ebuild,1.66 KB, text/plain)
2011-09-20 09:36 UTC, Mike Limansky
Details
hedgewars-0.9.16.ebuild: fixed hslogger dep (hedgewars-0.9.16.ebuild,1.69 KB, text/plain)
2011-10-27 20:12 UTC, Petr Zima
Details
hedgewars-0.9.17.ebuild (hedgewars-0.9.17.ebuild,1.79 KB, text/plain)
2011-12-11 13:53 UTC, Petr Zima
Details
build failure on a stable x86 (build.log,50.33 KB, text/plain)
2012-01-24 14:57 UTC, Fab
Details
hedgewars-0.9.17.ebuild: fixed network dep (hedgewars-0.9.17.ebuild,1.80 KB, text/plain)
2012-07-08 13:06 UTC, Petr Zima
Details
hedgewars-0.9.18-r2.ebuild (hedgewars-0.9.18-r2.ebuild,2.09 KB, text/plain)
2012-11-04 04:54 UTC, Alec Moskvin
Details
Patch against hedgewars-0.9.18-r1.ebuild (hedgewars-0.9.18-r2.patch,1.11 KB, patch)
2012-11-04 04:55 UTC, Alec Moskvin
Details | Diff
Patch for dev-haskell/bytestring-show-0.3.5.4 (hedgewars-0.9.18-bytestring.patch,361 bytes, text/plain)
2013-03-02 15:02 UTC, Petr Zima
Details
hedgewars-0.9.20.ebuild (hedgewars-0.9.20.ebuild,2.19 KB, text/plain)
2013-12-29 17:59 UTC, Mike Limansky
Details
patch fixing the build w/ dev-lang/ghc-7.8.3 (hedgewars-0.9.20.5-ghc-7.8.patch,627 bytes, patch)
2014-11-04 21:54 UTC, Petr Zima
Details | Diff
hedgewars-0.9.20.5.ebuild (hedgewars-0.9.20.5.ebuild,2.59 KB, text/plain)
2014-11-04 21:59 UTC, Petr Zima
Details
hedgewars-0.9.23.ebuild server patch (hedgewars-0.9.23.ebuild.patch,1.31 KB, patch)
2017-11-24 18:42 UTC, Dylan Simon
Details | Diff
0.9.24 ebuild with server support (hedgewars-0.9.24-r1.ebuild,2.63 KB, text/plain)
2018-04-17 20:06 UTC, Quentin Retornaz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Kicherer 2008-11-16 19:25:24 UTC
Hedgewars provides a server component for multiplayer games over network. This enhanced ebuild adds in-game and dedicated server support.

Reproducible: Always
Comment 1 Mario Kicherer 2008-11-16 19:26:12 UTC
Created attachment 172016 [details]
Ebuild with server support
Comment 2 Mario Kicherer 2009-01-09 21:36:59 UTC
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.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2009-01-09 21:59:58 UTC
This isn't what the dedicated use flag means.  For USE=dedicated it should just build the server.
Comment 4 Mario Kicherer 2009-01-09 23:04:42 UTC
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.
Comment 5 Mario Kicherer 2009-01-21 23:14:58 UTC
Created attachment 179239 [details]
Ebuild for Hedgewars 0.9.9

Just a bump for the new version. Tested on a amd64 machine.
Comment 6 Guillaume BINET 2009-06-06 12:44:05 UTC
Created attachment 193714 [details]
new version with the server flag support
Comment 7 Guillaume BINET 2009-06-06 12:49:51 UTC
You will need only one package from the haskell overlay : dev-haskell/utf8-string
Comment 8 Ludovic Gasc (GMLudo) 2009-07-11 15:05:32 UTC
Somebody from Gentoo Games could add this FLAG in the portage tree ?

Thank you very much.
Comment 9 James Le Cuirot gentoo-dev 2009-09-20 14:34:43 UTC
I also needed to get bytestring and dataenc from the Haskell overlay.
Comment 10 Mike Limansky 2009-10-15 08:52:55 UTC
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.
Comment 11 Tristan Heaven (RETIRED) gentoo-dev 2009-10-15 14:52:09 UTC
You should probably ask about it on #gentoo-haskell or mail haskell@gentoo.org
Comment 12 Ivan 2009-10-16 07:33:43 UTC
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).
Comment 13 Ivan 2009-10-16 07:35:44 UTC
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.
Comment 14 Daniel Douglas 2010-01-09 18:08:45 UTC
Created attachment 215838 [details]
hedgewars-0.9.12.ebuild w/ hedgewars-server

Tested on amd64 with ghc 6.12.1
Comment 15 bugs 2010-04-09 19:10:23 UTC
Mind updating this for 0.9.13 (which includes server changes for things like flags).
Comment 16 Petr Zima 2010-06-03 10:23:03 UTC
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.
Comment 17 Patryk Szalanski 2010-09-19 16:19:39 UTC
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

Comment 18 Patryk Szalanski 2010-09-19 16:20:59 UTC
Oh, I used ghc 6.8.2, I will update it and report back if it made any change.
Comment 19 Petr Zima 2010-09-21 19:11:06 UTC
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.
Comment 20 Petr Zima 2010-12-05 11:02:19 UTC
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.
Comment 21 Mike Limansky 2010-12-06 13:41:10 UTC
(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.
Comment 22 Petr Zima 2011-01-26 20:57:13 UTC
Created attachment 260811 [details]
ebuild for 0.9.15 w/ server support.

Again tested on the two machines as before.
Comment 23 Christian Loosli 2011-08-06 15:26:06 UTC
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
Comment 24 Mike Limansky 2011-09-20 09:36:53 UTC
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.
Comment 25 Petr Zima 2011-10-27 20:12:23 UTC
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
Comment 26 Petr Zima 2011-12-11 13:53:36 UTC
Created attachment 295465 [details]
hedgewars-0.9.17.ebuild

Version bump. Tested on ~x86 (up to date) + gentoo-haskell overlay.
Comment 27 Petr Zima 2011-12-11 14:59:35 UTC
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.
Comment 28 Petr Zima 2011-12-11 21:49:10 UTC
(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?
Comment 29 Fab 2012-01-24 14:57:12 UTC
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
Comment 30 Petr Zima 2012-07-08 13:02:14 UTC
(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.
Comment 31 Petr Zima 2012-07-08 13:06:41 UTC
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 ;)
Comment 32 Fab 2012-07-09 14:21:34 UTC
(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)
Comment 33 Mike Limansky 2012-07-09 14:37:09 UTC
(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.
Comment 34 Alec Moskvin 2012-11-04 04:54:50 UTC
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).
Comment 35 Alec Moskvin 2012-11-04 04:55:56 UTC
Created attachment 328272 [details, diff]
Patch against hedgewars-0.9.18-r1.ebuild
Comment 36 Julian Ospald 2012-11-04 17:41:35 UTC
you could also support HCFLAGS variable for haskell (although they are rarely used)

-DGHFLAGS="${HCFLAGS}"
Comment 37 Fab 2012-12-07 08:16:36 UTC
(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.
Comment 38 Julian Ospald 2012-12-07 15:38:12 UTC
(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.
Comment 39 Fab 2012-12-07 16:03:35 UTC
(In reply to comment #38)
> they are in portage.

Ah thanks, I had not seen that 0.9.18-r1 was commited into portage.
Comment 40 Petr Zima 2013-03-02 15:02:20 UTC
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.
Comment 41 Mike Limansky 2013-12-29 17:59:42 UTC
Created attachment 366466 [details]
hedgewars-0.9.20.ebuild

Ebuild for 0.9.20 is attached. No additional patches are required.
Comment 42 Fab 2013-12-30 09:37:38 UTC
(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.
Comment 43 Mike Limansky 2013-12-30 10:29:52 UTC
(In reply to Fab from comment #42)
> emerge -1 dev-haskell/random helps.

Thanks, missed it.
Comment 44 Petr Zima 2014-11-04 21:54:27 UTC
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
Comment 45 Petr Zima 2014-11-04 21:59:49 UTC
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
Comment 46 myoung008 2015-02-19 00:18:11 UTC
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.
Comment 47 Jauhien Piatlicki (RETIRED) gentoo-dev 2015-07-01 22:15:02 UTC
If somebody is not aware, fixed ebuild is in games-overlay (https://github.com/hasufell/games-overlay).
Comment 48 Dylan Simon 2017-11-24 18:42:26 UTC
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.
Comment 49 raffaele 2018-01-07 15:24:09 UTC
(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.
Comment 50 Quentin Retornaz 2018-03-28 15:22:49 UTC
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
Comment 51 Quentin Retornaz 2018-04-17 20:06:33 UTC
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.
Comment 52 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-04-19 10:13:53 UTC
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