diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-fps/doomsday | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-fps/doomsday')
-rw-r--r-- | games-fps/doomsday/Manifest | 1 | ||||
-rw-r--r-- | games-fps/doomsday/doomsday-1.14.5.ebuild | 186 | ||||
-rw-r--r-- | games-fps/doomsday/files/doomsday-1.9.8-2to3.patch | 309 | ||||
-rw-r--r-- | games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch | 34 | ||||
-rw-r--r-- | games-fps/doomsday/files/doomsday-1.9.8-openal-link.patch | 158 | ||||
-rw-r--r-- | games-fps/doomsday/files/wrapper | 6 | ||||
-rw-r--r-- | games-fps/doomsday/metadata.xml | 19 |
7 files changed, 713 insertions, 0 deletions
diff --git a/games-fps/doomsday/Manifest b/games-fps/doomsday/Manifest new file mode 100644 index 000000000000..1b4911213588 --- /dev/null +++ b/games-fps/doomsday/Manifest @@ -0,0 +1 @@ +DIST doomsday-1.14.5.tar.gz 14081857 SHA256 019cd0cf89e69d80cd8f6fbbd3e3fd57b8ae4d0bcdf4285e8a71caad9f46417e SHA512 f8ecf7d213ab57081858226ab4078fcf8f250271be19a3ce5883c01e53c43b5c0e7afc16085703fe19c0cbccb795c7fd1b651e3efb8a8e854160131c6374cd9a WHIRLPOOL 2351129c6dba951ca4975e6f6e92d78c75ad3e8f9648e9129a9f5a3a22c295b25c4fdb87d5208b2d3fe9c0af94c4ff968730929fbc645da9171018a672cfc60e diff --git a/games-fps/doomsday/doomsday-1.14.5.ebuild b/games-fps/doomsday/doomsday-1.14.5.ebuild new file mode 100644 index 000000000000..5052a797a10e --- /dev/null +++ b/games-fps/doomsday/doomsday-1.14.5.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# TODO: fmod support broken (deng_fmod) + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +inherit python-r1 confutils eutils qt4-r2 games + +DESCRIPTION="A modern gaming engine for Doom, Heretic, and Hexen" +HOMEPAGE="http://www.dengine.net/" +SRC_URI="mirror://sourceforge/deng/Doomsday%20Engine/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="dedicated fluidsynth openal snowberry +doom demo freedoom heretic hexen resources tools" +# we need python at build time, so +# snowberry? ( ${PYTHON_REQUIRED_USE} ) +# could break the build +REQUIRED_USE="${PYTHON_REQUIRED_USE} + demo? ( doom ) freedoom? ( doom ) resources? ( doom )" + +DEPEND=" + dev-qt/qtcore:4 + dev-qt/qtopengl:4 + dev-qt/qtgui:4 + net-misc/curl + sys-libs/zlib + !dedicated? ( + media-libs/libsdl[joystick,sound] + media-libs/sdl-mixer + media-libs/libpng:0 + virtual/opengl + virtual/glu + x11-libs/libX11 + x11-libs/libXrandr + x11-libs/libXxf86vm + ) + fluidsynth? ( media-sound/fluidsynth ) + openal? ( media-libs/openal ) + tools? ( sys-libs/ncurses )" +RDEPEND="${DEPEND} + !dedicated? ( + snowberry? ( + ${PYTHON_DEPS} + dev-lang/python-exec:2[${PYTHON_USEDEP}] + dev-python/wxpython[${PYTHON_USEDEP}] + ) + )" +DEPEND="${DEPEND} + ${PYTHON_DEPS}" +PDEPEND=" + !dedicated? ( + demo? ( games-fps/doom-data ) + freedoom? ( games-fps/freedoom ) + resources? ( games-fps/doomsday-resources ) + )" + +S=${S}/${PN} + +pkg_setup() { + games_pkg_setup + python_export_best +} + +src_prepare() { + sed -i \ + -e '/readme.path/s#$$PREFIX#/usr#' \ + client/client.pro || die + + sed -i \ + -e "/^DENG_BASE_DIR =/s:\$\$PREFIX/share:${GAMES_DATADIR}:" \ + config_unix.pri || die + + echo "CONFIG += nostrip" > config_user.pri + echo "PREFIX=/usr/games" >> config_user.pri + + if use dedicated ; then + echo "CONFIG += deng_noclient" >> config_user.pri + echo "CONFIG += deng_nosnowberry" >> config_user.pri + else + use snowberry && + echo "CONFIG += deng_snowberry" >> config_user.pri || \ + echo "CONFIG += deng_nosnowberry" >> config_user.pri + fi + + use fluidsynth && + echo "CONFIG += deng_fluidsynth" >> config_user.pri + + use tools || + echo "CONFIG += deng_notools" >> config_user.pri + + if use openal; then + echo "CONFIG += deng_openal" >> config_user.pri + sed -i \ + -e 's:\# Generic Unix.:LIBS += -lopenal:' \ + dep_openal.pri || die + fi + + qt4-r2_src_prepare +} + +#Usage: doom_make_wrapper <name> <game> <icon> <desktop entry title> [args] +doom_make_wrapper() { + local name=$1 game=$2 icon=$3 de_title=$4 + shift 4 + games_make_wrapper $name \ + "doomsday -game ${game} $@" + make_desktop_entry $name "${de_title}" ${icon} +} + +src_configure() { + qt4-r2_src_configure +} + +src_install() { + qt4-r2_src_install + + dodoc "${WORKDIR}"/${P}/README.md + + mv "${D}/${GAMES_DATADIR}"/{${PN}/data/jdoom,doom-data} || die + dosym "${GAMES_DATADIR}"/doom-data "${GAMES_DATADIR}"/${PN}/data/jdoom + + if use !dedicated ; then + if use snowberry ; then + python_replicate_script "${D}"/"${GAMES_BINDIR}"/launch-doomsday + + installmodules() { + # relocate snowberry module directory recursively into site-packages + python_domodule "${D}/${GAMES_DATADIR}"/${PN}/snowberry + # hack around improper path handling + sed -i \ + -e "s:os.chdir.*$:os.chdir('$(python_get_sitedir)/snowberry'):" \ + "${D%/}$(python_get_scriptdir)"/launch-doomsday || die + } + python_foreach_impl installmodules + # remove old module dir + rm -r "${D}/${GAMES_DATADIR}"/${PN}/snowberry || die + + make_desktop_entry launch-doomsday "Snowberry DoomsDay" snowberry + doicon ../snowberry/graphics/snowberry.png + fi + + if use doom; then + local res_arg + if use resources; then + res_arg="-def \"${GAMES_DATADIR}\"/${PN}/defs/jdoom/jDRP.ded" + fi + + doicon ../snowberry/graphics/orb-doom.png + doom_make_wrapper jdoom doom1 orb-doom "DoomsDay Engine: Doom 1" "${res_arg}" + elog "Created jdoom launcher. To play Doom place your doom.wad to" + elog "\"${GAMES_DATADIR}\"/doom-data" + elog + + if use demo; then + doom_make_wrapper jdoom-demo doom1-share orb-doom "DoomsDay Engine: Doom 1 Demo" \ + "-iwad \"${GAMES_DATADIR}\"/doom-data/doom1.wad ${res_arg}" + fi + if use freedoom; then + doom_make_wrapper jdoom-freedoom doom1-share orb-doom "DoomsDay Engine: FreeDoom" \ + "-iwad \"${GAMES_DATADIR}\"/doom-data/freedoom/doom1.wad" + fi + fi + if use hexen; then + doicon ../snowberry/graphics/orb-hexen.png + doom_make_wrapper jhexen hexen orb-hexen "DoomsDay Engine: Hexen" + + elog "Created jhexen launcher. To play Hexen place your hexen.wad to" + elog "\"${GAMES_DATADIR}\"/${PN}/data/jhexen" + elog + fi + if use heretic; then + doicon ../snowberry/graphics/orb-heretic.png + doom_make_wrapper jheretic heretic orb-heretic "DoomsDay Engine: Heretic" + + elog "Created jheretic launcher. To play Heretic place your heretic.wad to" + elog "\"${GAMES_DATADIR}\"/${PN}/data/jheretic" + elog + fi + fi + + prepgamesdirs +} diff --git a/games-fps/doomsday/files/doomsday-1.9.8-2to3.patch b/games-fps/doomsday/files/doomsday-1.9.8-2to3.patch new file mode 100644 index 000000000000..62b4db2627ec --- /dev/null +++ b/games-fps/doomsday/files/doomsday-1.9.8-2to3.patch @@ -0,0 +1,309 @@ +--- ./build/mac/createfont_osx.py (original) ++++ ./build/mac/createfont_osx.py (refactored) +@@ -36,7 +36,7 @@ + + + def _getBitmapImageRep(size, hasAlpha=True): +- width, height = map(int, size) ++ width, height = list(map(int, size)) + return NSBitmapImageRep.alloc().initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_(None, width, height, 8, 4, hasAlpha, False, NSDeviceRGBColorSpace, width*4, 32) + + +@@ -55,7 +55,7 @@ + + def filter_range(n): + offset = 1 # - int(n/5) +- return range(-n/2 + offset, n/2 + offset) ++ return list(range(-n/2 + offset, n/2 + offset)) + + + class SysFont(object): +@@ -79,7 +79,7 @@ + self._isBold and 'Bold' or '', + self._isOblique and 'Oblique' or '') + self._font = NSFont.fontWithName_size_(name, self._size) +- print name, self._font ++ print(name, self._font) + if self._font is None: + if self._isBold: + self._font = NSFont.boldSystemFontOfSize(self._size) +@@ -121,10 +121,10 @@ + self._isUnderline = isUnderline + + def size(self, text): +- return tuple(map(int,map(math.ceil, NSString.sizeWithAttributes_(text, { ++ return tuple(map(int,list(map(math.ceil, NSString.sizeWithAttributes_(text, { + NSFontAttributeName: self._font, + NSUnderlineStyleAttributeName: self._isUnderline and 1.0 or 0, +- })))) ++ }))))) + + def advancement(self, glyph): + return tuple(self._font.advancementForGlyph_(ord(glyph))) +@@ -196,7 +196,7 @@ + [6, 36, 90, 120, 90, 36, 6], + [1, 6, 15, 20, 15, 6, 1]] + else: +- print "factors for filter size", filter_size, "not defined!" ++ print("factors for filter size", filter_size, "not defined!") + factors = 0 + + # Filter a shadow. +@@ -269,7 +269,7 @@ + + if __name__=='__main__': + if len(sys.argv) < 5: +- print "usage: " + sys.argv[0] + " (font-name) (font-size) (texture-width) (output-file)" ++ print("usage: " + sys.argv[0] + " (font-name) (font-size) (texture-width) (output-file)") + sys.exit(0) + + out_filename = sys.argv[4] +@@ -286,17 +286,17 @@ + + texture_width = int(sys.argv[3]) + font_point_height = s.get_height() +- print "Font texture width =", texture_width +- print "Line height =", font_point_height, "pt" +- print "Font size =", point_size, "pt" ++ print("Font texture width =", texture_width) ++ print("Line height =", font_point_height, "pt") ++ print("Font size =", point_size, "pt") + + ascent = s.get_ascent() + descent = s.get_descent() +- print "Ascent =", ascent, "pt Descent =", descent, "pt" +- +- print "Shadow filter is sized %i for this font." % s.shadow_filter_size() ++ print("Ascent =", ascent, "pt Descent =", descent, "pt") ++ ++ print("Shadow filter is sized %i for this font." % s.shadow_filter_size()) + border_size = s.border_size() +- print "Glyph borders are %i pixels wide." % border_size ++ print("Glyph borders are %i pixels wide." % border_size) + + rover = (0, 0) + line_height = 0 +@@ -304,7 +304,7 @@ + used_pixels = 0 + + # Only the basic ASCII set, and some specific characters. +- char_range = range(0x20, 0x7F) + [0x96, 0x97, 0xA3, 0xA4, 0xA9, 0xB0, 0xB1] ++ char_range = list(range(0x20, 0x7F)) + [0x96, 0x97, 0xA3, 0xA4, 0xA9, 0xB0, 0xB1] + for code in char_range: + glyph = Glyph(code) + try: +@@ -320,7 +320,7 @@ + # No, move to the new row. + rover = (0, rover[1] + line_height) + texture_height += line_height +- print "Finished a %i pixels tall line." % line_height ++ print("Finished a %i pixels tall line." % line_height) + line_height = 0 + + glyph.pos = rover +@@ -332,20 +332,20 @@ + glyphs.append(glyph) + #except Exception, x: + except KeyboardInterrupt: +- print "Code %i: Failed to render." % code +- print x +- +- print "Finished rendering %i glyphs." % len(glyphs) ++ print("Code %i: Failed to render." % code) ++ print(x) ++ ++ print("Finished rendering %i glyphs." % len(glyphs)) + actual_line_height = glyphs[0].dims[1] - border_size*2 +- print "Actual line height is %i pixels." % actual_line_height +- +- print "Size of the finished texture is %i x %i." % (texture_width, texture_height) ++ print("Actual line height is %i pixels." % actual_line_height) ++ ++ print("Size of the finished texture is %i x %i." % (texture_width, texture_height)) + + actual_height = pow2(texture_height) + total_pixels = texture_width * actual_height + +- print "Unused texture area: %.2f %%" % (100*(1.0 - used_pixels/float(total_pixels))) +- print "Writing output to file: %s" % out_filename ++ print("Unused texture area: %.2f %%" % (100*(1.0 - used_pixels/float(total_pixels)))) ++ print("Writing output to file: %s" % out_filename) + + out = file(out_filename, 'wb') + +@@ -365,10 +365,10 @@ + scale = float(actual_line_height) / font_point_height + pixel_ascent = int(math.ceil(scale * ascent)) + pixel_descent = int(math.ceil(scale * descent)) +- print " Pixel ascent/descent:", pixel_ascent, '/', pixel_descent ++ print(" Pixel ascent/descent:", pixel_ascent, '/', pixel_descent) + + pixel_line_height = int(scale * font_point_height) +- print " Pixel line height:", pixel_line_height ++ print(" Pixel line height:", pixel_line_height) + + # Ascent and descent. + out.write(struct.pack('<HHH', pixel_line_height, pixel_ascent, pixel_descent)) +@@ -379,7 +379,7 @@ + g.dims[0], g.dims[1])) + + # Glyph map. +- print " Writing glyph map..." ++ print(" Writing glyph map...") + for y in range(texture_height): + for x in range(texture_width): + pixel = find_pixel(glyphs, x, y) +--- ./build/scripts/packres.py (original) ++++ ./build/scripts/packres.py (refactored) +@@ -6,8 +6,8 @@ + import sys, os, os.path, zipfile + + if len(sys.argv) < 2: +- print "Usage: %s pk3-target-dir" % sys.argv[0] +- print "(run in build/scripts/)" ++ print("Usage: %s pk3-target-dir" % sys.argv[0]) ++ print("(run in build/scripts/)") + sys.exit(0) + + # Check quiet flag. +@@ -27,7 +27,7 @@ + self.files += fileNamesArray + + def msg(self, text): +- if not quietMode: print text ++ if not quietMode: print(text) + + def create(self, name): + full_name = os.path.join(target_dir, name) +@@ -61,7 +61,7 @@ + process_dir(full_src, dest) + + # Write it out. +- print "Created %s (with %i files)." % (os.path.normpath(full_name), len(pk3.namelist())) ++ print("Created %s (with %i files)." % (os.path.normpath(full_name), len(pk3.namelist()))) + pk3.close() + + # First up, doomsday.pk3. +--- ./build/scripts/wadcompiler.py (original) ++++ ./build/scripts/wadcompiler.py (refactored) +@@ -49,7 +49,7 @@ + self.type = self.file.read(4) + count = struct.unpack('<I', self.file.read(4))[0] + info_offset = struct.unpack('<I', self.file.read(4))[0] +- print "%s, type=%s, count=%i, info_offset=%i" % (self.file_name, self.type, count, info_offset) ++ print("%s, type=%s, count=%i, info_offset=%i" % (self.file_name, self.type, count, info_offset)) + self.lumps = [] + # Read the info table. + self.file.seek(info_offset) +@@ -68,7 +68,7 @@ + self.lumps.append( Lump(info[2], data, info[0]) ) + + def write(self): +- print 'writing', self.file_name ++ print('writing', self.file_name) + self.file.truncate() + self.file.seek(0) + # Type. +@@ -104,17 +104,17 @@ + + def set_type(self, new_type): + if len(new_type) != 4: +- print "'%s' is not a valid type. Must have 4 chars." % new_type ++ print("'%s' is not a valid type. Must have 4 chars." % new_type) + else: +- print 'setting type to %s' % new_type ++ print('setting type to %s' % new_type) + self.type = new_type + + def list(self): + for i in range(len(self.lumps)): + lump = self.lumps[i] +- print "%5i -- %-8s (at %8i, %8i bytes)" % (i, lump.name, lump.offset, +- len(lump.data)) +- print "%i lumps total." % len(self.lumps) ++ print("%5i -- %-8s (at %8i, %8i bytes)" % (i, lump.name, lump.offset, ++ len(lump.data))) ++ print("%i lumps total." % len(self.lumps)) + + def insert(self, at_lump, names): + # Where to insert? +@@ -128,13 +128,13 @@ + at = i + break + if at == -1: +- print "could not find insert point, aborting" ++ print("could not find insert point, aborting") + return +- print "inserting at index %i..." % at ++ print("inserting at index %i..." % at) + + for name in names: + real, arch = split_name(name) +- print "inserting %s as %s" % (real, valid_lump_name(arch)) ++ print("inserting %s as %s" % (real, valid_lump_name(arch))) + self.lumps.insert(at, Lump(valid_lump_name(arch), + file(real, 'rb').read(), 0)) + +@@ -164,28 +164,28 @@ + break + else: + nice_name += ext +- print "extracting", lump.name, "(%i bytes) as %s" % (len(lump.data), nice_name) ++ print("extracting", lump.name, "(%i bytes) as %s" % (len(lump.data), nice_name)) + f = file(nice_name, 'wb') + f.write(lump.data) + f.close() + + + def usage(): +- print 'Usage: %s [command] [wad] [files]' % sys.argv[0] +- print 'command = l(ist) | c(reate PWAD) | C(reate IWAD) | x(tract) | a(ppend) | i(nsert) | t(ype)' +- print 'Examples:' +- print '%s l some.wad' % sys.argv[0] +- print '%s c new.wad LUMP1 LUMP2 LUMP3' % sys.argv[0] +- print '%s i LUMP2 some.wad LUMP5 LUMP6 LUMP7 (at LUMP2)' % sys.argv[0] +- print '%s a existing.wad LUMP4 LUMP5' % sys.argv[0] +- print '%s x existing.wad (extracts all lumps)' % sys.argv[0] +- print '%s x existing.wad LUMP4 (extracts selected lumps)' % sys.argv[0] +- print '%s t existing.wad IWAD' % sys.argv[0] +- print 'You can specify files as realfilename@LUMPNAME.' ++ print('Usage: %s [command] [wad] [files]' % sys.argv[0]) ++ print('command = l(ist) | c(reate PWAD) | C(reate IWAD) | x(tract) | a(ppend) | i(nsert) | t(ype)') ++ print('Examples:') ++ print('%s l some.wad' % sys.argv[0]) ++ print('%s c new.wad LUMP1 LUMP2 LUMP3' % sys.argv[0]) ++ print('%s i LUMP2 some.wad LUMP5 LUMP6 LUMP7 (at LUMP2)' % sys.argv[0]) ++ print('%s a existing.wad LUMP4 LUMP5' % sys.argv[0]) ++ print('%s x existing.wad (extracts all lumps)' % sys.argv[0]) ++ print('%s x existing.wad LUMP4 (extracts selected lumps)' % sys.argv[0]) ++ print('%s t existing.wad IWAD' % sys.argv[0]) ++ print('You can specify files as realfilename@LUMPNAME.') + + # Call main function. +-print 'WAD Compiler by skyjake@users.sourceforge.net' +-print '$Date$' ++print('WAD Compiler by skyjake@users.sourceforge.net') ++print('$Date$') + + # Check the args. + if len(sys.argv) < 3: +@@ -219,7 +219,7 @@ + try: + wad = Wad(wad_name, mode) + except: +- print 'Failure to open %s.' % wad_name ++ print('Failure to open %s.' % wad_name) + import traceback + traceback.print_exc() + sys.exit(2) +--- ./engine/scripts/makedmt.py (original) ++++ ./engine/scripts/makedmt.py (refactored) +@@ -118,7 +118,7 @@ + # Translate the type into a real C type. + if '_s' in c_type: + c_type = 'struct ' + c_type +- for symbol, real in type_replacements.items(): ++ for symbol, real in list(type_replacements.items()): + c_type = c_type.replace(symbol, real) + + # Add some visual padding to align the members. diff --git a/games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch b/games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch new file mode 100644 index 000000000000..6c24bfb4480c --- /dev/null +++ b/games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch @@ -0,0 +1,34 @@ +https://github.com/skyjake/Doomsday-Engine/commit/9c1fd1ee90d333332660c1aeef1addae93c2770e + +commit 9c1fd1ee90d333332660c1aeef1addae93c2770e +Author: skyjake <skyjake@users.sf.net> +Date: Sun Dec 30 16:45:56 2012 +0200 + + Fixed|OpenAL: Integer conversion in 64-bit build + +diff --git a/doomsday/plugins/openal/src/driver_openal.cpp b/doomsday/plugins/openal/src/driver_openal.cpp +index dd3cb2e..683345b 100644 +--- a/doomsday/plugins/openal/src/driver_openal.cpp ++++ b/doomsday/plugins/openal/src/driver_openal.cpp +@@ -56,8 +56,8 @@ + + #define PI 3.141592654 + +-#define SRC(buf) ((ALuint)buf->ptr3D) +-#define BUF(buf) ((ALuint)buf->ptr) ++#define SRC(buf) ( (ALuint) PTR2INT(buf->ptr3D) ) ++#define BUF(buf) ( (ALuint) PTR2INT(buf->ptr) ) + + //enum { VX, VY, VZ }; + +@@ -233,8 +233,8 @@ sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) + // Create the buffer object. + buf = static_cast<sfxbuffer_t*>(Z_Calloc(sizeof(*buf), PU_APPSTATIC, 0)); + +- buf->ptr = (void*) bufName; +- buf->ptr3D = (void*) srcName; ++ buf->ptr = INT2PTR(void, bufName); ++ buf->ptr3D = INT2PTR(void, srcName); + buf->bytes = bits / 8; + buf->rate = rate; + buf->flags = flags; diff --git a/games-fps/doomsday/files/doomsday-1.9.8-openal-link.patch b/games-fps/doomsday/files/doomsday-1.9.8-openal-link.patch new file mode 100644 index 000000000000..c59c48ac7aef --- /dev/null +++ b/games-fps/doomsday/files/doomsday-1.9.8-openal-link.patch @@ -0,0 +1,158 @@ +--- doomsday/plugins/openal/src/driver_openal.cpp 2012-05-15 06:01:38.000000000 +0200 ++++ doomsday/plugins/openal/src/driver_openal.cpp 2012-05-29 07:37:21.170639342 +0200 +@@ -66,6 +66,7 @@ ALenum(*EAXGet) (const struct _GUID* pro + ALenum(*EAXSet) (const struct _GUID* propertySetID, ALuint prop, ALuint source, ALvoid* value, ALuint size); + #endif + ++extern "C" { + int DS_Init(void); + void DS_Shutdown(void); + void DS_Event(int type); +@@ -83,6 +84,7 @@ void DS_SFX_Setv(sfxbuffer_t* buf, int p + void DS_SFX_Listener(int prop, float value); + void DS_SFX_Listenerv(int prop, float* values); + int DS_SFX_Getv(int prop, void* values); ++} + + #ifdef WIN32 + // EAX 2.0 GUIDs +@@ -134,14 +136,14 @@ static void loadExtensions(void) + #endif + } + +-int DS_Init(void) ++extern "C" int DS_Init(void) + { + // Already initialized? + if(initOk) return true; + + // Open a playback device. + /// @todo Shouldn't we use the system default device? +- device = alcOpenDevice((ALCchar*) "DirectSound3D"); ++ device = alcOpenDevice((ALCchar*) NULL); + if(!device) + { + Con_Message("OpenAL init failed (device: DirectSound3D).\n"); +@@ -167,7 +169,7 @@ int DS_Init(void) + return true; + } + +-void DS_Shutdown(void) ++extern "C" void DS_Shutdown(void) + { + if(!initOk) return; + +@@ -185,12 +187,12 @@ void DS_Event(int /*type*/) + // Not supported. + } + +-int DS_SFX_Init(void) ++extern "C" int DS_SFX_Init(void) + { + return true; + } + +-sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) ++extern "C" sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) + { + sfxbuffer_t* buf; + ALuint bufName, srcName; +@@ -236,7 +238,7 @@ sfxbuffer_t* DS_SFX_CreateBuffer(int fla + return buf; + } + +-void DS_SFX_DestroyBuffer(sfxbuffer_t* buf) ++extern "C" void DS_SFX_DestroyBuffer(sfxbuffer_t* buf) + { + ALuint srcName, bufName; + +@@ -251,7 +253,7 @@ void DS_SFX_DestroyBuffer(sfxbuffer_t* b + Z_Free(buf); + } + +-void DS_SFX_Load(sfxbuffer_t* buf, struct sfxsample_s* sample) ++extern "C" void DS_SFX_Load(sfxbuffer_t* buf, struct sfxsample_s* sample) + { + if(!buf || !sample) return; + +@@ -277,7 +279,7 @@ void DS_SFX_Load(sfxbuffer_t* buf, struc + /** + * Stops the buffer and makes it forget about its sample. + */ +-void DS_SFX_Reset(sfxbuffer_t* buf) ++extern "C" void DS_SFX_Reset(sfxbuffer_t* buf) + { + if(!buf) return; + +@@ -285,7 +287,7 @@ void DS_SFX_Reset(sfxbuffer_t* buf) + buf->sample = NULL; + } + +-void DS_SFX_Play(sfxbuffer_t* buf) ++extern "C" void DS_SFX_Play(sfxbuffer_t* buf) + { + ALuint source; + +@@ -310,7 +312,7 @@ void DS_SFX_Play(sfxbuffer_t* buf) + buf->flags |= SFXBF_PLAYING; + } + +-void DS_SFX_Stop(sfxbuffer_t* buf) ++extern "C" void DS_SFX_Stop(sfxbuffer_t* buf) + { + if(!buf || !buf->sample) return; + +@@ -318,7 +320,7 @@ void DS_SFX_Stop(sfxbuffer_t* buf) + buf->flags &= ~SFXBF_PLAYING; + } + +-void DS_SFX_Refresh(sfxbuffer_t* buf) ++extern "C" void DS_SFX_Refresh(sfxbuffer_t* buf) + { + ALint state; + +@@ -368,7 +370,7 @@ static void setPan(ALuint source, float + alSourcefv(source, AL_POSITION, pos); + } + +-void DS_SFX_Set(sfxbuffer_t* buf, int prop, float value) ++extern "C" void DS_SFX_Set(sfxbuffer_t* buf, int prop, float value) + { + ALuint source; + +@@ -411,7 +413,7 @@ void DS_SFX_Set(sfxbuffer_t* buf, int pr + } + } + +-void DS_SFX_Setv(sfxbuffer_t* buf, int prop, float* values) ++extern "C" void DS_SFX_Setv(sfxbuffer_t* buf, int prop, float* values) + { + ALuint source; + +@@ -435,7 +437,7 @@ void DS_SFX_Setv(sfxbuffer_t* buf, int p + } + } + +-void DS_SFX_Listener(int prop, float value) ++extern "C" void DS_SFX_Listener(int prop, float value) + { + switch(prop) + { +@@ -451,7 +453,7 @@ void DS_SFX_Listener(int prop, float val + } + } + +-void DS_SFX_Listenerv(int prop, float* values) ++extern "C" void DS_SFX_Listenerv(int prop, float* values) + { + float ori[6]; + +@@ -489,7 +491,7 @@ void DS_SFX_Listenerv(int prop, float* v + } + } + +-int DS_SFX_Getv(int /*prop*/, void* /*values*/) ++extern "C" int DS_SFX_Getv(int /*prop*/, void* /*values*/) + { + // Stub. + return 0; diff --git a/games-fps/doomsday/files/wrapper b/games-fps/doomsday/files/wrapper new file mode 100644 index 000000000000..52eb0c8f57fe --- /dev/null +++ b/games-fps/doomsday/files/wrapper @@ -0,0 +1,6 @@ +#!/bin/bash + +userdir="${HOME}/.doomsday/GAME" +mkdir -p "${userdir}" +cd "${userdir}" +exec doomsday -game GAME -userdir "${userdir}" "$@" diff --git a/games-fps/doomsday/metadata.xml b/games-fps/doomsday/metadata.xml new file mode 100644 index 000000000000..49c5cbefa2d7 --- /dev/null +++ b/games-fps/doomsday/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>games</herd> + <use> + <flag name="demo">Install launcher dor doom1.wad from <pkg>games-fps/doom-data</pkg></flag> + <flag name="doom">Install launcher for jdoom game</flag> + <flag name="fluidsynth">Build the FluidSynth sound driver</flag> + <flag name="freedoom">Install launcher for doom1.wad from <pkg>games-fps/freefoom</pkg></flag> + <flag name="heretic">Install launcher for jheretic game</flag> + <flag name="hexen">Install launcher for jhexen game</flag> + <flag name="resources">Enable support for <pkg>games-fps/doomsday-resources</pkg> in jdoom launcher</flag> + <flag name="snowberry">Install Snowberry doomsday front-end</flag> + <flag name="tools">Build additional tools such as doomsday-shell, md2tool and texc</flag> + </use> + <upstream> + <remote-id type="sourceforge">deng</remote-id> + </upstream> +</pkgmetadata> |