Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 369419 - games-action/d1x-rebirth ebuild updates
Summary: games-action/d1x-rebirth ebuild updates
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 02:42 UTC by Jared B.
Modified: 2013-03-12 04:15 UTC (History)
1 user (show)

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


Attachments
games-action/d1x-rebirth-0.56-r1.ebuild (d1x-rebirth-0.56-r1.ebuild,2.48 KB, application/octet-stream)
2011-05-31 02:43 UTC, Jared B.
Details
games-action/descent1-data-1.0.ebuild (descent1-data-1.0.ebuild,2.64 KB, application/octet-stream)
2011-05-31 02:43 UTC, Jared B.
Details
games-action/descent1-data-1.0-r1.ebuild (descent1-data-1.0-r1.ebuild,3.64 KB, text/plain)
2011-09-29 01:34 UTC, Jared B.
Details
descent1-data Manifest (Manifest,600 bytes, text/plain)
2011-09-29 01:35 UTC, Jared B.
Details
games-action/d1x-rebirth-0.57.1.ebuild (d1x-rebirth-0.57.1.ebuild,2.00 KB, text/plain)
2012-02-06 00:52 UTC, DavidH
Details
games-action/d2x-rebirth-0.57.1.ebuild (d2x-rebirth-0.57.1.ebuild,1.84 KB, text/plain)
2012-02-06 02:10 UTC, DavidH
Details
games-action/d1x-rebirth-0.57.1.ebuild (d1x-rebirth-0.57.1.ebuild,2.04 KB, text/plain)
2012-02-07 04:48 UTC, Jared B.
Details
games-action/descent1-data-1.0-r1.ebuild (descent1-data-1.0-r1.ebuild,3.64 KB, text/plain)
2012-02-07 23:06 UTC, Jared B.
Details
games-action/d1x-rebirth-0.57.1.ebuild (d1x-rebirth-0.57.1.ebuild,2.17 KB, text/plain)
2012-02-08 03:44 UTC, DavidH
Details
d1x-rebirth metadata.xml (metadata.xml,1.01 KB, text/plain)
2012-02-08 03:47 UTC, DavidH
Details
games-action/descent1-data-1.0-r1.ebuild (descent1-data-1.0-r1.ebuild,3.48 KB, text/plain)
2012-09-21 03:25 UTC, Jared B.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2011-05-31 02:42:10 UTC
I made a few updates to the d1x-rebirth ebuild currently in portage.  The biggest was to accommodate copying the descent 1 data files from an install source rather than just from the CD.  This is necessary to support the version of Descent available from Good Old Games.  Since this required a fair amount of extra code to deal with just copying the data files, I split this bit out into a separate descent1-data ebuild.  This also makes it more consistent with the Descent II ebuilds.

In addition to the data files, I also added support for the hires texture pack and fixed what appears to be a bug in midi support (concerning file paths) with the current version.  I also needed to comment out the LINKFLAGS bit in src_prepare(), otherwise scons complained about something regarding concatenating strings and lists (don't have the exact error available anymore) and refused to build.

The descent1-data is modeled on the updated descent2-data ebuild I submitted in bug 369397.

Reproducible: Always
Comment 1 Jared B. 2011-05-31 02:43:19 UTC
Created attachment 275255 [details]
games-action/d1x-rebirth-0.56-r1.ebuild
Comment 2 Jared B. 2011-05-31 02:43:58 UTC
Created attachment 275257 [details]
games-action/descent1-data-1.0.ebuild
Comment 3 Jared B. 2011-09-29 01:34:47 UTC
Created attachment 288163 [details]
games-action/descent1-data-1.0-r1.ebuild

Updated data ebuild to include support for directly unpacking the GOG installer, as discussed in bug 371195 and bug 363719.  Please see bug 200967 comment 13 (which contains a very similar package update) for complete details.
Comment 4 Jared B. 2011-09-29 01:35:09 UTC
Created attachment 288165 [details]
descent1-data Manifest

Also attaching Manifest file containing GOG package checksum, which I think
will be needed if you don't have it available, even if you install from CD.
Comment 5 DavidH 2012-02-06 00:52:41 UTC
Created attachment 300977 [details]
games-action/d1x-rebirth-0.57.1.ebuild

Hello.  I tried to get 0.57.1 running, and discovered that there seems to have been a lot of changes in the resources and build behavior of d1x-rebirth.  So I ended up cooking a significantly altered 0.57.1 ebuild.  The following changes were made (relative to the 0.56-r1 ebuild posted above):

- d1xrdata.zip doesn't exist and is no longer needed
- dxx-rebirth_icons.zip doesn't exist and is no longer needed (the src itself provides an XPM icon)
- descent_midi.zip doesn't exist and is no longer needed
- the German briefings translation file is now named d1xr-briefings-ger.zip, and it doesn't need to be extracted (simply placed in the data directory)
- Two different music packs are available (a OPL3 version and an SC55 version), each exist in .zip form and can simply be placed in the data directory.
- I added two new USE flags ('opl3' and 'sc55') to allow the user to indicate whether they want to include one or both of the music packs.
- I made media-libs/sdl-mixer a required dependency (no longer conditional to the timidity USE flag)
- I removed the 'timidity' use flag (I don't believe it serves any purpose anymore).
- I removed app-arch/unzip and app-arch/zip from the dependencies, since none of the supplemental resources need to be extracted anymore.
- 'sdl_only' is no longer a valid SCONS option for d1x-rebirth.
- The executable is always built as 'd1x-rebirth', so the newgamesbin logic is simplified (no more 'd1x-rebirth-gl' or 'd1x-rebirth-sdl'.

I iterated on these changes quite a bit, and feel pretty confident about the new ebuild.  But I'm still an ebuild newbie, so it's entirely possible I missed something.

But it's building and running fine for me (on an x86_64 environment).  d1x-rebirth is a cakewalk to setup compared to d2x-xl.
Comment 6 DavidH 2012-02-06 00:54:15 UTC
Comment on attachment 300977 [details]
games-action/d1x-rebirth-0.57.1.ebuild

Changed attachment description, for consistency.
Comment 7 Jared B. 2012-02-06 01:04:03 UTC
Thanks for the update.  I'll try upgrading in the next couple of days when I get a chance and let you know if it works for me.
Comment 8 DavidH 2012-02-06 02:10:56 UTC
Created attachment 300979 [details]
games-action/d2x-rebirth-0.57.1.ebuild

Here's a d2x-rebirth-0.57.1 ebuild, which was an easy offshoot of the d1x-rebirth 0.57.1 ebuild (they're nearly identical, save for the fact that d2x-rebirth doesn't have a separate hires texture pack.
Comment 9 DavidH 2012-02-06 02:14:32 UTC
(In reply to comment #7)
> Thanks for the update.  I'll try upgrading in the next couple of days when I
> get a chance and let you know if it works for me.


Thanks Jared.  You've obviously been putting a lot of effort into the dxx-rebirth stuff, so feel free to treat mine as just an interim ebuild, and do whatever you think needs to be done to it.
Comment 10 Jared B. 2012-02-07 04:47:47 UTC
Just upgraded d1x-rebirth and new ebuild works great... mostly.  Only major problem is that timidity is still very much needed for actual midi support.  :-)  The descent_midi.zip indeed is no longer needed, though (explanation for this is in release-notes.txt), so all that should be needed here is the flag and sdl-mixer conditional.

I'll attach an updated version of your ebuild with this change.  I also added the changelog and release-notes files, since I think those are useful (not sure why I didn't include them before, honestly).  Played a (very) quick game to test, and all seems to work for me.

Thanks again for working on the updated version.  Will have to check out your d2x-rebuild update tomorrow night.
Comment 11 Jared B. 2012-02-07 04:48:37 UTC
Created attachment 301109 [details]
games-action/d1x-rebirth-0.57.1.ebuild
Comment 12 Mr. Bones. (RETIRED) gentoo-dev 2012-02-07 05:19:42 UTC
can you update it with the cdrom.eclass support please?
Comment 13 DavidH 2012-02-07 19:11:13 UTC
Roger that Jared.  I should've done a test run without the music packs and without timidity actually installed.

And the d2x-rebirth ebuild will just need the same adjustment.
Comment 14 Jared B. 2012-02-07 23:06:21 UTC
Created attachment 301193 [details]
games-action/descent1-data-1.0-r1.ebuild

(In reply to comment #12)
> can you update it with the cdrom.eclass support please?

I haven't messed with that before, but in just looking at the eclass file it looks like it simply took much of the existing functionality provided by portage and moved it into a separate eclass and added the CDROM_OPTIONAL parameter.  Is that right, or am I missing something?

I took a stab at updating the descent1-data ebuild (I'm assuming this doesn't come into play for the d1x-rebirth ebuild), but I didn't change much:

* added inherit cdrom
* added CDROM_OPTIONAL=yes
* removed cdinstall conditional from PROPERTIES

Everything else seems like it still applies.  Is that what you had in mind?  If not, let me know please.  If this is something that will be expected going forward, I'd like to make sure my ebuilds comply.

I tested the updated ebuild and it still works fine for me, though I could only test with USE="-cdinstall" since I don't have the original CD to test with.
Comment 15 Jared B. 2012-02-08 00:37:28 UTC
David,

I checked out the d2x-rebirth ebuild and it also looks good.  Have a few comments, though:

* The one major problem is that cdinstall? should depend on descent2-data, not descent1-data.  Everything else is suggestions.

* It looks like this can be optionally compiled in debug mode.  Unless there's a reason to remove that, I'd recommend adding it back.  It was an optional USE flag in the previous version.

* src_unpack() doesn't need to be explicitly defined here, since portage will unpack everything listed in $SRC_URI by default (same is true of the d1x ebuild, but I didn't catch it there last night)

* Demo files for Descent 2 are available, so it might be helpful to add something like this to the bottom of the !cdinstall conditional in src_install:

   elog
   elog "Alternatively, you may install games-action/descent2-demodata."

Last, just a more general comment, a lot of work has been done on an updated d2x-rebirth ebuild in bug 167341.  It'd probably make the most sense to review that and post your update there, since this bug is (well, had been) specifically about d1x-rebirth.
Comment 16 DavidH 2012-02-08 01:10:13 UTC
Regarding bug 369397...    weird, I did a search for 'd2x-rebirth' and it came up empty for me, that's why I just attached the extra ebuild here.  It was late though, could've been user error.  :)
Comment 17 DavidH 2012-02-08 01:11:15 UTC
Oops, I mean bug 167341.
Comment 18 DavidH 2012-02-08 03:29:50 UTC
Comment on attachment 301109 [details]
games-action/d1x-rebirth-0.57.1.ebuild

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

EAPI=2
inherit eutils games scons-utils

DV=1
DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine"
HOMEPAGE="http://www.dxx-rebirth.com/"
SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz
	opl3? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-opl3-music.zip )
	sc55? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-sc55-music.zip )
	textures? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-hires.zip )
	linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-briefings-ger.zip )"

LICENSE="D1X GPL-2 as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="cdinstall debug ipv6 linguas_de +opengl opl3 sc55 +textures +timidity"

DEPEND="opengl? ( virtual/opengl virtual/glu )
	dev-games/physfs[hog,zip]
	media-libs/libsdl[audio,opengl?,video]
	media-libs/sdl-mixer[timidity?]"
RDEPEND="${DEPEND}
	cdinstall? ( games-action/descent1-data )"

S=${WORKDIR}/${PN}_v${PV}-src

src_unpack() {
	unpack ${PN}_v${PV}-src.tar.gz
}

src_compile() {
	escons \
		verbosebuild=1 \
		sharepath="${GAMES_DATADIR}/d${DV}x" \
		sdlmixer=1 \
		$(use_scons debug) \
		$(use_scons ipv6) \
		|| die
}

src_install() {

	local DOCS=({CHANGELOG,COPYING,INSTALL,README,RELEASE-NOTES}.txt)
	edos2unix ${DOCS[@]} || die
	dodoc ${DOCS[@]} || die

	insinto "${GAMES_DATADIR}/d${DV}x"

	# None of the following zip files need to be extracted.
	if use linguas_de ; then
		doins "${DISTDIR}"/d${DV}xr-briefings-ger.zip || die
	fi
	if use opl3 ; then
		doins "${DISTDIR}"/d${DV}xr-opl3-music.zip || die
	fi
	if use sc55 ; then
		doins "${DISTDIR}"/d${DV}xr-sc55-music.zip || die
	fi
	if use textures ; then
		doins "${DISTDIR}"/d${DV}xr-hires.zip || die
	fi

	doicon "${S}/${PN}.xpm" || die

	local EXE=${PN}
	newgamesbin ${EXE} ${EXE} || die
	make_desktop_entry ${PN} "Descent ${DV} Rebirth" || die
	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
	if ! use cdinstall ; then
		echo
		elog "To play the full game enable USE=\"cdinstall\" or manually "
		elog "copy the files to ${GAMES_DATADIR}/d${DV}x."
		elog "Use bzcat /usr/share/doc/${PF}/INSTALL.txt.bz2 for details."
		echo
	fi
}
Comment 19 DavidH 2012-02-08 03:32:07 UTC
Comment on attachment 300977 [details]
games-action/d1x-rebirth-0.57.1.ebuild

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

EAPI=2
inherit eutils games scons-utils

DV=1
DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine"
HOMEPAGE="http://www.dxx-rebirth.com/"
SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz
	opl3? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-opl3-music.zip )
	sc55? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-sc55-music.zip )
	textures? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-hires.zip )
	linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-briefings-ger.zip )"

LICENSE="D1X GPL-2 as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="cdinstall debug ipv6 linguas_de +opengl opl3 sc55 +textures +timidity"

DEPEND="opengl? ( virtual/opengl virtual/glu )
	dev-games/physfs[hog,zip]
	media-libs/libsdl[audio,opengl?,video]
	media-libs/sdl-mixer[timidity?]"
RDEPEND="${DEPEND}
	cdinstall? ( games-action/descent1-data )"

S=${WORKDIR}/${PN}_v${PV}-src

src_unpack() {
	unpack ${PN}_v${PV}-src.tar.gz
}

src_compile() {
	escons \
		verbosebuild=1 \
		sharepath="${GAMES_DATADIR}/d${DV}x" \
		sdlmixer=1 \
		$(use_scons debug) \
		$(use_scons ipv6) \
		|| die
}

src_install() {

	local DOCS=({CHANGELOG,COPYING,INSTALL,README,RELEASE-NOTES}.txt)
	edos2unix ${DOCS[@]} || die
	dodoc ${DOCS[@]} || die

	insinto "${GAMES_DATADIR}/d${DV}x"

	# None of the following zip files need to be extracted.
	if use linguas_de ; then
		doins "${DISTDIR}"/d${DV}xr-briefings-ger.zip || die
	fi
	if use opl3 ; then
		doins "${DISTDIR}"/d${DV}xr-opl3-music.zip || die
	fi
	if use sc55 ; then
		doins "${DISTDIR}"/d${DV}xr-sc55-music.zip || die
	fi
	if use textures ; then
		doins "${DISTDIR}"/d${DV}xr-hires.zip || die
	fi

	doicon "${S}/${PN}.xpm" || die

	local EXE=${PN}
	newgamesbin ${EXE} ${EXE} || die
	make_desktop_entry ${PN} "Descent ${DV} Rebirth" || die
	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
	if ! use cdinstall ; then
		echo
		elog "To play the full game enable USE=\"cdinstall\" or manually "
		elog "copy the files to ${GAMES_DATADIR}/d${DV}x."
		elog "Use bzcat /usr/share/doc/${PF}/INSTALL.txt.bz2 for details."
		echo
	fi
}
Comment 20 DavidH 2012-02-08 03:34:22 UTC
Comment on attachment 300977 [details]
games-action/d1x-rebirth-0.57.1.ebuild

Sorry, I thought that was how to update the contents of an attachment in place.  I'm marking it obsolete, and will upload the latest version.
Comment 21 DavidH 2012-02-08 03:44:31 UTC
Created attachment 301207 [details]
games-action/d1x-rebirth-0.57.1.ebuild

Here's another go at the 0.57.1 ebuild for d1x-rebirth.  This one incorporates the feedback from Jared, and also assimilates the improvements that I could identify from the d2x-rebirth efforts in 167341.

- updated copyright
- applied alphabetized order to some of the listed elements
- fixed the dxx-rebirth HOMEPAGE URL
- restored the timidity USE flag
- applied sensible defaults to the USE settings (opengl, textures, and timidity all enabled by default)
- added the debug USE flag (maps to a scons option)
- moved cdinstall to RDEPEND (consistent with my understanding of the difference between DEPEND and RDEPEND)
- added scons option mapped to debug USE flag
- improved parameterization of the docs files (and added COPYING.txt, for completeness)
- added a edos2unix step for the docs (results in bz2 compression for all installed docs files -- nice)
- added a few missing 'die' clauses (seems like this is best practice convention)
- slight rewording of postinst elog messages
Comment 22 DavidH 2012-02-08 03:45:34 UTC
Comment on attachment 300979 [details]
games-action/d2x-rebirth-0.57.1.ebuild

Marking the d2x-rebirth ebuild as obsolete, to hide it.  I'll be posting/contributing to the effort in 167341.
Comment 23 DavidH 2012-02-08 03:47:40 UTC
Created attachment 301209 [details]
d1x-rebirth metadata.xml

New metadata.xml file (corresponds to USE changes in the 0.57.1 ebuild).

Provides custom descriptions for the following USE flags: linguas_de, opl3, sc55, textures.
Comment 24 DavidH 2012-02-08 03:52:59 UTC
Oh, a note about the src_unpack section.  I retained it because if it's removed, and the ebuild relies upon the default unpacking behavior, then the extra add-on zip files get extracted during build (into a 'work' directory).  This applies to the hires texture pack, german briefings, music packs, etc..   But if the src_unpack section remains, and explicitly references only the actual src tarball, then the zip files are left alone.  I figured this was preferable behavior, as the extra extractions are unnecessary and potentially problematic (not sure what other 'automatic' things might happen as a result of their unintended inclusion in that phase).
Comment 25 Jared B. 2012-09-21 03:25:00 UTC
Created attachment 324462 [details]
games-action/descent1-data-1.0-r1.ebuild

descent1-data ebuild update - now uses innoextract rather than innounp to unpack the GOG installer.  innoextract is a native Linux utility, so it's faster, less complicated (from an ebuild perspective), and doesn't depend on wine.
Comment 26 Julian Ospald 2013-02-06 23:28:18 UTC
+*d1x-rebirth-0.57.3 (06 Feb 2013)
+
+  06 Feb 2013; Julian Ospald <hasufell@gentoo.org> +d1x-rebirth-0.57.3.ebuild,
+  +files/d1x-rebirth-0.57.3-flags.patch:
+  version bump wrt #369419


if you have improvements for the data-part of this ebuild please rebase your efforts on the latest d1x-rebirth-0.57.3.ebuild
Comment 27 Jared B. 2013-03-12 04:15:38 UTC
updates reposted in bug 461472