summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-fps
downloadgentoo-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')
-rw-r--r--games-fps/aaquake2/Manifest2
-rw-r--r--games-fps/aaquake2/aaquake2-0.1.ebuild63
-rw-r--r--games-fps/aaquake2/files/0.1-gentoo.patch90
-rw-r--r--games-fps/aaquake2/files/aaquake2-0.1-gcc41.patch39
-rw-r--r--games-fps/aaquake2/files/aaquake2-0.1-glibc.patch22
-rw-r--r--games-fps/aaquake2/files/aaquake2-0.1-ldflags.patch97
-rw-r--r--games-fps/aaquake2/metadata.xml18
-rw-r--r--games-fps/aaut/aaut-1.ebuild23
-rw-r--r--games-fps/aaut/files/aaut5
-rw-r--r--games-fps/aaut/metadata.xml12
-rw-r--r--games-fps/alephone-infinity/Manifest2
-rw-r--r--games-fps/alephone-infinity/alephone-infinity-20080622.ebuild41
-rw-r--r--games-fps/alephone-infinity/metadata.xml5
-rw-r--r--games-fps/alephone/Manifest2
-rw-r--r--games-fps/alephone/alephone-20100424.ebuild97
-rw-r--r--games-fps/alephone/alephone-20120514.ebuild97
-rw-r--r--games-fps/alephone/files/alephone-20100424-boost_145.patch10
-rw-r--r--games-fps/alephone/files/alephone-20100424-gcc47.patch11
-rw-r--r--games-fps/alephone/files/alephone-20100424-png15.patch19
-rw-r--r--games-fps/alephone/files/alephone-20120514-gcc47.patch11
-rw-r--r--games-fps/alephone/files/alephone-20120514-png15.patch11
-rw-r--r--games-fps/alephone/files/alephone.sh28
-rw-r--r--games-fps/alephone/metadata.xml8
-rw-r--r--games-fps/alienarena/Manifest2
-rw-r--r--games-fps/alienarena/alienarena-20120629.ebuild59
-rw-r--r--games-fps/alienarena/alienarena-20130207.ebuild72
-rw-r--r--games-fps/alienarena/files/alienarena-20120629-nodocs.patch16
-rw-r--r--games-fps/alienarena/files/alienarena-20130207-nodocs.patch16
-rw-r--r--games-fps/alienarena/metadata.xml9
-rw-r--r--games-fps/avp/Manifest1
-rw-r--r--games-fps/avp/avp-20150214.ebuild51
-rw-r--r--games-fps/avp/metadata.xml5
-rw-r--r--games-fps/blackshades/Manifest2
-rw-r--r--games-fps/blackshades/blackshades-20070723.ebuild56
-rw-r--r--games-fps/blackshades/files/blackshades-datadir.patch18
-rw-r--r--games-fps/blackshades/files/blackshades-freealut.patch11
-rw-r--r--games-fps/blackshades/files/blackshades-gcc42.patch35
-rw-r--r--games-fps/blackshades/metadata.xml5
-rw-r--r--games-fps/darkplaces/Manifest4
-rw-r--r--games-fps/darkplaces/darkplaces-20110628.ebuild188
-rw-r--r--games-fps/darkplaces/darkplaces-20130304.ebuild187
-rw-r--r--games-fps/darkplaces/metadata.xml11
-rw-r--r--games-fps/doom-data/Manifest1
-rw-r--r--games-fps/doom-data/doom-data-1-r1.ebuild43
-rw-r--r--games-fps/doom-data/metadata.xml8
-rw-r--r--games-fps/doom3-cdoom/Manifest1
-rw-r--r--games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild31
-rw-r--r--games-fps/doom3-cdoom/metadata.xml5
-rw-r--r--games-fps/doom3-chextrek/Manifest1
-rw-r--r--games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild37
-rw-r--r--games-fps/doom3-chextrek/metadata.xml5
-rw-r--r--games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild49
-rw-r--r--games-fps/doom3-data/metadata.xml11
-rw-r--r--games-fps/doom3-demo/Manifest2
-rw-r--r--games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild62
-rw-r--r--games-fps/doom3-demo/metadata.xml5
-rw-r--r--games-fps/doom3-ducttape/Manifest1
-rw-r--r--games-fps/doom3-ducttape/doom3-ducttape-0006-r1.ebuild36
-rw-r--r--games-fps/doom3-ducttape/metadata.xml5
-rw-r--r--games-fps/doom3-eventhorizon/Manifest1
-rw-r--r--games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild31
-rw-r--r--games-fps/doom3-eventhorizon/metadata.xml5
-rw-r--r--games-fps/doom3-hellcampaign/Manifest2
-rw-r--r--games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild47
-rw-r--r--games-fps/doom3-hellcampaign/metadata.xml5
-rw-r--r--games-fps/doom3-inhell/Manifest1
-rw-r--r--games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild29
-rw-r--r--games-fps/doom3-inhell/metadata.xml5
-rw-r--r--games-fps/doom3-lms/Manifest1
-rw-r--r--games-fps/doom3-lms/doom3-lms-4.ebuild30
-rw-r--r--games-fps/doom3-lms/metadata.xml5
-rw-r--r--games-fps/doom3-mitm/Manifest2
-rw-r--r--games-fps/doom3-mitm/doom3-mitm-20070129.ebuild46
-rw-r--r--games-fps/doom3-mitm/metadata.xml5
-rw-r--r--games-fps/doom3-roe/doom3-roe-1.ebuild54
-rw-r--r--games-fps/doom3-roe/metadata.xml13
-rw-r--r--games-fps/doom3/Manifest2
-rw-r--r--games-fps/doom3/doom3-1.3.1304-r1.ebuild100
-rw-r--r--games-fps/doom3/metadata.xml17
-rw-r--r--games-fps/doomsday-resources/Manifest2
-rw-r--r--games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild38
-rw-r--r--games-fps/doomsday-resources/metadata.xml8
-rw-r--r--games-fps/doomsday/Manifest1
-rw-r--r--games-fps/doomsday/doomsday-1.14.5.ebuild186
-rw-r--r--games-fps/doomsday/files/doomsday-1.9.8-2to3.patch309
-rw-r--r--games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch34
-rw-r--r--games-fps/doomsday/files/doomsday-1.9.8-openal-link.patch158
-rw-r--r--games-fps/doomsday/files/wrapper6
-rw-r--r--games-fps/doomsday/metadata.xml19
-rw-r--r--games-fps/duke3d-data/Manifest1
-rw-r--r--games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild77
-rw-r--r--games-fps/duke3d-data/duke3d-data-1.0.ebuild42
-rw-r--r--games-fps/duke3d-data/metadata.xml8
-rw-r--r--games-fps/duke3d-demodata/Manifest1
-rw-r--r--games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild51
-rw-r--r--games-fps/duke3d-demodata/metadata.xml6
-rw-r--r--games-fps/duke3d/Manifest2
-rw-r--r--games-fps/duke3d/duke3d-20040817-r2.ebuild134
-rw-r--r--games-fps/duke3d/files/20040817-credits.patch38
-rw-r--r--games-fps/duke3d/files/20040817-duke3d-makefile-opts.patch33
-rw-r--r--games-fps/duke3d/files/20040817-endian.patch26
-rw-r--r--games-fps/duke3d/files/20040817-gcc34.patch82
-rw-r--r--games-fps/duke3d/files/20040817-gcc4.patch75
-rw-r--r--games-fps/duke3d/files/duke3d-20040817-as-needed.patch74
-rw-r--r--games-fps/duke3d/files/duke3d-20040817-gcc4.patch180
-rw-r--r--games-fps/duke3d/files/duke3d-20040817-ldflags.patch66
-rw-r--r--games-fps/duke3d/files/duke3d-20040817-noinline.patch18
-rw-r--r--games-fps/duke3d/files/duke3d.cfg194
-rw-r--r--games-fps/duke3d/files/network.cfg15
-rw-r--r--games-fps/duke3d/metadata.xml58
-rw-r--r--games-fps/eduke32/Manifest6
-rw-r--r--games-fps/eduke32/eduke32-20131119.4169.ebuild219
-rw-r--r--games-fps/eduke32/files/eduke32-20131119.4169-QA.patch150
-rw-r--r--games-fps/eduke32/metadata.xml25
-rw-r--r--games-fps/enemy-territory-etpro/Manifest1
-rw-r--r--games-fps/enemy-territory-etpro/enemy-territory-etpro-3.2.6-r1.ebuild21
-rw-r--r--games-fps/enemy-territory-etpro/metadata.xml5
-rw-r--r--games-fps/enemy-territory-omnibot/Manifest3
-rw-r--r--games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.82.ebuild19
-rw-r--r--games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.83.1.ebuild22
-rw-r--r--games-fps/enemy-territory-omnibot/metadata.xml9
-rw-r--r--games-fps/enemy-territory-truecombat/Manifest2
-rw-r--r--games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild38
-rw-r--r--games-fps/enemy-territory-truecombat/metadata.xml5
-rw-r--r--games-fps/enemy-territory/Manifest3
-rw-r--r--games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild119
-rw-r--r--games-fps/enemy-territory/metadata.xml8
-rw-r--r--games-fps/etqw-bin/Manifest1
-rw-r--r--games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild72
-rw-r--r--games-fps/etqw-bin/metadata.xml9
-rw-r--r--games-fps/etqw-data/etqw-data-1.0.ebuild64
-rw-r--r--games-fps/etqw-data/metadata.xml9
-rw-r--r--games-fps/etqw-demo/Manifest1
-rw-r--r--games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild61
-rw-r--r--games-fps/etqw-demo/metadata.xml5
-rw-r--r--games-fps/ezquake-bin/Manifest4
-rw-r--r--games-fps/ezquake-bin/ezquake-bin-2.2.ebuild72
-rw-r--r--games-fps/ezquake-bin/metadata.xml8
-rw-r--r--games-fps/freedoom/Manifest3
-rw-r--r--games-fps/freedoom/freedoom-0.7.ebuild43
-rw-r--r--games-fps/freedoom/metadata.xml5
-rw-r--r--games-fps/glxquake-bin/Manifest1
-rw-r--r--games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild43
-rw-r--r--games-fps/glxquake-bin/metadata.xml5
-rw-r--r--games-fps/imaze/Manifest1
-rw-r--r--games-fps/imaze/imaze-1.4.ebuild55
-rw-r--r--games-fps/imaze/metadata.xml5
-rw-r--r--games-fps/industri/Manifest2
-rw-r--r--games-fps/industri/files/industri-1.01-exec-stack.patch36
-rw-r--r--games-fps/industri/files/industri-1.01-glext.patch18
-rw-r--r--games-fps/industri/files/industri-1.01-ldflags.patch20
-rw-r--r--games-fps/industri/files/industri.pretty2
-rw-r--r--games-fps/industri/industri-1.01.ebuild84
-rw-r--r--games-fps/industri/metadata.xml17
-rw-r--r--games-fps/legends/Manifest2
-rw-r--r--games-fps/legends/files/legends3
-rw-r--r--games-fps/legends/files/legends-ded3
-rw-r--r--games-fps/legends/legends-0.4.1.43-r1.ebuild74
-rw-r--r--games-fps/legends/metadata.xml28
-rw-r--r--games-fps/lsdldoom/Manifest2
-rw-r--r--games-fps/lsdldoom/files/1.4.4.4-gcc34.patch42
-rw-r--r--games-fps/lsdldoom/files/1.4.4.4-gentoo-paths.patch39
-rw-r--r--games-fps/lsdldoom/files/lsdldoom-1.4.4.4-gcc41.patch14
-rw-r--r--games-fps/lsdldoom/files/lsdldoom-1.4.4.4-keys.patch11
-rw-r--r--games-fps/lsdldoom/files/lsdldoom-1.5-paths.patch64
-rw-r--r--games-fps/lsdldoom/lsdldoom-1.4.4.4-r1.ebuild51
-rw-r--r--games-fps/lsdldoom/lsdldoom-1.5.ebuild39
-rw-r--r--games-fps/lsdldoom/metadata.xml10
-rw-r--r--games-fps/metadata.xml34
-rw-r--r--games-fps/nexuiz/Manifest2
-rw-r--r--games-fps/nexuiz/files/nexuiz-2.5.2-libpng-1.4.patch42
-rw-r--r--games-fps/nexuiz/metadata.xml11
-rw-r--r--games-fps/nexuiz/nexuiz-2.5.2.ebuild134
-rw-r--r--games-fps/openarena/Manifest2
-rw-r--r--games-fps/openarena/files/openarena-0.8.8-makefile.patch36
-rw-r--r--games-fps/openarena/files/openarena-0.8.8-unbundling.patch172
-rw-r--r--games-fps/openarena/metadata.xml8
-rw-r--r--games-fps/openarena/openarena-0.8.8.ebuild78
-rw-r--r--games-fps/postal2/Manifest2
-rw-r--r--games-fps/postal2/metadata.xml9
-rw-r--r--games-fps/postal2/postal2-1409.2-r2.ebuild69
-rw-r--r--games-fps/postal2mp-demo/Manifest1
-rw-r--r--games-fps/postal2mp-demo/metadata.xml5
-rw-r--r--games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild49
-rw-r--r--games-fps/prboom/Manifest2
-rw-r--r--games-fps/prboom/files/prboom-2.5.0-libpng14.patch22
-rw-r--r--games-fps/prboom/files/prboom-2.5.0-nvidia-test.c3
-rw-r--r--games-fps/prboom/files/prboom-2.5.0-nvidia.patch48
-rw-r--r--games-fps/prboom/metadata.xml8
-rw-r--r--games-fps/prboom/prboom-2.5.0.ebuild80
-rw-r--r--games-fps/quake1-data/metadata.xml5
-rw-r--r--games-fps/quake1-data/quake1-data-2.40.ebuild69
-rw-r--r--games-fps/quake1-demodata/Manifest1
-rw-r--r--games-fps/quake1-demodata/metadata.xml5
-rw-r--r--games-fps/quake1-demodata/quake1-demodata-1.06.ebuild81
-rw-r--r--games-fps/quake1-killer/Manifest1
-rw-r--r--games-fps/quake1-killer/metadata.xml5
-rw-r--r--games-fps/quake1-killer/quake1-killer-2.2z.ebuild31
-rw-r--r--games-fps/quake1-movies/Manifest9
-rw-r--r--games-fps/quake1-movies/metadata.xml5
-rw-r--r--games-fps/quake1-movies/quake1-movies-0.ebuild84
-rw-r--r--games-fps/quake1-rally/Manifest2
-rw-r--r--games-fps/quake1-rally/metadata.xml5
-rw-r--r--games-fps/quake1-rally/quake1-rally-1.2.ebuild38
-rw-r--r--games-fps/quake1-teamfortress/Manifest2
-rw-r--r--games-fps/quake1-teamfortress/metadata.xml5
-rw-r--r--games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild37
-rw-r--r--games-fps/quake1-textures/Manifest2
-rw-r--r--games-fps/quake1-textures/metadata.xml5
-rw-r--r--games-fps/quake1-textures/quake1-textures-20050820.ebuild51
-rw-r--r--games-fps/quake2-data/Manifest1
-rw-r--r--games-fps/quake2-data/metadata.xml5
-rw-r--r--games-fps/quake2-data/quake2-data-3.20.ebuild87
-rw-r--r--games-fps/quake2-demodata/Manifest1
-rw-r--r--games-fps/quake2-demodata/metadata.xml5
-rw-r--r--games-fps/quake2-demodata/quake2-demodata-3.14.ebuild87
-rw-r--r--games-fps/quake2-icculus/Manifest4
-rw-r--r--games-fps/quake2-icculus/files/0.16-rogue-armor.patch12
-rw-r--r--games-fps/quake2-icculus/files/0.16-rogue-nan.patch7
-rw-r--r--games-fps/quake2-icculus/files/README-postinstall79
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch172
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch18
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch14
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch213
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch12
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch97
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch56
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch25
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch13
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch45
-rw-r--r--games-fps/quake2-icculus/files/quake2.xpm37
-rw-r--r--games-fps/quake2-icculus/metadata.xml11
-rw-r--r--games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild196
-rw-r--r--games-fps/quake2-textures/Manifest1
-rw-r--r--games-fps/quake2-textures/metadata.xml5
-rw-r--r--games-fps/quake2-textures/quake2-textures-0_beta8.ebuild41
-rw-r--r--games-fps/quake3-alliance/Manifest2
-rw-r--r--games-fps/quake3-alliance/metadata.xml5
-rw-r--r--games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild29
-rw-r--r--games-fps/quake3-alternatefire/Manifest1
-rw-r--r--games-fps/quake3-alternatefire/files/server.cfg109
-rw-r--r--games-fps/quake3-alternatefire/metadata.xml5
-rw-r--r--games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild19
-rw-r--r--games-fps/quake3-bfp/Manifest1
-rw-r--r--games-fps/quake3-bfp/metadata.xml5
-rw-r--r--games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild19
-rw-r--r--games-fps/quake3-bin/Manifest2
-rw-r--r--games-fps/quake3-bin/files/q3ded.conf.d6
-rw-r--r--games-fps/quake3-bin/files/q3ded.rc35
-rw-r--r--games-fps/quake3-bin/metadata.xml21
-rw-r--r--games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild106
-rw-r--r--games-fps/quake3-cpma/Manifest2
-rw-r--r--games-fps/quake3-cpma/files/server.cfg146
-rw-r--r--games-fps/quake3-cpma/metadata.xml34
-rw-r--r--games-fps/quake3-cpma/quake3-cpma-1.48.ebuild28
-rw-r--r--games-fps/quake3-data/Manifest1
-rw-r--r--games-fps/quake3-data/metadata.xml5
-rw-r--r--games-fps/quake3-data/quake3-data-1.32b.ebuild53
-rw-r--r--games-fps/quake3-defrag/Manifest14
-rw-r--r--games-fps/quake3-defrag/metadata.xml5
-rw-r--r--games-fps/quake3-defrag/quake3-defrag-1.91.20.ebuild46
-rw-r--r--games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild46
-rw-r--r--games-fps/quake3-demo/Manifest1
-rw-r--r--games-fps/quake3-demo/metadata.xml8
-rw-r--r--games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild64
-rw-r--r--games-fps/quake3-excessiveplus/Manifest1
-rw-r--r--games-fps/quake3-excessiveplus/metadata.xml17
-rw-r--r--games-fps/quake3-excessiveplus/quake3-excessiveplus-2.2b.ebuild24
-rw-r--r--games-fps/quake3-lrctf/Manifest1
-rw-r--r--games-fps/quake3-lrctf/metadata.xml5
-rw-r--r--games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild18
-rw-r--r--games-fps/quake3-matrix/Manifest1
-rw-r--r--games-fps/quake3-matrix/metadata.xml5
-rw-r--r--games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild24
-rw-r--r--games-fps/quake3-nsco/Manifest2
-rw-r--r--games-fps/quake3-nsco/files/server.cfg97
-rw-r--r--games-fps/quake3-nsco/metadata.xml27
-rw-r--r--games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild29
-rw-r--r--games-fps/quake3-osp/Manifest1
-rw-r--r--games-fps/quake3-osp/files/server.cfg165
-rw-r--r--games-fps/quake3-osp/metadata.xml5
-rw-r--r--games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild24
-rw-r--r--games-fps/quake3-ra3/Manifest1
-rw-r--r--games-fps/quake3-ra3/metadata.xml5
-rw-r--r--games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild20
-rw-r--r--games-fps/quake3-reaction/Manifest2
-rw-r--r--games-fps/quake3-reaction/metadata.xml5
-rw-r--r--games-fps/quake3-reaction/quake3-reaction-3.2.ebuild22
-rw-r--r--games-fps/quake3-ruinhunters/Manifest2
-rw-r--r--games-fps/quake3-ruinhunters/metadata.xml5
-rw-r--r--games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild27
-rw-r--r--games-fps/quake3-teamarena/Manifest1
-rw-r--r--games-fps/quake3-teamarena/metadata.xml5
-rw-r--r--games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild54
-rw-r--r--games-fps/quake3-threewave/Manifest2
-rw-r--r--games-fps/quake3-threewave/metadata.xml5
-rw-r--r--games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild23
-rw-r--r--games-fps/quake3/Manifest1
-rw-r--r--games-fps/quake3/files/quake3-1.36-bots.patch20
-rw-r--r--games-fps/quake3/files/quake3-1.36-remove-bundled-jpeg.patch72
-rw-r--r--games-fps/quake3/metadata.xml23
-rw-r--r--games-fps/quake3/quake3-1.36-r1.ebuild144
-rw-r--r--games-fps/quake3/quake3-9999.ebuild140
-rw-r--r--games-fps/quake4-bin/Manifest1
-rw-r--r--games-fps/quake4-bin/metadata.xml22
-rw-r--r--games-fps/quake4-bin/quake4-bin-1.4.2-r1.ebuild145
-rw-r--r--games-fps/quake4-data/metadata.xml5
-rw-r--r--games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild60
-rw-r--r--games-fps/quake4-demo/Manifest1
-rw-r--r--games-fps/quake4-demo/metadata.xml21
-rw-r--r--games-fps/quake4-demo/quake4-demo-1.0-r1.ebuild88
-rw-r--r--games-fps/quakeforge/Manifest2
-rw-r--r--games-fps/quakeforge/files/0.5.5-ipv6.patch10
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-amd64.patch14
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-gcc41.patch342
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-gcc46.patch174
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-keys.patch103
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-libc.patch17
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-no-page-size.patch15
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-noWerror.patch65
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.5.5-zlib-1.2.6.patch14
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch33
-rw-r--r--games-fps/quakeforge/metadata.xml36
-rw-r--r--games-fps/quakeforge/quakeforge-0.5.5-r2.ebuild141
-rw-r--r--games-fps/quakeforge/quakeforge-0.7.2.ebuild123
-rw-r--r--games-fps/qudos/Manifest2
-rw-r--r--games-fps/qudos/files/qudos-0.40.1-gnusource.patch12
-rw-r--r--games-fps/qudos/files/qudos-0.40.1-libpng15.patch10
-rw-r--r--games-fps/qudos/metadata.xml11
-rw-r--r--games-fps/qudos/qudos-0.40.1.ebuild188
-rw-r--r--games-fps/red-blue-quake2/Manifest2
-rw-r--r--games-fps/red-blue-quake2/files/0.1-gentoo.patch63
-rw-r--r--games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch39
-rw-r--r--games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch92
-rw-r--r--games-fps/red-blue-quake2/metadata.xml5
-rw-r--r--games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild58
-rw-r--r--games-fps/rott/Manifest3
-rw-r--r--games-fps/rott/files/1.0-custom-datapath.patch49
-rw-r--r--games-fps/rott/files/rott-1.0-full-version.patch11
-rw-r--r--games-fps/rott/files/rott-1.0-gcc41.patch22
-rw-r--r--games-fps/rott/metadata.xml22
-rw-r--r--games-fps/rott/rott-1.0.ebuild56
-rw-r--r--games-fps/rott/rott-1.1.2.ebuild56
-rw-r--r--games-fps/rtcw/Manifest2
-rw-r--r--games-fps/rtcw/files/wolf-ded.rc25
-rw-r--r--games-fps/rtcw/metadata.xml8
-rw-r--r--games-fps/rtcw/rtcw-1.41b.ebuild95
-rw-r--r--games-fps/rtcwmp-demo/Manifest1
-rw-r--r--games-fps/rtcwmp-demo/files/rtcwmp-demo-ded.rc25
-rw-r--r--games-fps/rtcwmp-demo/metadata.xml8
-rw-r--r--games-fps/rtcwmp-demo/rtcwmp-demo-1.1-r1.ebuild74
-rw-r--r--games-fps/rtcwsp-demo/Manifest1
-rw-r--r--games-fps/rtcwsp-demo/metadata.xml9
-rw-r--r--games-fps/rtcwsp-demo/rtcwsp-demo-1.1b-r1.ebuild59
-rw-r--r--games-fps/sauerbraten/Manifest1
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2013.01.04-QA.patch50
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2013.01.04-master.patch323
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2013.01.04-system-enet.patch64
-rw-r--r--games-fps/sauerbraten/files/sauerbraten.conf28
-rw-r--r--games-fps/sauerbraten/files/sauerbraten.init74
-rw-r--r--games-fps/sauerbraten/files/sauerbraten_unix.patch19
-rw-r--r--games-fps/sauerbraten/metadata.xml11
-rw-r--r--games-fps/sauerbraten/sauerbraten-2013.01.04.ebuild127
-rw-r--r--games-fps/serious-sam-tfe/Manifest4
-rw-r--r--games-fps/serious-sam-tfe/metadata.xml8
-rw-r--r--games-fps/serious-sam-tfe/serious-sam-tfe-1_beta3.ebuild138
-rw-r--r--games-fps/serious-sam-tse/Manifest1
-rw-r--r--games-fps/serious-sam-tse/metadata.xml8
-rw-r--r--games-fps/serious-sam-tse/serious-sam-tse-1_beta1.ebuild143
-rw-r--r--games-fps/soldieroffortune-demo/Manifest1
-rw-r--r--games-fps/soldieroffortune-demo/metadata.xml8
-rw-r--r--games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild67
-rw-r--r--games-fps/soldieroffortune/Manifest1
-rw-r--r--games-fps/soldieroffortune/metadata.xml8
-rw-r--r--games-fps/soldieroffortune/soldieroffortune-1.06a-r1.ebuild84
-rw-r--r--games-fps/tenebrae/Manifest2
-rw-r--r--games-fps/tenebrae/files/1.04-glhax.patch32
-rw-r--r--games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch36
-rw-r--r--games-fps/tenebrae/metadata.xml15
-rw-r--r--games-fps/tenebrae/tenebrae-1.04.ebuild71
-rw-r--r--games-fps/transfusion-bin/Manifest3
-rw-r--r--games-fps/transfusion-bin/files/transfusion2
-rw-r--r--games-fps/transfusion-bin/metadata.xml8
-rw-r--r--games-fps/transfusion-bin/transfusion-bin-1.01.ebuild49
-rw-r--r--games-fps/tribes2/Manifest1
-rw-r--r--games-fps/tribes2/metadata.xml5
-rw-r--r--games-fps/tribes2/tribes2-25034.ebuild76
-rw-r--r--games-fps/turtlearena/Manifest2
-rw-r--r--games-fps/turtlearena/files/turtlearena-0.6.1-build.patch201
-rw-r--r--games-fps/turtlearena/files/turtlearena-0.6.1-freetype.patch17
-rw-r--r--games-fps/turtlearena/metadata.xml10
-rw-r--r--games-fps/turtlearena/turtlearena-0.6.1.ebuild126
-rw-r--r--games-fps/unreal-tournament-bonuspacks/Manifest1
-rw-r--r--games-fps/unreal-tournament-bonuspacks/metadata.xml5
-rw-r--r--games-fps/unreal-tournament-bonuspacks/unreal-tournament-bonuspacks-436.ebuild49
-rw-r--r--games-fps/unreal-tournament-goty/Manifest3
-rw-r--r--games-fps/unreal-tournament-goty/metadata.xml36
-rw-r--r--games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild170
-rw-r--r--games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild172
-rw-r--r--games-fps/unreal-tournament-strikeforce/Manifest3
-rw-r--r--games-fps/unreal-tournament-strikeforce/metadata.xml5
-rw-r--r--games-fps/unreal-tournament-strikeforce/unreal-tournament-strikeforce-1.81.ebuild46
-rw-r--r--games-fps/unreal-tournament/Manifest2
-rw-r--r--games-fps/unreal-tournament/metadata.xml33
-rw-r--r--games-fps/unreal-tournament/unreal-tournament-451.ebuild121
-rw-r--r--games-fps/unreal/Manifest3
-rw-r--r--games-fps/unreal/files/unreal3
-rw-r--r--games-fps/unreal/metadata.xml21
-rw-r--r--games-fps/unreal/unreal-226.ebuild86
-rw-r--r--games-fps/urbanterror/Manifest4
-rw-r--r--games-fps/urbanterror/files/urbanterror-4.2.023-build.patch75
-rw-r--r--games-fps/urbanterror/metadata.xml13
-rw-r--r--games-fps/urbanterror/urbanterror-4.2.023.ebuild157
-rw-r--r--games-fps/ut2003-bonuspack-cm/Manifest1
-rw-r--r--games-fps/ut2003-bonuspack-cm/metadata.xml8
-rw-r--r--games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild39
-rw-r--r--games-fps/ut2003-bonuspack-de/Manifest1
-rw-r--r--games-fps/ut2003-bonuspack-de/metadata.xml8
-rw-r--r--games-fps/ut2003-bonuspack-de/ut2003-bonuspack-de-1.ebuild35
-rw-r--r--games-fps/ut2003-bonuspack-epic/Manifest1
-rw-r--r--games-fps/ut2003-bonuspack-epic/files/epic-installer48
-rw-r--r--games-fps/ut2003-bonuspack-epic/metadata.xml5
-rw-r--r--games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild118
-rw-r--r--games-fps/ut2003-data/Manifest1
-rw-r--r--games-fps/ut2003-data/metadata.xml8
-rw-r--r--games-fps/ut2003-data/ut2003-data-2107.ebuild143
-rw-r--r--games-fps/ut2003-demo/Manifest3
-rw-r--r--games-fps/ut2003-demo/files/benchmark37
-rw-r--r--games-fps/ut2003-demo/files/results.py61
-rw-r--r--games-fps/ut2003-demo/files/results.sh79
-rw-r--r--games-fps/ut2003-demo/files/ut2003-demo30
-rw-r--r--games-fps/ut2003-demo/metadata.xml8
-rw-r--r--games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild128
-rw-r--r--games-fps/ut2003/Manifest1
-rw-r--r--games-fps/ut2003/metadata.xml8
-rw-r--r--games-fps/ut2003/ut2003-2225-r4.ebuild100
-rw-r--r--games-fps/ut2004-action/Manifest1
-rw-r--r--games-fps/ut2004-action/metadata.xml5
-rw-r--r--games-fps/ut2004-action/ut2004-action-1.ebuild32
-rw-r--r--games-fps/ut2004-airbuccaneers/Manifest1
-rw-r--r--games-fps/ut2004-airbuccaneers/metadata.xml5
-rw-r--r--games-fps/ut2004-airbuccaneers/ut2004-airbuccaneers-1.6-r2.ebuild19
-rw-r--r--games-fps/ut2004-alienswarm/Manifest4
-rw-r--r--games-fps/ut2004-alienswarm/metadata.xml5
-rw-r--r--games-fps/ut2004-alienswarm/ut2004-alienswarm-1.32.ebuild49
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/Manifest1
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/metadata.xml5
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/ut2004-bonuspack-cbp1-1-r2.ebuild18
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/Manifest2
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/metadata.xml5
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/ut2004-bonuspack-cbp2-1-r2.ebuild36
-rw-r--r--games-fps/ut2004-bonuspack-ece/Manifest1
-rw-r--r--games-fps/ut2004-bonuspack-ece/metadata.xml5
-rw-r--r--games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1-r3.ebuild53
-rw-r--r--games-fps/ut2004-bonuspack-mega/Manifest1
-rw-r--r--games-fps/ut2004-bonuspack-mega/metadata.xml5
-rw-r--r--games-fps/ut2004-bonuspack-mega/ut2004-bonuspack-mega-1-r2.ebuild42
-rw-r--r--games-fps/ut2004-cor/Manifest2
-rw-r--r--games-fps/ut2004-cor/metadata.xml5
-rw-r--r--games-fps/ut2004-cor/ut2004-cor-1.01-r1.ebuild27
-rw-r--r--games-fps/ut2004-crossfire/Manifest1
-rw-r--r--games-fps/ut2004-crossfire/metadata.xml5
-rw-r--r--games-fps/ut2004-crossfire/ut2004-crossfire-1.95.ebuild33
-rw-r--r--games-fps/ut2004-data/metadata.xml5
-rw-r--r--games-fps/ut2004-data/ut2004-data-3186-r4.ebuild384
-rw-r--r--games-fps/ut2004-deathball/Manifest1
-rw-r--r--games-fps/ut2004-deathball/metadata.xml5
-rw-r--r--games-fps/ut2004-deathball/ut2004-deathball-2.4w.ebuild25
-rw-r--r--games-fps/ut2004-demo/Manifest1
-rw-r--r--games-fps/ut2004-demo/metadata.xml5
-rw-r--r--games-fps/ut2004-demo/ut2004-demo-3334.ebuild85
-rw-r--r--games-fps/ut2004-fragops/Manifest1
-rw-r--r--games-fps/ut2004-fragops/metadata.xml5
-rw-r--r--games-fps/ut2004-fragops/ut2004-fragops-2.20.ebuild23
-rw-r--r--games-fps/ut2004-hamsterbash/Manifest1
-rw-r--r--games-fps/ut2004-hamsterbash/metadata.xml5
-rw-r--r--games-fps/ut2004-hamsterbash/ut2004-hamsterbash-1.ebuild23
-rw-r--r--games-fps/ut2004-muralis/Manifest1
-rw-r--r--games-fps/ut2004-muralis/metadata.xml5
-rw-r--r--games-fps/ut2004-muralis/ut2004-muralis-1.15.ebuild29
-rw-r--r--games-fps/ut2004-strikeforce/Manifest1
-rw-r--r--games-fps/ut2004-strikeforce/metadata.xml5
-rw-r--r--games-fps/ut2004-strikeforce/ut2004-strikeforce-4.1.ebuild29
-rw-r--r--games-fps/ut2004-troopers/Manifest1
-rw-r--r--games-fps/ut2004-troopers/metadata.xml5
-rw-r--r--games-fps/ut2004-troopers/ut2004-troopers-6.0.ebuild30
-rw-r--r--games-fps/ut2004-ultraduel/Manifest2
-rw-r--r--games-fps/ut2004-ultraduel/metadata.xml5
-rw-r--r--games-fps/ut2004-ultraduel/ut2004-ultraduel-2.1.ebuild22
-rw-r--r--games-fps/ut2004-unwheel/Manifest2
-rw-r--r--games-fps/ut2004-unwheel/metadata.xml5
-rw-r--r--games-fps/ut2004-unwheel/ut2004-unwheel-0_beta5.ebuild33
-rw-r--r--games-fps/ut2004/Manifest2
-rw-r--r--games-fps/ut2004/metadata.xml5
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r1.ebuild141
-rw-r--r--games-fps/warsow/Manifest4
-rw-r--r--games-fps/warsow/files/warsow-1.5.1-openal.patch12
-rw-r--r--games-fps/warsow/files/warsow-1.5.1-pic.patch11
-rw-r--r--games-fps/warsow/metadata.xml9
-rw-r--r--games-fps/warsow/warsow-1.5.1-r1.ebuild182
-rw-r--r--games-fps/wolfgl/Manifest3
-rw-r--r--games-fps/wolfgl/files/0.93-gcc.patch212
-rw-r--r--games-fps/wolfgl/files/0.93-gcc4.patch80
-rw-r--r--games-fps/wolfgl/files/0.93-sample-rate.patch11
-rw-r--r--games-fps/wolfgl/files/0.93-sprite.patch82
-rw-r--r--games-fps/wolfgl/files/wolfgl-0.93-as-needed.patch11
-rw-r--r--games-fps/wolfgl/metadata.xml12
-rw-r--r--games-fps/wolfgl/wolfgl-0.93-r1.ebuild58
-rw-r--r--games-fps/worldofpadman/Manifest2
-rw-r--r--games-fps/worldofpadman/files/worldofpadman-1.6-gentoo.patch92
-rw-r--r--games-fps/worldofpadman/metadata.xml11
-rw-r--r--games-fps/worldofpadman/worldofpadman-1.6.ebuild94
-rw-r--r--games-fps/xonotic/Manifest1
-rw-r--r--games-fps/xonotic/metadata.xml8
-rw-r--r--games-fps/xonotic/xonotic-0.8.0.ebuild115
515 files changed, 18550 insertions, 0 deletions
diff --git a/games-fps/aaquake2/Manifest b/games-fps/aaquake2/Manifest
new file mode 100644
index 00000000000..45ba18ca627
--- /dev/null
+++ b/games-fps/aaquake2/Manifest
@@ -0,0 +1,2 @@
+DIST q2source-3.21.zip 1477764 SHA256 c9200316de189638d0d997a0092f36b85f2c3f9e4ebe30f4b1c356745ad676ca SHA512 eb3fcf3327272b7472a044336be4d73111f5b9f50b4916609996ecb690555654990c1f86e63cd6e7d4a30844e66d3eca2e428e29a598bce52e953c326caf9752 WHIRLPOOL 7b372c99d97e4bf807b07d93726cba748116e21c9e5f3348e0571632742a2574cc395e762e7e30a529fe5d45a82e3f047605cc4d788fb1e67d0ee9a615d8af34
+DIST quake2-ref_softaa-0.1.tar.gz 12931 SHA256 e848919804e65c99dc900b640e5d5c6f018d2181908a48bb1b0330efa90d3a6a SHA512 d5f7e46485084217f5cb8fdcfa360106eafbfac9dad03e4853367e9cf6857a9789ec4d37d3bca656730282649b3e33b0ab04d4c0a73de36f794d98f3c048401c WHIRLPOOL 568c28704c9577d9b789b6fff32baf05ceaab692c65ebd84a2200222d98178e53909375a859dac35d60e37664e9450252c8d9d8d286252836b49663b12ab8f74
diff --git a/games-fps/aaquake2/aaquake2-0.1.ebuild b/games-fps/aaquake2/aaquake2-0.1.ebuild
new file mode 100644
index 00000000000..9e7e3b5adf7
--- /dev/null
+++ b/games-fps/aaquake2/aaquake2-0.1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="text mode Quake II"
+HOMEPAGE="http://www.jfedor.org/aaquake2/"
+SRC_URI="mirror://idsoftware/source/q2source-3.21.zip
+ http://www.jfedor.org/aaquake2/quake2-ref_softaa-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND="media-libs/aalib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/quake2-3.21/linux
+
+src_prepare() {
+ cd .. && epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${P}-gcc41.patch
+ cd "${S}" && epatch \
+ "${FILESDIR}"/${P}-glibc.patch \
+ "${FILESDIR}"/${P}-ldflags.patch
+ sed -i \
+ -e "s:GENTOO_DIR:$(games_get_libdir)/${PN}:" sys_linux.c || die
+ sed -i \
+ -e "s:/etc/quake2.conf:${GAMES_SYSCONFDIR}/${PN}.conf:" \
+ sys_linux.c vid_so.c || die
+}
+
+src_compile() {
+ mkdir -p releasei386-glibc/ref_soft
+ emake -j1 \
+ GENTOO_CFLAGS="${CFLAGS}" \
+ GENTOO_DATADIR="${GAMES_DATADIR}"/quake2/baseq2/ \
+ build_release
+}
+
+src_install() {
+ cd release* || die
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe gamei386.so ref_softaa.so
+ dosym ref_softaa.so "$(games_get_libdir)"/${PN}/ref_softx.so
+ dosym ref_softaa.so "$(games_get_libdir)"/${PN}/ref_soft.so
+ exeinto "$(games_get_libdir)"/${PN}/ctf
+ doexe ctf/gamei386.so
+
+ newgamesbin quake2 aaquake2
+
+ insinto "${GAMES_SYSCONFDIR}"
+ echo "$(games_get_libdir)"/${PN} > ${PN}.conf
+ doins ${PN}.conf
+
+ prepgamesdirs
+}
diff --git a/games-fps/aaquake2/files/0.1-gentoo.patch b/games-fps/aaquake2/files/0.1-gentoo.patch
new file mode 100644
index 00000000000..cc7bb1733f6
--- /dev/null
+++ b/games-fps/aaquake2/files/0.1-gentoo.patch
@@ -0,0 +1,90 @@
+--- linux/Makefile.old
++++ linux/Makefile
+@@ -54,7 +54,7 @@
+ RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ else
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
++RELEASE_CFLAGS=$(BASE_CFLAGS) -g $(GENTOO_CFLAGS) -DGENTOO_DATADIR=\\\"$(GENTOO_DATADIR)\\\" -O6 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+@@ -92,7 +92,7 @@
+ #############################################################################
+
+ ifeq ($(ARCH),axp)
+-TARGETS=$(BUILDDIR)/q2ded \
++TARGETS=\
+ $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
+ $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
+ # $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
+@@ -100,11 +100,7 @@
+ else
+ TARGETS=$(BUILDDIR)/quake2 \
+ $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
+- $(BUILDDIR)/ref_soft.$(SHLIBEXT) \
+- $(BUILDDIR)/ref_softx.$(SHLIBEXT) \
+ $(BUILDDIR)/ref_softaa.$(SHLIBEXT) \
+- $(BUILDDIR)/ref_gl.$(SHLIBEXT) \
+- $(BUILDDIR)/ref_glx.$(SHLIBEXT) \
+ $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
+ # $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
+ # $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
+@@ -125,9 +121,6 @@
+ build_release:
+ @-mkdir $(BUILD_RELEASE_DIR) \
+ $(BUILD_RELEASE_DIR)/client \
+- $(BUILD_RELEASE_DIR)/ded \
+- $(BUILD_RELEASE_DIR)/ref_soft \
+- $(BUILD_RELEASE_DIR)/ref_gl \
+ $(BUILD_RELEASE_DIR)/game \
+ $(BUILD_RELEASE_DIR)/ctf \
+ # $(BUILD_RELEASE_DIR)/xatrix \
+--- linux/sys_linux.c.old
++++ linux/sys_linux.c
+@@ -220,7 +220,7 @@
+ char curpath[MAX_OSPATH];
+ char *path;
+ #ifdef __i386__
+- const char *gamename = "gamei386.so";
++ const char *gamename = "GENTOO_DIR/gamei386.so";
+ #elif defined __alpha__
+ const char *gamename = "gameaxp.so";
+ #else
+@@ -250,6 +250,14 @@
+ {
+ Com_Printf ("LoadLibrary (%s)\n",name);
+ break;
++ } else {
++ sprintf (name, "%s", gamename);
++ game_library = dlopen (name, RTLD_LAZY );
++ if (game_library)
++ {
++ Com_Printf ("LoadLibrary (%s)\n",name);
++ break;
++ }
+ }
+ }
+
+--- qcommon/files.c.old
++++ qcommon/files.c
+@@ -865,7 +865,7 @@
+ //
+ // start up with baseq2 by default
+ //
+- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
++ FS_AddGameDirectory (va(BASEDIRNAME) );
+
+ // any set gamedirs will be freed up to here
+ fs_base_searchpaths = fs_searchpaths;
+--- qcommon/qcommon.h.old
++++ qcommon/qcommon.h
+@@ -25,7 +25,7 @@
+
+ #define VERSION 3.21
+
+-#define BASEDIRNAME "baseq2"
++#define BASEDIRNAME GENTOO_DATADIR
+
+ #ifdef WIN32
+
diff --git a/games-fps/aaquake2/files/aaquake2-0.1-gcc41.patch b/games-fps/aaquake2/files/aaquake2-0.1-gcc41.patch
new file mode 100644
index 00000000000..bb2e8e5979e
--- /dev/null
+++ b/games-fps/aaquake2/files/aaquake2-0.1-gcc41.patch
@@ -0,0 +1,39 @@
+--- game/g_local.h.old
++++ game/g_local.h
+@@ -458,11 +458,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+-
+-
+ // means of death
+ #define MOD_UNKNOWN 0
+ #define MOD_BLASTER 1
+--- ctf/g_local.h.old
++++ ctf/g_local.h
+@@ -466,11 +466,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+-
+-
+ // means of death
+ #define MOD_UNKNOWN 0
+ #define MOD_BLASTER 1
+@@ -556,10 +556,6 @@
+
+ extern cvar_t *sv_maplist;
+
+-//ZOID
+-extern qboolean is_quad;
+-//ZOID
+-
+ #define world (&g_edicts[0])
+
+ // item spawnflags
diff --git a/games-fps/aaquake2/files/aaquake2-0.1-glibc.patch b/games-fps/aaquake2/files/aaquake2-0.1-glibc.patch
new file mode 100644
index 00000000000..638e91b2c39
--- /dev/null
+++ b/games-fps/aaquake2/files/aaquake2-0.1-glibc.patch
@@ -0,0 +1,22 @@
+--- rw_aa.c.old
++++ rw_aa.c
+@@ -61,7 +61,7 @@
+ #include <signal.h>
+ #include <sys/mman.h>
+
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include <aalib.h>
+
+--- rw_in_aa.c.old
++++ rw_in_aa.c
+@@ -46,7 +46,7 @@
+ #include <signal.h>
+ #include <sys/mman.h>
+
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include <aalib.h>
+
diff --git a/games-fps/aaquake2/files/aaquake2-0.1-ldflags.patch b/games-fps/aaquake2/files/aaquake2-0.1-ldflags.patch
new file mode 100644
index 00000000000..dc2359ac48d
--- /dev/null
+++ b/games-fps/aaquake2/files/aaquake2-0.1-ldflags.patch
@@ -0,0 +1,97 @@
+--- Makefile.old
++++ Makefile
+@@ -59,7 +59,7 @@
+ endif
+
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+-LDFLAGS=-ldl -lm
++LDLIBS=-ldl -lm
+ SVGALDFLAGS=-lvga -lm
+ XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga
+ AALDFLAGS=-lm -laa
+@@ -195,7 +195,7 @@
+ endif
+
+ $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
+ $(DO_CC)
+@@ -374,7 +374,7 @@
+ $(BUILDDIR)/ded/cd_null.o
+
+ $(BUILDDIR)/q2ded : $(Q2DED_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(Q2DED_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
+ $(DO_DED_CC)
+@@ -503,7 +503,7 @@
+ $(BUILDDIR)/game/m_flash.o
+
+ $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
+
+ $(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
+ $(DO_SHLIB_CC)
+@@ -682,7 +682,7 @@
+ $(BUILDDIR)/ctf/q_shared.o
+
+ $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
+
+ $(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
+ $(DO_SHLIB_CC)
+@@ -821,7 +821,7 @@
+ $(BUILDDIR)/xatrix/q_shared.o
+
+ $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
+
+ $(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
+ $(DO_SHLIB_CC)
+@@ -1048,7 +1048,7 @@
+ $(BUILDDIR)/rogue/q_shared.o
+
+ $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) : $(ROGUE_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
+
+ $(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c
+ $(DO_SHLIB_CC)
+@@ -1291,15 +1291,15 @@
+ $(BUILDDIR)/ref_soft/rw_in_aa.o
+
+ $(BUILDDIR)/ref_soft.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_SVGA_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -Xlinker -Map -Xlinker map.out -o $@ $(REF_SOFT_OBJS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -Xlinker -Map -Xlinker map.out -o $@ $(REF_SOFT_OBJS) \
+ $(REF_SOFT_SVGA_OBJS) $(SVGALDFLAGS)
+
+ $(BUILDDIR)/ref_softx.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_X11_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
+ $(REF_SOFT_X11_OBJS) $(XLDFLAGS)
+
+ $(BUILDDIR)/ref_softaa.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_AA_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
+ $(REF_SOFT_AA_OBJS) $(AALDFLAGS)
+
+ $(BUILDDIR)/ref_soft/r_aclip.o : $(REF_SOFT_DIR)/r_aclip.c
+@@ -1445,10 +1445,10 @@
+ $(BUILDDIR)/ref_gl/gl_glx.o
+
+ $(BUILDDIR)/ref_gl.$(SHLIBEXT) : $(REF_GL_OBJS) $(REF_GL_FXMESA_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_FXMESA_OBJS) $(GLLDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_FXMESA_OBJS) $(GLLDFLAGS)
+
+ $(BUILDDIR)/ref_glx.$(SHLIBEXT) : $(REF_GL_OBJS) $(REF_GL_GLX_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_GLX_OBJS) $(GLXLDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_GLX_OBJS) $(GLXLDFLAGS)
+
+ $(BUILDDIR)/ref_gl/gl_draw.o : $(REF_GL_DIR)/gl_draw.c
+ $(DO_GL_SHLIB_CC)
diff --git a/games-fps/aaquake2/metadata.xml b/games-fps/aaquake2/metadata.xml
new file mode 100644
index 00000000000..df801fb2ef9
--- /dev/null
+++ b/games-fps/aaquake2/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+aaquake2 - Text Mode Quake II
+
+What?
+Just what you heard - text mode Quake II.
+
+Why?
+Why not? You can watch TV in text mode, you can play DVDs in text mode,
+you can play Quake 1 in text mode. Quake II is the logical next step.
+
+Or, as the author of ttyquake put it, "If you have to ask why, you're
+not a member of the intended audience."
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/aaut/aaut-1.ebuild b/games-fps/aaut/aaut-1.ebuild
new file mode 100644
index 00000000000..47f39fb91c6
--- /dev/null
+++ b/games-fps/aaut/aaut-1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit games
+
+DESCRIPTION="ascii mode unreal tournament"
+HOMEPAGE="http://icculus.org/~chunky/ut/aaut/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND="|| (
+ games-fps/unreal-tournament
+ games-fps/unreal-tournament-goty )
+ media-libs/aalib"
+
+src_install() {
+ dogamesbin "${FILESDIR}/aaut" || die "dogamesbin failed"
+ prepgamesdirs
+}
diff --git a/games-fps/aaut/files/aaut b/games-fps/aaut/files/aaut
new file mode 100644
index 00000000000..d7f9aa805ab
--- /dev/null
+++ b/games-fps/aaut/files/aaut
@@ -0,0 +1,5 @@
+#!/bin/sh
+[ -z "${AAOPTS}" ] && AAOPTS="-width 150 -height 70"
+SDL_VIDEODRIVER="aalib"
+export AAOPTS SDL_VIDEODRIVER
+exec ut "$@"
diff --git a/games-fps/aaut/metadata.xml b/games-fps/aaut/metadata.xml
new file mode 100644
index 00000000000..16a4a6bdd2b
--- /dev/null
+++ b/games-fps/aaut/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+AAUT: Text Mode Unreal Tournament
+Remember, Kids. It's not big, and it's not clever
+
+Is UT just a little too high-end for your
+look-I'm-using-my-15-year-old-P100-as-a-Linux-box machine?
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/alephone-infinity/Manifest b/games-fps/alephone-infinity/Manifest
new file mode 100644
index 00000000000..d038c6e3391
--- /dev/null
+++ b/games-fps/alephone-infinity/Manifest
@@ -0,0 +1,2 @@
+DIST MarathonInfinity.zip 30109883 SHA256 e8294df4dcd81b11d74ceedd6d13580ea13ca62d3952eb535b009387a9a4b90a SHA512 1f347615b96d2c07914cda78bdc6971311f3933af78debfcd9fa87a0a3048220726a082602b7a76f516f7b3dd3240d1ea843794ab34e4e9e7733342d9d9fe5b1 WHIRLPOOL a8fefe0dc8c625fcb2fba9da65148d622513189bbb62ae27545b27f39d610f96045498aeabe1a2b35487524e078041e14a17089dda488280fc038a6191ce0710
+DIST alephone-infinity.png 19193 SHA256 cb2e18364347b5e4e256401f2fd9b35b92ed3763375f2f4ea2c190915a7df5c0 SHA512 ad5c683aae4ee0afa306aaf33c9ad93a2eee59a4283166aada58a48a8dbbe8de62c8af0b04b143366448ef101ba8b2530cbc8bc5b3e1de62c5177775fae6bfd3 WHIRLPOOL b1179b771dc2b43823a648eb44b8197c3d777976820cc6650a7be7e8e415bfdff77b76a5331f9f56e8e49b7efd5df335b98f72e2e0645beb0c317e12706640c5
diff --git a/games-fps/alephone-infinity/alephone-infinity-20080622.ebuild b/games-fps/alephone-infinity/alephone-infinity-20080622.ebuild
new file mode 100644
index 00000000000..2b09ffc0a79
--- /dev/null
+++ b/games-fps/alephone-infinity/alephone-infinity-20080622.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Aleph One - Marathon Infinity"
+HOMEPAGE="http://trilogyrelease.bungie.org/"
+SRC_URI="http://files3.bungie.org/trilogy/MarathonInfinity.zip
+ mirror://gentoo/${PN}.png"
+
+LICENSE="bungie-marathon"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="games-fps/alephone"
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/Marathon\ Infinity
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r *
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry "alephone.sh infinity" "Aleph One - Marathon Infinity"
+
+ # Make sure the extra dirs exist in case the user wants to add some data
+ keepdir "${GAMES_DATADIR}"/${PN}/{Scripts,"Physics Models",Textures,Themes}
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play this scenario, run:"
+ elog "alephone.sh infinity"
+}
diff --git a/games-fps/alephone-infinity/metadata.xml b/games-fps/alephone-infinity/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/alephone-infinity/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/alephone/Manifest b/games-fps/alephone/Manifest
new file mode 100644
index 00000000000..4e0f40d026f
--- /dev/null
+++ b/games-fps/alephone/Manifest
@@ -0,0 +1,2 @@
+DIST AlephOne-20100424.tar.bz2 3180896 SHA256 d97089890ce99952027eaf6185baa6cb01b26c2882dfca9e68816dfe7076a5e6 SHA512 b246b662f4bf820238c09fbb6bc55289d0db0a9b5ba15ab2b91a53f93666e81583834fd8a64497074a2e270a2055de24b3be93bb56d58715f9d213b1f4c92494 WHIRLPOOL 3074f6c4ba4925b8a0f7718bdfb0d1084155421397a7604febfeae473635b970b3842152b9a3e200f2bc642790a0dc51e689aa3b18de2235d5697105060c7f93
+DIST AlephOne-20120514.tar.bz2 4716348 SHA256 6a7797af74cf3fae7f5505e64ffe57c56f7331521cb569bcc8b7d7041cb3718b SHA512 71e54341221485765b63c7c723f95e04d41c8e2cecf6bc3f885efc178f4c75fd88cdffe703c4bf41a5e7101fd8cef33797d00cd249e211b7de1b22fc639b4278 WHIRLPOOL 03ff5bd735a28a3113706f4de5837351404ddede2fabc09d45233b3bb646a9550f00cc1d30710a6f32952c452668e5f764fb427ef5495553f6c49ddcfcaef350
diff --git a/games-fps/alephone/alephone-20100424.ebuild b/games-fps/alephone/alephone-20100424.ebuild
new file mode 100644
index 00000000000..c58e340efd8
--- /dev/null
+++ b/games-fps/alephone/alephone-20100424.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils games
+
+MY_P=AlephOne-${PV}
+DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon"
+HOMEPAGE="http://source.bungie.org/"
+SRC_URI="mirror://sourceforge/marathon/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 BitstreamVera"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="alsa mad mpeg sndfile speex truetype vorbis"
+
+RDEPEND="media-libs/sdl-net
+ media-libs/sdl-image
+ media-libs/libsdl[video]
+ dev-libs/expat
+ dev-libs/zziplib
+ media-libs/libpng:0
+ alsa? ( media-libs/alsa-lib )
+ mad? ( media-libs/libmad )
+ mpeg? ( media-libs/smpeg )
+ virtual/opengl
+ virtual/glu
+ sndfile? ( media-libs/libsndfile )
+ speex? ( media-libs/speex )
+ truetype? ( media-libs/sdl-ttf )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed "s:GAMES_DATADIR:${GAMES_DATADIR}:g" \
+ "${FILESDIR}"/${PN}.sh > "${T}"/${PN}.sh \
+ || die
+
+ # try using the system expat - bug #251108
+ sed -i \
+ -e '/SUBDIRS/ s/Expat//' \
+ -e 's/Expat\/libexpat.a/-lexpat/' \
+ Source_Files/Makefile.am \
+ || die
+ sed -i \
+ -e '/Expat/d' \
+ configure.ac \
+ || die
+ rm -rf Source_Files/Expat
+
+ # for automake 1.12 compability - bug #422557
+ sed -i -e 's:AC_PROG_CC:&\nAC_PROG_OBJCXX:' configure.ac || die
+
+ epatch \
+ "${FILESDIR}"/${P}-boost_145.patch \
+ "${FILESDIR}"/${P}-gcc47.patch \
+ "${FILESDIR}"/${P}-png15.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --enable-lua \
+ $(use_enable alsa) \
+ $(use_enable mad) \
+ $(use_enable mpeg smpeg) \
+ --enable-opengl \
+ $(use_enable sndfile) \
+ $(use_enable speex) \
+ $(use_enable truetype ttf) \
+ $(use_enable vorbis)
+}
+
+src_install() {
+ default
+ dogamesbin "${T}"/${PN}.sh
+ doman docs/${PN}.6
+ dohtml docs/*.html
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "Read the docs and install the data files accordingly to play."
+ echo
+ elog "If you only want to install one scenario, read"
+ elog "http://traxus.bungie.org/index.php/Aleph_One_install_guide#Single_scenario_3"
+ elog "If you want to install multiple scenarios, read"
+ elog "http://traxus.bungie.org/index.php/Aleph_One_install_guide#Multiple_scenarios_3"
+ echo
+}
diff --git a/games-fps/alephone/alephone-20120514.ebuild b/games-fps/alephone/alephone-20120514.ebuild
new file mode 100644
index 00000000000..f08adb710dc
--- /dev/null
+++ b/games-fps/alephone/alephone-20120514.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils games
+
+MY_P=AlephOne-${PV}
+DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon"
+HOMEPAGE="http://source.bungie.org/"
+SRC_URI="mirror://sourceforge/marathon/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="alsa mad mpeg sndfile speex truetype vorbis"
+
+RDEPEND="media-libs/sdl-net
+ media-libs/sdl-image
+ media-libs/libsdl[video]
+ dev-libs/expat
+ dev-libs/zziplib
+ media-libs/libpng:0
+ alsa? ( media-libs/alsa-lib )
+ mad? ( media-libs/libmad )
+ mpeg? ( media-libs/smpeg )
+ virtual/opengl
+ virtual/glu
+ sndfile? ( media-libs/libsndfile )
+ speex? ( media-libs/speex )
+ truetype? ( media-libs/sdl-ttf )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed "s:GAMES_DATADIR:${GAMES_DATADIR}:g" \
+ "${FILESDIR}"/${PN}.sh > "${T}"/${PN}.sh \
+ || die
+
+ # try using the system expat - bug #251108
+ sed -i \
+ -e '/SUBDIRS/ s/Expat//' \
+ -e 's/Expat\/libexpat.a/-lexpat/' \
+ Source_Files/Makefile.am \
+ || die
+ sed -i \
+ -e '/Expat/d' \
+ configure.ac \
+ || die
+ rm -r Source_Files/Expat || die
+
+ # for automake 1.12 compability - bug #422557
+ sed -i -e 's:AC_PROG_CC:&\nAC_PROG_OBJCXX:' configure.ac || die
+
+ epatch \
+ "${FILESDIR}"/${P}-gcc47.patch \
+ "${FILESDIR}"/${P}-png15.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --enable-lua \
+ $(use_enable alsa) \
+ $(use_enable mad) \
+ $(use_enable mpeg smpeg) \
+ --enable-opengl \
+ $(use_enable sndfile) \
+ $(use_enable speex) \
+ $(use_enable truetype ttf) \
+ $(use_enable vorbis)
+}
+
+src_install() {
+ default
+ dogamesbin "${T}"/${PN}.sh
+ doman docs/${PN}.6
+ dohtml docs/*.html
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "Read the docs and install the data files accordingly to play."
+ echo
+ elog "If you only want to install one scenario, read"
+ elog "http://traxus.bungie.org/index.php/Aleph_One_install_guide#Single_scenario_3"
+ elog "If you want to install multiple scenarios, read"
+ elog "http://traxus.bungie.org/index.php/Aleph_One_install_guide#Multiple_scenarios_3"
+ echo
+}
diff --git a/games-fps/alephone/files/alephone-20100424-boost_145.patch b/games-fps/alephone/files/alephone-20100424-boost_145.patch
new file mode 100644
index 00000000000..30d8b78594d
--- /dev/null
+++ b/games-fps/alephone/files/alephone-20100424-boost_145.patch
@@ -0,0 +1,10 @@
+--- Source_Files/Network/Metaserver/network_metaserver.h.old 2011-01-20 23:29:21.000000000 +0100
++++ Source_Files/Network/Metaserver/network_metaserver.h 2011-01-20 23:30:07.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include <map>
+ #include <memory> // auto_ptr
+ #include <set>
++#include <stdexcept>
+
+ #include "Logging.h"
+
diff --git a/games-fps/alephone/files/alephone-20100424-gcc47.patch b/games-fps/alephone/files/alephone-20100424-gcc47.patch
new file mode 100644
index 00000000000..1347d64592f
--- /dev/null
+++ b/games-fps/alephone/files/alephone-20100424-gcc47.patch
@@ -0,0 +1,11 @@
+--- Source_Files/Lua/lua_templates.h.old 2012-10-15 09:55:32.395310163 +0200
++++ Source_Files/Lua/lua_templates.h 2012-10-15 09:56:14.991129122 +0200
+@@ -496,7 +496,7 @@
+ static index_t ToIndex(lua_State *L, int index) {
+ index_t to;
+ if(lua_isnil(L, index)) return -1;
+- else if(_lookup(L, index, to)) return to;
++ else if(L_LazyEnum::_lookup(L, index, to)) return to;
+ else {
+ std::string error;
+ if(lua_isnumber(L, index) || lua_isstring(L, index))
diff --git a/games-fps/alephone/files/alephone-20100424-png15.patch b/games-fps/alephone/files/alephone-20100424-png15.patch
new file mode 100644
index 00000000000..da99a845410
--- /dev/null
+++ b/games-fps/alephone/files/alephone-20100424-png15.patch
@@ -0,0 +1,19 @@
+--- Source_Files/RenderOther/IMG_savepng.c.old 2011-09-13 10:20:56.395157142 +0200
++++ Source_Files/RenderOther/IMG_savepng.c 2011-09-13 10:23:00.630142397 +0200
+@@ -29,6 +29,7 @@
+ #include <SDL/SDL.h>
+ #include <SDL/SDL_byteorder.h>
+ #include <png.h>
++#include <zlib.h>
+ #include "IMG_savepng.h"
+
+ int IMG_SavePNG(const char *file, SDL_Surface *surf,int compression, struct IMG_PNG_text* text, int num_text){
+@@ -85,7 +86,7 @@
+ goto savedone;
+ }
+ /* setup custom writer functions */
+- png_set_write_fn(png_ptr,(voidp)src,png_write_data,NULL);
++ png_set_write_fn(png_ptr,(png_voidp)src,png_write_data,NULL);
+
+ if (setjmp(png_jmpbuf(png_ptr))){
+ SDL_SetError("Unknown error writing PNG");
diff --git a/games-fps/alephone/files/alephone-20120514-gcc47.patch b/games-fps/alephone/files/alephone-20120514-gcc47.patch
new file mode 100644
index 00000000000..0f6cac2e94c
--- /dev/null
+++ b/games-fps/alephone/files/alephone-20120514-gcc47.patch
@@ -0,0 +1,11 @@
+--- AlephOne-20120514/Source_Files/Lua/lua_templates.h
++++ AlephOne-20120514/Source_Files/Lua/lua_templates.h
+@@ -496,7 +496,7 @@
+ static index_t ToIndex(lua_State *L, int index) {
+ index_t to;
+ if(lua_isnil(L, index)) return -1;
+- else if(_lookup(L, index, to)) return to;
++ else if(L_LazyEnum::_lookup(L, index, to)) return to;
+ else {
+ std::string error;
+ if(lua_isnumber(L, index) || lua_isstring(L, index))
diff --git a/games-fps/alephone/files/alephone-20120514-png15.patch b/games-fps/alephone/files/alephone-20120514-png15.patch
new file mode 100644
index 00000000000..bb99d7ed324
--- /dev/null
+++ b/games-fps/alephone/files/alephone-20120514-png15.patch
@@ -0,0 +1,11 @@
+--- AlephOne-20120514/Source_Files/RenderOther/IMG_savepng.c
++++ AlephOne-20120514/Source_Files/RenderOther/IMG_savepng.c
+@@ -86,7 +86,7 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_S
+ goto savedone;
+ }
+ /* setup custom writer functions */
+- png_set_write_fn(png_ptr,(voidp)src,png_write_data,NULL);
++ png_set_write_fn(png_ptr,(png_voidp)src,png_write_data,NULL);
+
+ if (setjmp(png_jmpbuf(png_ptr))){
+ SDL_SetError("Unknown error writing PNG");
diff --git a/games-fps/alephone/files/alephone.sh b/games-fps/alephone/files/alephone.sh
new file mode 100644
index 00000000000..62ac98f8577
--- /dev/null
+++ b/games-fps/alephone/files/alephone.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+DIR=$(dirname "${0}")
+CMD=$(basename "${0}")
+ALEPHONE=${CMD%%.sh}
+
+if [[ -z "${1}" ]]
+then
+ echo "Usage: ${0} SCENARIO FLAGS"
+ echo "Where SCENARIO is one of:"
+ for d in "GAMES_DATADIR"/alephone-*
+ do
+ echo " ${d##*/alephone-}"
+ done
+ exit 2
+fi
+
+export ALEPHONE_DATA="GAMES_DATADIR/alephone-${1}"
+
+shift
+
+# kill ARTS, because we're just that nice
+if artsshell terminate 2> /dev/null
+then
+ sleep 2
+fi
+
+"${DIR}"/"${ALEPHONE}" "$@"
diff --git a/games-fps/alephone/metadata.xml b/games-fps/alephone/metadata.xml
new file mode 100644
index 00000000000..c69d4eeed59
--- /dev/null
+++ b/games-fps/alephone/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">marathon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/alienarena/Manifest b/games-fps/alienarena/Manifest
new file mode 100644
index 00000000000..02bd8ef9f2e
--- /dev/null
+++ b/games-fps/alienarena/Manifest
@@ -0,0 +1,2 @@
+DIST alienarena-7.60-linux20120629.tar.gz 510316326 SHA256 05e4ce83574996e20ab8047dc30a20bf3fae72c39727a3a0bcc04a25bf746e04 SHA512 ec16e2546f34115e31ab24de3b5100c014910c773d200fdaf4302cf2b6930a1487aeffa504bed10a8310d62e15fed1ff67c3d679c1abd5a9750e34cfcac55ffd WHIRLPOOL b0df1c364db4b3d3ae4b603d3c7b3f9cdea416b0cbd7bbc71a573291df2f5c35e6147efa4406fcb9d57829407280d79b0b30581a03f23ac253c7c026060e3810
+DIST alienarena-7.65-linux20130207.tar.gz 598262165 SHA256 ef4594897afde951aa66cc972b4bf21aadc6ac545a432000c85cd72e2ad9d60e SHA512 43f22666835cf71ce5806432dd5df7464a3757fffee0968788fc2be9ed8fe6a1273d01021b803102b738b5b74e2a611c629f641de11d0d63c4d0f9e07e085fa0 WHIRLPOOL fe2f67cc9f68fb6e57acd5c8d31ba43f45e6872464cfdbaa63fec383a08d931959883025aa6b4d14132e29761ed781073268d0f48b7fecdd61cfd3119e88ba19
diff --git a/games-fps/alienarena/alienarena-20120629.ebuild b/games-fps/alienarena/alienarena-20120629.ebuild
new file mode 100644
index 00000000000..c0040edecdf
--- /dev/null
+++ b/games-fps/alienarena/alienarena-20120629.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils games
+
+MY_PN=alienarena-7.60
+DESCRIPTION="Fast-paced multiplayer deathmatch game"
+HOMEPAGE="http://red.planetarena.org/"
+SRC_URI="http://icculus.org/alienarena/Files/${MY_PN}-linux${PV}.tar.gz"
+
+LICENSE="GPL-2 free-noncomm"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dedicated +dga +vidmode"
+
+UIRDEPEND="virtual/jpeg
+ media-libs/openal
+ media-libs/libvorbis
+ media-libs/freetype:2
+ virtual/glu
+ virtual/opengl
+ dga? ( x11-libs/libXxf86dga )
+ vidmode? ( x11-libs/libXxf86vm )
+ net-misc/curl"
+UIDEPEND="dga? ( x11-proto/xf86dgaproto )
+ vidmode? ( x11-proto/xf86vidmodeproto )"
+RDEPEND="!dedicated? ( ${UIRDEPEND} )"
+DEPEND="${RDEPEND}
+ !dedicated? ( ${UIDEPEND} )
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_PN/_/.}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nodocs.patch
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --disable-silent-rules \
+ --disable-dependency-tracking \
+ --with-icondir=/usr/share/pixmaps \
+ --without-system-libode \
+ $(use_enable !dedicated client) \
+ $(use_with dga xf86dga) \
+ $(use_with vidmode xf86vm)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ if ! use dedicated ; then
+ make_desktop_entry ${PN} "Alien Arena"
+ fi
+ dodoc docs/README.txt README
+ prepgamesdirs
+}
diff --git a/games-fps/alienarena/alienarena-20130207.ebuild b/games-fps/alienarena/alienarena-20130207.ebuild
new file mode 100644
index 00000000000..98845f96ba3
--- /dev/null
+++ b/games-fps/alienarena/alienarena-20130207.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils gnome2-utils games
+
+MY_PN=alienarena-7.65
+DESCRIPTION="Fast-paced multiplayer deathmatch game"
+HOMEPAGE="http://red.planetarena.org/"
+SRC_URI="http://icculus.org/alienarena/Files/${MY_PN}-linux${PV}.tar.gz"
+
+LICENSE="GPL-2 free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated +dga +vidmode +zlib"
+
+UIRDEPEND="virtual/jpeg
+ media-libs/openal
+ media-libs/libvorbis
+ media-libs/freetype:2
+ virtual/glu
+ virtual/opengl
+ dga? ( x11-libs/libXxf86dga )
+ vidmode? ( x11-libs/libXxf86vm )
+ zlib? ( sys-libs/zlib )
+ net-misc/curl"
+UIDEPEND="dga? ( x11-proto/xf86dgaproto )
+ vidmode? ( x11-proto/xf86vidmodeproto )"
+RDEPEND="!dedicated? ( ${UIRDEPEND} )"
+DEPEND="${RDEPEND}
+ !dedicated? ( ${UIDEPEND} )
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_PN/_/.}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nodocs.patch
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --with-icondir=/usr/share/icons/hicolor/48x48/apps/ \
+ --without-system-libode \
+ $(use_enable !dedicated client) \
+ $(use_with zlib) \
+ $(use_with vidmode xf86vm) \
+ $(use_with dga xf86dga)
+}
+
+src_install() {
+ DOCS="docs/README.txt README" default
+ if ! use dedicated ; then
+ make_desktop_entry ${PN} "Alien Arena"
+ fi
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/alienarena/files/alienarena-20120629-nodocs.patch b/games-fps/alienarena/files/alienarena-20120629-nodocs.patch
new file mode 100644
index 00000000000..807e3b2aaa1
--- /dev/null
+++ b/games-fps/alienarena/files/alienarena-20120629-nodocs.patch
@@ -0,0 +1,16 @@
+diff -ru alienarena-7.51.orig/Makefile.am alienarena-7.51/Makefile.am
+--- alienarena-7.51.orig/Makefile.am 2011-03-05 19:34:07.000000000 -0500
++++ alienarena-7.51/Makefile.am 2011-03-13 01:39:37.179366503 -0500
+@@ -23,12 +23,6 @@
+ ACLOCAL_AMFLAGS = -I m4
+
+ # Alien Arena documents to be installed in $docdir
+-if INSTALL_DOCS
+-dist_doc_DATA = \
+- docs/license.txt \
+- docs/README.txt \
+- README
+-endif
+
+ # FUSE game server browser and Server management scripts
+ # COPYING and INSTALL are GNU/FSF-supplied documents.
diff --git a/games-fps/alienarena/files/alienarena-20130207-nodocs.patch b/games-fps/alienarena/files/alienarena-20130207-nodocs.patch
new file mode 100644
index 00000000000..807e3b2aaa1
--- /dev/null
+++ b/games-fps/alienarena/files/alienarena-20130207-nodocs.patch
@@ -0,0 +1,16 @@
+diff -ru alienarena-7.51.orig/Makefile.am alienarena-7.51/Makefile.am
+--- alienarena-7.51.orig/Makefile.am 2011-03-05 19:34:07.000000000 -0500
++++ alienarena-7.51/Makefile.am 2011-03-13 01:39:37.179366503 -0500
+@@ -23,12 +23,6 @@
+ ACLOCAL_AMFLAGS = -I m4
+
+ # Alien Arena documents to be installed in $docdir
+-if INSTALL_DOCS
+-dist_doc_DATA = \
+- docs/license.txt \
+- docs/README.txt \
+- README
+-endif
+
+ # FUSE game server browser and Server management scripts
+ # COPYING and INSTALL are GNU/FSF-supplied documents.
diff --git a/games-fps/alienarena/metadata.xml b/games-fps/alienarena/metadata.xml
new file mode 100644
index 00000000000..58b3ab039e5
--- /dev/null
+++ b/games-fps/alienarena/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+ <use>
+ <flag name="vidmode">Link against <pkg>x11-libs/libXxf86vm</pkg>.
+ Required for full-screen support.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/avp/Manifest b/games-fps/avp/Manifest
new file mode 100644
index 00000000000..87db9023f09
--- /dev/null
+++ b/games-fps/avp/Manifest
@@ -0,0 +1 @@
+DIST avp-20150214.tar.gz 1718303 SHA256 3cfed951482deae709a7e0743ebba9e3ef27aeec2d68d0588e6361b6368a4a85 SHA512 c485a55ff455498bcf82bc17f2056d35d4c646bdf7809f4c326fc7063a9ce5db9e4893af67dff3f6bedb7d5f96e82f792d7f516044fdbab638113091a5505158 WHIRLPOOL 5fd6ee1d893c0feddab44fd84fb7d3bcd231bd337e28bf2089a2120b367bdc5f22bf9ddad5cb0b911065944266fe7d7efb207e64d34b7ba0090c252e74e8efd3
diff --git a/games-fps/avp/avp-20150214.ebuild b/games-fps/avp/avp-20150214.ebuild
new file mode 100644
index 00000000000..a91dbe9d092
--- /dev/null
+++ b/games-fps/avp/avp-20150214.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils games
+
+DESCRIPTION="Linux port of Aliens vs Predator"
+HOMEPAGE="http://www.icculus.org/avp/"
+SRC_URI="http://www.icculus.org/avp/files/${P}.tar.gz"
+
+LICENSE="AvP"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/openal
+ media-libs/libsdl[video,joystick,opengl]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CMAKE_BUILD_TYPE=Release
+
+src_configure() {
+ local mycmakeargs=(
+ "-DCMAKE_VERBOSE_MAKEFILE=TRUE"
+ -DSDL_TYPE=SDL
+ -DOPENGL_TYPE=OPENGL
+ "-DINSTALL_PREFIX=${GAMES_PREFIX}"
+ "-DINSTALL_DATADIR=${GAMES_DATADIR}/${PN}"
+ "-DINSTALL_BINDIR=${GAMES_BINDIR}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ dogamesbin "${BUILD_DIR}/${PN}"
+ dodoc README
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Please follow the instructions in /usr/share/doc/${PF}"
+ elog "to install the rest of the game."
+}
diff --git a/games-fps/avp/metadata.xml b/games-fps/avp/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/avp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/blackshades/Manifest b/games-fps/blackshades/Manifest
new file mode 100644
index 00000000000..4b02f10e8c1
--- /dev/null
+++ b/games-fps/blackshades/Manifest
@@ -0,0 +1,2 @@
+DIST Textures.tar.bz2 340110 SHA256 084f4592e1c83a0ae79a14823f59fe210dc6ae83ff35111972d3b0239b276607 SHA512 42a2a28072972b0919a67a17ab06cf74d6bb611cbf91ff017d72726fa2d01b3c5dec905c6760a199b710eabfff8d980867269d6ad3476096beab5c4edb2cae10 WHIRLPOOL 7e182176a216939fd553f305b3cb49e1c1bc384a157571c0385a0d9a74a2ea19bbaca618e6ad8f0591940f564bd0f43b408ad75657ff2e0cf73ac6b14348b52b
+DIST blackshades-20070723.tar.bz2 761669 SHA256 2fbd1ed3778a834010fe4de94063149b60461d6e9d155b281747c2e14fc30056 SHA512 9477c59d685227650980c16aeb59f567764bc983c01da4e256b2ec582b5a063ef89222eb4ab0d42552bf6a4ffd95ba270229800decc9ba7a9b289f093c5b9c61 WHIRLPOOL 2eed49d46090509c4ddd1638b6066c7017453beae646d8dd7e42d6f54d8f8195b0a7f07b7ec22164f952acc0902e2a4c0dcb915dae8cd3e46567a14e68a92f02
diff --git a/games-fps/blackshades/blackshades-20070723.ebuild b/games-fps/blackshades/blackshades-20070723.ebuild
new file mode 100644
index 00000000000..068814f5e36
--- /dev/null
+++ b/games-fps/blackshades/blackshades-20070723.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="you control a psychic bodyguard, and try to protect the VIP"
+HOMEPAGE="http://www.wolfire.com/blackshades.html
+ http://www.icculus.org/blackshades/"
+SRC_URI="http://filesingularity.timedoctor.org/Textures.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="blackshades"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="virtual/opengl
+ virtual/glu
+ media-libs/libvorbis
+ media-libs/openal
+ media-libs/freealut
+ media-libs/libsdl"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ rm -rf Data/Textures
+ rm -f ../Textures/{,Blood/}._*
+ mv -f ../Textures Data || die "mv failed"
+ epatch "${FILESDIR}"/${PN}-datadir.patch
+ sed -i \
+ -e "s/-O2 \(-Wall\) -g/${CXXFLAGS} \1/" \
+ -e "/^LINKER/s:$: ${LDFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i "s:@DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ Source/Main.cpp \
+ || die "sed Main.cpp failed"
+}
+
+src_compile() {
+ emake bindir
+ emake
+}
+
+src_install() {
+ newgamesbin objs/blackshades ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r Data
+ dodoc IF_THIS_IS_A_README_YOU_HAVE_WON Readme TODO uDevGame_Readme
+ make_desktop_entry ${PN} "Black Shades"
+ prepgamesdirs
+}
diff --git a/games-fps/blackshades/files/blackshades-datadir.patch b/games-fps/blackshades/files/blackshades-datadir.patch
new file mode 100644
index 00000000000..0050271705a
--- /dev/null
+++ b/games-fps/blackshades/files/blackshades-datadir.patch
@@ -0,0 +1,18 @@
+--- Source/Main.cpp
++++ Source/Main.cpp
+@@ -1,6 +1,7 @@
+ /********************> Headers <*****/
+
+ #include "Game.h"
++#include <unistd.h>
+
+
+
+@@ -17,6 +18,7 @@
+ int main( int argc, char *argv[] )
+
+ {
++ chdir("@DATADIR@");
+
+
+ #ifdef OS9
diff --git a/games-fps/blackshades/files/blackshades-freealut.patch b/games-fps/blackshades/files/blackshades-freealut.patch
new file mode 100644
index 00000000000..4c0324fa3b0
--- /dev/null
+++ b/games-fps/blackshades/files/blackshades-freealut.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -8,7 +8,7 @@
+
+ CFLAGS := -O2 -Wall -g $(shell sdl-config --cflags) -I$(SRCDIR) -include Source/Support.h
+ CXXFLAGS := $(CFLAGS)
+-LDFLAGS := $(shell sdl-config --libs) -lGL -lGLU -lopenal # -framework QuickTime
++LDFLAGS := $(shell sdl-config --libs) -lGL -lGLU -lopenal -lalut # -framework QuickTime
+
+ # Don't want ogg?
+ #CFLAGS += -DNOOGG
diff --git a/games-fps/blackshades/files/blackshades-gcc42.patch b/games-fps/blackshades/files/blackshades-gcc42.patch
new file mode 100644
index 00000000000..fecf8f67d82
--- /dev/null
+++ b/games-fps/blackshades/files/blackshades-gcc42.patch
@@ -0,0 +1,35 @@
+--- Source/GameDraw.cpp
++++ Source/GameDraw.cpp
+@@ -36,7 +36,7 @@
+
+ /*********************> DrawGLScene() <*****/
+
+-int Game::DrawGLScene(GLvoid)
++int Game::DrawGLScene(void)
+
+ {
+
+--- Source/Game.h
++++ Source/Game.h
+@@ -75,8 +75,8 @@
+
+ //GL functions
+ GLvoid ReSizeGLScene(float fov, float near);
+- int DrawGLScene(GLvoid);
+- int InitGL(GLvoid);
++ int DrawGLScene(void);
++ int InitGL(void);
+ void LoadingScreen(float percent);
+
+ //Game Functions
+--- Source/GameInitDispose.cpp
++++ Source/GameInitDispose.cpp
+@@ -3913,7 +3913,7 @@
+
+
+
+-int Game::InitGL(GLvoid)
++int Game::InitGL(void)
+
+ {
+
diff --git a/games-fps/blackshades/metadata.xml b/games-fps/blackshades/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/blackshades/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/darkplaces/Manifest b/games-fps/darkplaces/Manifest
new file mode 100644
index 00000000000..1ab1250ce47
--- /dev/null
+++ b/games-fps/darkplaces/Manifest
@@ -0,0 +1,4 @@
+DIST darkplacesengine20110628.zip 23377408 SHA256 d2464c681e3fdcc66cb090e79c44c0c173a43b6f181a12e500b0b1fd7d73ffce SHA512 bf44933470be2856a80ebd73a0cb531c6d22e69da5be24bc52175998ab687b4112c88423a6b42a9a4ed746e0f96c1bb39e188a037a98ea596cf7b6183e390038 WHIRLPOOL b4214be8a9c9aadf02a92c9b7e54d508df38f9e38f650f839a8ea43d9c0768641dbf59c71b210d337f591fac2d77a21a14e7900a3038d1af828f064bf3368071
+DIST darkplacesengine20130304.zip 29427833 SHA256 e1858dcba033b1dfc6e685482745b7137ceb23dfd710671971cd5e34529a9f44 SHA512 6672160ad6ed34bb45262f03b7a7671d65aa88ca44abab616f54cd1a8e5240dcb7b8a3a7c364fc8de3e9e2acf458e5c129311a0c52b8c6b29d9a4cafa5188b15 WHIRLPOOL 5566c7de789735fb984c5b64cf7ece2e948b87e170e16f434d5015f70baad901aadc251bb25a32926f43ced903daaa914a51024c08a64f4edcf1a9003aab1261
+DIST fuhquake-lits.rar 8388829 SHA256 066fd58e2a6d157a1aa7925334d7e3e6cffa7f5c556e707bc31da8bfecea873c SHA512 6e59f5e08a6c401b329b86b0cd677a04b1a5aee11f24973c77c9e7ea50cab9dedf4fc15c4f3d6b73bdc87bacdc9612a3c244d0a4ceceef943abb6e256ac23925 WHIRLPOOL d398b57c03d02c8180f8ca93f6964ac2118ef50cace3ecbc9da9113b1e91ed3a7b7e5473ebb9ad2f5198828eb8565c7c0470aea2095152b2898335562bef821d
+DIST id1.pk3 350470 SHA256 f1ee6e144d1942ebf91a8c71d0333eac94c73efae35377fbe7ae43e0e4ab37dc SHA512 d4d7233bc1e5049e89d09448818219b0ce7941fecde5381cd95933e4c96ebc9b4e34ff7eae5eb5d0d1e3cc2ceb4f5254f4d600aded7dda373713149817621331 WHIRLPOOL 30fe7e6d6ac6408c54e704586d4f4e15d139c0330e4f3e758651bfc2e6582eadae08c590e87264cfb26faae56a7033b383d51f93bf54ddfce7db38e47d569280
diff --git a/games-fps/darkplaces/darkplaces-20110628.ebuild b/games-fps/darkplaces/darkplaces-20110628.ebuild
new file mode 100644
index 00000000000..5c7aa762e90
--- /dev/null
+++ b/games-fps/darkplaces/darkplaces-20110628.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit unpacker eutils flag-o-matic games
+
+# Latest versions are in http://icculus.org/twilight/darkplaces/files/
+MY_PV=${PV/_beta/beta}
+MY_ENGINE="${PN}engine${MY_PV}.zip"
+
+# Different Quake 1 engines expect the lights in different directories
+# http://www.fuhquake.net/download.html and http://www.kgbsyndicate.com/romi/
+MY_LIGHTS="fuhquake-lits.rar"
+
+DESCRIPTION="Enhanced engine for iD Software's Quake 1"
+HOMEPAGE="http://icculus.org/twilight/darkplaces/"
+SRC_URI="http://icculus.org/twilight/${PN}/files/${MY_ENGINE}
+ lights? (
+ http://www.fuhquake.net/files/extras/${MY_LIGHTS}
+ http://www.kgbsyndicate.com/romi/id1.pk3 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="alsa cdinstall cdsound debug dedicated demo lights opengl oss sdl textures"
+
+UIRDEPEND="virtual/jpeg
+ media-libs/libogg
+ media-libs/libvorbis
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ sdl? ( media-libs/libsdl )
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+UIDEPEND="x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto"
+RDEPEND="net-misc/curl
+ cdinstall? ( games-fps/quake1-data )
+ demo? ( games-fps/quake1-demodata )
+ textures? ( >=games-fps/quake1-textures-20050820 )
+ opengl? ( ${UIRDEPEND} )
+ !opengl? ( sdl? ( ${UIRDEPEND} ) )
+ !opengl? ( !sdl? ( !dedicated? ( ${UIRDEPEND} ) ) )"
+DEPEND="lights? ( || (
+ app-arch/unrar
+ app-arch/rar ) )
+ opengl? (
+ ${UIRDEPEND}
+ ${UIDEPEND} )
+ !opengl? ( sdl? (
+ ${UIRDEPEND}
+ ${UIDEPEND} ) )
+ !opengl? ( !sdl? ( !dedicated? (
+ ${UIRDEPEND}
+ ${UIDEPEND} ) ) )
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}/${PN}
+dir=${GAMES_DATADIR}/quake1
+
+opengl_client() { use opengl || ( ! use dedicated && ! use sdl ) }
+
+src_unpack() {
+ if use lights ; then
+ unpack "${MY_LIGHTS}"
+ unpack_zip "${DISTDIR}"/id1.pk3
+ mv *.lit maps/ || die
+ mv ReadMe.txt rtlights.txt
+ fi
+ unpack "${MY_ENGINE}"
+
+ unpack ./${PN}*.zip
+}
+
+src_prepare() {
+ rm "${WORKDIR}"/README-SDL.txt
+ cd "${S}"
+ rm mingw_note.txt
+
+ strip-flags
+
+ # Only additional CFLAGS optimization is the -march flag
+ local march=$(get-flag -march)
+ sed -i \
+ -e "s:-lasound:$(pkg-config --libs alsa):" \
+ -e "/^CPUOPTIMIZATIONS/d" \
+ -e '/^OPTIM_RELEASE/s/=.*/=$(CFLAGS)/' \
+ -e '/^OPTIM_DEBUG/s/=.*/=$(CFLAGS)/' \
+ -e '/^LDFLAGS_DEBUG/s/$/ $(LDFLAGS)/' \
+ -e '/^LDFLAGS_RELEASE/s/$/ $(LDFLAGS)/' \
+ -e "s:strip:true:" \
+ makefile.inc || die "sed makefile.inc failed"
+
+ if ! use cdsound ; then
+ # Turn the CD accesses off
+ sed -i \
+ -e "s:/dev/cdrom:/dev/null:" \
+ cd_linux.c || die "sed cd_linux.c failed"
+ sed -i \
+ -e 's:COM_CheckParm("-nocdaudio"):1:' \
+ cd_shared.c || die "sed cd_shared.c failed"
+ fi
+}
+
+src_compile() {
+ local opts="DP_FS_BASEDIR=\"${dir}\" DP_LINK_TO_LIBJPEG=1"
+
+ # Preferred sound is alsa
+ local sound_api="NULL"
+ use oss && sound_api="OSS"
+ use alsa && sound_api="ALSA"
+ opts="${opts} DP_SOUND_API=${sound_api}"
+
+ local type="release"
+ use debug && type="debug"
+
+ # Only compile a maximum of 1 client
+ if use sdl ; then
+ emake ${opts} "sdl-${type}" || die "emake sdl-${type} failed"
+ elif opengl_client ; then
+ emake ${opts} "cl-${type}" || die "emake cl-${type} failed"
+ fi
+
+ if use dedicated ; then
+ emake ${opts} "sv-${type}" || die "emake sv-${type} failed"
+ fi
+}
+
+src_install() {
+ if opengl_client || use sdl ; then
+ local type=glx
+
+ use sdl && type=sdl
+
+ # darkplaces executable is needed, even just for demo
+ newgamesbin "${PN}-${type}" ${PN} || die "newgamesbin client failed"
+ newicon darkplaces72x72.png ${PN}.png || die "newicon failed"
+
+ if use demo ; then
+ # Install command-line for demo, even if not desktop entry
+ games_make_wrapper ${PN}-demo "${PN} -game demo"
+ fi
+
+ if use demo && ! use cdinstall ; then
+ make_desktop_entry ${PN}-demo "Dark Places (Demo)"
+ else
+ # Full version takes precedence over demo
+ make_desktop_entry ${PN} "Dark Places"
+ fi
+ fi
+
+ if use dedicated ; then
+ newgamesbin ${PN}-dedicated ${PN}-ded || die "newgamesbin ded failed"
+ fi
+
+ dodoc *.txt ChangeLog todo "${WORKDIR}"/*.txt
+
+ if use lights ; then
+ insinto "${dir}"/id1
+ doins -r "${WORKDIR}"/{cubemaps,maps} || die "doins cubemaps maps failed"
+ if use demo ; then
+ # Set up symlinks, for the demo levels to include the lights
+ local d
+ for d in cubemaps maps ; do
+ dosym "${dir}/id1/${d}" "${dir}/demo/${d}"
+ done
+ fi
+ fi
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall && ! use demo ; then
+ elog "Place pak0.pak and pak1.pak in ${dir}/id1"
+ fi
+
+ if use sdl ; then
+ ewarn "Select opengl with alsa, instead of sdl USE flag, for better audio latency."
+ fi
+}
diff --git a/games-fps/darkplaces/darkplaces-20130304.ebuild b/games-fps/darkplaces/darkplaces-20130304.ebuild
new file mode 100644
index 00000000000..bfbc88281aa
--- /dev/null
+++ b/games-fps/darkplaces/darkplaces-20130304.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit unpacker eutils flag-o-matic games
+
+# Latest versions are in http://icculus.org/twilight/darkplaces/files/
+MY_PV=${PV/_beta/beta}
+MY_ENGINE="${PN}engine${MY_PV}.zip"
+
+# Different Quake 1 engines expect the lights in different directories
+# http://www.fuhquake.net/download.html and http://www.kgbsyndicate.com/romi/
+MY_LIGHTS="fuhquake-lits.rar"
+
+DESCRIPTION="Enhanced engine for iD Software's Quake 1"
+HOMEPAGE="http://icculus.org/twilight/darkplaces/"
+SRC_URI="http://icculus.org/twilight/${PN}/files/${MY_ENGINE}
+ lights? (
+ http://www.fuhquake.net/files/extras/${MY_LIGHTS}
+ http://www.kgbsyndicate.com/romi/id1.pk3 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa cdinstall cdsound debug dedicated demo lights opengl oss sdl textures"
+
+UIRDEPEND="virtual/jpeg
+ media-libs/libogg
+ media-libs/libvorbis
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ sdl? ( media-libs/libsdl )
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+UIDEPEND="x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto"
+RDEPEND="net-misc/curl
+ cdinstall? ( games-fps/quake1-data )
+ demo? ( games-fps/quake1-demodata )
+ textures? ( >=games-fps/quake1-textures-20050820 )
+ opengl? ( ${UIRDEPEND} )
+ !opengl? ( sdl? ( ${UIRDEPEND} ) )
+ !opengl? ( !sdl? ( !dedicated? ( ${UIRDEPEND} ) ) )"
+DEPEND="lights? ( || (
+ app-arch/unrar
+ app-arch/rar ) )
+ opengl? (
+ ${UIRDEPEND}
+ ${UIDEPEND} )
+ !opengl? ( sdl? (
+ ${UIRDEPEND}
+ ${UIDEPEND} ) )
+ !opengl? ( !sdl? ( !dedicated? (
+ ${UIRDEPEND}
+ ${UIDEPEND} ) ) )
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}/${PN}
+dir=${GAMES_DATADIR}/quake1
+
+opengl_client() { use opengl || ( ! use dedicated && ! use sdl ) }
+
+src_unpack() {
+ if use lights ; then
+ unpack "${MY_LIGHTS}"
+ unpack_zip "${DISTDIR}"/id1.pk3
+ mv *.lit maps/ || die
+ mv ReadMe.txt rtlights.txt
+ fi
+ unpack "${MY_ENGINE}"
+ unpack ./${PN}*.zip
+}
+
+src_prepare() {
+ rm "${WORKDIR}"/README-SDL.txt
+ cd "${S}"
+ rm mingw_note.txt
+
+ strip-flags
+
+ # Only additional CFLAGS optimization is the -march flag
+ local march=$(get-flag -march)
+ sed -i \
+ -e "s:-lasound:$(pkg-config --libs alsa):" \
+ -e "/^CPUOPTIMIZATIONS/d" \
+ -e '/^OPTIM_RELEASE/s/=.*/=$(CFLAGS)/' \
+ -e '/^OPTIM_DEBUG/s/=.*/=$(CFLAGS)/' \
+ -e '/^LDFLAGS_DEBUG/s/$/ $(LDFLAGS)/' \
+ -e '/^LDFLAGS_RELEASE/s/$/ $(LDFLAGS)/' \
+ -e "s:strip:true:" \
+ makefile.inc || die
+
+ if ! use cdsound ; then
+ # Turn the CD accesses off
+ sed -i \
+ -e "s:/dev/cdrom:/dev/null:" \
+ cd_linux.c || die
+ sed -i \
+ -e 's:COM_CheckParm("-nocdaudio"):1:' \
+ cd_shared.c || die
+ fi
+}
+
+src_compile() {
+ local opts="DP_FS_BASEDIR=\"${dir}\" DP_LINK_TO_LIBJPEG=1"
+
+ # Preferred sound is alsa
+ local sound_api="NULL"
+ use oss && sound_api="OSS"
+ use alsa && sound_api="ALSA"
+ opts="${opts} DP_SOUND_API=${sound_api}"
+
+ local type="release"
+ use debug && type="debug"
+
+ # Only compile a maximum of 1 client
+ if use sdl ; then
+ emake ${opts} "sdl-${type}"
+ elif opengl_client ; then
+ emake ${opts} "cl-${type}"
+ fi
+
+ if use dedicated ; then
+ emake ${opts} "sv-${type}"
+ fi
+}
+
+src_install() {
+ if opengl_client || use sdl ; then
+ local type=glx
+
+ use sdl && type=sdl
+
+ # darkplaces executable is needed, even just for demo
+ newgamesbin "${PN}-${type}" ${PN}
+ newicon darkplaces72x72.png ${PN}.png
+
+ if use demo ; then
+ # Install command-line for demo, even if not desktop entry
+ games_make_wrapper ${PN}-demo "${PN} -game demo"
+ fi
+
+ if use demo && ! use cdinstall ; then
+ make_desktop_entry ${PN}-demo "Dark Places (Demo)"
+ else
+ # Full version takes precedence over demo
+ make_desktop_entry ${PN} "Dark Places"
+ fi
+ fi
+
+ if use dedicated ; then
+ newgamesbin ${PN}-dedicated ${PN}-ded
+ fi
+
+ dodoc *.txt ChangeLog todo "${WORKDIR}"/*.txt
+
+ if use lights ; then
+ insinto "${dir}"/id1
+ doins -r "${WORKDIR}"/{cubemaps,maps}
+ if use demo ; then
+ # Set up symlinks, for the demo levels to include the lights
+ local d
+ for d in cubemaps maps ; do
+ dosym "${dir}/id1/${d}" "${dir}/demo/${d}"
+ done
+ fi
+ fi
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall && ! use demo ; then
+ elog "Place pak0.pak and pak1.pak in ${dir}/id1"
+ fi
+
+ if use sdl ; then
+ ewarn "Select opengl with alsa, instead of sdl USE flag, for better audio latency."
+ fi
+}
diff --git a/games-fps/darkplaces/metadata.xml b/games-fps/darkplaces/metadata.xml
new file mode 100644
index 00000000000..bf95b7a756e
--- /dev/null
+++ b/games-fps/darkplaces/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="cdsound">Enables using CD audio in the engine</flag>
+ <flag name="demo">Uses the demo data from quake1 (quake1-demodata)</flag>
+ <flag name="lights">Install and setup the updated light maps</flag>
+ <flag name="textures">Install and setup the updated textures</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/doom-data/Manifest b/games-fps/doom-data/Manifest
new file mode 100644
index 00000000000..c4b5680d5d2
--- /dev/null
+++ b/games-fps/doom-data/Manifest
@@ -0,0 +1 @@
+DIST doom1.wad.bz2 1689021 SHA256 77009084330d2d14540ffd78b05deef4cb5cb4058cb50cf17316fede43d4dcae SHA512 f3aa78fd1e36d2dbd176c8c5284f8cee4f39d8e34df5386fd668565e752410e2b776413c78c1e7a3571695a1668f1e4820338ebc9a2b1a0ed1a81896260534fe WHIRLPOOL 801adc114c3d2c0029e80608641e7d4e2330334305b38fc05ba1bc4caf2db188635c862d2a743b54ce8b908b541e012743242d7b91d45d4ef2a6b514c5e338a5
diff --git a/games-fps/doom-data/doom-data-1-r1.ebuild b/games-fps/doom-data/doom-data-1-r1.ebuild
new file mode 100644
index 00000000000..3cca2360fdf
--- /dev/null
+++ b/games-fps/doom-data/doom-data-1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="collection of doom wad files from id"
+HOMEPAGE="http://www.idsoftware.com/"
+SRC_URI="mirror://gentoo/doom1.wad.bz2"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="amd64 arm sparc x86"
+IUSE="doomsday"
+
+DEPEND="doomsday? ( games-fps/doomsday )
+ !<=games-fps/freedoom-0.4.1"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/doom-data
+ doins *.wad
+ if use doomsday; then
+ # Make wrapper for doomsday
+ games_make_wrapper doomsday-demo "jdoom -file \
+ ${GAMES_DATADIR}/doom-data/doom1.wad"
+ make_desktop_entry doomsday-demo "Doomsday - Demo"
+ fi
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if use doomsday; then
+ elog "To use the doomsday engine, run doomsday-demo"
+ else
+ elog "A Doom engine is required to play the wad"
+ elog "Enable the doomsday use flag if you want to use"
+ elog " the doomsday engine"
+ fi
+}
diff --git a/games-fps/doom-data/metadata.xml b/games-fps/doom-data/metadata.xml
new file mode 100644
index 00000000000..c6592feff3b
--- /dev/null
+++ b/games-fps/doom-data/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="doomsday">Add wrapper to run it within doomsday</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/doom3-cdoom/Manifest b/games-fps/doom3-cdoom/Manifest
new file mode 100644
index 00000000000..bb4fc9cae12
--- /dev/null
+++ b/games-fps/doom3-cdoom/Manifest
@@ -0,0 +1 @@
+DIST classic_doom_3_131.zip 212329377 SHA256 32ed98f373573906d5f5082ad9a09ae0d65e4ae7c47e42cee8468b95e4ce8171
diff --git a/games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild b/games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild
new file mode 100644
index 00000000000..ee0796064b0
--- /dev/null
+++ b/games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Doom 1 conversion for Doom 3"
+MOD_NAME="Classic Doom"
+MOD_DIR="cdoom"
+MOD_ICON="cdoom.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://cdoom.d3files.com/"
+SRC_URI="classic_doom_3_${PV//.}.zip"
+
+LICENSE="GameFront"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch bindist"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "http://www.filefront.com/8748743"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ cd ${MOD_DIR} || die
+ rm -f *.{bat,url} cdoom_{dll,mac}.pk4
+}
diff --git a/games-fps/doom3-cdoom/metadata.xml b/games-fps/doom3-cdoom/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-cdoom/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-chextrek/Manifest b/games-fps/doom3-chextrek/Manifest
new file mode 100644
index 00000000000..eb91d30f5a8
--- /dev/null
+++ b/games-fps/doom3-chextrek/Manifest
@@ -0,0 +1 @@
+DIST chextrek_beta_052.zip 97683796 SHA256 ddaecd0d9868a38455682c6fd870aac4724c53d8ac84cc93b9d8405fe7d72396
diff --git a/games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild b/games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild
new file mode 100644
index 00000000000..f3969fd2d92
--- /dev/null
+++ b/games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Green slimeballs mod for kids"
+MOD_NAME="Chex Trek: Beyond the Quest"
+MOD_DIR="chextrek"
+MOD_ICON="flem.ico"
+
+inherit games-mods
+
+HOMEPAGE="http://doom3.filefront.com/file/Chex_Trek_Beyond_the_Quest;82325"
+SRC_URI="chextrek_beta_${PV/.}.zip"
+
+LICENSE="GameFront"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch bindist"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "http://www.filefront.com/8396958"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ mv -f chextrek_beta* ${MOD_DIR} || die
+}
+
+pkg_postinst() {
+ games-mods_pkg_postinst
+
+ elog "Press 'E' to open doors in the game."
+ elog "Press 'M' to toggle the map."
+}
diff --git a/games-fps/doom3-chextrek/metadata.xml b/games-fps/doom3-chextrek/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-chextrek/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild b/games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild
new file mode 100644
index 00000000000..387a7fce568
--- /dev/null
+++ b/games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils cdrom games
+
+DESCRIPTION="Doom 3 - data portion"
+HOMEPAGE="http://www.doom3.com/"
+SRC_URI=""
+
+LICENSE="DOOM3"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+RDEPEND="games-fps/doom3"
+
+S=${WORKDIR}
+
+src_install() {
+ cdrom_get_cds \
+ Setup/Data/base/pak002.pk4 \
+ Setup/Data/base/pak000.pk4 \
+ Setup/Data/base/pak003.pk4
+
+ insinto "${GAMES_PREFIX_OPT}"/doom3/base
+
+ einfo "Copying files from CD 1..."
+ doins "${CDROM_ROOT}"/Setup/Data/base/pak002.pk4 \
+ || die "doins pak002.pk4 failed"
+
+ cdrom_load_next_cd
+ einfo "Copying files from CD 2..."
+ doins "${CDROM_ROOT}"/Setup/Data/base/pak00{0,1}.pk4 \
+ || die "doins pak00{0,1}.pk4 failed"
+
+ cdrom_load_next_cd
+ einfo "Copying files from CD 3..."
+ doins "${CDROM_ROOT}"/Setup/Data/base/pak00{3,4}.pk4 \
+ || die "doins pak00{3,4}.pk4 failed"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "This is just the data portion of the game. You will need to install"
+ elog "games-fps/doom3 to play the game."
+}
diff --git a/games-fps/doom3-data/metadata.xml b/games-fps/doom3-data/metadata.xml
new file mode 100644
index 00000000000..014b5dd07f0
--- /dev/null
+++ b/games-fps/doom3-data/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+This is the data portion of the commercial Id Software game Doom III. This is
+commercial software and requires the purchase of Doom III from any retailer.
+This package copies files from the Doom III media and is interactive, in that
+regard. To play the game, you will still need games-fps/doom3 merged.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/doom3-demo/Manifest b/games-fps/doom3-demo/Manifest
new file mode 100644
index 00000000000..f2f9f49f8fa
--- /dev/null
+++ b/games-fps/doom3-demo/Manifest
@@ -0,0 +1,2 @@
+DIST doom3-linux-1.1.1286-demo.x86.run 485257318 SHA256 b42260fd08feb13c2f035a3746f8c1e3472151f0f781b8a2d1da231dae818083 SHA512 9eeada64b60ef06c8380411050ea794a863c9672578bf4593a35835c6d4b7dc5d0ba8e8cb5e5c46cbbdfd7410483e5f6321ac1393655f29b481aea99dc00b3db WHIRLPOOL 090ecbb4a049a6def58cedea831c4595026087bd6f5ae2920d7a82f269fa26972aad1b383e7a004cc7d9f131f66967b604a85230dddcd72ee5fb4a15938a58f1
+DIST doom3.png 6502 SHA256 c9a701498a7b0f923182bf9f11aac8d2193026e509ae3643a5bc118b1a458c6b SHA512 9a2b3831babbf3fa0d354e1a4a779c972676edbcc0b287de9b9f3eb830e0a00d557ba9645fbf0e58e07d5705efb0ef2b7ab96cd92493e2a0afc30c8842c0043b WHIRLPOOL e568cdcf3ea510b9865a4c1f1577713c6a63954a22e572311a321c8c73cf70ca68b76134d45a9f1c77e2d6b464ec29e098b7fe39ce1eb38889f83fc3c9bfc05f
diff --git a/games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild b/games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild
new file mode 100644
index 00000000000..a5c73df4610
--- /dev/null
+++ b/games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Doom III - 3rd installment of the classic id 3D first-person shooter"
+HOMEPAGE="http://www.doom3.com/"
+SRC_URI="mirror://3dgamers/doom3/doom3-linux-${PV}-demo.x86.run
+ mirror://idsoftware/doom3/linux/doom3-linux-${PV}-demo.x86.run
+ mirror://gentoo/doom3.png"
+
+LICENSE="DOOM3"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip mirror"
+QA_EXECSTACK="${GAMES_PREFIX_OPT:1}/${PN}/*"
+
+# Do not remove the amd64 dep unless you are POSITIVE that it is not necessary.
+# See bug #88227 for more.
+RDEPEND="sys-libs/glibc
+ sys-libs/libstdc++-v3:5
+ amd64? ( sys-libs/glibc[multilib] sys-libs/libstdc++-v3:5[multilib] )
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+src_unpack() {
+ unpack_makeself doom3-linux-${PV}-demo.x86.run
+}
+
+src_install() {
+ insinto "${dir}"
+ doins License.txt README version.info
+
+ insinto "${dir}"/demo
+ doins demo/* || die "doins base"
+
+ exeinto "${dir}"
+ doexe gamex86.so bin/Linux/x86/doom.x86
+
+ newicon "${DISTDIR}"/doom3.png ${PN}.png
+
+ games_make_wrapper ${PN} ./doom.x86 "${dir}" "${dir}"
+ make_desktop_entry ${PN} "Doom III (Demo)"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "To play the game run:"
+ elog " doom3-demo"
+}
diff --git a/games-fps/doom3-demo/metadata.xml b/games-fps/doom3-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-ducttape/Manifest b/games-fps/doom3-ducttape/Manifest
new file mode 100644
index 00000000000..d0d642fc56e
--- /dev/null
+++ b/games-fps/doom3-ducttape/Manifest
@@ -0,0 +1 @@
+DIST ducttape0006.zip 65641 SHA256 2bd694dddc49466defbf8ac2cf32b1778145900cec1e7c255d91c050ae6b7423
diff --git a/games-fps/doom3-ducttape/doom3-ducttape-0006-r1.ebuild b/games-fps/doom3-ducttape/doom3-ducttape-0006-r1.ebuild
new file mode 100644
index 00000000000..89f745d41ab
--- /dev/null
+++ b/games-fps/doom3-ducttape/doom3-ducttape-0006-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="sticks flashlights to your machinegun and shotgun"
+MOD_NAME="Duct Tape"
+MOD_DIR="ducttape"
+
+inherit games games-mods
+
+HOMEPAGE="http://ducttape.glenmurphy.com/"
+SRC_URI="http://ducttape.glenmurphy.com/ducttape${PV}.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ mkdir ${MOD_DIR}
+ cd ${MOD_DIR}
+ unpack ${A}
+}
+
+src_prepare() {
+ rm -f ${MOD_DIR}/pak002.pk4 # for doom3-roe
+}
+
+pkg_postinst() {
+ games-mods_pkg_postinst
+
+ elog "To use old saved games with this mod, run:"
+ elog " mkdir -p ~/.doom3/ducttape"
+ elog " cp -r ~/.doom3/base/savegames ~/.doom3/ducttape"
+}
diff --git a/games-fps/doom3-ducttape/metadata.xml b/games-fps/doom3-ducttape/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-ducttape/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-eventhorizon/Manifest b/games-fps/doom3-eventhorizon/Manifest
new file mode 100644
index 00000000000..ac0a3b05d3f
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/Manifest
@@ -0,0 +1 @@
+DIST event_horizon_xv_1.3.zip 108659988 SHA256 3d653c61801348f8e58c80fcf1c29411987a311e64df23d873f40ededd242fac SHA512 af8d406b8b87ba22a43558cec034b5810bcee2a7dbb4bf87fd879d25f67b247e0d751443b4fcfe0a1b5072376f3941dd8e59d6d10e9ae9304c05b7ef6ae31944 WHIRLPOOL ff0fa512dac755ec7769d2b6e1ed495c59d0cf497d2ec61c4e04bfd3dc39a84017f7281d9d2c062b6078277584bd353a0251b046c7481cce9e93b74fc2c03441
diff --git a/games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild b/games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild
new file mode 100644
index 00000000000..03bc72116e6
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="single-player mission based on the Event Horizon film"
+MOD_NAME="Event Horizon"
+MOD_DIR="eventhorizon"
+
+inherit games games-mods
+
+HOMEPAGE="http://doom3.filefront.com/file/Event_Horizon_XV;91253"
+SRC_URI="event_horizon_xv_${PV}.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch mirror"
+
+pkg_nofetch() {
+ einfo
+ einfo "Please download \"${SRC_URI}\" from:"
+ einfo " ${HOMEPAGE}"
+ einfo "and move/link it to \"${DISTDIR}\""
+ einfo
+}
+
+src_prepare() {
+ mv -f event_horizon* ${MOD_DIR} || die
+}
diff --git a/games-fps/doom3-eventhorizon/metadata.xml b/games-fps/doom3-eventhorizon/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-hellcampaign/Manifest b/games-fps/doom3-hellcampaign/Manifest
new file mode 100644
index 00000000000..1a5dbea3dae
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/Manifest
@@ -0,0 +1,2 @@
+DIST hardcorehellcampaign_patch.zip 532844 SHA256 98d0619e0dcd8f12bbb596c635831a37b396cab5fd49e004e95f6b8d0deefd92
+DIST sp_hc_final.zip 113992555 SHA256 3b0c4b19139f5c3341a09d4169760f1eac1029e87587a44651cde4a4bc46bcd4
diff --git a/games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild b/games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild
new file mode 100644
index 00000000000..5c27d160987
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="map pack for Doom 3"
+MOD_NAME="Hell Campaign"
+MOD_DIR="hell_campaign"
+
+inherit games games-mods
+
+HOMEPAGE="http://doom3.filefront.com/file/The_Ultimate_Hell_Campaign;52013"
+SRC_URI="sp_hc_final.zip
+ hardcorehellcampaign_patch.zip"
+
+LICENSE="GameFront"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch bindist"
+
+pkg_nofetch() {
+ elog "Please download the following files:"
+ elog "http://www.filefront.com/4445166"
+ elog "http://www.filefront.com/4593578"
+ elog "and move them to ${DISTDIR}"
+}
+
+src_unpack() {
+ mkdir ${MOD_DIR}
+ cd ${MOD_DIR}
+ unpack ${A}
+}
+
+src_prepare() {
+ cd ${MOD_DIR}
+
+ # Prevent "non-portable" upper-case-filename warnings in Doom 3
+ mv -f "Hardcore Hell Campaign.pk4" hardcore_hell_campaign.pk4 || die
+ mv -f Q2Textures.pk4 q2Textures.pk4 || die
+ mv -f Q3Textures.pk4 q3Textures.pk4 || die
+
+ mv -f "Hardcore Hell Campaign.rtf" readme.rtf || die
+
+ # Show nice description in "mods" menu within Doom 3
+ echo "${MOD_NAME}" > description.txt
+}
diff --git a/games-fps/doom3-hellcampaign/metadata.xml b/games-fps/doom3-hellcampaign/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-inhell/Manifest b/games-fps/doom3-inhell/Manifest
new file mode 100644
index 00000000000..5edcf94e2ec
--- /dev/null
+++ b/games-fps/doom3-inhell/Manifest
@@ -0,0 +1 @@
+DIST in_hell_v11.zip 356652597 SHA256 47437c4335b77e89705617841d3af9479ab4dbef124a4590c3a7ed9e92934cbe
diff --git a/games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild b/games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild
new file mode 100644
index 00000000000..84ece37e8fa
--- /dev/null
+++ b/games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Ultimate Doom-inspired levels for Doom 3"
+MOD_NAME="In Hell"
+MOD_DIR="inhell"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.doomerland.de.vu/"
+SRC_URI="in_hell_v${PV/.}.zip"
+
+LICENSE="GameFront"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch bindist"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "http://www.filefront.com/4631315"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ mv -f In_Hell ${MOD_DIR} || die
+}
diff --git a/games-fps/doom3-inhell/metadata.xml b/games-fps/doom3-inhell/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-inhell/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-lms/Manifest b/games-fps/doom3-lms/Manifest
new file mode 100644
index 00000000000..29422c4fa05
--- /dev/null
+++ b/games-fps/doom3-lms/Manifest
@@ -0,0 +1 @@
+DIST LastManStandingCoop4Multiplatform.zip 309768743 SHA256 3e88196efc60a9046b9518a249c99021aca1c6341c654129a772b1f28f04c37e
diff --git a/games-fps/doom3-lms/doom3-lms-4.ebuild b/games-fps/doom3-lms/doom3-lms-4.ebuild
new file mode 100644
index 00000000000..0ef5a05c986
--- /dev/null
+++ b/games-fps/doom3-lms/doom3-lms-4.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="add co-op support and/or play against swarms of monsters"
+MOD_NAME="Last Man Standing"
+MOD_DIR="lms4"
+
+inherit games games-mods
+
+HOMEPAGE="http://doom3coop.com/"
+SRC_URI="LastManStandingCoop4Multiplatform.zip"
+
+LICENSE="GameFront"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch bindist"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "http://www.filefront.com/9934113"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ cd ${MOD_DIR} || die
+ rm -f *.{bat,url} game_lms40{0,2}.pk4
+}
diff --git a/games-fps/doom3-lms/metadata.xml b/games-fps/doom3-lms/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-lms/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-mitm/Manifest b/games-fps/doom3-mitm/Manifest
new file mode 100644
index 00000000000..4dbc77b42c1
--- /dev/null
+++ b/games-fps/doom3-mitm/Manifest
@@ -0,0 +1,2 @@
+DIST mitm5.zip 33650739 SHA256 e514c37cc8efc19cac8dc9b55ffae7c98f41aecd6855d3ba8206768ef6167f9d
+DIST mitm_4.zip 136302315 SHA256 a93b65ccb92f3839e9824d00a439e67ecf8c643e1b1d15789b08070d47fa7938
diff --git a/games-fps/doom3-mitm/doom3-mitm-20070129.ebuild b/games-fps/doom3-mitm/doom3-mitm-20070129.ebuild
new file mode 100644
index 00000000000..1d0523ce7e9
--- /dev/null
+++ b/games-fps/doom3-mitm/doom3-mitm-20070129.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Single player maps"
+MOD_NAME="Make it to Morning"
+
+inherit eutils games games-mods
+
+HOMEPAGE="http://www.makeittomorning.co.uk/"
+SRC_URI="http://www.doomwadstation.com/doom3/maps/Morning/mitm_4.zip
+ http://www.doomwadstation.com/doom3/maps/Morning/mitm5.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="games-fps/doom3-roe
+ games-fps/doom3[opengl,roe]"
+
+src_unpack() {
+ mkdir mitm
+ cd mitm
+ unpack ${A}
+}
+
+src_prepare() {
+ cd mitm
+ mv -f MITM*.txt mitm.txt || die
+ mv -f Mitm5*.txt mitm5.txt || die
+}
+
+src_install() {
+ games_make_wrapper ${PN} \
+ "doom3 +set fs_game_base d3xp +set fs_game mitm +map mitm"
+ make_desktop_entry ${PN} "Doom 3 - ${MOD_NAME} (1)" doom3
+ local i
+ for i in {2..5} ; do
+ games_make_wrapper ${PN}${i} \
+ "doom3 +set fs_game_base d3xp +set fs_game mitm +map mitm${i}"
+ make_desktop_entry ${PN}${i} "Doom 3 - ${MOD_NAME} (${i})" doom3
+ done
+ games-mods_src_install
+}
diff --git a/games-fps/doom3-mitm/metadata.xml b/games-fps/doom3-mitm/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/doom3-mitm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/doom3-roe/doom3-roe-1.ebuild b/games-fps/doom3-roe/doom3-roe-1.ebuild
new file mode 100644
index 00000000000..887863ac6cf
--- /dev/null
+++ b/games-fps/doom3-roe/doom3-roe-1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils cdrom games
+
+DESCRIPTION="Doom III: Resurrection of Evil expansion pack"
+HOMEPAGE="http://www.doom3.com/"
+SRC_URI=""
+
+LICENSE="DOOM3"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="strip"
+
+RDEPEND=">=games-fps/doom3-1.3.1302-r2"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/doom3
+Ddir=${D}/${dir}
+
+src_unpack() {
+ cdrom_get_cds Setup/Data/d3xp/pak000.pk4
+ # Change from showing "d3xp" in the "mods" menu within Doom 3
+ # The ^1 changes the text to red
+ echo '^1Resurrection of Evil' > description.txt
+}
+
+src_install() {
+ insinto "${dir}"/d3xp
+
+ einfo "Copying file from the disk..."
+ doins "${CDROM_ROOT}"/Setup/Data/d3xp/pak000.pk4 \
+ || die "copying pak000"
+
+ doins description.txt
+
+ find "${Ddir}" -exec touch '{}' \;
+
+ games_make_wrapper ${PN} "doom3 +set fs_game d3xp"
+ make_desktop_entry ${PN} "Doom III - Resurrection of Evil" doom3
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "This is just the data portion of the game. You will need to emerge"
+ elog "games-fps/doom3 to play the game."
+ echo
+}
diff --git a/games-fps/doom3-roe/metadata.xml b/games-fps/doom3-roe/metadata.xml
new file mode 100644
index 00000000000..d2321302edc
--- /dev/null
+++ b/games-fps/doom3-roe/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Science has unlocked the gates to the unknown, and now only one man stands
+between Hell and Earth. A sci-fi horror masterpiece, DOOM 3 is like nothing you
+have experienced. Dramatic storyline, pulse-pounding action, incredible
+graphics, and revolutionary technology combine to draw you into the most
+frightening and gripping first person gaming experience ever created. For more
+information, checkout http://www.doom3.com
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/doom3/Manifest b/games-fps/doom3/Manifest
new file mode 100644
index 00000000000..a9d7af90f43
--- /dev/null
+++ b/games-fps/doom3/Manifest
@@ -0,0 +1,2 @@
+DIST doom3-linux-1.3.1.1304.x86.run 21145838 SHA256 2f90dff20f2d3c0c47f17b3d6d45c4f0e7d27b986bf6084f21b85180cd1e03b4 SHA512 f2a42478d84a6242a7982d1acd726b746596b7a13147acbd920d618223d6f52ab4c49aa7d7f07067674da2881372a181396a0bdd476e3956fb702c76eebb0d02 WHIRLPOOL e80d54176763c37ba21750dbd57cb02beec8cf3fe7d90916ee4024541966b14e7919fa41624dc9fabb44eb824cabcc862fefdf3e58316302a01042d5ee443382
+DIST doom3.png 6502 SHA256 c9a701498a7b0f923182bf9f11aac8d2193026e509ae3643a5bc118b1a458c6b SHA512 9a2b3831babbf3fa0d354e1a4a779c972676edbcc0b287de9b9f3eb830e0a00d557ba9645fbf0e58e07d5705efb0ef2b7ab96cd92493e2a0afc30c8842c0043b WHIRLPOOL e568cdcf3ea510b9865a4c1f1577713c6a63954a22e572311a321c8c73cf70ca68b76134d45a9f1c77e2d6b464ec29e098b7fe39ce1eb38889f83fc3c9bfc05f
diff --git a/games-fps/doom3/doom3-1.3.1304-r1.ebuild b/games-fps/doom3/doom3-1.3.1304-r1.ebuild
new file mode 100644
index 00000000000..65b8bbed0f8
--- /dev/null
+++ b/games-fps/doom3/doom3-1.3.1304-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_PV="1.3.1.1304"
+
+DESCRIPTION="3rd installment of the classic iD 3D first-person shooter"
+HOMEPAGE="http://www.doom3.com/"
+SRC_URI="mirror://idsoftware/doom3/linux/doom3-linux-${MY_PV}.x86.run
+ http://zerowing.idsoftware.com/linux/${PN}.png"
+
+LICENSE="DOOM3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdinstall dedicated roe"
+RESTRICT="strip"
+
+DEPEND="app-arch/bzip2
+ app-arch/tar"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ !dedicated? (
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)]
+ )
+ cdinstall? (
+ >=games-fps/doom3-data-1.1.1282-r1
+ roe? ( games-fps/doom3-roe ) )"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+QA_TEXTRELS="${dir:1}/pb/pbcl.so
+ ${dir:1}/pb/pbcls.so
+ ${dir:1}/pb/pbag.so
+ ${dir:1}/pb/pbsv.so
+ ${dir:1}/pb/pbags.so"
+
+QA_EXECSTACK="${dir:1}/doom.x86
+ ${dir:1}/doomded.x86"
+
+pkg_pretend() {
+ if use dedicated; then
+ ewarn "${CATEGORY}/${PN}[dedicated] will only install the dedicated game server"
+ fi
+}
+
+src_unpack() {
+ unpack_makeself ${PN}-linux-${MY_PV}.x86.run
+}
+
+src_install() {
+ insinto "${dir}"
+ doins License.txt CHANGES README version.info ${PN}.png
+ doins -r base d3xp pb
+
+ exeinto "${dir}"
+ doexe openurl.sh bin/Linux/x86/doomded.x86
+ if ! use dedicated; then
+ doexe bin/Linux/x86/doom.x86
+
+ games_make_wrapper ${PN} ./doom.x86 "${dir}" "${dir}"
+ doicon "${DISTDIR}"/${PN}.png || die "doicon"
+ make_desktop_entry ${PN} "Doom III"
+ fi
+ games_make_wrapper ${PN}-ded ./doomded.x86 "${dir}" "${dir}"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall; then
+ elog "You need to copy pak000.pk4, pak001.pk4, pak002.pk4, pak003.pk4, and"
+ elog "pak004.pk4 from either your installation media or your hard drive to"
+ elog "${dir}/base before running the game,"
+ elog "or 'emerge games-fps/doom3-data' to install from CD."
+ if use roe ; then
+ echo
+ elog "To use the Resurrection of Evil expansion pack, you also need to copy"
+ elog "pak000.pk4 to ${dir}/d3xp from the RoE CD before running the game,"
+ elog "or 'emerge doom3-roe' to install from CD."
+ fi
+ fi
+
+ if ! use dedicated; then
+ echo
+ elog "To play the game, run:"
+ elog " doom3"
+ fi
+ echo
+ elog "To start the dedicated server, run:"
+ elog " doom3-ded"
+}
diff --git a/games-fps/doom3/metadata.xml b/games-fps/doom3/metadata.xml
new file mode 100644
index 00000000000..3f1bc96b891
--- /dev/null
+++ b/games-fps/doom3/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+Science has unlocked the gates to the unknown, and now only one man stands
+between Hell and Earth. A sci-fi horror masterpiece, DOOM 3 is like nothing you
+have experienced. Dramatic storyline, pulse-pounding action, incredible
+graphics, and revolutionary technology combine to draw you into the most
+frightening and gripping first person gaming experience ever created. For more
+information, checkout http://www.doom3.com
+</longdescription>
+ <use>
+ <flag name='dedicated'>install only as a dedicated game server</flag>
+ <flag name="roe">Adds support for the Resurrection of Evil expansion</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/doomsday-resources/Manifest b/games-fps/doomsday-resources/Manifest
new file mode 100644
index 00000000000..42cfabf3e9a
--- /dev/null
+++ b/games-fps/doomsday-resources/Manifest
@@ -0,0 +1,2 @@
+DIST jdoom-details.zip 1379495 SHA256 6c822f6a97eddb928d0c8b32f0c84eb5a0051207af0f820d309d94a8caa06556 SHA512 94f0c29940795368e9ffdb9fad57f0de65a936a90ad6256effe6fbaa72d1ddf45a016bb72431d1603ade84c01036f84b7dc3e739d04e6c33a41bdf50a9b45dce WHIRLPOOL 1fdf4158580e1c6c4ccdeb02c11ded119085872512e892e1a14b38b63f909e9247b74dc593d28bf9ee4e3fe81ac2fc8524c5ccc8604196df5fb96eb5f2844aa7
+DIST jdoom-resource-pack-1.01.zip 23114845 SHA256 6797f3b3ccfbb4871027e8bd86153ad5b1d4d87c801a94effc962dabba5a09ac SHA512 ec40f3920338040803b7cb3029e6b52352179fe63a1c56bb74ff398e9eca0ae4c7c058213c812644add70b833c26f9a69844c2ae068cdf7d4c7a4f6c9e277636 WHIRLPOOL 309b2c39e9308bc3ba25b32414fc295a7293e7444bf81c33146a6a78568fc983eb00791cc61cd2111bb8981eb4d79127541ffe4e7372af75a3428556e8b1d26c
diff --git a/games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild b/games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild
new file mode 100644
index 00000000000..ef3e1a8a37c
--- /dev/null
+++ b/games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Improved models & textures for doomsday"
+HOMEPAGE="http://www.doomsdayhq.com/"
+SRC_URI="mirror://sourceforge/deng/jdoom-resource-pack-${PV}.zip
+ mirror://sourceforge/deng/jdoom-details.zip"
+
+LICENSE="free-noncomm" #505636
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=games-fps/doomsday-1.9.8"
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/doomsday/data/jdoom/auto
+ doins data/jDoom/* *.pk3
+
+ # The definitions file cannot be auto-loaded
+ insinto "${GAMES_DATADIR}"/doomsday/defs/jdoom
+ doins defs/jDoom/*
+
+ dodoc *.txt docs/*
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Add the following to the jdoom/doomsday command-line options:"
+ elog " -def ${GAMES_DATADIR}/doomsday/defs/jdoom/jDRP.ded"
+}
diff --git a/games-fps/doomsday-resources/metadata.xml b/games-fps/doomsday-resources/metadata.xml
new file mode 100644
index 00000000000..37f93d5031f
--- /dev/null
+++ b/games-fps/doomsday-resources/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">deng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/doomsday/Manifest b/games-fps/doomsday/Manifest
new file mode 100644
index 00000000000..1b491121358
--- /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 00000000000..5052a797a10
--- /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 00000000000..62b4db2627e
--- /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 00000000000..6c24bfb4480
--- /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 00000000000..c59c48ac7ae
--- /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 00000000000..52eb0c8f57f
--- /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 00000000000..49c5cbefa2d
--- /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>
diff --git a/games-fps/duke3d-data/Manifest b/games-fps/duke3d-data/Manifest
new file mode 100644
index 00000000000..87fedf37920
--- /dev/null
+++ b/games-fps/duke3d-data/Manifest
@@ -0,0 +1 @@
+DIST gog_duke_nukem_3d_1.0.0.7.tar.gz 30376296 SHA256 ba81c81d5f35f3aa424d30d9ab1c8441f8967bf4776cc85299efc95eea257ea3 SHA512 d0471bdc65b1030e080de382fea661d78348769d13bca2115ba1fb22aa2de54298bcaa4807c7315d0e2e4eefcc04bc9489d4e4c75fe0db1e99dd0ccd4e138450 WHIRLPOOL 4766138fd3decf78db00e7b6d6ad8128d742454573b56a880b94dba63b7de2438afc0e402e22eca0f0c6ca589f78ef6a28cfd0fbe5e62e40e3ce7427b2daa5fd
diff --git a/games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild b/games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild
new file mode 100644
index 00000000000..0933f550621
--- /dev/null
+++ b/games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CDROM_OPTIONAL="yes"
+inherit eutils cdrom games
+
+GOG_FILE="gog_duke_nukem_3d_1.0.0.7.tar.gz"
+DESCRIPTION="Duke Nukem 3D data files"
+HOMEPAGE="http://www.3drealms.com/"
+SRC_URI="gog? ( ${GOG_FILE} )"
+
+LICENSE="DUKE3D gog? ( GOG-EULA )"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="gog"
+REQUIRED_USE="^^ ( cdinstall gog )"
+RESTRICT="mirror bindist gog? ( fetch )"
+
+RDEPEND="|| ( games-fps/eduke32 games-fps/duke3d )"
+
+S=${WORKDIR}
+
+pkg_nofetch() {
+ einfo "Please download ${GOG_FILE} from your GOG.com account after buying Duke Nukem 3d"
+ einfo "and put it into ${DISTDIR}."
+}
+
+src_unpack() {
+ if use cdinstall ; then
+ export CDROM_NAME_SET=(
+ "Existing Install"
+ "Duke Nukem 3D CD"
+ "Duke Nukem 3D Atomic Edition CD"
+ )
+ cdrom_get_cds duke3d.grp:dvd/dn3dinst/duke3d.grp:atominst/duke3d.grp
+
+ if [[ ${CDROM_SET} -ne 0
+ && ${CDROM_SET} -ne 1
+ && ${CDROM_SET} -ne 2 ]]
+ then
+ die "Error locating data files.";
+ fi
+ else
+ unpack "${GOG_FILE}"
+ cd "Duke Nukem 3D/data" || die
+
+ # convert to lowercase
+ find . -type f \
+ -execdir sh -c 'echo "converting ${1} to lowercase"
+ lower="`echo "${1}" | tr [:upper:] [:lower:]`"
+ [ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
+ fi
+}
+
+src_install() {
+ local DATAROOT
+
+ insinto "${GAMES_DATADIR}"/duke3d
+
+ if use cdinstall ; then
+ case ${CDROM_SET} in
+ 0) DATAROOT="" ;;
+ 1) DATAROOT="dn3dinst/" ;;
+ 2) DATAROOT="atominst/" ;;
+ esac
+
+ # avoid double slash
+ doins "${CDROM_ROOT}"/${DATAROOT}{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con}
+ else
+ doins "Duke Nukem 3D/data"/{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con}
+ fi
+
+ prepgamesdirs
+}
diff --git a/games-fps/duke3d-data/duke3d-data-1.0.ebuild b/games-fps/duke3d-data/duke3d-data-1.0.ebuild
new file mode 100644
index 00000000000..2f9401140ea
--- /dev/null
+++ b/games-fps/duke3d-data/duke3d-data-1.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils cdrom games
+
+DESCRIPTION="Duke Nukem 3D data files"
+HOMEPAGE="http://www.3drealms.com/"
+SRC_URI=""
+
+LICENSE="DUKE3D"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="|| ( games-fps/eduke32 games-fps/duke3d )"
+
+S=${WORKDIR}
+
+src_unpack() {
+ export CDROM_NAME_SET=("Existing Install" "Duke Nukem 3D CD")
+ cdrom_get_cds duke3d.grp:dvd/dn3dinst/duke3d.grp
+
+ if [[ ${CDROM_SET} -ne 0 && ${CDROM_SET} -ne 1 ]] ; then
+ die "Error locating data files.";
+ fi
+}
+
+src_install() {
+ local DATAROOT
+
+ case ${CDROM_SET} in
+ 0) DATAROOT= ;;
+ 1) DATAROOT="dn3dinst/" ;;
+ esac
+
+ insinto "${GAMES_DATADIR}"/duke3d
+ doins "${CDROM_ROOT}"/$DATAROOT/{duke3d.grp,duke.rts,game.con,user.con,demo2.dmo,defs.con,demo1.dmo} \
+ || die "doins failed"
+ prepgamesdirs
+}
diff --git a/games-fps/duke3d-data/metadata.xml b/games-fps/duke3d-data/metadata.xml
new file mode 100644
index 00000000000..3fba2a006d7
--- /dev/null
+++ b/games-fps/duke3d-data/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name='gog'>Extract the data from the GOG.com installer.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/duke3d-demodata/Manifest b/games-fps/duke3d-demodata/Manifest
new file mode 100644
index 00000000000..af186d751aa
--- /dev/null
+++ b/games-fps/duke3d-demodata/Manifest
@@ -0,0 +1 @@
+DIST 3dduke13.zip 5924374 SHA256 c67efd179022bc6d9bde54f404c707cbcbdc15423c20be72e277bc2bdddf3d0e SHA512 eb92daa88b4e7cfeebe1fb3d2c021e0a4a66262d0d6e76b5e27fe3cedd382e381d23b392a6d9adb42a418b9318e011c2d8adfbdc77d7c5371e61d8c091c7eb65 WHIRLPOOL 9f3b9620d042a0209c707e83822fa1acff370504c76a558a6c36452b7f7c701e8289f8b389146cdd6899f47783c318a81792a7702f68d1ca62b31fc2c6844921
diff --git a/games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild b/games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild
new file mode 100644
index 00000000000..356e2846b6d
--- /dev/null
+++ b/games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit games
+
+DESCRIPTION="Duke Nukem 3D 1.3d shareware data"
+HOMEPAGE="http://www.3drealms.com/duke3d/"
+SRC_URI="ftp://ftp.3drealms.com/share/3dduke13.zip"
+
+LICENSE="DUKE3D"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="games-fps/eduke32"
+
+S=${WORKDIR}
+
+src_unpack() {
+ default
+ rm LICENSE.TXT || die
+ mv DN3DSW13.SHR DN3DSW13.SHR.zip || die
+ unpack ./DN3DSW13.SHR.zip
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/duke3d
+
+ # convert to lowercase
+ find . \( -iname "*.CON" -o -iname "*.DMO" -o -iname "*.RTS" -o -iname "*.GRP" -o -iname "*.PCK" -o -iname "*.INI" \) \
+ -exec sh -c 'echo "${1}"
+ mv "${1}" "$(echo "${1}" | tr [:upper:] [:lower:])"' - {} \;
+
+ doins {defs,game,user}.con demo{1,2,3}.dmo duke.rts duke3d.grp modem.pck ultramid.ini
+
+ dodoc FILE_ID.DIZ README.DOC
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ einfo "Please note that many addons for Duke Nukem 3D require the registered version"
+ einfo "and will not work with this shareware version."
+ echo
+}
diff --git a/games-fps/duke3d-demodata/metadata.xml b/games-fps/duke3d-demodata/metadata.xml
new file mode 100644
index 00000000000..01a746edb19
--- /dev/null
+++ b/games-fps/duke3d-demodata/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+</pkgmetadata>
+
diff --git a/games-fps/duke3d/Manifest b/games-fps/duke3d/Manifest
new file mode 100644
index 00000000000..79912b73fed
--- /dev/null
+++ b/games-fps/duke3d/Manifest
@@ -0,0 +1,2 @@
+DIST 3dduke13.zip 5924374 SHA256 c67efd179022bc6d9bde54f404c707cbcbdc15423c20be72e277bc2bdddf3d0e SHA512 eb92daa88b4e7cfeebe1fb3d2c021e0a4a66262d0d6e76b5e27fe3cedd382e381d23b392a6d9adb42a418b9318e011c2d8adfbdc77d7c5371e61d8c091c7eb65 WHIRLPOOL 9f3b9620d042a0209c707e83822fa1acff370504c76a558a6c36452b7f7c701e8289f8b389146cdd6899f47783c318a81792a7702f68d1ca62b31fc2c6844921
+DIST duke3d-20040817.tar.bz2 1509273 SHA256 c0dd72030f9c5b84aea3e4989831311c94ef21641d6a1fdb0f557d04076f641f SHA512 a08aa07153458501fb01878769af9797460525015b34d743250e3f04f15ee2dcfbb4110c94c83912ba2435e6d6c48127e2d36c0dc29833e0f6f95e3b925b571c WHIRLPOOL b0e27cae348601980e18f95a6507bc3080a51fe4f70919127eefd9cc90185dcd4cb287e970c2fa1ecc4a6b04422804748a071006e1b4551cde73e4cd18abe40a
diff --git a/games-fps/duke3d/duke3d-20040817-r2.ebuild b/games-fps/duke3d/duke3d-20040817-r2.ebuild
new file mode 100644
index 00000000000..34155305c74
--- /dev/null
+++ b/games-fps/duke3d/duke3d-20040817-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+fromcvs=0
+ECVS_MODULE="duke3d"
+if [[ ${fromcvs} -eq 1 ]] ; then
+ ECVS_PASS="anonymous"
+ ECVS_SERVER="icculus.org:/cvs/cvsroot"
+ inherit unpacker cvs eutils flag-o-matic games
+else
+ inherit unpacker eutils flag-o-matic games
+fi
+
+DEMO="3dduke13.zip"
+
+DESCRIPTION="Port of the original Duke Nukem 3D"
+HOMEPAGE="http://icculus.org/projects/duke3d/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ demo? (
+ ftp://ftp.3drealms.com/share/${DEMO}
+ ftp://ftp.planetmirror.com/pub/gameworld/downloads/${DEMO}
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="hppa ppc x86"
+IUSE="demo pic perl opengl"
+
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-mixer
+ media-sound/timidity++
+ media-sound/timidity-eawpatches
+ perl? ( dev-lang/perl[-ithreads] )
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ demo? ( app-arch/unzip )
+ !pic? ( x86? ( dev-lang/nasm ) )"
+
+S=${WORKDIR}/${PN}
+
+use_tf() { use ${1} && echo "true" || echo "false"; }
+
+src_unpack() {
+ if [[ ${fromcvs} -eq 1 ]] ; then
+ cvs_src_unpack
+ cd duke3d/source
+ ECVS_MODULE="buildengine"
+ cvs_src_unpack
+ else
+ unpack ${A}
+ fi
+
+ if use demo ; then
+ unpack_zip DN3DSW13.SHR
+ fi
+}
+
+src_prepare() {
+ # configure buildengine
+ cd "${S}/source/buildengine"
+ sed -i \
+ -e "/^useperl := / s:=.*:= $(use_tf perl):" \
+ -e "/^useopengl := / s:=.*:= $(use_tf opengl):" \
+ -e "/^usephysfs := / s:=.*:= false:" \
+ -e 's:-O3::' -e 's: -g : :' \
+ -e 's:/usr/lib/perl5/i386-linux/CORE/libperl.a::' \
+ Makefile \
+ || die "sed build Makefile failed"
+ epatch "${FILESDIR}/${PV}-endian.patch"
+
+ # configure duke3d
+ cd "${S}/source"
+ # need to sync features with build engine
+ epatch \
+ "${FILESDIR}/${PV}-credits.patch" \
+ "${FILESDIR}/${PV}-duke3d-makefile-opts.patch" \
+ "${FILESDIR}/${PV}-gcc34.patch" \
+ "${FILESDIR}"/${P}-gcc4.patch \
+ "${FILESDIR}"/${P}-noinline.patch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-ldflags.patch
+ sed -i \
+ -e "/^use_opengl := / s:=.*:= $(use_tf opengl):" \
+ -e "/^use_physfs := / s:=.*:= false:" \
+ Makefile \
+ || die "sed duke3d Makefile failed"
+ if ! use pic && use x86 ; then
+ sed -i \
+ -e 's:^#USE_ASM:USE_ASM:' buildengine/Makefile \
+ || die "sed failed"
+ sed -i \
+ -e '/^#use_asm := /s:#::' Makefile \
+ || die "sed failed"
+ fi
+
+ # causes crazy redefine errors with gcc-3.[2-4].x
+ replace-flags -O3 -O2
+ strip-flags #203969
+}
+
+src_compile() {
+ emake -C source/buildengine OPTFLAGS="${CFLAGS}" || die "buildengine failed"
+ emake -C source OPTIMIZE="${CFLAGS}" || die "duke3d failed"
+}
+
+src_install() {
+ games_make_wrapper duke3d "${GAMES_BINDIR}/duke3d.bin" "${GAMES_DATADIR}/${PN}"
+ newgamesbin source/duke3d duke3d.bin || die "newgamesbin failed"
+
+ dodoc readme.txt
+
+ cd testdata
+ insinto "${GAMES_DATADIR}/${PN}"
+ newins defs.con DEFS.CON
+ newins game.con GAME.CON
+ newins user.con USER.CON
+ newins "${FILESDIR}/network.cfg" network.cfg.template
+ if use demo ; then
+ doins "${WORKDIR}/DUKE3D.GRP" || die "doins DUKE3D.GRP failed"
+ fi
+
+ insinto "${GAMES_SYSCONFDIR}"
+ doins "${FILESDIR}/duke3d.cfg"
+ dosym "${GAMES_SYSCONFDIR}/duke3d.cfg" "${GAMES_DATADIR}/${PN}/DUKE3D.CFG"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ use demo || elog "Put the data files in ${GAMES_DATADIR}/${PN} before playing"
+}
diff --git a/games-fps/duke3d/files/20040817-credits.patch b/games-fps/duke3d/files/20040817-credits.patch
new file mode 100644
index 00000000000..176fcd74752
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-credits.patch
@@ -0,0 +1,38 @@
+--- menues.c 2003-08-17 22:16:10.000000000 +0200
++++ menues.c 2004-03-29 01:59:28.000000000 +0200
+@@ -1747,9 +1747,10 @@
+ case 996:
+ case 997:
+
+-// rotatesprite(c<<16,200<<15,65536L,0,MENUSCREEN,16,0,10+64,0,0,xdim-1,ydim-1);
+-// rotatesprite(c<<16,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
+-// menutext(c,24,0,0,"CREDITS");
++ c = (320>>1);
++ rotatesprite(c<<16,200<<15,65536L,0,MENUSCREEN,16,0,10+64,0,0,xdim-1,ydim-1);
++ rotatesprite(c<<16,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
++ menutext(c,24,0,0,"CREDITS");
+
+ if(KB_KeyPressed(sc_Escape)) { cmenu(0); break; }
+
+@@ -1926,6 +1927,21 @@
+
+ menutext(c,67+16+16+16+16+16,SHX(-7),PHX(-7),"QUIT");
+
++ gametext(c,67+16+16+16+16+16+16+16,"Duke Nukem 3D for "
++#if defined PLATFORM_MACOSX
++ "MacOS"
++#elif defined PLATFORM_DOS
++ "MS-Dos"
++#elif defined PLATFORM_WIN32
++ "Win32"
++#elif defined PLATFORM_UNIX
++ "Gentoo"
++#else
++ "unknown"
++#endif
++ ,16,2+8+16);
++ gametext(c,67+16+16+16+16+16+16+16+9,"build " __DATE__ " " __TIME__,16,2+8+16);
++
+ break;
+ // CTW END - MODIFICATION
+
diff --git a/games-fps/duke3d/files/20040817-duke3d-makefile-opts.patch b/games-fps/duke3d/files/20040817-duke3d-makefile-opts.patch
new file mode 100644
index 00000000000..d23f7a118f7
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-duke3d-makefile-opts.patch
@@ -0,0 +1,33 @@
+--- Makefile.orig 2003-08-17 17:45:35.948650760 -0400
++++ Makefile 2003-08-17 17:46:36.894385600 -0400
+@@ -4,6 +4,8 @@
+ beos := false
+ macosx := false
+ #use_asm := true
++use_opengl := true
++use_physfs := false
+
+ #-----------------------------------------------------------------------------#
+ # If this makefile fails to detect Cygwin correctly, or you want to force
+@@ -80,6 +81,10 @@
+ buildengine/pragmas.o \
+ buildengine/unix_compat.o
+
++ifeq ($(strip $(use_opengl)),true)
++ BUILDOBJS += buildengine/buildgl.o
++endif
++
+ ifeq ($(strip $(use_asm)),true)
+ BUILDOBJS += buildengine/a_gnu.o buildengine/a_nasm.o
+ else
+@@ -106,6 +106,10 @@
+
+ LDLIBS = $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
+
++ifeq ($(strip $(use_physfs)),true)
++ LDLIBS += -lphysfs
++endif
++
+ # !!! FIXME: Do we even need this? It doesn't fly on MacOS X. --ryan.
+ #LDLIBS += -Wl,-E
+
diff --git a/games-fps/duke3d/files/20040817-endian.patch b/games-fps/duke3d/files/20040817-endian.patch
new file mode 100644
index 00000000000..a22d07fb09f
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-endian.patch
@@ -0,0 +1,26 @@
+--- duke3d/source/buildengine/platform.h 2003-08-07 12:06:17.000000000 +0200
++++ duke3d.new/source/buildengine/platform.h 2004-08-24 18:35:05.292291088 +0200
+@@ -5,6 +5,7 @@
+ #include "win32_compat.h"
+ #elif (defined PLATFORM_UNIX)
+ #include "unix_compat.h"
++#include <endian.h>
+ #elif (defined PLATFORM_DOS)
+ #include "doscmpat.h"
+ #else
+@@ -60,9 +61,15 @@
+ #define BUILDSWAP_INTEL16(x) _swap16(x)
+ #define BUILDSWAP_INTEL32(x) _swap32(x)
+ #else
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define PLATFORM_LITTLEENDIAN 1
+ #define BUILDSWAP_INTEL16(x) (x)
+ #define BUILDSWAP_INTEL32(x) (x)
++#else
++#define PLATFORM_BIGENDIAN 1
++#define BUILDSWAP_INTEL16(x) _swap16(x)
++#define BUILDSWAP_INTEL32(x) _swap32(x)
++#endif
+ #endif
+
+ extern int has_altivec; /* PowerPC-specific. */
diff --git a/games-fps/duke3d/files/20040817-gcc34.patch b/games-fps/duke3d/files/20040817-gcc34.patch
new file mode 100644
index 00000000000..a7de9c11638
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-gcc34.patch
@@ -0,0 +1,82 @@
+--- source/astub.c.orig 2004-08-22 14:44:50.691126872 +0100
++++ source/astub.c 2004-08-22 14:47:15.532107696 +0100
+@@ -540,6 +540,11 @@
+ return(tempbuf);
+ } //end
+
++void SpriteName(short spritenum, char *lo2)
++{
++ sprintf(lo2,names[sprite[spritenum].picnum]);
++}// end SpriteName
++
+ const char *ExtGetSpriteCaption(short spritenum)
+ {
+
+@@ -608,7 +613,11 @@
+ // y1, y2 0-143 (status bar is 144 high, origin is top-left of STATUS BAR)
+ // col 0-15
+
+-
++void PrintStatus(char *string,int num,char x,char y,char color)
++{
++ sprintf(tempbuf,"%s %d",string,num);
++ printext16(x*8,y*8,color,-1,tempbuf,0);
++}
+
+ void TotalMem()
+ {
+@@ -1276,18 +1285,6 @@
+
+ }
+
+-
+-void PrintStatus(char *string,int num,char x,char y,char color)
+-{
+- sprintf(tempbuf,"%s %d",string,num);
+- printext16(x*8,y*8,color,-1,tempbuf,0);
+-}
+-
+-void SpriteName(short spritenum, char *lo2)
+-{
+- sprintf(lo2,names[sprite[spritenum].picnum]);
+-}// end SpriteName
+-
+ char GAMEpalette[768];
+ char WATERpalette[768];
+ char SLIMEpalette[768];
+@@ -1326,6 +1323,17 @@
+ ReadGamePalette();
+ }// end ReadPaletteTable
+
++void Ver()
++{
++ sprintf(tempbuf,"DUKE NUKEM BUILD: V032696");
++ if (qsetmode == 200) //In 3D mode
++ { printext256(60*8,24*8,11,-1,tempbuf,1);
++ rotatesprite((320-8)<<16,(200-8)<<16,64<<9,0,SPINNINGNUKEICON+(((4-totalclock>>3))&7),0,0,0,0,0,xdim-1,ydim-1);
++ }else
++ { printext16(0,0,15,-1,tempbuf,0);
++ }
++}
++
+ void Keys3d(void)
+ {
+ long i,count,rate,nexti;
+@@ -2206,17 +2214,6 @@
+ }
+ }
+
+-void Ver()
+-{
+- sprintf(tempbuf,"DUKE NUKEM BUILD: V032696");
+- if (qsetmode == 200) //In 3D mode
+- { printext256(60*8,24*8,11,-1,tempbuf,1);
+- rotatesprite((320-8)<<16,(200-8)<<16,64<<9,0,SPINNINGNUKEICON+(((4-totalclock>>3))&7),0,0,0,0,0,xdim-1,ydim-1);
+- }else
+- { printext16(0,0,15,-1,tempbuf,0);
+- }
+-}
+-
+ ActorMem(int i)
+ {int total=0,j;
+ switch(i)
diff --git a/games-fps/duke3d/files/20040817-gcc4.patch b/games-fps/duke3d/files/20040817-gcc4.patch
new file mode 100644
index 00000000000..d79dda96c35
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-gcc4.patch
@@ -0,0 +1,75 @@
+iff -ur duke3d/source/buildengine/a.c duke3d-gcc4/source/buildengine/a.c
+--- duke3d/source/buildengine/a.c 2004-11-25 13:55:21.000000000 -0500
++++ duke3d-gcc4/source/buildengine/a.c 2005-06-18 18:14:24.000000000 -0400
+@@ -186,7 +186,9 @@
+ if (i3 == 0)
+ {
+ i1 += i4;
+- ((unsigned long)i4) >>= mach3_al;
++ unsigned long temp = i4;
++ temp >>= mach3_al;
++ i4 = temp;
+ i4 = (i4&0xffffff00) | (source[i4]&0xff);
+ *dest = ((unsigned char*)i2)[i4];
+ return i1;
+diff -ur duke3d/source/buildengine/pragmas.c duke3d-gcc4/source/buildengine/pragmas.c
+--- duke3d/source/buildengine/pragmas.c 2003-07-25 20:11:32.000000000 -0400
++++ duke3d-gcc4/source/buildengine/pragmas.c 2005-06-18 18:25:37.000000000 -0400
+@@ -56,28 +56,39 @@
+
+ void clearbufbyte(void *buffer, int size, long fill_value) {
+ int lsize;
++ unsigned char *p=buffer;
++ unsigned short *s=buffer;
+ switch(size){
+ case 0: return;
+- case 1: *((unsigned char*)buffer)++ = fill_value; return;
+- case 2: *((unsigned short*)buffer)++ = fill_value; return;
+- case 3: { unsigned char *p=buffer; p[2]=p[1]=p[0] = fill_value;} return;
++ case 1: ++p; *p = fill_value; return;
++ case 2: ++s; *s = fill_value; return;
++ case 3: { p[2]=p[1]=p[0] = fill_value;} return;
+ default:
+ if ((int)buffer&1) {
+- *((unsigned char*)buffer)++ = fill_value; size--;
++ ++p; *p = fill_value; size--;
++ buffer = p;
+ }
+ if ((int)buffer&2) {
+- *((unsigned short*)buffer)++ = fill_value; size-=2;
++ ++s; *s = fill_value; size-=2;
++ buffer = s;
+ }
+ lsize = size>>2;
++ unsigned int *up = buffer;
+ while(lsize) {
+- *((unsigned int*)buffer)++ = fill_value;
++ ++up;
++ *up = fill_value;
+ lsize--;
+ }
++ buffer = up;
+ if (size&2) {
+- *((unsigned short*)buffer)++ = fill_value;
++ s = buffer;
++ ++s;
++ *s = fill_value;
+ }
+ if (size&1) {
+- *((unsigned char*)buffer)++ = fill_value;
++ p = buffer;
++ ++p;
++ *p = fill_value;
+ }
+ }
+ }
+@@ -122,7 +133,7 @@
+ {
+ *((unsigned short *)source) = ((linum>>16)&0xffff);
+ linum += linum_inc;
+- ((unsigned char*)source) = ((unsigned char*)source) + 2;
++ source = ((unsigned char*)source) + 2;
+ size--;
+ if (size == 0) return;
+ }
+
diff --git a/games-fps/duke3d/files/duke3d-20040817-as-needed.patch b/games-fps/duke3d/files/duke3d-20040817-as-needed.patch
new file mode 100644
index 00000000000..5eb90fea3e1
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d-20040817-as-needed.patch
@@ -0,0 +1,74 @@
+diff -ur duke3d/source/buildengine/Makefile duke3d-patched/source/buildengine/Makefile
+--- duke3d/source/buildengine/Makefile 2004-05-15 05:15:05.000000000 +0200
++++ duke3d-patched/source/buildengine/Makefile 2008-02-27 23:10:46.000000000 +0100
+@@ -99,11 +99,11 @@
+ ifeq ($(strip $(SDL_LIB_DIR)),please_set_me_cygwin_users)
+ $(error Cygwin users need to set the SDL_LIB_DIR envr var.)
+ else
+- SDL_LDFLAGS := -L$(SDL_LIB_DIR) -lSDL
++ SDL_LIBS := -L$(SDL_LIB_DIR) -lSDL
+ endif
+ else
+ SDL_CFLAGS := $(shell sdl-config --cflags)
+- SDL_LDFLAGS := $(shell sdl-config --libs)
++ SDL_LIBS := $(shell sdl-config --libs)
+ endif
+
+ CC = gcc
+@@ -202,7 +202,7 @@
+ ASMFLAGS = -f $(ASMOBJFMT) $(ASMDEFS)
+ LINKER = gcc
+ CFLAGS += $(USE_ASM) -funsigned-char -DPLATFORM_UNIX -Wall $(SDL_CFLAGS) -fno-omit-frame-pointer
+-LDFLAGS += $(SDL_LDFLAGS)
++LDLIBS += $(SDL_LIBS)
+
+ # Rules for turning source files into .o files
+ %.o: %.c
+@@ -236,17 +236,17 @@
+
+ ifeq ($(strip $(usedlls)),true)
+ $(ENGINEDLL) : $(ENGINEOBJS)
+- $(LINKER) -shared -o $(ENGINEDLL) $(LDFLAGS) $(ENGINEOBJS)
++ $(LINKER) -shared -o $(ENGINEDLL) $(LDFLAGS) $(ENGINEOBJS) $(LDLIBS)
+
+ $(NETDLL) : $(NETOBJS)
+- $(LINKER) -shared -o $(NETDLL) $(LDFLAGS) $(NETOBJS)
++ $(LINKER) -shared -o $(NETDLL) $(LDFLAGS) $(NETOBJS) $(LDLIBS)
+ endif
+
+ $(GAMEEXE) : $(ENGINEDLL) $(NETDLL) $(GAMEOBJS) $(PERLOBJS)
+- $(LINKER) -o $(GAMEEXE) $(LDFLAGS) $(LDPERL) $(PERLOBJS) $(GAMEOBJS) $(ENGINEDLL) $(NETDLL)
++ $(LINKER) -o $(GAMEEXE) $(LDFLAGS) $(PERLOBJS) $(GAMEOBJS) $(LDPERL) $(LDLIBS) $(ENGINEDLL) $(NETDLL)
+
+ $(BUILDEXE) : $(ENGINEDLL) $(BUILDOBJS)
+- $(LINKER) -o $(BUILDEXE) $(LDFLAGS) $(BUILDOBJS) $(ENGINEDLL)
++ $(LINKER) -o $(BUILDEXE) $(LDFLAGS) $(BUILDOBJS) $(LDLIBS) $(ENGINEDLL)
+
+ listclean:
+ @echo "A 'make clean' would remove" $(CLEANUP)
+diff -ur duke3d/source/Makefile duke3d-patched/source/Makefile
+--- duke3d/source/Makefile 2004-05-15 05:14:16.000000000 +0200
++++ duke3d-patched/source/Makefile 2008-02-27 23:09:57.000000000 +0100
+@@ -45,11 +45,11 @@
+ ifeq ($(strip $(SDL_LIB_DIR)),please_set_me_cygwin_users)
+ $(error Cygwin users need to set the SDL_LIB_DIR envr var.)
+ else
+- SDL_LDFLAGS := -L$(SDL_LIB_DIR) -lSDL
++ SDL_LIBS := -L$(SDL_LIB_DIR) -lSDL
+ endif
+ else
+ SDL_CFLAGS := $(shell sdl-config --cflags)
+- SDL_LDFLAGS := $(shell sdl-config --libs) -L.
++ SDL_LIBS := $(shell sdl-config --libs) -L.
+ endif
+
+ ifeq ($(strip $(macosx)),true)
+@@ -104,7 +104,7 @@
+ #CC = icc
+ #CFLAGS = -g $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 -DUSE_I386_ASM=1 $(EXTRACFLAGS) -O2
+
+-LDLIBS = $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
++LDLIBS = $(SDL_LIBS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
+
+ # !!! FIXME: Do we even need this? It doesn't fly on MacOS X. --ryan.
+ #LDLIBS += -Wl,-E
diff --git a/games-fps/duke3d/files/duke3d-20040817-gcc4.patch b/games-fps/duke3d/files/duke3d-20040817-gcc4.patch
new file mode 100644
index 00000000000..2a37148d799
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d-20040817-gcc4.patch
@@ -0,0 +1,180 @@
+iff -ur duke3d/source/buildengine/a.c duke3d-gcc4/source/buildengine/a.c
+--- duke3d/source/buildengine/a.c 2004-11-25 13:55:21.000000000 -0500
++++ duke3d-gcc4/source/buildengine/a.c 2005-06-18 18:14:24.000000000 -0400
+@@ -186,7 +186,9 @@
+ if (i3 == 0)
+ {
+ i1 += i4;
+- ((unsigned long)i4) >>= mach3_al;
++ unsigned long temp = i4;
++ temp >>= mach3_al;
++ i4 = temp;
+ i4 = (i4&0xffffff00) | (source[i4]&0xff);
+ *dest = ((unsigned char*)i2)[i4];
+ return i1;
+diff -ur duke3d/source/buildengine/pragmas.c duke3d-gcc4/source/buildengine/pragmas.c
+--- duke3d/source/buildengine/pragmas.c 2003-07-25 20:11:32.000000000 -0400
++++ duke3d-gcc4/source/buildengine/pragmas.c 2005-06-18 18:25:37.000000000 -0400
+@@ -56,28 +56,39 @@
+
+ void clearbufbyte(void *buffer, int size, long fill_value) {
+ int lsize;
++ unsigned char *p=buffer;
++ unsigned short *s=buffer;
+ switch(size){
+ case 0: return;
+- case 1: *((unsigned char*)buffer)++ = fill_value; return;
+- case 2: *((unsigned short*)buffer)++ = fill_value; return;
+- case 3: { unsigned char *p=buffer; p[2]=p[1]=p[0] = fill_value;} return;
++ case 1: *p = fill_value; return;
++ case 2: *s = fill_value; return;
++ case 3: { p[2]=p[1]=p[0] = fill_value;} return;
+ default:
+ if ((int)buffer&1) {
+- *((unsigned char*)buffer)++ = fill_value; size--;
++ *p = fill_value; ++p; size--;
++ buffer = p;
+ }
+ if ((int)buffer&2) {
+- *((unsigned short*)buffer)++ = fill_value; size-=2;
++ *s = fill_value; ++s; size-=2;
++ buffer = s;
+ }
+ lsize = size>>2;
++ unsigned int *up = buffer;
+ while(lsize) {
+- *((unsigned int*)buffer)++ = fill_value;
++ *up = fill_value;
++ ++up;
+ lsize--;
+ }
++ buffer = up;
+ if (size&2) {
+- *((unsigned short*)buffer)++ = fill_value;
++ s = buffer;
++ *s = fill_value;
++ ++s;
+ }
+ if (size&1) {
+- *((unsigned char*)buffer)++ = fill_value;
++ p = buffer;
++ *p = fill_value;
++ ++p;
+ }
+ }
+ }
+@@ -122,7 +133,7 @@
+ {
+ *((unsigned short *)source) = ((linum>>16)&0xffff);
+ linum += linum_inc;
+- ((unsigned char*)source) = ((unsigned char*)source) + 2;
++ source = ((unsigned char*)source) + 2;
+ size--;
+ if (size == 0) return;
+ }
+
+diff -u -r duke3d/source/buildengine/a.h duke3d.gcc4.1.1/source/buildengine/a.h
+--- duke3d/source/buildengine/a.h 2003-04-11 08:54:06.000000000 +0200
++++ duke3d.gcc4.1.1/source/buildengine/a.h 2006-06-22 12:14:40.366393568 +0200
+@@ -116,56 +116,56 @@
+
+ #if ((defined __GNUC__) && (!defined C_IDENTIFIERS_UNDERSCORED))
+
+- long asm_mmxoverlay(void) __attribute__ ((alias ("_asm_mmxoverlay")));
+- long asm_sethlinesizes(long,long,long) __attribute__ ((alias ("_asm_sethlinesizes")));
+- long asm_setpalookupaddress(char *) __attribute__ ((alias ("_asm_setpalookupaddress")));
+- long asm_setuphlineasm4(long,long) __attribute__ ((alias ("_asm_setuphlineasm4")));
+- long asm_hlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_hlineasm4")));
+- long asm_setuprhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setuprhlineasm4")));
+- long asm_rhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_rhlineasm4")));
+- long asm_setuprmhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setuprmhlineasm4")));
+- long asm_rmhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_rmhlineasm4")));
+- long asm_setupqrhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setupqrhlineasm4")));
+- long asm_qrhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_qrhlineasm4")));
+- long asm_setvlinebpl(long) __attribute__ ((alias ("_asm_setvlinebpl")));
+- long asm_fixtransluscence(long) __attribute__ ((alias ("_asm_fixtransluscence")));
+- long asm_prevlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_prevlineasm1")));
+- long asm_vlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_vlineasm1")));
+- long asm_setuptvlineasm(long) __attribute__ ((alias ("_asm_setuptvlineasm")));
+- long asm_tvlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tvlineasm1")));
+- long asm_setuptvlineasm2(long,long,long) __attribute__ ((alias ("_asm_setuptvlineasm2")));
+- long asm_tvlineasm2(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tvlineasm2")));
+- long asm_mvlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mvlineasm1")));
+- long asm_setupvlineasm(long) __attribute__ ((alias ("_asm_setupvlineasm")));
+- long asm_vlineasm4(long,long) __attribute__ ((alias ("_asm_vlineasm4")));
+- long asm_setupmvlineasm(long) __attribute__ ((alias ("_asm_setupmvlineasm")));
+- long asm_mvlineasm4(long,long) __attribute__ ((alias ("_asm_mvlineasm4")));
+- void asm_setupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setupspritevline")));
+- void asm_spritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_spritevline")));
+- void asm_msetupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_msetupspritevline")));
+- void asm_mspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mspritevline")));
+- void asm_tsetupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tsetupspritevline")));
+- void asm_tspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tspritevline")));
+- long asm_mhline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mhline")));
+- long asm_mhlineskipmodify(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mhlineskipmodify")));
+- long asm_msethlineshift(long,long) __attribute__ ((alias ("_asm_msethlineshift")));
+- long asm_thline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_thline")));
+- long asm_thlineskipmodify(long,long,long,long,long,long) __attribute__ ((alias ("_asm_thlineskipmodify")));
+- long asm_tsethlineshift(long,long) __attribute__ ((alias ("_asm_tsethlineshift")));
+- long asm_setupslopevlin(long,long,long) __attribute__ ((alias ("_asm_setupslopevlin")));
+- long asm_slopevlin(long,long,long,long,long,long) __attribute__ ((alias ("_asm_slopevlin")));
+- long asm_settransnormal(void) __attribute__ ((alias ("_asm_settransnormal")));
+- long asm_settransreverse(void) __attribute__ ((alias ("_asm_settransreverse")));
+- long asm_setupdrawslab(long,long) __attribute__ ((alias ("_asm_setupdrawslab")));
+- long asm_drawslab(long,long,long,long,long,long) __attribute__ ((alias ("_asm_drawslab")));
+- long asm_stretchhline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_stretchhline")));
+- long asm_isvmwarerunning(void) __attribute__ ((alias ("_asm_isvmwarerunning")));
++ long asm_mmxoverlay(void) asm ("_asm_mmxoverlay");
++ long asm_sethlinesizes(long,long,long) asm ("_asm_sethlinesizes");
++ long asm_setpalookupaddress(char *) asm ("_asm_setpalookupaddress");
++ long asm_setuphlineasm4(long,long) asm ("_asm_setuphlineasm4");
++ long asm_hlineasm4(long,long,long,long,long,long) asm ("_asm_hlineasm4");
++ long asm_setuprhlineasm4(long,long,long,long,long,long) asm ("_asm_setuprhlineasm4");
++ long asm_rhlineasm4(long,long,long,long,long,long) asm ("_asm_rhlineasm4");
++ long asm_setuprmhlineasm4(long,long,long,long,long,long) asm ("_asm_setuprmhlineasm4");
++ long asm_rmhlineasm4(long,long,long,long,long,long) asm ("_asm_rmhlineasm4");
++ long asm_setupqrhlineasm4(long,long,long,long,long,long) asm ("_asm_setupqrhlineasm4");
++ long asm_qrhlineasm4(long,long,long,long,long,long) asm ("_asm_qrhlineasm4");
++ long asm_setvlinebpl(long) asm ("_asm_setvlinebpl");
++ long asm_fixtransluscence(long) asm ("_asm_fixtransluscence");
++ long asm_prevlineasm1(long,long,long,long,long,long) asm ("_asm_prevlineasm1");
++ long asm_vlineasm1(long,long,long,long,long,long) asm ("_asm_vlineasm1");
++ long asm_setuptvlineasm(long) asm ("_asm_setuptvlineasm");
++ long asm_tvlineasm1(long,long,long,long,long,long) asm ("_asm_tvlineasm1");
++ long asm_setuptvlineasm2(long,long,long) asm ("_asm_setuptvlineasm2");
++ long asm_tvlineasm2(long,long,long,long,long,long) asm ("_asm_tvlineasm2");
++ long asm_mvlineasm1(long,long,long,long,long,long) asm ("_asm_mvlineasm1");
++ long asm_setupvlineasm(long) asm ("_asm_setupvlineasm");
++ long asm_vlineasm4(long,long) asm ("_asm_vlineasm4");
++ long asm_setupmvlineasm(long) asm ("_asm_setupmvlineasm");
++ long asm_mvlineasm4(long,long) asm ("_asm_mvlineasm4");
++ void asm_setupspritevline(long,long,long,long,long,long) asm ("_asm_setupspritevline");
++ void asm_spritevline(long,long,long,long,long,long) asm ("_asm_spritevline");
++ void asm_msetupspritevline(long,long,long,long,long,long) asm ("_asm_msetupspritevline");
++ void asm_mspritevline(long,long,long,long,long,long) asm ("_asm_mspritevline");
++ void asm_tsetupspritevline(long,long,long,long,long,long) asm ("_asm_tsetupspritevline");
++ void asm_tspritevline(long,long,long,long,long,long) asm ("_asm_tspritevline");
++ long asm_mhline(long,long,long,long,long,long) asm ("_asm_mhline");
++ long asm_mhlineskipmodify(long,long,long,long,long,long) asm("_asm_mhlineskipmodify");
++ long asm_msethlineshift(long,long) asm("_asm_msethlineshift");
++ long asm_thline(long,long,long,long,long,long) asm("_asm_thline");
++ long asm_thlineskipmodify(long,long,long,long,long,long) asm("_asm_thlineskipmodify");
++ long asm_tsethlineshift(long,long) asm("_asm_tsethlineshift");
++ long asm_setupslopevlin(long,long,long) asm("_asm_setupslopevlin");
++ long asm_slopevlin(long,long,long,long,long,long) asm("_asm_slopevlin");
++ long asm_settransnormal(void) asm("_asm_settransnormal");
++ long asm_settransreverse(void) asm("_asm_settransreverse");
++ long asm_setupdrawslab(long,long) asm("_asm_setupdrawslab");
++ long asm_drawslab(long,long,long,long,long,long) asm("_asm_drawslab");
++ long asm_stretchhline(long,long,long,long,long,long) asm("_asm_stretchhline");
++ long asm_isvmwarerunning(void) asm("_asm_isvmwarerunning");
+
+ /*
+ * !!! I need a reference to this, for mprotect(), but the actual function
+ * !!! is never called in BUILD...just from other ASM routines. --ryan.
+ */
+- long asm_prohlineasm4(void) __attribute__ ((alias ("_asm_prohlineasm4")));
++ long asm_prohlineasm4(void) asm("_asm_prohlineasm4");
+
+ #endif /* ELF/GCC */
+ #endif /* defined USE_I386_ASM */
diff --git a/games-fps/duke3d/files/duke3d-20040817-ldflags.patch b/games-fps/duke3d/files/duke3d-20040817-ldflags.patch
new file mode 100644
index 00000000000..79179e66380
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d-20040817-ldflags.patch
@@ -0,0 +1,66 @@
+--- source/buildengine/Makefile.old 2010-10-08 14:32:05.000000000 +0200
++++ source/buildengine/Makefile 2010-10-08 14:35:10.000000000 +0200
+@@ -73,7 +73,7 @@
+ endif
+
+ ifeq ($(strip $(solaris)),true)
+- LDFLAGS += -lsocket -lnsl
++ LIBS += -lsocket -lnsl
+ CFLAGS += -DPLATFORM_SOLARIS
+ endif
+
+@@ -129,7 +129,7 @@
+
+ ifeq ($(strip $(macosx)),true)
+ CFLAGS += -DPLATFORM_MACOSX=1 -faltivec -falign-loops=32 -falign-functions=32
+- LDFLAGS += -framework AppKit -lSDL -lSDLmain
++ LIBS += -framework AppKit -lSDL -lSDLmain
+ endif
+
+ ifeq ($(strip $(useopengl)),true)
+@@ -146,7 +146,7 @@
+
+ ifeq ($(strip $(usephysfs)),true)
+ CFLAGS += -DUSE_PHYSICSFS
+- LDFLAGS += -lphysfs
++ LIBS += -lphysfs
+ endif
+
+ ifeq ($(strip $(usedlls)),true)
+@@ -236,17 +236,17 @@
+
+ ifeq ($(strip $(usedlls)),true)
+ $(ENGINEDLL) : $(ENGINEOBJS)
+- $(LINKER) -shared -o $(ENGINEDLL) $(LDFLAGS) $(ENGINEOBJS) $(LDLIBS)
++ $(LINKER) -shared -o $(ENGINEDLL) $(LIBS) $(ENGINEOBJS) $(LDLIBS)
+
+ $(NETDLL) : $(NETOBJS)
+- $(LINKER) -shared -o $(NETDLL) $(LDFLAGS) $(NETOBJS) $(LDLIBS)
++ $(LINKER) -shared -o $(NETDLL) $(LIBS) $(NETOBJS) $(LDLIBS)
+ endif
+
+ $(GAMEEXE) : $(ENGINEDLL) $(NETDLL) $(GAMEOBJS) $(PERLOBJS)
+- $(LINKER) -o $(GAMEEXE) $(LDFLAGS) $(PERLOBJS) $(GAMEOBJS) $(LDPERL) $(LDLIBS) $(ENGINEDLL) $(NETDLL)
++ $(LINKER) $(LDFLAGS) -o $(GAMEEXE) $(LIBS) $(PERLOBJS) $(GAMEOBJS) $(LDPERL) $(LDLIBS) $(ENGINEDLL) $(NETDLL)
+
+ $(BUILDEXE) : $(ENGINEDLL) $(BUILDOBJS)
+- $(LINKER) -o $(BUILDEXE) $(LDFLAGS) $(BUILDOBJS) $(LDLIBS) $(ENGINEDLL)
++ $(LINKER) $(LDFLAGS) -o $(BUILDEXE) $(LIBS) $(BUILDOBJS) $(LDLIBS) $(ENGINEDLL)
+
+ listclean:
+ @echo "A 'make clean' would remove" $(CLEANUP)
+--- source/Makefile.old 2010-10-08 14:35:54.000000000 +0200
++++ source/Makefile 2010-10-08 14:37:34.000000000 +0200
+@@ -152,10 +152,10 @@
+ sounds.o \
+ dukemusc.o \
+ audiolib/audiolib.a
+- $(CC) $^ $(BUILDOBJS) $(LDLIBS) -o $@
++ $(CC) $(LDFLAGS) $^ $(BUILDOBJS) $(LDLIBS) -o $@
+
+ build: astub.o
+- $(CC) $^ $(BUILDOBJS) buildengine/build.o $(LDLIBS) -o $@
++ $(CC) $(LDFLAGS) $^ $(BUILDOBJS) buildengine/build.o $(LDLIBS) -o $@
+
+ clean:
+ $(MAKE) -C audiolib clean
diff --git a/games-fps/duke3d/files/duke3d-20040817-noinline.patch b/games-fps/duke3d/files/duke3d-20040817-noinline.patch
new file mode 100644
index 00000000000..a41c5c01d06
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d-20040817-noinline.patch
@@ -0,0 +1,18 @@
+--- source/buildengine/engine.c.old 2009-02-06 09:11:54.000000000 +0100
++++ source/buildengine/engine.c 2009-02-06 09:19:12.000000000 +0100
+@@ -391,6 +391,7 @@
+ modify exact [eax ebx ecx]\
+
+ #elif (defined __GNUC__) || (defined __ICC)
++ __attribute__ ((noinline))
+ static long nsqrtasm(int i1)
+ {
+ long retval;
+@@ -601,6 +602,7 @@
+
+ #elif (defined __GNUC__) || (defined __ICC)
+
++ __attribute__ ((noinline))
+ int setgotpic(long i1)
+ {
+ int retval = 0;
diff --git a/games-fps/duke3d/files/duke3d.cfg b/games-fps/duke3d/files/duke3d.cfg
new file mode 100644
index 00000000000..2e8c4a0671b
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d.cfg
@@ -0,0 +1,194 @@
+[Setup]
+SetupVersion = "1.3D"
+
+[Screen Setup]
+ScreenMode = 2
+ScreenWidth = 1024
+ScreenHeight = 768
+Shadows = 1
+Password = ""
+Detail = 1
+Tilt = 1
+Messages = 1
+Out = 0
+ScreenSize = 8
+ScreenGamma = 0
+
+[Sound Setup]
+FXDevice = 0
+MusicDevice = 0
+FXVolume = 220
+MusicVolume = 200
+NumVoices = 8
+NumChannels = 2
+NumBits = 16
+MixRate = 44100
+MidiPort = 0x330
+BlasterAddress = 0x220
+BlasterType = 1
+BlasterInterrupt = 5
+BlasterDma8 = 1
+BlasterDma16 = 5
+BlasterEmu = 0x620
+ReverseStereo = 0
+SoundToggle = 1
+VoiceToggle = 1
+AmbienceToggle = 1
+MusicToggle = 1
+
+[KeyDefinitions]
+Move_Forward = "Up" "Kpad8"
+Move_Backward = "Down" "Kpad2"
+Turn_Left = "Left" "Kpad4"
+Turn_Right = "Right" "KPad6"
+Strafe = "LAlt" "RAlt"
+Fire = "LCtrl" "RCtrl"
+Open = "Space" ""
+Run = "LShift" "RShift"
+AutoRun = "CapLck" ""
+Jump = "A" "/"
+Crouch = "Z" ""
+Look_Up = "PgUp" "Kpad9"
+Look_Down = "PgDn" "Kpad3"
+Look_Left = "Insert" "Kpad0"
+Look_Right = "Delete" "Kpad."
+Strafe_Left = "," ""
+Strafe_Right = "." ""
+Aim_Up = "Home" "KPad7"
+Aim_Down = "End" "Kpad1"
+Weapon_1 = "1" ""
+Weapon_2 = "2" ""
+Weapon_3 = "3" ""
+Weapon_4 = "4" ""
+Weapon_5 = "5" ""
+Weapon_6 = "6" ""
+Weapon_7 = "7" ""
+Weapon_8 = "8" ""
+Weapon_9 = "9" ""
+Weapon_10 = "0" ""
+Inventory = "Enter" "KpdEnt"
+Inventory_Left = "[" ""
+Inventory_Right = "]" ""
+Holo_Duke = "H" ""
+Jetpack = "J" ""
+NightVision = "N" ""
+MedKit = "M" ""
+TurnAround = "BakSpc" ""
+SendMessage = "T" ""
+Map = "Tab" ""
+Shrink_Screen = "-" "Kpad-"
+Enlarge_Screen = "=" "Kpad+"
+Center_View = "KPad5" ""
+Holster_Weapon = "ScrLck" ""
+Show_Opponents_Weapon = "W" ""
+Map_Follow_Mode = "F" ""
+See_Coop_View = "K" ""
+Mouse_Aiming = "U" ""
+Toggle_Crosshair = "I" ""
+Steroids = "R" ""
+Quick_Kick = "`" ""
+Next_Weapon = "'" ""
+Previous_Weapon = ";" ""
+
+[Controls]
+ControllerType = 1
+JoystickPort = 0
+MouseSensitivity = 32768
+ExternalFilename = "EXTERNAL.EXE"
+EnableRudder = 0
+MouseAiming = 0
+MouseButton0 = "Fire"
+MouseButtonClicked0 = ""
+MouseButton1 = "Strafe"
+MouseButtonClicked1 = "Open"
+MouseButton2 = "Move_Forward"
+MouseButtonClicked2 = ""
+JoystickButton0 = "Fire"
+JoystickButtonClicked0 = ""
+JoystickButton1 = "Strafe"
+JoystickButtonClicked1 = "Inventory"
+JoystickButton2 = "Run"
+JoystickButtonClicked2 = "Jump"
+JoystickButton3 = "Open"
+JoystickButtonClicked3 = "Crouch"
+JoystickButton4 = "Aim_Down"
+JoystickButtonClicked4 = ""
+JoystickButton5 = "Look_Right"
+JoystickButtonClicked5 = ""
+JoystickButton6 = "Aim_Up"
+JoystickButtonClicked6 = ""
+JoystickButton7 = "Look_Left"
+JoystickButtonClicked7 = ""
+MouseAnalogAxes0 = "analog_turning"
+MouseDigitalAxes0_0 = ""
+MouseDigitalAxes0_1 = ""
+MouseAnalogScale0 = 0
+MouseAnalogAxes1 = "analog_moving"
+MouseDigitalAxes1_0 = ""
+MouseDigitalAxes1_1 = ""
+MouseAnalogScale1 = 0
+JoystickAnalogAxes0 = "analog_turning"
+JoystickDigitalAxes0_0 = ""
+JoystickDigitalAxes0_1 = ""
+JoystickAnalogScale0 = 0
+JoystickAnalogAxes1 = "analog_moving"
+JoystickDigitalAxes1_0 = ""
+JoystickDigitalAxes1_1 = ""
+JoystickAnalogScale1 = 0
+JoystickAnalogAxes2 = "analog_strafing"
+JoystickDigitalAxes2_0 = ""
+JoystickDigitalAxes2_1 = ""
+JoystickAnalogScale2 = 0
+JoystickAnalogAxes3 = ""
+JoystickDigitalAxes3_0 = "Run"
+JoystickDigitalAxes3_1 = ""
+JoystickAnalogScale3 = 0
+GamePadDigitalAxes0_0 = "Turn_Left"
+GamePadDigitalAxes0_1 = "Turn_Right"
+GamePadDigitalAxes1_0 = "Move_Forward"
+GamePadDigitalAxes1_1 = "Move_Backward"
+MouseAimingFlipped = 0
+GameMouseAiming = 0
+AimingFlag = 0
+
+[Comm Setup]
+ComPort = 2
+IrqNumber = 65535
+UartAddress = 65535
+PortSpeed = 9600
+ToneDial = 1
+SocketNumber = 65535
+NumberPlayers = 2
+ModemName = ""
+InitString = "ATZ"
+HangupString = "ATH0=0"
+DialoutString = ""
+PlayerName = "DUKE"
+RTSName = "DUKE.RTS"
+PhoneNumber = ""
+ConnectType = 0
+CommbatMacro#0 = "An inspiration for birth control."
+CommbatMacro#1 = "You're gonna die for that!"
+CommbatMacro#2 = "It hurts to be you."
+CommbatMacro#3 = "Lucky Son of a Bitch."
+CommbatMacro#4 = "Hmmm....Payback time."
+CommbatMacro#5 = "You bottom dwelling scum sucker."
+CommbatMacro#6 = "Damn, you're ugly."
+CommbatMacro#7 = "Ha ha ha...Wasted!"
+CommbatMacro#8 = "You suck!"
+CommbatMacro#9 = "AARRRGHHHHH!!!"
+
+[Misc]
+Executions = 5
+RunMode = 0
+Crosshairs = 1
+WeaponChoice0 = 3
+WeaponChoice1 = 4
+WeaponChoice2 = 5
+WeaponChoice3 = 7
+WeaponChoice4 = 8
+WeaponChoice5 = 6
+WeaponChoice6 = 0
+WeaponChoice7 = 2
+WeaponChoice8 = 9
+WeaponChoice9 = 1
diff --git a/games-fps/duke3d/files/network.cfg b/games-fps/duke3d/files/network.cfg
new file mode 100644
index 00000000000..46db8b3119f
--- /dev/null
+++ b/games-fps/duke3d/files/network.cfg
@@ -0,0 +1,15 @@
+# lifted from happypenguin.org
+
+INTERFACE [your ip address]
+
+# only peer appears to work [SERVER or CLIENT or PEER]
+MODE peer
+
+# create an allow line for everyone who will connect
+ALLOW [another player's ip address]
+ALLOW [another player's ip address]
+ALLOW [another player's ip address]
+ALLOW [another player's ip address]
+
+# try to find [number] of players and start the game
+BROADCAST [number]
diff --git a/games-fps/duke3d/metadata.xml b/games-fps/duke3d/metadata.xml
new file mode 100644
index 00000000000..e941f24a621
--- /dev/null
+++ b/games-fps/duke3d/metadata.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+The third chapter in the series, and the first with a 3D perspective
+(the original Duke Nukem and the sequel, Duke Nukem II, are side
+scrolling platform games). This game, set sometime in the early 21st
+century, begins in a ravaged LA, which was overtaken by aliens while you
+were abducted during Duke Nukem II. Duke, upon returning to Earth, finds
+himself with another mess to clean up, and another alien race that needs
+exterminating. Duke is a can-do hero who realizes that sometimes
+innocent people have to die in order to save Earth, so accuracy of gun
+fire is not a real concern to him. :)
+
+This game has a long list of cool things that haven't been attempted in
+3D action games, yet. The weapons, for example, kick-butt:
+
+ * There's a mine that can be placed on any wall and sends out a
+laser trip beam-- perfect for multiplayer games.
+ * There's also a shrinker ray that reduces an opponent to the size
+of a G.I. Joe, at which point they are foot fodder--watch them splat!
+ * As in Shadow Warrior, you can swim under water, and even shoot
+players who are standing outside the water, or vice versa.
+
+ What works:
+ * Basic gameplay seems fine.
+ * Sound and music.
+ * keyboard input.
+ * mouse input.
+ * Hi-res (what would be "VESA modes" in DOS).
+ * Windowed/fullscreen support.
+ * Save games.
+ * Record and playback demos compatible with the Atomic Edition (1.5).
+ * Shareware and retail versions should all work.
+ * BUILD editor works to a large degree.
+ * DukeBots for multiplayer AI.
+ * Assembly code all has portable C fallbacks, now.
+ * TCP/IP Networking!
+ * Linux/x86 port.
+ * Windows/x86 port.
+ * BeOS/x86 port.
+ * (incomplete) MacOS X port.
+
+What doesn't work/known bugs:
+ * Joystick input isn't working yet.
+ * File cases need to be exact in some places, not others.
+ * Engine (game?) relies on compiler treating "char" as "unsigned" by default...this needs to be flushed out, for sanity's sake. But I'm anal. :)
+ * Netcode handles packet loss _VERY_ poorly...it's fine for stable connections and LANs, though.
+ * Configuring a multiplayer game involves editing text files and filling in IP addresses. Not very user-friendly.
+ * Some text prompts try to read the SDL input queue instead of stdin like they should.
+ * Probably other stuff. Do NOT consider this stable and complete yet!
+</longdescription>
+ <use>
+ <flag name="demo">Install the demo files</flag>
+ <flag name='pic'>disable optimized assembly code that is not PIC friendly</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/eduke32/Manifest b/games-fps/eduke32/Manifest
new file mode 100644
index 00000000000..8a9e76b4801
--- /dev/null
+++ b/games-fps/eduke32/Manifest
@@ -0,0 +1,6 @@
+DIST duke3d_hrp_5.2.zip 709961560 SHA256 d5dc9ef4be517de1464e8ed886f2a6352402fdec2b9cf271d292a5aee82fae27 SHA512 6b80739082d01e879ee77c85d3702269a605bc5f5b9393ce2f391d50c2a14e8fd0cd274a7e3010636646c3b7725591f45f107503c04a84655621a197f5f3c69e WHIRLPOOL 03cbc7fe0b8f3f7d4eaf7e5df4d8c9537ffaa0e7a49d938f0138bf0a6c87a72ecfa30666a94ec228dc66da6e55a6632d08340edcb2c49d9c4aaa4031ab5f231c
+DIST duke3d_mus_3.0.zip 129992841 SHA256 6dc9eb70ee1850519b55e547a399e3f7f03ddf60a6b16b0e205edd8a05bdda4a SHA512 9b782a2b6bb006a01e7ca2a8c395fcbe0884cc7648fce03f7760d67e67e4b03d73e31fff5964a604270ffddf09df69f306147dffd115efcd738de416939060cf WHIRLPOOL dec7613bf321a8392361ed414c3cba1909adf6106ae16fe04858549d8574d696f677ac90b0a8a7ab7cf6fb31b6263223b03434536f528c7f50c8b77fd7c059d2
+DIST duke3d_musopl_2.0.zip 266444907 SHA256 4f0afc46bfb5f38b1a1417a6145c0c548355cf4c4438e0330a9de704b139f1c3 SHA512 e9ae69727f84ff71bf9abffa283fda1fcaf56fd6ae6b865d12f138d64b0fca0d36fd9695b1e60a64716154055373eecd6499ebd8801a4ecb55ddc4722208eff7 WHIRLPOOL b69b76050f97785b54a1693b3f9eeb124b208cb785719c9c37a499a7af8f9cdd2362a7ce0cab81b17a3ab7f80744eadd0a286b45844dee6bf37e0f320d61148a
+DIST duke3d_xxx_1.33.zip 26586453 SHA256 c31713e6400a175a1bfa3bd369d132f8a8abce8915c113549f98262b9a84b534 SHA512 4783d159610fc178e748446b7a5f9c13d90e1aca3cef34deb82e99655b7f4a254f1130e16dbcfad9013b95bc07161d5c5dccfcc552fbb7a88404b4b9cedbadbf WHIRLPOOL 1e7c8a06fd8ff558a8f5a5cc37093fe055555bdfd296194935c986978b4630c225a1f5da7d54e274bd8a5258a4b518ffc2456c79f515185bfb6e403488cad125
+DIST eduke32-icons.tar 102400 SHA256 efce5cddd9a55f07824f5739831b79cff2ea6e508f0b17b996316533af925842 SHA512 797f76cfc0e253ce3364e80f70b616fc004811c08519020727871addc90c7780b475ee7769398e13859f93893ccbb916bd4229a39f4c119169a69231e6fd411c WHIRLPOOL 9815abce63dcf8e865c61610f1b04915ced9b29c65cd831022f5b6f261bd55efc700b6fd5ee2741332023b85682b08d3a327998c57be33846dffdcb60eb1339b
+DIST eduke32_src_20131119-4169.tar.xz 12228040 SHA256 1aaeadb7b8ac68d6a7e3b0cc568875df6a2b319cc7626c6a4d38cb69fa5f162e SHA512 6ab7babc18c80e111603b9b731f37963f3bfe2ee753a2e383d58a21e77ad5a561cf95f5392adcf76259e6ded2dcd5eb5d0fc484edf65ec6887a746c4f422f292 WHIRLPOOL 576e0f0e73b383fe221ef5db8b54889bf3e8271e361a0af41fd1a914d8a9be3711a9b536d668790013f8fcd0ea3c11b31b47bf333e685bbf853f48152e2fc194
diff --git a/games-fps/eduke32/eduke32-20131119.4169.ebuild b/games-fps/eduke32/eduke32-20131119.4169.ebuild
new file mode 100644
index 00000000000..5563a2a93da
--- /dev/null
+++ b/games-fps/eduke32/eduke32-20131119.4169.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO/FIXME:
+# lunatic broken
+# lunatic? ( >=dev-lang/luajit-2.0.0_beta10:2 )
+# $(usex lunatic "LUNATIC=1" "LUNATIC=0")
+#
+# extras? ( games-fps/${PN}-extras )
+
+EAPI=5
+
+inherit eutils gnome2-utils games
+
+MY_PV=${PV%.*}
+MY_BUILD=${PV#*.}
+
+# extensions
+MY_HRP=5.2
+MY_SC55=3.0
+MY_OPL=2.0
+MY_XXX=1.33
+
+DESCRIPTION="Port of Duke Nukem 3D for SDL"
+HOMEPAGE="http://www.eduke32.com/ http://hrp.duke4.net/"
+SRC_URI="http://dukeworld.duke4.net/eduke32/synthesis/${MY_PV}-${MY_BUILD}/${PN}_src_${MY_PV}-${MY_BUILD}.tar.xz
+ http://dev.gentoo.org/~hasufell/distfiles/eduke32-icons.tar
+ textures? ( http://www.duke4.org/files/nightfright/duke3d_hrp.zip -> duke3d_hrp_${MY_HRP}.zip )
+ sc55-musicpack? ( http://www.duke4.org/files/nightfright/music/duke3d_mus.zip -> duke3d_mus_${MY_SC55}.zip )
+ opl-musicpack? ( http://www.duke4.org/files/nightfright/music/duke3d_musopl.zip -> duke3d_musopl_${MY_OPL}.zip )
+ offensive? ( http://www.duke4.org/files/nightfright/duke3d_xxx.zip -> duke3d_xxx_${MY_XXX}.zip )"
+
+LICENSE="GPL-2 BUILDLIC textures? ( hrp_art )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cdinstall debug demo gtk offensive +opengl opl-musicpack +png samples sc55-musicpack +server textures tools +vpx"
+REQUIRED_USE="?? ( opl-musicpack sc55-musicpack )"
+
+RDEPEND="media-libs/flac
+ media-libs/libogg
+ media-libs/libsdl[X,joystick,opengl?,video]
+ media-libs/libvorbis
+ media-libs/sdl-mixer[timidity]
+ sys-libs/zlib
+ gtk? ( x11-libs/gtk+:2 )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ vpx? ( media-libs/libvpx )
+ )
+ png? ( media-libs/libpng:0=
+ sys-libs/zlib )
+ "
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ app-arch/xz-utils
+ x86? ( dev-lang/nasm )"
+PDEPEND="cdinstall? ( games-fps/duke3d-data )
+ demo? ( games-fps/duke3d-demodata )"
+
+S=${WORKDIR}/${PN}_${MY_PV}-${MY_BUILD}
+
+src_unpack() {
+ unpack ${PN}_src_${MY_PV}-${MY_BUILD}.tar.xz eduke32-icons.tar
+
+ if use textures; then
+ unzip -q "${DISTDIR}"/duke3d_hrp_${MY_HRP}.zip "hrp_readme.txt" \
+ || die "unzip hrp readme"
+ if use offensive; then
+ unzip -q "${DISTDIR}"/duke3d_xxx_${MY_XXX}.zip "xxx_readme.txt" \
+ || die "unzip xxx readme"
+ fi
+ fi
+ if use opl-musicpack; then
+ unzip -q "${DISTDIR}"/duke3d_musopl_${MY_OPL}.zip "readme.txt" \
+ || die "unzip musopl readme"
+ mv readme.txt musopl_readme.txt || die "mv musopl_readme"
+ elif use sc55-musicpack; then
+ unzip -q "${DISTDIR}"/duke3d_mus_${MY_SC55}.zip "music_readme.txt" \
+ || die "unzip mus readme"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-QA.patch
+
+ # Point eduke32 to data files in shared duke3d folder.
+ # Multiple search paths can be defined, so that with the default configuration as of
+ # the 20130128 release, this adds /usr/share/games/duke3d in ADDITION to
+ # /usr/share/games/eduke32 so that eduke32 and duke3d's base data can be kept separate.
+ # also redirect log file so it's not always written in $PWD
+ sed -i \
+ -e "s;/usr/local/share/games/${PN};${GAMES_DATADIR}/duke3d;" \
+ source/common.c || die "sed common.c path update failed"
+ sed -i \
+ -e "/OSD_SetLogFile/s;mapster32.log;${GAMES_LOGDIR}/mapster32.log;" \
+ source/astub.c || die "sed astub.c path update failed"
+ sed -i \
+ -e "/OSD_SetLogFile/s;${PN}.log;${GAMES_LOGDIR}/${PN}.log;" \
+ source/game.c || die "sed game.c path update failed"
+}
+
+src_compile() {
+ local MY_OPTS=(
+ AS=$(type -P nasm)
+ ARCH=
+ SYSARCH=
+ LTO=0
+ PRETTY_OUTPUT=0
+ RELEASE=1
+ LUNATIC=0
+ STRIP=touch
+ LINKED_GTK=1
+ CPLUSPLUS=0
+ SDL_TARGET=1
+ F_JUMP_TABLES=""
+ $(usex gtk "WITHOUT_GTK=0" "WITHOUT_GTK=1")
+ $(usex debug "DEBUGANYWAY=1" "DEBUGANYWAY=0")
+ $(usex x86 "NOASM=0" "NOASM=1")
+ $(usex server "NETCODE=1" "NETCODE=0")
+ $(usex opengl "USE_OPENGL=1 POLYMER=1" "USE_OPENGL=0 POLYMER=0")
+ $(usex png "USE_LIBPNG=1" "USE_LIBPNG=0")
+ $(usex opengl "$(usex vpx "USE_LIBVPX=1" "USE_LIBVPX=0")" "USE_LIBVPX=0")
+ )
+
+ emake ${MY_OPTS[@]}
+
+ if use tools; then
+ emake -C build ${MY_OPTS[@]}
+ fi
+}
+
+src_install() {
+ local ARGS
+
+ newgamesbin ${PN} ${PN}.bin
+ dogamesbin mapster32
+
+ if use tools; then
+ dobin build/{arttool,bsuite,cacheinfo,generateicon,givedepth,kextract,kgroup,kmd2tool,md2tool,mkpalette,transpal,unpackssi,wad2art,wad2map}
+ dodoc build/doc/*.txt
+ fi
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ # Install optional components
+ if use textures; then
+ newins "${DISTDIR}"/duke3d_hrp_${MY_HRP}.zip duke3d_hrp.zip
+ dodoc "${WORKDIR}"/hrp_readme.txt
+ ARGS+=" -g duke3d_hrp.zip"
+
+ if use offensive; then
+ newins "${DISTDIR}"/duke3d_xxx_${MY_XXX}.zip duke3d_xxx.zip
+ dodoc "${WORKDIR}"/xxx_readme.txt
+ ARGS+=" -g duke3d_xxx.zip"
+ fi
+ fi
+
+ if use opl-musicpack; then
+ newins "${DISTDIR}"/duke3d_musopl_${MY_OPL}.zip duke3d_musopl.zip
+ dodoc "${WORKDIR}"/musopl_readme.txt
+ ARGS+=" -g duke3d_musopl.zip"
+ elif use sc55-musicpack; then
+ newins "${DISTDIR}"/duke3d_mus_${MY_SC55}.zip duke3d_mus.zip
+ dodoc "${WORKDIR}"/music_readme.txt
+ ARGS+=" -g duke3d_mus.zip"
+ fi
+
+ # Install game data
+ doins package/sdk/{SEHELP.HLP,STHELP.HLP,m32help.hlp,names.h,tiles.cfg}
+ use samples && doins -r package/samples
+
+ local i
+ for i in 16 32 128 256 ; do
+ newicon -s ${i} "${WORKDIR}"/${PN}_${i}x${i}x32.png ${PN}.png
+ newicon -s ${i} "${WORKDIR}"/mapster32_${i}x${i}x32.png mapster32.png
+ done
+
+ games_make_wrapper "${PN}" "${GAMES_BINDIR}/${PN}.bin ${ARGS}"
+ make_desktop_entry ${PN} EDuke32 ${PN}
+ make_desktop_entry mapster32 Mapster32 mapster32
+
+ dodoc build/buildlic.txt
+
+ keepdir "${GAMES_LOGDIR}"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ use cdinstall || use demo || {
+ elog "Note: You must also install the game data files, either manually or with"
+ elog "games-fps/duke3d-demodata or games-fps/duke3d-data before playing."
+ }
+
+ einfo
+ elog "${PN} reads data files from ${GAMES_DATADIR}/duke3d"
+ einfo
+
+ [[ -e ${ROOT}/${GAMES_LOGDIR} ]] || mkdir -p "${ROOT}/${GAMES_LOGDIR}"
+ touch "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ touch "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+ chown ${GAMES_USER}:${GAMES_GROUP} "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ chown ${GAMES_USER}:${GAMES_GROUP} "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+ chmod g+w "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ chmod g+w "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/eduke32/files/eduke32-20131119.4169-QA.patch b/games-fps/eduke32/files/eduke32-20131119.4169-QA.patch
new file mode 100644
index 00000000000..38e9b36fa2b
--- /dev/null
+++ b/games-fps/eduke32/files/eduke32-20131119.4169-QA.patch
@@ -0,0 +1,150 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Feb 2 01:16:21 UTC 2013
+Subject: build system
+
+ respect CC/CXX etc and CFLAGS/CXXFLAGS/LDFLAGS
+
+--- eduke32_20130201-3453/Makefile
++++ eduke32_20130201-3453/Makefile
+@@ -311,10 +311,10 @@
+ endif
+
+ COMPILER=$(CC) $(OURCONLYFLAGS)
+-LINKER=$(L_CC)
++LINKER=$(L_CC) $(OURCFLAGS) $(OURCONLYFLAGS)
+ ifneq ($(CPLUSPLUS),0)
+ COMPILER=$(CXX) $(OURCXXFLAGS)
+- LINKER=$(L_CXX)
++ LINKER=$(L_CXX) $(OURCXXFLAGS)
+ endif
+
+ ifeq ($(PRETTY_OUTPUT),1)
+--- eduke32_20130201-3453/Makefile.common
++++ eduke32_20130201-3453/Makefile.common
+@@ -10,13 +10,14 @@
+
+ # Tools
+ CROSS=
+-CC=$(CROSS)gcc
+-CXX=$(CROSS)g++
+-AS=$(CROSS)nasm
+-AR=$(CROSS)ar
+-RC=$(CROSS)windres
+-RANLIB=$(CROSS)ranlib
+-STRIP=$(CROSS)strip
++CC ?= $(CROSS)gcc
++CXX ?= $(CROSS)g++
++AS ?= $(CROSS)nasm
++AR ?= $(CROSS)ar
++RC ?= $(CROSS)windres
++RANLIB ?= $(CROSS)ranlib
++STRIP ?= $(CROSS)strip
++PKG_CONFIG ?= pkgconfig
+
+ L_CC=$(CC)
+ L_CXX=$(CXX)
+@@ -164,7 +165,6 @@
+ # FORCEWARNINGS - 1 = do not disable any compiler warnings within the source
+ # KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
+ # EFENCE - 1 = compile with Electric Fence for malloc() debugging
+-# OPTLEVEL - 0..3 = GCC optimization strategy
+ # LTO - 1 = enable link-time optimization, for GCC 4.5 and up
+ #
+ CPLUSPLUS?=0
+@@ -178,13 +178,6 @@
+ PROFILER?=0
+ MUDFLAP?=0
+
+-# Select the default optimization level for release and debug builds.
+-ifeq ($(RELEASE),0)
+- OPTLEVEL?=0
+-else
+- OPTLEVEL?=2
+-endif
+-
+ ifeq ($(RELEASE),0)
+ override STRIP=
+ endif
+@@ -293,10 +286,9 @@
+
+ # compiler flags etc.
+ BASECFLAGS=
+-BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
+-BASECXXFLAGS= -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings
+-BASEASFLAGS=-s #-g
+-BASELDFLAGS=
++BASECONLYFLAGS = $(CFLAGS) -std=gnu89 -Wimplicit -Wdeclaration-after-statement
++BASECXXFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings -Wno-narrowing
++BASELDFLAGS = $(LDFLAGS)
+
+
+ ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
+@@ -330,19 +322,6 @@
+ endif
+
+
+-ifneq ($(RELEASE)$(DEBUGANYWAY),10)
+- # debug build or DEBUGANYWAY=1 --> -g flag
+- ifneq (0,$(CLANG))
+- debug=-g
+- else ifeq ($(PLATFORM), WII)
+- debug=-g
+- else
+- debug=-ggdb
+- endif
+-endif
+-
+-debug+= -O$(OPTLEVEL)
+-
+ # See http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
+ # for a list of possible UBSan options.
+ # Clang 3.2 does only supports -fsanitize=address for the AddressSanitizer
+@@ -458,7 +437,7 @@
+
+ #### Lunatic development
+ # LuaJIT standalone interpreter executable:
+-LUAJIT:=luajit
++LUAJIT:=$(shell command -v luajit || command -v luajit-2 || command -v luajit-2.0)
+ # Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
+ # the native LuaJIT to emit PE object files.
+ ifneq ($(SYNTHESIS),0)
+@@ -487,7 +466,8 @@
+ ifeq ($(PLATFORM),WINDOWS)
+ BASELIBS+= -lluajit
+ else
+- BASELIBS+= -lluajit-5.1
++ BASECOMMONFLAGS+= $(shell $(PKG_CONFIG) --cflags luajit 2>/dev/null || $(PKG_CONFIG) --cflags luajit-2.0)
++ BASELIBS+= $(shell $(PKG_CONFIG) --libs luajit 2>/dev/null || $(PKG_CONFIG) --libs luajit-2.0)
+ endif
+ endif
+
+--- eduke32_20130201-3453/build/Makefile
++++ eduke32_20130201-3453/build/Makefile
+@@ -167,13 +167,15 @@
+ OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
+
+ COMPILER=$(CC) $(OURCONLYFLAGS)
+-LINKER=$(L_CC)
++LINKER=$(L_CC) $(OURCFLAGS) $(OURCONLYFLAGS)
+ ifneq ($(CPLUSPLUS),0)
+ COMPILER=$(CXX) $(OURCXXFLAGS)
+- LINKER=$(L_CXX)
++ LINKER=$(L_CXX) $(OURCXXFLAGS)
+ endif
+
+-.SILENT:
++ifeq ($(PRETTY_OUTPUT),1)
++ .SILENT:
++endif
+ .PHONY: clean cleanutils veryclean all utils dxutils sdlutils printutils printsdlutils printdxutils enginelib editorlib
+
+ # TARGETS
+@@ -266,7 +268,7 @@
+ if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
+ arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
+ $(ONESTEP_STATUS)
+- if $(L_CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
++ if $(L_CXX) $(OURCXXFLAGS) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
+ givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS)
+ $(ONESTEP_STATUS)
+ if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
diff --git a/games-fps/eduke32/metadata.xml b/games-fps/eduke32/metadata.xml
new file mode 100644
index 00000000000..52cdfe8e7b4
--- /dev/null
+++ b/games-fps/eduke32/metadata.xml
@@ -0,0 +1,25 @@
+<?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 <pkg>games-fps/duke3d-demodata</pkg>
+ as well</flag>
+ <flag name="gtk">Compile with gtk launcher</flag>
+ <flag name="offensive">Include optional XXX texture pack
+ (needs USE 'textures')</flag>
+ <flag name="opl-musicpack">Include optional OPL (AdLib)
+ music pack</flag>
+ <flag name="samples">Install samples</flag>
+ <flag name="sc55-musicpack">Include optional Roland SC-55
+ music pack</flag>
+ <flag name="server">Compile with server support</flag>
+ <flag name="textures">Include optional high-resolution
+ textures (needs USE 'opengl')</flag>
+ <flag name="tools">Build several tools for modding and
+ development</flag>
+ <flag name="vpx">Enable support for WebM VP8 Codecs
+ (needs USE 'opengl')</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/games-fps/enemy-territory-etpro/Manifest b/games-fps/enemy-territory-etpro/Manifest
new file mode 100644
index 00000000000..8db26efb361
--- /dev/null
+++ b/games-fps/enemy-territory-etpro/Manifest
@@ -0,0 +1 @@
+DIST etpro-3_2_6.zip 3698539 SHA256 6778194ef4bcf81f0e976341dbc4c574d3d6372063375755c302c0c433fb4179 SHA512 366da5b7aaaa4b88da050aca95342425cba855182c59bf2fbe104252cc2241f79be629ae5dc15f9c396284910eb63721db01fc0aa02303cc51015d36263db9de WHIRLPOOL 1a773a6d3a89fa758006b7effa9b361f629bfa0921fedae46123229f394ff63c41d54825874b82490af8280ab2d348e814dfa10d825581e932d045f8e8f18bf5
diff --git a/games-fps/enemy-territory-etpro/enemy-territory-etpro-3.2.6-r1.ebuild b/games-fps/enemy-territory-etpro/enemy-territory-etpro-3.2.6-r1.ebuild
new file mode 100644
index 00000000000..fdef1bd42fa
--- /dev/null
+++ b/games-fps/enemy-territory-etpro/enemy-territory-etpro-3.2.6-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+GAME="enemy-territory"
+MOD_DESC="a series of minor additions to Enemy Territory to make it more fun"
+MOD_NAME="ETPro"
+MOD_DIR="etpro"
+
+inherit games games-mods
+
+HOMEPAGE="http://bani.anime.net/etpro/"
+SRC_URI="http://etpro.anime.net/etpro-${PV//./_}.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+
+QA_PREBUILT="${INS_DIR:1}/${MOD_DIR}/*so"
diff --git a/games-fps/enemy-territory-etpro/metadata.xml b/games-fps/enemy-territory-etpro/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/enemy-territory-etpro/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory-omnibot/Manifest b/games-fps/enemy-territory-omnibot/Manifest
new file mode 100644
index 00000000000..b180b35fbb6
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/Manifest
@@ -0,0 +1,3 @@
+DIST Omni-bot_0.82_ET_Linux.zip 22176480 SHA256 4ebeeb3806dcf95a9c24f5a1be7eae39ac04e2a4b6e0ebc3793d651b541657cd SHA512 ac1b55f9c5f660204611c63a78281561f6c73d68b33221bde7ef0bfc8bf5c372173112f89f5dce951922552c058a206cda2eeb075d00cc5a69b4746a311b7e15 WHIRLPOOL d59bc9983a1e9918a624a40ec5cff27a925b29b29a89d9664ac8643b2de25e049ab38aeaaeb375d7f84ff11f3d22911a6271606598e067e7ff829835da929391
+DIST omni-bot_0_831_ET_linux.zip 18392544 SHA256 4d1e631a67b690aed9a5f8b7388ae4032736984cef534a9688f533886fae9650 SHA512 642f27ae991b474e06a0768372c0d0f999bca6a6e59ba9c8e90b8be61bfe3a12bb7af2905b4d69f1149994378c6f15a4db88d06201588e998e94495b4ceedf40 WHIRLPOOL a14764872d3f1073e5211f2c520fe3a19b188d5b27c9af384987c40b6b9549f61b42809ca3b3ea54cd8dd481016a947b725da821942240fa462e9dde3f856c84
+DIST omni-bot_0_83_ET_waypoint_mod.zip 3247967 SHA256 225217bd6c06e0efa236de22a8ba47624d1c4ffcdecf73551854a69c03962618 SHA512 2747474e4d97315c61449c51ce5d6d87c26169de06fd4c0767cb558de38569a40cd095732be37cf5245d954eb1f4cecc5aa044ce9bb84cdb44a3502185efc969 WHIRLPOOL 42dc03315f6553cd54eb39453d041fe5e97a4789df58f3944983ed1f908334c24889c3a1279d6a6fe02f78d042bf6f90a371cb91ab55bffa1e7fd5a677e9d172
diff --git a/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.82.ebuild b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.82.ebuild
new file mode 100644
index 00000000000..ad28ab61877
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.82.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+GAME="enemy-territory"
+MOD_DESC="Bots for Ennemy Territory"
+MOD_NAME="Omnibot"
+MOD_DIR="omnibot"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.omni-bot.com/"
+SRC_URI="http://omni-bot.invisionzone.com/index.php?/files/getdownload/151-omni-bot-enemy-territory/ -> Omni-bot_${PV}_ET_Linux.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror strip"
diff --git a/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.83.1.ebuild b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.83.1.ebuild
new file mode 100644
index 00000000000..c278e03ff6d
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.83.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+GAME="enemy-territory"
+MOD_DESC="Bots for Ennemy Territory"
+MOD_NAME="Omnibot"
+MOD_DIR="omnibot"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.omni-bot.com/"
+MY_PV="${PV//./_}"
+MY_PV="${MY_PV%_*}${MY_PV##*_}"
+SRC_URI="http://omni-bot.invisionzone.com/index.php?/files/getdownload/158-omni-bot-enemy-territory -> omni-bot_${MY_PV}_ET_linux.zip
+ http://omni-bot.invisionzone.com/index.php?/files/getdownload/157-omni-bot-enemy-territory -> omni-bot_${MY_PV%?}_ET_waypoint_mod.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror strip"
diff --git a/games-fps/enemy-territory-omnibot/metadata.xml b/games-fps/enemy-territory-omnibot/metadata.xml
new file mode 100644
index 00000000000..026dfe459d5
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ottxor@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory-truecombat/Manifest b/games-fps/enemy-territory-truecombat/Manifest
new file mode 100644
index 00000000000..fa408f1c9f8
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/Manifest
@@ -0,0 +1,2 @@
+DIST tce049b_all_os_fixed.zip 6795533 SHA256 b7eec5ba59e969c39525272236095f1e4635c9301bae716a8a4a39bc65163c3d SHA512 8814f193437551c29edf88087229ee813317df10e264c3a0200942ef7c1e876aacff4d985d28bd59d1b3bd9589c86ad034d59a8f434cb443a31e07db9b0562da WHIRLPOOL 4e3919f6a326ef00d17f9217818760a7442371c02c6a58656a97fb239e825a445f9bcdea47af25c2c0a784d0762d77129352273daffce385b669d8898a89f700
+DIST tcetest049.zip 472749193 SHA256 73d0fff098bfef196d6efc4bb2f0635ab8da2ebe19b5ead5801b1664d3b4b4d4 SHA512 9c5dfaad2f427b4fdc3fa0d5ed7b88e68776167049e0fa75e72a84a6735ff1e97926dfd0d5c290351ac0eb3123018afc1f478d8c0506b4c8ddfa39cc22474985 WHIRLPOOL d01945afba803459d78002835267a64d4043a168c5da3b64999574954b9fd678354b67c9ebcb5ce0f84631b4b7de1425cb868f244d63ff72f2d22635db96abee
diff --git a/games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild b/games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild
new file mode 100644
index 00000000000..ce015e2460b
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+GAME="enemy-territory"
+MOD_DESC="a team-based realism modification"
+MOD_NAME="True Combat"
+MOD_DIR="tcetest"
+MOD_ICON="tce_icon_pc.ico"
+
+inherit games games-mods
+
+MY_PV=${PV/.}
+HOMEPAGE="http://truecombat.com/"
+SRC_URI="http://dragons-perch.net/tce/tcetest049.zip
+ http://freeserver.name/files/installer/linux/tcetest049.zip
+ http://mirror.rosvosektori.net/tcetest049.zip
+ http://dragons-perch.net/tce/tce${MY_PV}_all_os_fixed.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 x86"
+IUSE="dedicated opengl"
+
+RDEPEND="~virtual/libstdc++-3.3"
+
+QA_PREBUILT="${INS_DIR:1}/${MOD_DIR}/*.so"
+
+src_unpack() {
+ unpack tcetest049.zip
+ cd ${MOD_DIR} || die
+ unpack tce${MY_PV}_all_os_fixed.zip
+}
+
+src_prepare() {
+ rm -rf ${MOD_DIR}/Mac*
+}
diff --git a/games-fps/enemy-territory-truecombat/metadata.xml b/games-fps/enemy-territory-truecombat/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory/Manifest b/games-fps/enemy-territory/Manifest
new file mode 100644
index 00000000000..7210d742835
--- /dev/null
+++ b/games-fps/enemy-territory/Manifest
@@ -0,0 +1,3 @@
+DIST ET-2.60b.zip 4143401 SHA256 6fb77e1ed0314b2da5c2a28807392ac638204faec8ef86361893937f182b22f8 SHA512 f86d0d172a170cd894f1c60a817d2159768bf7d03cb0146f3470edd54828096a62e890c24bac80a5851adc9356cb2716d5f0c756fab063a9c0eb561b72825b84 WHIRLPOOL 6e4718051b77201b5bdb87efebd492db46ca83cca380b7f4bac2833d3f95700a39801cfcd5b025ed2b4c51d6b3140b7a2021ba8e1056bf4d100e67204768170b
+DIST enemy-territory-all-0.1.tar.bz2 876 SHA256 8c3466db348eccd34bd108db57bc6fb656a7dcbacd190cc331fd8caf74c7cb64 SHA512 7e00ac4a30ebbbc5db646e0edf6683d8e4d99756c1010922ccfd16a3dc27c0a5b23a91c9f3adb3e120bfcd5f9a3302a466a86888ff1496dda29a3b09e87eacb2 WHIRLPOOL 1dec8052196a04a3cf834636bab54a15a0eceee2eb52df888a533fe4f78a3f774eb122d6b14d65738b9084b7d543d26ab3d9ef14cafd63a1ba68e50e60d63307
+DIST et-linux-2.60.x86.run 270965248 SHA256 41cbbc1afb8438bc8fc74a64a171685550888856005111cbf9af5255f659ae36 SHA512 7321a3d831dd375c49aff81f30098c5201880e9fc783a25dd7dee3bd2211372e0e07a482e6c78982bc1f27d62bceb769dffc30f820c3144b4a64268fd9ef5cfe WHIRLPOOL 43e4cdced441add2524e07412d06a5530627922b14549f847567b9e558eb7652f7a7c8b6dac26b5ed6c18f55597a8cf898c950026dcd0577731d86257ae59162
diff --git a/games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild b/games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild
new file mode 100644
index 00000000000..df3e8f17ecb
--- /dev/null
+++ b/games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="standalone multi-player game based on Return to Castle Wolfenstein"
+HOMEPAGE="http://www.idsoftware.com/"
+SRC_URI="mirror://3dgamers/wolfensteinet/et-linux-2.60.x86.run
+ mirror://idsoftware/et/linux/et-linux-2.60.x86.run
+ ftp://ftp.red.telefonica-wholesale.net/GAMES/ET/linux/et-linux-2.60.x86.run
+ mirror://idsoftware/et/ET-${PV}.zip
+ dedicated? (
+ http://dev.gentoo.org/~wolf31o2/sources/dump/${PN}-all-0.1.tar.bz2
+ mirror://gentoo/${PN}-all-0.1.tar.bz2
+ )"
+
+LICENSE="RTCW-ETEULA"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="dedicated"
+RESTRICT="mirror strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ virtual/opengl[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+QA_PREBUILT="
+ ${dir:1}/et.x86
+ ${dir:1}/etmain/cgame.mp.i386.so
+ ${dir:1}/etmain/qagame.mp.i386.so
+ ${dir:1}/etmain/ui.mp.i386.so
+ ${dir:1}/pb/pbag.so
+ ${dir:1}/pb/pbags.so
+ ${dir:1}/pb/pbcl.so
+ ${dir:1}/pb/pbcls.so
+ ${dir:1}/pb/pbsv.so
+ ${dir:1}/pb/pbweb.x86"
+
+src_unpack() {
+ unpack_makeself et-linux-2.60.x86.run
+ if use dedicated; then
+ unpack ${PN}-all-0.1.tar.bz2
+ fi
+ unpack ET-${PV}.zip
+}
+
+src_install() {
+ exeinto "${dir}"
+ doexe openurl.sh
+
+ insinto "${dir}"
+ dodoc CHANGES README
+
+ cp -r Docs pb etmain "${Ddir}" || die
+ chmod og+x "${Ddir}"/pb/pbweb.x86 || die
+
+ if ! use dedicated ; then
+ doicon ET.xpm
+ doexe "Enemy Territory 2.60b"/linux/et.x86
+ games_make_wrapper et ./et.x86 "${dir}" "${dir}"
+ make_desktop_entry et "Enemy Territory" ET
+ else
+ doexe "Enemy Territory 2.60b"/linux/etded.x86
+ games_make_wrapper et-ded ./etded.x86 "${dir}"
+ newinitd "${S}"/et-ded.rc et-ded
+ sed -i \
+ -e "s:GAMES_USER_DED:${GAMES_USER_DED}:" \
+ -e "s:GENTOO_DIR:${GAMES_BINDIR}:" \
+ "${D}"/etc/init.d/et-ded || die
+ newconfd "${S}"/et-ded.conf.d et-ded
+ # TODO: move this to /var/ perhaps ?
+ keepdir "${dir}/etwolf-homedir"
+ chmod g+rw "${Ddir}/etwolf-homedir"
+ dosym "${dir}/etwolf-homedir" "${GAMES_PREFIX}/.etwolf"
+ fi
+
+ prepgamesdirs
+ chmod g+rw "${Ddir}" "${Ddir}/etmain"
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "There are two possible security bugs in this package, both causing a"
+ ewarn "denial of service. One affects the game when running a server, the"
+ ewarn "other when running as a client."
+ ewarn "For more information, see bug #82149."
+ echo
+ if ! use dedicated; then
+ elog "To play the game run:"
+ elog " et"
+ echo
+ else
+ elog "To start a dedicated server run:"
+ elog " /etc/init.d/et-ded start"
+ echo
+ elog "To run the dedicated server at boot, type:"
+ elog " rc-update add et-ded default"
+ echo
+ elog "The dedicated server is started under the ${GAMES_USER_DED} user account."
+ echo
+ ewarn "Store your configurations under ${dir}/etwolf-homedir or they"
+ ewarn "will be erased on the next upgrade."
+ ewarn "See bug #132795 for more info."
+ echo
+ fi
+}
diff --git a/games-fps/enemy-territory/metadata.xml b/games-fps/enemy-territory/metadata.xml
new file mode 100644
index 00000000000..d45982b39d5
--- /dev/null
+++ b/games-fps/enemy-territory/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Enemy Territory is a first-person 3-D shooter based loosely on the original Wolfenstein series by id software. The game takes place in North Africa and Europe during World War II and allows you to play as either the Axis or the Allies. There are several classes of characters you can play, each with their own special abilities and weapon choices. You can also gain proficiency in your specialties and increase your abilities by performing your class's specialized duties, which helps promote teamwork. Enemy Territory was originally to be a single and milti-player add-on for Return to Castle Wofenstein, but John Carmack and company were not happy with the progress they had made on it, so instead, they released it as a multi-player stand-alone game.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/etqw-bin/Manifest b/games-fps/etqw-bin/Manifest
new file mode 100644
index 00000000000..3f53c9a57c8
--- /dev/null
+++ b/games-fps/etqw-bin/Manifest
@@ -0,0 +1 @@
+DIST ETQW-client-1.5-full.x86.run 556383725 SHA256 827395c5ad7bff36a8456f7f210ab43b8cc2b0d18e9f366d15ff4f11eacfc4c5 SHA512 32bb3d7ef47790ac6b790a5a5d61592c3504d034372254102985e58dee25b5d200e507330226bf8458c628154c246b2abcb08bf550fa044189c4c8de813af0c2 WHIRLPOOL 9b6dbdb642241972c75ec854c0e51bdb2f0f1b74b9f56a2259b2864b83f74385f33a283b59d20f4a8a744d0158a5471bbb8459bd18aa510b7197bb284ab0cdf2
diff --git a/games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild b/games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild
new file mode 100644
index 00000000000..56b0db659c0
--- /dev/null
+++ b/games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Enemy Territory: Quake Wars"
+HOMEPAGE="http://zerowing.idsoftware.com/linux/etqw/"
+SRC_URI="ftp://ftp.i3d.net/Games/Enemy%20Territory%20Quake%20Wars/Patches/ETQW-client-${PV}-full.x86.run"
+
+LICENSE="ETQW"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="cdinstall"
+RESTRICT="strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ >=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)]
+ >=virtual/jpeg-62:62[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[video,sound,opengl,abi_x86_32(-)]
+ >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ cdinstall? ( games-fps/etqw-data )"
+
+S=${WORKDIR}/data
+dir=${GAMES_PREFIX_OPT}/etqw
+
+QA_PREBUILT="${dir:1}/*.x86
+ ${dir:1}/*.so*"
+
+src_unpack() {
+ tail -c +194885 "${DISTDIR}"/${A} > ${A}.zip
+ unpack ./${A}.zip
+ rm -f ${A}.zip
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r base pb *.png
+ dodoc *.txt
+
+ exeinto "${dir}"
+ doexe etqw{,ded,-rthread}.x86 openurl.sh libCgx86.so libSDL*.id.so*
+
+ newicon etqw_icon.png etqw.png
+ games_make_wrapper etqw ./etqw.x86 "${dir}" "${dir}"
+ make_desktop_entry etqw "Enemy Territory: Quake Wars" etqw
+
+ games_make_wrapper etqw-dedicated ./etqwded.x86 "${dir}" "${dir}"
+ make_desktop_entry etqw-dedicated "Enemy Territory: Quake Wars (dedicated server)" etqw
+
+ games_make_wrapper etqw-rthread ./etqw-rthread.x86 "${dir}" "${dir}"
+ make_desktop_entry etqw-rthread "Enemy Territory: Quake Wars (SMP)" etqw
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall ; then
+ elog "You need to copy pak00*.pk4, zpak_*.pk4 and the megatextures"
+ elog "directory to ${dir}/base before running the game."
+ fi
+ elog "To change the game language from English, add"
+ elog "seta sys_lang \"your_language\" to your autoexec.cfg file."
+ elog "Menu fonts may not show up until you do so."
+}
diff --git a/games-fps/etqw-bin/metadata.xml b/games-fps/etqw-bin/metadata.xml
new file mode 100644
index 00000000000..668ca6c7066
--- /dev/null
+++ b/games-fps/etqw-bin/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/etqw-data/etqw-data-1.0.ebuild b/games-fps/etqw-data/etqw-data-1.0.ebuild
new file mode 100644
index 00000000000..55eccee77b6
--- /dev/null
+++ b/games-fps/etqw-data/etqw-data-1.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils cdrom games
+
+DESCRIPTION="Enemy Territory: Quake Wars data files"
+HOMEPAGE="http://zerowing.idsoftware.com/linux/etqw/"
+SRC_URI=""
+
+LICENSE="ETQW"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="videos"
+
+S=${WORKDIR}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/etqw
+
+ cdrom_get_cds Setup/Data/base/DEU:Setup/Data/base/POL:Setup/Data/base
+
+ cd "${CDROM_ROOT}"/Setup/Data/base
+ insinto "${dir}"/base
+ doins pak00{0..4}.pk4 || die "doins pak failed"
+ doins -r megatextures || die "doins megatextures failed"
+
+ case ${CDROM_SET} in
+ 0)
+ doins \
+ zpak_english000.pk4 \
+ DEU/zpak_german000.pk4 \
+ ESP/zpak_spanish000.pk4 \
+ FRA/zpak_french000.pk4 \
+ || die "doins zpak failed"
+ ;;
+ 1)
+ doins \
+ POL/zpak_polish000.pk4 \
+ RUS/zpak_russian000.pk4 \
+ || die "doins zpak failed"
+ ;;
+ 2)
+ doins zpak_english000.pk4 || die "doins zpak failed"
+ ;;
+ esac
+
+ if use videos ; then
+ case ${CDROM_SET} in
+ 0|2)
+ doins -r video || die "doins video failed"
+ ;;
+ esac
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "This is just the data portion of the game. You will need to install"
+ elog "games-fps/etqw-bin to play it."
+}
diff --git a/games-fps/etqw-data/metadata.xml b/games-fps/etqw-data/metadata.xml
new file mode 100644
index 00000000000..668ca6c7066
--- /dev/null
+++ b/games-fps/etqw-data/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/etqw-demo/Manifest b/games-fps/etqw-demo/Manifest
new file mode 100644
index 00000000000..e5b9443084e
--- /dev/null
+++ b/games-fps/etqw-demo/Manifest
@@ -0,0 +1 @@
+DIST ETQW-demo2-client-full.r1.x86.run 691248874 SHA256 dcee7afb734b259808fc7fe079afc57efa7ac23cb4c471d4897f35f3e6ca3c31 SHA512 41332208626449da74bea71a9926258f50986f0af85045d470d4405d27e497085ba318337181802be58eb50c724ab91df6b9c810e5fcc5f8dc131486d6529f38 WHIRLPOOL e564c01afaf249ed740d29a22a55733416b08253790eebbf2b25049994d6139397272ba280971ecad042ae094d9e21d4c7bc974314212cf1ce238656df3765e7
diff --git a/games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild b/games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild
new file mode 100644
index 00000000000..fe574499d27
--- /dev/null
+++ b/games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit unpacker eutils versionator games
+
+MY_MAJOR=$(get_major_version)
+MY_REV=$(get_version_component_range 3)
+MY_BODY="ETQW-demo${MY_MAJOR}-client-full.r${MY_REV/p/}.x86"
+
+DESCRIPTION="Enemy Territory: Quake Wars demo"
+HOMEPAGE="http://zerowing.idsoftware.com/linux/etqw/"
+SRC_URI="mirror://idsoftware/etqw/${MY_BODY}.run"
+
+# See copyrights.txt
+LICENSE="ETQW"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="strip mirror"
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)]
+ >=virtual/jpeg-62:62[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[video,sound,opengl,abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+QA_PREBUILT="${dir:1}/guis/libmojosetupgui_ncurses.so
+ ${dir:1}/data/*
+ ${dir:1}/data/pb/*.so"
+
+src_unpack() {
+ # exit status of 1 should just be warnings, not corrupt archive
+ unpack_zip ${A}
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r guis scripts
+
+ cd data
+ insinto "${dir}"/data
+ doins -r base pb etqw_icon.png
+ dodoc README.txt EULA.txt copyrights.txt etqwtv.txt
+
+ exeinto "${dir}"/data
+ doexe etqw *\.x86 etqw-* libCgx86* libSDL* *.sh
+
+ games_make_wrapper ${PN} ./etqw.x86 "${dir}"/data "${dir}"/data
+ # Matches with desktop entry for enemy-territory-truecombat
+ make_desktop_entry ${PN} "Enemy Territory - Quake Wars (Demo)"
+
+ games_make_wrapper ${PN}-ded ./etqwded.x86 "${dir}"/data "${dir}"/data
+
+ prepgamesdirs
+}
diff --git a/games-fps/etqw-demo/metadata.xml b/games-fps/etqw-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/etqw-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/ezquake-bin/Manifest b/games-fps/ezquake-bin/Manifest
new file mode 100644
index 00000000000..280e0b9b885
--- /dev/null
+++ b/games-fps/ezquake-bin/Manifest
@@ -0,0 +1,4 @@
+DIST ezquake_linux-x86_1.9.3.tar.gz 19230315 SHA256 a0a9c4f2cc0444f5a404b387fa33c933b826acf0ffe81fd5415e7cba93b24196 SHA512 c362b0103fa4beb578fec5653b4b9196d0202a00c662e3e001615c07041968daa7bd8edf194e310ac8501d01768b2bda79e250830733fb4dd56cb1517844d79f WHIRLPOOL a744edaf4f8ed46907dfd7c4bc58b399e955ca89929dbf83fc129caa8ec5abaeb25c96b79ad6929db96f712f3ce45d2425634b0c809207dbe4afd24e2d3cd710
+DIST ezquake_linux-x86_64.1.9.3.tar.gz 18624824 SHA256 3697482c2c8299ed02aef9d39d263f7d91ab783026cd9489beb28fe9566acacf SHA512 4c2f5060bbf08ca3b9583d4c3502e69bf6d503efd0e14df9d5fe54e1e8ac1c5ca0b920c3748e4a8e1f86c60d6e5809977352636d4758fd9cb3934cea03b1138f WHIRLPOOL d8c4886c4340c144d1f7358acc99cfb5b908044502331b761352bae81f6a2d1648e21fa3557a908d3147e1f1761e3bdfec14e60f1a3beed66283790f430452eb
+DIST ezquake_linux32_2.2.tar.gz 1685934 SHA256 655e8ec60c619ab5d1435882436296b88fc279c2963f01dd277f34939336c067 SHA512 2a42b43a0b4ad75c22c58bb53f8161eec1460cac3b841ccf2593e0cb803c4ef5cee23f939f859eb6d95409a01c4ccc3eabae108eac6c1cb850f9c5c3445bf5ab WHIRLPOOL f10b874bcbb37c084c3ae17ad2c410968f7ccd5bb9551e4d7ea13cafa91fe9601d4fe9435caed3739a11bc15c4a8ac949afb4aad2c79a04165e8c1ae2bf4dc76
+DIST ezquake_linux64_2.2.tar.gz 1804397 SHA256 b7735c680403678955f7d04a51265d216fb787fbdb343628b69418bfdb5c7203 SHA512 c1f1772971980a7b349da6c6eea5643591d5bc81a939b28e50651c5773d8372277fb6bc9a5681c59e8273ca6250fa712c3b76db488bf521dd3675aabd5e1af8e WHIRLPOOL 9fa74efcdd4acb489d6ccac0ab77b4b2732d07bb27f369100cb23bbfbd9bf0c72e62fb09ade0c3f042939435b69164a4629dd17ab6fc0b6eee3d1651f3579439
diff --git a/games-fps/ezquake-bin/ezquake-bin-2.2.ebuild b/games-fps/ezquake-bin/ezquake-bin-2.2.ebuild
new file mode 100644
index 00000000000..8b2bfd2793c
--- /dev/null
+++ b/games-fps/ezquake-bin/ezquake-bin-2.2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit games
+
+MY_FULL_PV=1.9.3
+MY_PN="${PN/-bin/}"
+DESCRIPTION="Quakeworld client with mqwcl functionality and many more features"
+HOMEPAGE="http://ezquake.sf.net/"
+SRC_URI="
+ amd64? ( mirror://sourceforge/${MY_PN}/${MY_PN}_linux-x86_64.${MY_FULL_PV}.tar.gz
+ mirror://sourceforge/${MY_PN}/${MY_PN}_linux64_${PV}.tar.gz )
+ x86? ( mirror://sourceforge/${MY_PN}/${MY_PN}_linux-x86_${MY_FULL_PV}.tar.gz
+ mirror://sourceforge/${MY_PN}/${MY_PN}_linux32_${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="strip mirror"
+IUSE="cdinstall"
+
+DEPEND="cdinstall? ( games-fps/quake1-data )"
+RDEPEND="${DEPEND}
+ virtual/opengl
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+
+S=${WORKDIR}/${MY_PN}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+QA_PREBUILT="${dir:1}/ezquake*"
+
+src_unpack() {
+ unpack ${A}
+ if use amd64; then
+ mv ${MY_PN}_linux-x86_64.${MY_FULL_PV} "${MY_PN}"
+ mv ezquake-gl_linux-x64.glx "${MY_PN}"/ezquake-gl.glx
+ else
+ mv ${MY_PN}_linux-x86.${MY_FULL_PV} "${MY_PN}"
+ mv ezquake-gl_linux-x86.glx "${MY_PN}"/ezquake-gl.glx
+ fi
+}
+
+src_install() {
+ exeinto "${dir}"
+ insinto "${dir}"
+
+ doexe ezquake-gl.glx
+ doins -r ezquake qw
+ dosym "${GAMES_DATADIR}"/quake1/id1 "${dir}"/id1
+ games_make_wrapper ezquake-gl.glx ./ezquake-gl.glx "${dir}" "${dir}"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall; then
+ elog "NOTE that this client doesn't include .pak files. You *should*"
+ elog "enable \"cdinstall\" flag or install quake1-demodata with the symlink use flag."
+ elog "You can also copy the files from your Quake1 CD to"
+ elog " ${dir}/quake1/id1 (all names lowercase)"
+ elog ""
+ elog "You may also want to check:"
+ elog " http://fuhquake.quakeworld.nu - complete howto on commands and variables"
+ elog " http://equake.quakeworld.nu - free package containing various files"
+ fi
+}
diff --git a/games-fps/ezquake-bin/metadata.xml b/games-fps/ezquake-bin/metadata.xml
new file mode 100644
index 00000000000..e660f9c84b2
--- /dev/null
+++ b/games-fps/ezquake-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">ezquake</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/freedoom/Manifest b/games-fps/freedoom/Manifest
new file mode 100644
index 00000000000..9d481fecda5
--- /dev/null
+++ b/games-fps/freedoom/Manifest
@@ -0,0 +1,3 @@
+DIST freedm-0.7.zip 4777958 SHA256 379e29e4ee2355d150fba04507c14544bc8af4cc5449aef2cf80b6709a78e59a SHA512 4f339f05d7a258b76b1d55ed8d69026b6870c181ba4a3f3672e12ed41a8c8eeeb7064193009f7c7ffb24ace18365d7744050f64cfd9db5dfa330983fa9669b8d WHIRLPOOL 02b0934fb5e28b623f4bfb05e2f91447aef1473e746e889269cbabfe3bc740dd012cdd8984de23b23c3668077707ace881e1166112fc6aed6e669787698d164b
+DIST freedoom-demo-0.7.zip 2800744 SHA256 4caf386adbf217e3c96d1d8f18cbdf5335caf7c1e88d64cdc44065aa92785286 SHA512 5a101da1c473f0bec899db03ec8c8afce5c95a6c0e041dbfebe95a370e7d64746c3f1ff0304535b58ac766518e282899887f6bad415e3519dd811fc39a0c89d8 WHIRLPOOL de48bb1c19a557ef1a4bde2839a5f9c95d10a0c4364bb88f363cc0b4ab09033a19d4ee656e190a2b31d3e1edb194f24a8e80db3284a4692e3b16c442ddc95050
+DIST freedoom-iwad-0.7.zip 9697891 SHA256 f8f75fd1909801fe42de0e74db9adcfd33f753374e4923bd93e3d9a9b802ab1f SHA512 7363517097be2bb584a8481b3c658dc046dc35f8508cbd79af602e3d15b1f570537fbf1b620684e2931d644670fbb453064ab5699f542888a29cc1b4ca295b7a WHIRLPOOL b55fd43624f21a2f2c16c8f1e56ccd6e5d5c324c381a30a258bfa36c50f17e5b905fd552598cf2ae3f83bede5a0697f02959e1533e5bd5d2e62ed2b2b467c211
diff --git a/games-fps/freedoom/freedoom-0.7.ebuild b/games-fps/freedoom/freedoom-0.7.ebuild
new file mode 100644
index 00000000000..04bb4f77b61
--- /dev/null
+++ b/games-fps/freedoom/freedoom-0.7.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Freedoom - Open Source Doom resources"
+HOMEPAGE="http://www.nongnu.org/freedoom/"
+SRC_URI="mirror://nongnu/freedoom/freedoom-iwad/shareware/freedoom-demo-${PV}.zip
+ mirror://nongnu/freedoom/freedoom-iwad/freedoom-iwad-${PV}.zip
+ mirror://nongnu/freedoom/freedm/freedm-${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ppc x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/doom-data/${PN}
+ doins */*.wad
+ dodoc freedoom-iwad-${PV}/{CREDITS,ChangeLog,NEWS,README}
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "A Doom engine is required to play the wad"
+ elog "but games-fps/doomsday doesn't count since it doesn't"
+ elog "have the necessary features."
+ echo
+ ewarn "To play freedoom with Doom engines which do not support"
+ ewarn "subdirectories, create symlinks by running the following:"
+ ewarn "(Be careful of overwriting existing wads.)"
+ ewarn
+ ewarn " cd ${GAMES_DATADIR}/doom-data"
+ ewarn " for f in doom{1,2} freedm ; do"
+ ewarn " ln -sn freedoom/\${f}.wad"
+ ewarn " done"
+}
diff --git a/games-fps/freedoom/metadata.xml b/games-fps/freedoom/metadata.xml
new file mode 100644
index 00000000000..f72870c0c28
--- /dev/null
+++ b/games-fps/freedoom/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/glxquake-bin/Manifest b/games-fps/glxquake-bin/Manifest
new file mode 100644
index 00000000000..df2961a4d5c
--- /dev/null
+++ b/games-fps/glxquake-bin/Manifest
@@ -0,0 +1 @@
+DIST glxquake.tar.gz 164094 SHA256 975d8a59fa280dab7528d5afe3cdab217e0c09423f407dbe609478efb871f9d5 SHA512 0adb92dbdc8b3130bef7e46ad95a7efa6ddb3723e3e8891cacc3c2e46bccacb6235f688e12b8a1f35099615b6683b1409b2e380fd4278e0827897b2e0c8f3090 WHIRLPOOL 8c78befb5d03ce3c180dc4c9031c69be23c0f87c566a35892683454c101c4631feb74fc63538c16b4eba027fbe26dbbd89e5f13dbbb9a86fd597c9daac6bd1b8
diff --git a/games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild b/games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild
new file mode 100644
index 00000000000..b1d9c7da8eb
--- /dev/null
+++ b/games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit games
+
+DESCRIPTION="a binary that works with every 3D-graphics-card that supports the glx X-extension"
+HOMEPAGE="http://mfcn.ilo.de/glxquake/"
+SRC_URI="http://www.wh-hms.uni-ulm.de/~mfcn/shared/glxquake/glxquake.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+RESTRICT="strip"
+IUSE=""
+
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ virtual/opengl[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libXxf86vm[abi_x86_32(-)]
+ x11-libs/libXxf86dga[abi_x86_32(-)]"
+
+S=${WORKDIR}/glxquake
+
+QA_PREBUILT="${GAMES_BINDIR:1}/glquake"
+
+src_install() {
+ dogamesbin glquake
+ dodoc README
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play with it, create a subdirectory called id1"
+ elog "Copy the pak0.pak, and eventually pak1.pak into this subdirectory"
+ elog "You can eventually get pak0.pak emerging games-fps/quake1-demodata"
+ elog "The file pak0.pak will be on the ${GAMES_DATADIR}/quake1/demo/"
+ elog "You can now run glxquake by executing glquake"
+}
diff --git a/games-fps/glxquake-bin/metadata.xml b/games-fps/glxquake-bin/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/glxquake-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/imaze/Manifest b/games-fps/imaze/Manifest
new file mode 100644
index 00000000000..16335c61eea
--- /dev/null
+++ b/games-fps/imaze/Manifest
@@ -0,0 +1 @@
+DIST imaze-1.4.tar.gz 649705 RMD160 01542e9987814475c5468547c93449fa81982499 SHA1 8e6d89a28014e1bc5c9a25d630c3d31a15f94f39 SHA256 2057b607d0a2872384d8a742fa9fac884fd9a03492733eb771cb1f85ff20528b
diff --git a/games-fps/imaze/imaze-1.4.ebuild b/games-fps/imaze/imaze-1.4.ebuild
new file mode 100644
index 00000000000..b50877f6c75
--- /dev/null
+++ b/games-fps/imaze/imaze-1.4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit games
+
+DESCRIPTION="Multi player, real time, 3D, labyrinth, run & shoot game"
+HOMEPAGE="http://home.tu-clausthal.de/student/iMaze/"
+SRC_URI="http://home.tu-clausthal.de/student/iMaze/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc x86"
+IUSE="joystick"
+
+RDEPEND="x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt
+ x11-libs/libXaw3d"
+DEPEND="${RDEPEND}
+ x11-proto/xproto"
+
+S=${WORKDIR}/${P}/source
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e s:'DEFINES=-DDEFAULT_SOUND_DIR=\\"`pwd`/../sounds\\"':\
+'DEFINES=-DDEFAULT_SERVER=\\"localhost\\" -DDEFAULT_SOUND_DIR=\\"${GAMES_DATADIR}/${PN}/sounds\\"': Makefile.in \
+ || die "sed failed"
+}
+
+src_compile() {
+ local myconf="audio athena"
+
+ use joystick \
+ && myconf="${myconf} joystick" \
+ || myconf="${myconf} nojoystick"
+
+ # not an autoconf script.
+ ./configure ${myconf} || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ dogamesbin genlab imaze imazesrv imazestat ninja xlabed \
+ || die "dogamesbin failed"
+ dodoc ../README
+ doman ../man6/*6
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r ../labs/ ../sounds/ || die "doins failed"
+ prepgamesdirs
+}
diff --git a/games-fps/imaze/metadata.xml b/games-fps/imaze/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/imaze/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/industri/Manifest b/games-fps/industri/Manifest
new file mode 100644
index 00000000000..5d1ca0c5c20
--- /dev/null
+++ b/games-fps/industri/Manifest
@@ -0,0 +1,2 @@
+DIST industri-1.00.zip 30339989 SHA256 6c0761c6eacb501fffe37f9be4b9e2ae62074f8714c4ef36251241aba6b90652
+DIST industri_BIN-1.01-src.tar.gz 1086838 SHA256 b702b819c0b99cc9a7f8e9ec89c9a58812212826f592e3594904b4cd3cdd09f8
diff --git a/games-fps/industri/files/industri-1.01-exec-stack.patch b/games-fps/industri/files/industri-1.01-exec-stack.patch
new file mode 100644
index 00000000000..bc74e951fe6
--- /dev/null
+++ b/games-fps/industri/files/industri-1.01-exec-stack.patch
@@ -0,0 +1,36 @@
+--- math.s
++++ math.s
+@@ -416,3 +416,6 @@
+ call C(BOPS_Error)
+
+ #endif // id386
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- snd_mixa.s
++++ snd_mixa.s
+@@ -216,3 +216,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- sys_dosa.s
++++ sys_dosa.s
+@@ -93,3 +93,6 @@
+
+ ret
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- worlda.s
++++ worlda.s
+@@ -142,3 +142,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/games-fps/industri/files/industri-1.01-glext.patch b/games-fps/industri/files/industri-1.01-glext.patch
new file mode 100644
index 00000000000..8a5042e431f
--- /dev/null
+++ b/games-fps/industri/files/industri-1.01-glext.patch
@@ -0,0 +1,18 @@
+--- glquake.h.old 2011-04-29 12:36:53.000000000 +0200
++++ glquake.h 2011-04-29 12:44:39.000000000 +0200
+@@ -977,6 +977,7 @@
+ #define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
+
+ /* NV_vertex_program */
++#ifndef GL_NV_vertex_program
+ typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
+ typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
+ typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+@@ -1040,6 +1041,7 @@
+ typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+ typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+ typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
++#endif
+
+ extern PFNGLAREPROGRAMSRESIDENTNVPROC qglAreProgramsResidentNV ;
+ extern PFNGLBINDPROGRAMNVPROC qglBindProgramNV ;
diff --git a/games-fps/industri/files/industri-1.01-ldflags.patch b/games-fps/industri/files/industri-1.01-ldflags.patch
new file mode 100644
index 00000000000..987d464f6b4
--- /dev/null
+++ b/games-fps/industri/files/industri-1.01-ldflags.patch
@@ -0,0 +1,20 @@
+--- linux/Makefile.old 2010-10-13 11:37:27.000000000 +0200
++++ linux/Makefile 2010-10-13 11:38:20.000000000 +0200
+@@ -42,7 +42,7 @@
+ RELEASE_CFLAGS = $(BASE_CFLAGS) -O2 -march=pentium4 -pipe -msse -mfpmath=sse \
+ -fomit-frame-pointer -fexpensive-optimizations
+ DEBUG_CFLAGS = $(BASE_CFLAGS) -g
+-LDFLAGS = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS)
++LDLIBS = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS)
+
+ DO_GL_CC = $(CC) $(CFLAGS) -o $@ -c $<
+ DO_GL_AS = $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
+@@ -156,7 +156,7 @@
+
+
+ $(BUILDDIR)/bin/industri.run : $(GLQUAKE_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/glquake/cl_demo.o : $(MOUNT_DIR)/cl_demo.c
+ $(DO_GL_CC)
diff --git a/games-fps/industri/files/industri.pretty b/games-fps/industri/files/industri.pretty
new file mode 100644
index 00000000000..b328c803b9d
--- /dev/null
+++ b/games-fps/industri/files/industri.pretty
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec industri +sh_glares 1 "$@"
diff --git a/games-fps/industri/industri-1.01.ebuild b/games-fps/industri/industri-1.01.ebuild
new file mode 100644
index 00000000000..ecffa516a04
--- /dev/null
+++ b/games-fps/industri/industri-1.01.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="Quake/Tenebrae based, single player game"
+HOMEPAGE="http://industri.sourceforge.net/"
+SRC_URI="mirror://sourceforge/industri/industri_BIN-${PV}-src.tar.gz
+ mirror://sourceforge/industri/industri-1.00.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="cdinstall"
+
+RDEPEND="virtual/opengl
+ x11-libs/libXxf86dga
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ media-libs/libpng
+ cdinstall? ( games-fps/quake1-data )"
+DEPEND="${RDEPEND}
+ x11-proto/xf86dgaproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ app-arch/unzip"
+
+S=${WORKDIR}/industri_BIN
+
+src_prepare() {
+ mv linux/Makefile{.i386linux,}
+ sed -i -e "s:-mpentiumpro.*:${CFLAGS} \\\\:" linux/Makefile || die "sed failed"
+
+ # Remove duplicated typedefs #71841
+ for typ in PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC PFNGLVERTEXARRAYRANGEAPPLEPROC ; do
+ if echo '#include <GL/gl.h>' | $(tc-getCC) -E - 2>/dev/null | grep -sq ${typ} ; then
+ sed -i \
+ -e "/^typedef.*${typ}/d" \
+ glquake.h \
+ || die "sed failed"
+ fi
+ done
+
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \
+ gl_warp.c || die
+
+ epatch "${FILESDIR}"/${P}-exec-stack.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-glext.patch
+}
+
+src_compile() {
+ emake \
+ -C linux \
+ MASTER_DIR="${GAMES_DATADIR}"/quake1 \
+ build_release \
+ || die "emake failed"
+}
+
+src_install() {
+ newgamesbin linux/release*/bin/industri.run industri || die
+ dogamesbin "${FILESDIR}"/industri.pretty || die
+ insinto /usr/share/icons
+ doins industri.ico quake.ico || die
+ dodoc linux/README
+ cd "${WORKDIR}"/${PN}
+ dodoc *.txt
+ insinto "${GAMES_DATADIR}"/quake1/${PN}
+ doins *.pak *.cfg || die
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if ! use cdinstall
+ then
+ elog "You need to copy pak0.pak to ${GAMES_DATADIR}/quake1 to play."
+ fi
+}
diff --git a/games-fps/industri/metadata.xml b/games-fps/industri/metadata.xml
new file mode 100644
index 00000000000..6452dd7efd3
--- /dev/null
+++ b/games-fps/industri/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+industri is a Quake based, single player game using a modified version of the
+Tenebrae 1.x engine. The Tenebrae engine is an Open Source (GNU GPL) modification
+of Quake that brings per-pixel lighting, stencil shadows, hi-res textures,
+bumpmap and normalmaps to the gaming experince.
+
+The focus of industri is a rich single-player game and engine. There is no
+multi-player at all.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">industri</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/legends/Manifest b/games-fps/legends/Manifest
new file mode 100644
index 00000000000..02b9fcf620e
--- /dev/null
+++ b/games-fps/legends/Manifest
@@ -0,0 +1,2 @@
+DIST legends.png 5092 SHA256 f4ac0db949c2f0a373f331a7a7528ef17c674a226c2366a5a443b5b5a44b6ce2 SHA512 7b9f336335dc69e2fbc24286b2076a228739ab4abf1b77d977321d9dccfb453897bdbd51388e3ed54369ba39b7faa92e458700928d8bf5ccc0f3639f8737489a WHIRLPOOL 19fc961afd861b7921847dfa9e7f7159227e37ff8a50c2edae9770d1fe5967652714ab94d549551349d91326ba3da94c766c715b3182926f33a6a25029fbe1b7
+DIST legends_linux-0.4.1.43.run 123964866 SHA256 cd4852b52f6d17afb22e1ee3592af450da712d060d8315faad23cfc7cf570ea4 SHA512 17b1caa3aa6124f2389e2220ced82c41c4523897bde2f8211d219dc9ef8620583c4ae68999b0761155e3d45cb1ad9679cd65ba50c8440dd1848ef3b1a7a590d2 WHIRLPOOL 2d51695cd5fac8422b5a14d7e836f7b3abbf9358e2e7349da1a3750d4a63c961f5b6d54f38331b9e4710f95baf8e9e4f52aef122398e25f979527e52ffef1fff
diff --git a/games-fps/legends/files/legends b/games-fps/legends/files/legends
new file mode 100644
index 00000000000..da3f5f0d17b
--- /dev/null
+++ b/games-fps/legends/files/legends
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd GENTOO_DIR
+LD_PRELOAD=GENTOO_DIR/LIBSDL exec ./LinLegends "$@"
diff --git a/games-fps/legends/files/legends-ded b/games-fps/legends/files/legends-ded
new file mode 100644
index 00000000000..0eef35f2cc6
--- /dev/null
+++ b/games-fps/legends/files/legends-ded
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd GENTOO_DIR
+exec ./lindedicated "$@"
diff --git a/games-fps/legends/legends-0.4.1.43-r1.ebuild b/games-fps/legends/legends-0.4.1.43-r1.ebuild
new file mode 100644
index 00000000000..d12b9c8604d
--- /dev/null
+++ b/games-fps/legends/legends-0.4.1.43-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_P=${PN}_linux-${PV}
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+DESCRIPTION="Fast-paced first-person-shooter online multiplayer game, similar to Tribes"
+HOMEPAGE="http://legendsthegame.net/"
+SRC_URI="http://legendsthegame.net/files/${MY_P}.run
+ mirror://gentoo/${PN}.png"
+
+LICENSE="Legends LGPL-2.1+"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="+dedicated"
+RESTRICT="strip"
+
+QA_TEXTRELS="${dir:1}/libSDL-1.3.so.0"
+QA_FLAGS_IGNORED="${dir:1}/libSDL-1.3.so.0 ${dir:1}/LinLegends ${dir:1}/lindedicated"
+
+DEPEND=""
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ media-fonts/font-adobe-75dpi
+ media-libs/libsdl[video,sound,opengl,abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ media-libs/libogg[abi_x86_32(-)]
+ media-libs/libvorbis[abi_x86_32(-)]
+ media-libs/openal[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack_makeself ${MY_P}.run
+ cd "${S}"
+
+ # keep libSDL-1.3.so because legends requires it as of 0.4.0, and
+ # 1.2.6 is highest in portage
+ # rm libSDL-*.so*
+ rm runlegends libSDL-1.2.so.0 libopenal.so libogg.so.0 libvorbis.so.0 *.DLL
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r * || die "doins * failed"
+
+ rm "${D}/${dir}/"/{lindedicated,LinLegends,*.so.0}
+ exeinto "${dir}"
+ doexe lindedicated LinLegends *.so.0 || die "doexe failed"
+
+ games_make_wrapper ${PN} "./LinLegends" "${dir}" "${dir}"
+ if use dedicated ; then
+ games_make_wrapper ${PN}-ded "./lindedicated" "${dir}" "${dir}"
+ fi
+
+ doicon "${DISTDIR}"/${PN}.png || die "doicon failed"
+ make_desktop_entry legends "Legends"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ ewarn "Version ${PV} of ${PN} may give problems if there are"
+ ewarn "config-files from earlier versions. Removing the ~/.legends dir"
+ ewarn "and restarting will solve this."
+ echo
+}
diff --git a/games-fps/legends/metadata.xml b/games-fps/legends/metadata.xml
new file mode 100644
index 00000000000..14fe61de762
--- /dev/null
+++ b/games-fps/legends/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Legends is a fast-paced first-person-perspective online multiplayer
+game. The game is designed to take advantage of the beautiful
+environments available from the Torque engine it is based on while still
+offering the breakneck pacing and variety of styles available from such
+classics as Quake and Tribes.
+
+Gameplay is not the strafe-strafe-jump-strafe-shoot-strafe-run-like-hell
+style a lot of games espouse; the addition of a jetpack adds a third
+dimension of mobility that makes skill, forethought, and restraint
+necessities to winning.
+
+Team sizes are going to be ideal between 10 and 15 on each side, and the
+network code will allow anyone with any bandwidth to play relatively
+smoothly. Game type offerings will range from the classic Capture the
+Flag to our own new type, affectionately called "Knockout".
+
+Plenty of maps will be provided by us, but the beauty of this game is
+its customization possibilities. Mission creation has never been easier,
+with a stable, full-featured editor integrated into the game engine
+itself. Skins, models, and effects can all be modified by the end-user
+with commonly available tools.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/lsdldoom/Manifest b/games-fps/lsdldoom/Manifest
new file mode 100644
index 00000000000..12036431825
--- /dev/null
+++ b/games-fps/lsdldoom/Manifest
@@ -0,0 +1,2 @@
+DIST lsdldoom-1.4.4.4.tar.gz 916884 SHA256 6c29560a3a87b351f81717bd79c2cff124df0e68b807a7a365af15317a47d83c
+DIST lsdldoom-1.5.tar.gz 1227060 SHA256 2e780775a1f31e3ee30e3d02b7f6b35409ec986fbfec07139b19ab48bdcf3ed8
diff --git a/games-fps/lsdldoom/files/1.4.4.4-gcc34.patch b/games-fps/lsdldoom/files/1.4.4.4-gcc34.patch
new file mode 100644
index 00000000000..988905f8493
--- /dev/null
+++ b/games-fps/lsdldoom/files/1.4.4.4-gcc34.patch
@@ -0,0 +1,42 @@
+diff -ur lsdldoom-1.4.4.4.orig/src/d_main.c lsdldoom-1.4.4.4/src/d_main.c
+--- lsdldoom-1.4.4.4.orig/src/d_main.c 2005-01-15 02:38:13.077626072 -0500
++++ lsdldoom-1.4.4.4/src/d_main.c 2005-01-15 02:39:41.646161608 -0500
+@@ -230,6 +230,7 @@
+ case GS_LEVEL:
+ V_SetPalette(0); // cph - use default (basic) palette
+ default:
++;
+ }
+
+ switch (gamestate) {
+@@ -243,6 +244,7 @@
+ D_PageDrawer();
+ break;
+ default:
++;
+ }
+ } else if (gametic) { // In a level
+ boolean redrawborderstuff;
+diff -ur lsdldoom-1.4.4.4.orig/src/g_game.c lsdldoom-1.4.4.4/src/g_game.c
+--- lsdldoom-1.4.4.4.orig/src/g_game.c 2005-01-15 02:38:13.043631240 -0500
++++ lsdldoom-1.4.4.4/src/g_game.c 2005-01-15 02:38:13.260598256 -0500
+@@ -875,6 +875,7 @@
+ case GS_INTERMISSION:
+ WI_End();
+ default:
++;
+ }
+ prevgamestate = gamestate;
+ }
+diff -ur lsdldoom-1.4.4.4.orig/src/p_maputl.h lsdldoom-1.4.4.4/src/p_maputl.h
+--- lsdldoom-1.4.4.4.orig/src/p_maputl.h 2005-01-15 02:38:13.044631088 -0500
++++ lsdldoom-1.4.4.4/src/p_maputl.h 2005-01-15 02:40:35.526970480 -0500
+@@ -82,7 +82,7 @@
+ void P_SetThingPosition(mobj_t *thing);
+ boolean P_BlockLinesIterator (int x, int y, boolean func(line_t *));
+ boolean P_BlockThingsIterator(int x, int y, boolean func(mobj_t *));
+-boolean ThingIsOnLine(const mobj_t *t, const line_t *l); /* killough 3/15/98 */
++boolean CONSTFUNC ThingIsOnLine(const mobj_t *t, const line_t *l); /* killough 3/15/98 */
+ boolean P_PathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2,
+ int flags, boolean trav(intercept_t *));
+
diff --git a/games-fps/lsdldoom/files/1.4.4.4-gentoo-paths.patch b/games-fps/lsdldoom/files/1.4.4.4-gentoo-paths.patch
new file mode 100644
index 00000000000..a180b96046c
--- /dev/null
+++ b/games-fps/lsdldoom/files/1.4.4.4-gentoo-paths.patch
@@ -0,0 +1,39 @@
+--- lsdldoom-1.4.4.4.orig/configure 2005-01-15 03:08:57.000000000 -0500
++++ lsdldoom-1.4.4.4/configure 2005-01-15 03:18:34.814466112 -0500
+@@ -2445,6 +2445,6 @@
+-gamesdir=$prefix/games
++gamesdir=$bindir
+ exp_gamesdir=`eval "echo $gamesdir"`
+ exp_datadir=`eval "echo $datadir"`
+-waddir=$exp_datadir/games/doom
++waddir=$exp_datadir/doom-data
+ cat >> confdefs.h <<EOF
+ #define DOOMWADDIR "$waddir"
+--- lsdldoom-1.4.4.4.orig/src/Makefile.in 2005-01-15 03:08:57.000000000 -0500
++++ lsdldoom-1.4.4.4/src/Makefile.in 2005-01-15 03:19:19.298703480 -0500
+@@ -86,3 +86,3 @@
+-gamesdir = $(prefix)/games
++gamesdir = $(bindir)
+ EXTRA_PROGRAMS = lsdldoom lxdoom-game-server
+ games_PROGRAMS = @BUILD_SDLDOOM@ @BUILD_SERVER@
+--- lsdldoom-1.4.4.4.orig/doc/Makefile.in 2005-01-15 03:20:25.252676952 -0500
++++ lsdldoom-1.4.4.4/doc/Makefile.in 2005-01-15 03:23:34.686878576 -0500
+@@ -85,3 +85,3 @@
+
+-docdir = $(prefix)/share/doc/@PACKAGE@
++docdir = /usr/share/doc/$(PF)
+ man_MANS = lsdldoom.6 boom.cfg.5 lxdoom-game-server.6
+--- lsdldoom-1.4.4.4.orig/data/Makefile.in 2005-01-15 03:20:25.261675584 -0500
++++ lsdldoom-1.4.4.4/data/Makefile.in 2005-01-15 03:24:29.704514624 -0500
+@@ -85,3 +85,3 @@
+
+-waddir = $(datadir)/games/doom
++waddir = $(datadir)/doom-data
+ wad_DATA = boomlump.wad
+--- lsdldoom-1.4.4.4.orig/Makefile.in 2005-01-15 03:29:34.329204632 -0500
++++ lsdldoom-1.4.4.4/Makefile.in 2005-01-15 03:31:30.359565336 -0500
+@@ -85,3 +85,3 @@
+
+-docdir = $(prefix)/share/doc/@PACKAGE@
++docdir = /usr/share/doc/$(PF)
+ SUBDIRS = doc data src
diff --git a/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-gcc41.patch b/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-gcc41.patch
new file mode 100644
index 00000000000..6c0ce7dc3b5
--- /dev/null
+++ b/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-gcc41.patch
@@ -0,0 +1,14 @@
+--- src/r_bsp.h.old 2006-05-06 02:07:04.000000000 +0200
++++ src/r_bsp.h 2006-05-06 02:08:48.000000000 +0200
+@@ -41,11 +41,6 @@
+ extern line_t *linedef;
+ extern sector_t *frontsector;
+ extern sector_t *backsector;
+-extern int rw_x;
+-extern int rw_stopx;
+-extern boolean segtextured;
+-extern boolean markfloor; /* false if the back side is the same plane */
+-extern boolean markceiling;
+
+ /* old code -- killough:
+ * extern drawseg_t drawsegs[MAXDRAWSEGS];
diff --git a/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-keys.patch b/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-keys.patch
new file mode 100644
index 00000000000..0c356a9fadc
--- /dev/null
+++ b/games-fps/lsdldoom/files/lsdldoom-1.4.4.4-keys.patch
@@ -0,0 +1,11 @@
+--- src/g_game.c
++++ src/g_game.c
+@@ -200,7 +200,7 @@
+ #define TURBOTHRESHOLD 0x32
+ #define SLOWTURNTICS 6
+ #define QUICKREVERSE 32768 // 180 degree reverse // phares
+-#define NUMKEYS 256
++#define NUMKEYS 512
+
+ fixed_t forwardmove[2] = {0x19, 0x32};
+ fixed_t sidemove[2] = {0x18, 0x28};
diff --git a/games-fps/lsdldoom/files/lsdldoom-1.5-paths.patch b/games-fps/lsdldoom/files/lsdldoom-1.5-paths.patch
new file mode 100644
index 00000000000..686e3450a62
--- /dev/null
+++ b/games-fps/lsdldoom/files/lsdldoom-1.5-paths.patch
@@ -0,0 +1,64 @@
+diff -urN lsdldoom-1.5.orig//Makefile.in lsdldoom-1.5/Makefile.in
+--- lsdldoom-1.5.orig//Makefile.in 2011-10-23 22:17:01.582705152 -0700
++++ lsdldoom-1.5/Makefile.in 2011-10-23 22:18:00.846237242 -0700
+@@ -209,7 +209,7 @@
+ builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+-docdir = $(prefix)/share/doc/@PACKAGE@
++docdir = /usr/share/doc/$(PF)
+ dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+ host = @host@
+diff -urN lsdldoom-1.5.orig//configure lsdldoom-1.5/configure
+--- lsdldoom-1.5.orig//configure 2011-10-23 22:17:01.544700322 -0700
++++ lsdldoom-1.5/configure 2011-10-23 22:18:00.829235080 -0700
+@@ -5689,10 +5689,10 @@
+ then exec_prefix=$prefix
+ fi
+
+-gamesdir=$prefix/games
++gamesdir=$bindir
+ exp_gamesdir=`eval "echo $gamesdir"`
+ exp_datadir=`eval "echo $datadir"`
+-waddir=$exp_datadir/games/doom
++waddir=$exp_datadir/doom-data
+ cat >>confdefs.h <<_ACEOF
+ #define DOOMWADDIR "$waddir"
+ _ACEOF
+diff -urN lsdldoom-1.5.orig//data/Makefile.in lsdldoom-1.5/data/Makefile.in
+--- lsdldoom-1.5.orig//data/Makefile.in 2011-10-23 22:17:01.634711762 -0700
++++ lsdldoom-1.5/data/Makefile.in 2011-10-23 22:18:00.844236988 -0700
+@@ -188,7 +188,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-waddir = $(datadir)/games/doom
++waddir = $(datadir)/doom-data
+ wad_DATA = boomlump.wad
+ EXTRA_DIST = boomlump.wad
+ all: all-am
+diff -urN lsdldoom-1.5.orig//doc/Makefile.in lsdldoom-1.5/doc/Makefile.in
+--- lsdldoom-1.5.orig//doc/Makefile.in 2011-10-23 22:17:00.348548297 -0700
++++ lsdldoom-1.5/doc/Makefile.in 2011-10-23 22:18:00.840236480 -0700
+@@ -158,7 +158,7 @@
+ builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+-docdir = $(prefix)/share/doc/@PACKAGE@
++docdir = /usr/share/doc/$(PF)
+ dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+ host = @host@
+diff -urN lsdldoom-1.5.orig//src/Makefile.in lsdldoom-1.5/src/Makefile.in
+--- lsdldoom-1.5.orig//src/Makefile.in 2011-10-23 22:17:01.041636386 -0700
++++ lsdldoom-1.5/src/Makefile.in 2011-10-23 22:18:00.835235845 -0700
+@@ -242,7 +242,7 @@
+ # Process this file with automake to produce Makefile.in
+ #
+ #
+-gamesdir = $(prefix)/games
++gamesdir = $(bindir)
+ games_PROGRAMS = @BUILD_SDLDOOM@ @BUILD_SERVER@
+ @I386_ASM_FALSE@ASMS =
+ @I386_ASM_TRUE@ASMS = drawspan.S drawcol.S drawasm.h
diff --git a/games-fps/lsdldoom/lsdldoom-1.4.4.4-r1.ebuild b/games-fps/lsdldoom/lsdldoom-1.4.4.4-r1.ebuild
new file mode 100644
index 00000000000..d28f17bb201
--- /dev/null
+++ b/games-fps/lsdldoom/lsdldoom-1.4.4.4-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils games
+
+DESCRIPTION="Port of ID's doom to SDL"
+HOMEPAGE="http://firehead.org/~jessh/lsdldoom/"
+SRC_URI="http://www.lbjhs.net/~jessh/lsdldoom/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="sparc x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl
+ media-libs/sdl-net
+ !games-fps/prboom
+ games-fps/doom-data"
+
+src_unpack() {
+ unpack ${A}
+ cp -r "${S}"{,.orig}
+ cd "${S}"
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo-paths.patch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-keys.patch \
+ "${FILESDIR}"/${PV}-gcc34.patch #77846
+}
+
+src_compile() {
+ # The SDL_mixer implementation is VERY broken ...
+ # it relies on internal function calls rather than
+ # the exported API ... bad programmer !
+ # i386-asm -> build failure
+ # cpu-opt -> just adds -mcpu crap to CFLAGS
+ ac_cv_lib_SDL_mixer_Mix_LoadMUS=no \
+ egamesconf \
+ --disable-i386-asm \
+ --disable-cpu-opt \
+ || die
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ prepalldocs
+ dodoc ChangeLog
+ prepgamesdirs
+}
diff --git a/games-fps/lsdldoom/lsdldoom-1.5.ebuild b/games-fps/lsdldoom/lsdldoom-1.5.ebuild
new file mode 100644
index 00000000000..04d4f9b9626
--- /dev/null
+++ b/games-fps/lsdldoom/lsdldoom-1.5.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils games
+
+DESCRIPTION="Port of ID's doom to SDL"
+HOMEPAGE="http://jesshaas.com/lsdldoom/"
+SRC_URI="http://jesshaas.com/lsdldoom/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="arm ppc x86"
+IUSE="+net +shareware freedoom"
+
+DEPEND="media-libs/libsdl[video]
+ media-libs/sdl-mixer
+ net? ( media-libs/sdl-net )"
+RDEPEND="${DEPEND}
+ shareware? ( games-fps/doom-data )
+ freedoom? ( games-fps/freedoom )"
+
+PATCHES=( "${FILESDIR}"/${P}-paths.patch )
+
+src_configure() {
+ # cpu-opt -> just adds -mcpu crap to CFLAGS
+ egamesconf \
+ --disable-dependency-tracking \
+ --disable-cpu-opt \
+ $(use_enable net net-game)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ prepalldocs
+ dodoc ChangeLog
+ prepgamesdirs
+}
diff --git a/games-fps/lsdldoom/metadata.xml b/games-fps/lsdldoom/metadata.xml
new file mode 100644
index 00000000000..26853b0e772
--- /dev/null
+++ b/games-fps/lsdldoom/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<use>
+ <flag name='net'>Enables network game support</flag>
+ <flag name='shareware'>Install <pkg>games-fps/doom-data</pkg> for shareware wad file</flag>
+ <flag name='freedoom'>Install <pkg>games-fps/freedoom</pkg> wad file</flag>
+</use>
+</pkgmetadata>
diff --git a/games-fps/metadata.xml b/games-fps/metadata.xml
new file mode 100644
index 00000000000..9df41d653f0
--- /dev/null
+++ b/games-fps/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The games-fps category contains first person shooter games.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie games-fps enthält Egoshooter.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría games-fps contiene juegos de disparo en primera persona.
+ </longdescription>
+ <longdescription lang="ja">
+ games-fpsカテゴリーにはファースト・パーソン・シューター・ゲームが
+ 含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De games-fps categorie bevat schietspellen (uit persoonsperspectief).
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm games-fps chứa các trò chơi bắn súng dạng "First Person Shooter (FPS)".
+ </longdescription>
+ <longdescription lang="it">
+ La categoria games-fps contiene giochi sparatutto in prima persona "First Person Shooter (FPS)".
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria games-fps contém jogos de tiro em primeira pessoa.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria games-fps zawiera gry akcji oglądane z perspektywy pierwszej
+ osoby.
+ </longdescription>
+</catmetadata>
+
diff --git a/games-fps/nexuiz/Manifest b/games-fps/nexuiz/Manifest
new file mode 100644
index 00000000000..1e5c02763f7
--- /dev/null
+++ b/games-fps/nexuiz/Manifest
@@ -0,0 +1,2 @@
+DIST nexmappack_r2.zip 113533483 SHA256 15088c7632e0b4f487c789fba4296f44ef5a5d83b51adcb9e603e289e5b8241e SHA512 f7e2dd60530b58f3fc505cdf0d605208b6905136586107210031233cb870b1892bae59efc4fb38403a4f0fc5301321297d03107b38daa501cb90e5669455eac0 WHIRLPOOL 5385fc2fe5afc4d4c2c3404311ef00c25bdc6cfd0bb3846cfdf0dee79c8205ed5861c5b6b1095d1db2938e3fc726178084ad9b52eb73989d199fb136d8be6a82
+DIST nexuiz-252.zip 931253731 SHA256 a5e27ebcc9775c4a490d0d3536c32e4a8f8f96b038c0b6a78d1823c37a962000 SHA512 da661eb2ff1764fed1d5f5547b89e4f9aa47613d41a3999c0202d8858ec2b882e4ef0ec182a81d1bdb25dff2ef65aad6af132009884e3557206941a736c2a68c WHIRLPOOL e3d08e4936a1fec97e024d0273162e15fbd4c68b13939f82c59ed2b5f613fa6f683423c753fd11d23c9be39f1bc620f2c0013456762773663a283078687eb21d
diff --git a/games-fps/nexuiz/files/nexuiz-2.5.2-libpng-1.4.patch b/games-fps/nexuiz/files/nexuiz-2.5.2-libpng-1.4.patch
new file mode 100644
index 00000000000..0e064f8b6c3
--- /dev/null
+++ b/games-fps/nexuiz/files/nexuiz-2.5.2-libpng-1.4.patch
@@ -0,0 +1,42 @@
+fix compatibility with >=libpng-1.4
+https://bugs.gentoo.org/show_bug.cgi?id=491610
+
+diff -Nur darkplaces.old/image_png.c darkplaces/image_png.c
+--- darkplaces.old/image_png.c 2009-09-15 06:08:02.000000000 +0300
++++ darkplaces/image_png.c 2010-01-28 01:23:24.000000000 +0200
+@@ -36,7 +36,7 @@
+ static void* (*qpng_create_info_struct) (void*);
+ static void (*qpng_read_info) (void*, void*);
+ static void (*qpng_set_expand) (void*);
+-static void (*qpng_set_gray_1_2_4_to_8) (void*);
++static void (*qpng_set_expand_gray_1_2_4_to_8) (void*);
+ static void (*qpng_set_palette_to_rgb) (void*);
+ static void (*qpng_set_tRNS_to_alpha) (void*);
+ static void (*qpng_set_gray_to_rgb) (void*);
+@@ -61,7 +61,7 @@
+ {"png_create_info_struct", (void **) &qpng_create_info_struct},
+ {"png_read_info", (void **) &qpng_read_info},
+ {"png_set_expand", (void **) &qpng_set_expand},
+- {"png_set_gray_1_2_4_to_8", (void **) &qpng_set_gray_1_2_4_to_8},
++ {"png_set_expand_gray_1_2_4_to_8", (void **) &qpng_set_expand_gray_1_2_4_to_8},
+ {"png_set_palette_to_rgb", (void **) &qpng_set_palette_to_rgb},
+ {"png_set_tRNS_to_alpha", (void **) &qpng_set_tRNS_to_alpha},
+ {"png_set_gray_to_rgb", (void **) &qpng_set_gray_to_rgb},
+@@ -110,7 +110,7 @@
+ #elif defined(MACOSX)
+ "libpng12.0.dylib",
+ #else
+- "libpng12.so.0",
++ "libpng14.so.0",
+ "libpng.so", // FreeBSD
+ #endif
+ NULL
+@@ -311,7 +311,7 @@
+ {
+ qpng_set_gray_to_rgb(png);
+ if (my_png.BitDepth < 8)
+- qpng_set_gray_1_2_4_to_8(png);
++ qpng_set_expand_gray_1_2_4_to_8(png);
+ }
+
+ if (qpng_get_valid(png, pnginfo, PNG_INFO_tRNS))
diff --git a/games-fps/nexuiz/metadata.xml b/games-fps/nexuiz/metadata.xml
new file mode 100644
index 00000000000..c4fa7252526
--- /dev/null
+++ b/games-fps/nexuiz/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="maps">Install the community map pack</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nexuiz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/nexuiz/nexuiz-2.5.2.ebuild b/games-fps/nexuiz/nexuiz-2.5.2.ebuild
new file mode 100644
index 00000000000..a6cd7844012
--- /dev/null
+++ b/games-fps/nexuiz/nexuiz-2.5.2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+MY_PN=Nexuiz
+MY_P=${PN}-${PV//./}
+MAPS=nexmappack_r2
+DESCRIPTION="Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine"
+HOMEPAGE="http://www.nexuiz.com/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ maps? ( mirror://sourceforge/${PN}/${MAPS}.zip )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="alsa dedicated maps opengl sdl"
+
+# no headers for libpng needed
+UIRDEPEND="media-libs/libogg
+ media-libs/libvorbis
+ media-libs/libtheora
+ >=media-libs/libpng-1.4
+ media-libs/libmodplug
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXpm
+ x11-libs/libXext
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ sdl? ( media-libs/libsdl[joystick,opengl,video] )"
+UIDEPEND="x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto"
+RDEPEND="virtual/jpeg
+ net-misc/curl
+ opengl? ( ${UIRDEPEND} )
+ !dedicated? ( !opengl? ( ${UIRDEPEND} ) )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ opengl? ( ${UIDEPEND} )
+ !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
+
+S=${WORKDIR}/darkplaces
+
+src_unpack() {
+ unpack ${MY_P}.zip
+
+ local f
+ for f in "${MY_PN}"/sources/*.zip ; do
+ unpack ./${f}
+ done
+
+ if use maps ; then
+ cd "${WORKDIR}"/${MY_PN}
+ unpack ${MAPS}.zip
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng-1.4.patch
+
+ # Make the game automatically look in the correct data directory
+ sed -i \
+ -e "/^CC=/d" \
+ -e "s:-O2:${CFLAGS}:" \
+ -e "/-lm/s:$: ${LDFLAGS}:" \
+ -e '/^STRIP/s/strip/true/' \
+ makefile.inc || die
+
+ sed -i \
+ -e '1i DP_LINK_TO_LIBJPEG=1' \
+ -e "s:ifdef DP_.*:DP_FS_BASEDIR=${GAMES_DATADIR}/nexuiz\n&:" \
+ makefile || die
+
+ if ! use alsa ; then
+ sed -i \
+ -e "/DEFAULT_SNDAPI/s:ALSA:OSS:" \
+ makefile || die
+ fi
+}
+
+src_compile() {
+ if use opengl || ! use dedicated ; then
+ emake cl-${PN}
+ if use sdl ; then
+ emake sdl-${PN}
+ fi
+ fi
+
+ if use dedicated ; then
+ emake sv-${PN}
+ fi
+}
+
+src_install() {
+ if use opengl || ! use dedicated ; then
+ dogamesbin ${PN}-glx
+ doicon ${PN}.xpm
+ make_desktop_entry ${PN}-glx "Nexuiz (GLX)"
+ if use sdl ; then
+ dogamesbin ${PN}-sdl
+ make_desktop_entry ${PN}-sdl "Nexuiz (SDL)"
+ dosym ${PN}-sdl "${GAMES_BINDIR}"/${PN}
+ else
+ dosym ${PN}-glx "${GAMES_BINDIR}"/${PN}
+ fi
+ fi
+
+ if use dedicated ; then
+ dogamesbin ${PN}-dedicated
+ fi
+
+ cd "${WORKDIR}"/${MY_PN} || die
+
+ dodoc Docs/*.txt
+ dohtml -r readme.html Docs
+
+ insinto "${GAMES_DATADIR}"/${PN}
+
+ if use dedicated ; then
+ doins -r server
+ fi
+
+ doins -r data havoc
+
+ prepgamesdirs
+}
diff --git a/games-fps/openarena/Manifest b/games-fps/openarena/Manifest
new file mode 100644
index 00000000000..c6ef52efe23
--- /dev/null
+++ b/games-fps/openarena/Manifest
@@ -0,0 +1,2 @@
+DIST openarena-0.8.8.zip 425189255 SHA256 5a8faf7f5b51f351b0a1618c06b6b98a5f1a6758f1d39818de2c87df2a0bac4a SHA512 9fa4dabe8a3428dc3cbec97f3b4d20c04569c14cdd00b60e6391c6dd61e310f246ff5ec97e7549821b3d6f5f94b140eb5411a2ddd83dafcad66937b7f78ea8dd WHIRLPOOL d9121b2e936063d02da7ed4de79f8d0da3fd3c9b196d3fbce9091be0d14c9f745317c833eed7ce9c0691cd8627396f0d3580eb244b7229500b44a03583612e4f
+DIST openarena-engine-source-0.8.8.tar.bz2 3777830 SHA256 95aa500cb7e42e57fb1f6db7b97a254168f4fa2e3676d6cdc33180b69fde0e77 SHA512 d4ba3655fae500cf5b7475c83d39c81b6abc759da15cfb4ea9e1dc0f47ffb11c1bbbc2b6f85d613ab1d729978eda93d4d7677c9a45a33853e363c820d8b81c43 WHIRLPOOL 6093e6d209983a268d21ea487f99ab065f1b050a3af43fead3461e24dc629be8b84be56644a4ca5a35512015f187eb9880f1228b0d501de091c482e141086f2b
diff --git a/games-fps/openarena/files/openarena-0.8.8-makefile.patch b/games-fps/openarena/files/openarena-0.8.8-makefile.patch
new file mode 100644
index 00000000000..d72bbe79b29
--- /dev/null
+++ b/games-fps/openarena/files/openarena-0.8.8-makefile.patch
@@ -0,0 +1,36 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu May 17 23:34:20 UTC 2012
+Subject: flags, arch
+
+--- openarena-engine-source-0.8.8/Makefile
++++ openarena-engine-source-0.8.8/Makefile
+@@ -73,6 +73,10 @@
+
+ ifndef ARCH
+ ARCH=$(COMPILE_ARCH)
++else
++ ifeq ($(ARCH),amd64)
++ ARCH=x86_64
++ endif
+ endif
+ export ARCH
+
+@@ -263,8 +267,7 @@
+ endif
+ endif
+
+- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+- -pipe -DUSE_ICON
++ BASE_CFLAGS = -fno-strict-aliasing -DUSE_ICON -I.
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+
+@@ -335,7 +338,7 @@
+ THREAD_LIBS=-lpthread
+ LIBS=-ldl -lm
+
+- CLIENT_LIBS=$(SDL_LIBS) -lGL
++ CLIENT_LIBS=$(SDL_LIBS) -lGL -ljpeg
+
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1) \ No newline at end of file
diff --git a/games-fps/openarena/files/openarena-0.8.8-unbundling.patch b/games-fps/openarena/files/openarena-0.8.8-unbundling.patch
new file mode 100644
index 00000000000..2f108a6c8cb
--- /dev/null
+++ b/games-fps/openarena/files/openarena-0.8.8-unbundling.patch
@@ -0,0 +1,172 @@
+--- openarena-engine-source-0.8.8/Makefile
++++ openarena-engine-source-0.8.8/Makefile
+@@ -1406,41 +1406,7 @@
+ $(B)/client/l_script.o \
+ $(B)/client/l_struct.o \
+ \
+- $(B)/client/jcapimin.o \
+- $(B)/client/jcapistd.o \
+- $(B)/client/jccoefct.o \
+- $(B)/client/jccolor.o \
+- $(B)/client/jcdctmgr.o \
+- $(B)/client/jchuff.o \
+- $(B)/client/jcinit.o \
+- $(B)/client/jcmainct.o \
+- $(B)/client/jcmarker.o \
+- $(B)/client/jcmaster.o \
+- $(B)/client/jcomapi.o \
+- $(B)/client/jcparam.o \
+- $(B)/client/jcphuff.o \
+- $(B)/client/jcprepct.o \
+- $(B)/client/jcsample.o \
+- $(B)/client/jdapimin.o \
+- $(B)/client/jdapistd.o \
+ $(B)/client/jdatasrc.o \
+- $(B)/client/jdcoefct.o \
+- $(B)/client/jdcolor.o \
+- $(B)/client/jddctmgr.o \
+- $(B)/client/jdhuff.o \
+- $(B)/client/jdinput.o \
+- $(B)/client/jdmainct.o \
+- $(B)/client/jdmarker.o \
+- $(B)/client/jdmaster.o \
+- $(B)/client/jdpostct.o \
+- $(B)/client/jdsample.o \
+- $(B)/client/jdtrans.o \
+- $(B)/client/jerror.o \
+- $(B)/client/jfdctflt.o \
+- $(B)/client/jidctflt.o \
+- $(B)/client/jmemmgr.o \
+- $(B)/client/jmemnobs.o \
+- $(B)/client/jutils.o \
+ \
+ $(B)/client/tr_animation.o \
+ $(B)/client/tr_backend.o \
+--- openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c
++++ openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c
+@@ -15,9 +15,15 @@
+ */
+
+ /* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+-#include "jinclude.h"
+-#include "jpeglib.h"
+-#include "jerror.h"
++#include <stdio.h>
++#include <string.h>
++#include <jpeglib.h>
++#include <jerror.h>
++#undef METHODDEF
++#define METHODDEF static
++#undef GLOBAL
++#define GLOBAL
++#define SIZEOF(object) ((size_t) sizeof(object))
+
+ #ifndef MIN
+ #define MIN(a, b) ((a)<(b)?(a):(b))
+@@ -44,7 +50,7 @@
+ * before any data is actually read.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ init_source (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -90,7 +96,7 @@
+ * the front of the buffer rather than discarding it.
+ */
+
+-METHODDEF(boolean)
++METHODDEF boolean
+ fill_input_buffer (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -129,7 +135,7 @@
+ * buffer is the application writer's problem.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -170,7 +176,7 @@
+ * for error exit.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ term_source (j_decompress_ptr cinfo)
+ {
+ /* no work necessary here */
+@@ -183,8 +189,8 @@
+ * for closing it after finishing decompression.
+ */
+
+-GLOBAL(void)
+-jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, size_t size)
++GLOBAL void
++jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, unsigned long size)
+ {
+ my_src_ptr src;
+
+--- openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c
++++ openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c
+@@ -31,7 +31,7 @@
+ */
+
+ #define JPEG_INTERNALS
+-#include "../jpeg-6b/jpeglib.h"
++#include <jpeglib.h>
+
+ void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
+ /* This struct contains the JPEG decompression parameters and pointers to
+@@ -131,7 +131,10 @@
+ }
+
+ memcount = pixelcount * 4;
+- row_stride = cinfo.output_width * cinfo.output_components;
++ if (3 == cinfo.output_components)
++ row_stride = cinfo.output_width * 4;
++ else
++ row_stride = cinfo.output_width * cinfo.output_components;
+
+ out = ri.Malloc(memcount);
+
+@@ -144,14 +147,26 @@
+ /* Here we use the library's state variable cinfo.output_scanline as the
+ * loop counter, so that we don't have to keep track ourselves.
+ */
++ buf = out;
+ while (cinfo.output_scanline < cinfo.output_height) {
+ /* jpeg_read_scanlines expects an array of pointers to scanlines.
+ * Here the array is only one element long, but you could ask for
+ * more than one scanline at a time if that's more convenient.
+ */
+- buf = ((out+(row_stride*cinfo.output_scanline)));
+ buffer = &buf;
+ (void) jpeg_read_scanlines(&cinfo, buffer, 1);
++ if (3 == cinfo.output_components) {
++ /* turn RGB into RGBA */
++ int ioffset = cinfo.output_width * 3 - 1;
++ int ooffset = cinfo.output_width * 4 - 1;
++ do {
++ buf[ooffset--] = 255;
++ buf[ooffset--] = buf[ioffset--];
++ buf[ooffset--] = buf[ioffset--];
++ buf[ooffset--] = buf[ioffset--];
++ } while (ioffset > 0);
++ }
++ buf += row_stride;
+ }
+
+ buf = out;
+@@ -176,7 +191,7 @@
+ buf[--dindex] = greyshade;
+ } while(sindex);
+ }
+- else
++ else if (4 == cinfo.output_components)
+ {
+ // clear all the alphas to 255
+ int i; \ No newline at end of file
diff --git a/games-fps/openarena/metadata.xml b/games-fps/openarena/metadata.xml
new file mode 100644
index 00000000000..babae5de4ca
--- /dev/null
+++ b/games-fps/openarena/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">oarena</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/openarena/openarena-0.8.8.ebuild b/games-fps/openarena/openarena-0.8.8.ebuild
new file mode 100644
index 00000000000..f48a436cd76
--- /dev/null
+++ b/games-fps/openarena/openarena-0.8.8.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic versionator games
+
+DESCRIPTION="Open-source replacement for Quake 3 Arena"
+HOMEPAGE="http://openarena.ws/"
+SRC_URI="mirror://sourceforge/oarena/${P}.zip
+ mirror://sourceforge/oarena/src/${PN}-engine-source-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+curl +openal +vorbis"
+
+RDEPEND="virtual/opengl
+ media-libs/libsdl[joystick,opengl,video]
+ media-libs/speex
+ virtual/jpeg
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ curl? ( net-misc/curl )
+ openal? ( media-libs/openal )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+MY_S=${WORKDIR}/${PN}-engine-source-${PV}
+BUILD_DIR=${PN}-build
+DIR=${GAMES_DATADIR}/${PN}
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-unbundling.patch
+ cd "${MY_S}"
+ touch jpegint.h
+}
+
+src_compile() {
+ local myopts
+
+ # enable voip, disable mumble
+ # also build always server and use smp by default
+ myopts="USE_INTERNAL_SPEEX=0 USE_VOIP=1 USE_MUMBLE=0
+ BUILD_SERVER=1 BUILD_CLIENT_SMP=1 USE_LOCAL_HEADERS=0"
+ use curl || myopts="${myopts} USE_CURL=0"
+ use openal || myopts="${myopts} USE_OPENAL=0"
+ use vorbis || myopts="${myopts} USE_CODEC_VORBIS=0"
+
+ cd "${MY_S}"
+ emake \
+ V=1 \
+ DEFAULT_BASEDIR="${DIR}" \
+ BR="${BUILD_DIR}" \
+ ${myopts} \
+ OPTIMIZE=
+}
+
+src_install() {
+ cd "${MY_S}"/"${BUILD_DIR}"
+ newgamesbin openarena-smp.* "${PN}"
+ newgamesbin oa_ded.* "${PN}-ded"
+ cd "${S}"
+
+ insinto "${DIR}"
+ doins -r baseoa missionpack
+
+ dodoc CHANGES CREDITS LINUXNOTES README
+ newicon "${MY_S}"/misc/quake3.png ${PN}.png
+ make_desktop_entry ${PN} "OpenArena"
+
+ prepgamesdirs
+}
diff --git a/games-fps/postal2/Manifest b/games-fps/postal2/Manifest
new file mode 100644
index 00000000000..4b533cc227a
--- /dev/null
+++ b/games-fps/postal2/Manifest
@@ -0,0 +1,2 @@
+DIST postal2-1409.1.run 4816304 SHA256 7c34530f84acfcb120710660ae56264fdab28d74eb0dd0a351bef37f87e2b1b1 SHA512 5ff4880435394c552e7c1f33baf8dfdb71eb56fe5e3067eeb746826a25e585d3901292618668de50dc8bf641b2628a26a82cdf5b642e33f4113b55d72df9c4fe WHIRLPOOL 90ff13f14d93ed539596bd21170397b55bf688719ac58d33168f27b7bdc7d1b7f6a45835b050608efc4e5cf8483e2a5b5894ff750449fa66206ce36f037a993e
+DIST postal2-1409.2.run 5645624 SHA256 5b7456200d5777b350e2a1b01eefd8f74df9c5d880acd18eeab3af731d719fe7 SHA512 9fafcfec30d99e30b879318a96f484d3723853a213606f58b02a37631b4393ab4925022fcef3f84c95907269c6675090100358c16cec8b779140bf83fe7cb660 WHIRLPOOL 658936af2e3cbd7d90734749187c36b05e16cefbcb73dc12526c4ceb9d3a34197b362186d3d06436ffb63e2019329631a2e6de13fb8a8518bf4a43f06872e7c7
diff --git a/games-fps/postal2/metadata.xml b/games-fps/postal2/metadata.xml
new file mode 100644
index 00000000000..668ca6c7066
--- /dev/null
+++ b/games-fps/postal2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/postal2/postal2-1409.2-r2.ebuild b/games-fps/postal2/postal2-1409.2-r2.ebuild
new file mode 100644
index 00000000000..9d7af064f77
--- /dev/null
+++ b/games-fps/postal2/postal2-1409.2-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker cdrom multilib games
+
+DESCRIPTION="Postal 2: Share the Pain"
+HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=postal2"
+SRC_URI="http://updatefiles.linuxgamepublishing.com/${PN}/${P/%?/1}.run
+ http://updatefiles.linuxgamepublishing.com/${PN}/${P}.run"
+
+LICENSE="postal2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="games-util/loki_patch"
+RDEPEND="sys-libs/glibc
+ sys-libs/libstdc++-v3:5
+ amd64? ( sys-libs/glibc[multilib] sys-libs/libstdc++-v3:5[multilib] )
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[X,opengl,abi_x86_32(-)]
+ >=media-libs/openal-1.15.1[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cdrom_get_cds .installation_data/linux-specific.tar.bz2
+ mkdir ${A}
+
+ local f
+ for f in * ; do
+ cd "${S}"/${f}
+ unpack_makeself ${f}
+ done
+}
+
+src_install() {
+ has_multilib_profile && ABI=x86
+
+ local dir=${GAMES_PREFIX_OPT}/${PN}
+
+ dodir "${dir}"
+ cd "${D}/${dir}"
+
+ ln -s "${CDROM_ROOT}"/.installation_data/*.bz2 .
+ unpack ./*.bz2
+ rm -f ./*.bz2
+
+ local d
+ for d in "${S}"/* ; do
+ pushd "${d}" > /dev/null
+ loki_patch patch.dat "${D}/${dir}" || die "loki_patch ${d} failed"
+ popd > /dev/null
+ done
+
+ rm -f System/{libstdc++.so.5,libgcc_s.so.1}
+
+ dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
+ dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
+
+ games_make_wrapper ${PN} ./${PN}-bin "${dir}"/System .
+ doicon "${CDROM_ROOT}"/.installation_data/${PN}.xpm
+ make_desktop_entry ${PN} "Postal 2: Share the Pain"
+
+ prepgamesdirs
+}
diff --git a/games-fps/postal2mp-demo/Manifest b/games-fps/postal2mp-demo/Manifest
new file mode 100644
index 00000000000..bd6c30fd881
--- /dev/null
+++ b/games-fps/postal2mp-demo/Manifest
@@ -0,0 +1 @@
+DIST Postal2STP-FreeMP-linux.tar.bz2 591082047 SHA256 9869c6ffc220e58cb51eb04c5dbbc480d5025cfd33b83bf4f3eb8ac340d6c1e2 SHA512 92580c2ce0593f37890013a5b2e5c1d420b57ae4e90569725446dbb2c939d1dd29b6df566783f020419dd8c4b1301213d1e8d9d581c95efd3f5950e8e54b46d1 WHIRLPOOL 7f2093be5a3214bd8fa527cac37addc7e8ed5e9d8645b3d47cbab65116850c786042479d034f4d59ec198641ff3e1e3a734aa5ffb37de579f30257e273fa6bea
diff --git a/games-fps/postal2mp-demo/metadata.xml b/games-fps/postal2mp-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/postal2mp-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild b/games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild
new file mode 100644
index 00000000000..0632465c0e4
--- /dev/null
+++ b/games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker multilib games
+
+DESCRIPTION="You play the Postal Dude: Postal 2 is only as violent as you are"
+HOMEPAGE="http://icculus.org/news/news.php?id=4419"
+SRC_URI="http://treefort.icculus.org/postal2/Postal2STP-FreeMP-linux.tar.bz2
+ http://0day.icculus.org/postal2/Postal2STP-FreeMP-linux.tar.bz2
+ http://cyberstalker.dk/sponsored-by-dkchan.org/Postal2STP-FreeMP-linux.tar.bz2"
+
+LICENSE="postal2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="sys-libs/glibc
+ sys-libs/libstdc++-v3:5
+ amd64? ( sys-libs/glibc[multilib] sys-libs/libstdc++-v3:5[multilib] )
+ >=media-libs/libsdl-1.2.15-r4[X,opengl,abi_x86_32(-)]
+ >=media-libs/openal-1.15.1[abi_x86_32(-)]"
+DEPEND=""
+
+QA_PREBUILT="${GAMES_PREFIX_OPT:1}/${PN}/System/*"
+
+S=${WORKDIR}/Postal2STP-FreeMP-linux
+
+src_install() {
+ has_multilib_profile && ABI=x86
+
+ dir=${GAMES_PREFIX_OPT}/${PN}
+
+ insinto "${dir}"
+ doins -r *
+ fperms +x "${dir}"/System/postal2-bin
+
+ rm "${ED}/${dir}"/System/{openal.so,libSDL-1.2.so.0,libstdc++.so.5,libgcc_s.so.1} || die
+ dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
+ dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
+
+ games_make_wrapper ${PN} ./postal2-bin "${dir}"/System .
+ newicon postal2.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Postal 2: Share the Pain (Demo)"
+
+ prepgamesdirs
+}
diff --git a/games-fps/prboom/Manifest b/games-fps/prboom/Manifest
new file mode 100644
index 00000000000..f7470daefd9
--- /dev/null
+++ b/games-fps/prboom/Manifest
@@ -0,0 +1,2 @@
+DIST prboom-2.5.0.tar.gz 1049505 SHA256 226c1c470f8cc983327536404f405a1d026cf0a5188c694a1243cc8630014bae SHA512 9e25b55047c66931ea010751fb64484e466395b04dfb738ed9dc515bd8b78e1124a337da33bf7be6e97280016ed1f01c852d8bc12704bdb82074488d7b5d2894 WHIRLPOOL 1aa458514266c107a5c4883b970cdaac157ded0ef4348e6666647e9426a8f28c4c98ff32de93be20c3d0dc3dd740d725e3c4bd9c767bb0aa3c3f7752a719a5a8
+DIST prboom.png 4254 SHA256 ed79c4712b57b0c5e8ef975412e22d6936fa4b62657707e8f1cda63302008542 SHA512 72631d253c6754484ab1c96c953ed37a734197fa851dc88156fd3d4fb8396a77347805233481470b936a504d08e06d994de1eba613e6bf70a89db8fc7ee9b1ac WHIRLPOOL b7e91c2b43ea57951dfcf0ed2b9916c8053d75d0119965079c2806ba1d9a9c13e36506dd65cd82e01e1e2f64b276dbe0bac2c2eaf2a3f80a26ab777feeeca75e
diff --git a/games-fps/prboom/files/prboom-2.5.0-libpng14.patch b/games-fps/prboom/files/prboom-2.5.0-libpng14.patch
new file mode 100644
index 00000000000..d0e3c48299f
--- /dev/null
+++ b/games-fps/prboom/files/prboom-2.5.0-libpng14.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/show_bug.cgi?id=308739
+
+--- src/SDL/i_sshot.c
++++ src/SDL/i_sshot.c
+@@ -231,7 +231,7 @@
+ if (fp)
+ {
+ png_struct *png_ptr = png_create_write_struct(
+- PNG_LIBPNG_VER_STRING, png_error_ptr_NULL, error_fn, warning_fn);
++ PNG_LIBPNG_VER_STRING, NULL, error_fn, warning_fn);
+
+ if (png_ptr)
+ {
+@@ -279,7 +279,7 @@
+ break;
+ }
+ }
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ }
+ fclose(fp);
+ }
diff --git a/games-fps/prboom/files/prboom-2.5.0-nvidia-test.c b/games-fps/prboom/files/prboom-2.5.0-nvidia-test.c
new file mode 100644
index 00000000000..f9e4bd700f8
--- /dev/null
+++ b/games-fps/prboom/files/prboom-2.5.0-nvidia-test.c
@@ -0,0 +1,3 @@
+#include <SDL/SDL_opengl.h>
+PFNGLCOLORTABLEEXTPROC glColorTableEXT;
+int main(){return 0;}
diff --git a/games-fps/prboom/files/prboom-2.5.0-nvidia.patch b/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
new file mode 100644
index 00000000000..2b7aa9b32d4
--- /dev/null
+++ b/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
@@ -0,0 +1,48 @@
+--- src/gl_intern.h.orig 2003-09-21 16:39:30.247451624 -0400
++++ src/gl_intern.h 2003-09-21 16:39:41.610724144 -0400
+@@ -84,6 +84,6 @@
+ #define min(a,b) ((a)<(b)?(a):(b))
+ #endif
+
+-PFNGLCOLORTABLEEXTPROC gld_ColorTableEXT;
++//PFNGLCOLORTABLEEXTPROC gld_ColorTableEXT;
+
+ #endif // _GL_INTERN_H
+--- src/gl_main.c.orig 2003-09-21 16:39:55.436622288 -0400
++++ src/gl_main.c 2003-09-21 16:43:00.943420968 -0400
+@@ -285,6 +285,7 @@
+
+ if (strcasecmp(extension, "GL_EXT_texture_filter_anisotropic") == 0)
+ gl_texture_filter_anisotropic = true;
++/*
+ else if (strcasecmp(extension, "GL_EXT_paletted_texture") == 0) {
+ if (gl_use_paletted_texture) {
+ gl_paletted_texture = true;
+@@ -304,6 +305,7 @@
+ else
+ lprintf(LO_INFO,"using GL_EXT_shared_texture_palette\n",glGetString(GL_VENDOR));
+ }
++*/
+
+ extension = p;
+ } while (*extension != '\0');
+@@ -761,7 +763,7 @@
+ pal[transparent_pal_index*4+1]=0;
+ pal[transparent_pal_index*4+2]=0;
+ pal[transparent_pal_index*4+3]=0;
+- gld_ColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGBA, 256, GL_RGBA, GL_UNSIGNED_BYTE, pal);
++// gld_ColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGBA, 256, GL_RGBA, GL_UNSIGNED_BYTE, pal);
+ W_UnlockLumpName("PLAYPAL");
+ } else {
+ if (palette>0)
+--- src/gl_texture.c.orig 2003-09-21 16:43:18.450759448 -0400
++++ src/gl_texture.c 2003-09-21 16:43:39.549551944 -0400
+@@ -178,7 +178,7 @@
+ pal[transparent_pal_index*4+1]=0;
+ pal[transparent_pal_index*4+2]=0;
+ pal[transparent_pal_index*4+3]=0;
+- gld_ColorTableEXT(target, GL_RGBA, 256, GL_RGBA, GL_UNSIGNED_BYTE, pal);
++// gld_ColorTableEXT(target, GL_RGBA, 256, GL_RGBA, GL_UNSIGNED_BYTE, pal);
+ W_UnlockLumpName("PLAYPAL");
+ }
+
diff --git a/games-fps/prboom/metadata.xml b/games-fps/prboom/metadata.xml
new file mode 100644
index 00000000000..e8df2816a78
--- /dev/null
+++ b/games-fps/prboom/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">prboom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/prboom/prboom-2.5.0.ebuild b/games-fps/prboom/prboom-2.5.0.ebuild
new file mode 100644
index 00000000000..edba6f253fc
--- /dev/null
+++ b/games-fps/prboom/prboom-2.5.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="Port of ID's doom to SDL and OpenGL"
+HOMEPAGE="http://prboom.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[joystick,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-net
+ !<games-fps/lsdldoom-1.5
+ virtual/opengl
+ virtual/glu"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ ebegin "Detecting NVidia GL/prboom bug"
+ $(tc-getCC) "${FILESDIR}"/${P}-nvidia-test.c 2> /dev/null
+ local ret=$?
+ eend ${ret} "NVidia GL/prboom bug found ;("
+ [ ${ret} -eq 0 ] || epatch "${FILESDIR}"/${P}-nvidia.patch
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+ sed -i \
+ -e '/^gamesdir/ s/\/games/\/bin/' \
+ src/Makefile.in \
+ || die "sed failed"
+ sed -i \
+ -e 's/: install-docDATA/:/' \
+ -e '/^SUBDIRS/ s/doc//' \
+ Makefile.in \
+ || die "sed failed"
+ sed -i \
+ -e 's:-ffast-math $CFLAGS_OPT::' \
+ configure \
+ || die "sed configure failed"
+}
+
+src_configure() {
+ # leave --disable-cpu-opt in otherwise the configure script
+ # will append -march=i686 and crap ... let the user's CFLAGS
+ # handle this ...
+ egamesconf \
+ --enable-gl \
+ --disable-i386-asm \
+ --disable-cpu-opt \
+ --with-waddir="${GAMES_DATADIR}/doom-data"
+}
+
+src_install() {
+ default
+ emake DESTDIR="${D}" install
+ doman doc/*.{5,6}
+ dodoc doc/README.* doc/*.txt
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} "PrBoom"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play the original Doom levels, place doom.wad and/or doom2.wad"
+ elog "into ${GAMES_DATADIR}/doom-data"
+ elog "Then run ${PN} accordingly."
+ elog
+ elog "doom1.wad is the shareware demo wad consisting of 1 episode,"
+ elog "and doom.wad is the full Doom 1 set of 3 episodes"
+ elog "(or 4 in the Ultimate Doom wad)."
+ elog
+ elog "You can even emerge doom-data and/or freedoom to play for free."
+}
diff --git a/games-fps/quake1-data/metadata.xml b/games-fps/quake1-data/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-data/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-data/quake1-data-2.40.ebuild b/games-fps/quake1-data/quake1-data-2.40.ebuild
new file mode 100644
index 00000000000..1e7eff5d247
--- /dev/null
+++ b/games-fps/quake1-data/quake1-data-2.40.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: if installing off of the 1.01 cd, need to fetch the
+# quake shareware and use that pak0
+# http://linux.omnipotent.net/article.php?article_id=11287
+# ftp://ftp.cdrom.com/pub/idgames/idstuff/quake/quake106.zip
+
+EAPI=2
+inherit eutils cdrom games
+
+DESCRIPTION="iD Software's Quake 1 ... the data files"
+HOMEPAGE="http://www.idsoftware.com/games/quake/quake/"
+SRC_URI=""
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc x86"
+IUSE=""
+
+DEPEND="app-arch/lha"
+RDEPEND=""
+
+S=${WORKDIR}
+
+pkg_setup() {
+ games_pkg_setup
+
+ if has_version games-fps/quake1-demodata && \
+ ! has_version "games-fps/quake1-demodata[symlink]" ; then
+ eerror "The symlink for the demo data conflicts with the cdinstall data"
+ die "Unmerge games-fps/quake1-demodata to remove the conflict"
+ fi
+}
+
+src_unpack() {
+ export CDROM_NAME_SET=("Existing Install" "Quake CD (1.01)" "Ultimate Quake Collection" "Quake CD (newer)")
+ cdrom_get_cds id1:q101_int.1:Setup/ID1:resource.1
+ if [[ ${CDROM_SET} == "1" ]] ; then
+ echo ">>> Unpacking q101_int.lha to ${PWD}"
+ cat "${CDROM_ROOT}"/q101_int.1 "${CDROM_ROOT}"/q101_int.2 > \
+ "${S}"/q101_int.exe
+ lha xqf "${S}"/q101_int.exe || die "failure unpacking q101_int.exe"
+ rm -f q101_int.exe
+ elif [[ ${CDROM_SET} == "3" ]] ; then
+ echo ">>> Unpacking resource.1 to ${PWD}"
+ lha xqf "${CDROM_ROOT}"/resource.1 || die "failure unpacking resource.1"
+ fi
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/quake1/id1
+ case ${CDROM_SET} in
+ 0) doins "${CDROM_ROOT}"/id1/* || die "doins pak files"
+ dodoc "${CDROM_ROOT}"/*.txt
+ ;;
+ 1|3)doins id1/* || die "doins pak files"
+ dodoc *.txt
+ ;;
+ 2) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak \
+ || die "ins pak0.pak failed"
+ newins "${CDROM_ROOT}"/Setup/ID1/PAK1.PAK pak1.pak \
+ || die "ins pak1.pak failed"
+ dodoc "${CDROM_ROOT}"/Docs/*
+ ;;
+ esac
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-demodata/Manifest b/games-fps/quake1-demodata/Manifest
new file mode 100644
index 00000000000..c2706c0d80e
--- /dev/null
+++ b/games-fps/quake1-demodata/Manifest
@@ -0,0 +1 @@
+DIST quake106.zip 9094045 SHA256 ec6c9d34b1ae0252ac0066045b6611a7919c2a0d78a3a66d9387a8f597553239 SHA512 8960c48d9c3c8bb142fd812968d29f05304384bd559b5cdb1d2cb8b6faac84d30ebf9cdf5e5e4eb3739907d9b599ca2ba34035647c58a8ed1874bdc7f0b75e1d WHIRLPOOL ff39f8931b6e551761c75f2552e568e0d3e71a8926cc43479323e2cb2ca7773f049a34f6628a8e42739f6a5fa0f64053bef1ac63ade761d549ab6b1b78f8954e
diff --git a/games-fps/quake1-demodata/metadata.xml b/games-fps/quake1-demodata/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-demodata/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-demodata/quake1-demodata-1.06.ebuild b/games-fps/quake1-demodata/quake1-demodata-1.06.ebuild
new file mode 100644
index 00000000000..252fec1b28f
--- /dev/null
+++ b/games-fps/quake1-demodata/quake1-demodata-1.06.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils versionator games
+
+MY_PV=$(delete_all_version_separators)
+MY_PN="quake"
+
+DESCRIPTION="Demo data for Quake 1"
+HOMEPAGE="http://en.wikipedia.org/wiki/Quake_I"
+SRC_URI="mirror://idsoftware/${MY_PN}/${MY_PN}${MY_PV}.zip"
+
+# See licinfo.txt
+LICENSE="quake1-demodata"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="symlink"
+
+RDEPEND=""
+DEPEND="app-arch/lha
+ app-arch/unzip"
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/${MY_PN}1
+
+pkg_setup() {
+ games_pkg_setup
+
+ if has_version "games-fps/quake1-data" ; then
+ ewarn "games-fps/quake1-data already includes the demo data,"
+ ewarn "so this installation is not very useful."
+ echo
+ if use symlink ; then
+ eerror "The symlink for the demo data conflicts with the cdinstall data"
+ die "Remove the 'symlink' USE flag for this package"
+ fi
+ ebeep
+ epause
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # File rename for bug #159100
+ mv resource.{1,x}
+
+ lha xfq resource.x || die "lha failed"
+ # Don't want to conflict with the cdinstall files
+ mv id1 demo
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r demo
+
+ dodoc *.txt
+
+ if use symlink ; then
+ # Make the demo the default, so that people can just run it,
+ # without having to mess with command-line options.
+ cd "${D}/${dir}" && ln -sfn demo id1
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "This is just the demo data."
+ elog "You will still need a Quake 1 client, to play, such as darkplaces."
+ echo
+
+ if use symlink ; then
+ elog "id1 has been symlinked to demo, for convenience, within:"
+ elog "${dir}"
+ echo
+ fi
+}
diff --git a/games-fps/quake1-killer/Manifest b/games-fps/quake1-killer/Manifest
new file mode 100644
index 00000000000..5970b9efa46
--- /dev/null
+++ b/games-fps/quake1-killer/Manifest
@@ -0,0 +1 @@
+DIST kqp220z.zip 2952348 SHA256 be8a4f5471cbc68ace0c954012795a38b12ba21613418e111271049767ae1972 SHA512 8149795435cf72c4358dc35cce473482b718b67cc799ce4739d975cf5fe3e856735cbcd1f40c7b6a345aee8bf830147ecb37e312b1cb141b40c14cc95fd0f56e WHIRLPOOL 2d2b3356d73af0bcdba08f879f09538ea06772fcae3050342c6a57d5c007e8a371b1c7b373bc9aaf05d6a1a6ba6148497f12e4fd4bb361dcab7f05b28a1427d0
diff --git a/games-fps/quake1-killer/metadata.xml b/games-fps/quake1-killer/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-killer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-killer/quake1-killer-2.2z.ebuild b/games-fps/quake1-killer/quake1-killer-2.2z.ebuild
new file mode 100644
index 00000000000..5122c1d66bf
--- /dev/null
+++ b/games-fps/quake1-killer/quake1-killer-2.2z.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit games
+
+DESCRIPTION="The Killer Quake Patch"
+HOMEPAGE="http://kqp.horoy.com/"
+SRC_URI="http://www.gamers.org/pub/idgames2/quakec/compilations/kqp220z.zip
+ mirror://gentoo/kqp220z.zip"
+
+LICENSE="quake1-killer"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo ">>> Unpacking kqp220z.zip to ${PWD}"
+ unzip -qoL "${DISTDIR}"/kqp220z.zip || die "unpacking kqp220z.zip failed"
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}/quake1/killer"
+ doins -r *
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-movies/Manifest b/games-fps/quake1-movies/Manifest
new file mode 100644
index 00000000000..61244e71df0
--- /dev/null
+++ b/games-fps/quake1-movies/Manifest
@@ -0,0 +1,9 @@
+DIST artifact.zip 5102445 SHA256 ad796926dd9eafb41f3d4ecfcce4e25d64f8f8daf14c848253aa27da2c0ab6b0 SHA512 99abd5edabf63d1c7d40ef58489fc117603e9d3b573acda6e2bea988315e0d2956dd0cccf528e69ef3280dedd0f705e0bcc0b995de6425088b79acb9f4345365 WHIRLPOOL e516d602ddfb92e67154dc6312e5db6e416e55ccfbfc43826b7d3749e6e7ec7173d0f4b3c5a25e40a2807ad33c21202176de03808417d3aa9f3cebf793d7594d
+DIST blahmov.zip 11384242 SHA256 19019054151dbe0193437280dcc09ca1e547d920d71178b3fe212d576b72afb8 SHA512 5049eb61198f63fa93fec04f193dc0658ea58adcd05113ae1f73d465686baf5295d3e1320f1ba13b06604c46a32fbecee147eab5e7552e6867b9ed4976c374f3 WHIRLPOOL de0a9f595e8243c467977350a0703a4e1385f90191e812359b51c9a7bd93bfde828866677aabdf15633e798e72587ffeaf60100060ba31ae30d33688bad8bc78
+DIST blahouts.zip 7409083 SHA256 13635fd9969028616231c7a8d3e0b80a09fedd800de831b6035ab98008797b75 SHA512 a694cddc002da065d1fa93ea81e8031dbfc8f8ddace3ff05a11efb50a93067601b1324be9c5f07cf46c41b608f7e013ea7b4c6a36ef3913612d58e6c7fba41f2 WHIRLPOOL 6a338ec9df5ecfd470dc5fc7f7b89a99d83596b863dab610ca8aeda0e84ecc01c4f13194f041ccc75983243e0e035f476e96e47ae532baeab12931ad60e127a7
+DIST camper.zip 38865 SHA256 e5b5ae712dff02966186e141c1c1b56b885e25f9609f7274b9a30bf946dd38a4 SHA512 101aa3e3d0077128f970102e5e04b26b946f05b97a58e3771ec0141f3229be7245b43a0d13223a416027828a41fe00572cfff0407ea8827bc455c6b07426cc81 WHIRLPOOL 0f0e849c762b4673b97994d99cab033ea15aeeaa6e6a841a7f8a50dd344ff9bf85a3505e2d8a44918fad7e0c18f1ccaf2fbd2721efd7e9c695ab45cf2d652a6a
+DIST op_bays.zip 3117448 SHA256 240a69cac6fe2aa6e388cedd4289c64258c7a7134a0cfacae446635890cd66e4 SHA512 07616ad170254b7c059bdaf63a630cac2bea138327afc85fdb3a8bed89d5a4d55daec02abf01f21cd8a9fa85ac1462d6329595beb09daf2abcc2188aca4c9921 WHIRLPOOL 0b20f9c0d55e6fcf5575c78bf4c8c31e28f1be03f738797cea77c43902d5cb5072ce18f9b5f27ad8eeb72a73033c93450687afe250cecca4e401f2c316a96dba
+DIST rgb.zip 189044 SHA256 0664e669636d1ff657e9cad2c094941fec7d523259e53d36b1ba8ba801093198 SHA512 b7b9d55672a0b6585961c0e1e6f80357a5d6d2b977fba7000209df71bd0efecced2ffb0d3f6aff042a922699b0ec95f83b47cc13fd6245dd19d328c1b14ba8f0 WHIRLPOOL 1cf3d95d5e87fba133936dfd453459cd86a2855b31c76a7af4d5a1306908a4763f4c862ebc00aa18d18c5eac9f1243c35cc04033a79660f14da4309a676d9abf
+DIST rgb2.zip 308016 SHA256 a695bf2187d4ed5a7b762d9eb688a8384c12ba34d6f849c447d09cb2e2740595 SHA512 e8aa441a48169d9d8832ba705a0da3349d5784952ca7a4bf1a51457958e2e1c829231f9162f531d600d7683f84acd7471c75d85c4e1a538c96f63e46fbb4ea3c WHIRLPOOL aef9972ae792f0d69340525687604cb74d451569e1cb48781ada17ff3b427fa92ac49dde0531fe2f6d0700ac6d3636243b311b342c7a57440ea5b21dcc648c98
+DIST rgb3_preview.zip 7901556 SHA256 23b9ef1e3793aab03cb8ebc74b290a90dfbd068e3e1eab6ee412092e49703f8a SHA512 be94ed20d99c420a1899fbaa078b80bc95e95e74a25aef6cf63b02a99aea411879a5a99b8fe0b47ebd307c0112ef23d3a17802c049ecce8758fc7cf122e155c6 WHIRLPOOL 12fd782d3b9526abdd92f8c05dba2f8314f05f572ed99343990342c37ceb5c7f164246600705667a68de77b7d2cc173c0032639df7403c172fee2490cc7a8873
+DIST ta2.zip 1841879 SHA256 2bd99488d6a96302a0d9fbf61ae4b15f9b969d2de13d3f7a0bef3cd560a7d250 SHA512 99d4834d79d9a6502b48f4b7e5ccfdfe31a341d03ae6d22a0057bd2d5594b79b900e4fb28fc69145433447247dd886166f4a026d06ef475fe9d644b0af1a746a WHIRLPOOL 5612fd5f025272b66650704f6827d7635c9abef91a7c46e80c0d6f4430bd6bac2dacb479d1464e172b55900cf45357ccba072c7a25e7e30c83990d2d9cbbdadc
diff --git a/games-fps/quake1-movies/metadata.xml b/games-fps/quake1-movies/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-movies/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-movies/quake1-movies-0.ebuild b/games-fps/quake1-movies/quake1-movies-0.ebuild
new file mode 100644
index 00000000000..e04181f3a1e
--- /dev/null
+++ b/games-fps/quake1-movies/quake1-movies-0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils games
+
+DESCRIPTION="a collection of all the greatest Quake movies"
+HOMEPAGE="http://www.planetquake.com/cineplex/history.html"
+SRC_URI="http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/camper.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/rgb.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/rgb2.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/rgb3_preview.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/ta2.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/op_bays.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/cineplex/artifact.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/blah/blahmov.zip
+ http://ftp.se.kde.org/pub/pc/games/idgames2/planetquake/blah/blahouts.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+myunpack() {
+ echo ">>> Unpacking $1 to ${PWD}"
+ unzip -qoLL "${DISTDIR}"/$1 || die "unpacking $1 failed"
+}
+
+src_unpack() {
+ cd "${S}"
+ einfo "Diary of a Camper ..."
+ mkdir id1
+ cd id1
+ myunpack camper.zip
+ mv movies.txt movies-camper.txt
+
+ cd "${S}"
+ einfo "Ranger Gone Bad ..."
+ cd id1
+ myunpack rgb.zip
+ mv movies.txt movies-rgb.txt
+ myunpack rgb2.zip
+ mv movies.txt movies-rgb2.txt
+ cd ..
+ myunpack rgb3_preview.zip
+ rm *.bat
+ mkdir ta2
+ cd ta2
+ myunpack ta2.zip
+
+ cd "${S}"
+ einfo "Operation Bayshield ..."
+ mkdir op_bays
+ cd op_bays
+ myunpack op_bays.zip
+
+ cd "${S}"
+ einfo "The Artifact ..."
+ mkdir artifact
+ cd artifact
+ myunpack artifact.zip
+
+ cd "${S}"
+ einfo "Blahbalicious ..."
+ myunpack blahmov.zip
+ rm *.bat
+ cd blah
+ myunpack blahouts.zip
+
+ cd "${S}"
+ edos2unix $(find . -name '*.txt' -o -name '*.cfg')
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}/quake1"
+ doins -r * || die "doins"
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-rally/Manifest b/games-fps/quake1-rally/Manifest
new file mode 100644
index 00000000000..386edaf33a5
--- /dev/null
+++ b/games-fps/quake1-rally/Manifest
@@ -0,0 +1,2 @@
+DIST qr12.zip 9885866 SHA256 a4f269389472256fd54236de4bae2443abf1bd3214d2dec7719c2cd79dc083bb SHA512 a49b00e67b95c06b4898ad8e1f9e0a718c025736e7d68d3aa8e6ff9cf3062ea8a0cd0ea0deee5c2af8e3e30652c4420cd4b030b3bd8f1dd4ace9236bfaaf5e5a WHIRLPOOL ab2d44654a66cc408f9881cb573a86384fc0163c6d21e507a626bbd536a5d222fd08384c22259664b870f11eb604d9cd134c1061de8de8bcc95c03de7ecb3dab
+DIST qrlo1.zip 4086037 SHA256 0b575ac4871ea14926ebfb376675917e4c3c654ac00bb7f49a2277d6e8f1a0a5 SHA512 94af61a0f6978c39425cbc414e094417deef99f109aac2905877b3723873657c3ef7d7ae7d3b247144d68eabbfb79750a654e627ac039d315ff0f2fd323f395d WHIRLPOOL 7f01deb7dbcac519c4d481d38e45b5215eb4ed1f83ebc25c7cd316354e53ddbe5015ee41d70a57f7ded4c01667e930272f4790f5ad7f5eb422aa4dbae622fa0b
diff --git a/games-fps/quake1-rally/metadata.xml b/games-fps/quake1-rally/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-rally/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-rally/quake1-rally-1.2.ebuild b/games-fps/quake1-rally/quake1-rally-1.2.ebuild
new file mode 100644
index 00000000000..bafb67a2b40
--- /dev/null
+++ b/games-fps/quake1-rally/quake1-rally-1.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="TC which turns Quake into a Rally racing game"
+HOMEPAGE="http://wiki.quakeworld.nu/Quake_Rally"
+SRC_URI="http://ehall.freeshell.org/quake/qr12.zip
+ http://ehall.freeshell.org/quake/qrlo1.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo ">>> Unpacking qr12.zip to ${PWD}"
+ unzip -qoLL "${DISTDIR}"/qr12.zip || die "unpacking qr12.zip failed"
+ echo ">>> Unpacking qrlo1.zip to ${PWD}"
+ unzip -qoLL "${DISTDIR}"/qrlo1.zip || die "unpacking qrlo1.zip failed"
+ rm -f button.wav qrally.exe
+ cd rally
+ edos2unix $(find . -name '*.txt' -o -name '*.cfg')
+ mv rally{,.example}.cfg
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}/quake1"
+ doins -r *
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-teamfortress/Manifest b/games-fps/quake1-teamfortress/Manifest
new file mode 100644
index 00000000000..fad750176e0
--- /dev/null
+++ b/games-fps/quake1-teamfortress/Manifest
@@ -0,0 +1,2 @@
+DIST tf28.zip 4204316 SHA256 56a6767b7944f2ce54423f18f1cd59239ae37a7c7456f684227d6f5310c76291 SHA512 2b158982fbf501712fa31fae7b8d34ce4adf41c7ada7c32549bc94ea7370f56b7ebb03f08f70c38c4e53a4ba49a95cbd23acda39eddc4a360d236cc0129a3262 WHIRLPOOL aeeb5b1c8389b334cd630813e8969ab6a7af74ef13556e5667b65407479e03368649bf6300497a8963c30ed5b7d4fdb675d315749824a0fc21bd23f996402135
+DIST tf29qw.zip 626175 SHA256 85b24b677bbe3c6848949a90b06c5470dee40dab6db5f16c69472ba9d3194e4d SHA512 77ea488e5d9fcd3ad91317f2a35bd9e19ca38712cf9bf248bcfa88d1a5a66577ccc504476ecfb5d06bb7a28cd93ce92d3728f4be825c93567c8c2b61cb80c08d WHIRLPOOL f8acc7a45b991c3e15d2b2e1f667c9732f6ae239583bc823f2b1a3dddf6ce27e748991288a2618129f709e0a942d2030af2ccb4f598c0039223e1f4b96b6234c
diff --git a/games-fps/quake1-teamfortress/metadata.xml b/games-fps/quake1-teamfortress/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-teamfortress/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild b/games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild
new file mode 100644
index 00000000000..ccb0fd3e446
--- /dev/null
+++ b/games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="The classic Team Fortress Quake World mod"
+HOMEPAGE="http://www.planetfortress.com/teamfortress/"
+SRC_URI="mirror://gentoo/tf28.zip
+ mirror://gentoo/tf29qw.zip"
+
+LICENSE="quake1-teamfortress"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo ">>> Unpacking tf28.zip to ${PWD}"
+ unzip -qoL "${DISTDIR}"/tf28.zip || die "unpacking tf28.zip failed"
+ cd fortress
+ echo ">>> Unpacking tf29qw.zip to ${PWD}"
+ unzip -qoL "${DISTDIR}"/tf29qw.zip || die "unpacking tf29qw.zip failed"
+
+ edos2unix $(find . -name '*.txt' -o -name '*.cfg')
+ mv server.cfg server.example.cfg
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}/quake1"
+ doins -r *
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-textures/Manifest b/games-fps/quake1-textures/Manifest
new file mode 100644
index 00000000000..2a044c7fdd2
--- /dev/null
+++ b/games-fps/quake1-textures/Manifest
@@ -0,0 +1,2 @@
+DIST SKINSbmodels-48files-4-23-05.zip 12627945 SHA256 85a450b23eeb44539a3cf1a4c9feb1aeb56a14ec4b89d01dba5d237b8987c284 SHA512 dcd39b7d8544d4c381b2917820e1cec193f4279eca1c2d1b260cfc0d019a224bef84b4cd6a19da37331913533541d90ac72ac119592eb95cc82c9e2bac8ab37e WHIRLPOOL c739d092d62aab173c4c9e75a32ca36a58baf81ed0c22f53c109171240d1acedb12d5af848fc21c4b2adf7f177ce426d90e029a4e4ffb09c1b6ffcf88caff871
+DIST textures-486files-8-20-05.rar 207799283 SHA256 e368e0e12cf09d128eaac78e455cc4e280a38a641e8400d3c939f9889df8a1b1 SHA512 3809bea3ff1d7bc7acff51d8f19890677a563778cfb418d3f6ae940ceffa8953a1cf10dd7cc3a5d30715e6d2e79331ec88dd72f1ba22ebec0d179a01ad0eda2a WHIRLPOOL 8eee01a75c6d8b8b31b3ad8ac6f1c4ef819ccb1cef131e529d240d4ffb42e29dc638f23a32bab565a26e5c0c0860f3f847f7c95434edabb0c799b571415672c1
diff --git a/games-fps/quake1-textures/metadata.xml b/games-fps/quake1-textures/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake1-textures/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake1-textures/quake1-textures-20050820.ebuild b/games-fps/quake1-textures/quake1-textures-20050820.ebuild
new file mode 100644
index 00000000000..275b2723b17
--- /dev/null
+++ b/games-fps/quake1-textures/quake1-textures-20050820.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils games
+
+MY_SKINS="SKINSbmodels-48files-4-23-05.zip"
+MY_TEXTURES="textures-486files-8-20-05.rar"
+
+DESCRIPTION="Collection of graphical improvements for Quake 1"
+HOMEPAGE="http://facelift.quakedev.com/"
+SRC_URI="http://facelift.quakedev.com/download/${MY_SKINS}
+ http://facelift.quakedev.com/download/${MY_TEXTURES}"
+
+LICENSE="quake1-textures"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip
+ || (
+ app-arch/unrar
+ app-arch/rar )"
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/quake1
+
+src_unpack() {
+ unpack ${A}
+
+ mv readme.txt skins.txt
+}
+
+src_install() {
+ insinto "${dir}"/id1/textures
+ doins -r *.tga
+
+ # Set up symlink, for the demo levels to include the textures
+ dosym "${dir}/id1/textures" "${dir}/demo/textures"
+
+ dodoc *.txt
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "Use a Quake 1 client (e.g. darkplaces) to take advantage of these."
+}
diff --git a/games-fps/quake2-data/Manifest b/games-fps/quake2-data/Manifest
new file mode 100644
index 00000000000..b4e5324ac0e
--- /dev/null
+++ b/games-fps/quake2-data/Manifest
@@ -0,0 +1 @@
+DIST q2-3.20-x86-full-ctf.exe 19267584 SHA256 f82197c8c8089202a4b3a85d8833b0c2e827a709d205c760369407c212488baa
diff --git a/games-fps/quake2-data/metadata.xml b/games-fps/quake2-data/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake2-data/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake2-data/quake2-data-3.20.ebuild b/games-fps/quake2-data/quake2-data-3.20.ebuild
new file mode 100644
index 00000000000..4bac1cd9039
--- /dev/null
+++ b/games-fps/quake2-data/quake2-data-3.20.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit unpacker eutils cdrom games
+
+DESCRIPTION="iD Software's Quake 2 ... the data files"
+HOMEPAGE="http://www.idsoftware.com/"
+SRC_URI="mirror://idsoftware/quake2/q2-${PV}-x86-full-ctf.exe"
+
+LICENSE="Q2EULA"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ia64 ppc sparc x86 ~x86-fbsd"
+IUSE="videos"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+pkg_setup() {
+ games_pkg_setup
+ if has_version "games-fps/quake2-demodata[symlink]" ; then
+ eerror "The symlink for the demo data conflicts with the cdinstall data"
+ die "Unmerge games-fps/quake2-demodata to remove the conflict"
+ fi
+}
+
+src_unpack() {
+ export CDROM_NAME_SET=("Existing Install" "Ultimate Quake Edition" "Quake2 CD" "Quake4 Bonus DVD")
+ cdrom_get_cds baseq2:Install/patch:Install:Movies
+ # The .exe is just a self-extracting .zip
+ unpack_zip ${A}
+}
+
+src_install() {
+ dodoc DOCS/* 3.20_Changes.txt
+ newdoc ctf/readme.txt ctf-readme.txt
+ case ${CDROM_SET} in
+ 0) dohtml -r "${CDROM_ROOT}"/Install/DOCS/quake2_manual/* ;;
+ 1) dohtml -r "${CDROM_ROOT}"/Install/Docs/quake2_manual/* ;;
+ 2) dohtml -r "${CDROM_ROOT}"/Install/DOCS/quake2_manual/* ;;
+ 3) dodoc "${CDROM_ROOT}"/Docs/* ;;
+ esac
+
+ local baseq2_cdpath
+ case ${CDROM_SET} in
+ 0) baseq2_cdpath=${CDROM_ROOT}/baseq2;;
+ 1) baseq2_cdpath=${CDROM_ROOT}/Install/Data/baseq2;;
+ 2) baseq2_cdpath=${CDROM_ROOT}/Install/Data/baseq2;;
+ 3) baseq2_cdpath=${CDROM_ROOT}/setup/Data/baseq2;;
+ esac
+
+ dodir "${GAMES_DATADIR}"/quake2/baseq2
+
+ if use videos ; then
+ insinto "${GAMES_DATADIR}"/quake2/baseq2/video
+ doins "${baseq2_cdpath}"/video/* || die "doins videos"
+ fi
+
+ insinto "${GAMES_DATADIR}"/quake2/baseq2
+ doins "${baseq2_cdpath}"/pak0.pak || die "couldnt grab pak0.pak"
+ doins baseq2/*.pak || die "couldnt grab release paks"
+ doins baseq2/maps.lst || die "couldnt grab maps.lst"
+ dodir "${GAMES_DATADIR}"/quake2/baseq2/players
+ cp -R "${baseq2_cdpath}"/players/* baseq2/players/* \
+ "${D}/${GAMES_DATADIR}"/quake2/baseq2/players/ || die "couldnt grab player models"
+
+ for mod in ctf rogue xatrix ; do
+ if [[ -d ${baseq2_cdpath}/../${mod} ]] ; then
+ if use videos && [[ -d ${baseq2_cdpath}/../${mod}/video ]] ; then
+ insinto "${GAMES_DATADIR}"/quake2/${mod}/video
+ doins "${baseq2_cdpath}"/../${mod}/video/* 2>/dev/null
+ fi
+ if [[ -n $(ls "${baseq2_cdpath}"/../${mod}/*.pak 2>/dev/null) ]] ; then
+ insinto "${GAMES_DATADIR}"/quake2/${mod}
+ doins "${baseq2_cdpath}"/../${mod}/*.pak || die "doins ${mod} pak"
+ fi
+ fi
+ done
+
+ insinto "${GAMES_DATADIR}"/quake2/ctf
+ doins ctf/*.{cfg,ico,pak} || die "couldnt grab ctf"
+
+ prepgamesdirs
+}
diff --git a/games-fps/quake2-demodata/Manifest b/games-fps/quake2-demodata/Manifest
new file mode 100644
index 00000000000..468d04a0912
--- /dev/null
+++ b/games-fps/quake2-demodata/Manifest
@@ -0,0 +1 @@
+DIST q2-314-demo-x86.exe 39015499 SHA256 7ace5a43983f10d6bdc9d9b6e17a1032ba6223118d389bd170df89b945a04a1e SHA512 9aa5123807a64a6e3e3b113b582efd353f176f093fd0aae6bd01d9cff397374c06948a7147f59748b3aa6f4251769e409fae838157edb66429c9d41381b3df86 WHIRLPOOL 8924090d8fa357dd0a4b5634336976baf3b4afaf59c12a5bb50298b328b974c697dfd11c56d4034afb36d4c16b151b361271252e029111ee10943630b758d522
diff --git a/games-fps/quake2-demodata/metadata.xml b/games-fps/quake2-demodata/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake2-demodata/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake2-demodata/quake2-demodata-3.14.ebuild b/games-fps/quake2-demodata/quake2-demodata-3.14.ebuild
new file mode 100644
index 00000000000..132919c3efc
--- /dev/null
+++ b/games-fps/quake2-demodata/quake2-demodata-3.14.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit unpacker eutils versionator games
+
+MY_PV=$(delete_all_version_separators)
+MY_PN="quake2"
+FILE="q2-${MY_PV}-demo-x86.exe"
+
+DESCRIPTION="Demo data for Quake 2"
+HOMEPAGE="http://en.wikipedia.org/wiki/Quake_II"
+SRC_URI="mirror://idsoftware/${MY_PN}/${FILE}"
+
+# See license.txt - it's a bit different to Q2EULA in Portage
+LICENSE="quake2-demodata"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ppc sparc x86 ~x86-fbsd"
+IUSE="symlink"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/${MY_PN}
+
+pkg_setup() {
+ games_pkg_setup
+
+ local alert_user
+
+ if ! use symlink ; then
+ ewarn "The 'symlink' USE flag is needed for Quake 2 clients"
+ ewarn "to easily play the demo data."
+ echo
+ alert_user=y
+ fi
+
+ if has_version "games-fps/quake2-data" ; then
+ ewarn "games-fps/quake2-data already includes the demo data,"
+ ewarn "so this installation is not very useful."
+ echo
+ if use symlink ; then
+ eerror "The symlink for the demo data conflicts with the cdinstall data"
+ die "Remove the 'symlink' USE flag for this package"
+ fi
+ alert_user=y
+ fi
+
+ if [[ -n "${alert_user}" ]] ; then
+ ebeep
+ epause
+ fi
+}
+
+src_unpack() {
+ unpack_zip ${A}
+}
+
+src_install() {
+ insinto "${dir}"/demo
+ doins -r Install/Data/baseq2/{pak0.pak,players}
+
+ dodoc Install/Data/DOCS/*.txt
+
+ if use symlink ; then
+ # Make the demo the default, so that people can just run it,
+ # without having to mess with command-line options.
+ cd "${D}/${dir}" && ln -sfn demo baseq2
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "This is just the demo data. To play, install a client"
+ elog "such as games-fps/qudos"
+ echo
+
+ if use symlink ; then
+ elog "baseq2 has been symlinked to demo, for convenience, within:"
+ elog "${dir}"
+ echo
+ fi
+}
diff --git a/games-fps/quake2-icculus/Manifest b/games-fps/quake2-icculus/Manifest
new file mode 100644
index 00000000000..3cc4e0a3f9e
--- /dev/null
+++ b/games-fps/quake2-icculus/Manifest
@@ -0,0 +1,4 @@
+DIST maxpak.pak 3282742 SHA256 653569fe880f1ed5f7529483ac961b22078482e6ff0e83f4d9d1bc503c866770 SHA512 49eef504190323add8bbe6fd007ee51a17dc843898a2199a44a0b214a14da90202070f9eb025503c58b64d6306832bdb6c0d04efe927ea651eb83b0517a59782 WHIRLPOOL 4f372e574d337834661992a6ac17f249c4df42603dd023962644db792f58d3a58f1f328c198d2cf4a666a60cce5c0eb56e0f6c495cef405db8a6d46ba0127980
+DIST quake2-r0.16.1.tar.gz 1525384 SHA256 49f4d3d53772b6ffd7733506f5d121c7893bfd8884133bfc36a28039c0744642 SHA512 63e8fa10446698b1f1cbd20b4bbfeec75d7620cb6454bb90b853cd2a3d6cd9040041a164666a5e015c3a8289423127f9164b500f57793505f6e4671dec932cf2 WHIRLPOOL 017d0c6add0302fa2f74bc4b2603fff36589417ac7fd150429f8e83be846bef53695ac4edaa22ec5a8b38cf2aaf73ea733e1e142d8e8a0cc778826753dc96b14
+DIST roguesrc320.shar.Z 626769 SHA256 ceefb2fd748961cb0bc3244220f3eb09d8f7b8ca2eb32cdf9b284727a2fdc919 SHA512 330db4966b758b8e363eb8d699b30ce5ec7d9fa581936288e7267000d0815996388adebc0206a8903734cdc1c5658616b15518a2bf888ad9e6059f8155960141 WHIRLPOOL 84430a1596179086cc440196974f83e13edff52378c8418d84e46bcd78f5e6856aa1a8b6a9e1a9e5496c1845ca19b3af6be346661580601e6581920529109dbd
+DIST xatrixsrc320.shar.Z 455917 SHA256 94bf596cd85d38ea294b99ccb0ebb5e4b9776cca335001b3803e2d8407395589 SHA512 6723440d3cfdaf7f9b260d5777d9823937a4c3ee800c8c204e8a5c3d29f2b37f6bdc7c0786025a19d040b5692aa54b99b9db2dc121bc0ca2b53c8763b4ab4dfa WHIRLPOOL d5254a11f49ecd0cc341d6b51cc31bd6d43597e0341df09662849e235a07452eef80fc881983ed34bcfd47fca575e8592aa306f53a3b82d1464167b16cee4fed
diff --git a/games-fps/quake2-icculus/files/0.16-rogue-armor.patch b/games-fps/quake2-icculus/files/0.16-rogue-armor.patch
new file mode 100644
index 00000000000..194f965a050
--- /dev/null
+++ b/games-fps/quake2-icculus/files/0.16-rogue-armor.patch
@@ -0,0 +1,12 @@
+--- src/rogue/g_local.h.orig
++++ src/rogue/g_local.h
+@@ -545,9 +545,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+
+
+ // means of death
diff --git a/games-fps/quake2-icculus/files/0.16-rogue-nan.patch b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch
new file mode 100644
index 00000000000..0961fa68a98
--- /dev/null
+++ b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch
@@ -0,0 +1,7 @@
+--- src/rogue/g_local.h.orig
++++ src/rogue/g_local.h
+@@ -24,3 +24,3 @@
+ #ifndef _WIN32
+-#include <nan.h>
++#include <bits/nan.h>
+ #define min(a,b) ((a) < (b) ? (a) : (b))
diff --git a/games-fps/quake2-icculus/files/README-postinstall b/games-fps/quake2-icculus/files/README-postinstall
new file mode 100644
index 00000000000..3e2245f3bb0
--- /dev/null
+++ b/games-fps/quake2-icculus/files/README-postinstall
@@ -0,0 +1,79 @@
+This was taken from the README file in the source distribution
+and cleaned up a bit. Read all of this, or at least skim it. Please?
+
+Note:
+1. If you install a new compile of quake2, you'll lose your savegames. I'm
+sorry. Don't upgrade in the middle of a single-player game.
+
+===============================================================================
+
+To emerge the Quake2 data:
+--------------------------
+1. emerge quake2-data
+
+That was easy huh ? :) Note: this requires the Quake2 CD and/or the data files
+from an installed copy of the game (like for windows).
+
+===============================================================================
+
+To install the Quake2 demo data:
+--------------------------------
+1. download ftp://ftp.idsoftware.com/idstuff/quake2/q2-314-demo-x86.exe
+2. unzip -L q2-314-demo-x86.exe into a temp directory
+3. cp baseq2/pak0.pak to /usr/share/games/quake2-data/baseq2/pak0.pak
+
+===============================================================================
+
+To install the Quake2 gamedata from game CD:
+--------------------------------------------
+(assuming the cdrom is mounted at /cdrom)
+
+1. cp /cdrom/Install/Data/baseq2/pak0.pak /usr/share/games/quake2-data/baseq2/
+
+2. cp /cdrom/Install/Data/baseq2/video/ /usr/share/games/quake2-data/baseq2/
+ (optional)
+
+3. Download ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full.exe
+ and extract the contents to a temporary directory (use unzip -L, as this
+ is a standard zip file).
+
+4. cp <temp directory>/baseq2/pak1.pak /usr/share/games/quake2-data/baseq2/
+5. cp <temp directory>/baseq2/pak2.pak /usr/share/games/quake2-data/baseq2/
+6. cp <temp directory>/baseq2/players/ /usr/share/games/quake2-data/baseq2/
+
+7. if you really want to use the crakhor model, you can find the
+ skins/sounds on websites like http://www.mike-d.com/games/modskins.html
+ (optional)
+
+===============================================================================
+
+Capture The Flag:
+-----------
+To run Capture The Flag, you need to do the following:
+
+1. Download ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe
+2. unzip that file (using unzip -L) into a temp directory
+3. cp <temp directory>/ctf /usr/share/games/quake2-data/
+
+Execute quake2 with:
+
+quake2 +set game ctf +set dedicated 1
+ -- or --
+q2ded +set game ctf
+===============================================================================
+
+Joystick Support:
+-----------------
+Joystick should function on all compatible SDL platforms using the sdlquake2
+binary as well as on linux using the linux kernel joystick API.
+
+Joystick obeys the same free-look/strafe rules as mouse. You can set these in
+the options menu.
+
+There are four command line settings for joystick:
+1. j_invert_y [1],0 if set to zero pulling back on the joystick points down
+2. j_lr_axis [0] set the axis which controls left right movement
+3. j_ud_axis [1] set the axis which controls up down (in free-look) or
+ forward back (freelock off)
+4. j_throttle [3] set the axis which controls the players forward backward
+ throttle (if free-look is true)
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch
new file mode 100644
index 00000000000..185359373c4
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch
@@ -0,0 +1,172 @@
+--- src/linux/snd_alsa.c.old
++++ src/linux/snd_alsa.c
+@@ -22,13 +22,22 @@
+ $Id: quake2-icculus-0.16.1-alsa.patch,v 1.2 2015/03/27 06:40:34 mr_bones_ Exp $
+ */
+
+-#define BUFFER_SIZE 4096
++// quake2-r0.16.1/src/linux/snd_alsa.c 2010-08-29 09:58:50
++// Alsa Redux Patch
++#define BUFFER_SIZE 16384
+
+ #include <alsa/asoundlib.h>
+
+ #include "../client/client.h"
+ #include "../client/snd_loc.h"
+
++#define AFSize 4
++static int snd_inited=0;
++static snd_pcm_t *playback_handle;
++static int AlsaFrames;
++static int AlsaPos;
++
++/*
+ #define snd_buf BUFFER_SIZE
+
+ static int snd_inited;
+@@ -43,17 +52,58 @@
+ cvar_t *snddevice;
+
+ static int tryrates[] = { 44100, 22051, 11025, 8000 };
+-
++*/
+ qboolean SNDDMA_Init (void)
+ {
+- int i;
+- int err;
+- int buffersize;
+- int framesize;
+- int format;
++ int confirm;
++ int latency;
++ Com_Printf("Setting up ALSA driver .....\n");
+
+ if (snd_inited) { return 1; }
+-
++ int s_khz=(Cvar_Get("s_khz", "22", CVAR_ARCHIVE))->value;
++ if (s_khz <22 ){
++ Com_Printf("Low Performance 11KHz.\n");
++ Cvar_Set("s_mixahead","0.2");
++ dma.speed=11025;
++ AlsaFrames=2048;
++ latency=200000;
++ }else{
++ Com_Printf("High Quality 48KHz.\n");
++ Cvar_Set("s_mixahead","0.1");
++ dma.speed=48000;
++ AlsaFrames=4800;
++ latency=110000;}
++
++ dma.channels = 2;
++ dma.samplebits = 16;
++ AlsaPos = 0;
++ playback_handle = NULL;
++ confirm =
++snd_pcm_open(&playback_handle,"default",SND_PCM_STREAM_PLAYBACK,SND_PCM_NONBLOCK);
++ if (confirm < 0) {
++ Com_Printf("ALSA sound error: cannot open device \n");
++ return 0;}
++ confirm = snd_pcm_set_params(playback_handle,
++ SND_PCM_FORMAT_S16_LE,
++ SND_PCM_ACCESS_RW_INTERLEAVED,
++ dma.channels,
++ dma.speed,
++ 1,//soft resample
++ latency);
++ if (confirm < 0){
++ Com_Printf("Alsa error: %s\n", snd_strerror(confirm));
++ return 0;}
++ confirm = snd_pcm_prepare(playback_handle);
++ if (confirm < 0) {
++ Com_Printf("...failed.\n");
++ return 0;}
++
++ int rambuffer = (BUFFER_SIZE+AlsaFrames)*AFSize;
++ dma.buffer=malloc(rambuffer);
++ dma.samplepos = 0;
++ dma.samples = BUFFER_SIZE*dma.channels;
++ dma.submission_chunk = 16;
++ /*
+ sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
+ sndspeed = Cvar_Get("sndspeed", "0", CVAR_ARCHIVE);
+ sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE);
+@@ -159,7 +209,6 @@
+ return 0;
+ }
+
+- /*
+ buffer_size = snd_pcm_hw_params_get_buffer_size(hw_params);
+ frame_size = (snd_pcm_format_physical_width(format)*dma.channels)/8;
+
+@@ -172,7 +221,6 @@
+ }
+
+ snd_buf = buffer_size*frame_size;
+- */
+
+ //snd_buf = BUFFER_SIZE;
+
+@@ -183,7 +231,7 @@
+ dma.samples = snd_buf / (dma.samplebits/8);
+ dma.submission_chunk = 1;
+ dma.buffer = (char *)buffer;
+-
++ */
+ snd_inited = 1;
+ return 1;
+ }
+@@ -191,11 +239,25 @@
+ int
+ SNDDMA_GetDMAPos (void)
+ {
+- if(snd_inited)
+- return dma.samplepos;
+- else
+- Com_Printf ("Sound not inizialized\n");
+- return 0;
++ int timerpos;
++ int send;
++ int taken;
++ timerpos = snd_pcm_avail(playback_handle);
++ if (timerpos<0){// likely buffer underrun.
++ timerpos = snd_pcm_prepare(playback_handle);
++ timerpos=0;}
++
++ send=AlsaFrames-timerpos;
++ if ( (send+AlsaPos)>BUFFER_SIZE )
++ { memcpy (dma.buffer+BUFFER_SIZE*AFSize,
++ dma.buffer,AlsaFrames*AFSize);}
++ taken = snd_pcm_writei(playback_handle, dma.buffer+AlsaPos*AFSize, send);
++ if (taken<0) {taken=0;}
++
++ AlsaPos+=taken;
++ if (BUFFER_SIZE<=AlsaPos){AlsaPos -= BUFFER_SIZE;}
++ return AlsaPos*dma.channels;
++
+ }
+
+ void
+@@ -205,8 +267,8 @@
+ snd_pcm_drop(playback_handle);
+ snd_pcm_close(playback_handle);
+ snd_inited = 0;
++ free(dma.buffer);
+ }
+- free(dma.buffer);
+ dma.buffer = NULL;
+ }
+
+@@ -217,13 +279,6 @@
+ void
+ SNDDMA_Submit (void)
+ {
+- int written;
+-
+- if ((written = snd_pcm_writei(playback_handle, dma.buffer, snd_buf)) < 0) {
+- snd_pcm_prepare(playback_handle);
+- Com_Printf("alsa: buffer underrun\n");
+- }
+- dma.samplepos += written/(dma.samplebits/8);
+ }
+
+
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch
new file mode 100644
index 00000000000..b3291827996
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch
@@ -0,0 +1,18 @@
+The default video renderers (softx / soft) currently do not work
+on amd64. So for now we add a little hack which will select the
+glx renderer by default.
+
+http://bugs.gentoo.org/show_bug.cgi?id=86552
+
+--- src/linux/vid_so.c
++++ src/linux/vid_so.c
+@@ -435,6 +440,9 @@ VID_Init
+ */
+ void VID_Init (void)
+ {
++#if defined __x86_64__
++ vid_ref = Cvar_Get ("vid_ref", "glx", CVAR_ARCHIVE);
++#endif
+ /* Create the video variables so we know how to start the graphics drivers */
+ // if DISPLAY is defined, try X
+ if (getenv("DISPLAY"))
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch
new file mode 100644
index 00000000000..626cf5a1b64
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch
@@ -0,0 +1,14 @@
+--- src/xatrix/g_local.h.old
++++ src/xatrix/g_local.h
+@@ -446,11 +446,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+-
+-
+ // means of death
+ #define MOD_UNKNOWN 0
+ #define MOD_BLASTER 1
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
new file mode 100644
index 00000000000..61f0bb2286e
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
@@ -0,0 +1,213 @@
+--- Makefile
++++ Makefile
+@@ -74,35 +74,46 @@ endif
+
+ CC=gcc
+
++ifndef OPT_CFLAGS
+ ifeq ($(ARCH),axp)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
++OPT_CFLAGS=-ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),ppc)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),sparc)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
++OPT_CFLAGS=-ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),i386)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -falign-loops=2 \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops -falign-loops=2 \
+ -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
+ # compiler bugs with gcc 2.96 and 3.0.1 can cause bad builds with heavy opts.
+-#RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -m486 -ffast-math -funroll-loops \
++#OPT_CFLAGS=-O6 -m486 -ffast-math -funroll-loops \
+ # -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ # -malign-jumps=2 -malign-functions=2
+ endif
+
+ ifeq ($(ARCH),x86_64)
+ _LIB := 64
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing
+ endif
++endif
++RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPT_CFLAGS)
++
++ifeq ($(ADDCFLAGS),debug)
++CFLAGS=$(DEBUG_CFLAGS) -DLINUX_VERSION=\"$(VERSION) Debug\"
++endif
++
++ifeq ($(ADDCFLAGS),release)
++CFLAGS=$(RELEASE_CFLAGS) -DLINUX_VERSION=\"$(VERSION)\"
++endif
+
+ VERSION=3.21+r0.16
+
+@@ -133,6 +136,13 @@ else
+ NET_UDP=net_udp
+ endif
+
++ifdef DEFAULT_BASEDIR
++BASE_CFLAGS += -DDEFAULT_BASEDIR=\"$(DEFAULT_BASEDIR)\"
++endif
++ifdef DEFAULT_LIBDIR
++BASE_CFLAGS += -DDEFAULT_LIBDIR=\"$(DEFAULT_LIBDIR)\"
++endif
++
+ ifeq ($(strip $(BUILD_QMAX)),YES)
+ BASE_CFLAGS+=-DQMAX
+ endif
+@@ -406,7 +424,7 @@
+ $(BUILD_DEBUG_DIR)/ctf \
+ $(BUILD_DEBUG_DIR)/xatrix \
+ $(BUILD_DEBUG_DIR)/rogue
+- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS) -DLINUX_VERSION='\"$(VERSION) Debug\"'"
++ $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) ADDCFLAGS=debug
+
+ build_release:
+ @-mkdir -p $(BUILD_RELEASE_DIR) \
+@@ -418,7 +436,7 @@
+ $(BUILD_RELEASE_DIR)/ctf \
+ $(BUILD_RELEASE_DIR)/xatrix \
+ $(BUILD_RELEASE_DIR)/rogue
+- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS) -DLINUX_VERSION='\"$(VERSION)\"'"
++ $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) ADDCFLAGS=release
+
+ targets: $(TARGETS)
+
+--- src/linux/qgl_linux.c
++++ src/linux/qgl_linux.c
+@@ -3006,13 +3006,17 @@ qboolean QGL_Init( const char *dllname )
+ // dllname, dlerror());
+
+ // try basedir next
+- path = ri.Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = ri.Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
+
+ snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
+
+ if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
+- ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
+- return false;
++ path = ri.Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
++ if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
++ ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
++ return false;
++ }
+ }
+ Com_Printf ("Using %s for OpenGL...", fn);
+ } else {
+--- src/linux/vid_so.c
++++ src/linux/vid_so.c
+@@ -237,13 +237,17 @@ qboolean VID_LoadRefresh( char *name )
+ //regain root
+ seteuid(saved_euid);
+
+- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
+
+ snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
+
+ if (stat(fn, &st) == -1) {
+- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
+- return false;
++ path = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
++ if (stat(fn, &st) == -1) {
++ Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
++ return false;
++ }
+ }
+
+ // permission checking
+@@ -493,13 +497,19 @@ qboolean VID_CheckRefExists (const char
+ char *path;
+ struct stat st;
+
+- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
+ snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref );
+
+ if (stat(fn, &st) == 0)
+ return true;
+- else
+- return false;
++ else {
++ path = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref );
++ if (stat(fn, &st) == 0)
++ return true;
++ else
++ return false;
++ }
+ }
+
+ /*****************************************************************************/
+--- src/qcommon/files.c
++++ src/qcommon/files.c
+@@ -60,6 +60,7 @@ typedef struct pack_s
+
+ char fs_gamedir[MAX_OSPATH];
+ cvar_t *fs_basedir;
++cvar_t *fs_libdir;
+ cvar_t *fs_cddir;
+ cvar_t *fs_gamedirvar;
+
+@@ -681,6 +682,7 @@ void FS_SetGamedir (char *dir)
+ if (fs_cddir->string[0])
+ FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
+ FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) );
++ FS_AddGameDirectory (va("%s/%s", fs_libdir->string, dir) );
+ FS_AddHomeAsGameDirectory(dir);
+ }
+ }
+@@ -898,7 +900,13 @@ void FS_InitFilesystem (void)
+ // basedir <path>
+ // allows the game to run from outside the data tree
+ //
+- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
++ fs_basedir = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET);
++
++ //
++ // libdir <path>
++ // allows the game to store binary files (not data) in a sep tree
++ //
++ fs_libdir = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET);
+
+ //
+ // cddir <path>
+@@ -913,6 +921,7 @@ void FS_InitFilesystem (void)
+ // add baseq2 to search path
+ //
+ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_libdir->string) );
+
+ //
+ // then add a '.quake2/baseq2' directory in home directory by default
+--- src/qcommon/qcommon.h
++++ src/qcommon/qcommon.h
+@@ -74,6 +74,13 @@ Foundation, Inc., 59 Temple Place - Suit
+
+ #endif
+
++#ifndef DEFAULT_BASEDIR
++# define DEFAULT_BASEDIR "."
++#endif
++#ifndef DEFAULT_LIBDIR
++# define DEFAULT_LIBDIR DEFAULT_BASEDIR
++#endif
++
+ //============================================================================
+
+ typedef struct sizebuf_s
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch
new file mode 100644
index 00000000000..ad1f37309c3
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch
@@ -0,0 +1,12 @@
+--- quake2-r0.16.1/src/linux/q_shlinux.c
++++ quake2-r0.16.1-modified/src/linux/q_shlinux.c
+@@ -17,6 +17,9 @@
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ */
++#if !defined(_GNU_SOURCE)
++ #define _GNU_SOURCE
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch
new file mode 100644
index 00000000000..ae1aa2e4068
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch
@@ -0,0 +1,97 @@
+--- quake2-r0.16.1.orig/Makefile
++++ quake2-r0.16.1/Makefile
+@@ -54,24 +54,26 @@ endif
+
+
+ # this nice line comes from the linux kernel makefile
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
+
+ ifneq ($(ARCH),x86_64)
+ ifneq ($(ARCH),i386)
+ ifneq ($(ARCH),axp)
++ifneq ($(ARCH),ia64)
+ ifneq ($(ARCH),ppc)
+ ifneq ($(ARCH),sparc)
+ $(error arch $(ARCH) is currently not supported)
+ endif
+ endif
+ endif
+ endif
+ endif
++endif
+
+ CC=gcc
+
+ ifndef OPT_CFLAGS
+ ifeq ($(ARCH),axp)
+ OPT_CFLAGS=-ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+@@ -283,16 +285,46 @@ ifeq ($(ARCH),axp)
+ $(warning Warning: SDL support not supported for $(ARCH))
+ endif
+
+ ifeq ($(strip $(BUILD_SDLGL)),YES)
+ $(warning Warning: SDLGL support not supported for $(ARCH))
+ endif
+ endif # ARCH axp
+
++ifeq ($(ARCH),ia64)
++ ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
++ TARGETS += $(BUILDDIR)/sdlquake2
++ endif
++
++ ifeq ($(strip $(BUILD_SVGA)),YES)
++ TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_X11)),YES)
++ TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_GLX)),YES)
++ TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_FXGL)),YES)
++ TARGETS += $(BUILDDIR)/ref_gl.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_SDL)),YES)
++ TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_SDLGL)),YES)
++ TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
++ endif
++endif # ARCH ia64
++
+ ifeq ($(ARCH),ppc)
+ ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
+ TARGETS += $(BUILDDIR)/sdlquake2
+ endif
+
+ ifeq ($(strip $(BUILD_SVGA)),YES)
+ $(warning Warning: SVGAlib support not supported for $(ARCH))
+ endif
+--- quake2-r0.16.1.orig/src/linux/sys_linux.c
++++ quake2-r0.16.1/src/linux/sys_linux.c
+@@ -216,16 +216,18 @@ void *Sys_GetGameAPI (void *parms)
+ char *path;
+ char *str_p;
+ #if defined __i386__
+ const char *gamename = "gamei386.so";
+ #elif defined __x86_64__
+ const char *gamename = "gamex86_64.so";
+ #elif defined __alpha__
+ const char *gamename = "gameaxp.so";
++#elif defined __ia64__
++ const char *gamename = "gameia64.so";
+ #elif defined __powerpc__
+ const char *gamename = "gameppc.so";
+ #elif defined __sparc__
+ const char *gamename = "gamesparc.so";
+ #else
+ #error Unknown arch
+ #endif
+
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch
new file mode 100644
index 00000000000..978c9c9820e
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch
@@ -0,0 +1,56 @@
+--- Makefile.old
++++ Makefile
+@@ -169,18 +169,18 @@
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+
+ ifeq ($(OSTYPE),FreeBSD)
+-LDFLAGS=-lm
++LDLIBS=-lm
+ endif
+ ifeq ($(OSTYPE),Linux)
+-LDFLAGS=-lm -ldl
++LDLIBS=-lm -ldl
+ endif
+
+ ifeq ($(strip $(BUILD_ARTS)),YES)
+-LDFLAGS+=$(shell artsc-config --libs)
++LDLIBS+=$(shell artsc-config --libs)
+ endif
+
+ ifeq ($(strip $(BUILD_ALSA)),YES)
+-LDFLAGS+=-lasound
++LDLIBS+=-lasound
+ endif
+
+
+@@ -226,7 +226,7 @@
+ SHLIBEXT=so
+
+ SHLIBCFLAGS=-fPIC
+-SHLIBLDFLAGS=-shared
++SHLIBLDFLAGS=$(LDFLAGS) -shared
+
+ DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
+ DO_DED_CC=$(CC) $(CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
+@@ -518,10 +518,10 @@
+ endif
+
+ $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/sdlquake2 : $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS) $(SDLLDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS) $(LDLIBS) $(SDLLDFLAGS)
+
+ $(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
+ $(DO_CC)
+@@ -710,7 +710,7 @@
+ $(BUILDDIR)/ded/cd_null.o
+
+ $(BUILDDIR)/q2ded : $(Q2DED_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(Q2DED_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
+ $(DO_DED_CC)
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch
new file mode 100644
index 00000000000..d94925b83e4
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/193107
+
+asm/io.h does not exist with sanitized kernel headers, nor do these source
+files actually need the header, so punt it
+
+--- src/linux/rw_in_aa.c
++++ src/linux/rw_in_aa.c
+@@ -46,7 +46,6 @@
+ #include <sys/mman.h>
+
+ #if defined (__linux__)
+-#include <asm/io.h>
+ #include <sys/vt.h>
+ #endif
+
+--- src/linux/rw_aa.c
++++ src/linux/rw_aa.c
+@@ -63,7 +63,6 @@
+ #include <dlfcn.h>
+ #if defined (__linux__)
+ #include <sys/vt.h>
+-#include <asm/io.h>
+ #endif
+ #include <aalib.h>
+
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch
new file mode 100644
index 00000000000..6dc6f0f1ddf
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch
@@ -0,0 +1,13 @@
+--- src/linux/rw_x11.c.old
++++ src/linux/rw_x11.c
+@@ -989,8 +989,8 @@
+ }
+ else
+ {
+- mx -= ((int)event.xmotion.x + mwx)*2;
+- my -= ((int)event.xmotion.y + mwy)*2;
++ mx += ((int)event.xmotion.x - mwx)*2;
++ my += ((int)event.xmotion.y - mwy)*2;
+ mwx = event.xmotion.x;
+ mwy = event.xmotion.y;
+
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch
new file mode 100644
index 00000000000..e23caf9db09
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch
@@ -0,0 +1,45 @@
+
+the x11 software renderer just needs some tweaks to get working
+
+--- Makefile.old
++++ Makefile
+@@ -358,7 +358,7 @@
+ endif
+
+ ifeq ($(strip $(BUILD_X11)),YES)
+- $(warning Warning: Software X Renderer not supported for $(ARCH))
++ TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
+ endif
+
+ ifeq ($(strip $(BUILD_GLX)),YES)
+--- src/linux/rw_x11.c.old
++++ src/linux/rw_x11.c
+@@ -53,7 +53,7 @@
+ #include <X11/Xatom.h>
+ #include <X11/keysym.h>
+ #include <X11/extensions/XShm.h>
+-#include <X11/extensions/xf86dga.h>
++#include <X11/extensions/Xxf86dga.h>
+ #ifdef OPENGL
+ #include <X11/extensions/xf86vmode.h>
+ #endif
+@@ -151,7 +151,7 @@
+ int config_notify_height;
+
+ typedef unsigned short PIXEL16;
+-typedef unsigned long PIXEL24;
++typedef unsigned int PIXEL24;
+ #ifdef REDBLUE
+ static PIXEL16 st2d_8to16table_s[2][256];
+ static PIXEL24 st2d_8to24table_s[2][256];
+--- src/ref_soft/r_poly.c.old
++++ src/ref_soft/r_poly.c
+@@ -994,7 +994,7 @@
+ scale = yscale * pout->zi;
+ pout->v = (ycenter - scale * transformed[1]);
+
+- pv += sizeof (vec5_t) / sizeof (pv);
++ pv += sizeof (vec5_t) / sizeof (float);
+ }
+
+ // draw it
diff --git a/games-fps/quake2-icculus/files/quake2.xpm b/games-fps/quake2-icculus/files/quake2.xpm
new file mode 100644
index 00000000000..bbbcbb8f064
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2.xpm
@@ -0,0 +1,37 @@
+/* XPM */
+static char * quake2_xpm[] = {
+"32 32 2 1",
+" c None",
+". c #000000",
+" ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" ... ... ",
+" ... ........ ... ",
+" ... ...... ... ",
+" .... .. .. .... ",
+" .... .. .. .... ",
+" ........ ........ ",
+" ................ ",
+" .............. ",
+" .......... ",
+" ...... ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. "};
diff --git a/games-fps/quake2-icculus/metadata.xml b/games-fps/quake2-icculus/metadata.xml
new file mode 100644
index 00000000000..8b23c32d0e2
--- /dev/null
+++ b/games-fps/quake2-icculus/metadata.xml
@@ -0,0 +1,11 @@
+<?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 the demo files (quake2-demodata) and configure for use</flag>
+ <flag name="qmax">Build the pretty version (quake max)</flag>
+ <flag name="rogue">Build support for the 'Ground Zero' Mission Pack (rogue)</flag>
+ <flag name="xatrix">Build support for the 'The Reckoning' Mission Pack (xatrix)</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
new file mode 100644
index 00000000000..bd485260f4c
--- /dev/null
+++ b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+MY_P="quake2-r${PV}"
+DESCRIPTION="The icculus.org Linux port of iD's Quake 2 engine"
+HOMEPAGE="http://icculus.org/quake2/"
+SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
+ qmax? ( http://icculus.org/quake2/files/maxpak.pak )
+ rogue? ( mirror://idsoftware/quake2/source/roguesrc320.shar.Z )
+ xatrix? ( mirror://idsoftware/quake2/source/xatrixsrc320.shar.Z )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ppc sparc x86 ~x86-fbsd"
+IUSE="aalib alsa cdinstall dedicated demo ipv6 joystick opengl qmax rogue sdl X xatrix"
+
+UIDEPEND="aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl[sound,joystick?,video] )
+ X? (
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ )"
+RDEPEND="${UIDEPEND}
+ cdinstall? ( games-fps/quake2-data )
+ demo? ( games-fps/quake2-demodata )"
+DEPEND="${UIDEPEND}
+ X? ( x11-proto/xf86dgaproto )
+ rogue? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) )
+ xatrix? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ games_pkg_setup
+
+ if ! use qmax && $( use opengl || use sdl ) ; then
+ elog "The 'qmax' graphical improvements are recommended."
+ echo
+ fi
+}
+
+src_prepare() {
+ # Now we deal with the silly rogue / xatrix addons ... this is ugly :/
+ ln -s $(type -P echo) "${T}"/more
+ for g in rogue xatrix ; do
+ use ${g} || continue
+ mkdir -p src/${g}
+ pushd src/${g}
+ local shar=../../../${g}src320.shar
+ sed -i -e 's:^read ans:ans=yes :' ${shar} || die
+ echo ">>> Unpacking ${shar} to ${PWD}"
+ env PATH="${T}:${PATH}" unshar ${shar} || die
+ popd
+ done
+ sed -i -e 's:jpeg_mem_src:_&:' src/ref_candygl/gl_image.c || die
+
+ sed -i -e 's:BUILD_SOFTX:BUILD_X11:' Makefile || die
+ # -amd64.patch # make sure this is still needed in future versions
+ epatch \
+ "${FILESDIR}"/${P}-amd64.patch \
+ "${FILESDIR}"/${P}-gentoo-paths.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-no-asm-io.patch \
+ "${FILESDIR}"/${P}-gnusource.patch \
+ "${FILESDIR}"/${P}-x11_soft.patch \
+ "${FILESDIR}"/${P}-x11_mouse.patch \
+ "${FILESDIR}"/${P}-alsa.patch \
+ "${FILESDIR}"/${P}-ia64.patch
+
+ if use xatrix ; then
+ epatch "${FILESDIR}/${P}"-gcc41.patch
+ fi
+ if use rogue ; then
+ cd src
+ epatch \
+ "${FILESDIR}"/0.16-rogue-nan.patch \
+ "${FILESDIR}"/0.16-rogue-armor.patch
+ fi
+}
+
+yesno() {
+ for f in "$@" ; do
+ if ! use $f ; then
+ echo NO
+ return 1
+ fi
+ done
+ echo YES
+ return 0
+}
+
+src_compile() {
+ # xatrix fails to build
+ # rogue fails to build
+ local libsuffix
+ for BUILD_QMAX in YES NO ; do
+ ! use qmax && [[ ${BUILD_QMAX} == "YES" ]] && continue
+ [[ ${BUILD_QMAX} == "YES" ]] \
+ && libsuffix=-qmax \
+ || libsuffix=
+ emake -j1 clean
+ emake -j1 build_release \
+ BUILD_SDLQUAKE2=$(yesno sdl) \
+ BUILD_SVGA=NO \
+ BUILD_X11=$(yesno X) \
+ BUILD_GLX=$(yesno opengl) \
+ BUILD_SDL=$(yesno sdl) \
+ BUILD_SDLGL=$(yesno sdl opengl) \
+ BUILD_CTFDLL=YES \
+ BUILD_XATRIX=$(yesno xatrix) \
+ BUILD_ROGUE=$(yesno rogue) \
+ BUILD_JOYSTICK=$(yesno joystick) \
+ BUILD_DEDICATED=$(yesno dedicated) \
+ BUILD_AA=$(yesno aalib) \
+ BUILD_QMAX=${BUILD_QMAX} \
+ HAVE_IPV6=$(yesno ipv6) \
+ BUILD_ARTS=NO \
+ BUILD_ALSA=$(yesno alsa) \
+ SDLDIR=/usr/lib \
+ DEFAULT_BASEDIR="${GAMES_DATADIR}/quake2" \
+ DEFAULT_LIBDIR="$(games_get_libdir)/${PN}${libsuffix}" \
+ OPT_CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+ # now we save the build dir ... except for the object files ...
+ rm release*/*/*.o
+ mv release* my-rel-${BUILD_QMAX}
+ cd my-rel-${BUILD_QMAX}
+ rm -rf ref_{gl,soft} ded game client ctf/*.o
+ mkdir baseq2
+ mv game*.so baseq2/
+ cd ..
+ done
+}
+
+src_install() {
+ local q2dir=$(games_get_libdir)/${PN}
+ local q2maxdir=$(games_get_libdir)/${PN}-qmax
+
+ dodoc readme.txt README TODO "${FILESDIR}"/README-postinstall
+
+ # regular q2 files
+ dodir "${q2dir}"
+ cp -rf my-rel-NO/* "${D}/${q2dir}"/
+ dogamesbin "${D}/${q2dir}"/quake2
+ rm "${D}/${q2dir}"/quake2
+ use dedicated \
+ && dogamesbin "${D}/${q2dir}"/q2ded \
+ && rm "${D}/${q2dir}"/q2ded
+ use sdl \
+ && dogamesbin "${D}/${q2dir}"/sdlquake2 \
+ && rm "${D}/${q2dir}"/sdlquake2
+
+ doicon "${FILESDIR}"/quake2.xpm
+ make_desktop_entry quake2 "Quake 2" quake2
+
+ # q2max files
+ if use qmax ; then
+ dodir "${q2maxdir}"
+ cp -rf my-rel-YES/* "${D}/${q2maxdir}"/ || die
+ newgamesbin "${D}/${q2maxdir}"/quake2 quake2-qmax
+ rm "${D}/${q2maxdir}"/quake2
+ use dedicated \
+ && newgamesbin "${D}/${q2maxdir}"/q2ded q2ded-qmax \
+ && rm "${D}/${q2maxdir}"/q2ded
+ use sdl \
+ && newgamesbin "${D}/${q2maxdir}"/sdlquake2 sdlquake2-qmax \
+ && rm "${D}/${q2maxdir}"/sdlquake2
+
+ insinto "${q2maxdir}"/baseq2
+ doins "${DISTDIR}"/maxpak.pak
+
+ make_desktop_entry quake2-qmax Quake2-qmax quake2
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "Go read README-postinstall in /usr/share/doc/${PF}"
+ elog "right now! It's important - This install is just the engine, you still need"
+ elog "the data paks. Go read."
+
+ if use demo && ! has_version "games-fps/quake2-demodata[symlink]" ; then
+ ewarn "To play the Quake 2 demo,"
+ ewarn "emerge games-fps/quake2-demodata with the 'symlink' USE flag."
+ echo
+ fi
+}
diff --git a/games-fps/quake2-textures/Manifest b/games-fps/quake2-textures/Manifest
new file mode 100644
index 00000000000..1982178f59a
--- /dev/null
+++ b/games-fps/quake2-textures/Manifest
@@ -0,0 +1 @@
+DIST pak8.zip 15099933 SHA256 2d1e3d11c26ec14e49b7334be66f205c7554aaa3309c0702c11d54ec0e0cd437 SHA512 2d51e3e97796e1ad86894767374bb335f5da59852aacc2dead622c4e51f4b73258c5a852561afbc6c6df54149424e96b3d433179864f7d52af81d9445ada8337 WHIRLPOOL 9ff47babab3570ee286b7f86540e9e24042c6ef4cc006af0dc271e3789cefd580f049dcf7e784c151ee7a92540b116600baa1cb7fb06ed7f53777881a63d9b2b
diff --git a/games-fps/quake2-textures/metadata.xml b/games-fps/quake2-textures/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake2-textures/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake2-textures/quake2-textures-0_beta8.ebuild b/games-fps/quake2-textures/quake2-textures-0_beta8.ebuild
new file mode 100644
index 00000000000..565e3d1747c
--- /dev/null
+++ b/games-fps/quake2-textures/quake2-textures-0_beta8.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+inherit eutils versionator games
+
+MY_PV=$(get_version_component_range 2-2)
+MY_PV=${MY_PV/beta/}
+
+DESCRIPTION="High-resolution textures for Quake 2"
+HOMEPAGE="http://jdolan.tastyspleen.net/"
+SRC_URI="http://jdolan.tastyspleen.net/pak${MY_PV}.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/quake2
+
+src_install() {
+ insinto "${dir}"/baseq2
+ doins *.pak
+
+ dodoc README
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "Use a recent Quake 2 client to take advantage of"
+ elog "these textures, e.g. qudos or quake2-icculus."
+ echo
+}
diff --git a/games-fps/quake3-alliance/Manifest b/games-fps/quake3-alliance/Manifest
new file mode 100644
index 00000000000..0604f99c880
--- /dev/null
+++ b/games-fps/quake3-alliance/Manifest
@@ -0,0 +1,2 @@
+DIST alliance30-33.zip 1995207 RMD160 7835e83a6fb114d7200f26c17f39b6d082d67c4d SHA1 308c2e3185149005bafd09ce85496a67cd20d960 SHA256 0040a15623226325f561a5dae0b41c18dc65bc7bddad208a30ee7bb5ba848f87
+DIST alliance30.zip 60476973 RMD160 69057a6643b77e38c50ad96e599e7556a61d2082 SHA1 54e57afa73fe5511cc847238a1e3bce051d63113 SHA256 a4ae3923883312e6ded35fa32a5e1e44510ee8897aacf7f4bb1ea41c90b21e60
diff --git a/games-fps/quake3-alliance/metadata.xml b/games-fps/quake3-alliance/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-alliance/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild b/games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild
new file mode 100644
index 00000000000..897e5cd1fb2
--- /dev/null
+++ b/games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="fast paced, off-handed grapple mod"
+MOD_NAME="Alliance"
+MOD_DIR="alliance"
+
+inherit games games-mods
+
+SRC_URI="mirror://quakeunity/modifications/alliance/alliance30.zip
+ http://www.superkeff.net/mods/mods/alliance/alliance30.zip
+ mirror://quakeunity/modifications/alliance/alliance30-33.zip
+ http://www.superkeff.net/mods/mods/alliance/alliance30-33.zip"
+HOMEPAGE="http://www.planetquake.com/alliance/"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack alliance30.zip alliance30-33.zip
+}
+
+src_prepare() {
+ rm -f *.exe
+}
diff --git a/games-fps/quake3-alternatefire/Manifest b/games-fps/quake3-alternatefire/Manifest
new file mode 100644
index 00000000000..ccc1bf5a30e
--- /dev/null
+++ b/games-fps/quake3-alternatefire/Manifest
@@ -0,0 +1 @@
+DIST alternatefire-2.0.zip 2015159 RMD160 da16c05c5200ea0ccc49b839a27a26c9dcee6391 SHA1 8178f5aebf746512e87d1356bb947c077dcdd9b0 SHA256 8964bc680b713753b103d54211af46895990d6d10243102a2a13b01eaa678cbe
diff --git a/games-fps/quake3-alternatefire/files/server.cfg b/games-fps/quake3-alternatefire/files/server.cfg
new file mode 100644
index 00000000000..0ee5c8a202e
--- /dev/null
+++ b/games-fps/quake3-alternatefire/files/server.cfg
@@ -0,0 +1,109 @@
+// Sample .cfg file for the Alternate Fire mod
+// ==================================================================
+
+// It's set up for CTF, since that's my favorite game type :)
+// (besides, the lightning web is just awesome in CTF).
+
+// ---- General setup ----
+
+seta sv_pure 1
+seta sv_hostname "Gentoo - Alternate Fire"
+seta sv_maxclients 10
+seta sv_floodprotect 0
+seta g_motd "Welcome to AlternateFire"
+seta g_allowVote 1
+
+// Kick 'em after 3 minutes if they go inactive
+seta g_inactivity 180
+
+// Yes, they do need the z-alternatefire-0xx.pk3
+// Make sure it's in the right place ("alternatefire", not "baseq3")
+// (If you're running this on Linux, put it in ~/.q3a/alternatefire
+// or it won't upload)
+seta sv_allowDownload 1
+// Also, make sure you remove the old .pk3 when you upgrade!
+
+// ---- Bots ----
+
+seta bot_enable 1
+// This is per-team in team games
+seta bot_minplayers 4
+
+// ---- Game parameters ----
+
+// 0 - Free For All, 1 - Tournament,
+// 3 - Team Deathmatch, 4 - Capture the Flag
+seta g_gametype 4
+seta capturelimit 8
+seta timelimit 20
+seta g_friendlyFire 0
+
+// ---- Extra-special new stuff ----
+
+// Uncomment this if you want no falling damage
+//g_fallingDamage 0
+
+// Uncomment this if you want self damage to only damage armor
+// Set it to 0 to disable self damage altogether (default: 2)
+//g_selfDamage 1
+
+// Uncomment this if you like to play CTF the "old" way
+// (the player only has to touch his flag to return it)
+//g_returnFlag 0
+
+// Uncomment this if you want a mad, mad, mad game of
+// multi-flag CTF (everyone can have their own flag!)
+//g_multiFlag 1
+
+// Uncomment this if you want an offhand grapple
+// Your players will need to bind +button6 to something,
+// or set up their grapples in SETUP->CONTROLS->SHOOT
+// WARNING: The grappling hook IS NOT client-side predicted,
+// which means it's awful for anybody with a ping over 100
+//g_offhandGrapple 1
+
+// ---- Chat/Name Filter ----
+
+// ** PLEASE READ THE README BEFORE ENABLING THESE OPTIONS **
+
+// Uncomment this to force every client's chat filter on
+// They can override this in the GAME OPTIONS menu - which
+// means that setting this really just makes the chat filter
+// opt-out
+//g_forceChatFilter 1
+
+// Uncomment this to force every client's name filter and
+// kick players with dirty names
+//g_forceNameFilter 1
+
+// ** Be careful with the next two - the chat filter may
+// act differently than you think. Read the README. **
+
+// Use this to add words for chat filtering (separate words
+// with spaces, use an underscore ("_") in place of a space
+// if you need to filter phrases)
+//g_filteredWords
+
+// Use this to filter additional names - same format as above
+//g_filteredNames "bin_laden terrorist"
+
+// ---- Map rotation ----
+
+// An id/threewave CTF map rotation
+// Even if you don't use this rotation, I suggest using "d1"
+// as the command for the first map, since players can vote
+// to reset the map rotation. That action will set nextmap
+// to "vstr d1".
+set d1 "map q3ctf1; set nextmap vstr d2"
+set d2 "map q3wctf2; set nextmap vstr d3"
+set d3 "map q3ctf4; set nextmap vstr d4"
+set d4 "map q3wctf1; set nextmap vstr d5"
+set d5 "map q3ctf2; set nextmap vstr d6"
+set d6 "map q3wctf3; set nextmap vstr d7"
+set d7 "map q3ctf3; set nextmap vstr d1"
+vstr d1
+
+// If you want to change the game type (and other things) per map, do stuff like this:
+//set d1 "set g_gametype 0; set fraglimit 20; map q3dm17; set nextmap vstr d2"
+//set d2 "set g_gametype 1; set fraglimit 15; set timelimit 10; map q3tourney3; set nextmap vstr d1"
+//vstr d1
diff --git a/games-fps/quake3-alternatefire/metadata.xml b/games-fps/quake3-alternatefire/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-alternatefire/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild b/games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild
new file mode 100644
index 00000000000..dcb3e69e756
--- /dev/null
+++ b/games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="adds unique new secondary attacks to weapons"
+MOD_NAME="Alternate Fire"
+MOD_DIR="alternatefire"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.planetquake.com/alternatefire/"
+SRC_URI="mirror://quakeunity/modifications/alternatefire/alternatefire-${PV}.zip"
+
+LICENSE="freedist"
+
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-bfp/Manifest b/games-fps/quake3-bfp/Manifest
new file mode 100644
index 00000000000..c5969fef47a
--- /dev/null
+++ b/games-fps/quake3-bfp/Manifest
@@ -0,0 +1 @@
+DIST bidforpower1-2.zip 129645741 RMD160 432a8bca8e7dbbf03b440513165dba5a6c13af8b SHA1 e6981cb81357da95c425ec6960d46daa516c84f7 SHA256 e8d5f4ec8453a7b0e0cd430e38ff5fb2cc37eb16c17f7e5eb6515429903b3a7b
diff --git a/games-fps/quake3-bfp/metadata.xml b/games-fps/quake3-bfp/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-bfp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild b/games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild
new file mode 100644
index 00000000000..19b6a70a52b
--- /dev/null
+++ b/games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="take control of Ki-powered superheros and battle in a mostly aerial fight"
+MOD_NAME="Bid For Power"
+MOD_DIR="bfpq3"
+MOD_ICON="bfp.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.planetquake.com/bidforpower/"
+SRC_URI="mirror://quakeunity/modifications/bidforpower/bidforpower${PV/./-}.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-bin/Manifest b/games-fps/quake3-bin/Manifest
new file mode 100644
index 00000000000..292675123b2
--- /dev/null
+++ b/games-fps/quake3-bin/Manifest
@@ -0,0 +1,2 @@
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 SHA256 c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78 WHIRLPOOL ad1250dbf53e0d5b03b753752e9fc66f361fe2473fc3bd74285a1357e3c1f9fded64806a46766f1bd666b567b8d0fc55a8780633f60af2554abaad9231873cf3
+DIST quake3-1.32c.zip 3056760 SHA256 643ac677892fb58689a86d71f08d6678393efe2939b82c436a5c92368eebb849 SHA512 8bc68d4a1e015e5d5abb88bee1e52cb6375c005d707147869d16383bdbfd37f092a75e8fb3f8678120621433d98de40dcda9dbdbd255a92399caec2c545ff689 WHIRLPOOL 8b55046d002a577087309961074f5b05997d512e6dd666335a38026f006481497a6bb94e5ee9869b0ecdf7767cc26be5f949e157c06e2e477143819d29347f42
diff --git a/games-fps/quake3-bin/files/q3ded.conf.d b/games-fps/quake3-bin/files/q3ded.conf.d
new file mode 100644
index 00000000000..c7b3fa02714
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.conf.d
@@ -0,0 +1,6 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+q3_OPTS="+set com_hunkmegs 24 +set dedicated 1 +set net_port 27960 +map q3tourney2"
+
diff --git a/games-fps/quake3-bin/files/q3ded.rc b/games-fps/quake3-bin/files/q3ded.rc
new file mode 100644
index 00000000000..a3a847f862b
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.rc
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Quake3 dedicated server"
+ screen -A -m -d -S q3ded-bin su - games -c "q3ded-bin ${q3_OPTS}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Quake3 dedicated server"
+ local pid=`screen -list | grep q3ded-bin | awk -F . '{print $1}' | sed -e s/.//`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost screen session"
+ else
+ pid=`pstree -p ${pid} | sed -e 's:^.*q3ded-bin::'`
+ pid=${pid:1:${#pid}-2}
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost q3ded-bin session"
+ else
+ kill ${pid}
+ eend $? "Could not kill q3ded-bin"
+ fi
+ fi
+}
+
+status() {
+ screen -list | grep q3ded-bin
+}
diff --git a/games-fps/quake3-bin/metadata.xml b/games-fps/quake3-bin/metadata.xml
new file mode 100644
index 00000000000..1532777984a
--- /dev/null
+++ b/games-fps/quake3-bin/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+Quake III Arena is the third installment of the extremely popular and
+successful Quake series by id software. The game was released by id
+software for both Windows and Linux. The Linux version of the game was
+maintained and sold by the now defunct Loki Entertainment. The powerful
+Quake III engine is the basis for many other commercial games, as id's
+major source of revenue is licensing their game engines. The engine
+allows for user-contributed modifications to be made, allowing the game
+to be extensible and expandable. This game is commercial software, and
+requires the data from a retail copy of the game to play. If you're
+interested in checking out the technology behind Quake III, then
+"emerge quake3-demo" to get the playable demo.
+</longdescription>
+ <use>
+ <flag name="teamarena">Adds support for Team Arena expansion pack</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild b/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild
new file mode 100644
index 00000000000..d33629e5665
--- /dev/null
+++ b/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="3rd installment of the classic id 3D first-person shooter"
+HOMEPAGE="http://www.idsoftware.com/"
+SRC_URI="mirror://idsoftware/quake3/linux/linuxq3apoint-1.32b-3.x86.run
+ mirror://idsoftware/quake3/quake3-1.32c.zip"
+
+LICENSE="Q3AEULA GPL-2" #gpl for init script bug #425942
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="cdinstall dedicated teamarena"
+RESTRICT="strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ cdinstall? (
+ games-fps/quake3-data[cdinstall]
+ teamarena? ( games-fps/quake3-teamarena )
+ )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/quake3
+Ddir=${D}/${dir}
+
+QA_TEXTRELS="${dir:1}/pb/pbag.so
+ ${dir:1}/pb/pbcl.so
+ ${dir:1}/pb/pbsv.so"
+
+src_unpack() {
+ unpack_makeself linuxq3apoint-1.32b-3.x86.run
+ unpack quake3-1.32c.zip
+}
+
+src_install() {
+ dodir "${dir}"/{baseq3,missionpack}
+ if use cdinstall ; then
+ dosym "${GAMES_DATADIR}"/quake3/baseq3/pak0.pk3 "${dir}"/baseq3/pak0.pk3
+ use teamarena && dosym "${GAMES_DATADIR}"/quake3/missionpack/pak0.pk3 \
+ "${dir}"/missionpack/pak0.pk3
+ fi
+ for pk3 in baseq3/*.pk3 missionpack/*.pk3 ; do
+ dosym "${GAMES_DATADIR}"/quake3/${pk3} "${dir}"/${pk3}
+ done
+
+ insinto "${dir}"
+ doins -r Docs pb || die "ins docs/pb"
+
+ exeinto "${dir}"
+ doins quake3.xpm README* Q3A_EULA.txt
+ if ! use dedicated ; then
+ doexe "Quake III Arena 1.32c"/linux/quake3*.x86 || die "doexe"
+ games_make_wrapper ${PN} ./quake3.x86 "${dir}" "${dir}"
+ newicon quake3.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Quake III Arena (binary)"
+ if use teamarena ; then
+ games_make_wrapper ${PN}-teamarena \
+ "./quake3.x86 +set fs_game missionpack" "${dir}" "${dir}"
+ make_desktop_entry ${PN}-teamarena \
+ "Quake III Team Arena (binary)" quake3-bin
+ fi
+ fi
+ doexe "Quake III Arena 1.32c"/linux/q3ded || die "doexe q3ded"
+ games_make_wrapper quake3-ded ./q3ded "${dir}" "${dir}"
+ newinitd "${FILESDIR}"/q3ded.rc quake3-ded
+ newconfd "${FILESDIR}"/q3ded.conf.d quake3-ded
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "There are two possible security bugs in this package, both causing a"
+ ewarn "denial of service. One affects the game when running a server, the"
+ ewarn "other when running as a client."
+ ewarn "For more information, please see bug #82149."
+
+ if ! use dedicated; then
+ echo
+ elog "To start the game, run:"
+ elog " quake3-bin"
+ fi
+ echo
+ elog "To start a dedicated server, run"
+ elog " /etc/init.d/quake3-ded start"
+ elog
+ elog "The dedicated server is started under the ${GAMES_USER_DED} user account."
+
+ # IA32 Emulation required for amd64
+ if use amd64 ; then
+ echo
+ ewarn "NOTE: IA32 Emulation must be compiled into your kernel for Quake3 to run."
+ fi
+}
diff --git a/games-fps/quake3-cpma/Manifest b/games-fps/quake3-cpma/Manifest
new file mode 100644
index 00000000000..165f265fa7c
--- /dev/null
+++ b/games-fps/quake3-cpma/Manifest
@@ -0,0 +1,2 @@
+DIST cpma-mappack-full.zip 122543145 SHA256 5db933fc92c41f2e0941ab65725586d4d0c30fe84727427bb6b265e4d941a226 SHA512 bbc1ddd378f76ece224403ac7e1aeb1de2fec2756f438be07fb8f018e5e8cc6679cbf574eac51ce75daa0ee53b8b095ce5b46dffbd120df5450039ce754b9b37 WHIRLPOOL 332dba5fa7f26346e1fc5475b124022b9c3753dcf1ab7414ef9797871538877603267238aa3d0ad48715adb8631c036a5c35f2c5a76d1faea67cf21fe027d476
+DIST cpma148-nomaps.zip 8045352 SHA256 1f0aafcaa48a16880ab4541aaa8b9d017c6c0b90c8fc0b4de871f976c05598d5 SHA512 6908065a98922774f3b80924a7286fe9008dea0e6e5e7d808e07d9d474bebf30c3e4ca2cd2587c93903095213fbaaff4154d309fd0ca002e80e871c99631c120 WHIRLPOOL de057e185d06778c5795070ea6f3139703df5c9550c7f3db7900d2bebe6b558a6e13982f8e0802d26e5ef2d27bf29654566f9f13af9cddd5d30642ff3b64433b
diff --git a/games-fps/quake3-cpma/files/server.cfg b/games-fps/quake3-cpma/files/server.cfg
new file mode 100644
index 00000000000..352d1e8e69f
--- /dev/null
+++ b/games-fps/quake3-cpma/files/server.cfg
@@ -0,0 +1,146 @@
+// Server Information
+//=========================
+sets ".admin" ""
+sets ".email" ""
+sets ".www" ""
+sets ".location" ""
+sets ".irc" ""
+
+
+seta sv_pure 1
+seta server_ospauth 1
+seta sv_hostname "CPMA"
+seta sv_maxclients 13
+seta sv_privateclients 1
+seta admin_log "adm.log"
+seta logfile 3
+seta g_log "games.log"
+seta filter_file ""
+seta log_default 0
+seta log_stat 0
+seta viewcam_directory ""
+
+
+seta sv_maxping 0
+seta sv_minping 0
+seta server_maxrate 25000
+seta sv_minrate 0
+seta server_maxpacketsmax 100
+seta server_minpacketsmax 30
+seta server_timenudgemax 100
+seta server_timenudgemin -25
+seta sv_allowdownload 1
+seta sv_floodprotect 0
+seta server_customclient 15
+seta server_pure 1
+seta server_promode 0
+seta server_realping 1
+seta server_thrufloors 1
+seta pmove_fixed 1
+seta pmove_msec 8
+seta g_inactivity 600
+seta bot_enable 0
+
+
+// MOTD Text
+//=========================
+seta server_motd1 "This server is powered by Gentoo Linux"
+seta server_motd2 ""
+seta server_motd3 ""
+seta server_motd4 ""
+
+
+// Password Settings
+//=========================
+set g_password ""
+seta ref_password "none"
+seta rconpassword ""
+seta sv_privatePassword ""
+
+
+// Set GameType Clan Arena
+//=========================
+seta g_gametype 5
+seta scorelimit 5
+
+
+// Match Settings
+//=========================
+seta g_doWarmup 0
+seta g_warmup 5
+seta match_mutespecs 0
+seta match_roundtimer 5
+seta match_timeoutcount 0
+seta match_timeoutlength 60
+seta match_hurtself 0
+seta match_startrespawn 0
+seta server_fallingdamage 0
+seta server_healthdamageself 0
+seta server_healthdamageteam 0
+seta server_armordamageself 0
+seta server_armordamageteam 0
+seta server_startrespawn 0
+
+
+// Vote/Callvote Settings
+//=========================
+seta g_allowVote 1
+seta vote_limit 10
+seta vote_percent 80
+
+
+seta vote_allow_armordamage 0
+seta vote_allow_fallingdamage 0
+seta vote_allow_flood 0
+seta vote_allow_map 1
+seta vote_allow_kick 1
+seta vote_allow_mutespecs 1
+seta vote_allow_referee 1
+seta vote_allow_limit 1
+seta vote_allow_bfg 0
+seta vote_allow_pure 0
+seta vote_allow_promode 0
+seta vote_allow_maxpackets 0
+seta vote_allow_timenudge 0
+seta vote_allow_startrespawn 0
+seta vote_allow_arenatype 0
+seta vote_allow_items 0
+seta vote_allow_altgraphics 0
+seta vote_allow_exec 0
+seta vote_allow_fastrail 0
+seta vote_allow_hook 0
+seta vote_allow_instagib 1
+seta vote_allow_lgcooldown 0
+seta vote_allow_allcaptain 0
+seta vote_allow_armor 1
+seta vote_allow_armorsystem 0
+seta vote_allow_overtime 0
+seta vote_allow_pmove 0
+seta vote_allow_poweruprespawn 0
+seta vote_allow_scorelimit 1
+seta vote_allow_teamdamage 0
+seta vote_allow_timelimit 0
+seta vote_allow_vstr 1
+seta vote_allow_weaponrespawn 0
+
+
+// Map Settings
+//=========================
+seta map_queue 1
+seta map_rotate 0
+seta map_once 1
+seta map_random 1
+seta map_nocount 0
+seta map_halt 0
+
+
+seta item_disable 1023
+seta powerup_disable 255
+seta weapon_deaddrop 0
+seta weapon_have 127
+seta weapon_start 8
+
+
+// Load This Map by Default
+//=========================
+map q3tourney5
diff --git a/games-fps/quake3-cpma/metadata.xml b/games-fps/quake3-cpma/metadata.xml
new file mode 100644
index 00000000000..483f24c9414
--- /dev/null
+++ b/games-fps/quake3-cpma/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+The Challenge Pro Mode (CPM) project was created by Richard 'Hoony' Sandlant in May 1999
+(when the 'Q3test' was released) after he realised that Quake 3 Arena was going to have a
+lot of "newbie-friendly" features and after John Carmack admitted a more challenging
+version might be better for professional gamers (which is where the name "pro mode" came
+from).
+
+The Challenge Pro Mode's goals were, first and foremost, to make a more exciting and
+challenging game to play and we hoped that this would help advance Q3 into a professional
+sport. Along the way we made a choice between making only small conservative changes to
+Q3A, and making the changes that our design team recommended. We took the path of making
+the changes that our design team felt were necessary.
+
+Our approach was to form an international project team and to separate "Design" from
+"Programming". While the programming team might have input into the design process they
+didn't make final design decisions - that was left to a team of experienced Quake players
+who tested changes using a "tweaks" mod. The design team consisted of players with a mix
+of competitive experience across Q1, Q2, Q3 and even UT.
+
+Before the design team began their work we asked the community to 'brainstorm' a list
+(called the "candidates list") of all the possible changes they would like to see (some
+were contradictory). We also asked noted commentators (pundits) in the community what they
+thought might be best. The designers took note of all of these suggestions, and used a
+long process of tweaking and testing to develop the Challenge Pro Mode design. The team
+released two public betas of their work for feedback and input from the community.
+
+And that is pretty much how the project team has worked ever since. The result is a
+gameplay design which we think is "finely tuned".
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/quake3-cpma/quake3-cpma-1.48.ebuild b/games-fps/quake3-cpma/quake3-cpma-1.48.ebuild
new file mode 100644
index 00000000000..350b88477d7
--- /dev/null
+++ b/games-fps/quake3-cpma/quake3-cpma-1.48.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="advanced FPS competition mod"
+MOD_NAME="Challenge Pro Mode Arena"
+MOD_DIR="cpma"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.promode.org/"
+SRC_URI="http://www.slashquit.net/files/x/q3/cpma${PV//.}-nomaps.zip
+ http://www.slashquit.net/files/x/q3/cpma-mappack-full.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~ppc x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ mv -f *.pk3 ${MOD_DIR} || die
+}
+
+pkg_postinst() {
+ games-mods_pkg_postinst
+ elog "To enable bots: +bot_enable 1"
+}
diff --git a/games-fps/quake3-data/Manifest b/games-fps/quake3-data/Manifest
new file mode 100644
index 00000000000..35994bcc8f3
--- /dev/null
+++ b/games-fps/quake3-data/Manifest
@@ -0,0 +1 @@
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 SHA256 c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78 WHIRLPOOL ad1250dbf53e0d5b03b753752e9fc66f361fe2473fc3bd74285a1357e3c1f9fded64806a46766f1bd666b567b8d0fc55a8780633f60af2554abaad9231873cf3
diff --git a/games-fps/quake3-data/metadata.xml b/games-fps/quake3-data/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-data/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-data/quake3-data-1.32b.ebuild b/games-fps/quake3-data/quake3-data-1.32b.ebuild
new file mode 100644
index 00000000000..9867ff41f63
--- /dev/null
+++ b/games-fps/quake3-data/quake3-data-1.32b.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+CDROM_OPTIONAL="yes"
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Quake III Arena - data portion"
+HOMEPAGE="http://icculus.org/quake3/"
+SRC_URI="mirror://idsoftware/quake3/linux/linuxq3apoint-${PV}-3.x86.run"
+
+LICENSE="Q3AEULA"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ia64 ppc x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/quake3
+
+src_unpack() {
+ use cdinstall && cdrom_get_cds baseq3/pak0.pk3:Quake3/baseq3/pak0.pk3
+ unpack_makeself
+}
+
+src_install() {
+ ebegin "Copying files from linux client ..."
+ insinto "${GAMES_DATADIR}"/quake3/baseq3
+ doins baseq3/*.pk3
+ eend 0
+
+ if use cdinstall ; then
+ einfo "Copying files from CD ..."
+ doins "${CDROM_ROOT}/${CDROM_MATCH}"
+ eend 0
+ fi
+
+ find "${D}" -exec touch '{}' \;
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if ! use cdinstall ; then
+ echo
+ elog "You need to copy pak0.pk3 from your Quake3 CD into:"
+ elog " ${dir}/baseq3."
+ elog "Or if you have a Windows installation of Q3 make a symlink to save space."
+ elog
+ elog "Or, re-emerge quake3-data with USE=cdinstall."
+ echo
+ fi
+}
diff --git a/games-fps/quake3-defrag/Manifest b/games-fps/quake3-defrag/Manifest
new file mode 100644
index 00000000000..feeeaa3d524
--- /dev/null
+++ b/games-fps/quake3-defrag/Manifest
@@ -0,0 +1,14 @@
+DIST defrag_1.91.20.zip 4003519 SHA256 8eec5a9b112b0ac8d3ddad5ed019cb00313445fd2757c121dbd8099a124401a6
+DIST defrag_1.91.21.zip 4035256 SHA256 9f9b92eda597ce14e1135aa964a3b8bb35371875922dc0403a1844ae948f4c79 SHA512 bfc1614b0e2f2dd674369c9c162c412249e6c514f878eaf82a456c882e2081867d6a7260f62ce4a143c23ff28f4f3a5e75a152db788d66b7a0978225bf4417b8 WHIRLPOOL 1089bef0c0c7dd1ff020bc82c0e7b685aa6b17855193422cd81e4a49bd50fafb68adb47005f340d7db1debae69afe6443403a425b13b58a67f779798c9c3cef5
+DIST defragcpmpak01.zip 8567363 SHA256 9de7a8d34d2a31db3c6593d1383c449b0b0cb09768062988736c9f75aad0028f
+DIST defragpak1.zip 3778055 SHA256 0d013be5b338bb6070502fa4d5b20f3f4ac9b7c1b72ccf64a10dd143dece0b7e
+DIST defragpak10.zip 7913269 SHA256 ecccce33c03053b810c2883f51017329d528fdca641e76138aecb80e0666236d
+DIST defragpak11.zip 9959458 SHA256 49466215b5b2dbfaf24e7e50ec4d9164b6e9fc8e040be177318d47274223f437
+DIST defragpak2.zip 2056082 SHA256 a1e2ceaa0717dd592a22060bbdd9ce415a15df9470a709bc04845ad21a064928
+DIST defragpak3.zip 4699963 SHA256 ed7dd62cdabef98fd8e8ac3e2f477ac3483fb6d09aecb146cadd40c4ed156cb0
+DIST defragpak4.zip 3711149 SHA256 5f00fbfb2d40f5ac0dae8849653b370d9abe7ca050142f247e113a66f3f0eddd
+DIST defragpak5.zip 6100341 SHA256 74fb1d5c62e6a8553e26e6f89a0d1b77b48ebe4a7024d0f8518c6303029a04ef
+DIST defragpak7.zip 10915548 SHA256 30b18b716c03f562251e4f63b2194ab20289e7aa7f9ec53b23397d119f4c9dda
+DIST defragpak8.zip 11972907 SHA256 94ebe9210133af7f7645011a0983e66df53604f9f1cc38431ad4786271892b61
+DIST defragpak9.zip 8531944 SHA256 b6863f6f45fe144881cd929c063d8be747c0d637747c00d740f70ef4304d6f92
+DIST df-extras002.zip 6538951 SHA256 5af99333250c96fed4f3f7654a032e2e6a5cf8db5642ad8e152daf8bda37228c
diff --git a/games-fps/quake3-defrag/metadata.xml b/games-fps/quake3-defrag/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-defrag/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-defrag/quake3-defrag-1.91.20.ebuild b/games-fps/quake3-defrag/quake3-defrag-1.91.20.ebuild
new file mode 100644
index 00000000000..b6d056e697a
--- /dev/null
+++ b/games-fps/quake3-defrag/quake3-defrag-1.91.20.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Trickjumping challenges for Quake III"
+MOD_NAME="Defrag"
+MOD_DIR="defrag"
+
+inherit games games-mods
+
+HOMEPAGE="http://cggdev.org/"
+SRC_URI="http://q3defrag.org/files/defrag/defrag_${PV}.zip
+ http://www.german-defrag.de/files/defrag/defragcpmpak01.zip
+ http://www.german-defrag.de/files/defrag/df-extras002.zip
+ http://www.german-defrag.de/files/defrag/defragpak1.zip
+ http://www.german-defrag.de/files/defrag/defragpak2.zip
+ http://www.german-defrag.de/files/defrag/defragpak3.zip
+ http://www.german-defrag.de/files/defrag/defragpak4.zip
+ http://www.german-defrag.de/files/defrag/defragpak5.zip
+ http://www.german-defrag.de/files/defrag/defragpak7.zip
+ http://www.german-defrag.de/files/defrag/defragpak8.zip
+ http://www.german-defrag.de/files/defrag/defragpak9.zip
+ http://www.german-defrag.de/files/defrag/defragpak10.zip
+ http://www.german-defrag.de/files/defrag/defragpak11.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack defrag_${PV}.zip
+ cd ${MOD_DIR}
+ unpack defragpak{1,2,3,4,5,7,8,9,10,11}.zip
+ unpack defragcpmpak01.zip
+ unpack df-extras002.zip
+}
+
+src_prepare() {
+ cd ${MOD_DIR}
+ mv -f DeFRaG/* . || die
+ rm -rf DeFRaG
+ mv -f *.txt docs/ || die
+ rm -rf misc/{mirc-script,misc,tools}
+}
diff --git a/games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild b/games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild
new file mode 100644
index 00000000000..25a2e5fcc3e
--- /dev/null
+++ b/games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Trickjumping challenges for Quake III"
+MOD_NAME="Defrag"
+MOD_DIR="defrag"
+
+inherit games games-mods
+
+HOMEPAGE="http://cggdev.org/"
+SRC_URI="http://q3defrag.org/files/defrag/defrag_${PV}.zip
+ http://www.german-defrag.de/files/defrag/defragcpmpak01.zip
+ http://www.german-defrag.de/files/defrag/df-extras002.zip
+ http://www.german-defrag.de/files/defrag/defragpak1.zip
+ http://www.german-defrag.de/files/defrag/defragpak2.zip
+ http://www.german-defrag.de/files/defrag/defragpak3.zip
+ http://www.german-defrag.de/files/defrag/defragpak4.zip
+ http://www.german-defrag.de/files/defrag/defragpak5.zip
+ http://www.german-defrag.de/files/defrag/defragpak7.zip
+ http://www.german-defrag.de/files/defrag/defragpak8.zip
+ http://www.german-defrag.de/files/defrag/defragpak9.zip
+ http://www.german-defrag.de/files/defrag/defragpak10.zip
+ http://www.german-defrag.de/files/defrag/defragpak11.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack defrag_${PV}.zip
+ cd ${MOD_DIR}
+ unpack defragpak{1,2,3,4,5,7,8,9,10,11}.zip
+ unpack defragcpmpak01.zip
+ unpack df-extras002.zip
+}
+
+src_prepare() {
+ cd ${MOD_DIR}
+ mv -f DeFRaG/* . || die
+ rm -rf DeFRaG
+ mv -f *.txt docs/ || die
+ rm -rf misc/{mirc-script,misc,tools}
+}
diff --git a/games-fps/quake3-demo/Manifest b/games-fps/quake3-demo/Manifest
new file mode 100644
index 00000000000..8e763aebbf6
--- /dev/null
+++ b/games-fps/quake3-demo/Manifest
@@ -0,0 +1 @@
+DIST linuxq3ademo-1.11-6.x86.gz.sh 49289300 SHA256 64dee3f69b6e792d1da4fe0ac98fedc7eb1e37ea1027fb609a9fadd06150a4ec SHA512 aa74f8e1e8b5036fd68761e5f38cbc3d771e9bd0d5c3cc1f5d89d7eba8fd4fda8108dfd4f31d2b846114e4ec89f6aa15849b95232e0570181a104563ec0faeb5 WHIRLPOOL 558a84cf97c142befa4585eeeeca609f3b5c1880f6fda32a79de415d28779cbe2f69e9c901f4a7d8e0f60acd6279a7a9be69834cb6acded7d31ad630ffd3847f
diff --git a/games-fps/quake3-demo/metadata.xml b/games-fps/quake3-demo/metadata.xml
new file mode 100644
index 00000000000..69805c6e003
--- /dev/null
+++ b/games-fps/quake3-demo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<use>
+ <flag name='dedicated'>install only as a dedicated game serer</flag>
+</use>
+</pkgmetadata>
diff --git a/games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild b/games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild
new file mode 100644
index 00000000000..20cadb88a64
--- /dev/null
+++ b/games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="the playable demo of Quake III Arena by Id Software"
+HOMEPAGE="http://www.idsoftware.com/games/quake/quake3-arena/"
+SRC_URI="mirror://idsoftware/quake3/linux/linuxq3ademo-${PV}-6.x86.gz.sh
+ mirror://3dgamers/quake3arena/linuxq3ademo-${PV}-6.x86.gz.sh"
+
+LICENSE="Q3AEULA"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="dedicated"
+RESTRICT="strip"
+
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/q3ded.x86
+ ${dir:1}/q3demo.x86"
+
+src_unpack() {
+ unpack_makeself
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r Help demoq3
+ doins README icon.*
+
+ exeinto "${dir}"
+ newexe bin/x86/glibc-2.0/q3ded q3ded.x86
+ games_make_wrapper q3ded ./q3ded.x86 "${dir}" "${dir}"
+ if ! use dedicated; then
+ newexe bin/x86/glibc-2.0/q3demo q3demo.x86
+ games_make_wrapper q3demo ./q3demo.x86 "${dir}" "${dir}"
+ make_desktop_entry q3demo "Quake III (Demo)"
+ fi
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if ! use dedicated; then
+ elog "To play the game run:"
+ elog " q3demo"
+ fi
+ echo
+ elog "To start the gameserver, run:"
+ elog " q3ded"
+}
diff --git a/games-fps/quake3-excessiveplus/Manifest b/games-fps/quake3-excessiveplus/Manifest
new file mode 100644
index 00000000000..676ed709898
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/Manifest
@@ -0,0 +1 @@
+DIST xp-2.2b.zip 19810680 SHA256 4a041f4b84dae4b50707f9069eb0c59b4af00e53bcecd7d0f01087398a165b55 SHA512 b7f702b5ce0b0c39ae0db9414ae54aaec7cf0a80cc39604e8ebd14eae56a982f438196488d1c1cc559c6d36c36c8c0e1b695658f974c196c95bba2274063f343 WHIRLPOOL 377c08cde0d52e8272811c93e3fd00abf531adae20340a811aa8bb376694ea6363f370eba1d94f2d2b342041394eebbe86b8bd7c06381d7ebe1ee88ce8200c5d
diff --git a/games-fps/quake3-excessiveplus/metadata.xml b/games-fps/quake3-excessiveplus/metadata.xml
new file mode 100644
index 00000000000..4db49d92479
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Excessive Plus is a Quake III Arena modification. It is a remake of the
+ingenious Mr. Pants' Excessive Overkill for Quake III Arena
+(www.planetquake.com/excessive/).
+
+Well, what's then the difference?
+Excessive Plus can either be used server-side only but also as a client-server
+mod which brings you tons of advantages. The whole mod is based on a scripting
+engine which can be used to create your very own settings. It is fully
+customizable with tons of options. Read the "docs/index.html" for more
+information.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/quake3-excessiveplus/quake3-excessiveplus-2.2b.ebuild b/games-fps/quake3-excessiveplus/quake3-excessiveplus-2.2b.ebuild
new file mode 100644
index 00000000000..22755cfa97b
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/quake3-excessiveplus-2.2b.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="modification making the weapons much faster and stronger"
+MOD_NAME="Excessive Plus"
+MOD_DIR="excessiveplus"
+MOD_ICON="excessiveplus.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.excessiveplus.net/"
+SRC_URI="http://www.excessiveplus.net/files/release/xp-${PV}.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f *.bat
+ rm -rf ${MOD_DIR}/tools
+}
diff --git a/games-fps/quake3-lrctf/Manifest b/games-fps/quake3-lrctf/Manifest
new file mode 100644
index 00000000000..0f8fe04d9c2
--- /dev/null
+++ b/games-fps/quake3-lrctf/Manifest
@@ -0,0 +1 @@
+DIST LRCTF_Q3A_v1.1_full.zip 340050745 RMD160 e2084617f1aa583783bce93cdb5e9577a7662419 SHA1 598c633192eb7f84a97e6f07e128bd275a88b340 SHA256 aabdb9b41c63d1d8978b29e7821011e0fea9e4d52568cad1ae4f8e06638c3c0d
diff --git a/games-fps/quake3-lrctf/metadata.xml b/games-fps/quake3-lrctf/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-lrctf/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild b/games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild
new file mode 100644
index 00000000000..ef92dc81ad5
--- /dev/null
+++ b/games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="offhand grapple all-weapons capture the flag mod"
+MOD_NAME="Loki's Revenge CTF"
+MOD_DIR="lrctf"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.lrctf.com/"
+SRC_URI="http://lrctf.com/release/LRCTF_Q3A_v${PV}_full.zip"
+
+LICENSE="LRCTF"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-matrix/Manifest b/games-fps/quake3-matrix/Manifest
new file mode 100644
index 00000000000..9529f73a047
--- /dev/null
+++ b/games-fps/quake3-matrix/Manifest
@@ -0,0 +1 @@
+DIST matrix24.zip 21191819 RMD160 d0aef4f4a931c73c1dd4094d806c0c05f24192e4 SHA1 a95869186cea096b4e0508f6668d00baa3c6a8b3 SHA256 5c748941c857bdeaa7daa9ffd1ef5aebb6113a4c89709d6132c3a6eb4188abcd
diff --git a/games-fps/quake3-matrix/metadata.xml b/games-fps/quake3-matrix/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-matrix/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild b/games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild
new file mode 100644
index 00000000000..d19d4757234
--- /dev/null
+++ b/games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Matrix conversion mod"
+MOD_NAME="Matrix"
+MOD_DIR="matrix"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.moddb.com/mods/matrix-quake-3"
+SRC_URI="mirror://quakeunity/modifications/matrix24.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ mkdir ${MOD_DIR}
+ cd ${MOD_DIR}
+ unpack ${A}
+}
diff --git a/games-fps/quake3-nsco/Manifest b/games-fps/quake3-nsco/Manifest
new file mode 100644
index 00000000000..0bc4cf6c7f2
--- /dev/null
+++ b/games-fps/quake3-nsco/Manifest
@@ -0,0 +1,2 @@
+DIST nsco_beta191a.zip 335375075 RMD160 f789aea0761a87aff6b8b9ab7e7e524c49937c33 SHA1 54041b464ca4179619d1ebb8081154bc490a6f05 SHA256 3ed6706d09dd7a414563381a52f4cbc8c445031fc7473bf89f6582d1c7916fef
+DIST nsco_beta193upd.zip 55808681 RMD160 88dee4f58e4ab0c76102a86c063ff37cae74715f SHA1 66ee0a8ab02c8de7b85afd645aa0d88c98c981f5 SHA256 6d6102c5946f79d4e6174480d8d42b9a95463131e5e26e7c187e8bb21a535004
diff --git a/games-fps/quake3-nsco/files/server.cfg b/games-fps/quake3-nsco/files/server.cfg
new file mode 100644
index 00000000000..2a0eba41e0f
--- /dev/null
+++ b/games-fps/quake3-nsco/files/server.cfg
@@ -0,0 +1,97 @@
+// *NOTE* any line that starts with "//" is ignored by quake.
+// changed:
+// 10.03.02 by defcon-x/defcon-x@ns-co.net
+// 11.03.02 by defcon-x/defcon-x@ns-co.net - setted sv_floodprotect 0 as default value.
+// 08.05.02 by defcon-x/defcon-x@ns-co.net - added new beta 1.1 cvars
+// 19.05.02 by defcon-x/defcon-x@ns-co.net - added new beta 1.1 cvars
+// 29.06.02 by defcon-x/defcon-x@ns-co.net - added new beta 1.2 cvars
+// removed cvar mapcycle
+// added new ns-co master server
+// 29.07.02 by defcon-x/defcon-x@ns-co.net - updated server.cfg for b1.3
+// 29.08.02 by defcon-x/defcon-x@ns-co.net - updated server.cfg for b1.45
+
+//
+// please see the cvars.txt
+//
+
+//*** Administrator Info ***
+sets Admin "Gentoo Admin"
+sets Email "UnnamedAdmin@NoEmail"
+
+//*** Server Name and Daily Message ***
+set sv_hostname "Navy Seals : Covert Operations [BETA 1.45] powered by Gentoo Linux"
+set g_motd "www.ns-co.net, www.gentoo.org"
+
+//*** Game Settings ***
+set sv_maxclients "18"
+// set g_maxGameClients ""
+set sv_privateClients "0"
+set g_gametype "3"
+set roundtime "4"
+set teampointlimit "15"
+
+// do not remove the following line, or set the cvar to 1
+set sv_floodprotect "0" // this should be set to "0" by default.
+// it's important for a proper XP usage
+
+set g_noPrimary "0" // prevent the usage of primarys
+set g_noSecondary "0" // * secondarys
+set g_noGrenades "0" // and grenades
+set g_allowMapVote "1" // allow the voting of maps
+set g_allowKickVote "1" // allow the kick voting of players
+
+// 1 enables friendly fire
+set g_friendlyFire "1"
+
+// memory management
+// only use these settings if you want the best memory usage
+// on dedicated servers.
+seta com_soundMegs "0"
+seta com_zoneMegs "8"
+seta com_hunkMegs "38"
+
+set g_basexp "15"
+set g_inventoryupdatetime "5"
+set g_maxteamkill "3" // 3 teamkills until a player gets kicked for TK
+set g_TeamKillRemoveTime "300" // remove one teamkill after not killing for 5 minutes
+set g_overridegoals "0"
+//*** Less Packets ***
+// set g_silentbullets "1" // bullets are not SENT to the clients
+// set g_reallead "1" // real bullets instead of instat-hit ray-test weapons
+set g_teamlockcamera "0" // lock chasecamera so players can only spectate their teammates - for clangames very useful
+set g_minplayers "1" // starts the round as soon as X players are in each team - for clangames very useful
+
+//*** Passwords ***
+// set rconpassword "-----"
+// set sv_privatePassword "-----"
+// set g_password "-----"
+
+//*** Bot Setup ***
+set bot_enable "0"
+set bot_minplayers "0"
+set bot_maxplayers "0"
+
+//*** Server Settings ***
+set sv_pure "1"
+set g_allowvote "1"
+set sv_allowdownload "0"
+set gamename "seals"
+set sv_maxRate "15000"
+set g_log "seals.log"
+
+set g_inactivity "90" // kick after 90 seconds of inactivity on server
+set g_firstcountdown "30" // the first round has a countdown of 30 seconds
+
+//*** Master Servers ***
+set sv_master1 "ns-co.org" // primary ns-co master
+set sv_master2 "master1.idsoftware.com"
+set sv_master3 "master2.idsoftware.com"
+set sv_master4 "master3.idsoftware.com"
+set sv_master5 "master4.idsoftware.com"
+
+
+//*** Mapcycle ***
+set g_mapcycle "configs/mapcycle.cfg" // leave this as default
+
+//execute a map in the cycle
+map ns_ghetto
diff --git a/games-fps/quake3-nsco/metadata.xml b/games-fps/quake3-nsco/metadata.xml
new file mode 100644
index 00000000000..5ba89f1f75a
--- /dev/null
+++ b/games-fps/quake3-nsco/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <herd>games</herd>
+
+
+ <longdescription>
+ From http://www.ns-co.net:
+
+ Navy SEAL/s: Covert Operations is a scale realism total
+ conversion for id Software's Q3/TA engine. NS:CO pits players
+ in realistic SEAL and Tango land covert operations in realistic
+ settings with scale weapons, munitions, and equipment.
+
+ NS:CO is a tactically sophisticated feature rich multi-player
+ game that emphasized teamwork and realistic SEAL SPECWAR
+ missions and tactics.
+
+ NS:CO is a total conversion featuring original game-design,
+ technology, all original code, stunning art, level design,
+ modeling and animation; wrapped in a rich game interface that
+ gives players new exciting control over game-play that is
+ unique, realistic and enormous fun.
+ </longdescription>
+
+</pkgmetadata>
diff --git a/games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild b/games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild
new file mode 100644
index 00000000000..57bce07a818
--- /dev/null
+++ b/games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="a US Navy Seals conversion mod"
+MOD_NAME="Navy Seals: Covert Operations"
+MOD_DIR="seals"
+
+inherit games games-mods
+
+HOMEPAGE="http://ns-co.net/"
+SRC_URI="nsco_beta191a.zip
+ nsco_beta193upd.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+RESTRICT="strip mirror fetch"
+
+src_unpack() {
+ unpack nsco_beta19{1a,3upd}.zip
+}
+
+pkg_nofetch() {
+ elog "Please goto ${HOMEPAGE}"
+ elog "and download ${A} into ${DISTDIR}"
+}
diff --git a/games-fps/quake3-osp/Manifest b/games-fps/quake3-osp/Manifest
new file mode 100644
index 00000000000..092e559d325
--- /dev/null
+++ b/games-fps/quake3-osp/Manifest
@@ -0,0 +1 @@
+DIST osp-Quake3-1.03a_full.zip 55882759 SHA256 af9a184134733fc24c308b4f8790932d30dc70b6c8a36e050223ba16ba2ac2b3
diff --git a/games-fps/quake3-osp/files/server.cfg b/games-fps/quake3-osp/files/server.cfg
new file mode 100644
index 00000000000..887ff1e2784
--- /dev/null
+++ b/games-fps/quake3-osp/files/server.cfg
@@ -0,0 +1,165 @@
+/////////////////////////////////////////////
+// OSP Server Configuration File //
+/////////////////////////////////////////////
+
+
+//////////////////////
+// Gameplay Options //
+//////////////////////
+set capturelimit "8"
+set dmflags "0"
+set fraglimit "0"
+set g_dowarmup "1"
+set g_forceRespawn "10"
+set g_gametype "1"
+set g_teamautojoin "0"
+set g_teamforcebalance "0"
+set g_warmup "0"
+set match_carespawn "0"
+set match_instagib "0"
+set match_latejoin "0"
+set match_minplayers "2"
+set match_overtime "0"
+set match_overtimecount "0"
+set match_overtimelength "5"
+set match_readypercent "100"
+set match_roundtimer "10"
+set match_timeoutcount "3"
+set match_timeoutlength "60"
+set match_winbyscore "0"
+set roundlimit "5"
+set server_promode "0"
+set team_allcaptain "1"
+set team_maxplayers "0"
+set team_nocontrols "0"
+set team_noteamready "0"
+set timelimit "10"
+
+//////////////////////
+// Server Options //
+//////////////////////
+set g_gravity "800"
+set g_inactivity "0"
+set g_knockback "1000"
+set g_maxGameClients "0"
+set g_motd ""
+set g_needpass "0"
+set g_privatePassword ""
+set g_smoothclients "0"
+set g_speed "320"
+set match_maxsuicides "0"
+set osp_gamename "0"
+set player_always ""
+set rconPassword ""
+set ref_password "none"
+set server_customclient "15"
+set server_ospauth "1"
+set server_record "0"
+set server_motd1 "This server is Gentoo Linux powered"
+set server_motd2 ""
+set server_motd3 ""
+set server_motd4 ""
+set server_motd5 ""
+set server_motd6 ""
+set server_motd7 ""
+set server_motd8 ""
+set sv_allowDownload "1"
+set sv_cheats "0"
+set sv_floodprotect "0"
+set sv_hostname "OSP 1v1"
+set sv_maxclients "7"
+set sv_privateClients "1"
+set sv_pure "1"
+
+//////////////////////
+// File Options //
+//////////////////////
+set g_log "games.log"
+set g_logSync "0"
+set admin_log "adm.log"
+set log_default "0"
+set log_stat "0"
+set filter_file "filters.txt"
+set map_file "cfg-maps\1v1maps.txt"
+set server_gfxspecific "none"
+set player_file "none"
+set server_motdfile "none"
+set mode_customfilename "none"
+set decal_directory "decals"
+set viewcam_directory "cfg-viewcam"
+
+//////////////////////
+// Weapon Options //
+//////////////////////
+set armor_q2style "0"
+set gauntlet_damage "50"
+set gauntlet_disable "0"
+set g_friendlyFire "1"
+set g_weaponrespawn "5"
+set g_weaponteamrespawn "30"
+set instagib_reload "1500"
+set item_disable "4"
+set match_cawarmupfire "1"
+set match_dropitems "0"
+set match_hurtself "1"
+set mg_damage "7"
+set mg_damageTeamplay "5"
+set railgun_damage "100"
+set server_fastrail "0"
+set server_lgcooldown "0"
+set server_thrufloors "0"
+set start_armor "0"
+set start_bfg "0"
+set start_bullets "100"
+set start_cells "0"
+set start_grenades "0"
+set start_health "125"
+set start_lightning "0"
+set start_rockets "0"
+set start_shells "0"
+set start_slugs "0"
+set team_armordamage "0"
+set warmup_armor "100"
+set weapon_deaddrop "1"
+set weapon_have "1"
+set weapon_start "257"
+
+//////////////////////
+// Item Options //
+//////////////////////
+set g_quadfactor "0"
+set match_poweruprespawn "60"
+set powerup_disable "255"
+
+//////////////////////
+// Voting Options //
+//////////////////////
+set g_allowvote "0"
+set mode_start "-1"
+set server_availmodes "2"
+
+//////////////////////
+// Other Options //
+//////////////////////
+set bot_enable "0"
+set g_spectatorInactivity "0"
+set map_autoload "1"
+set map_queue "1"
+set map_halt "0"
+set map_nocount "0"
+set map_once "1"
+set map_random "0"
+set map_rotate "0"
+set match_mutespecs "1"
+set pmove_fixed "0"
+set pmove_msec "8"
+set server_maxpacketsmax "0"
+set server_maxpacketsmin "0"
+set server_realping "0"
+set server_timenudgemax "0"
+set server_timenudgemin "0"
+set sv_maxRate "0"
+set sv_maxPing "0"
+set sv_minPing "0"
+
+map "q3tourney4"
diff --git a/games-fps/quake3-osp/metadata.xml b/games-fps/quake3-osp/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-osp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild b/games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild
new file mode 100644
index 00000000000..29628995376
--- /dev/null
+++ b/games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="a tournament mod"
+MOD_NAME="OSP"
+MOD_DIR="osp"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.orangesmoothie.org/"
+SRC_URI="http://osp.dget.cc/orangesmoothie/downloads/osp-Quake3-${PV}_full.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ cd ${MOD_DIR} || die
+ rm -f VoodooStats-ReadMe.txt *.exe || die
+ rm -rf voodoo || die
+}
diff --git a/games-fps/quake3-ra3/Manifest b/games-fps/quake3-ra3/Manifest
new file mode 100644
index 00000000000..7e118c1281b
--- /dev/null
+++ b/games-fps/quake3-ra3/Manifest
@@ -0,0 +1 @@
+DIST ra3176.zip 138018848 SHA256 c8da0edc55961e328dcc35e8d7b317b639b07129897cd39080151475cb7da34a SHA512 64240dcb1460465eac5279162ed04b97f20bbf10437b1519b1da22c73368c9af0e57191b884fb2712cddd8e0086816a871ad0657dfdb73ab70940ec8f37daff9 WHIRLPOOL 3612c2c051f64c7914875cd4f015de82f1c1a5007590fea067d084c980f1a8a145216d3012f780fcf1627736b792aa47aec017937af4045f2212cbaf5d44f85e
diff --git a/games-fps/quake3-ra3/metadata.xml b/games-fps/quake3-ra3/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-ra3/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild b/games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild
new file mode 100644
index 00000000000..208d31da660
--- /dev/null
+++ b/games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="a rocket dueling mod"
+MOD_NAME="Rocket Arena 3"
+MOD_DIR="arena"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.planetquake.com/servers/arena/"
+SRC_URI="mirror://quakeunity/modifications/rocketarena3/ra3${PV/.}.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+QA_PREBUILT="${INS_DIR:1}/${MOD_DIR}/*so"
diff --git a/games-fps/quake3-reaction/Manifest b/games-fps/quake3-reaction/Manifest
new file mode 100644
index 00000000000..c3fff1676e0
--- /dev/null
+++ b/games-fps/quake3-reaction/Manifest
@@ -0,0 +1,2 @@
+DIST ReactionQuake3-v3.1-Full.zip 327488276 SHA256 ea5bbab6600a0e7244dffb2cf87a9ba51ca3f4da4e3b41152ca67ee2f63a66bc SHA512 78d141a09d73daedcbaf2c3ec24a7c017592f556610011e8143ebc7c16e24f24bc8575b59ac43f46119beb0eb5d1744e6f21854e19fc5e8ee65a3f6124f2d5e4 WHIRLPOOL 69bc7ff3f7199604f83f4089fb4df0d1dc0d60396ca3859f85282eb9161e6f16eaf4cec2b22c6e2ae42c6a2d20048220d67a25c373bf71ed054f781e59fbf47d
+DIST ReactionQuake3-v3.2-Update.zip 182810088 SHA256 a97c96904e75c7e62503c7fa29c670694d93de9ec846dae334345dc8e936740d SHA512 80d798d4153fe6072e297caad8999c95b3132ac8026f2b2b8c684a63be0cbb66d7c812bd68f9c8c28b297a93664b19962c1bae4741b3bba225099e6db87ae2d5 WHIRLPOOL 4fe6be3a0ab66897df58e88916a8a7dfe50b7d1abf52fdd66004abc30e58f3d36d16ad3401836de75e640748fda2a9416a42a44ad47a1e4a1a210363450b5014
diff --git a/games-fps/quake3-reaction/metadata.xml b/games-fps/quake3-reaction/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-reaction/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-reaction/quake3-reaction-3.2.ebuild b/games-fps/quake3-reaction/quake3-reaction-3.2.ebuild
new file mode 100644
index 00000000000..c9efc91f04f
--- /dev/null
+++ b/games-fps/quake3-reaction/quake3-reaction-3.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="port of Action Quake 2 to Quake 3: Arena"
+MOD_NAME="Reaction"
+MOD_DIR="rq3"
+MOD_ICON="reaction-4.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.rq3.com/"
+SRC_URI="
+ mirror://quakeunity/modifications/reactionquake3/ReactionQuake3-v3.1-Full.zip
+ mirror://quakeunity/modifications/reactionquake3/ReactionQuake3-v3.2-Update.zip
+ "
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-ruinhunters/Manifest b/games-fps/quake3-ruinhunters/Manifest
new file mode 100644
index 00000000000..e3d9a58d01b
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/Manifest
@@ -0,0 +1,2 @@
+DIST ruin_hunters_v10.zip 67679542 SHA256 f6abf15178def1f4d0bf7e532b53bb34fcf960aba429b5e79aace5351ee98265
+DIST ruin_hunters_v10a_patch.zip 7186582 SHA256 b3253f2b6b6b16f0cf6d4508eb7f7b64ce96894c86d365d061e013809b5f2560
diff --git a/games-fps/quake3-ruinhunters/metadata.xml b/games-fps/quake3-ruinhunters/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild b/games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild
new file mode 100644
index 00000000000..1ee884d440a
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+MOD_DESC="a anime/fantasy mod with cartoonish characters and arcade-like gameplay"
+MOD_NAME="Ruin Hunters"
+MOD_DIR="ruin"
+
+inherit games games-mods
+
+HOMEPAGE="http://planetquake.gamespy.com/View.php?view=Quake3.Detail&id=1824"
+SRC_URI="
+ mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10a_patch.zip
+ mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack ruin_hunters_{v10,v10a_patch}.zip
+}
+
+src_prepare() {
+ rm -f *.bat
+}
diff --git a/games-fps/quake3-teamarena/Manifest b/games-fps/quake3-teamarena/Manifest
new file mode 100644
index 00000000000..35994bcc8f3
--- /dev/null
+++ b/games-fps/quake3-teamarena/Manifest
@@ -0,0 +1 @@
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 SHA256 c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78 WHIRLPOOL ad1250dbf53e0d5b03b753752e9fc66f361fe2473fc3bd74285a1357e3c1f9fded64806a46766f1bd666b567b8d0fc55a8780633f60af2554abaad9231873cf3
diff --git a/games-fps/quake3-teamarena/metadata.xml b/games-fps/quake3-teamarena/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-teamarena/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild b/games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild
new file mode 100644
index 00000000000..cd0a9289bba
--- /dev/null
+++ b/games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+CDROM_OPTIONAL="yes"
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Quake III Team Arena - data portion"
+HOMEPAGE="http://icculus.org/quake3/"
+SRC_URI="mirror://idsoftware/quake3/linux/linuxq3apoint-${PV}-3.x86.run"
+
+LICENSE="Q3AEULA"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ~ppc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="|| (
+ games-fps/quake3
+ games-fps/quake3-bin )"
+DEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ use cdinstall && cdrom_get_cds Setup/missionpack/PAK0.PK3
+ unpack_makeself
+}
+
+src_install() {
+ einfo "Copying Team Arena files from linux client ..."
+ insinto "${GAMES_DATADIR}"/quake3/missionpack
+ doins missionpack/*.pk3
+
+ if use cdinstall ; then
+ einfo "Copying files from CD ..."
+ newins "${CDROM_ROOT}/Setup/missionpack/PAK0.PK3" pak0.pk3
+ eend 0
+ fi
+
+ find "${D}" -exec touch '{}' \;
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if ! use cdinstall ; then
+ elog "You need to copy PAK0.PK3 from your Team Arena CD into"
+ elog "${dir}/missionpack and name it pak0.pk3."
+ elog "Or if you have got a Window installation of Q3 make a symlink to save space."
+ elog
+ elog "Or, re-emerge quake3-teamarena with USE=cdinstall."
+ echo
+ fi
+}
diff --git a/games-fps/quake3-threewave/Manifest b/games-fps/quake3-threewave/Manifest
new file mode 100644
index 00000000000..8c6193009bf
--- /dev/null
+++ b/games-fps/quake3-threewave/Manifest
@@ -0,0 +1,2 @@
+DIST threewave_16_full.zip 187896825 RMD160 079ba03d533363ab27eebae5a157e1b7b198afb6 SHA1 c1bfe4563fdb24dc3c5410a207c986588dd6044b SHA256 c3cb1412cafc61a475ad2f1e93ecf47d7e2f979d973ce82b4a50da3101eca27d
+DIST threewave_17_update.zip 6139861 RMD160 083543d4c75d18bdd0350223b692f915e73250a3 SHA1 7ac072bc39c94bd4bd16628cf8b8b292a237667c SHA256 0fff6a66822c422cb9f6cca0139fa11048fef414c7dd839c50fbcbda80a44433
diff --git a/games-fps/quake3-threewave/metadata.xml b/games-fps/quake3-threewave/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake3-threewave/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild b/games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild
new file mode 100644
index 00000000000..34c800346df
--- /dev/null
+++ b/games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MOD_DESC="Threewave CTF"
+MOD_NAME="Threewave CTF"
+MOD_DIR="threewave"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.threewave.com/"
+SRC_URI="mirror://quakeunity/modifications/threewavectf/threewave_16_full.zip
+ mirror://quakeunity/modifications/threewavectf/threewave_17_update.zip"
+
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack threewave_{16_full,17_update}.zip
+}
diff --git a/games-fps/quake3/Manifest b/games-fps/quake3/Manifest
new file mode 100644
index 00000000000..66d19d27e64
--- /dev/null
+++ b/games-fps/quake3/Manifest
@@ -0,0 +1 @@
+DIST ioquake3-1.36.tar.bz2 3503058 SHA256 79b10b92e9e586748a67089ac871646fe8144004d3ab4a55158348bc38d74821 SHA512 fdd8e0ab56966cdc614eff45ab478b87255cfb1b50ba10b3141bcfcc569fc620d281de93333d39119b2d7b43aac3900ecf826a0459fc89bb2f57e30ae2425645 WHIRLPOOL 5468b57504af5c33c7e8150aaaa27082654fe751f24679f81efe8441b1aab1b63e2013adc758d45799ea9a8e12eb9c39c27506a309f36762fbd07f0c3c4a5b26
diff --git a/games-fps/quake3/files/quake3-1.36-bots.patch b/games-fps/quake3/files/quake3-1.36-bots.patch
new file mode 100644
index 00000000000..31d2f2041c6
--- /dev/null
+++ b/games-fps/quake3/files/quake3-1.36-bots.patch
@@ -0,0 +1,20 @@
+--- code/botlib/l_script.c.orig 2009-11-02 20:29:23.000000000 +0100
++++ code/botlib/l_script.c 2009-11-02 22:21:40.000000000 +0100
+@@ -1118,7 +1118,7 @@
+ {
+ if (*string == '\"')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string));
+ } //end if
+ if (string[strlen(string)-1] == '\"')
+ {
+@@ -1135,7 +1135,7 @@
+ {
+ if (*string == '\'')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string));
+ } //end if
+ if (string[strlen(string)-1] == '\'')
+ {
diff --git a/games-fps/quake3/files/quake3-1.36-remove-bundled-jpeg.patch b/games-fps/quake3/files/quake3-1.36-remove-bundled-jpeg.patch
new file mode 100644
index 00000000000..485dd71d204
--- /dev/null
+++ b/games-fps/quake3/files/quake3-1.36-remove-bundled-jpeg.patch
@@ -0,0 +1,72 @@
+--- Makefile.orig 2012-08-21 12:19:01.344696519 +0400
++++ Makefile 2012-08-21 12:19:23.506696348 +0400
+@@ -164,7 +164,6 @@
+ NDIR=$(MOUNT_DIR)/null
+ UIDIR=$(MOUNT_DIR)/ui
+ Q3UIDIR=$(MOUNT_DIR)/q3_ui
+-JPDIR=$(MOUNT_DIR)/jpeg-6b
+ SPEEXDIR=$(MOUNT_DIR)/libspeex
+ Q3ASMDIR=$(MOUNT_DIR)/tools/asm
+ LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg
+@@ -297,7 +296,7 @@
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ THREAD_LIBS=-lpthread
+- LIBS=-ldl -lm
++ LIBS=-ldl -lm -ljpeg
+
+ CLIENT_LIBS=$(shell sdl-config --libs) -lGL
+
+@@ -1297,42 +1296,6 @@
+ $(B)/client/l_script.o \
+ $(B)/client/l_struct.o \
+ \
+- $(B)/client/jcapimin.o \
+- $(B)/client/jcapistd.o \
+- $(B)/client/jccoefct.o \
+- $(B)/client/jccolor.o \
+- $(B)/client/jcdctmgr.o \
+- $(B)/client/jchuff.o \
+- $(B)/client/jcinit.o \
+- $(B)/client/jcmainct.o \
+- $(B)/client/jcmarker.o \
+- $(B)/client/jcmaster.o \
+- $(B)/client/jcomapi.o \
+- $(B)/client/jcparam.o \
+- $(B)/client/jcphuff.o \
+- $(B)/client/jcprepct.o \
+- $(B)/client/jcsample.o \
+- $(B)/client/jdapimin.o \
+- $(B)/client/jdapistd.o \
+- $(B)/client/jdatasrc.o \
+- $(B)/client/jdcoefct.o \
+- $(B)/client/jdcolor.o \
+- $(B)/client/jddctmgr.o \
+- $(B)/client/jdhuff.o \
+- $(B)/client/jdinput.o \
+- $(B)/client/jdmainct.o \
+- $(B)/client/jdmarker.o \
+- $(B)/client/jdmaster.o \
+- $(B)/client/jdpostct.o \
+- $(B)/client/jdsample.o \
+- $(B)/client/jdtrans.o \
+- $(B)/client/jerror.o \
+- $(B)/client/jfdctflt.o \
+- $(B)/client/jidctflt.o \
+- $(B)/client/jmemmgr.o \
+- $(B)/client/jmemnobs.o \
+- $(B)/client/jutils.o \
+- \
+ $(B)/client/tr_animation.o \
+ $(B)/client/tr_backend.o \
+ $(B)/client/tr_bsp.o \
+@@ -1921,9 +1884,6 @@
+ $(B)/client/%.o: $(BLIBDIR)/%.c
+ $(DO_BOT_CC)
+
+-$(B)/client/%.o: $(JPDIR)/%.c
+- $(DO_CC)
+-
+ $(B)/client/%.o: $(SPEEXDIR)/%.c
+ $(DO_CC)
+
diff --git a/games-fps/quake3/metadata.xml b/games-fps/quake3/metadata.xml
new file mode 100644
index 00000000000..360c025739d
--- /dev/null
+++ b/games-fps/quake3/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+Quake III Arena is the third installment of the extremely popular and
+successful Quake series by id software. The game was released by id
+software for both Windows and Linux. The Linux version of the game was
+maintained and sold by the now defunct Loki Entertainment. The powerful
+Quake III engine is the basis for many other commercial games, as id's
+major source of revenue is licensing their game engines. The engine
+allows for user-contributed modifications to be made, allowing the game
+to be extensible and expandable. This game is commercial software, and
+requires the data from a retail copy of the game to play. If you're
+interested in checking out the technology behind Quake III, then
+"emerge quake3-demo" to get the playable demo.
+</longdescription>
+ <use>
+ <flag name="mumble">Adds player-location (positional audio) support to VoIP</flag>
+ <flag name="teamarena">Adds support for Team Arena expansion pack</flag>
+ <flag name="voice">Adds VoIP support</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/quake3/quake3-1.36-r1.ebuild b/games-fps/quake3/quake3-1.36-r1.ebuild
new file mode 100644
index 00000000000..119a5e9509d
--- /dev/null
+++ b/games-fps/quake3/quake3-1.36-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# quake3-9999 -> latest svn
+# quake3-9999.REV -> use svn REV
+# quake3-VER_alphaREV -> svn snapshot REV for version VER
+# quake3-VER -> normal quake release
+
+EAPI=2
+inherit eutils flag-o-matic games toolchain-funcs
+[[ "${PV}" == 9999* ]] && inherit subversion
+
+MY_PN="ioquake3"
+MY_PV="${PV}"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Quake III Arena - 3rd installment of the classic id 3D first-person shooter"
+HOMEPAGE="http://ioquake3.org/"
+[[ "${PV}" != 9999* ]] && SRC_URI="http://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2"
+ESVN_REPO_URI="svn://svn.icculus.org/quake3/trunk"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ~ppc x86 ~x86-fbsd"
+# "smp" is omitted, because currently it does not work.
+IUSE="dedicated opengl teamarena +openal curl vorbis voice mumble"
+
+UIDEPEND="virtual/opengl
+ media-libs/libsdl[sound,video,joystick,X,opengl]
+ openal? ( media-libs/openal )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ voice? ( media-libs/speex )
+ curl? ( net-misc/curl )"
+DEPEND="opengl? ( ${UIDEPEND} )
+ !dedicated? ( ${UIDEPEND} )"
+UIRDEPEND="voice? ( mumble? ( media-sound/mumble ) )"
+RDEPEND="${DEPEND}
+ opengl? ( ${UIRDEPEND} )
+ !dedicated? ( ${UIRDEPEND} )
+ games-fps/quake3-data
+ teamarena? ( games-fps/quake3-teamarena )"
+
+if [[ "${PV}" == 9999* ]] ; then
+ S="${WORKDIR}/trunk"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+my_arch() {
+ case "${ARCH}" in
+ x86) echo "i386" ;;
+ amd64) echo "x86_64" ;;
+ *) tc-arch-kernel ;;
+ esac
+}
+
+my_platform() {
+ usex kernel_linux linux freebsd
+}
+
+src_prepare() {
+ if [[ "${PV}" == 9999* ]] ; then
+ # Workaround for the version string
+ ln -s "${ESVN_WC_PATH}/.svn" .svn || die "ln ${ESVN_WC_PATH}/.svn"
+ else
+ epatch "${FILESDIR}"/${P}-bots.patch
+ fi
+
+ einfo "Fixing libspeex linking..."
+ sed -i -e 's/\(-lspeex\)/\1 -lspeexdsp/' Makefile || die "sed failed"
+
+ # Use system jpeg library
+# epatch "${FILESDIR}"/${P}-remove-bundled-jpeg.patch
+}
+
+src_compile() {
+
+ buildit() { use $1 && echo 1 || echo 0 ; }
+
+ # This is the easiest way to pass CPPFLAGS to the build system, which
+ # are otherwise ignored.
+ append-flags ${CPPFLAGS}
+
+ # OPTIMIZE is disabled in favor of CFLAGS.
+ #
+ # TODO: BUILD_CLIENT_SMP=$(buildit smp)
+ emake \
+ ARCH="$(my_arch)" \
+ BUILD_CLIENT=$(( $(buildit opengl) | $(buildit !dedicated) )) \
+ BUILD_GAME_QVM=0 \
+ BUILD_GAME_SO=0 \
+ BUILD_SERVER=$(buildit dedicated) \
+ DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
+ GENERATE_DEPENDENCIES=0 \
+ OPTIMIZE="" \
+ PLATFORM="$(my_platform)" \
+ USE_CODEC_VORBIS=$(buildit vorbis) \
+ USE_CURL=$(buildit curl) \
+ USE_CURL_DLOPEN=0 \
+ USE_INTERNAL_SPEEX=0 \
+ USE_INTERNAL_ZLIB=0 \
+ USE_LOCAL_HEADERS=0 \
+ USE_MUMBLE=$(buildit mumble) \
+ USE_OPENAL=$(buildit openal) \
+ USE_OPENAL_DLOPEN=0 \
+ USE_VOIP=$(buildit voice) \
+ || die "emake failed"
+}
+
+src_install() {
+ dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README TODO || die
+ if use voice ; then
+ dodoc voip-readme.txt || die
+ fi
+
+ if use opengl || ! use dedicated ; then
+ doicon misc/quake3.svg || die
+ make_desktop_entry quake3 "Quake III Arena"
+ #use smp && make_desktop_entry quake3-smp "Quake III Arena (SMP)"
+ fi
+
+ cd build/release-$(my_platform)-$(my_arch) || die
+ local exe target
+ for exe in {ioquake3,ioquake3-smp,ioq3ded}.$(my_arch) ; do
+ if [[ -x ${exe} ]] ; then
+ target=${exe%.*}
+ newgamesbin ${exe} ${target} || die "newgamesbin ${target}"
+ dosym ${target} "${GAMES_BINDIR}/${target/io}" || die "dosym ${target}"
+ fi
+ done
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ ewarn "The source version of Quake III Arena will not work with PunkBuster."
+ ewarn "If you need PB support, then use the games-fps/quake3-bin package."
+}
diff --git a/games-fps/quake3/quake3-9999.ebuild b/games-fps/quake3/quake3-9999.ebuild
new file mode 100644
index 00000000000..5a58d6cd6e0
--- /dev/null
+++ b/games-fps/quake3/quake3-9999.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# quake3-9999 -> latest git
+# quake3-9999.REV -> use git REV
+# quake3-VER_alphaREV -> git snapshot REV for version VER
+# quake3-VER -> normal quake release
+
+EAPI=2
+inherit eutils flag-o-matic games toolchain-funcs
+[[ "${PV}" == 9999* ]] && inherit git-2
+
+MY_PN="ioquake3"
+MY_PV="${PV}"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Quake III Arena - 3rd installment of the classic id 3D first-person shooter"
+HOMEPAGE="http://ioquake3.org/"
+[[ "${PV}" != 9999* ]] && SRC_URI="http://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2"
+EGIT_REPO_URI="git://github.com/ioquake/ioq3.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+# "smp" is omitted, because currently it does not work.
+IUSE="dedicated opengl teamarena +openal curl vorbis voice mumble"
+
+UIDEPEND="virtual/opengl
+ media-libs/libsdl[sound,video,joystick,X,opengl]
+ virtual/jpeg
+ openal? ( media-libs/openal )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ voice? ( media-libs/speex )
+ curl? ( net-misc/curl )"
+DEPEND="opengl? ( ${UIDEPEND} )
+ !dedicated? ( ${UIDEPEND} )"
+UIRDEPEND="voice? ( mumble? ( media-sound/mumble ) )"
+RDEPEND="${DEPEND}
+ opengl? ( ${UIRDEPEND} )
+ !dedicated? ( ${UIRDEPEND} )
+ games-fps/quake3-data
+ teamarena? ( games-fps/quake3-teamarena )"
+
+if [[ "${PV}" == 9999* ]] ; then
+ S="${WORKDIR}/trunk"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+my_arch() {
+ case "${ARCH}" in
+ x86) echo "i386" ;;
+ amd64) echo "x86_64" ;;
+ *) tc-arch-kernel ;;
+ esac
+}
+
+my_platform() {
+ usex kernel_linux linux freebsd
+}
+
+src_compile() {
+
+ buildit() { use $1 && echo 1 || echo 0 ; }
+
+ # This is the easiest way to pass CPPFLAGS to the build system, which
+ # are otherwise ignored.
+ append-flags ${CPPFLAGS}
+
+ # Workaround for used zlib macro, wrt bug #449510
+ append-flags -DOF=_Z_OF
+
+ # OPTIMIZE is disabled in favor of CFLAGS.
+ #
+ # TODO: BUILD_CLIENT_SMP=$(buildit smp)
+ emake \
+ ARCH="$(my_arch)" \
+ BUILD_CLIENT=$(( $(buildit opengl) | $(buildit !dedicated) )) \
+ BUILD_GAME_QVM=0 \
+ BUILD_GAME_SO=0 \
+ BUILD_SERVER=$(buildit dedicated) \
+ DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
+ FULLBINEXT="" \
+ GENERATE_DEPENDENCIES=0 \
+ OPTIMIZE="" \
+ PLATFORM="$(my_platform)" \
+ USE_CODEC_VORBIS=$(buildit vorbis) \
+ USE_CURL=$(buildit curl) \
+ USE_CURL_DLOPEN=0 \
+ USE_INTERNAL_JPEG=0 \
+ USE_INTERNAL_SPEEX=0 \
+ USE_INTERNAL_ZLIB=0 \
+ USE_LOCAL_HEADERS=0 \
+ USE_MUMBLE=$(buildit mumble) \
+ USE_OPENAL=$(buildit openal) \
+ USE_OPENAL_DLOPEN=0 \
+ USE_VOIP=$(buildit voice) \
+ || die "emake failed"
+}
+
+src_install() {
+ dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README.md opengl2-readme.txt TODO voip-readme.txt || die
+ if use voice ; then
+ dodoc voip-readme.txt || die
+ fi
+
+ if use opengl || ! use dedicated ; then
+ doicon misc/quake3.svg || die
+ make_desktop_entry quake3 "Quake III Arena"
+ #use smp && make_desktop_entry quake3-smp "Quake III Arena (SMP)"
+ fi
+
+ cd build/release-$(my_platform)-$(my_arch) || die
+ local exe
+ for exe in ioquake3 ioquake3-smp ioq3ded ; do
+ if [[ -x ${exe} ]] ; then
+ dogamesbin ${exe} || die "dogamesbin ${exe}"
+ dosym ${exe} "${GAMES_BINDIR}/${exe/io}" || die "dosym ${exe}"
+ fi
+ done
+
+ # Install renderer libraries, wrt bug #449510
+ # this should be done through 'dogameslib', but
+ # for this some files need to be patched
+ exeinto "${GAMES_DATADIR}/${PN}"
+ doexe renderer*.so || die 'install renderers failed'
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ ewarn "The source version of Quake III Arena will not work with PunkBuster."
+ ewarn "If you need PB support, then use the games-fps/quake3-bin package."
+}
diff --git a/games-fps/quake4-bin/Manifest b/games-fps/quake4-bin/Manifest
new file mode 100644
index 00000000000..e9a601052a0
--- /dev/null
+++ b/games-fps/quake4-bin/Manifest
@@ -0,0 +1 @@
+DIST quake4-linux-1.4.2.x86.run 287552973 SHA256 9203b387b1a4075a1b9ad1eb7be32b49a88141a448d9330d9cbe1f40a145bd6a SHA512 a6a390a8f46c7e696fe865d0688c9a95eb0d9e32ad62ecb796dcc03618994ec065e8c74358518221cb6c8771d2414ed7e144c77a1a8ecd4ae9ce6406459c5f36 WHIRLPOOL 14064a8553a3e4b4defb74e450beaade3b687c7b102ad71881c0fa86f5e3f0e848f2b6e6c896a1c6e8bc3faadc8969535e30dfb315e9009ae902c64de1bbed9a
diff --git a/games-fps/quake4-bin/metadata.xml b/games-fps/quake4-bin/metadata.xml
new file mode 100644
index 00000000000..c833f8d5ea1
--- /dev/null
+++ b/games-fps/quake4-bin/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+In a desparate war for Earth's survival against and unrelenting alient enemy,
+the only way to defeat them is to become one of them.
+
+Earth is under seige by the Strogg, a barbaric alien race moving through the
+universe consuming, recycling and annihilating any civilization in their path.
+In a deperate attempt to survive, an armada of Earth's finest warriors is sent
+to take the battle to the Strogg home planet.
+
+You are Matthow Kane, an elite member of Rhino Squad and Eath's valiant invasion
+force. Fight alone, with your squad, or in hover tanks and mechanized walkers
+as you engage in a heroic mission the the heart of the Strogg war machine.
+
+Quake 4 is the fourth installment of the extremely popular and successful Quake
+series by id software. This game is commercial software, and requires the data
+from a retail copy of the game to play.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/quake4-bin/quake4-bin-1.4.2-r1.ebuild b/games-fps/quake4-bin/quake4-bin-1.4.2-r1.ebuild
new file mode 100644
index 00000000000..6c11f747c25
--- /dev/null
+++ b/games-fps/quake4-bin/quake4-bin-1.4.2-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Sequel to Quake 2, an id Software 3D first-person shooter"
+HOMEPAGE="http://www.quake4game.com/"
+SRC_URI="mirror://idsoftware/quake4/linux/quake4-linux-${PV}.x86.run"
+
+LICENSE="QUAKE4"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="cdinstall dedicated linguas_cs linguas_fr linguas_it linguas_pl linguas_ru"
+RESTRICT="strip"
+
+# QUAKE4 NEEDS s3tc support, which can be obtained for OSS drivers via
+# media-libs/libtxc_dxtn and is built into the proprietary drivers.
+# depend optionally on them but elog too, in case a user has both
+# proprietary and OSS drivers installed and sees the segfault.
+
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ sys-libs/zlib[abi_x86_32(-)]
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ || (
+ >=media-libs/libtxc_dxtn-1.0.1-r1[abi_x86_32(-)]
+ x11-drivers/nvidia-drivers
+ >=x11-drivers/ati-drivers-8.8.25-r1
+ )
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[X,opengl,sound,abi_x86_32(-)]
+ )
+ cdinstall? ( games-fps/quake4-data )"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/quake4
+Ddir=${D}/${dir}
+
+QA_TEXTRELS="${dir:1}/pb/pbag.so
+ ${dir:1}/pb/pbags.so
+ ${dir:1}/pb/pbcl.so
+ ${dir:1}/pb/pbcls.so
+ ${dir:1}/pb/pbsv.so
+ ${dir:1}/libSDL-1.2.id.so.0"
+QA_EXECSTACK="${dir:1}/quake4.x86
+ ${dir:1}/quake4smp.x86
+ ${dir:1}/q4ded.x86
+ ${dir:1}/libSDL-1.2.id.so.0"
+
+zpaklang() {
+ if ! use linguas_${1} ; then
+ einfo "Removing ${2} zpak files"
+ rm -f q4base/zpak_${2}*
+ fi
+}
+
+src_unpack() {
+ unpack_makeself ${A}
+
+ mv q4icon.bmp quake4.bmp || die
+
+ # Am including the Spanish files because Spanish is the default language
+ #zpaklang es spanish
+ zpaklang cs czech
+ zpaklang fr french
+ zpaklang it italian
+ zpaklang pl polish
+ zpaklang ru russian
+
+ # Rename the .off files, so they will be used
+ cd q4base
+ if [[ ! -z $(ls *.off 2> /dev/null) ]] ; then
+ local f
+ for f in *.off ; do
+ einfo "Renaming ${f}"
+ mv "${f}" "${f%.off}" || die "mv ${f}"
+ done
+ fi
+}
+
+src_install() {
+ insinto "${dir}"
+ doins CHANGES* License.txt sdl.patch.1.2.10 us/version.info
+ doins -r pb q4mp
+ dodoc README*
+
+ insinto "${dir}"/q4base
+ doins q4base/* us/q4base/* || die "doins q4base"
+ games_make_wrapper quake4-ded ./q4ded.x86 "${dir}" "${dir}"
+
+ exeinto "${dir}"
+ doexe openurl.sh bin/Linux/x86/q4ded.x86
+
+ if ! use dedicated ; then
+ doexe bin/Linux/x86/{quake4{,smp}.x86,*.id.so.?}
+ doicon quake4.bmp || die "doicon"
+ games_make_wrapper quake4 "./quake4.x86" "${dir}" "${dir}"
+ games_make_wrapper quake4-smp ./quake4smp.x86 "${dir}" "${dir}"
+ icon_path="quake4"
+ if [ -e "${FILESDIR}"/quake4.png ]
+ then
+ doicon "${FILESDIR}"/quake4.png || die "copying icon"
+ elif [ -e "${DISTDIR}"/quake4.png ]
+ then
+ doicon "${DISTDIR}"/quake4.png || die "copying icon"
+ else
+ icon_path=/usr/share/pixmaps/quake4.bmp
+ fi
+ make_desktop_entry quake4 "Quake IV" ${icon_path}
+ make_desktop_entry quake4-smp "Quake IV (SMP)" ${icon_path}
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use cdinstall ; then
+ elog "You need to copy pak001.pk4 through pak012.pk4, along with"
+ elog "zpak*.pk4 from either your installation media or your hard drive"
+ elog "to ${dir}/q4base before running the game."
+ echo
+ fi
+ if ! use dedicated ; then
+ elog "To play the game, run: quake4"
+ elog
+ # The default language is Spanish!
+ elog "To reset the language from Spanish to English, run:"
+ elog " sed -i 's:spanish:english:' ~/.quake4/q4base/Quake4Config.cfg"
+ elog
+ elog "Saved games from previous Quake 4 versions might not be compatible."
+ elog
+ elog "If you get a segmentation fault or an error regarding"
+ elog "'GL_EXT_texture_compression_s3tc', you can obtain the"
+ elog "necessary support for your mesa drivers by installing"
+ elog "media-libs/libtxc_dxtn (for abi_x86_32 if multilib)."
+ echo
+ fi
+ elog "To start the dedicated server, run: quake4-ded"
+}
diff --git a/games-fps/quake4-data/metadata.xml b/games-fps/quake4-data/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-fps/quake4-data/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild b/games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild
new file mode 100644
index 00000000000..7170bd90316
--- /dev/null
+++ b/games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils cdrom games
+
+DESCRIPTION="sequel to Quake 2, an id 3D first-person shooter"
+HOMEPAGE="http://www.quake4game.com/"
+SRC_URI=""
+
+LICENSE="QUAKE4"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="app-arch/bzip2
+ app-arch/tar"
+RDEPEND=""
+PDEPEND="games-fps/quake4-bin"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/quake4
+Ddir=${D}/${dir}
+
+src_install() {
+ cdrom_get_cds Setup/Data/q4base/pak012.pk4 \
+ Setup/Data/q4base/pak001.pk4 \
+ Setup/Data/q4base/pak004.pk4 \
+ Setup/Data/q4base/pak007.pk4
+ insinto "${dir}"/q4base
+ einfo "Copying files from Disk 1..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak01{0,1,2}.pk4 \
+ "${CDROM_ROOT}"/Setup/Data/q4base/zpak*.pk4 \
+ || die "copying pak010->pak012 and zpack*"
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 2..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{1,2,3}.pk4 \
+ || die "copying pak001->pak003"
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 3..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{4,5,6}.pk4 \
+ || die "copying pak004->pak006"
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 4..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{7,8,9}.pk4 \
+ || die "copying pak007->pak009"
+
+ find "${Ddir}" -exec touch '{}' +
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "This is just the data portion of the game. You need to merge"
+ elog "games-fps/quake4-bin to play."
+ echo
+}
diff --git a/games-fps/quake4-demo/Manifest b/games-fps/quake4-demo/Manifest
new file mode 100644
index 00000000000..167515eb34e
--- /dev/null
+++ b/games-fps/quake4-demo/Manifest
@@ -0,0 +1 @@
+DIST quake4-linux-1.0-demo.x86.run 337276597 SHA256 69e69e8cb22dd1496bcc98dc63f244d35c516c2e770aba64c72275827814bc73 SHA512 c7fa64ca9f95ab61fd02f2d7d3a85c718a5dea9f60a89ba8b46e7500f090fe45bbe498775e41541e33a0bb3483b75da10529755bef3a97d3e362d1c173a02abe WHIRLPOOL 96103978541635dbc5c24718debbc0e2b631a54f2e61ed4960f6c73cc3c10309827c1be7f9d10994e69699956eca77c5ebfc20d612d9f7968cdb16068fcfb6dd
diff --git a/games-fps/quake4-demo/metadata.xml b/games-fps/quake4-demo/metadata.xml
new file mode 100644
index 00000000000..83edc89772b
--- /dev/null
+++ b/games-fps/quake4-demo/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+In a desparate war for Earth's survival against and unrelenting alient enemy,
+the only way to defeat them is to become one of them.
+
+Earth is under seige by the Strogg, a barbaric alien race moving through the
+universe consuming, recycling and annihilating any civilization in their path.
+In a deperate attempt to survive, an armada of Earth's finest warriors is sent
+to take the battle to the Strogg home planet.
+
+You are Matthow Kane, an elite member of Rhino Squad and Eath's valiant invasion
+force. Fight alone, with your squad, or in hover tanks and mechanized walkers
+as you engage in a heroic mission the the heart of the Strogg war machine.
+
+Quake 4 is the fourth installment of the extremely popular and successful Quake
+series by id software. This is the demo version of the commercial game.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/quake4-demo/quake4-demo-1.0-r1.ebuild b/games-fps/quake4-demo/quake4-demo-1.0-r1.ebuild
new file mode 100644
index 00000000000..797f157a22a
--- /dev/null
+++ b/games-fps/quake4-demo/quake4-demo-1.0-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_P="quake4-linux-${PV}-demo"
+DESCRIPTION="Sequel to Quake 2, an Id 3D first-person shooter"
+HOMEPAGE="http://www.quake4game.com/"
+SRC_URI="mirror://idsoftware/quake4/demo/${MY_P}.x86.run
+ http://www.3ddownloads.com/Action/Quake%204/Demos/${MY_P}.x86.run
+ mirror://3dgamers/quake4/${MY_P}.x86.run
+ http://filebase.gmpf.de/quake4/${MY_P}.x86.run
+ http://www.holarse.de/mirror/${MY_P}.x86.run
+ http://sonic-lux.net/data/mirror/quake4/${MY_P}.x86.run"
+
+LICENSE="QUAKE4"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="dedicated"
+RESTRICT="strip"
+
+# QUAKE4 NEEDS s3tc support, which can be obtained for OSS drivers via
+# media-libs/libtxc_dxtn and is built into the proprietary drivers.
+# depend optionally on them but elog too, in case a user has both
+# proprietary and OSS drivers installed and sees the segfault.
+
+RDEPEND="sys-libs/glibc
+ sys-libs/libstdc++-v3:5
+ amd64? ( sys-libs/glibc[multilib] sys-libs/libstdc++-v3:5[multilib] )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ || (
+ >=media-libs/libtxc_dxtn-1.0.1-r1[abi_x86_32(-)]
+ x11-drivers/nvidia-drivers
+ >=x11-drivers/ati-drivers-8.8.25-r1
+ )
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[X,opengl,sound,abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+QA_PREBUILT="${dir:1}/quake4.x86
+ ${dir:1}/q4ded.x86"
+
+src_install() {
+ insinto "${dir}"
+ doins License.txt q4icon.bmp version.info
+ dodoc README
+
+ exeinto "${dir}"
+ doexe openurl.sh bin/Linux/x86/q4ded.x86
+ games_make_wrapper ${PN}-ded ./q4ded.x86 "${dir}" "${dir}"
+
+ insinto "${dir}"/q4base
+ doins q4base/*
+
+ if ! use dedicated ; then
+ doexe bin/Linux/x86/quake4.x86
+ games_make_wrapper ${PN} ./quake4.x86 "${dir}" "${dir}"
+ newicon q4icon.bmp ${PN}.bmp || die
+ make_desktop_entry ${PN} "Quake IV (Demo)" /usr/share/applications/${PN}.bmp
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if ! use dedicated; then
+ elog "To play the game run:"
+ elog " quake4-demo"
+ echo
+ elog "If you get a segmentation fault or an error regarding"
+ elog "'GL_EXT_texture_compression_s3tc', you can obtain the"
+ elog "necessary support for your mesa drivers by installing"
+ elog "media-libs/libtxc_dxtn (for abi_x86_32 if multilib)."
+ echo
+ fi
+ elog "To start the gameserver, run:"
+ elog " quake4-demo-ded"
+}
diff --git a/games-fps/quakeforge/Manifest b/games-fps/quakeforge/Manifest
new file mode 100644
index 00000000000..21e1c551126
--- /dev/null
+++ b/games-fps/quakeforge/Manifest
@@ -0,0 +1,2 @@
+DIST quakeforge-0.5.5.tar.bz2 1954072 SHA256 9ff29340f571fc26d19992a32f58e767e1b811248688f383083bc2ccb263ec6a SHA512 0e81fbe2ef4fd1f491e2b46f222807eaa1b1dadf1e5200d3cd4609146050664a68c801c48418a3632a5ad0798ea9ec4eed70da03c2f90abb5fd1291adc95399c WHIRLPOOL 7442e2f2f8641b41cfbfb4206605faadc6f738bf9151c033ca8b39110428621b19e158ea185d4236069165738027a104dc939944bfb758021dbd85809276430c
+DIST quakeforge-0.7.2.tar.bz2 2887823 SHA256 1ddc8c963b23bd648d94af48062ab0448345761defeceaef7c62be55c4a28d7a SHA512 d296e10b86466aee0a4be527a5fea7a44bae60ebef52ad86381744dc96e2bed2ad14d3b790b4514a5c59ac897662e91b80a9d49c822910930742a1d2b8a2ec55 WHIRLPOOL 11a4465435f42ba866806d4d4ede34a4a4e6b42b9e4fd6696c10e55bba4182762dc890ddff463bd9ad00b937d36dbde269886683f6f85b639a0ea6a30f5f6e4a
diff --git a/games-fps/quakeforge/files/0.5.5-ipv6.patch b/games-fps/quakeforge/files/0.5.5-ipv6.patch
new file mode 100644
index 00000000000..96b92774dda
--- /dev/null
+++ b/games-fps/quakeforge/files/0.5.5-ipv6.patch
@@ -0,0 +1,10 @@
+--- libs/net/nc/net_udp6.c.orig 2004-05-16 04:21:18.334083592 -0400
++++ libs/net/nc/net_udp6.c 2004-05-16 04:21:31.513080080 -0400
+@@ -123,6 +123,7 @@
+
+ netadr_t net_from;
+ netadr_t net_local_adr;
++netadr_t net_loopback_adr;
+ int net_socket;
+
+ static sizebuf_t _net_message_message;
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-amd64.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-amd64.patch
new file mode 100644
index 00000000000..ed33e45343f
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-amd64.patch
@@ -0,0 +1,14 @@
+diff -Naur quakeforge-0.5.5/libs/video/renderer/sw/Makefile.in quakeforge-0.5.5-modified/libs/video/renderer/sw/Makefile.in
+--- quakeforge-0.5.5/libs/video/renderer/sw/Makefile.in 2004-05-02 16:52:12.000000000 -0400
++++ quakeforge-0.5.5-modified/libs/video/renderer/sw/Makefile.in 2007-06-24 22:29:59.000000000 -0400
+@@ -403,8 +403,8 @@
+ target_vendor = @target_vendor@
+ vid_libs = @vid_libs@
+ AUTOMAKE_OPTIONS = foreign
+-AM_CFLAGS = @PREFER_NON_PIC@
+-AM_CCASFLAGS = @PREFER_NON_PIC@
++AM_CFLAGS = -fPIC
++AM_CCASFLAGS = -fPIC
+ INCLUDES = -I$(top_srcdir)/include
+ @ASM_ARCH_FALSE@asm =
+ @ASM_ARCH_TRUE@asm = libasm.la
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-gcc41.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-gcc41.patch
new file mode 100644
index 00000000000..a609c502ee5
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-gcc41.patch
@@ -0,0 +1,342 @@
+diff -burN quakeforge-0.5.5/libs/audio/cd/cd_file.c quakeforge-new/libs/audio/cd/cd_file.c
+--- quakeforge-0.5.5/libs/audio/cd/cd_file.c 2004-02-07 21:39:44.000000000 -0500
++++ quakeforge-new/libs/audio/cd/cd_file.c 2006-03-28 14:50:26.000000000 -0500
+@@ -84,7 +84,7 @@
+ static int current_track; // current track, used when pausing
+ static plitem_t *tracklist = NULL; // parsed tracklist, dictionary format
+
+-static cvar_t *bgmvolume; // volume cvar
++cvar_t *bgmvolume; // volume cvar
+ static cvar_t *mus_ogglist; // tracklist cvar
+
+
+diff -burN quakeforge-0.5.5/libs/audio/cd/cd_linux.c quakeforge-new/libs/audio/cd/cd_linux.c
+--- quakeforge-0.5.5/libs/audio/cd/cd_linux.c 2004-02-07 00:35:15.000000000 -0500
++++ quakeforge-new/libs/audio/cd/cd_linux.c 2006-03-28 14:50:40.000000000 -0500
+@@ -79,7 +79,7 @@
+ static int cdfile = -1;
+
+ static cvar_t *mus_cddevice;
+-static cvar_t *bgmvolume;
++cvar_t *bgmvolume;
+
+
+ static void
+diff -burN quakeforge-0.5.5/libs/audio/cd/cd_sdl.c quakeforge-new/libs/audio/cd/cd_sdl.c
+--- quakeforge-0.5.5/libs/audio/cd/cd_sdl.c 2004-03-20 23:59:02.000000000 -0500
++++ quakeforge-new/libs/audio/cd/cd_sdl.c 2006-03-28 14:50:52.000000000 -0500
+@@ -65,7 +65,7 @@
+ static SDL_CD *cd_id;
+ static float cdvolume = 1.0;
+
+-static cvar_t *bgmvolume;
++ cvar_t *bgmvolume;
+
+
+ static void
+diff -burN quakeforge-0.5.5/libs/audio/cd/cd_sgi.c quakeforge-new/libs/audio/cd/cd_sgi.c
+--- quakeforge-0.5.5/libs/audio/cd/cd_sgi.c 2004-02-07 00:35:15.000000000 -0500
++++ quakeforge-new/libs/audio/cd/cd_sgi.c 2006-03-28 14:51:01.000000000 -0500
+@@ -65,7 +65,7 @@
+ static char cd_dev[] = "/dev/cdrom";
+
+ static CDPLAYER *cdp = NULL;
+-static cvar_t *bgmvolume;
++cvar_t *bgmvolume;
+
+ static void
+ I_SGI_Eject (void)
+diff -burN quakeforge-0.5.5/libs/audio/cd/cd_win.c quakeforge-new/libs/audio/cd/cd_win.c
+--- quakeforge-0.5.5/libs/audio/cd/cd_win.c 2004-02-07 00:35:15.000000000 -0500
++++ quakeforge-new/libs/audio/cd/cd_win.c 2006-03-28 14:51:07.000000000 -0500
+@@ -68,7 +68,7 @@
+ static void I_CDAudio_Play (int track, qboolean looping);
+ static void I_CDAudio_Stop (void);
+
+-static cvar_t *bgmvolume;
++cvar_t *bgmvolume;
+
+
+ static void
+diff -burN quakeforge-0.5.5/libs/audio/renderer/snd_dma.c quakeforge-new/libs/audio/renderer/snd_dma.c
+--- quakeforge-0.5.5/libs/audio/renderer/snd_dma.c 2004-03-01 06:51:01.000000000 -0500
++++ quakeforge-new/libs/audio/renderer/snd_dma.c 2006-03-28 14:54:03.000000000 -0500
+@@ -72,17 +72,17 @@
+ static channel_t *static_channels[MAX_CHANNELS];
+ static int num_statics;
+
+-static qboolean snd_initialized = false;
+-static int snd_blocked = 0;
++qboolean snd_initialized = false;
++int snd_blocked = 0;
+ static qboolean snd_ambient = 1;
+
+-static vec3_t listener_origin;
+-static vec3_t listener_forward;
+-static vec3_t listener_right;
+-static vec3_t listener_up;
+-static vec_t sound_nominal_clip_dist = 1000.0;
++vec3_t listener_origin;
++vec3_t listener_forward;
++vec3_t listener_right;
++vec3_t listener_up;
++vec_t sound_nominal_clip_dist = 1000.0;
+
+-static unsigned soundtime; // sample PAIRS
++unsigned soundtime; // sample PAIRS
+
+ #define MAX_SFX 512
+ static sfx_t *known_sfx; // hunk allocated [MAX_SFX]
+@@ -97,7 +97,7 @@
+ static cvar_t *ambient_level;
+ static cvar_t *nosound;
+ static cvar_t *precache;
+-static cvar_t *snd_mixahead;
++cvar_t *snd_mixahead;
+ static cvar_t *snd_noextraupdate;
+ static cvar_t *snd_phasesep;
+ static cvar_t *snd_show;
+@@ -122,7 +122,7 @@
+ // isolating performance in the renderer. The fakedma_updates is
+ // number of times s_update() is called per second.
+
+-static qboolean fakedma = false;
++qboolean fakedma = false;
+ //static int fakedma_updates = 15;
+
+
+diff -burN quakeforge-0.5.5/libs/audio/targets/snd_alsa.c quakeforge-new/libs/audio/targets/snd_alsa.c
+--- quakeforge-0.5.5/libs/audio/targets/snd_alsa.c 2004-04-28 21:13:37.000000000 -0400
++++ quakeforge-new/libs/audio/targets/snd_alsa.c 2006-03-28 14:52:01.000000000 -0500
+@@ -43,7 +43,7 @@
+ #include "QF/sys.h"
+
+ static int snd_inited;
+-static int snd_blocked = 0;
++int snd_blocked = 0;
+ static volatile dma_t sn;
+ static snd_pcm_uframes_t buffer_size;
+
+@@ -59,10 +59,10 @@
+ static snd_output_data_t plugin_info_snd_output_data;
+ static snd_output_funcs_t plugin_info_snd_output_funcs;
+
+-static cvar_t *snd_bits;
+-static cvar_t *snd_device;
+-static cvar_t *snd_rate;
+-static cvar_t *snd_stereo;
++cvar_t *snd_bits;
++cvar_t *snd_device;
++cvar_t *snd_rate;
++cvar_t *snd_stereo;
+
+ #define QF_ALSA_NEED(ret, func, params) \
+ static ret (*qf##func) params;
+diff -burN quakeforge-0.5.5/libs/audio/targets/snd_disk.c quakeforge-new/libs/audio/targets/snd_disk.c
+--- quakeforge-0.5.5/libs/audio/targets/snd_disk.c 2004-01-07 22:46:11.000000000 -0500
++++ quakeforge-new/libs/audio/targets/snd_disk.c 2006-03-28 14:51:31.000000000 -0500
+@@ -55,7 +55,7 @@
+
+ static int snd_inited;
+ static QFile *snd_file;
+-static int snd_blocked = 0;
++int snd_blocked = 0;
+ static volatile dma_t sn;
+
+ static plugin_t plugin_info;
+diff -burN quakeforge-0.5.5/libs/audio/targets/snd_oss.c quakeforge-new/libs/audio/targets/snd_oss.c
+--- quakeforge-0.5.5/libs/audio/targets/snd_oss.c 2004-01-15 21:50:26.000000000 -0500
++++ quakeforge-new/libs/audio/targets/snd_oss.c 2006-03-28 14:52:24.000000000 -0500
+@@ -85,10 +85,10 @@
+
+ static int tryrates[] = { 11025, 22050, 22051, 44100, 8000 };
+
+-static cvar_t *snd_stereo;
+-static cvar_t *snd_rate;
+-static cvar_t *snd_device;
+-static cvar_t *snd_bits;
++cvar_t *snd_stereo;
++cvar_t *snd_rate;
++cvar_t *snd_device;
++cvar_t *snd_bits;
+ static cvar_t *snd_oss_mmaped;
+
+ static plugin_t plugin_info;
+diff -burN quakeforge-0.5.5/libs/audio/targets/snd_sdl.c quakeforge-new/libs/audio/targets/snd_sdl.c
+--- quakeforge-0.5.5/libs/audio/targets/snd_sdl.c 2004-01-07 22:46:11.000000000 -0500
++++ quakeforge-new/libs/audio/targets/snd_sdl.c 2006-03-28 14:52:38.000000000 -0500
+@@ -51,7 +51,7 @@
+
+ static dma_t sn;
+ static int snd_inited;
+-static int snd_blocked = 0;
++int snd_blocked = 0;
+
+ static int desired_speed = 11025;
+ static int desired_bits = 16;
+diff -burN quakeforge-0.5.5/libs/console/client.c quakeforge-new/libs/console/client.c
+--- quakeforge-0.5.5/libs/console/client.c 2004-03-01 22:55:17.000000000 -0500
++++ quakeforge-new/libs/console/client.c 2006-03-28 14:56:43.000000000 -0500
+@@ -84,7 +84,7 @@
+
+ static cvar_t *con_notifytime; // seconds
+ static cvar_t *con_alpha;
+-static cvar_t *con_size;
++cvar_t *con_size;
+ static cvar_t *con_speed;
+ static cvar_t *cl_chatmode;
+
+diff -burN quakeforge-0.5.5/libs/console/server.c quakeforge-new/libs/console/server.c
+--- quakeforge-0.5.5/libs/console/server.c 2004-01-27 00:23:36.000000000 -0500
++++ quakeforge-new/libs/console/server.c 2006-03-28 14:56:31.000000000 -0500
+@@ -70,7 +70,7 @@
+
+ #include "compat.h"
+
+-static console_data_t con_data;
++console_data_t con_data;
+
+ static QFile *log_file;
+ static cvar_t *sv_logfile;
+diff -burN quakeforge-0.5.5/libs/gib/gib_classes.c quakeforge-new/libs/gib/gib_classes.c
+--- quakeforge-0.5.5/libs/gib/gib_classes.c 2003-11-28 21:01:31.000000000 -0500
++++ quakeforge-new/libs/gib/gib_classes.c 2006-03-28 14:57:41.000000000 -0500
+@@ -192,7 +192,7 @@
+ unsigned int size;
+ unsigned int i = 0;
+
+- static qboolean
++ qboolean
+ iterator (gib_class_t *class, void *unused)
+ {
+ reply[i++] = class->name;
+@@ -610,13 +610,13 @@
+ gib_classdesc_t desc;
+ enum {CLASS, INSTANCE} mode = INSTANCE;
+
+- static void
++ void
+ mtabfree (void *mtab, void *unused)
+ {
+ free (mtab);
+ }
+
+- static const char *
++ const char *
+ fname (const char *str)
+ {
+ if (mode == INSTANCE)
+diff -burN quakeforge-0.5.5/libs/gib/gib_function.c quakeforge-new/libs/gib/gib_function.c
+--- quakeforge-0.5.5/libs/gib/gib_function.c 2004-04-09 14:18:19.000000000 -0400
++++ quakeforge-new/libs/gib/gib_function.c 2006-03-28 14:58:10.000000000 -0500
+@@ -169,7 +169,7 @@
+ gib_var_t *var;
+ static char argss[] = "args";
+
+- static qboolean
++ qboolean
+ iterate (char *arg, llist_node_t *node)
+ {
+ var = GIB_Var_Get_Complex (&GIB_DATA(cbuf)->locals, &zero,
+@@ -207,7 +207,7 @@
+ gib_var_t *var;
+ static char argss[] = "args";
+
+- static qboolean
++ qboolean
+ iterate (char *arg, llist_node_t *node)
+ {
+ var = GIB_Var_Get_Complex (&GIB_DATA(cbuf)->locals, &zero,
+diff -burN quakeforge-0.5.5/libs/gib/gib_thread.c quakeforge-new/libs/gib/gib_thread.c
+--- quakeforge-0.5.5/libs/gib/gib_thread.c 2003-09-11 02:03:10.000000000 -0400
++++ quakeforge-new/libs/gib/gib_thread.c 2006-03-28 14:58:26.000000000 -0500
+@@ -89,7 +89,7 @@
+ void
+ GIB_Thread_Execute (void)
+ {
+- static qboolean iterator (cbuf_t *cbuf, llist_node_t *node)
++ qboolean iterator (cbuf_t *cbuf, llist_node_t *node)
+ {
+ if (GIB_DATA(cbuf)->program)
+ Cbuf_Execute_Stack (cbuf);
+diff -burN quakeforge-0.5.5/qw/source/cl_chat.c quakeforge-new/qw/source/cl_chat.c
+--- quakeforge-0.5.5/qw/source/cl_chat.c 2003-07-18 02:27:26.000000000 -0400
++++ quakeforge-new/qw/source/cl_chat.c 2006-03-28 15:01:54.000000000 -0500
+@@ -66,7 +66,7 @@
+ static void
+ CL_Ignore_Sanity_Check (void)
+ {
+- static qboolean iterator (ignore_t *ig, llist_node_t *node)
++ qboolean iterator (ignore_t *ig, llist_node_t *node)
+ {
+ if (cl.players[ig->slot].userid != ig->uid) // We got out of sync somehow
+ llist_remove (node);
+@@ -80,12 +80,12 @@
+ {
+ CL_Ignore_Sanity_Check ();
+ if (Cmd_Argc () == 1) {
+- static qboolean live_iterator (ignore_t *ig, llist_node_t *node)
++ qboolean live_iterator (ignore_t *ig, llist_node_t *node)
+ {
+ Sys_Printf ("%5i - %s\n", ig->uid, Info_ValueForKey (cl.players[ig->slot].userinfo, "name"));
+ return true;
+ }
+- static qboolean dead_iterator (ignore_t *ig, llist_node_t *node)
++ qboolean dead_iterator (ignore_t *ig, llist_node_t *node)
+ {
+ Sys_Printf ("%s\n", ig->lastname);
+ return true;
+@@ -145,7 +145,7 @@
+ dstring_t *test = dstring_newstr ();
+ qboolean allowed = true;
+
+- static qboolean iterator (ignore_t *ig, llist_node_t *node)
++ qboolean iterator (ignore_t *ig, llist_node_t *node)
+ {
+ if (cl.players[ig->slot].userid != ig->uid) { // We got out of sync somehow
+ llist_remove (node);
+@@ -183,7 +183,7 @@
+ {
+ ignore_t *found = 0;
+
+- static qboolean iterator (ignore_t *ig, llist_node_t *node)
++ qboolean iterator (ignore_t *ig, llist_node_t *node)
+ {
+ if (!strcmp (ig->lastname, name)) {
+ found = ig;
+diff -burN quakeforge-0.5.5/tools/qfcc/source/method.c quakeforge-new/tools/qfcc/source/method.c
+--- quakeforge-0.5.5/tools/qfcc/source/method.c 2004-02-16 19:39:21.000000000 -0500
++++ quakeforge-new/tools/qfcc/source/method.c 2006-03-28 15:04:18.000000000 -0500
+@@ -61,7 +61,7 @@
+ #include "struct.h"
+ #include "type.h"
+
+-static hashtab_t *known_methods;
++hashtab_t *known_methods;
+
+ static const char *
+ method_get_key (void *meth, void *unused)
+diff -burN quakeforge-0.5.5/libs/video/targets/context_x11.c quakeforge-new/libs/video/targets/context_x11.c
+--- quakeforge-0.5.5/libs/video/targets/context_x11.c 2006-03-29 15:29:07.000000000 -0500
++++ quakeforge-new/libs/video/targets/context_x11.c 2006-03-29 15:29:49.000000000 -0500
+@@ -97,7 +97,7 @@
+ static XF86VidModeModeInfo **vidmodes;
+ static int nummodes;
+ static int original_mode = 0;
+-static vec3_t x_gamma = {-1, -1, -1};
++vec3_t x_gamma = {-1, -1, -1};
+ static qboolean vidmode_avail = false;
+ #endif
+
+diff -burN quakeforge-0.5.5/libs/video/targets/vid_x11.c quakeforge-new/libs/video/targets/vid_x11.c
+--- quakeforge-0.5.5/libs/video/targets/vid_x11.c 2006-03-29 15:29:07.000000000 -0500
++++ quakeforge-new/libs/video/targets/vid_x11.c 2006-03-29 15:30:15.000000000 -0500
+@@ -86,7 +86,7 @@
+ static Colormap x_cmap;
+ static GC x_gc;
+
+-static qboolean doShm;
++qboolean doShm;
+ static XShmSegmentInfo x_shminfo[2];
+
+ static int current_framebuffer;
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-gcc46.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-gcc46.patch
new file mode 100644
index 00000000000..9ce55330c7c
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-gcc46.patch
@@ -0,0 +1,174 @@
+--- libs/audio/cd/Makefile.am.old 2011-04-18 11:40:51.058924897 +0200
++++ libs/audio/cd/Makefile.am 2011-04-18 12:24:29.486917778 +0200
+@@ -5,13 +5,12 @@
+ SDL_LIBS= @SDL_LIBS@
+ XMMS_LIBS= @XMMS_LIBS@
+ plugin_version= 1:0:0
+-plugin_ldflags= @plugin_ldflags@
++plugin_ldflags= @plugin_ldflags@ -module
+ plugin_libadd= @plugin_libadd@
+ EXEEXT=
+
+-plugin_PROGRAMS= @CD_PLUGIN_TARGETS@
+-noinst_PROGRAMS= @CD_PLUGIN_STATIC@
+-EXTRA_PROGRAMS= cd_file.la cd_linux.la cd_sdl.la cd_sgi.la cd_win.la cd_xmms.la
++plugin_LTLIBRARIES= @CD_PLUGIN_TARGETS@
++EXTRA_LTLIBRARIES= cd_file.la cd_linux.la cd_sdl.la cd_sgi.la cd_win.la cd_xmms.la
+
+ cd_file_la_LDFLAGS= $(plugin_ldflags)
+ cd_file_la_SOURCES= cd_file.c
+@@ -20,19 +19,19 @@
+ cd_linux_la_SOURCES= cd_linux.c
+
+ cd_sdl_la_LDFLAGS= $(plugin_ldflags)
+-cd_sdl_la_LDADD= $(SDL_LIBS) $(plugin_libadd)
++cd_sdl_la_LIBADD= $(SDL_LIBS) $(plugin_libadd)
+ cd_sdl_la_CFLAGS= $(SDL_CFLAGS)
+ cd_sdl_la_SOURCES= cd_sdl.c
+
+ cd_sgi_la_LDFLAGS= $(plugin_ldflags)
+-cd_sgi_la_LDADD= $(SGI_CD_LIBS)
++cd_sgi_la_LIBADD= $(SGI_CD_LIBS)
+ cd_sgi_la_SOURCES= cd_sgi.c
+
+ cd_win_la_LDFLAGS= $(plugin_ldflags)
+-cd_win_la_LDADD= $(plugin_libadd)
++cd_win_la_LIBADD= $(plugin_libadd)
+ cd_win_la_SOURCES= cd_win.c
+
+ cd_xmms_la_LDFLAGS= $(plugin_ldflags)
+-cd_xmms_la_LDADD= $(XMMS_LIBS)
++cd_xmms_la_LIBADD= $(XMMS_LIBS)
+ cd_xmms_la_CFLAGS= $(XMMS_CFLAGS)
+ cd_xmms_la_SOURCES= cd_xmms.c
+--- libs/audio/targets/Makefile.am.old 2011-04-18 12:50:20.674846930 +0200
++++ libs/audio/targets/Makefile.am 2011-04-18 12:53:22.220844800 +0200
+@@ -4,39 +4,38 @@
+ INCLUDES= -I$(top_srcdir)/include
+ SDL_LIBS = @SDL_LIBS@
+ plugin_version= 1:0:0
+-plugin_ldflags= @plugin_ldflags@
++plugin_ldflags= @plugin_ldflags@ -module
+ plugin_libadd= @plugin_libadd@
+ EXEEXT=
+
+-plugin_PROGRAMS= @SND_PLUGIN_TARGETS@
+-noinst_PROGRAMS= @SND_PLUGIN_STATIC@
+-EXTRA_PROGRAMS= \
++plugin_LTLIBRARIES= @SND_PLUGIN_TARGETS@
++EXTRA_LTLIBRARIES= \
+ snd_output_sdl.la snd_output_alsa.la snd_output_alsa0_9.la\
+ snd_output_oss.la snd_output_sgi.la snd_output_sun.la \
+ snd_output_win.la snd_output_dx.la snd_output_disk.la
+
+ snd_output_sdl_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_sdl_la_LDADD= $(SDL_LIBS) $(plugin_libadd)
++snd_output_sdl_la_LIBADD= $(SDL_LIBS) $(plugin_libadd)
+ snd_output_sdl_la_CFLAGS= $(SDL_CFLAGS)
+ snd_output_sdl_la_SOURCES= snd_sdl.c
+
+ snd_output_alsa_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_alsa_la_LDADD=
++snd_output_alsa_la_LIBADD=
+ snd_output_alsa_la_CFLAGS= $(ALSA_CFLAGS)
+ snd_output_alsa_la_SOURCES= snd_alsa.c
+
+ snd_output_alsa0_9_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_alsa0_9_la_LDADD=
++snd_output_alsa0_9_la_LIBADD=
+ snd_output_alsa0_9_la_CFLAGS= $(ALSA_CFLAGS)
+ snd_output_alsa0_9_la_SOURCES= snd_alsa_0_9.c
+
+ snd_output_oss_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_oss_la_LDADD= $(OSS_LIBS)
++snd_output_oss_la_LIBADD= $(OSS_LIBS)
+ snd_output_oss_la_CFLAGS= $(OSS_CFLAGS)
+ snd_output_oss_la_SOURCES= snd_oss.c
+
+ snd_output_sgi_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_sgi_la_LDADD= $(SGISND_LIBS)
++snd_output_sgi_la_LIBADD= $(SGISND_LIBS)
+ snd_output_sgi_la_CFLAGS= $(SGISND_CFLAGS)
+ snd_output_sgi_la_SOURCES= snd_sgi.c
+
+@@ -45,16 +44,16 @@
+ snd_output_sun_la_SOURCES= snd_sun.c
+
+ snd_output_win_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_win_la_LDADD= $(WINSND_LIBS) $(plugin_libadd)
++snd_output_win_la_LIBADD= $(WINSND_LIBS) $(plugin_libadd)
+ snd_output_win_la_CFLAGS= $(WIN32SND_CFLAGS)
+ snd_output_win_la_SOURCES= snd_win.c
+
+ snd_output_dx_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_dx_la_LDADD= $(WINSND_LIBS) $(plugin_libadd)
++snd_output_dx_la_LIBADD= $(WINSND_LIBS) $(plugin_libadd)
+ snd_output_dx_la_CFLAGS= $(WIN32SND_CFLAGS)
+ snd_output_dx_la_SOURCES= snd_dx.c
+
+ snd_output_disk_la_LDFLAGS= $(plugin_ldflags)
+-snd_output_disk_la_LDADD= $(plugin_libadd)
++snd_output_disk_la_LIBADD= $(plugin_libadd)
+ snd_output_disk_la_CFLAGS=
+ snd_output_disk_la_SOURCES= snd_disk.c
+--- libs/audio/renderer/Makefile.am.old 2011-04-18 12:54:32.560697490 +0200
++++ libs/audio/renderer/Makefile.am 2011-04-18 12:55:21.157363865 +0200
+@@ -3,21 +3,19 @@
+ AM_CFLAGS= @PREFER_PIC@ @VORBIS_CFLAGS@ @OGG_CFLAGS@
+ INCLUDES= -I$(top_srcdir)/include
+ plugin_version= 1:0:0
+-plugin_ldflags= @plugin_ldflags@
++plugin_ldflags= @plugin_ldflags@ -module
+ plugin_libadd= @plugin_libadd@
+ EXEEXT=
+
+-plugin_PROGRAMS= @SND_REND_TARGETS@
+-EXTRA_PROGRAMS= snd_render_default.la
+-
+-noinst_PROGRAMS= @SND_REND_STATIC@
++plugin_LTLIBRARIES= @SND_REND_TARGETS@
++EXTRA_LTLIBRARIES= snd_render_default.la
+
+ snd_render_default_la_LDFLAGS= $(plugin_ldflags)
+ snd_render_default_la_SOURCES= snd_dma.c snd_mem.c snd_mix.c vorbis.c wav.c midi.c
+ if ASM_ARCH
+-snd_render_default_la_LDADD= $(VORBISFILE_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(WM_LIBS)
++snd_render_default_la_LIBADD= $(VORBISFILE_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(WM_LIBS)
+ snd_render_default_la_DEPENDENCIES=
+ else
+-snd_render_default_la_LDADD= $(VORBISFILE_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(WM_LIBS)
++snd_render_default_la_LIBADD= $(VORBISFILE_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(WM_LIBS)
+ snd_render_default_la_DEPENDENCIES=
+ endif
+--- libs/console/Makefile.am.old 2011-04-18 12:56:29.253106265 +0200
++++ libs/console/Makefile.am 2011-04-18 12:57:28.784383855 +0200
+@@ -3,14 +3,13 @@
+ AM_CFLAGS= @PREFER_PIC@
+ INCLUDES= -I$(top_srcdir)/include
+ plugin_version= 1:0:0
+-plugin_ldflags= @plugin_ldflags@
++plugin_ldflags= @plugin_ldflags@ -module
+ plugin_libadd= @plugin_libadd@
+ EXEEXT=
+
+ lib_LTLIBRARIES= libQFconsole.la
+-plugin_PROGRAMS= @SERVER_PLUGIN_TARGETS@ @CLIENT_PLUGIN_TARGETS@
+-noinst_PROGRAMS= @SERVER_PLUGIN_STATIC@ @CLIENT_PLUGIN_STATIC@
+-EXTRA_PROGRAMS= console_server.la console_client.la
++plugin_LTLIBRARIES= @SERVER_PLUGIN_TARGETS@ @CLIENT_PLUGIN_TARGETS@
++EXTRA_LTLIBRARIES= console_server.la console_client.la
+
+ common_sources= \
+ buffer.c complete.c console.c inputline.c list.c filelist.c view.c
+@@ -22,9 +21,9 @@
+ libQFconsole_la_SOURCES= $(common_sources)
+
+ console_client_la_LDFLAGS= $(plugin_ldflags)
+-console_client_la_LDADD= $(plugin_libadd)
++console_client_la_LIBADD= $(plugin_libadd)
+ console_client_la_SOURCES= $(client_sources)
+
+ console_server_la_LDFLAGS= $(plugin_ldflags)
+-console_server_la_LDADD= $(CURSES_LIBS) $(plugin_libadd)
++console_server_la_LIBADD= $(CURSES_LIBS) $(plugin_libadd)
+ console_server_la_SOURCES= $(server_sources)
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-keys.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-keys.patch
new file mode 100644
index 00000000000..fb027dd03c0
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-keys.patch
@@ -0,0 +1,103 @@
+--- nq/source/sys_sdl.c.old 2007-01-14 12:34:48.000000000 +0100
++++ nq/source/sys_sdl.c 2007-01-14 12:35:43.000000000 +0100
+@@ -63,6 +63,7 @@
+ #include "QF/console.h"
+ #include "QF/qargs.h"
+ #include "QF/sys.h"
++#include "QF/progs.h"
+
+ #include "client.h"
+ #include "compat.h"
+@@ -107,6 +108,9 @@
+ #endif
+ }
+
++extern void Key_Progs_Init (progs_t *pr);
++void (*x)() = Key_Progs_Init;
++
+ #ifndef SDL_main
+ # define SDL_main main
+ #endif
+--- qw/source/cl_sys_sdl.c.old 2007-01-14 12:29:25.000000000 +0100
++++ qw/source/cl_sys_sdl.c 2007-01-14 12:30:50.000000000 +0100
+@@ -63,6 +63,7 @@
+ #include "QF/console.h"
+ #include "QF/qargs.h"
+ #include "QF/sys.h"
++#include "QF/progs.h"
+
+ #include "client.h"
+ #include "compat.h"
+@@ -108,6 +109,9 @@
+ #endif
+ }
+
++extern void Key_Progs_Init (progs_t *pr);
++void (*x)() = Key_Progs_Init;
++
+ #ifndef SDL_main
+ # define SDL_main main
+ #endif
+--- qw/source/cl_sys_unix.c.old 2007-01-14 12:33:15.000000000 +0100
++++ qw/source/cl_sys_unix.c 2007-01-14 12:34:02.000000000 +0100
+@@ -56,6 +56,7 @@
+ #include "QF/console.h"
+ #include "QF/qargs.h"
+ #include "QF/sys.h"
++#include "QF/progs.h"
+
+ #include "host.h"
+ #include "netchan.h"
+@@ -73,6 +74,9 @@
+
+ int skipframes;
+
++extern void Key_Progs_Init (progs_t *pr);
++void (*x)() = Key_Progs_Init;
++
+ int
+ main (int c, const char *v[])
+ {
+--- nq/source/sys_unix.c.old 2007-01-14 13:01:20.000000000 +0100
++++ nq/source/sys_unix.c 2007-01-14 13:01:38.000000000 +0100
+@@ -69,6 +69,9 @@
+ fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
+ }
+
++extern void Key_Progs_Init (progs_t *pr);
++void (*x)() = Key_Progs_Init;
++
+ int
+ main (int c, const char *v[])
+ {
+--- configure.old 2007-01-14 14:06:22.000000000 +0100
++++ configure 2007-01-14 14:06:43.000000000 +0100
+@@ -22733,7 +22733,7 @@
+ int
+ main ()
+ {
+-void *(*foo)(size_t) = alloca;
++void *foo = alloca(sizeof(void));
+ ;
+ return 0;
+ }
+@@ -32304,7 +32304,7 @@
+
+
+ if test "x$BUILD_SW" = xyes; then
+- VID_REND_NOINST_TARGETS="$VID_REND_NOINST_TARGETS libQFrenderer_sw.la"
++ VID_REND_TARGETS="$VID_REND_TARGETS libQFrenderer_sw.la"
+ VID_MODEL_TARGETS="$VID_MODEL_TARGETS libQFmodels_sw.la"
+ fi
+ if test "x$BUILD_SW32" = xyes; then
+--- libs/video/renderer/Makefile.in.old 2007-01-14 15:00:14.000000000 +0100
++++ libs/video/renderer/Makefile.in 2007-01-14 15:02:08.000000000 +0100
+@@ -409,7 +409,7 @@
+ libQFrenderer_gl_la_LIBADD = gl/libgl.la
+ libQFrenderer_gl_la_SOURCES = $(common_sources)
+ libQFrenderer_gl_la_DEPENDENCIES = gl/libgl.la
+-libQFrenderer_sw_la_LDFLAGS = @STATIC@
++libQFrenderer_sw_la_LDFLAGS = -version-info 1:0:0 -rpath $(libdir)
+ libQFrenderer_sw_la_LIBADD = sw/libsw.la
+ libQFrenderer_sw_la_SOURCES = $(common_sources)
+ libQFrenderer_sw_la_DEPENDENCIES = sw/libsw.la
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-libc.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-libc.patch
new file mode 100644
index 00000000000..0161c606c89
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-libc.patch
@@ -0,0 +1,17 @@
+http://quake.git.sourceforge.net/git/gitweb.cgi?p=quake/quakeforge;a=commit;h=cdf5ef256583dea6caa34464f6a82222cc43d2fd
+
+--- libs/net/nc/net_udp6.c
++++ libs/net/nc/net_udp6.c
+@@ -111,10 +111,10 @@ static __attribute__ ((used)) const char rcsid[] =
+ # define MAXHOSTNAMELEN 512
+ #endif
+
+-#ifdef __GLIBC__ // glibc macro
++#if defined(__GLIBC__) && !defined(s6_addr32) // glibc macro
+ # define s6_addr32 in6_u.u6_addr32
+ # if ! __GLIBC_PREREQ (2,2)
+-# define ss_family __ss_family
++# define ss_family __ss_family
+ # endif
+ #endif
+
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-no-page-size.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-no-page-size.patch
new file mode 100644
index 00000000000..c18ec176fbf
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-no-page-size.patch
@@ -0,0 +1,15 @@
+do not use kernel headers' asm/page.h
+
+http://bugs.gentoo.org/187083
+
+--- libs/video/targets/vid_fbdev.c
++++ libs/video/targets/vid_fbdev.c
+@@ -58,7 +58,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <asm/page.h>
++#define PAGE_MASK sysconf(_SC_PAGE_SIZE)
+ #include <linux/kd.h>
+ #include <linux/vt.h>
+ #include <sys/stat.h>
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-noWerror.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-noWerror.patch
new file mode 100644
index 00000000000..5f367415514
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-noWerror.patch
@@ -0,0 +1,65 @@
+--- tools/qwaq/Makefile.am.old 2009-11-20 15:10:00.000000000 +0100
++++ tools/qwaq/Makefile.am 2009-11-20 15:10:22.000000000 +0100
+@@ -6,7 +6,7 @@
+
+ QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
+ QFCC=$(top_builddir)/tools/qfcc/source/qfcc
+-QCFLAGS=-qq -g -Werror --advanced
++QCFLAGS=-qq -g --advanced
+
+ if BUILD_QWAQ
+ qwaq=qwaq
+--- ruamoko/lib/Makefile.am.old 2009-11-20 15:12:00.000000000 +0100
++++ ruamoko/lib/Makefile.am 2009-11-20 15:12:17.000000000 +0100
+@@ -3,7 +3,7 @@
+ pkglibdir=$(libdir)/ruamoko
+
+ QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
+-QCFLAGS=-qq -g -Werror
++QCFLAGS=-qq -g
+ QCPPFLAGS=$(INCLUDES)
+ PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
+ RANLIB=touch
+--- ruamoko/game/Makefile.am.old 2009-11-20 15:13:05.000000000 +0100
++++ ruamoko/game/Makefile.am 2009-11-20 15:13:21.000000000 +0100
+@@ -7,7 +7,7 @@
+
+ QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
+ QFCC=$(QFCC_DEP)
+-QCFLAGS=-qq -g -Werror
++QCFLAGS=-qq -g
+ QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/ruamoko/include -I$(top_srcdir)/ruamoko/include
+ GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
+ if HAVE_ZLIB
+--- ruamoko/gui/Makefile.am.old 2009-11-20 15:13:52.000000000 +0100
++++ ruamoko/gui/Makefile.am 2009-11-20 15:14:09.000000000 +0100
+@@ -3,7 +3,7 @@
+ pkglibdir=$(libdir)/ruamoko
+
+ QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
+-QCFLAGS=-qq -g -Werror
++QCFLAGS=-qq -g
+ QCPPFLAGS=$(INCLUDES)
+ PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
+ RANLIB=touch
+--- ruamoko/cl_menu/Makefile.am.old 2009-11-20 15:14:37.000000000 +0100
++++ ruamoko/cl_menu/Makefile.am 2009-11-20 15:15:03.000000000 +0100
+@@ -5,7 +5,7 @@
+
+ QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
+ QFCC=$(QFCC_DEP)
+-QCFLAGS=-qq -g -Werror
++QCFLAGS=-qq -g
+ QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/ruamoko/include -I$(top_srcdir)/ruamoko/include -I$(top_builddir)/include -I$(top_srcdir)/include
+ GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
+ if HAVE_ZLIB
+--- configure.ac.old 2009-11-20 15:15:35.000000000 +0100
++++ configure.ac 2009-11-20 15:16:04.000000000 +0100
+@@ -92,6 +92,7 @@
+ AC_PROG_RANLIB
+ AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
++AM_PROG_AS
+
+ AC_PROG_YACC
+ if echo $YACC | grep -v bison > /dev/null; then
diff --git a/games-fps/quakeforge/files/quakeforge-0.5.5-zlib-1.2.6.patch b/games-fps/quakeforge/files/quakeforge-0.5.5-zlib-1.2.6.patch
new file mode 100644
index 00000000000..eae1e1e4478
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.5.5-zlib-1.2.6.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/421547
+http://quake.git.sourceforge.net/git/gitweb.cgi?p=quake/quakeforge;a=commit;h=d8a37bc7910366904ef4559bef3b13feec378113
+
+--- libs/util/quakeio.c
++++ libs/util/quakeio.c
+@@ -80,7 +80,7 @@ static __attribute__ ((used)) const char rcsid[] =
+ struct QFile_s {
+ FILE *file;
+ #ifdef HAVE_ZLIB
+- gzFile *gzfile;
++ gzFile gzfile;
+ #endif
+ off_t size;
+ off_t start;
diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch b/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch
new file mode 100644
index 00000000000..396d7322b45
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch
@@ -0,0 +1,33 @@
+--- nq/source/Makefile.am.old 2012-11-18 16:57:56.658388682 +0100
++++ nq/source/Makefile.am 2012-11-18 16:58:11.470268607 +0100
+@@ -138,7 +138,7 @@
+ nq_x11_SOURCES= sys_unix.c
+ nq_x11_LDADD= $(nq_x11_libs) \
+ $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
+- $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS)
++ $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) -ldl
+ nq_x11_LDFLAGS= $(common_ldflags)
+ nq_x11_DEPENDENCIES= $(nq_x11_libs)
+
+--- qw/source/Makefile.am.old 2012-11-18 17:10:59.148172332 +0100
++++ qw/source/Makefile.am 2012-11-18 17:11:55.866876762 +0100
+@@ -168,7 +168,7 @@
+ qw_client_x11_SOURCES= cl_sys_unix.c
+ qw_client_x11_LDADD= $(qw_client_x11_libs) \
+ $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
+- $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) $(LIBCURL_LIBS)
++ $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) $(LIBCURL_LIBS) -ldl
+ qw_client_x11_LDFLAGS= $(common_ldflags)
+ qw_client_x11_DEPENDENCIES= $(qw_client_x11_libs)
+
+--- tools/qwaq/Makefile.am.old 2012-11-18 17:15:16.024714317 +0100
++++ tools/qwaq/Makefile.am 2012-11-18 17:15:41.955749660 +0100
+@@ -38,7 +38,7 @@
+ qwaq_x11_SOURCES=qwaq.c qwaq-bi.c
+ qwaq_x11_LDADD= $(qwaq_x11_libs) $(QWAQ_LIBS) \
+ $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
+- $(X_EXTRA_LIBS) $(X_SHM_LIB)
++ $(X_EXTRA_LIBS) $(X_SHM_LIB) -ldl
+ qwaq_x11_LDFLAGS=
+ qwaq_x11_DEPENDENCIES= $(qwaq_x11_libs) $(QWAQ_DEPS)
+
diff --git a/games-fps/quakeforge/metadata.xml b/games-fps/quakeforge/metadata.xml
new file mode 100644
index 00000000000..d3995b1c653
--- /dev/null
+++ b/games-fps/quakeforge/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+QuakeForge is a 3D graphics game engine based on id Software's legendary
+Quake and QuakeWorld game engine. Our purpose? To improve the state of
+the game by improving the engine and making it accessable to the largest
+number of players we can.
+
+Arguably the single most important issue on the minds of players today
+is the rampant cheating which is currently happening on many of the
+larger servers. It's a serious problem and it really makes a good game
+hard to find. We're working hard to fix these problems at the engine
+level.
+
+But what good is that if you have to have a copy of our client and the
+server has to run our server? There are other projects out there and
+some of them have very unique qualities. QuakeForge is cooperating with
+QSG, a group comprised of representatives from nearly every known Quake
+source project to ensure that our clients and servers run with other
+clients and servers just fine. We have all agreed to implement any
+effective cheat prevention methods.
+
+Other things we're doing include merging the two code trees, adding
+features, and improving the OpenGL renderer. And QuakeForge is still the
+most portable source tree based on the id Software code.
+</longdescription>
+ <use>
+ <flag name="wildmidi">enable libWildMidi support</flag>
+ <flag name="xdg">enable XDG support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">quake</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/quakeforge/quakeforge-0.5.5-r2.ebuild b/games-fps/quakeforge/quakeforge-0.5.5-r2.ebuild
new file mode 100644
index 00000000000..c02158d854f
--- /dev/null
+++ b/games-fps/quakeforge/quakeforge-0.5.5-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit base eutils autotools games
+
+DESCRIPTION="A new 3d engine based off of id Softwares's legendary Quake and QuakeWorld game engine"
+HOMEPAGE="http://www.quakeforge.net/"
+SRC_URI="mirror://sourceforge/quake/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE="cdinstall debug fbcon opengl sdl svga X ncurses vorbis zlib ipv6 xv dga alsa oss"
+RESTRICT="userpriv"
+
+RDEPEND="
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl )
+ svga? ( media-libs/svgalib )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ ncurses? ( sys-libs/ncurses )
+ vorbis? ( media-libs/libogg media-libs/libvorbis )
+ zlib? ( sys-libs/zlib )
+ xv? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ dga? ( x11-libs/libXxf86dga )
+ alsa? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}
+ cdinstall? ( games-fps/quake1-data )
+ sys-devel/bison
+ sys-devel/flex"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-page-size.patch
+ "${FILESDIR}"/${PV}-ipv6.patch
+ "${FILESDIR}"/${P}-gcc41.patch
+ "${FILESDIR}"/${P}-keys.patch
+ "${FILESDIR}"/${P}-amd64.patch
+ "${FILESDIR}"/${P}-noWerror.patch
+ "${FILESDIR}"/${P}-gcc46.patch
+ "${FILESDIR}"/${P}-zlib-1.2.6.patch
+ "${FILESDIR}"/${P}-libc.patch
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ #i should do this at some point :x ... i guess if you disable all shared stuff
+ #and enable all the static options explicitly, static works ... (or so ive been told)
+ #if ! use static ; then
+ # myconf="${myconf} --enable-shared=yes --enable-static=no"
+ #else
+ # myconf="${myconf} --enable-shared=no --enable-static=yes"
+ #fi
+
+ local debugopts
+ use debug \
+ && debugopts="--enable-debug --disable-optimize --enable-profile" \
+ || debugopts="--disable-debug --disable-profile"
+
+ local clients=${QF_CLIENTS}
+ use fbcon && clients="${clients},fbdev"
+ use opengl && clients="${clients},glx"
+ use sdl && clients="${clients},sdl,sdl32"
+ use sdl && use opengl && clients="${clients},sgl"
+ use svga && clients="${clients},svga"
+ use X && clients="${clients},x11"
+ use X && use opengl && clients="${clients},wgl"
+ [ "${clients:0:1}" == "," ] && clients=${clients:1}
+
+ local servers=${QF_SERVERS:-master,nq,qw,qtv}
+
+ local tools=${QF_TOOLS:-all}
+
+ local svgaconf # use old school way for broken conf opts
+ use svga \
+ && svgaconf="--with-svga=/usr" \
+ || svgaconf="--without-svga"
+
+ addpredict "$(games_get_libdir)"
+ egamesconf \
+ $(use_enable ncurses curses) \
+ $(use_enable vorbis) \
+ $(use_enable zlib) \
+ $(use_with ipv6) \
+ $(use_with fbcon fbdev) \
+ ${svgaconf} \
+ $(use_with X x) \
+ $(use_enable xv vidmode) \
+ $(use_enable dga) \
+ $(use_enable sdl) \
+ --disable-xmms \
+ $(use_enable alsa) \
+ $(use_enable oss) \
+ --enable-sound \
+ --disable-optimize \
+ ${debugopts} \
+ --with-global-cfg="${GAMES_SYSCONFDIR}"/quakeforge.conf \
+ --with-sharepath="${GAMES_DATADIR}"/quake1 \
+ --with-clients=${clients} \
+ --with-servers=${servers} \
+ --with-tools=${tools}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ mv "${D}/${GAMES_PREFIX}"/include "${D}"/usr/
+ dodoc ChangeLog NEWS TODO doc/*txt
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ # same warning used in quake1 / quakeforge / nprquake-sdl
+ games_pkg_postinst
+ echo
+ elog "Before you can play, you must make sure"
+ elog "${PN} can find your Quake .pak files"
+ elog
+ elog "You have 2 choices to do this"
+ elog "1 Copy pak*.pak files to ${GAMES_DATADIR}/quake1/id1"
+ elog "2 Symlink pak*.pak files in ${GAMES_DATADIR}/quake1/id1"
+ elog
+ elog "Example:"
+ elog "my pak*.pak files are in /mnt/secondary/Games/Quake/Id1/"
+ elog "ln -s /mnt/secondary/Games/Quake/Id1/pak0.pak ${GAMES_DATADIR}/quake1/id1/pak0.pak"
+ elog
+ elog "You only need pak0.pak to play the demo version,"
+ elog "the others are needed for registered version"
+}
diff --git a/games-fps/quakeforge/quakeforge-0.7.2.ebuild b/games-fps/quakeforge/quakeforge-0.7.2.ebuild
new file mode 100644
index 00000000000..6388f5ff0a3
--- /dev/null
+++ b/games-fps/quakeforge/quakeforge-0.7.2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base eutils autotools games
+
+DESCRIPTION="A new 3d engine based off of id Softwares's legendary Quake and QuakeWorld game engine"
+HOMEPAGE="http://www.quakeforge.net/"
+SRC_URI="mirror://sourceforge/quake/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="cdinstall debug fbcon flac sdl X ncurses png vorbis zlib ipv6 xv dga alsa oss xdg wildmidi"
+RESTRICT="userpriv"
+
+RDEPEND="
+ media-libs/libsamplerate
+ net-misc/curl
+ virtual/opengl
+ png? ( media-libs/libpng:0 )
+ flac? ( media-libs/flac )
+ sdl? ( media-libs/libsdl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ ncurses? ( sys-libs/ncurses )
+ vorbis? ( media-libs/libogg media-libs/libvorbis )
+ zlib? ( sys-libs/zlib )
+ xv? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ dga? ( x11-libs/libXxf86dga )
+ alsa? ( media-libs/alsa-lib )
+ wildmidi? ( media-sound/wildmidi )"
+DEPEND="${RDEPEND}
+ cdinstall? ( games-fps/quake1-data )
+ >=sys-devel/bison-2.6
+ sys-devel/flex
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ eautoreconf
+}
+
+src_configure() {
+ local debugopts
+ use debug \
+ && debugopts="--enable-debug --disable-optimize --enable-profile" \
+ || debugopts="--disable-debug --disable-profile"
+
+ local clients=${QF_CLIENTS}
+ use fbcon && clients="${clients},fbdev"
+ use sdl && clients="${clients},sdl"
+ use X && clients="${clients},x11"
+ [ "${clients:0:1}" == "," ] && clients=${clients:1}
+
+ local servers=${QF_SERVERS:-master,nq,qw,qtv}
+
+ local tools=${QF_TOOLS:-all}
+
+ addpredict "$(games_get_libdir)"
+ egamesconf \
+ --enable-dependency-tracking \
+ $(use_enable ncurses curses) \
+ $(use_enable vorbis) \
+ $(use_enable png) \
+ $(use_enable zlib) \
+ $(use_with ipv6) \
+ $(use_with fbcon fbdev) \
+ $(use_with X x) \
+ $(use_enable xv vidmode) \
+ $(use_enable dga) \
+ $(use_enable sdl) \
+ --disable-xmms \
+ $(use_enable alsa) \
+ $(use_enable flac) \
+ $(use_enable oss) \
+ $(use_enable xdg) \
+ $(use_enable wildmidi) \
+ --enable-sound \
+ --disable-optimize \
+ --disable-Werror \
+ --without-svga \
+ ${debugopts} \
+ --with-global-cfg="${GAMES_SYSCONFDIR}"/quakeforge.conf \
+ --with-sharepath="${GAMES_DATADIR}"/quake1 \
+ --with-clients=${clients} \
+ --with-servers=${servers} \
+ --with-tools=${tools}
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ mv "${D}/${GAMES_PREFIX}"/include "${D}"/usr/ || die
+ dodoc ChangeLog NEWS TODO
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ # same warning used in quake1 / quakeforge / nprquake-sdl
+ games_pkg_postinst
+ echo
+ elog "Before you can play, you must make sure"
+ elog "${PN} can find your Quake .pak files"
+ elog
+ elog "You have 2 choices to do this"
+ elog "1 Copy pak*.pak files to ${GAMES_DATADIR}/quake1/id1"
+ elog "2 Symlink pak*.pak files in ${GAMES_DATADIR}/quake1/id1"
+ elog
+ elog "Example:"
+ elog "my pak*.pak files are in /mnt/secondary/Games/Quake/Id1/"
+ elog "ln -s /mnt/secondary/Games/Quake/Id1/pak0.pak ${GAMES_DATADIR}/quake1/id1/pak0.pak"
+ elog
+ elog "You only need pak0.pak to play the demo version,"
+ elog "the others are needed for registered version"
+}
diff --git a/games-fps/qudos/Manifest b/games-fps/qudos/Manifest
new file mode 100644
index 00000000000..4c5257af06d
--- /dev/null
+++ b/games-fps/qudos/Manifest
@@ -0,0 +1,2 @@
+DIST QuDos-0.40.1-src.tar.bz2 2031636 SHA256 90d8dbbbe4e006b4233b9c8c20bc3da5c240dde8fdf17ccf43ca533d296aa21a SHA512 97b9c6bac0d09c060ab33174604deb2781f0ebdc48b00bd0bc402523fb04cdf84edd8abc18507bba8c7e616f6d460a1de6debc96ec39bb5562b20a7f06eea734 WHIRLPOOL 623456b47dfefc389ceadf267369221c2a89a934597fbc5e951c9728d6947a982525884803cfae6a59ede682c637bfba2f97f0c3e2c98579fce63dfe71161fca
+DIST QuDos-0.40.1.pk3 5253128 SHA256 c02e0df50785d5b360ec5435e2fd3d31b337f28f676b7af141a8e2664f518f1c SHA512 69d1e752c32e763f0452f41856fbb9833676dfd27337633c65666b47be13db48be7ad6f81054b180a3fdc43d3952f3bbe632df12fa0a8e86be14c48c2d8daec5 WHIRLPOOL 33d54cadce0d5d3fd4353838dcd9719443f3fc01f5bb859f80aae105389990c62cc8ee5576eb81098ccce5320d7591b9c955f9e82c61461ec217e01034a939d4
diff --git a/games-fps/qudos/files/qudos-0.40.1-gnusource.patch b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch
new file mode 100644
index 00000000000..dd2113b0c3b
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch
@@ -0,0 +1,12 @@
+--- src/unix/qsh_unix.c.orig 2011-10-22 17:46:37.665993357 -0500
++++ src/unix/qsh_unix.c 2011-10-22 17:46:40.965972209 -0500
+@@ -17,6 +17,9 @@
+ * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
++#if !defined(_GNU_SOURCE)
++ #define _GNU_SOURCE
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
diff --git a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
new file mode 100644
index 00000000000..ecf9de9370e
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
@@ -0,0 +1,10 @@
+--- src/ref_gl/gl_local.h
++++ src/ref_gl/gl_local.h
+@@ -29,6 +29,7 @@
+ #include <GL/glu.h>
+ #include <GL/glext.h>
+
++#include <zlib.h> /* Z_DEFAULT_COMPRESSION */
+ #include <png.h>
+ #include <jpeglib.h>
+
diff --git a/games-fps/qudos/metadata.xml b/games-fps/qudos/metadata.xml
new file mode 100644
index 00000000000..0dd51f0c44b
--- /dev/null
+++ b/games-fps/qudos/metadata.xml
@@ -0,0 +1,11 @@
+<?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 the demo files (quake2-demodata) and configure for use</flag>
+ <flag name="mods">Build support for the quake2 mission packs</flag>
+ <flag name="qmax">Build the pretty version (quake max)</flag>
+ <flag name="textures">Install the enhanced textures (quake2-textures)</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/qudos/qudos-0.40.1.ebuild b/games-fps/qudos/qudos-0.40.1.ebuild
new file mode 100644
index 00000000000..2253492f7ad
--- /dev/null
+++ b/games-fps/qudos/qudos-0.40.1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+FILE_STEM="QuDos-${PV}-src"
+PK3_FILE="QuDos-${PV}.pk3"
+MY_PN="quake2"
+
+DESCRIPTION="Enhanced Quake 2 engine"
+HOMEPAGE="http://qudos.quakedev.com/"
+SRC_URI="http://qudos.quakedev.com/linux/${MY_PN}/engines/QuDos/${FILE_STEM}.tar.bz2
+ http://qudos.quakedev.com/linux/${MY_PN}/engines/QuDos/${PK3_FILE}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa cdinstall debug dedicated demo dga ipv6 joystick mods opengl qmax oss sdl textures"
+
+UIDEPEND="alsa? ( media-libs/alsa-lib )
+ opengl? (
+ virtual/opengl
+ virtual/glu )
+ sdl? ( media-libs/libsdl )
+ virtual/jpeg
+ media-libs/libogg
+ media-libs/libpng
+ media-libs/libvorbis
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+RDEPEND="${UIDEPEND}
+ cdinstall? ( games-fps/quake2-data )
+ demo? ( games-fps/quake2-demodata )
+ textures? ( games-fps/quake2-textures )"
+DEPEND="${UIDEPEND}"
+
+S=${WORKDIR}/${FILE_STEM}
+dir=${GAMES_DATADIR}/${MY_PN}
+
+default_client() {
+ if use opengl || use sdl || ! use dedicated ; then
+ # Build default client
+ return 0
+ fi
+ return 1
+}
+
+pkg_setup() {
+ games_pkg_setup
+
+ if ! use qmax && $( use opengl || use sdl ) ; then
+ elog "The 'qmax' graphical improvements are recommended."
+ echo
+ fi
+
+ if use debug ; then
+ ewarn "The 'debug' USE flag may cause compilation to fail with:"
+ ewarn
+ ewarn "src/qcommon/cmd.c:364: warning: dereferencing type-punned"
+ ewarn "pointer will break strict-aliasing rules."
+ echo
+ fi
+
+ # Determine the default sound driver, in order of preference
+ # snd_drv is not a local variable
+ snd_drv=""
+ [[ -z "${snd_drv}" ]] && use oss && snd_drv="oss"
+ [[ -z "${snd_drv}" ]] && use sdl && snd_drv="sdl"
+ [[ -z "${snd_drv}" ]] && use alsa && snd_drv="alsa"
+ # Default if nothing else chosen
+ [[ -z "${snd_drv}" ]] && snd_drv="oss"
+
+ if default_client ; then
+ elog "Selected the ${snd_drv} sound driver as the default."
+ echo
+ if [[ "${snd_drv}" = "alsa" ]] ; then
+ ewarn "The ALSA sound driver for this game is incomplete."
+ # OSS is the default sound driver in the Makefile
+ ewarn "The 'oss' USE flag is recommended instead."
+ echo
+ fi
+ fi
+}
+
+src_unpack() {
+ unpack "${FILE_STEM}.tar.bz2"
+}
+
+src_prepare() {
+ rm docs/gnu.txt
+
+ # Change default sound driver and its location
+ sed -i src/client/snd_dma.c \
+ -e "s:\"oss\":\"${snd_drv}\":" \
+ -e "s:\"\./snd:\"$(games_get_libdir)/${PN}/snd:" \
+ || die "sed snd_dma.c failed"
+
+ sed -i \
+ -e 's:jpeg_mem_src:qudos_jpeg_mem_src:g' \
+ src/ref_gl/gl_image.c || die
+
+ has_version '>=sys-libs/zlib-1.2.5.1-r1' && \
+ sed -i -e '1i#define OF(x) x' src/qcommon/unzip/ioapi.h
+
+ epatch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-gnusource.patch
+}
+
+src_compile() {
+ yesno() { use $1 && echo YES || echo NO ; }
+
+ local client="YES"
+ default_client || client="NO"
+
+ local type="release"
+ use debug && type="debug"
+
+ emake -j1 \
+ BUILD_QUAKE2="${client}" \
+ BUILD_DEDICATED=$(yesno dedicated) \
+ BUILD_GLX=$(yesno opengl) \
+ BUILD_SDLGL=$(yesno sdl) \
+ BUILD_ALSA_SND=$(yesno alsa) \
+ BUILD_SDL_SND=$(yesno sdl) \
+ BUILD_OSS_SND=$(yesno oss) \
+ WITH_XMMS=NO \
+ WITH_DGA_MOUSE=$(yesno dga) \
+ WITH_JOYSTICK=$(yesno joystick) \
+ TYPE="${type}" \
+ DATADIR="${dir}" \
+ LOCALBASE=/usr \
+ LIBDIR="$(games_get_libdir)"/${PN} \
+ WITH_QMAX=$(yesno qmax) \
+ BUILD_3ZB2=$(yesno mods) \
+ BUILD_CTF=$(yesno mods) \
+ BUILD_JABOT=$(yesno mods) \
+ BUILD_ROGUE=$(yesno mods) \
+ BUILD_XATRIX=$(yesno mods) \
+ BUILD_ZAERO=$(yesno mods) \
+ WITH_BOTS=$(yesno mods) \
+ HAVE_IPV6=$(yesno ipv6) \
+ CC="$(tc-getCC)" \
+ WITH_X86_ASM=NO \
+ WITH_DATADIR=YES \
+ WITH_LIBDIR=YES \
+ BUILD_DEBUG_DIR=release \
+ BUILD_RELEASE_DIR=release
+}
+
+src_install() {
+ if default_client ; then
+ newgamesbin ${MY_PN}/QuDos ${PN}
+ # Change from gif to png in next version?
+ newicon docs/q2_orig/quake2.gif ${PN}.gif
+ make_desktop_entry ${PN} "QuDos" ${PN}.gif
+ fi
+
+ if use dedicated ; then
+ newgamesbin ${MY_PN}/QuDos-ded ${PN}-ded
+ fi
+
+ insinto "$(games_get_libdir)"/${PN}
+ doins -r ${MY_PN}/*
+ rm "${D}/$(games_get_libdir)"/${PN}/QuDos
+
+ insinto "$(games_get_libdir)"/${PN}/baseq2
+ newins "${DISTDIR}/${PK3_FILE}" qudos.pk3
+
+ dodoc $(find docs -name \*.txt) docs/q2_orig/README*
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if use demo && ! has_version "games-fps/quake2-demodata[symlink]" ; then
+ ewarn "To play the Quake 2 demo,"
+ ewarn "emerge games-fps/quake2-demodata with the 'symlink' USE flag."
+ echo
+ fi
+}
diff --git a/games-fps/red-blue-quake2/Manifest b/games-fps/red-blue-quake2/Manifest
new file mode 100644
index 00000000000..53491558c89
--- /dev/null
+++ b/games-fps/red-blue-quake2/Manifest
@@ -0,0 +1,2 @@
+DIST q2source-3.21.zip 1477764 RMD160 c23beea8062c94ef5d45f9acf3d884961b8d8564 SHA1 2e3fa6e6eab67be92a272b24b3f24f6c2aa462c8 SHA256 c9200316de189638d0d997a0092f36b85f2c3f9e4ebe30f4b1c356745ad676ca
+DIST red-blue-quake2-0.1.tar.gz 34874 RMD160 4e7d9c46e3e20266565f9b08f4a4f8dd92ae5540 SHA1 c93d6b0a93c822dedfe30e32b4ae77e018ed6cab SHA256 65a0f2552f537e494f05f573e54faff7cf08d22276307e6c69eb314c2f3dac17
diff --git a/games-fps/red-blue-quake2/files/0.1-gentoo.patch b/games-fps/red-blue-quake2/files/0.1-gentoo.patch
new file mode 100644
index 00000000000..fd13df9bcb4
--- /dev/null
+++ b/games-fps/red-blue-quake2/files/0.1-gentoo.patch
@@ -0,0 +1,63 @@
+diff -ur Makefile.old Makefile
+--- Makefile 2001-12-29 20:37:22.000000000 -0500
++++ Makefile 2003-07-17 22:14:50.000000000 -0400
+@@ -54,7 +54,7 @@
+ RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ else
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
++RELEASE_CFLAGS=$(BASE_CFLAGS) -g $(GENTOO_CFLAGS) -DGENTOO_DATADIR=\\\"$(GENTOO_DATADIR)\\\" -O6 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+diff -ur sys_linux.c.old sys_linux.c
+--- sys_linux.c.old 2001-12-22 18:45:58.000000000 -0500
++++ sys_linux.c 2003-07-17 22:34:11.000000000 -0400
+@@ -220,7 +220,7 @@
+ char curpath[MAX_OSPATH];
+ char *path;
+ #ifdef __i386__
+- const char *gamename = "gamei386.so";
++ const char *gamename = "GENTOO_DIR/gamei386.so";
+ #elif defined __alpha__
+ const char *gamename = "gameaxp.so";
+ #else
+@@ -250,6 +250,14 @@
+ {
+ Com_Printf ("LoadLibrary (%s)\n",name);
+ break;
++ } else {
++ sprintf (name, "%s", gamename);
++ game_library = dlopen (name, RTLD_LAZY );
++ if (game_library)
++ {
++ Com_Printf ("LoadLibrary (%s)\n",name);
++ break;
++ }
+ }
+ }
+
+diff -ur ../qcommon/files.c ../qcommon/files.c
+--- ../qcommon/files.c 2001-12-22 16:32:26.000000000 -0500
++++ ../qcommon/files.c 2003-07-17 22:34:29.000000000 -0400
+@@ -865,7 +865,7 @@
+ //
+ // start up with baseq2 by default
+ //
+- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
++ FS_AddGameDirectory (va(BASEDIRNAME) );
+
+ // any set gamedirs will be freed up to here
+ fs_base_searchpaths = fs_searchpaths;
+diff -ur ../qcommon/qcommon.h ../qcommon/qcommon.h
+--- ../qcommon/qcommon.h 2001-12-22 16:32:26.000000000 -0500
++++ ../qcommon/qcommon.h 2003-07-17 21:20:03.000000000 -0400
+@@ -25,7 +25,7 @@
+
+ #define VERSION 3.21
+
+-#define BASEDIRNAME "baseq2"
++#define BASEDIRNAME GENTOO_DATADIR
+
+ #ifdef WIN32
+
diff --git a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch
new file mode 100644
index 00000000000..1f933d33537
--- /dev/null
+++ b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch
@@ -0,0 +1,39 @@
+--- ../game/g_local.h.old 2006-05-07 00:27:45.000000000 +0200
++++ ../game/g_local.h 2006-05-07 00:28:06.000000000 +0200
+@@ -458,11 +458,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+-
+-
+ // means of death
+ #define MOD_UNKNOWN 0
+ #define MOD_BLASTER 1
+--- ../ctf/g_local.h.old 2006-05-07 00:36:21.000000000 +0200
++++ ../ctf/g_local.h 2006-05-07 00:36:38.000000000 +0200
+@@ -466,11 +466,6 @@
+ extern int sm_meat_index;
+ extern int snd_fry;
+
+-extern int jacket_armor_index;
+-extern int combat_armor_index;
+-extern int body_armor_index;
+-
+-
+ // means of death
+ #define MOD_UNKNOWN 0
+ #define MOD_BLASTER 1
+@@ -556,10 +556,6 @@
+
+ extern cvar_t *sv_maplist;
+
+-//ZOID
+-extern qboolean is_quad;
+-//ZOID
+-
+ #define world (&g_edicts[0])
+
+ // item spawnflags
diff --git a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch
new file mode 100644
index 00000000000..58beb0f3cec
--- /dev/null
+++ b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch
@@ -0,0 +1,92 @@
+--- Makefile.old 2010-10-18 09:09:48.000000000 +0200
++++ Makefile 2010-10-18 09:15:59.000000000 +0200
+@@ -59,7 +59,7 @@
+ endif
+
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+-LDFLAGS=-ldl -lm
++LDLIBS=-ldl -lm
+ SVGALDFLAGS=-lvga -lm
+ XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga
+ XCFLAGS=
+@@ -195,7 +195,7 @@
+ endif
+
+ $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
+ $(DO_CC)
+@@ -374,7 +374,7 @@
+ $(BUILDDIR)/ded/cd_null.o
+
+ $(BUILDDIR)/q2ded : $(Q2DED_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDLIBS)
+
+ $(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
+ $(DO_DED_CC)
+@@ -503,7 +503,7 @@
+ $(BUILDDIR)/game/m_flash.o
+
+ $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
+
+ $(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
+ $(DO_SHLIB_CC)
+@@ -682,7