Created attachment 316797 [details] cockatrice-20120624.ebuild - Main ebuild Cockatrice is an open-source multiplatform software for playing card games, such as Magic: The Gathering, over a network. It is fully client-server based to prevent any kind of cheating, though it supports single-player games without a network interface as well. Both client and server are written in Qt 4.
Created attachment 316799 [details] cockatrice-20120630-servatrice-cmakelists.patch
compiles and runs fine both with and without client. I recommend adding it to Portage. @Wiehann would write deps like this: RDEPEND=" >=x11-libs/qt-core-4.7.4 >=x11-libs/qt-sql-4.7.4 =dev-libs/libgcrypt-1.5* =dev-libs/protobuf-2.4* client? ( >=x11-libs/qt-multimedia-4.7.4 >=x11-libs/qt-svg-4.7.4 >=x11-libs/qt-gui-4.7.4 ) " DEPEND="${RDEPEND}" and using git-2 eclass you can also make a 9999 ebuild for <git://github.com/mbruker/Cockatrice>. N.B. you will probably need to git-2_src_unpack.
Created attachment 320112 [details] sunrise ebuild ebuild in sunrise unreviewed. tested with oldest version of libgcrypt and protobuf in Portage. looks to be working fine. using the patch posted in here. using skel.metadata.xml, but add this to pkgmetadata: <use> <flag name='client'>Build with client</flag> </use>
games.eclass has to be inherited AFTER cmake-utils.eclass see http://www.gentoo.org/proj/en/desktop/games/games-ebuild-howto.xml don't use "client" useflag, use an inverse method with "dedicated" useflag when you inherit games.eclass you should overwrite src_compile as follows: src_compile() { cmake-utils_src_compile } which will ensure cmake-utils variables to be respected like verbose build log. you don't call "prepgamesdirs" at the end of src_install which is VERY VERY BAD!
Created attachment 320274 [details] sunrise ebuild
Created attachment 320276 [details, diff] build patch
Created attachment 320278 [details, diff] underlinking patch
in portage.