Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149101 - games-strategy/heroes3-1.3.1a-r3.ebuild (Update)
Summary: games-strategy/heroes3-1.3.1a-r3.ebuild (Update)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: games.eclass
  Show dependency tree
 
Reported: 2006-09-25 11:36 UTC by José María Fernández González
Modified: 2019-12-09 03:54 UTC (History)
6 users (show)

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


Attachments
heroes3-1.3.1a-r2.ebuild (heroes3-1.3.1a-r2.ebuild,5.80 KB, text/plain)
2006-09-25 11:39 UTC, José María Fernández González
Details
Added ppc architecture. (heroes3-1.3.1a-r3.ebuild,6.05 KB, text/plain)
2008-11-30 22:46 UTC, Thomas Juerges
Details
working l10n, amd64 & ppc support (heroes3-1.3.1a-r3.ebuild,6.05 KB, text/plain)
2009-04-28 00:19 UTC, Michał Górny
Details
Updated wrapper for heroes3 (static) (heroes3-wrapper.sh,201 bytes, text/plain)
2009-05-03 18:50 UTC, José María Fernández González
Details
New wrapper for heroes3 (dynamic) (heroes3-wrapper-dynamic.sh,294 bytes, text/plain)
2009-05-03 18:51 UTC, José María Fernández González
Details
heroes3-1.3.1a-r3.ebuild (based on Michał Górny's work) (heroes3-1.3.1a-r3.ebuild,6.55 KB, text/plain)
2009-05-03 19:24 UTC, José María Fernández González
Details
heroes3-1.3.1a-r3.ebuild (based on Michał Górny's work and recommendations) (heroes3-1.3.1a-r3.ebuild,6.89 KB, text/plain)
2009-05-03 21:21 UTC, José María Fernández González
Details
New wrapper for heroes3 (dynamic) (heroes3-1.3.1a-r3.ebuild,6.89 KB, text/plain)
2009-05-04 21:44 UTC, José María Fernández González
Details
libsmjpeg-0.2.so.0 (x86, -O2) (libsmjpeg-0.2.so.0,141.54 KB, application/octet-stream)
2009-05-04 21:45 UTC, José María Fernández González
Details
lib-compat-loki-0.3.ebuild (with libsmjpeg-0.2.so.0 included) (lib-compat-loki-0.3.ebuild,954 bytes, text/plain)
2011-04-11 21:36 UTC, Andrew Oleynik
Details
heroes3-1.3.1a-r4.ebuild (no more static version) (heroes3-1.3.1a-r4.ebuild,5.30 KB, text/plain)
2011-04-11 21:39 UTC, Andrew Oleynik
Details
New dynamic wrapper for heroes3 (more generic) (heroes3-wrapper.sh,392 bytes, text/plain)
2011-04-11 21:41 UTC, Andrew Oleynik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José María Fernández González 2006-09-25 11:36:25 UTC
Hi!

Please find attached heroes3-1.3.1a-r2.ebuild, so it can be localized to Spanish, German and Polish. You can find how to localize Heroes 3 at https://babelize.org/. This ebuild is based on heroes3-1.3.1a-r1.ebuild, so it also depends on existing ${FILESDIR}/heroes3-wrapper.sh

Jos
Comment 1 José María Fernández González 2006-09-25 11:36:25 UTC
Hi!

Please find attached heroes3-1.3.1a-r2.ebuild, so it can be localized to Spanish, German and Polish. You can find how to localize Heroes 3 at https://babelize.org/. This ebuild is based on heroes3-1.3.1a-r1.ebuild, so it also depends on existing ${FILESDIR}/heroes3-wrapper.sh

José María
Comment 2 José María Fernández González 2006-09-25 11:39:02 UTC
Created attachment 98047 [details]
heroes3-1.3.1a-r2.ebuild
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-10-05 15:18:54 UTC
https://babelize.org/download does not seem to be working correctly.
Comment 4 Anton Romanov 2007-11-05 10:24:40 UTC
(In reply to comment #3)
> https://babelize.org/download does not seem to be working correctly.
> 

seems to work now
Comment 5 Thomas Juerges 2008-11-30 22:46:46 UTC
Created attachment 173899 [details]
Added ppc architecture.

I added the possibility to install Heroes3 on PPC.  Please consider this ebuild file for future inclusion in Gentoo.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-04-28 00:19:39 UTC
Created attachment 189660 [details]
working l10n, amd64 & ppc support

And another ebuild for Heroes3:

* based off current portage ebuild,
* updated, working l10n (tested de/pl/ru),
* included PPC stuff from Thomas Juerges ebuild (untested),
* updated to work on multilib amd64.
Comment 7 José María Fernández González 2009-05-03 18:50:51 UTC
Created attachment 190242 [details]
Updated wrapper for heroes3 (static)

Updated wrapper for heroes3. This one is for the static version.
Comment 8 José María Fernández González 2009-05-03 18:51:34 UTC
Created attachment 190243 [details]
New wrapper for heroes3 (dynamic)

New wrapper for heroes3 (dynamic version)
Comment 9 José María Fernández González 2009-05-03 19:24:59 UTC
Created attachment 190246 [details]
heroes3-1.3.1a-r3.ebuild (based on Michał Górny's work)

I have taken as base Micha? Górny's work, and one improvement is support for dynamically linked version of heroes3 (which works better in my system). This ebuild also keeps previous hiscore.dat file, so it is not lost between reinstalls.
Comment 10 José María Fernández González 2009-05-03 19:39:17 UTC
I have been working on heroes3 dynamic support because I have found a couple of problems which did not happen with my previous laptop 3 years ago.

First one is related to video mode. My current laptop has a NVidia graphics card, and I'm using latest stable nvidia-drivers driver. The problem is that the driver publishes several 800x600 modes, and one of them is double scan. Statically linked heroes3 uses an old libsdl library, whose video mode selection algorithm is different from the one used by libsdl in Gentoo (basically it reverts the order). So, depending on hardware, driver and available video modes, people may prefer using the dynamic heroes3 instead of the static one.

Second one is the sound. If I run heroes3 (static) in my system as a normal user, I get next message:

Couldn't open audio:

but there is no problem when I tried it as root! With the dynamic version of heroes3 I have no sound problems. I guess the problems I'm suffering with the static version are related to an ESD misconfiguration in my laptop (esdplay plays for root, but not for my user), and dynamic one is working because I compiled libsdl with alsa support and I force it (using SDL_AUDIODRIVER envvar).
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-05-03 19:43:39 UTC
Few comments about the dynamic version:
1) I think it should be USE-dependant,
2) the RDEPEND for dynamic version is incomplete,
3) on AMD64 it even can't be complete, because we have no 32-bit smjpeg, and crosscompiling packages using libtool is painful,
4) and even if I install the 32-bit smjpeg, heroes3.dynamic segfaults.
Comment 12 José María Fernández González 2009-05-03 21:21:26 UTC
Created attachment 190266 [details]
heroes3-1.3.1a-r3.ebuild (based on Michał Górny's work and recommendations)

A revised version of my previous ebuild, based on Micha? Górny's recommendations: a USE flag for dynamic heroes3 executable, and missing RDEPEND dependencies. It remains the amd64 issue related to 32-bit smjpeg.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-05-03 21:49:55 UTC
Firstly, what about PPC dynamic version? Is there one? If it is, we should probably put same RDEPENDs as with x86. If there isn't and the user set 'dynamic', we should either die in pkg_setup or warn user there and don't install the wrapper then.

Also, I don't we should place both scripts in ${FILESDIR], especially because we already use sed on both of them. I think we should instead place only one version, and modify it appriopriately with sed.

And the last thing - I don't like the way we're handling l10n there. It's way too much code - but I don't currently have an idea how to make it better.
Comment 14 José María Fernández González 2009-05-03 22:04:31 UTC
If you have access to a Linux Gentoo ppc installation, you are free to check/fix/improve the ebuild. About smjpeg and amd64, I have to do some tests next week. I think the solution should involve an update of sys-libs/lib-compat-loki, so proper smjpeg pre-compiled library is included.

And as I explained in a previous post, static and dynamic behave a bit different (due the statically linked stuff), and one of them can work better on some systems than the other one. So, IMHO I would provide both executable versions (they do not collide).
Comment 15 Thomas Juerges 2009-05-03 22:06:38 UTC
(In reply to comment #13)
> Firstly, what about PPC dynamic version? Is there one? If it is, we should
> probably put same RDEPENDs as with x86. If there isn't and the user set
> 'dynamic', we should either die in pkg_setup or warn user there and don't
> install the wrapper then.

There is a patch for the dynamic ppc version available (dotsrc link, then
heroes3-dynamic-1.3.1-ppc.run) but it obviously needs sys-libs/lib-compat-loki which  is not available for ppc.  And hence the libs in sys-libs/lib-compat-loki are all binary and for x86 and/or amd64 architectures only, it is impossible to make them work on ppc.

Therefore I suggest that the dynamic is limited to x86 || amd64 only.
Comment 16 José María Fernández González 2009-05-04 21:42:36 UTC
I have been doing some tests with a dual-head, quad Opteron workstation (with Gentoo amd64). Static binary worked with no problem. About the dynamic version of heroes, I copied the libsmjpeg-0.2.so.0 file from my Gentoo x86 laptop to /opt/heroes3, and it worked! Also, I have found a way to restrict the game to only one of the screens when dynamic version is used, using SDL_VIDEO_FULLSCREEN_HEAD variable.

I'm going to upload x86 compiled (with -O2) libsmjpeg library.
Comment 17 José María Fernández González 2009-05-04 21:44:38 UTC
Created attachment 190356 [details]
New wrapper for heroes3 (dynamic)

This wrapper takes into account SDL and Xinerama interactions for dynamic version of heroes3
Comment 18 José María Fernández González 2009-05-04 21:45:19 UTC
Created attachment 190357 [details]
libsmjpeg-0.2.so.0 (x86, -O2)
Comment 19 José María Fernández González 2009-05-04 21:47:50 UTC
(In reply to comment #15)
> (In reply to comment #13)
> > Firstly, what about PPC dynamic version? Is there one? If it is, we should
> > probably put same RDEPENDs as with x86. If there isn't and the user set
> > 'dynamic', we should either die in pkg_setup or warn user there and don't
> > install the wrapper then.
> 
> There is a patch for the dynamic ppc version available (dotsrc link, then
> heroes3-dynamic-1.3.1-ppc.run) but it obviously needs sys-libs/lib-compat-loki
> which  is not available for ppc.  And hence the libs in
> sys-libs/lib-compat-loki are all binary and for x86 and/or amd64 architectures
> only, it is impossible to make them work on ppc.
> 
> Therefore I suggest that the dynamic is limited to x86 || amd64 only.

I think you could get the needed ppc libraries (mainly libsmpeg) using an ancient version of gcc. I have digged on loki-compat libsmpeg, and it is compiled with gcc/g++ 2.95.2 or 2.95.3, and it was generated from C++ code.
Comment 20 José María Fernández González 2009-07-19 21:21:22 UTC
From bug 247961 I have learned that media-libs/smjpeg is being removed from Portage tree on September 19th if no package depends on it. So, a dynamic version of heroes3 should either depend on smjpeg or compile its own copy of smjpeg.
Comment 21 Thomas Juerges 2009-10-22 12:40:43 UTC
(In reply to comment #19)
> I think you could get the needed ppc libraries (mainly libsmpeg) using an
> ancient version of gcc. I have digged on loki-compat libsmpeg, and it is
> compiled with gcc/g++ 2.95.2 or 2.95.3, and it was generated from C++ code.
 
I don't think so.  That means that a user has to install an ancient version of GCC just to compile a bunch of ancient libs just to run heroes3 dynamically on PPC.  This is really asking for a little bit too much.  I suggest not allowing USE=dynamic on PPC.

Cheers,
Comment 22 Andrew Oleynik 2011-04-11 21:36:55 UTC
Created attachment 269553 [details]
lib-compat-loki-0.3.ebuild (with libsmjpeg-0.2.so.0 included)

Well, I hope it's not too bad to resurrect this old bug.

I have a suggestion to include pre-compiled libsmjpeg-0.2.so.0 (which is anyway needed to play the game) in, say, lib-compat-loki-0.3. I've done so on my computer locally, using the library from this bug, and that's much more convenient than putting it in place manually.
Comment 23 Andrew Oleynik 2011-04-11 21:39:00 UTC
Created attachment 269555 [details]
heroes3-1.3.1a-r4.ebuild (no more static version)

Also, I made some (hopefully) improvements to the heroes3 ebuild, removing "dynamic" USE flag (doubt if there're still any gentoo system old enough to run static version; maybe that's just wrong, though), making the localization code more accurate and changing dependency on xdelta from 'versioned' to slotted.

I don't know exactly if it was an useful work, but I decided to share it anyway.
Comment 24 Andrew Oleynik 2011-04-11 21:41:55 UTC
Created attachment 269557 [details]
New dynamic wrapper for heroes3 (more generic)

I've changed the dynamic wrapper just a bit to make it look more generic.
Comment 25 Nick Leippe 2014-06-18 05:59:01 UTC
Just tried to install this. The current ebuild fails to find the patch.dat file for loki_patch. Commenting it out lets the emerge succeed, the game runs, but fullscreen doesn't work, which from other comments sounds like one of the issues that the patch.dat resolves. I'm not sure where the file is supposed to come from.

This is on amd64 multilib.
Comment 26 Mr. Bones. (RETIRED) gentoo-dev 2015-04-29 06:00:40 UTC
I'd be interested in an ebuild that didn't use the app-emulation/emul-linux stuff.
Comment 27 Pacho Ramos gentoo-dev 2018-05-02 17:28:59 UTC
this would need to be updated for eapi6 and stop using games.eclass
Comment 28 Arfrever Frehtes Taifersar Arahesis 2019-12-09 03:54:54 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=010852d13e7f1c59bc11ab2e3efe806dfacebaf4

commit 010852d13e7f1c59bc11ab2e3efe806dfacebaf4
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2019-12-08 21:13:32 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2019-12-08 21:13:32 +0000

    games-*/*: drop last-rited pkgs
    
    Bug: https://bugs.gentoo.org/515926
    Bug: https://bugs.gentoo.org/510960
    
    Signed-off-by: Aaron Bauman <bman@gentoo.org>