Unofficial Exherbo ebuild (...of interest to Gentoo users)

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
leycec
Wayist
Posts: 20
Joined: Sun Feb 20, 2011 7:30 am

Unofficial Exherbo ebuild (...of interest to Gentoo users)

#1 Post by leycec »

First, mandatory hugs on a substantially well-done roguelike. 8)

Second, I've added an Exherbo-specific "exheres" (i.e., "ebuild" in Gentoo parlance) to my github-hosted Exherbo repository at:

https://github.com/leycec/exherbo-leyce ... like/tome4

Exherbo is a source-based Linux distro with purely cosmetic (...I assure you) similarities to acquaintance, occasional ally distro Gentoo. The above exheres successfully builds ToME4 in full with optional music support. It was, needless to say, a bit of an effort. And it's still not quite right. (More on that below.)

Gentoo users should be able to cobble together an unofficial ebuild from the above exheres with only a little effort. I applaud the effort. Though I no longer use Gentoo, I'd love to see ToME4 officially hit Portage.

I stumbled across a few roadblocks while cobbling together Exherbo support. Nothing too major, happily:

---------- EDIT ----------
libpng and refresh woes below were entirely my fault, I'm afraid. SDL and all SDL subcomponents required rebuilding. :oops:

All other comments stand as is. On to the permadeathing!
---------- EDIT end ----------
  • ToME4 fails under libpng >= 1.4.0. Actually, this was a bit major. Mostly because there were no configuration, compilation, or linker warnings or errors and the runtime error "t-engine" was spitting out wasn't particularly helpful. I'm afraid I didn't log it. I can certainly replicate it if anyone would like the exact text. Fortunately, downgrading to libpng 1.2 "fixed" it. :?
  • To mitigate this sort of sadness in the future, it would probably help if the howtocompile page enumerated the exact set of dependencies required for building under all systems. For example, Linux dependencies currently resemble:

    media-libs/SDL[>=1.2.0]
    media-libs/SDL_image[>=1.2.0]
    media-libs/SDL_mixer[>=1.2.0]
    media-libs/SDL_ttf[>=1.2.0]
    media-libs/freetype:2
    media-libs/jpeg
    media-libs/libpng[~>1.2.0]
    media-libs/libogg
    media-libs/libvorbis
    media-libs/smpeg
    media-libs/tiff
    x11-dri/mesa

    ...where ">=" means at least and "~>" means at least but not greater than the next major version (e.g., 1.2.0 and 1.2.45 are O.K., but 1.4.0 and 1.4.5 are not).
  • I'm having massive refresh issues. So much so that the startup "background" makes ToME4 initially unusable. Fortunately, I noted the "DISABLE BACKGROUND" button. (Handy.) That makes ToME4 playable, if by some sick definition of "playable" you mean plagued with refresh glitchiness. The crux of the problem appears to be that the entire window redraws on every refresh rather than merely that tile or tiles which needs redrawing. This occurs on every cursor movement and every game tick. While not game-killingly terminal, it is annoying. Unsurprisingly, disabling framebuffer and OpenGL shaders neither improved or degraded the lamentable situation. FPS is otherwise quite high, hovering about the 50FPS mark. I see no errors or warnings which might suggest the culprit. Incidentally (...or not), I am running bleeding edge (...but stable) versions of SDL, Mesa, libjpeg, and libtiff. I am not, however, running DirectFB. (Exherbo doesn't even have DirectFB.) I suspect SDL. Perhaps I'll try a full SDL reinstall, then downgrade when that inevitably doesn't change anything.
  • The Makefile doesn't supply an "install" target, meaning source-based distros have to hack up an installation process. This would be quite O.K. if the "t-engine" executable could be executed under the canonical location for Linux executables,

    Code: Select all

    /usr/bin/
    But it can't be, seemingly. So the above exheres hacks up a bash script manually cd-ing to the ToME4 tree and running "t-engine" from there as well as manually installing all relevant files and paths. What's relevant? I have no idea and neither does my exheres. Still, I think we got it right. Annoying? Yes. Installation-breaking? Probably not. :o
  • The default choice of 32x32 tiles seems a bit... underwhelming. Perhaps the default tileset could dynamically scale with resolution and/or hastily profiled CPU|GPU|RAM capability?
Have a warm, whimsically permadeath-frosted day - and cheers again on the Communal Good Work (tm).

Humbly yours,
Sess

P.s. For the Exherbo-inclined, the aesthetically flashy brogue roguelike is also available from the same Exherbo repository. Have @ you!
Last edited by leycec on Tue Feb 22, 2011 12:55 am, edited 3 times in total.

marvalis
Uruivellas
Posts: 683
Joined: Sun Sep 05, 2010 5:11 am

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#2 Post by marvalis »

:clap:

madmonk
Reaper
Posts: 2257
Joined: Wed Dec 12, 2007 12:21 am
Location: New Zealand

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#3 Post by madmonk »

Hi Sess

Welcome to the forum, and I have to say that is one of the best opening posts I have seen in a very long time! I have a feeling that this could be the start of a beautiful relationship!
Regards

Jon.

leycec
Wayist
Posts: 20
Joined: Sun Feb 20, 2011 7:30 am

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#4 Post by leycec »

Thanks for the warm welcome, Jon. :D

I'll be your Exherbo maintainer for the forseeable future. Though a bit bone-weary from master's thesis work, expect to see me loitering about during the precious off hours.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#5 Post by darkgod »

Hi, and welcome indeed :)

About the refresh issues, I find it quite strange, just about all opengl games fully redraw the screen every frame. Do you have a problem with those too ?
AKA: are you using a correct opengl driver or the mesa software renderer ?

As for installing it in /usr/bin there is support for that although it's not enabled by default.
The basic idea is :
  • edit bootstrap/boot.lua, change the first lines in the if __SELFEXE __ to set "dir" to the directory where all game data will be installed. I.e if you put data in: /usr/share/tome4/game/ then you need dir to be set to "/usr/share/tome4/"
  • create a zip of the bootstrap directory (so that inside the zip there is only "/bootstrap/boot.lua")
  • compile the game
  • concatenate the zip at the end of the executable
  • copy that new exe in /usr/bin
  • copy game data in their new home
It should then find its babies correctly
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

TheDevilWearsPravda
Wayist
Posts: 19
Joined: Wed Dec 29, 2010 2:56 am

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#6 Post by TheDevilWearsPravda »

leycec wrote:[*]ToME4 fails under libpng >= 1.4.0. Actually, this was a bit major. Mostly because there were no configuration, compilation, or linker warnings or errors and the runtime error "t-engine" was spitting out wasn't particularly helpful. I'm afraid I didn't log it. I can certainly replicate it if anyone would like the exact text. Fortunately, downgrading to libpng 1.2 "fixed" it. :?
I've got libpng 1.4.5 running Arch an no problems. I remember having to rebuild lots of stuff for libpng, maybe you need to rebuild SDL or something?
leycec wrote:[*]The Makefile doesn't supply an "install" target, meaning source-based distros have to hack up an installation process. This would be quite O.K. if the "t-engine" executable could be executed under the canonical location for Linux executables,

Code: Select all

/usr/bin/
But it can't be, seemingly. So the above exheres hacks up a bash script manually cd-ing to the ToME4 tree and running "t-engine" from there as well as manually installing all relevant files and paths. What's relevant? I have no idea and neither does my exheres. Still, I think we got it right. Annoying? Yes. Installation-breaking? Probably not. :o
The packaging scrips for Arch installs most files to /opt/tome4 try reading the PKGBUILD from ABS as a template https://aur.archlinux.org/packages/tome4/PKGBUILD

leycec
Wayist
Posts: 20
Joined: Sun Feb 20, 2011 7:30 am

Re: Unofficial Exherbo ebuild (...of interest to Gentoo user

#7 Post by leycec »

TheDevilWearsPravda wrote:I've got libpng 1.4.5 running Arch an no problems. I remember having to rebuild lots of stuff for libpng, maybe you need to rebuild SDL or something?
Odd. I specifically rebuilt SDL and family (e.g., "SDL_image", "SDL_ttf"), but no joy. I'll give it another go. Other SDL-based roguelikes leveraging PNGs currently work on my system (i.e., the most beautiful Unicode roguelike ev@r, "brogue"), which seems to suggest a deeper error. Curse you, shared library woes.
TheDevilWearsPravda wrote:The packaging scrips for Arch installs most files to /opt/tome4 try reading the PKGBUILD from ABS as a template https://aur.archlinux.org/packages/tome4/PKGBUILD
Thanks. Hacking together an "install" target wasn't that onerous. But it was unexpected. It'd be nice to have an official installation process. I'd submit a patch, but... *looks grimly at his master's progress*

Incidentally (...actually, not), my refresh woes have become much-much worse. When in towns, every tile except for building tiles (...odd, yes?) flicker spasmodically, "Battle Seizure Robots"-style. More testing required. Surely downshifting to the ASCII tileset will fix, no? As time allows, I'll post some grim details.

---------- EDIT ----------
Rebuilding SDL in entirety fixed all of my existing woes. And the dour peasants did cheer! I'll edit the OP to note this. Incidentally, this does suggest a "FAQ" on source-compiling ToME4 could be helpful. I'd recommend the following entry:

Q: ToME4 fails on start-up with a PNG error and/or starts up but tiles flicker. Help?
A: Rebuild SDL and all SDL subcomponents required by ToME4: SDL_image, SDL_mixer, and SDL_ttf.

Cheers again, all. :lol:

Post Reply