Live SVN-Ebuild for Gentoo-Linux

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
crowley
Posts: 22
Joined: Sat May 27, 2006 2:27 pm

Live SVN-Ebuild for Gentoo-Linux

Post by crowley »

Hi!

I made an ebuild for Gentoo-Linux which uses the latest svn sources. Maybe there is someone else in the forum interested in that. It is based on the latest ebuild for scummvm-0.10.0 from portage. It may not be perfect, but i works fine for me.

1. Put the ebuild into your local overlay (e.g. /usr/local/portage/games-engines/scummvm-svn/).
2. Run "ebuild scummvm-svn-9999.ebuild digest".
3. Put "games-engines/scummvm-svn ~<YOUR-ARCH>" into your /etc/portage/package.keywords.
4. Run "emerge scummvm-svn" to download the latest sources, compile and install them.

I added three additional use-flags for the lure, cruise and drascula engines. To use them you can put "games-engines/scummvm-svn cruise lure drascula" to your /etc/portage/package.use.

scummvm-svn-9999.ebuild:

Code: Select all

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit eutils games subversion

DESCRIPTION="Reimplementation of the SCUMM game engine used in Lucasarts adventures"
HOMEPAGE="http&#58;//scummvm.sourceforge.net/"

ESVN_REPO_URI="https&#58;//scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk"
ESVN_PROJECT="scummvm"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="alsa debug flac fluidsynth mp3 ogg vorbis zlib lure cruise drascula"
RESTRICT="test"  # it only looks like there's a test there #77507

RDEPEND=">=media-libs/libsdl-1.2.2
    >media-libs/libmpeg2-0.3.1
    ogg? &#40; media-libs/libogg media-libs/libvorbis &#41;
    vorbis? &#40; media-libs/libogg media-libs/libvorbis &#41;
    alsa? &#40; >=media-libs/alsa-lib-0.9 &#41;
    mp3? &#40; media-libs/libmad &#41;
    flac? &#40; media-libs/flac &#41;
    fluidsynth? &#40; media-sound/fluidsynth &#41;
    zlib? &#40; sys-libs/zlib &#41;"
DEPEND="$&#123;RDEPEND&#125;
    x86? &#40; dev-lang/nasm &#41;"

pkg_setup&#40;&#41; &#123;
    games_pkg_setup

    ewarn
    ewarn "This is a Subversion snapshot of ScummVM,"
    ewarn "so no functionality is guaranteed!"
    ewarn

    if use alsa && ! built_with_use --missing true media-libs/alsa-lib midi; then
        eerror ""
        eerror "To be able to build $&#123;CATEGORY&#125;/$&#123;PN&#125; with ALSA support you"
        eerror "need to have built media-libs/alsa-lib with midi USE flag."
        die "Missing midi USE flag on media-libs/alsa-lib"
    fi
&#125;

src_compile&#40;&#41; &#123;
    local myconf="--backend=sdl" # x11 backend no worky &#40;bug #83502&#41;

    # let the engine find its data files in the right place &#40;bug #178116&#41;
    myconf="$&#123;myconf&#125; --datadir=$&#123;GAMES_DATADIR&#125;"

    &#40; use vorbis || use ogg &#41; \
        && myconf="$&#123;myconf&#125; --enable-vorbis" \
        || myconf="$&#123;myconf&#125; --disable-vorbis --disable-mpeg2"

    # bug #137547
    use fluidsynth || myconf="$&#123;myconf&#125; --disable-fluidsynth"

    use lure
        myconf="$&#123;myconf&#125; --enable-lure"
    use cruise
        myconf="$&#123;myconf&#125; --enable-cruise"
    use drascula
        myconf="$&#123;myconf&#125; --enable-drascula"

    # NOT AN AUTOCONF SCRIPT SO DONT CALL ECONF
    # mpeg2 support needs vorbis &#40;bug #79149&#41; so turn it off if -oggvorbis
    ./configure \
        $&#40;use_enable debug&#41; \
        $&#40;use_enable alsa&#41; \
        $&#40;use_enable mp3 mad&#41; \
        $&#40;use_enable flac&#41; \
        $&#40;use_enable zlib&#41; \
        $&#40;use_enable x86 nasm&#41; \
        $&#123;myconf&#125; \
        || die "configure failed"
    emake || die "emake failed"
&#125;

src_install&#40;&#41; &#123;
    dogamesbin scummvm || die "dobin failed"
    doman dists/scummvm.6
    dodoc AUTHORS NEWS README TODO
    insinto "$&#123;GAMES_DATADIR&#125;"/scummvm/engines
    doins gui/themes/modern.*
    doicon icons/scummvm.xpm
    make_desktop_entry scummvm ScummVM scummvm.xpm "Game;AdventureGame"
    prepgamesdirs
&#125;

pkg_postinst&#40;&#41; &#123;
    ewarn
    ewarn "DO NOT report bugs to Gentoo's bugzilla"
    ewarn
&#125;
crowley
Posts: 22
Joined: Sat May 27, 2006 2:27 pm

Post by crowley »

And the same for scummvm-tools.

scummvm-tools-svn-9999.ebuild:

Code: Select all

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit games subversion

DESCRIPTION="utilities for the SCUMM game engine"
HOMEPAGE="http&#58;//scummvm.sourceforge.net/"

ESVN_REPO_URI="https&#58;//scummvm.svn.sourceforge.net/svnroot/scummvm/tools/trunk"
ESVN_PROJECT="tools"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE=""

DEPEND="media-libs/libpng"

pkg_setup&#40;&#41; &#123;
    games_pkg_setup
    ewarn
    ewarn "This is a Subversion snapshot of ScummVM,"
    ewarn "so no functionality is guaranteed!"
    ewarn
&#125;

rc_install&#40;&#41; &#123;
    local f
    for f in $&#40;find . -type f -perm +1 -print&#41;; do
        dogamesbin $f || die "dogamesbin $f failed"
    done
    dodoc README
    prepgamesdirs
&#125;

pkg_postinst&#40;&#41; &#123;
    ewarn
    ewarn "DO NOT report bugs to Gentoo's bugzilla"
    ewarn
&#125;
User avatar
nabla
Posts: 50
Joined: Thu May 04, 2006 12:27 pm

Post by nabla »

Some updates, somehow the modern gui does not work... Any idea? I chose the right themes folder and the modern theme, but I get:

Code: Select all

  File <File Stream>, line 55&#58;
<bitmap filename = 'logo.bmp'/>
                <bitmap filename = 'cursor.bmp'/>

Parser error&#58; Error when loading Bitmap file 'logo.bmp'

WARNING&#58; Failed to parse STX file 'scummmodern_gfx.stx'!
WARNING&#58; Could not parse custom theme '/home/sebschub/temp/scummvm/trunk/gui/themes/scummmodern.zip'. Falling back to default theme!

Code: Select all

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header&#58; $

inherit eutils games subversion

DESCRIPTION="Reimplementation of the SCUMM game engine used in Lucasarts adventures"
HOMEPAGE="http&#58;//scummvm.sourceforge.net/"
ESVN_REPO_URI="https&#58;//scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk"
ESVN_PROJECT="scummvm"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="alsa debug flac fluidsynth mp3 ogg vorbis zlib cruise igor m4 made tinsel"
RESTRICT="test"  # it only looks like there's a test there #77507

RDEPEND=">=media-libs/libsdl-1.2.2
	>media-libs/libmpeg2-0.3.1
	ogg? &#40; media-libs/libogg media-libs/libvorbis &#41;
	vorbis? &#40; media-libs/libogg media-libs/libvorbis &#41;
	alsa? &#40; >=media-libs/alsa-lib-0.9 &#41;
	mp3? &#40; media-libs/libmad &#41;
	flac? &#40; media-libs/flac &#41;
	fluidsynth? &#40; media-sound/fluidsynth &#41;
	zlib? &#40; sys-libs/zlib &#41;"
DEPEND="$&#123;RDEPEND&#125;
	x86? &#40; dev-lang/nasm &#41;"

pkg_setup&#40;&#41; &#123;
	games_pkg_setup

	ewarn
	ewarn "This is a Subversion snapshot of ScummVM,"
	ewarn "so no functionality is guaranteed!"
	ewarn

	if use alsa && ! built_with_use --missing true media-libs/alsa-lib midi; then
		eerror ""
		eerror "To be able to build $&#123;CATEGORY&#125;/$&#123;PN&#125; with ALSA support you"
		eerror "need to have built media-libs/alsa-lib with midi USE flag."
		die "Missing midi USE flag on media-libs/alsa-lib"
	fi
&#125;

src_unpack&#40;&#41; &#123;
	local f

	subversion_src_unpack
	#unpack $&#123;A&#125;
	cd "$&#123;S&#125;"
	# -g isn't needed for nasm here
	sed -i \
		-e '/NASMFLAGS/ s/-g//' \
		./Makefile.common \
		|| die "sed failed"
	for f in graphics/scaler/&#123;hq3x_i386.asm,hq2x_i386.asm&#125;
	do
	cat >> $f <<EOF
	%ifidn __OUTPUT_FORMAT__,elf
	section .note.GNU-stack noalloc noexec nowrite progbits
	%endif
EOF
	done
&#125;

src_compile&#40;&#41; &#123;
	local myconf="--backend=sdl" # x11 backend no worky &#40;bug #83502&#41;

	# let the engine find its data files in the right place &#40;bug #178116&#41;
	myconf="$&#123;myconf&#125; --datadir=$&#123;GAMES_DATADIR&#125;"

	&#40; use vorbis || use ogg &#41; \
		&& myconf="$&#123;myconf&#125; --enable-vorbis" \
		|| myconf="$&#123;myconf&#125; --disable-vorbis --disable-mpeg2"

	# bug #137547
	use fluidsynth || myconf="$&#123;myconf&#125; --disable-fluidsynth"

	use cruise && myconf="$&#123;myconf&#125; --enable-cruise"
	use igor && myconf="$&#123;myconf&#125; --enable-igor"
	use m4 && myconf="$&#123;myconf&#125; --enable-m4"
	use made && myconf="$&#123;myconf&#125; --enable-made"
	use tinsel && myconf="$&#123;myconf&#125; --enable-tinsel"

	# NOT AN AUTOCONF SCRIPT SO DONT CALL ECONF
	# mpeg2 support needs vorbis &#40;bug #79149&#41; so turn it off if -oggvorbis
	./configure \
		$&#40;use_enable debug&#41; \
		$&#40;use_enable alsa&#41; \
		$&#40;use_enable mp3 mad&#41; \
		$&#40;use_enable flac&#41; \
		$&#40;use_enable zlib&#41; \
		$&#40;use_enable x86 nasm&#41; \
		$&#123;myconf&#125; \
		|| die "configure failed"
	emake || die "emake failed"
&#125;

src_install&#40;&#41; &#123;
	dogamesbin scummvm || die "dobin failed"
	doman dists/scummvm.6
	dodoc AUTHORS NEWS README TODO
	insinto "$&#123;GAMES_DATADIR&#125;"/$&#123;PN&#125;/engines
	doins gui/themes/scummmodern.*
	doicon icons/scummvm.svg
	make_desktop_entry scummvm ScummVM scummvm "Game;AdventureGame"
	prepgamesdirs
&#125;

pkg_postinst&#40;&#41; &#123;
	ewarn
	ewarn "DO NOT report bugs to Gentoo's bugzilla"
	ewarn
&#125;
crowley
Posts: 22
Joined: Sat May 27, 2006 2:27 pm

Post by crowley »

Sorry that I can not really help because I don't have any running gentoo box at this time but some suggestions you can try.

1. Simply try it again. Maybe some error the actual svn repository.

2. You could try to install scummvm by hand via "make install" and look which files are installed. Maybe there are some new files missing in the src_install() section of the ebuild. I would say the scummclassic.zip file is missing. And I think you should choose it from /usr/share/... and not from checked out svn.

edit: Hm, I tested it under archlinux and get a similar error message

Code: Select all

hase@sulaco ~&#93;$ scummvm

  File <File Stream>, line 55&#58;
<bitmap filename = 'logo.bmp'/>
                <bitmap filename = 'cursor.bmp'/>

Parser error&#58; Error when loading Bitmap file 'logo.bmp'

WARNING&#58; Failed to parse STX file 'scummmodern_gfx.stx'!
WARNING&#58; Could not parse custom theme '/usr/share/scummvm/scummmodern.zip'. Falling back to default theme!
But scummvm itself is running so not a really big problem.
Post Reply