Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388441 - Ebuild request games-strategy/liquidwar6
Summary: Ebuild request games-strategy/liquidwar6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 12:41 UTC by Samuel Bauer
Modified: 2013-10-02 21:28 UTC (History)
3 users (show)

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


Attachments
liquidwar6-0.0.11_beta.ebuild (liquidwar6-0.0.11_beta.ebuild,6.32 KB, text/plain)
2011-10-25 12:41 UTC, Samuel Bauer
Details
liquidwar6-libpng-1.5.patch (liquidwar6-libpng-1.5.patch,5.44 KB, text/plain)
2011-10-25 12:44 UTC, Samuel Bauer
Details
liquidwar6-0.0.13_beta.ebuild (liquidwar6-0.0.13_beta.ebuild,6.29 KB, text/plain)
2012-03-20 15:44 UTC, Samuel Bauer
Details
liquidwar6-0.0.13_beta.ebuild (file_388441.txt,205 bytes, text/plain)
2013-09-19 23:52 UTC, Samuel Bauer
Details
liquidwar6-9999.ebuild (liquidwar6-9999.ebuild,3.46 KB, text/plain)
2013-09-19 23:54 UTC, Samuel Bauer
Details
liquidwar6-0.0.13_beta.ebuild (liquidwar6-0.0.13_beta.ebuild,2.81 KB, text/plain)
2013-09-19 23:59 UTC, Samuel Bauer
Details
liquidwar6-9999.ebuild (liquidwar6-9999.ebuild,3.50 KB, text/plain)
2013-09-27 21:07 UTC, Samuel Bauer
Details
liquidwar6-9999.ebuild (liquidwar6-9999.ebuild,3.54 KB, text/plain)
2013-09-28 01:55 UTC, Samuel Bauer
Details
liquidwar6-0.0.13_beta-autotools.patch (liquidwar6-0.0.13_beta-autotools.patch,2.75 KB, patch)
2013-09-28 13:00 UTC, Samuel Bauer
Details | Diff
liquidwar6-0.0.13_beta.ebuild (liquidwar6-0.0.13_beta.ebuild,2.41 KB, text/plain)
2013-09-28 13:01 UTC, Samuel Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Bauer 2011-10-25 12:41:30 UTC
Created attachment 290791 [details]
liquidwar6-0.0.11_beta.ebuild

A unique multiplayer games
Comment 1 Samuel Bauer 2011-10-25 12:44:12 UTC
Created attachment 290793 [details]
liquidwar6-libpng-1.5.patch

Patch to build liquidwar using =libpng-1.5.*

See: https://savannah.gnu.org/bugs/index.php?34614
Comment 2 Samuel Bauer 2012-03-20 15:44:58 UTC
Created attachment 306003 [details]
liquidwar6-0.0.13_beta.ebuild

Version bump for liquidwar6

no more patching required for libpng-1.5
flag: csound (in portage tree)
Comment 3 Piotr Szymaniak 2012-03-30 21:32:48 UTC
Works fine here, thanks. (:
Comment 4 Markus Walter 2013-04-19 16:58:20 UTC
Liquid War6 seems to have a hard dependency on <=libpng-1.5 which is already patched from <=libpng-1.4. Now that libpng-1.6 is in tree this needs another fix. At least this should be explicitly specified in the ebuild.
Comment 5 Samuel Bauer 2013-05-08 16:26:28 UTC
I'll take a look. But it'll be hard to do it fast. Sorry for the inconvenience.
Comment 6 Samuel Bauer 2013-09-19 23:52:15 UTC
Created attachment 359070 [details]
liquidwar6-0.0.13_beta.ebuild
Comment 7 Samuel Bauer 2013-09-19 23:54:40 UTC
Created attachment 359072 [details]
liquidwar6-9999.ebuild

VCS ebuild
Comment 8 Samuel Bauer 2013-09-19 23:59:32 UTC
Created attachment 359076 [details]
liquidwar6-0.0.13_beta.ebuild

In reply to #comment4

At least should be specified in the ebuild


Sandbox violation at install time are avoided using emake -j1, using make install rather than one by one instructions in the ebuild.
Comment 9 Samuel Bauer 2013-09-27 21:07:06 UTC
Created attachment 359650 [details]
liquidwar6-9999.ebuild
Comment 10 Julian Ospald 2013-09-27 21:51:15 UTC
* games.eclass always last in inherit line
* order deps alphabetically and the useflag dependencies last ordered by useflag names
* put REQUIRED_USE directly after IUSE
* for the non-live ebuild do a newline before the useflag conditional
  link
* missing die on "cd" and "sed" in many places, in some places you
  forgot the "die" and just appended a string
* myconf syntax is horrible, just do:
  egamesconf $(use_enable nls) ...
  the only one that actually needs the myconf syntax is
    myconf="${myconf} --enable-silent"
  ...the rest can be realized like this:
    $(usex opengl "$(use_enable gtk)" "--disable-gtk --enable-headless")
* we don't really need to cd back to ${S} or ${S}/${PN} when we are at
  the end of the phase
* egamesconf and emake already have error handling, no need to "die" there
* instead of your find construct do this: "find . -name README -delete"
  (do not forget the dot)
* ${GAMES_DATADIR_BASE} usage looks fishy.. just use "/usr/share"
* you are missing some quotes, e.g. on "${D}${GAMES_PREFIX}" (both variables
  can contain whitespace, since they are user controlled)
* use allinone && rm -r ${D}${GAMES_PREFIX}/include || die <- that is wrong
  in multiple ways. 1) it will die when allinone useflag is disabled, 2)
  it will break for users who manually want to run the src_install phase
  twice... so better do "rm -f" and omit the "|| die"
* libpng is missing a slot... only slot 0 provides headers! The rest are
  only for binary compatibility.
* use virtual/opengl instead of media-libs/mesa unless you need to depend on
  some fancy useflags, so do: opengl? ( virtual/opengl )
* I think the intl and iconv useflags are misinterpreted here... afais they are
  only to specify search dirs
* nls should depend (build time) on gettext
* autotools already adds libtool dep
* do not depend directly on sys-devel/gcc[openmp] but use something like this:
pkg_setup() {
  if use openmp; then
    if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp ; then
      ewarn "OpenMP is not available in your current selected gcc"
      die "need openmp capable gcc"
    fi
  fi
  games_pkg_setup
}

last but not least: we really need a solution for libpng-1.6... before that we can't really import it
Comment 11 Julian Ospald 2013-09-27 21:59:41 UTC
I forgot: ofc the openmp checks need toolchain-funcs.eclass
Comment 12 Samuel Bauer 2013-09-28 01:55:21 UTC
Created attachment 359656 [details]
liquidwar6-9999.ebuild

Thank you for comments hasufell

Compile and links fine using libpng1.6 (only minor changes to configure.ac)
Comment 13 Julian Ospald 2013-09-28 11:44:20 UTC
* no stable keywords
* try to avoid REQUIRED_USE usage when possible, it was originally meant
  to avoid broken setups in conjunction with libraries, not to mark logically
  connections between useflags in general (those connections can be put in
  metadata.xml if needed)
* you missed some spots of "cd foo || die"
* those seds look ugly... ok, this is a live ebuild so you have a point,
  but for non-live ebuilds this should definitely be a patch
* games.eclass is still not last in inherit line (yes, you need to so
  git-2_src_unpack manually then)
* afais the linguas_* variables do nothing?
* "emake foo install" in src_install still have a "|| die", but don't need it
* emake has a "-C <dir>" option, so some of those "cd <dir> ; emake" can be
  converted to "emake -C <dir>"
* usually virtual/libintl should be behind "nls" useflag too here
* did you test that sdl-image does not need ANY useflag? It might need jpeg,
  png or something depending on the image format of the game, you have to
  manually check that
Comment 14 Julian Ospald 2013-09-28 11:52:25 UTC
almost missed that:
* no stable keywords in general in new ebuilds
* for live ebuilds KEYWORDS variable must be _empty_
Comment 15 Samuel Bauer 2013-09-28 13:00:17 UTC
Created attachment 359686 [details, diff]
liquidwar6-0.0.13_beta-autotools.patch

libpng1.6 autotools + ldconfig removal patch
Comment 16 Samuel Bauer 2013-09-28 13:01:59 UTC
Created attachment 359688 [details]
liquidwar6-0.0.13_beta.ebuild

Still need to check sdl-image flags
Comment 17 Julian Ospald 2013-09-30 12:16:47 UTC
*liquidwar6-0.0.13_beta (30 Sep 2013)

  30 Sep 2013; Julian Ospald <hasufell@gentoo.org>
  +liquidwar6-0.0.13_beta.ebuild, +files/liquidwar6-0.0.13_beta-ldconfig.patch,
  +files/liquidwar6-0.0.13_beta-libpng-1.6.patch,
  +files/liquidwar6-0.0.13_beta-paths.patch, +metadata.xml:
  initial import wrt #388441 based on Samuel Bauers ebuilds


I changed a lot and removed useflags which are either somewhat broken due to this being beta or useless.

We shouldn't provide every configure switch there is... only those that make sense and work. E.g. csound is definitely broken.
Comment 18 Samuel Bauer 2013-10-02 20:54:18 UTC
In reply to comment #13

About the pruned flags:

csound: best to skip it if it's broken.
opengl: it's the only rendering modules in 0.0.13beta, but in live version, there are also two other renderers. will have to be reintroduced in future version
http: only enables network gaming, maybe some people find useful to disable it.

allinone: Why pruning this flag ? Live project now uses this by default. Here the project is built using shared libraries, but yet nothing else uses them. Maybe a good idea to enable a monolithic build (even better default +allinone). It would also be meaningful to purge headers when using this.

Thanks for the commit, game's author seems pleased too.
Comment 19 Julian Ospald 2013-10-02 21:07:20 UTC
(In reply to Samuel BAUER from comment #18)
> In reply to comment #13
> 
> allinone: Why pruning this flag ? Live project now uses this by default.
> Here the project is built using shared libraries, but yet nothing else uses
> them. Maybe a good idea to enable a monolithic build (even better default
> +allinone). It would also be meaningful to purge headers when using this.
> 

What's the gain? I'd just leave configure defaults for such things unless I see a good reason to change it. So we either force it or leave it as is. But a useflag doesn't really make sense to me at this point.
Comment 20 Samuel Bauer 2013-10-02 21:28:22 UTC
The gain is only about user choice, even too much choice tends to be quite messy sometimes and moreover harder to maintain.
Just leave things as they are.

P.S.: I should check better before, allinone isn't by default with the live sources, it was just my own default