Gentoo ebuilds for vcmi 0.90

Hey guys,

I have created two ebuilds for VCMI that will let Gentoo users play the game. The first ebuild downloads and compiles the game engine (v0.90), and the second ebuild downloads and extracts core.zip, and indicates to the user how to get the game running. I have also created a patch for the problem I signaled here. I will soon add a third ebuild for users that want to compile the game from source directly. I hope it helps bring more HOMM3 lovers to VCMI.

As the attachment system did not seem to work last time, I have posted them on my github, but feel free to use them. I will let Gentoo admins integrate them into the official repositories as soon as possible.

To the devs: guys, you are doing a terrific job, keep up the good work :slight_smile:

Thanks for ebuild!

I’ve tried it yesterday (on amd64 arch) and it fails to compile:
CXX libvcmi_la-CCompressedStream.lo
CXX libvcmi_la-CBinaryReader.lo
CXX libvcmi_la-CFileInfo.lo
CXX libvcmi_la-CFileInputStream.lo
CXX libvcmi_la-CFilesystemLoader.lo
CXX libvcmi_la-CLodArchiveLoader.lo
CXX libvcmi_la-CMemoryStream.lo
CXX libvcmi_la-CResourceLoader.lo
CXX libvcmi_la-BattleAction.lo
In file included from CCreatureSet.h:6:0,
from BattleState.h:6,
from BattleAction.cpp:4:
CArtHandler.h:201:152: error: default argument for parameter of type ‘std::shared_ptr’ has type 'long int’
make[2]: *** [libvcmi_la-BattleAction.lo] Error 1
make[2]: *** Waiting for unfinished jobs…
make[2]: Leaving directory /var/tmp/portage/games-strategy/vcmi-0.90/work/vcmi-0.90/lib' make[1]: *** [all] Error 2 make[1]: Leaving directory/var/tmp/portage/games-strategy/vcmi-0.90/work/vcmi-0.90/lib’
make: *** [all-recursive] Error 1

  • ERROR: games-strategy/vcmi-0.90 failed (compile phase):
  • emake failed
  • If you need support, post the output of emerge --info '=games-strategy/vcmi-0.90',
  • the complete build log and the output of emerge -pqv '=games-strategy/vcmi-0.90'.
  • This ebuild is from an overlay named ‘x-custom’: ‘/usr/local/portage/custom/’
  • The complete build log is located at ‘/var/tmp/portage/games-strategy/vcmi-0.90/temp/build.log’.
  • The ebuild environment file is located at ‘/var/tmp/portage/games-strategy/vcmi-0.90/temp/environment’.
  • Working directory: ‘/var/tmp/portage/games-strategy/vcmi-0.90/work/vcmi-0.90’
  • S: ‘/var/tmp/portage/games-strategy/vcmi-0.90/work/vcmi-0.90’
  • there is missing vcmi-9999.ebuild which is described in Manifest.

Hey orbitgray,
Good to see some fellow Gentoo users!
If you could post the result of emerge --info ‘=games-strategy/vcmi-0.90’, that would help me a lot (because it does compile fine with me).

Thanks for pointing out the Manifest, I just updated the Manifest on github, feel free to take the new version.

Portage 2.1.11.9 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r3, 3.4.14v10 x86_64)

                    System Settings

=================================================================
System uname: Linux-3.4.14v10-x86_64-Intel-R-Core-TM-2_Duo_CPU_T9300@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Fri, 26 Oct 2012 08:45:01 +0000
app-shells/bash: 4.2_p37
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.3-r2, 3.2.3
dev-util/cmake: 2.8.9
dev-util/pkgconfig: 0.27.1
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.9.8.4
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.11.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.4
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc: 2.15-r3
Repositories: gentoo x-custom arcon xwing maekke mv sunrise calculate powerman betagarden
ACCEPT_KEYWORDS=“amd64"
ACCEPT_LICENSE=”* -@EULA"
CBUILD=“x86_64-pc-linux-gnu"
CFLAGS=”-march=core2 -O2 -pipe -fomit-frame-pointer -msse4.1"
CHOST=“x86_64-pc-linux-gnu"
CONFIG_PROTECT=”/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -msse4.1"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="–with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES=“assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=”-O2 -pipe"
GENTOO_MIRRORS=“ttp://gentoo.iteam.net.ua/ rsync://gentoo.kiev.ua/gentoo-distfiles"
LANG=“ru_RU.UTF-8"
LDFLAGS=”-Wl,-O1 -Wl,–as-needed"
LINGUAS=“en ru uk"
MAKEOPTS=”-j2"
PKGDIR=”/usr/portage/packages"
PORTAGE_CONFIGROOT="/“
PORTAGE_RSYNC_EXTRA_OPTS=”–timeout=3"
PORTAGE_RSYNC_OPTS="–recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/custom /usr/local/portage/layman/arcon /usr/local/portage/layman/xwing /usr/local/portage/layman/maekke /usr/local/portage/layman/mv /usr/local/portage/layman/sunrise /usr/local/portage/layman/calculate /usr/local/portage/layman/powerman /usr/local/portage/layman/betagarden"
SYNC="rsync://rsync.ua.gentoo.org/gentoo-portage"
USE=“X a52 aac acl acpi aim alsa amd64 avahi bash-completion bidi bluetooth bzip2 cairo cdda cdparanoia cdr cgi cli consolekit cracklib crypt css cups cxx dbus device-mapper directfb djvu dri dts dvd dvdr encode exif ffmpeg flac fontconfig fortran ftp g3dvl gdbm gif gimp glut gnuplot gnutls gphoto2 gpm gtk hal iconv icq icu ieee1394 imagemagick jabber jpeg jpeg2k lame latex live mad matroska mdnsresponder-compat mmx modules mp3 mpeg mppe-mppc mudflap multilib ncurses networkmanager nls nocd nptl nsplugin ogg openal opencl openexr opengl openmp pam pcre pdf perl png policykit pppd qt3support raw rdesktop readline rss samba sdl session smp spell sse sse2 ssl ssse3 stream svg tcpd theora threads tiff truetype udev unicode usb v4l v4l2 vaapi vcd video videos vim-syntax vnc vorbis webgl webkit wifi wxwindows x264 xml xv xvba xvid xvmc zlib” ALSA_CARDS=“ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci” ALSA_PCM_PLUGINS=“adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol” APACHE2_MODULES=“authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias” CALLIGRA_FEATURES=“kexi words flow plan sheets stage tables krita karbon braindump” CAMERAS=“ptp2” COLLECTD_PLUGINS=“df interface irq load memory rrdtool swap syslog” ELIBC=“glibc” GPSD_PROTOCOLS=“ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx” INPUT_DEVICES=“keyboard mouse evdev” KERNEL=“linux” LCD_DEVICES=“bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text” LIBREOFFICE_EXTENSIONS=“presenter-console presenter-minimizer” LINGUAS=“en ru uk” PHP_TARGETS=“php5-3” PYTHON_TARGETS=“python3_2 python2_7” RUBY_TARGETS=“ruby18 ruby19” USERLAND=“GNU” VIDEO_CARDS=“fglrx radeon r600” XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

Manifes works without editing now.

orbitgray: you are using GCC 4.5.4 but it does not support shared pointers.

Quick solution, switch to a more recent version of GCC. GCC 4.6.3 works fine, you can emerge it by running “emerge =sys-devel/gcc-4.6.3” then tell Gentoo to use this compiler by running gcc-config.

Long solution: patch the source code to make use of boost shared pointers instead of shared_ptr .

Hope this helps :slight_smile:

EDIT:
Actually, my initial assumption that GCC 4.5.4 does not support shared pointers was wrong. Only some specific syntax did not compile.

Oups. It seems that gcc 4.5 compatibility was broken. Current svn should fine now.

Ah. thanks Ivan! I took your svn commit and adapted it into a patch for vcmi 0.90:

qdii.dodges.it/vcmi-0.90-gcc-compatibility.patch

mirrors:
bpaste.net/show/55566/
pastebin.ca/2247828

orbitgrey: I integrated this patch, so you should be able to use the ebuild now without updating GCC.