summaryrefslogtreecommitdiff
path: root/games-fps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-fps
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/Manifest.gzbin21955 -> 21383 bytes
-rw-r--r--games-fps/aaquake2-0.112
-rw-r--r--games-fps/aaquake2/Manifest8
-rw-r--r--games-fps/aaquake2/aaquake2-0.1.ebuild62
-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.xml21
-rw-r--r--games-fps/aaut-110
-rw-r--r--games-fps/aaut/Manifest3
-rw-r--r--games-fps/aaut/aaut-1.ebuild23
-rw-r--r--games-fps/aaut/files/aaut5
-rw-r--r--games-fps/aaut/metadata.xml15
-rw-r--r--games-fps/alienarena-20130827-r113
-rw-r--r--games-fps/alienarena/Manifest4
-rw-r--r--games-fps/alienarena/alienarena-20130827-r1.ebuild73
-rw-r--r--games-fps/alienarena/files/alienarena-20130827-format.patch11
-rw-r--r--games-fps/alienarena/metadata.xml11
-rw-r--r--games-fps/avp-20150214-r112
-rw-r--r--games-fps/avp/Manifest3
-rw-r--r--games-fps/avp/avp-20150214-r1.ebuild46
-rw-r--r--games-fps/avp/metadata.xml8
-rw-r--r--games-fps/blackshades-20070723-r112
-rw-r--r--games-fps/blackshades/Manifest5
-rw-r--r--games-fps/blackshades/blackshades-20070723-r1.ebuild60
-rw-r--r--games-fps/blackshades/files/blackshades-datadir.patch18
-rw-r--r--games-fps/blackshades/metadata.xml8
-rw-r--r--games-fps/darkplaces-20140513-r113
-rw-r--r--games-fps/darkplaces/Manifest5
-rw-r--r--games-fps/darkplaces/darkplaces-20140513-r1.ebuild189
-rw-r--r--games-fps/darkplaces/metadata.xml14
-rw-r--r--games-fps/doom-data-1-r212
-rw-r--r--games-fps/doom-data/Manifest3
-rw-r--r--games-fps/doom-data/doom-data-1-r2.ebuild40
-rw-r--r--games-fps/doom-data/metadata.xml11
-rw-r--r--games-fps/doom3-1.3.1304-r114
-rw-r--r--games-fps/doom3-cdoom-1.3.114
-rw-r--r--games-fps/doom3-cdoom/Manifest3
-rw-r--r--games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild30
-rw-r--r--games-fps/doom3-cdoom/metadata.xml8
-rw-r--r--games-fps/doom3-chextrek-0.5214
-rw-r--r--games-fps/doom3-chextrek/Manifest3
-rw-r--r--games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild36
-rw-r--r--games-fps/doom3-chextrek/metadata.xml8
-rw-r--r--games-fps/doom3-data-1.1.1282-r111
-rw-r--r--games-fps/doom3-data/Manifest2
-rw-r--r--games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild46
-rw-r--r--games-fps/doom3-data/metadata.xml14
-rw-r--r--games-fps/doom3-demo-1.1.1286-r112
-rw-r--r--games-fps/doom3-demo/Manifest4
-rw-r--r--games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild61
-rw-r--r--games-fps/doom3-demo/metadata.xml8
-rw-r--r--games-fps/doom3-ducttape-000714
-rw-r--r--games-fps/doom3-ducttape/Manifest3
-rw-r--r--games-fps/doom3-ducttape/doom3-ducttape-0007.ebuild35
-rw-r--r--games-fps/doom3-ducttape/metadata.xml8
-rw-r--r--games-fps/doom3-eventhorizon-1.314
-rw-r--r--games-fps/doom3-eventhorizon/Manifest3
-rw-r--r--games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild30
-rw-r--r--games-fps/doom3-eventhorizon/metadata.xml8
-rw-r--r--games-fps/doom3-hellcampaign-1-r114
-rw-r--r--games-fps/doom3-hellcampaign/Manifest4
-rw-r--r--games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild46
-rw-r--r--games-fps/doom3-hellcampaign/metadata.xml8
-rw-r--r--games-fps/doom3-inhell-1.1-r114
-rw-r--r--games-fps/doom3-inhell/Manifest3
-rw-r--r--games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild28
-rw-r--r--games-fps/doom3-inhell/metadata.xml8
-rw-r--r--games-fps/doom3-lms-414
-rw-r--r--games-fps/doom3-lms/Manifest3
-rw-r--r--games-fps/doom3-lms/doom3-lms-4.ebuild29
-rw-r--r--games-fps/doom3-lms/metadata.xml8
-rw-r--r--games-fps/doom3-mitm-2007012914
-rw-r--r--games-fps/doom3-mitm/Manifest3
-rw-r--r--games-fps/doom3-mitm/doom3-mitm-20070129.ebuild44
-rw-r--r--games-fps/doom3-mitm/metadata.xml8
-rw-r--r--games-fps/doom3-roe-112
-rw-r--r--games-fps/doom3-roe/Manifest2
-rw-r--r--games-fps/doom3-roe/doom3-roe-1.ebuild53
-rw-r--r--games-fps/doom3-roe/metadata.xml16
-rw-r--r--games-fps/doom3/Manifest4
-rw-r--r--games-fps/doom3/doom3-1.3.1304-r1.ebuild99
-rw-r--r--games-fps/doom3/metadata.xml20
-rw-r--r--games-fps/doomsday-2.0.315
-rw-r--r--games-fps/doomsday-resources-1.01-r112
-rw-r--r--games-fps/doomsday-resources/Manifest4
-rw-r--r--games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild38
-rw-r--r--games-fps/doomsday-resources/metadata.xml11
-rw-r--r--games-fps/doomsday/Manifest3
-rw-r--r--games-fps/doomsday/doomsday-2.0.3.ebuild77
-rw-r--r--games-fps/doomsday/metadata.xml21
-rw-r--r--games-fps/duke3d-20040817-r213
-rw-r--r--games-fps/duke3d-data-1.0-r416
-rw-r--r--games-fps/duke3d-data/Manifest3
-rw-r--r--games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild75
-rw-r--r--games-fps/duke3d-data/metadata.xml11
-rw-r--r--games-fps/duke3d-demodata-1.312
-rw-r--r--games-fps/duke3d-demodata/Manifest3
-rw-r--r--games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild50
-rw-r--r--games-fps/duke3d-demodata/metadata.xml8
-rw-r--r--games-fps/duke3d/Manifest14
-rw-r--r--games-fps/duke3d/duke3d-20040817-r2.ebuild114
-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/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.xml61
-rw-r--r--games-fps/eduke32-20180702.693714
-rw-r--r--games-fps/eduke32/Manifest13
-rw-r--r--games-fps/eduke32/eduke32-20180702.6937.ebuild247
-rwxr-xr-xgames-fps/eduke32/files/eduke32-bin12
-rw-r--r--games-fps/eduke32/files/log-to-tmpdir.patch11
-rw-r--r--games-fps/eduke32/files/search-duke3d-path.patch11
-rw-r--r--games-fps/eduke32/metadata.xml36
-rw-r--r--games-fps/enemy-territory-2.60b-r114
-rw-r--r--games-fps/enemy-territory-etpro-3.2.6-r114
-rw-r--r--games-fps/enemy-territory-etpro/Manifest3
-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.xml8
-rw-r--r--games-fps/enemy-territory-omnibot-0.8514
-rw-r--r--games-fps/enemy-territory-omnibot/Manifest4
-rw-r--r--games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.85.ebuild20
-rw-r--r--games-fps/enemy-territory-omnibot/metadata.xml12
-rw-r--r--games-fps/enemy-territory-truecombat-0.49b14
-rw-r--r--games-fps/enemy-territory-truecombat/Manifest4
-rw-r--r--games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild36
-rw-r--r--games-fps/enemy-territory-truecombat/metadata.xml8
-rw-r--r--games-fps/enemy-territory/Manifest5
-rw-r--r--games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild126
-rw-r--r--games-fps/enemy-territory/metadata.xml11
-rw-r--r--games-fps/etqw-bin-1.5-r114
-rw-r--r--games-fps/etqw-bin/Manifest3
-rw-r--r--games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild71
-rw-r--r--games-fps/etqw-bin/metadata.xml8
-rw-r--r--games-fps/etqw-data-1.012
-rw-r--r--games-fps/etqw-data/Manifest2
-rw-r--r--games-fps/etqw-data/etqw-data-1.0.ebuild65
-rw-r--r--games-fps/etqw-data/metadata.xml8
-rw-r--r--games-fps/etqw-demo-2.0_p1-r113
-rw-r--r--games-fps/etqw-demo/Manifest3
-rw-r--r--games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild60
-rw-r--r--games-fps/etqw-demo/metadata.xml8
-rw-r--r--games-fps/ezquake-bin-2.214
-rw-r--r--games-fps/ezquake-bin/Manifest6
-rw-r--r--games-fps/ezquake-bin/ezquake-bin-2.2.ebuild71
-rw-r--r--games-fps/ezquake-bin/metadata.xml11
-rw-r--r--games-fps/freedoom-0.10.1-r111
-rw-r--r--games-fps/freedoom/Manifest4
-rw-r--r--games-fps/freedoom/freedoom-0.10.1-r1.ebuild45
-rw-r--r--games-fps/freedoom/metadata.xml11
-rw-r--r--games-fps/glxquake-bin-0-r212
-rw-r--r--games-fps/glxquake-bin/Manifest3
-rw-r--r--games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild42
-rw-r--r--games-fps/glxquake-bin/metadata.xml8
-rw-r--r--games-fps/industri-1.0113
-rw-r--r--games-fps/industri/Manifest8
-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.ebuild77
-rw-r--r--games-fps/industri/metadata.xml20
-rw-r--r--games-fps/legends-0.4.1.43-r213
-rw-r--r--games-fps/legends/Manifest4
-rw-r--r--games-fps/legends/legends-0.4.1.43-r2.ebuild69
-rw-r--r--games-fps/legends/metadata.xml31
-rw-r--r--games-fps/lsdldoom-1.513
-rw-r--r--games-fps/lsdldoom/Manifest4
-rw-r--r--games-fps/lsdldoom/files/lsdldoom-1.5-paths.patch64
-rw-r--r--games-fps/lsdldoom/lsdldoom-1.5.ebuild39
-rw-r--r--games-fps/lsdldoom/metadata.xml13
-rw-r--r--games-fps/metadata.xml34
-rw-r--r--games-fps/nexuiz-2.5.2-r113
-rw-r--r--games-fps/nexuiz/Manifest5
-rw-r--r--games-fps/nexuiz/files/nexuiz-2.5.2-libpng-1.4.patch42
-rw-r--r--games-fps/nexuiz/metadata.xml14
-rw-r--r--games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild133
-rw-r--r--games-fps/openarena-0.8.8-r113
-rw-r--r--games-fps/openarena/Manifest6
-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.patch104
-rw-r--r--games-fps/openarena/metadata.xml11
-rw-r--r--games-fps/openarena/openarena-0.8.8-r1.ebuild80
-rw-r--r--games-fps/postal2-1409.2-r214
-rw-r--r--games-fps/postal2/Manifest4
-rw-r--r--games-fps/postal2/metadata.xml8
-rw-r--r--games-fps/postal2/postal2-1409.2-r2.ebuild68
-rw-r--r--games-fps/postal2mp-demo-140912
-rw-r--r--games-fps/postal2mp-demo/Manifest3
-rw-r--r--games-fps/postal2mp-demo/metadata.xml8
-rw-r--r--games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild48
-rw-r--r--games-fps/prboom-2.5.0-r112
-rw-r--r--games-fps/prboom/Manifest7
-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.xml11
-rw-r--r--games-fps/prboom/prboom-2.5.0-r1.ebuild91
-rw-r--r--games-fps/quake1-data-2.4012
-rw-r--r--games-fps/quake1-data/Manifest2
-rw-r--r--games-fps/quake1-data/metadata.xml8
-rw-r--r--games-fps/quake1-data/quake1-data-2.40.ebuild56
-rw-r--r--games-fps/quake1-demodata-1.0613
-rw-r--r--games-fps/quake1-demodata/Manifest3
-rw-r--r--games-fps/quake1-demodata/metadata.xml8
-rw-r--r--games-fps/quake1-demodata/quake1-demodata-1.06.ebuild81
-rw-r--r--games-fps/quake1-killer-2.2z12
-rw-r--r--games-fps/quake1-killer/Manifest3
-rw-r--r--games-fps/quake1-killer/metadata.xml8
-rw-r--r--games-fps/quake1-killer/quake1-killer-2.2z.ebuild31
-rw-r--r--games-fps/quake1-rally-1.213
-rw-r--r--games-fps/quake1-rally/Manifest4
-rw-r--r--games-fps/quake1-rally/metadata.xml8
-rw-r--r--games-fps/quake1-rally/quake1-rally-1.2.ebuild38
-rw-r--r--games-fps/quake1-teamfortress-2.912
-rw-r--r--games-fps/quake1-teamfortress/Manifest4
-rw-r--r--games-fps/quake1-teamfortress/metadata.xml8
-rw-r--r--games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild37
-rw-r--r--games-fps/quake1-textures-2005082012
-rw-r--r--games-fps/quake1-textures/Manifest4
-rw-r--r--games-fps/quake1-textures/metadata.xml8
-rw-r--r--games-fps/quake1-textures/quake1-textures-20050820.ebuild51
-rw-r--r--games-fps/quake2-data-3.2014
-rw-r--r--games-fps/quake2-data/Manifest3
-rw-r--r--games-fps/quake2-data/metadata.xml8
-rw-r--r--games-fps/quake2-data/quake2-data-3.20.ebuild85
-rw-r--r--games-fps/quake2-demodata-3.1413
-rw-r--r--games-fps/quake2-demodata/Manifest3
-rw-r--r--games-fps/quake2-demodata/metadata.xml8
-rw-r--r--games-fps/quake2-demodata/quake2-demodata-3.14.ebuild59
-rw-r--r--games-fps/quake2-icculus-0.16.1-r113
-rw-r--r--games-fps/quake2-icculus/Manifest20
-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.xml14
-rw-r--r--games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild195
-rw-r--r--games-fps/quake2-textures-0_beta813
-rw-r--r--games-fps/quake2-textures/Manifest3
-rw-r--r--games-fps/quake2-textures/metadata.xml8
-rw-r--r--games-fps/quake2-textures/quake2-textures-0_beta8.ebuild41
-rw-r--r--games-fps/quake3-1.36-r113
-rw-r--r--games-fps/quake3-999911
-rw-r--r--games-fps/quake3-alliance-3.3-r114
-rw-r--r--games-fps/quake3-alliance/Manifest4
-rw-r--r--games-fps/quake3-alliance/metadata.xml8
-rw-r--r--games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild23
-rw-r--r--games-fps/quake3-alternatefire-2.0-r114
-rw-r--r--games-fps/quake3-alternatefire/Manifest4
-rw-r--r--games-fps/quake3-alternatefire/files/server.cfg109
-rw-r--r--games-fps/quake3-alternatefire/metadata.xml8
-rw-r--r--games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild17
-rw-r--r--games-fps/quake3-bfp-1.2-r114
-rw-r--r--games-fps/quake3-bfp/Manifest3
-rw-r--r--games-fps/quake3-bfp/metadata.xml8
-rw-r--r--games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild17
-rw-r--r--games-fps/quake3-bin-1.32c-r214
-rw-r--r--games-fps/quake3-bin/Manifest6
-rw-r--r--games-fps/quake3-bin/files/q3ded.conf.d5
-rw-r--r--games-fps/quake3-bin/files/q3ded.rc34
-rw-r--r--games-fps/quake3-bin/metadata.xml24
-rw-r--r--games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild105
-rw-r--r--games-fps/quake3-cpma-1.4814
-rw-r--r--games-fps/quake3-cpma/Manifest5
-rw-r--r--games-fps/quake3-cpma/files/server.cfg146
-rw-r--r--games-fps/quake3-cpma/metadata.xml37
-rw-r--r--games-fps/quake3-cpma/quake3-cpma-1.48.ebuild26
-rw-r--r--games-fps/quake3-data-1.32b13
-rw-r--r--games-fps/quake3-data/Manifest3
-rw-r--r--games-fps/quake3-data/metadata.xml8
-rw-r--r--games-fps/quake3-data/quake3-data-1.32b.ebuild53
-rw-r--r--games-fps/quake3-defrag-1.91.2114
-rw-r--r--games-fps/quake3-defrag/Manifest15
-rw-r--r--games-fps/quake3-defrag/metadata.xml8
-rw-r--r--games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild44
-rw-r--r--games-fps/quake3-demo-1.11-r113
-rw-r--r--games-fps/quake3-demo/Manifest3
-rw-r--r--games-fps/quake3-demo/metadata.xml11
-rw-r--r--games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild63
-rw-r--r--games-fps/quake3-excessiveplus-2.314
-rw-r--r--games-fps/quake3-excessiveplus/Manifest3
-rw-r--r--games-fps/quake3-excessiveplus/metadata.xml20
-rw-r--r--games-fps/quake3-excessiveplus/quake3-excessiveplus-2.3.ebuild22
-rw-r--r--games-fps/quake3-lrctf-1.114
-rw-r--r--games-fps/quake3-lrctf/Manifest3
-rw-r--r--games-fps/quake3-lrctf/metadata.xml8
-rw-r--r--games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild16
-rw-r--r--games-fps/quake3-matrix-2.4_beta-r114
-rw-r--r--games-fps/quake3-matrix/Manifest3
-rw-r--r--games-fps/quake3-matrix/metadata.xml8
-rw-r--r--games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild22
-rw-r--r--games-fps/quake3-nsco-1.93-r114
-rw-r--r--games-fps/quake3-nsco/Manifest5
-rw-r--r--games-fps/quake3-nsco/files/server.cfg97
-rw-r--r--games-fps/quake3-nsco/metadata.xml29
-rw-r--r--games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild22
-rw-r--r--games-fps/quake3-osp-1.03a-r114
-rw-r--r--games-fps/quake3-osp/Manifest4
-rw-r--r--games-fps/quake3-osp/files/server.cfg165
-rw-r--r--games-fps/quake3-osp/metadata.xml8
-rw-r--r--games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild22
-rw-r--r--games-fps/quake3-ra3-1.76-r114
-rw-r--r--games-fps/quake3-ra3/Manifest3
-rw-r--r--games-fps/quake3-ra3/metadata.xml8
-rw-r--r--games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild18
-rw-r--r--games-fps/quake3-reaction-3.214
-rw-r--r--games-fps/quake3-reaction/Manifest4
-rw-r--r--games-fps/quake3-reaction/metadata.xml8
-rw-r--r--games-fps/quake3-reaction/quake3-reaction-3.2.ebuild20
-rw-r--r--games-fps/quake3-ruinhunters-1.0a-r114
-rw-r--r--games-fps/quake3-ruinhunters/Manifest4
-rw-r--r--games-fps/quake3-ruinhunters/metadata.xml8
-rw-r--r--games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild22
-rw-r--r--games-fps/quake3-teamarena-1.32b13
-rw-r--r--games-fps/quake3-teamarena/Manifest3
-rw-r--r--games-fps/quake3-teamarena/metadata.xml8
-rw-r--r--games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild54
-rw-r--r--games-fps/quake3-threewave-1.7-r114
-rw-r--r--games-fps/quake3-threewave/Manifest4
-rw-r--r--games-fps/quake3-threewave/metadata.xml8
-rw-r--r--games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild21
-rw-r--r--games-fps/quake3/Manifest5
-rw-r--r--games-fps/quake3/files/quake3-1.36-bots.patch20
-rw-r--r--games-fps/quake3/metadata.xml26
-rw-r--r--games-fps/quake3/quake3-1.36-r1.ebuild122
-rw-r--r--games-fps/quake3/quake3-9999.ebuild137
-rw-r--r--games-fps/quake4-bin-1.4.2-r213
-rw-r--r--games-fps/quake4-bin/Manifest3
-rw-r--r--games-fps/quake4-bin/metadata.xml25
-rw-r--r--games-fps/quake4-bin/quake4-bin-1.4.2-r2.ebuild133
-rw-r--r--games-fps/quake4-data-1.0.2147.1214
-rw-r--r--games-fps/quake4-data/Manifest2
-rw-r--r--games-fps/quake4-data/metadata.xml8
-rw-r--r--games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild56
-rw-r--r--games-fps/quake4-demo-1.0-r213
-rw-r--r--games-fps/quake4-demo/Manifest3
-rw-r--r--games-fps/quake4-demo/metadata.xml24
-rw-r--r--games-fps/quake4-demo/quake4-demo-1.0-r2.ebuild76
-rw-r--r--games-fps/quakeforge-0.7.2-r114
-rw-r--r--games-fps/quakeforge/Manifest4
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch33
-rw-r--r--games-fps/quakeforge/metadata.xml39
-rw-r--r--games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild126
-rw-r--r--games-fps/qudos-0.40.113
-rw-r--r--games-fps/qudos/Manifest6
-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.xml17
-rw-r--r--games-fps/qudos/qudos-0.40.1.ebuild174
-rw-r--r--games-fps/red-blue-quake2-0.112
-rw-r--r--games-fps/red-blue-quake2/Manifest7
-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.xml8
-rw-r--r--games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild57
-rw-r--r--games-fps/redeclipse-1.6.0-r213
-rw-r--r--games-fps/redeclipse/Manifest4
-rw-r--r--games-fps/redeclipse/files/redeclipse10
-rw-r--r--games-fps/redeclipse/metadata.xml19
-rw-r--r--games-fps/redeclipse/redeclipse-1.6.0-r2.ebuild82
-rw-r--r--games-fps/rott-1.1.2-r113
-rw-r--r--games-fps/rott/Manifest4
-rw-r--r--games-fps/rott/metadata.xml25
-rw-r--r--games-fps/rott/rott-1.1.2-r1.ebuild55
-rw-r--r--games-fps/rtcw-1.41b13
-rw-r--r--games-fps/rtcw/Manifest5
-rw-r--r--games-fps/rtcw/files/wolf-ded.rc24
-rw-r--r--games-fps/rtcw/metadata.xml11
-rw-r--r--games-fps/rtcw/rtcw-1.41b.ebuild94
-rw-r--r--games-fps/rtcwmp-demo-1.1-r213
-rw-r--r--games-fps/rtcwmp-demo/Manifest4
-rw-r--r--games-fps/rtcwmp-demo/files/rtcwmp-demo-ded.rc24
-rw-r--r--games-fps/rtcwmp-demo/metadata.xml11
-rw-r--r--games-fps/rtcwmp-demo/rtcwmp-demo-1.1-r2.ebuild69
-rw-r--r--games-fps/rtcwsp-demo-1.1b-r212
-rw-r--r--games-fps/rtcwsp-demo/Manifest3
-rw-r--r--games-fps/rtcwsp-demo/metadata.xml12
-rw-r--r--games-fps/rtcwsp-demo/rtcwsp-demo-1.1b-r2.ebuild56
-rw-r--r--games-fps/sauerbraten-2013.02.0313
-rw-r--r--games-fps/sauerbraten/Manifest7
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch50
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2013.02.03-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/metadata.xml14
-rw-r--r--games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild123
-rw-r--r--games-fps/serious-sam-tfe-1_beta315
-rw-r--r--games-fps/serious-sam-tfe/Manifest6
-rw-r--r--games-fps/serious-sam-tfe/metadata.xml5
-rw-r--r--games-fps/serious-sam-tfe/serious-sam-tfe-1_beta3.ebuild137
-rw-r--r--games-fps/serious-sam-tse-1_beta1-r115
-rw-r--r--games-fps/serious-sam-tse/Manifest3
-rw-r--r--games-fps/serious-sam-tse/metadata.xml5
-rw-r--r--games-fps/serious-sam-tse/serious-sam-tse-1_beta1-r1.ebuild136
-rw-r--r--games-fps/soldieroffortune-1.06a-r114
-rw-r--r--games-fps/soldieroffortune-demo-0.57-r113
-rw-r--r--games-fps/soldieroffortune-demo/Manifest3
-rw-r--r--games-fps/soldieroffortune-demo/metadata.xml11
-rw-r--r--games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild67
-rw-r--r--games-fps/soldieroffortune/Manifest3
-rw-r--r--games-fps/soldieroffortune/metadata.xml11
-rw-r--r--games-fps/soldieroffortune/soldieroffortune-1.06a-r1.ebuild83
-rw-r--r--games-fps/tenebrae-1.04-r112
-rw-r--r--games-fps/tenebrae/Manifest7
-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/files/tenebrae-1.04-redef.patch19
-rw-r--r--games-fps/tenebrae/metadata.xml18
-rw-r--r--games-fps/tenebrae/tenebrae-1.04-r1.ebuild71
-rw-r--r--games-fps/transfusion-bin-1.01-r113
-rw-r--r--games-fps/transfusion-bin/Manifest6
-rw-r--r--games-fps/transfusion-bin/files/transfusion2
-rw-r--r--games-fps/transfusion-bin/metadata.xml11
-rw-r--r--games-fps/transfusion-bin/transfusion-bin-1.01-r1.ebuild47
-rw-r--r--games-fps/tribes2-2503414
-rw-r--r--games-fps/tribes2/Manifest3
-rw-r--r--games-fps/tribes2/metadata.xml8
-rw-r--r--games-fps/tribes2/tribes2-25034.ebuild76
-rw-r--r--games-fps/turtlearena-0.6.1-r113
-rw-r--r--games-fps/turtlearena/Manifest6
-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.xml13
-rw-r--r--games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild122
-rw-r--r--games-fps/unreal-22615
-rw-r--r--games-fps/unreal-tournament-45115
-rw-r--r--games-fps/unreal-tournament-bonuspacks-43613
-rw-r--r--games-fps/unreal-tournament-bonuspacks/Manifest3
-rw-r--r--games-fps/unreal-tournament-bonuspacks/metadata.xml8
-rw-r--r--games-fps/unreal-tournament-bonuspacks/unreal-tournament-bonuspacks-436.ebuild46
-rw-r--r--games-fps/unreal-tournament-goty-45114
-rw-r--r--games-fps/unreal-tournament-goty/Manifest4
-rw-r--r--games-fps/unreal-tournament-goty/metadata.xml36
-rw-r--r--games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild171
-rw-r--r--games-fps/unreal-tournament-strikeforce-1.8113
-rw-r--r--games-fps/unreal-tournament-strikeforce/Manifest5
-rw-r--r--games-fps/unreal-tournament-strikeforce/metadata.xml8
-rw-r--r--games-fps/unreal-tournament-strikeforce/unreal-tournament-strikeforce-1.81.ebuild46
-rw-r--r--games-fps/unreal-tournament/Manifest4
-rw-r--r--games-fps/unreal-tournament/metadata.xml33
-rw-r--r--games-fps/unreal-tournament/unreal-tournament-451.ebuild120
-rw-r--r--games-fps/unreal/Manifest6
-rw-r--r--games-fps/unreal/files/unreal3
-rw-r--r--games-fps/unreal/metadata.xml21
-rw-r--r--games-fps/unreal/unreal-226.ebuild85
-rw-r--r--games-fps/urbanterror-4.3.4_p2018062714
-rw-r--r--games-fps/urbanterror-data-4.3.411
-rw-r--r--games-fps/urbanterror-data/Manifest7
-rw-r--r--games-fps/urbanterror-data/metadata.xml16
-rw-r--r--games-fps/urbanterror-data/urbanterror-data-4.3.4.ebuild65
-rw-r--r--games-fps/urbanterror/Manifest5
-rw-r--r--games-fps/urbanterror/files/urbanterror-4.3-fix-build_system.patch99
-rw-r--r--games-fps/urbanterror/files/urbanterror-4.3.3_p20180218-fix-loop.patch59
-rw-r--r--games-fps/urbanterror/metadata.xml28
-rw-r--r--games-fps/urbanterror/urbanterror-4.3.4_p20180627.ebuild170
-rw-r--r--games-fps/ut2003-2225-r413
-rw-r--r--games-fps/ut2003-bonuspack-cm-113
-rw-r--r--games-fps/ut2003-bonuspack-cm/Manifest3
-rw-r--r--games-fps/ut2003-bonuspack-cm/metadata.xml11
-rw-r--r--games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild38
-rw-r--r--games-fps/ut2003-bonuspack-de-113
-rw-r--r--games-fps/ut2003-bonuspack-de/Manifest3
-rw-r--r--games-fps/ut2003-bonuspack-de/metadata.xml11
-rw-r--r--games-fps/ut2003-bonuspack-de/ut2003-bonuspack-de-1.ebuild35
-rw-r--r--games-fps/ut2003-bonuspack-epic-113
-rw-r--r--games-fps/ut2003-bonuspack-epic/Manifest4
-rw-r--r--games-fps/ut2003-bonuspack-epic/files/epic-installer48
-rw-r--r--games-fps/ut2003-bonuspack-epic/metadata.xml8
-rw-r--r--games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild110
-rw-r--r--games-fps/ut2003-data-210714
-rw-r--r--games-fps/ut2003-data/Manifest3
-rw-r--r--games-fps/ut2003-data/metadata.xml11
-rw-r--r--games-fps/ut2003-data/ut2003-data-2107.ebuild135
-rw-r--r--games-fps/ut2003-demo-2206-r313
-rw-r--r--games-fps/ut2003-demo/Manifest8
-rw-r--r--games-fps/ut2003-demo/files/benchmark37
-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.xml11
-rw-r--r--games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild123
-rw-r--r--games-fps/ut2003/Manifest3
-rw-r--r--games-fps/ut2003/metadata.xml11
-rw-r--r--games-fps/ut2003/ut2003-2225-r4.ebuild99
-rw-r--r--games-fps/ut2004-3369.3-r114
-rw-r--r--games-fps/ut2004-action-114
-rw-r--r--games-fps/ut2004-action/Manifest3
-rw-r--r--games-fps/ut2004-action/metadata.xml8
-rw-r--r--games-fps/ut2004-action/ut2004-action-1.ebuild24
-rw-r--r--games-fps/ut2004-airbuccaneers-1.6-r214
-rw-r--r--games-fps/ut2004-airbuccaneers/Manifest3
-rw-r--r--games-fps/ut2004-airbuccaneers/metadata.xml8
-rw-r--r--games-fps/ut2004-airbuccaneers/ut2004-airbuccaneers-1.6-r2.ebuild18
-rw-r--r--games-fps/ut2004-bonuspack-cbp1-1-r214
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/Manifest3
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/metadata.xml8
-rw-r--r--games-fps/ut2004-bonuspack-cbp1/ut2004-bonuspack-cbp1-1-r2.ebuild17
-rw-r--r--games-fps/ut2004-bonuspack-cbp2-1-r214
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/Manifest4
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/metadata.xml8
-rw-r--r--games-fps/ut2004-bonuspack-cbp2/ut2004-bonuspack-cbp2-1-r2.ebuild33
-rw-r--r--games-fps/ut2004-bonuspack-ece-1-r314
-rw-r--r--games-fps/ut2004-bonuspack-ece/Manifest4
-rw-r--r--games-fps/ut2004-bonuspack-ece/metadata.xml8
-rw-r--r--games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1-r3.ebuild56
-rw-r--r--games-fps/ut2004-bonuspack-mega-1-r214
-rw-r--r--games-fps/ut2004-bonuspack-mega/Manifest3
-rw-r--r--games-fps/ut2004-bonuspack-mega/metadata.xml8
-rw-r--r--games-fps/ut2004-bonuspack-mega/ut2004-bonuspack-mega-1-r2.ebuild38
-rw-r--r--games-fps/ut2004-cor-1.01-r114
-rw-r--r--games-fps/ut2004-cor/Manifest4
-rw-r--r--games-fps/ut2004-cor/metadata.xml8
-rw-r--r--games-fps/ut2004-cor/ut2004-cor-1.01-r1.ebuild22
-rw-r--r--games-fps/ut2004-crossfire-1.9514
-rw-r--r--games-fps/ut2004-crossfire/Manifest3
-rw-r--r--games-fps/ut2004-crossfire/metadata.xml8
-rw-r--r--games-fps/ut2004-crossfire/ut2004-crossfire-1.95.ebuild31
-rw-r--r--games-fps/ut2004-data-3186-r413
-rw-r--r--games-fps/ut2004-data/Manifest2
-rw-r--r--games-fps/ut2004-data/metadata.xml8
-rw-r--r--games-fps/ut2004-data/ut2004-data-3186-r4.ebuild377
-rw-r--r--games-fps/ut2004-deathball-2.4w14
-rw-r--r--games-fps/ut2004-deathball/Manifest3
-rw-r--r--games-fps/ut2004-deathball/metadata.xml8
-rw-r--r--games-fps/ut2004-deathball/ut2004-deathball-2.4w.ebuild24
-rw-r--r--games-fps/ut2004-demo-333412
-rw-r--r--games-fps/ut2004-demo/Manifest3
-rw-r--r--games-fps/ut2004-demo/metadata.xml8
-rw-r--r--games-fps/ut2004-demo/ut2004-demo-3334.ebuild84
-rw-r--r--games-fps/ut2004-fragops-2.2014
-rw-r--r--games-fps/ut2004-fragops/Manifest3
-rw-r--r--games-fps/ut2004-fragops/metadata.xml8
-rw-r--r--games-fps/ut2004-fragops/ut2004-fragops-2.20.ebuild22
-rw-r--r--games-fps/ut2004-hamsterbash-114
-rw-r--r--games-fps/ut2004-hamsterbash/Manifest3
-rw-r--r--games-fps/ut2004-hamsterbash/metadata.xml8
-rw-r--r--games-fps/ut2004-hamsterbash/ut2004-hamsterbash-1.ebuild29
-rw-r--r--games-fps/ut2004-muralis-1.1514
-rw-r--r--games-fps/ut2004-muralis/Manifest3
-rw-r--r--games-fps/ut2004-muralis/metadata.xml8
-rw-r--r--games-fps/ut2004-muralis/ut2004-muralis-1.15.ebuild21
-rw-r--r--games-fps/ut2004-strikeforce-4.114
-rw-r--r--games-fps/ut2004-strikeforce/Manifest3
-rw-r--r--games-fps/ut2004-strikeforce/metadata.xml8
-rw-r--r--games-fps/ut2004-strikeforce/ut2004-strikeforce-4.1.ebuild21
-rw-r--r--games-fps/ut2004-troopers-6.014
-rw-r--r--games-fps/ut2004-troopers/Manifest3
-rw-r--r--games-fps/ut2004-troopers/metadata.xml8
-rw-r--r--games-fps/ut2004-troopers/ut2004-troopers-6.0.ebuild28
-rw-r--r--games-fps/ut2004-unwheel-0_beta514
-rw-r--r--games-fps/ut2004-unwheel/Manifest4
-rw-r--r--games-fps/ut2004-unwheel/metadata.xml8
-rw-r--r--games-fps/ut2004-unwheel/ut2004-unwheel-0_beta5.ebuild32
-rw-r--r--games-fps/ut2004/Manifest4
-rw-r--r--games-fps/ut2004/metadata.xml8
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r1.ebuild140
-rw-r--r--games-fps/wolfgl-0.93-r212
-rw-r--r--games-fps/wolfgl/Manifest10
-rw-r--r--games-fps/wolfgl/files/0.93-gcc.patch209
-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.xml15
-rw-r--r--games-fps/wolfgl/wolfgl-0.93-r2.ebuild56
-rw-r--r--games-fps/worldofpadman-1.6-r113
-rw-r--r--games-fps/worldofpadman/Manifest5
-rw-r--r--games-fps/worldofpadman/files/worldofpadman-1.6-gentoo.patch92
-rw-r--r--games-fps/worldofpadman/metadata.xml14
-rw-r--r--games-fps/worldofpadman/worldofpadman-1.6-r1.ebuild96
-rw-r--r--games-fps/xonotic-0.8.213
-rw-r--r--games-fps/xonotic/Manifest3
-rw-r--r--games-fps/xonotic/metadata.xml11
-rw-r--r--games-fps/xonotic/xonotic-0.8.2.ebuild110
-rw-r--r--games-fps/yamagi-quake2-7.1014
-rw-r--r--games-fps/yamagi-quake2-7.2014
-rw-r--r--games-fps/yamagi-quake2/Manifest11
-rw-r--r--games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags.patch30
-rw-r--r--games-fps/yamagi-quake2/files/yamagi-quake2-respect-flags.patch40
-rw-r--r--games-fps/yamagi-quake2/files/yamagi-quake2-zlib.patch17
-rw-r--r--games-fps/yamagi-quake2/metadata.xml21
-rw-r--r--games-fps/yamagi-quake2/yamagi-quake2-7.10.ebuild132
-rw-r--r--games-fps/yamagi-quake2/yamagi-quake2-7.20.ebuild146
601 files changed, 15727 insertions, 1716 deletions
diff --git a/games-fps/Manifest.gz b/games-fps/Manifest.gz
index 98402ce3af62..e65f87ba6ca8 100644
--- a/games-fps/Manifest.gz
+++ b/games-fps/Manifest.gz
Binary files differ
diff --git a/games-fps/aaquake2-0.1 b/games-fps/aaquake2-0.1
deleted file mode 100644
index 89086b57556c..000000000000
--- a/games-fps/aaquake2-0.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=media-libs/aalib app-arch/unzip
-DESCRIPTION=text mode Quake II
-EAPI=5
-HOMEPAGE=https://www.jfedor.org/aaquake2/
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/aalib games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/source/q2source-3.21.zip https://www.jfedor.org/aaquake2/quake2-ref_softaa-0.1.tar.gz
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d951010f54bc014d3b61322852d23fae
diff --git a/games-fps/aaquake2/Manifest b/games-fps/aaquake2/Manifest
new file mode 100644
index 000000000000..0df2df94a45d
--- /dev/null
+++ b/games-fps/aaquake2/Manifest
@@ -0,0 +1,8 @@
+AUX 0.1-gentoo.patch 2539 BLAKE2B 7235721af47a838b94a1b690b045d27e9dc6ea8705a31ff89855e7fc6033b4774d58dd41f5988e342140fe6bc206f577490b25d41c3ce364c8fe10165fdb66ba SHA512 2d288074c7181f0359d83b84dc4733d99924455fe733b67e52ee95976e8103536e2935b79ab9a1b8fc481c57d1c7472386fdb9e185db64adca61ea376aae1d09
+AUX aaquake2-0.1-gcc41.patch 739 BLAKE2B bcc9a33912c860f2d167390f447478f993b12b85f8c65285c7926a6cde844de597de39c894e671255543970d6a0b69db216d70b98f3e2fd7f85e449c15546b05 SHA512 d5678631a35cb19beb99001fdaeb2223c89e699cd57dbaee8c0c30d77d8d75cc9505bb382c1cbda00f308133c26551f2e528b2880de378df92e3ec5370e8135e
+AUX aaquake2-0.1-glibc.patch 338 BLAKE2B 7daab77b94bc7d043e80c8f22358af9bf9e34e3742b3269a2c05387ddbb928f6122fa5db4481fb901658bc3da9b407bf7c806468e6d366045028d90d4541533e SHA512 6aca1c77b20030c3a70fbec76ec5c27ec767434069fa4cddcac478e52cc52d286b4c9765e50309e64aff0a0fcb3021c47059a5b027ad98cb5a3d3ced0d92e824
+AUX aaquake2-0.1-ldflags.patch 3564 BLAKE2B 569d2796e96c86843285b86ecc51875c1b2e1e5898ad611ef557fb5effeef46596ea83fc92be84dad2c4a668d9af2a3af78bcc6563256f39aecca11cce177e72 SHA512 4ef54ac768e76e4abc917f9c6ddbde426bbd8c71510ce398bbebaf1a5969ee59ca642dedea32b3150a58c2550b14b0a8953123017bf101ec3fac09f90e92ad72
+DIST q2source-3.21.zip 1477764 BLAKE2B afdeeff318e23397d24f9ecc68f4015b03d58d3f7794dd23febc4e285a916b2cf8c93b872a62a33dc1a4b7c2fff34ad92781e0320296cc13d4721b8cd5bf345a SHA512 eb3fcf3327272b7472a044336be4d73111f5b9f50b4916609996ecb690555654990c1f86e63cd6e7d4a30844e66d3eca2e428e29a598bce52e953c326caf9752
+DIST quake2-ref_softaa-0.1.tar.gz 12931 BLAKE2B b20644662b903e7604f53283008b54c86e83e7b1dd6b66a505bbaa41fdfaa3c783cbb73d320418595498b54ddc2f72e94d53096bc82cb173be9fcdd192dee2b9 SHA512 d5f7e46485084217f5cb8fdcfa360106eafbfac9dad03e4853367e9cf6857a9789ec4d37d3bca656730282649b3e33b0ab04d4c0a73de36f794d98f3c048401c
+EBUILD aaquake2-0.1.ebuild 1464 BLAKE2B 4201ced22006e750064336fe4d9646a118b069d2f602974db7d794003f8e034ca1f754c655045f425238fd018703583140245a1f573adb097254e02f0c388471 SHA512 0367992b1d5d4513b837bf0567154c917871fb6eaf0950357caa0877ca721adc5e317038494bdb08b91433799bd027a168b6577e0f8d9fc41c50a659e31dcfbe
+MISC metadata.xml 627 BLAKE2B f3919c638d66c1ea85f095ed0218b44ddc636e42f4a29f5ad3b9444e89a27d10e7dfd98814f2388d9a9b49296b584df31853036a9d851569c6eb88669e1cbdf7 SHA512 f212c3b4649df80d15c769067fe816d491201fc3d9193f5a54bad860aa19aab23cd5d6f82be7985ffe9493079de3c56348052657ac55bbbe8e298392887fabc1
diff --git a/games-fps/aaquake2/aaquake2-0.1.ebuild b/games-fps/aaquake2/aaquake2-0.1.ebuild
new file mode 100644
index 000000000000..a7aa57c721bd
--- /dev/null
+++ b/games-fps/aaquake2/aaquake2-0.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="text mode Quake II"
+HOMEPAGE="https://www.jfedor.org/aaquake2/"
+SRC_URI="mirror://idsoftware/source/q2source-3.21.zip
+ https://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 000000000000..cc7bb1733f64
--- /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 000000000000..bb2e8e5979e5
--- /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 000000000000..638e91b2c393
--- /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 000000000000..dc2359ac48d7
--- /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 000000000000..0ac912115906
--- /dev/null
+++ b/games-fps/aaquake2/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-1 b/games-fps/aaut-1
deleted file mode 100644
index dc6f188ae94b..000000000000
--- a/games-fps/aaut-1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=ascii mode unreal tournament
-EAPI=5
-HOMEPAGE=http://icculus.org/~chunky/ut/aaut/
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=|| ( games-fps/unreal-tournament games-fps/unreal-tournament-goty ) media-libs/aalib games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b3820a3e4fff0187b1f336068b78d076
diff --git a/games-fps/aaut/Manifest b/games-fps/aaut/Manifest
new file mode 100644
index 000000000000..40aa5dce1fca
--- /dev/null
+++ b/games-fps/aaut/Manifest
@@ -0,0 +1,3 @@
+AUX aaut 130 BLAKE2B d38d36b99b15875604a09c22d51456e9cb21c5302567baa112d2cccd44de351c49c7801d0f784d21700b78666203b42c91f233345bf583c92b2d4e4fb5b5cdf5 SHA512 95ca9e718dafed4190b733cec3f2409cfeea251965084a79a8c22ffb4aca4e017867e062679403e9f21c0c975b02005808c25e829d07bc228b68c7ccedf9f7ae
+EBUILD aaut-1.ebuild 436 BLAKE2B 6fa979ac22dfc43e9c8daa44f5b1c3ab1f1ce23d30752e681dcb9fadd4d388b7fcbb82f8cd286f086d64c2ec65c134ceb93ea3f1072ce07b976341adbcdee2a7 SHA512 9c25a5044e965eb24a98138eed18685f8f66263f097cd55cf9834cb386581d54ee43883c7889b9e9a4323ee7a553fc12471fda179d881932606abb198184c77c
+MISC metadata.xml 473 BLAKE2B e01e252890b36c72e23b69068ecd032125bcb4bba5bbdc17177f27f3bef409991c1ef568c8fc286755c6549766e31d22ed4dc774b19d59f8711b5b346e175a1f SHA512 5ecddbe93ff1401fdce2a74fa0b7f44a3e0475eeb21b2563578bc3a96559e87911d88f45f2bb9c085ec2c6ff778a5067557416a3e5bb94f398d1fb86061af56c
diff --git a/games-fps/aaut/aaut-1.ebuild b/games-fps/aaut/aaut-1.ebuild
new file mode 100644
index 000000000000..acde5a8582fb
--- /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
+
+EAPI=5
+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"
+ prepgamesdirs
+}
diff --git a/games-fps/aaut/files/aaut b/games-fps/aaut/files/aaut
new file mode 100644
index 000000000000..d7f9aa805abf
--- /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 000000000000..1e1a02589cef
--- /dev/null
+++ b/games-fps/aaut/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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/alienarena-20130827-r1 b/games-fps/alienarena-20130827-r1
deleted file mode 100644
index 2c985461b649..000000000000
--- a/games-fps/alienarena-20130827-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst
-DEPEND=!dedicated? ( virtual/jpeg:0 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 ) !dedicated? ( dga? ( x11-base/xorg-proto ) vidmode? ( x11-base/xorg-proto ) ) virtual/pkgconfig >=sys-apps/sed-4
-DESCRIPTION=Fast-paced multiplayer deathmatch game
-EAPI=6
-HOMEPAGE=http://red.planetarena.org/
-IUSE=dedicated +dga +vidmode +zlib
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 free-noncomm
-RDEPEND=!dedicated? ( virtual/jpeg:0 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 )
-SLOT=0
-SRC_URI=http://icculus.org/alienarena/Files/alienarena-7.66-linux20130827.tar.gz http://red.planetarena.org/files/alienarena-7.66-linux20130827.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9a541ccaf898de2419cd57f5be69609f
diff --git a/games-fps/alienarena/Manifest b/games-fps/alienarena/Manifest
new file mode 100644
index 000000000000..d373144c0bf1
--- /dev/null
+++ b/games-fps/alienarena/Manifest
@@ -0,0 +1,4 @@
+AUX alienarena-20130827-format.patch 400 BLAKE2B b98e23612337d8adcb2a0337ea2d7b0b6bcc5f2cafcd4c11996d94198c0bf4904e6ab5dcd33f690e6bfe3aee22a1d4cc85df522be139ee5bfe4c117ec2cbdfa8 SHA512 f64c502e306a7508258c62882711cc2a8b3261ebea2dd12a43624bb21d5c74f361ae82db3c629a3e903eab166c25013473fc4f0739bddc476e6740a06b69e2a6
+DIST alienarena-7.66-linux20130827.tar.gz 617636649 BLAKE2B 9f15772f12329dc48496d3f998f2913e801b3d2523be63c1b87b72ca278d70cbb32b676652b5287cc7adc5aeb98f7afdf4160a1f9125c1c92b63bf502809e08d SHA512 6b86387b12fc82c01cf7945df5da7beb1a60e42a492b70096c64ace254d6300107a4b40762d20969eefbfe11c7365fbb3a5603b71f288e2330410feef48141a3
+EBUILD alienarena-20130827-r1.ebuild 1496 BLAKE2B 5a300f1d79c38cf061b19d0901fd34c65d76ca9658e7c20cf4381087027b000089f1d1bd83e2f568f984c3ce4289e00ea536bea2d039b379894c8fe8bcbaa0fe SHA512 ffdfc4d2ff979c6bf1cd78508328916cdded0791d045223a38491b2a1ea2cdb63798035513a59d60e1afaafe110d7c8eba8c872feadc4304d6963fbf01387e5c
+MISC metadata.xml 377 BLAKE2B 7eb47fff4c65e732aeba6aa299d74e2e8bbb70b2ae0236c2ea9fe821829e5fc4d1a2d2658de762fd238ed9884e65fe822f1b8f9cf7b3bf92a69cf9e4680ca0f9 SHA512 50fc923e0986e11991d55b60137facbf8234dd9d180336664030a1c3d7dfa60665326e1937170b1803577cc55774a806824e2611fb3a1552d31426da5f662b4d
diff --git a/games-fps/alienarena/alienarena-20130827-r1.ebuild b/games-fps/alienarena/alienarena-20130827-r1.ebuild
new file mode 100644
index 000000000000..8f32fffbdf54
--- /dev/null
+++ b/games-fps/alienarena/alienarena-20130827-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop gnome2-utils
+
+MY_PN="alienarena-7.66"
+
+DESCRIPTION="Fast-paced multiplayer deathmatch game"
+HOMEPAGE="http://red.planetarena.org/"
+SRC_URI="http://icculus.org/alienarena/Files/${MY_PN}-linux${PV}.tar.gz
+ http://red.planetarena.org/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:0
+ 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-base/xorg-proto )
+ vidmode? ( x11-base/xorg-proto )
+"
+RDEPEND="!dedicated? ( ${UIRDEPEND} )"
+DEPEND="${RDEPEND}
+ !dedicated? ( ${UIDEPEND} )
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_PN/_/.}"
+
+PATCHES=( "${FILESDIR}"/${P}-format.patch )
+
+src_configure() {
+ econf \
+ --with-icondir=/usr/share/icons/hicolor/48x48/apps/ \
+ --without-system-libode \
+ --disable-documents \
+ $(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
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/alienarena/files/alienarena-20130827-format.patch b/games-fps/alienarena/files/alienarena-20130827-format.patch
new file mode 100644
index 000000000000..3162a558afad
--- /dev/null
+++ b/games-fps/alienarena/files/alienarena-20130827-format.patch
@@ -0,0 +1,11 @@
+--- a/source/game/p_client.c.old 2016-01-18 20:13:25.147714704 +0100
++++ b/source/game/p_client.c 2016-01-18 20:13:38.776476727 +0100
+@@ -2123,7 +2123,7 @@
+ #else
+ ent->ctype = 0; //alien is default
+ sprintf(modelpath, "players/%s/human", playermodel);
+- sprintf(ent->charModel, playermodel);
++ sprintf(ent->charModel, "%s", playermodel);
+ Q2_FindFile (modelpath, &file);
+ if(file)
+ {
diff --git a/games-fps/alienarena/metadata.xml b/games-fps/alienarena/metadata.xml
new file mode 100644
index 000000000000..6767cd3e05d6
--- /dev/null
+++ b/games-fps/alienarena/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-20150214-r1 b/games-fps/avp-20150214-r1
deleted file mode 100644
index 36a2d04ba8d1..000000000000
--- a/games-fps/avp-20150214-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=media-libs/libsdl[video,joystick,opengl] media-libs/openal virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Linux port of Aliens vs Predator
-EAPI=6
-HOMEPAGE=http://www.icculus.org/avp/
-KEYWORDS=~amd64 ~x86
-LICENSE=AvP
-RDEPEND=media-libs/libsdl[video,joystick,opengl] media-libs/openal
-SLOT=0
-SRC_URI=http://www.icculus.org/avp/files/avp-20150214.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=09dc8dca95411e5619676ddf6d92b3bb
diff --git a/games-fps/avp/Manifest b/games-fps/avp/Manifest
new file mode 100644
index 000000000000..372a3bd1ee63
--- /dev/null
+++ b/games-fps/avp/Manifest
@@ -0,0 +1,3 @@
+DIST avp-20150214.tar.gz 1718303 BLAKE2B cc328bdb8c35046d7bde587c7feff22e890c2c68c4890ef431ccd0b3acfbbd08c784164f59a0111a6d0b6ded63a8edfb026b17e92f74554b9a948426be8c8185 SHA512 c485a55ff455498bcf82bc17f2056d35d4c646bdf7809f4c326fc7063a9ce5db9e4893af67dff3f6bedb7d5f96e82f792d7f516044fdbab638113091a5505158
+EBUILD avp-20150214-r1.ebuild 853 BLAKE2B 4d36bc15b891a0a30a04b3ccdb077afa93d4594c9314b92d1522f643b124d598fb3c723934ceaa1c3458765c717167585e47838450a629713c9b57170920a354 SHA512 a4a61535565aca35c1460cd01730331862c2fe0395876961e7844995a2a5953ed8d86ff8b359b38558e824e3c05397dae505f8747f73ffaf1a121347c26812ea
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/avp/avp-20150214-r1.ebuild b/games-fps/avp/avp-20150214-r1.ebuild
new file mode 100644
index 000000000000..7a41b588eaad
--- /dev/null
+++ b/games-fps/avp/avp-20150214-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils cmake-utils
+
+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/libsdl[video,joystick,opengl]
+ media-libs/openal"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CMAKE_BUILD_TYPE=Release
+
+src_configure() {
+ local mycmakeargs=(
+ "-DCMAKE_VERBOSE_MAKEFILE=TRUE"
+ -DSDL_TYPE=SDL
+ -DOPENGL_TYPE=OPENGL
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ dobin "${BUILD_DIR}/${PN}"
+ dodoc README
+}
+
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/avp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/blackshades-20070723-r1 b/games-fps/blackshades-20070723-r1
deleted file mode 100644
index 91980a9721de..000000000000
--- a/games-fps/blackshades-20070723-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=media-libs/freealut media-libs/libsdl media-libs/libvorbis media-libs/openal virtual/glu virtual/opengl
-DESCRIPTION=You control a psychic bodyguard, and try to protect the VIP
-EAPI=6
-HOMEPAGE=http://www.wolfire.com/blackshades.html http://www.icculus.org/blackshades/
-KEYWORDS=~amd64 ~x86
-LICENSE=blackshades
-RDEPEND=media-libs/freealut media-libs/libsdl media-libs/libvorbis media-libs/openal virtual/glu virtual/opengl
-SLOT=0
-SRC_URI=http://filesingularity.timedoctor.org/Textures.tar.bz2 mirror://gentoo/blackshades-20070723.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a62c42e01f465cf93e8fa9b3e8dd84d3
diff --git a/games-fps/blackshades/Manifest b/games-fps/blackshades/Manifest
new file mode 100644
index 000000000000..be97a4333f21
--- /dev/null
+++ b/games-fps/blackshades/Manifest
@@ -0,0 +1,5 @@
+AUX blackshades-datadir.patch 249 BLAKE2B ed0c1a3cf60eef43cf848c26eb64e6e3cb814e1533fdc810c1d2c2124454b76bbb22aa23ada77bf0c09cacf8d54c01fc6d0f04570d1d06c49983fabcd641d37f SHA512 e1f564b29fee08ab3f335933acafb90ddf2e382f7ad72a7d7d9410d3a46222864e8370ee48bbd117493ee01c01a6ba58a8f68daa6641d250cb6c6dd135ac84dd
+DIST Textures.tar.bz2 340110 BLAKE2B fa0f10c1658235352153bfaca8301090ad1db78bdd25980f50b54e0a386433cb0b0e20b04baa206eba877374b8432c73b106d9a8cc9e58d0b652746e92ad2a2f SHA512 42a2a28072972b0919a67a17ab06cf74d6bb611cbf91ff017d72726fa2d01b3c5dec905c6760a199b710eabfff8d980867269d6ad3476096beab5c4edb2cae10
+DIST blackshades-20070723.tar.bz2 761669 BLAKE2B 5baf7465ddc82c4de3d3063ae91a44550ebf067dc2fca0d001736516511e20d249f01f15f4845dfb6d9e1ac359940f42d583c4c48579c460465a9e58e97c0478 SHA512 9477c59d685227650980c16aeb59f567764bc983c01da4e256b2ec582b5a063ef89222eb4ab0d42552bf6a4ffd95ba270229800decc9ba7a9b289f093c5b9c61
+EBUILD blackshades-20070723-r1.ebuild 1266 BLAKE2B 479e06daec59436ecc9bc8345f8418166102f9876c566a5d1eeeab9879665e8bdd02a261c06146601824104485a17eb4df2a762ae55e43c6b1652f383d6c5a8f SHA512 f6b39d40ece5a33caa9c95bedd97dc9060cb3f624f23472730e53129c5ebbca675e5edff0f93f5b675c2170645303755cf9aaf6e5ad02dc843f6175f7ddd5b76
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/blackshades/blackshades-20070723-r1.ebuild b/games-fps/blackshades/blackshades-20070723-r1.ebuild
new file mode 100644
index 000000000000..a531ebbe5987
--- /dev/null
+++ b/games-fps/blackshades/blackshades-20070723-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+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 ~x86"
+IUSE=""
+
+DEPEND="
+ media-libs/freealut
+ media-libs/libsdl
+ media-libs/libvorbis
+ media-libs/openal
+ virtual/glu
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-datadir.patch
+)
+
+src_prepare() {
+ default
+
+ rm -rf Data/Textures || die
+ rm -f ../Textures/{,Blood/}._* || die
+ mv -f ../Textures Data || die "mv failed"
+ sed -i \
+ -e "s/-O2 \(-Wall\) -g/${CXXFLAGS} \1/" \
+ -e "/^LINKER/s:$: ${LDFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i "s:@DATADIR@:/usr/share/${PN}:" \
+ Source/Main.cpp \
+ || die "sed Main.cpp failed"
+}
+
+src_compile() {
+ emake bindir
+ emake
+}
+
+src_install() {
+ newbin objs/blackshades ${PN}
+ insinto /usr/share/${PN}
+ doins -r Data
+ dodoc IF_THIS_IS_A_README_YOU_HAVE_WON Readme TODO uDevGame_Readme
+ make_desktop_entry ${PN} "Black Shades"
+}
diff --git a/games-fps/blackshades/files/blackshades-datadir.patch b/games-fps/blackshades/files/blackshades-datadir.patch
new file mode 100644
index 000000000000..ee6cdf8e0364
--- /dev/null
+++ b/games-fps/blackshades/files/blackshades-datadir.patch
@@ -0,0 +1,18 @@
+--- a/Source/Main.cpp
++++ b/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/metadata.xml b/games-fps/blackshades/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/blackshades/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/darkplaces-20140513-r1 b/games-fps/darkplaces-20140513-r1
deleted file mode 100644
index b9acf4078533..000000000000
--- a/games-fps/darkplaces-20140513-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare unpack
-DEPEND=lights? ( || ( app-arch/unrar app-arch/rar ) ) opengl? ( virtual/jpeg:0 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 x11-base/xorg-proto ) !opengl? ( sdl? ( virtual/jpeg:0 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 x11-base/xorg-proto ) ) !opengl? ( !sdl? ( !dedicated? ( virtual/jpeg:0 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 x11-base/xorg-proto ) ) ) virtual/pkgconfig app-arch/unzip
-DESCRIPTION=Enhanced engine for iD Software's Quake 1
-EAPI=6
-HOMEPAGE=http://icculus.org/twilight/darkplaces/
-IUSE=alsa cdinstall cdsound debug dedicated demo lights opengl oss sdl textures
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=net-misc/curl cdinstall? ( games-fps/quake1-data ) demo? ( games-fps/quake1-demodata ) textures? ( >=games-fps/quake1-textures-20050820 ) opengl? ( virtual/jpeg:0 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 ) !opengl? ( sdl? ( virtual/jpeg:0 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 ) ) !opengl? ( !sdl? ( !dedicated? ( virtual/jpeg:0 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 ) ) )
-SLOT=0
-SRC_URI=http://icculus.org/twilight/darkplaces/files/darkplacesengine20140513.zip lights? ( http://www.fuhquake.net/files/extras/fuhquake-lits.rar http://www.kgbsyndicate.com/romi/id1.pk3 )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4abef158208be99ef6fe60c6411e1b6a
diff --git a/games-fps/darkplaces/Manifest b/games-fps/darkplaces/Manifest
new file mode 100644
index 000000000000..ffbc908c47ee
--- /dev/null
+++ b/games-fps/darkplaces/Manifest
@@ -0,0 +1,5 @@
+DIST darkplacesengine20140513.zip 28113487 BLAKE2B 9e3ffa759921fd61d1308f7c08cc1253a5a3d32c57e8dd8c2a05771aa0b5019fac7932ad337e4be95545bf093f4a2f20d221328ae0bfa45c2b00a7f5700fc04a SHA512 45864b590057c6de0ea978b3cc967feb879b87b2d376f3b4d8525e037b10ca1fc68599c152506494bb06669c6c2304e0aa0ee1b28f7a0d589d10c23f7285052c
+DIST fuhquake-lits.rar 8388829 BLAKE2B fb9c4db151deb43424de9331641154f412394ae6346864bc62a210c7d8d12c6ed6c8647cb4cd83fa853155c5f562f7e9b8d3c779fe74c1bb3f05bb6f627b1d5e SHA512 6e59f5e08a6c401b329b86b0cd677a04b1a5aee11f24973c77c9e7ea50cab9dedf4fc15c4f3d6b73bdc87bacdc9612a3c244d0a4ceceef943abb6e256ac23925
+DIST id1.pk3 350470 BLAKE2B 76426667de5f42633f608b75286671344d439398aa9b819e9ba3979ca317a93930b1077de7efb4b1bad670a6341c7536d572cfc2590a5812c71dd0c4e8def784 SHA512 d4d7233bc1e5049e89d09448818219b0ce7941fecde5381cd95933e4c96ebc9b4e34ff7eae5eb5d0d1e3cc2ceb4f5254f4d600aded7dda373713149817621331
+EBUILD darkplaces-20140513-r1.ebuild 4349 BLAKE2B 168c527e8b886ff65886c4f27c0161b1699a3652934b639968914f22ee3e55161abb908a065eb145e7ca37db6073aabe0f43a7e36ce291b112f26c05b8dc1919 SHA512 61984cf0e710c3fa838d09b25b21c0268bae358e4252ee19fcdc727fd7e7da504403ab00e7fd1061201a6223f723423deedb96d4e553de5afced5b1ae8bf094d
+MISC metadata.xml 567 BLAKE2B 46fb34c2aab597b51dd9e8d5effb76af828734a9a7826c503de0a843d12ddeb275d31d846f419635450a3ce1880eb31a1942e684cdc82d1aad83d1aa1cc97d17 SHA512 719f0053b4390b1dccb63e70bddb518f9aad79c8b240dd37ed16b1680a1053a51e309632893c87c51d6057e2602bc6a3fbe8c7d11330da76d5646b3c8c542bbd
diff --git a/games-fps/darkplaces/darkplaces-20140513-r1.ebuild b/games-fps/darkplaces/darkplaces-20140513-r1.ebuild
new file mode 100644
index 000000000000..7ba3bcdb4ce9
--- /dev/null
+++ b/games-fps/darkplaces/darkplaces-20140513-r1.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic unpacker
+
+# 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:0
+ 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-base/xorg-proto
+"
+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="/usr/share/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() {
+ default
+
+ 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
+ newbin "${PN}-${type}" ${PN}
+ newicon darkplaces72x72.png ${PN}.png
+
+ if use demo ; then
+ # Install command-line for demo, even if not desktop entry
+ 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
+ newbin ${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
+}
+
+pkg_postinst() {
+ if ! use cdinstall && ! use demo ; then
+ elog "Place pak0.pak and pak1.pak in ${dir}/id1"
+ fi
+
+ if use sdl && ! use alsa ; 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 000000000000..f8d65d3d1216
--- /dev/null
+++ b/games-fps/darkplaces/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-1-r2 b/games-fps/doom-data-1-r2
deleted file mode 100644
index e2d58ae072ad..000000000000
--- a/games-fps/doom-data-1-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst
-DESCRIPTION=Collection of doom wad files from id
-EAPI=6
-HOMEPAGE=http://www.idsoftware.com/
-IUSE=doomsday
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=freedist
-RDEPEND=doomsday? ( games-fps/doomsday )
-SLOT=0
-SRC_URI=mirror://gentoo/doom1.wad.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d7489223d1761e99d8f75574f123dafa
diff --git a/games-fps/doom-data/Manifest b/games-fps/doom-data/Manifest
new file mode 100644
index 000000000000..c4056bcb87f6
--- /dev/null
+++ b/games-fps/doom-data/Manifest
@@ -0,0 +1,3 @@
+DIST doom1.wad.bz2 1689021 BLAKE2B 45ab359525cec44ac6f58110be80e76a75e0d5e186c1fc6bb67e055e7a7e03d2596c2e99cb3636484245d1af85d6b93830f07d8548df99f5f40e55d249bcef16 SHA512 f3aa78fd1e36d2dbd176c8c5284f8cee4f39d8e34df5386fd668565e752410e2b776413c78c1e7a3571695a1668f1e4820338ebc9a2b1a0ed1a81896260534fe
+EBUILD doom-data-1-r2.ebuild 900 BLAKE2B 9a8e2c28cbc9dbc48fb6e986f557fe7629752358822af27a833f7172ef52bde43da146cb855ffc8ebfea4bc920dd4b58ad3088dbaaffa3eabb3ad14910e7639b SHA512 c0b0d7b36df52b3165a07d63297fa14513d6fc1ee01cb0174c8333def136b1ab197dc9ea1c338a58098c003b2c980c6d52397cd316a823a6a89dca2414aafdc4
+MISC metadata.xml 347 BLAKE2B 4655211a8c43a4659d40a685721f45ba4abce6277eba9ec94b19755dff4824feef2bb704d7f5746cb43d91eef2ab9f72a47fe4a116f994cddb8bcc0cf7371180 SHA512 2cf8dbebdc411b37294374d196748fa23a741e5ae37946d87b74fabba84dc67811db3f5e215b82be1ec0e8543ea4e0b5e3a5e46412dffb576b3492ebb79edd3a
diff --git a/games-fps/doom-data/doom-data-1-r2.ebuild b/games-fps/doom-data/doom-data-1-r2.ebuild
new file mode 100644
index 000000000000..dcbff4655ed9
--- /dev/null
+++ b/games-fps/doom-data/doom-data-1-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+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 ~x86"
+IUSE="doomsday"
+
+RDEPEND="doomsday? ( games-fps/doomsday )"
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /usr/share/doom-data
+ doins *.wad
+ if use doomsday; then
+ # Make wrapper for doomsday
+ make_wrapper doomsday-demo "jdoom -file \
+ /usr/share/doom-data/doom1.wad"
+ make_desktop_entry doomsday-demo "Doomsday - Demo"
+ fi
+}
+
+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 000000000000..343e8213e1cf
--- /dev/null
+++ b/games-fps/doom-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>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="doomsday">Add wrapper to run it within doomsday</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/doom3-1.3.1304-r1 b/games-fps/doom3-1.3.1304-r1
deleted file mode 100644
index ee70fb24ff0a..000000000000
--- a/games-fps/doom3-1.3.1304-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup unpack
-DEPEND=app-arch/bzip2 app-arch/tar
-DESCRIPTION=3rd installment of the classic iD 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.doom3.com/
-IUSE=cdinstall dedicated roe
-KEYWORDS=~amd64 ~x86
-LICENSE=DOOM3
-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 ) ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://idsoftware/doom3/linux/doom3-linux-1.3.1.1304.x86.run http://zerowing.idsoftware.com/linux/doom3.png
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d7a3f637ca3e36de5568b97b1f102269
diff --git a/games-fps/doom3-cdoom-1.3.1 b/games-fps/doom3-cdoom-1.3.1
deleted file mode 100644
index 169e1565fd33..000000000000
--- a/games-fps/doom3-cdoom-1.3.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Classic Doom - Doom 1 conversion for Doom 3
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/classic-doom-3
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=classic_doom_3_131.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ef968a419384f73141f42dcbbd263e8e
diff --git a/games-fps/doom3-cdoom/Manifest b/games-fps/doom3-cdoom/Manifest
new file mode 100644
index 000000000000..f3153b61641f
--- /dev/null
+++ b/games-fps/doom3-cdoom/Manifest
@@ -0,0 +1,3 @@
+DIST classic_doom_3_131.zip 212329377 BLAKE2B 285bef3185c18cbc2e40f3cf54843dc1e37fabcf032453f8580308e8efb1da59a7d5815ad53a71752ff019671fc2949d10cf89a4ac9c21f292513af3f0c4b6f9 SHA512 6e997b6d3c35296b1d0c9ece288cc9d8d8dee1dcc42b38e068e7c101c79ab01475093777bfcd6ffeab1943fef3bc1f62e5917288c4a28789448454db9e656e51
+EBUILD doom3-cdoom-1.3.1.ebuild 643 BLAKE2B 8e90c999e1b43ef4620c5438fea8c402b5889f360f3a6e081ac7318c8cdbd26347e131367c4d7e23b03520634286ee35441c4a53b1aa5b4a483e21e2c04ed642 SHA512 9d8e8717db4a226cc9e2e3459e342c7b8fb8fee6ac1614a3010e0212851060f897c02d80910a52ca525217d00ef59ec7eb35d4504612fa82832509ea66945ba6
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..41cce5766df9
--- /dev/null
+++ b/games-fps/doom3-cdoom/doom3-cdoom-1.3.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Doom 1 conversion for Doom 3"
+MOD_NAME="Classic Doom"
+MOD_DIR="cdoom"
+MOD_ICON="cdoom.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/classic-doom-3"
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-cdoom/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-chextrek-0.52 b/games-fps/doom3-chextrek-0.52
deleted file mode 100644
index 845bcc8b0ce6..000000000000
--- a/games-fps/doom3-chextrek-0.52
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Chex Trek: Beyond the Quest - Green slimeballs mod for kids
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/chex-trek-beyond-the-quest
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=chextrek_beta_052.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=236ec1b10ea54fb1f9b92ced06669387
diff --git a/games-fps/doom3-chextrek/Manifest b/games-fps/doom3-chextrek/Manifest
new file mode 100644
index 000000000000..560a439da555
--- /dev/null
+++ b/games-fps/doom3-chextrek/Manifest
@@ -0,0 +1,3 @@
+DIST chextrek_beta_052.zip 97683796 BLAKE2B f26d9ac130b202fc9b8142d2b7b78eef18b4b27caf8bdc6fa7a525d11c77645d03c397773de95718eb7c69145318644463d26dd17775b2aeddd14cb6be59706d SHA512 b8dcb80bb4d945c42acd446f7e9f07e1f4d3c0048b386709577b77233f7a971b6be6a9e1be7cd17d7d8491cd558f73ee82b94785de122bf781078f6705d04457
+EBUILD doom3-chextrek-0.52.ebuild 822 BLAKE2B af81af5858213250fc7b908129888b39e89b825391a014c35aa8b72c7b8b29757b452f494dfcc40e842f460a52e4adcd2ab45b66847331bae4705b418e1f1c15 SHA512 bcb5517196abe147ec91e899bc1e98a0d17e6bd151d6a6f0c692466db1724a98a58061e848bba032d42ce655dac0b5b7d8168ff7ab8b7b55011af63c72aaa427
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..2f9b99a7b4fb
--- /dev/null
+++ b/games-fps/doom3-chextrek/doom3-chextrek-0.52.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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="https://www.moddb.com/mods/chex-trek-beyond-the-quest"
+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 "https://www.moddb.com/mods/chex-trek-beyond-the-quest/downloads/chex-trek-beta-052"
+ 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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-chextrek/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-data-1.1.1282-r1 b/games-fps/doom3-data-1.1.1282-r1
deleted file mode 100644
index f8e0c71c15cc..000000000000
--- a/games-fps/doom3-data-1.1.1282-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Doom 3 - data portion
-EAPI=5
-HOMEPAGE=http://www.doom3.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=DOOM3
-PROPERTIES=interactive
-RDEPEND=games-fps/doom3 games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=019ba34bf2879378b4d24ace2043e11c
diff --git a/games-fps/doom3-data/Manifest b/games-fps/doom3-data/Manifest
new file mode 100644
index 000000000000..32b03c503c5d
--- /dev/null
+++ b/games-fps/doom3-data/Manifest
@@ -0,0 +1,2 @@
+EBUILD doom3-data-1.1.1282-r1.ebuild 977 BLAKE2B c34ba06fc2072450d130efaca6b26facd918c557c7063af1fad30985b7e466e5bd474bbf06311a164278d156f06feb0ce5ad2e13a746b21d2bcf06445c278400 SHA512 6aed225b474521b5619b08ea6ab0524f1a674abefb6c52967b16ed6b27ccd72b0f2243503088ced9f850d6274cb049a618428fe84689cdc97d2710af51ec5d06
+MISC metadata.xml 591 BLAKE2B ab53c17f71fdba0e4e72b7a117caed25571f0bdaf99d5903b81455d9cb419a1d2b4e8a2e4b5df2466f16554920b0e265e8390b263688ce1bd8647ebf8bac5e98 SHA512 c3c4b6bece181e97442362164c3a87f2c3c8bbaf378ea3f629497983c2a57077d92c9caf84fd7104c47430329e6789539bbb58bab92e6a6aecd47e93c04fd4f2
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 000000000000..cdb2aea6ab45
--- /dev/null
+++ b/games-fps/doom3-data/doom3-data-1.1.1282-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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
+
+ cdrom_load_next_cd
+ einfo "Copying files from CD 2..."
+ doins "${CDROM_ROOT}"/Setup/Data/base/pak00{0,1}.pk4
+
+ cdrom_load_next_cd
+ einfo "Copying files from CD 3..."
+ doins "${CDROM_ROOT}"/Setup/Data/base/pak00{3,4}.pk4
+
+ 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 000000000000..5d323b38e051
--- /dev/null
+++ b/games-fps/doom3-data/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-1.1.1286-r1 b/games-fps/doom3-demo-1.1.1286-r1
deleted file mode 100644
index 728537f5c95f..000000000000
--- a/games-fps/doom3-demo-1.1.1286-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Doom III - 3rd installment of the classic id 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.doom3.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=DOOM3
-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(-)] games-misc/games-envd
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://3dgamers/doom3/doom3-linux-1.1.1286-demo.x86.run mirror://idsoftware/doom3/linux/doom3-linux-1.1.1286-demo.x86.run mirror://gentoo/doom3.png
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a89f37da431330eac152a7ed57772e25
diff --git a/games-fps/doom3-demo/Manifest b/games-fps/doom3-demo/Manifest
new file mode 100644
index 000000000000..45d63f8cb84d
--- /dev/null
+++ b/games-fps/doom3-demo/Manifest
@@ -0,0 +1,4 @@
+DIST doom3-linux-1.1.1286-demo.x86.run 485257318 BLAKE2B 47405fa9ce9c9dc73306a2ff8394e897d4b190348d4f6e65e3db24350b93d14598a571dde5a56cd01a7178b7287a6bece165ac5eb1af914fdd1df5fbafa2512d SHA512 9eeada64b60ef06c8380411050ea794a863c9672578bf4593a35835c6d4b7dc5d0ba8e8cb5e5c46cbbdfd7410483e5f6321ac1393655f29b481aea99dc00b3db
+DIST doom3.png 6502 BLAKE2B e467e622bb8955024aaf13dc97e0facc7f83aa344007172890d1982f39d35a643c859663fbdc60424332fe1b4b57711b7ce75fcdda8c77b4b2e8e6b71e9431e2 SHA512 9a2b3831babbf3fa0d354e1a4a779c972676edbcc0b287de9b9f3eb830e0a00d557ba9645fbf0e58e07d5705efb0ef2b7ab96cd92493e2a0afc30c8842c0043b
+EBUILD doom3-demo-1.1.1286-r1.ebuild 1469 BLAKE2B b008c5965ae127006f4ca5d39177b01903b13770906576e308006de4708994b7a16314bcdf3c98583f43d034b3176f70d251d3de94eeeba4995b2d8226c0c074 SHA512 ba3991d6737c39f11f78349751aa22434adfef2c403cc92c824b16098037c3a1d5337ef381cd2d92f9f351b0f54abd848c90d40460e54bf63cd9846ad687431c
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..c3f4751a0421
--- /dev/null
+++ b/games-fps/doom3-demo/doom3-demo-1.1.1286-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-ducttape-0007 b/games-fps/doom3-ducttape-0007
deleted file mode 100644
index 5b6d4594085f..000000000000
--- a/games-fps/doom3-ducttape-0007
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Duct Tape - sticks flashlights to your machinegun and shotgun
-EAPI=5
-HOMEPAGE=http://ducttape.glenmurphy.com/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://ducttape.glenmurphy.com/ducttape0007.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c56b292ba8a25779e2a52ca8a2d38bb5
diff --git a/games-fps/doom3-ducttape/Manifest b/games-fps/doom3-ducttape/Manifest
new file mode 100644
index 000000000000..f1ba3ac5f1f4
--- /dev/null
+++ b/games-fps/doom3-ducttape/Manifest
@@ -0,0 +1,3 @@
+DIST ducttape0007.zip 66501 BLAKE2B 393f295da2093ab70b4392097ea6301c06b5c977a787fe3e319a591ee7faddca46551c4142ace34d95d9c59b19ac4369c1882307dd8f930f487184e848248ed0 SHA512 90c2a271881b3cc7823be5f01b0809d99aabb6f8a88c9a3806d6b4adc0f86a9a0f63cd34498fcd99ff1eb25de4271aac5912495a469bbb72d4b9ae7b90f003a2
+EBUILD doom3-ducttape-0007.ebuild 752 BLAKE2B a69ba2c84574989947658e7285b9cdfde351bd3fe0cd19c66e53376288258911a74e66d1c44a8619791e919d699c60546c63229e6a3b3fa54b115583facde89b SHA512 99386e825eaf510f6b604e1b681c9fdbee1202187c1db250c4253877c338aaa14d203a4fa8cfb931c71d0071fea12554c4a853975f27a06f66a8d734d8f1176b
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/doom3-ducttape/doom3-ducttape-0007.ebuild b/games-fps/doom3-ducttape/doom3-ducttape-0007.ebuild
new file mode 100644
index 000000000000..4553ae0e3326
--- /dev/null
+++ b/games-fps/doom3-ducttape/doom3-ducttape-0007.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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} || die
+ cd ${MOD_DIR} || die
+ unpack ${A}
+}
+
+src_prepare() {
+ rm -f ${MOD_DIR}/pak002.pk4 || die # 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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-ducttape/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-eventhorizon-1.3 b/games-fps/doom3-eventhorizon-1.3
deleted file mode 100644
index a20990dca108..000000000000
--- a/games-fps/doom3-eventhorizon-1.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Event Horizon - single-player mission based on the Event Horizon film
-EAPI=5
-HOMEPAGE=http://www.gamefront.com/files/10716974
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch mirror
-SLOT=0
-SRC_URI=event_horizon_xv_1.3.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0029d0180c7dcefd1fd06d81c20373fe
diff --git a/games-fps/doom3-eventhorizon/Manifest b/games-fps/doom3-eventhorizon/Manifest
new file mode 100644
index 000000000000..a93da76289b0
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/Manifest
@@ -0,0 +1,3 @@
+DIST event_horizon_xv_1.3.zip 108659988 BLAKE2B 6779fdcfb35b70872d7c7f1a94a4c177ff8904cc8dd39f5daad2af75874d9b39042d1e41a596acf48ae0aef549fff93bacffee1a7ec76de3bbf49f6e83b2efbb SHA512 af8d406b8b87ba22a43558cec034b5810bcee2a7dbb4bf87fd879d25f67b247e0d751443b4fcfe0a1b5072376f3941dd8e59d6d10e9ae9304c05b7ef6ae31944
+EBUILD doom3-eventhorizon-1.3.ebuild 651 BLAKE2B 94bcfc6a8f90f11c14e68d74b9e4c07c2fe9f1937ecdb51370f7e12bd379f58a5cd3489d01e7a7961a9ac9508e9ed6bcda86f4bf8a17c4692270be47dd494acd SHA512 42655f46815d4922bb050f918678e089a4784ab1ddd7694960dad51d01af95144e041f1500837581d77db84f53a5303d05cd6acf0796be6095cb91c218f6df5f
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..add575517592
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/doom3-eventhorizon-1.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="single-player mission based on the Event Horizon film"
+MOD_NAME="Event Horizon"
+MOD_DIR="eventhorizon"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.gamefront.com/files/10716974"
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-eventhorizon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-hellcampaign-1-r1 b/games-fps/doom3-hellcampaign-1-r1
deleted file mode 100644
index 7798b9a88f02..000000000000
--- a/games-fps/doom3-hellcampaign-1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Hell Campaign - map pack for Doom 3
-EAPI=5
-HOMEPAGE=http://www.gamefront.com/files/listing/gamingfiles/Doom_III/Maps/Map_Packs/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=sp_hc_final.zip hardcorehellcampaign_patch.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1ea6f2fde43722b670df268d9ee03dc4
diff --git a/games-fps/doom3-hellcampaign/Manifest b/games-fps/doom3-hellcampaign/Manifest
new file mode 100644
index 000000000000..fbb256737c6a
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/Manifest
@@ -0,0 +1,4 @@
+DIST hardcorehellcampaign_patch.zip 532844 BLAKE2B d6f4ac0bf3aa5d1cda257207c8645689d0e55ea35e91f8964d7b18a067b0bf65950a5a6fa771862fab4820f648526b08eae1195a4ef5bf87041f9a0f39e98c3a SHA512 643d883c1e114af49dc573c90c19b6793cfb6f399a0050bd0c084aa56773c1a72b54cd22ec147f1981cfd1400a3253be44fc0add7b8bb1d5add8fe8163a781a0
+DIST sp_hc_final.zip 113992555 BLAKE2B b2864f2d2961e84c1335e97bd1106614c7d501cb7a95d9f3ac4c634f7c5437a67e4714a8b1931e144ca2dc2f7cd00c84272a65ec03e55f159f1e8af63cee1ab3 SHA512 3af8466822882fda9094fd64ec50bbe7afa0e70e8e6dafa649f7798a14da37cfa1f725b855980e16cbe3cc48799363784f762782612617fdcd008b9490f07f2e
+EBUILD doom3-hellcampaign-1-r1.ebuild 1113 BLAKE2B 108a65210916b6baa5a62473903f3689e93ec8a96040cb44b948258dba60fb749e4981ef9ea9f6dc5f55434fd2e4bb2b4fb27a717ca0d849b4f561baa5a4ad54 SHA512 d2657eb1428d642b36b65dc996e6a988133e8cee1fc0ee0413d4f4833ff12ba24584a814742bb90404ac075c6b86875ef0ccfad93851a144246083afdcf520ef
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..80c4babebdec
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/doom3-hellcampaign-1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="map pack for Doom 3"
+MOD_NAME="Hell Campaign"
+MOD_DIR="hell_campaign"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.gamefront.com/files/listing/gamingfiles/Doom_III/Maps/Map_Packs/"
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-hellcampaign/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-inhell-1.1-r1 b/games-fps/doom3-inhell-1.1-r1
deleted file mode 100644
index 650600842563..000000000000
--- a/games-fps/doom3-inhell-1.1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 In Hell - Ultimate Doom-inspired levels for Doom 3
-EAPI=5
-HOMEPAGE=http://www.doomerland.de.vu/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=in_hell_v11.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=310398093d3de07dd75dc013c5618c13
diff --git a/games-fps/doom3-inhell/Manifest b/games-fps/doom3-inhell/Manifest
new file mode 100644
index 000000000000..5d33bebcd23c
--- /dev/null
+++ b/games-fps/doom3-inhell/Manifest
@@ -0,0 +1,3 @@
+DIST in_hell_v11.zip 356652597 BLAKE2B af2f072413d417a3d06d099b4c5c2b2ac5c3fde9e54a90be81ad12d2103252476ee048f4b38dc241b73f82099f58568c02ceb4e754f7a8fa3b1ae2193b8d161f SHA512 6d97856f518161a445eb1b01eef9a987b9e0675729734539b57c56ff798cb257a6e337cd19c3b37dbea5bf5b22ae6694957a08e3fe8bc3207ea1b7982e3f8624
+EBUILD doom3-inhell-1.1-r1.ebuild 582 BLAKE2B 9799b55ba36c9d42e8a63f96fd555231a0a114f4c07e372237e8f206d98ccda21c731f8ab52798809b8fd4cc58dd0773b4b3f4badd63b01c106f90c9a0cbe93a SHA512 2d68bd3abca0b55390497f72b05c436335442aad7a5da056bd6aa205d52a9a928ab187c79909840c65c2aabdd0c56249e088c090620d414ff4911a91f1cb97f0
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..bdd54df23fba
--- /dev/null
+++ b/games-fps/doom3-inhell/doom3-inhell-1.1-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-inhell/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-lms-4 b/games-fps/doom3-lms-4
deleted file mode 100644
index 96c7a44b8ed0..000000000000
--- a/games-fps/doom3-lms-4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Last Man Standing - add co-op support or play against swarms of monsters
-EAPI=5
-HOMEPAGE=https://www.doom3coop.com
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=LastManStandingCoop4Multiplatform.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cf360ca7426ebc1ecca81a7753a4ddfb
diff --git a/games-fps/doom3-lms/Manifest b/games-fps/doom3-lms/Manifest
new file mode 100644
index 000000000000..fcb891bc051f
--- /dev/null
+++ b/games-fps/doom3-lms/Manifest
@@ -0,0 +1,3 @@
+DIST LastManStandingCoop4Multiplatform.zip 309768743 BLAKE2B 3ae67e85eb267e62d1158832f215c2c6b3e9dcf2593824ad45318c151e847eb8f057e2b6336c4e5c148194d0006496164cfccd7b93d1590e7fa2ac50b97c5b1c SHA512 f3d6fb1beab25dafc51a59153edb4cbb173ea4cdfd924b8f9610873bc1326efc2d85d62a23c6523b4a61319718a35ed44fecdf59bc8346fb1abb159ac93e6b15
+EBUILD doom3-lms-4.ebuild 670 BLAKE2B 04820c135ea27744dea917fd39565f2edaa5447519b2854858e5237c7a21d65129f66c4400bd47e06611591277310d74f324619ee5bea82413ce4000b8084eb4 SHA512 a3eb3e59cc282d7174e7decb5a0fec109baee1446eab6b8f92689c65f9c9c9e9a9c7d5e41d719c38bf534a3f633e510f78447c717dd77a393961f1ba7d46b2f1
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..c931cd3f1b92
--- /dev/null
+++ b/games-fps/doom3-lms/doom3-lms-4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="add co-op support or play against swarms of monsters"
+MOD_NAME="Last Man Standing"
+MOD_DIR="lms4"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.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.moddb.com/mods/last-man-standing-coop/downloads"
+ 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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-lms/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-mitm-20070129 b/games-fps/doom3-mitm-20070129
deleted file mode 100644
index a295c089b001..000000000000
--- a/games-fps/doom3-mitm-20070129
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Doom 3 Make it to Morning - Single player maps
-EAPI=5
-HOMEPAGE=http://www.jimwilkie.co.uk/mitm/
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-fps/doom3-roe games-fps/doom3[opengl,roe] games-misc/games-envd dedicated? ( games-fps/doom3[dedicated] ) opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/doom3[opengl] games-fps/doom3[-dedicated] ) ) )
-RESTRICT=fetch
-SLOT=0
-SRC_URI=MakeItToMorning1-6.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a2d76252cc97e5a043af371b2b582d0e
diff --git a/games-fps/doom3-mitm/Manifest b/games-fps/doom3-mitm/Manifest
new file mode 100644
index 000000000000..08075680efd2
--- /dev/null
+++ b/games-fps/doom3-mitm/Manifest
@@ -0,0 +1,3 @@
+DIST MakeItToMorning1-6.zip 184131772 BLAKE2B 03de634789cdd62293b39617e807d9137e9fef84849555cb6b87ade9bcd1f3ad2f9973cb2510716a5fe38a5bbb1b2ebfa4a38357a65ae9355af7d53785edd048 SHA512 5c8b58b51fb4308366db74705c6f1c5ed7a99f41992000c0ceb3b57fe1d61cb617cc03725ab213d6d7cfbad76104efebe647e50d5ad78e5b0ec480ed840118ea
+EBUILD doom3-mitm-20070129.ebuild 1065 BLAKE2B e48aa506232b0454c8062ff14758838068dcfc452c2caa3e3bfa1d20103e72625bb881933cdbc03b4e45be688ce3b358c7719a2db3b5981ce9036ff81fa6784c SHA512 35d412afae56a9b8fd4413a2fcd6fb1e6d648aac7f341344d5a2b32428719fffb58232e3910a0b0555c00a8ef32199ce395f8f803474ae3375a5a94b7dfaf11f
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..7b38c2520cbd
--- /dev/null
+++ b/games-fps/doom3-mitm/doom3-mitm-20070129.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Single player maps"
+MOD_NAME="Make it to Morning"
+
+inherit eutils games games-mods
+
+HOMEPAGE="http://www.jimwilkie.co.uk/mitm/"
+SRC_URI="MakeItToMorning1-6.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="fetch"
+
+RDEPEND="games-fps/doom3-roe
+ games-fps/doom3[opengl,roe]"
+
+pkg_nofetch() {
+ elog "Go to http://www.gamewatcher.com/mods/doom-3-resurrection-of-evil-mod/make-it-to-morning-1-6"
+ elog "and download ${A} and place the file in ${DISTDIR}"
+}
+
+src_unpack() {
+ mkdir mitm || die
+ cd mitm || die
+ unpack ${A}
+}
+
+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..6} ; 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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/doom3-mitm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/doom3-roe-1 b/games-fps/doom3-roe-1
deleted file mode 100644
index ddd9dc1381e0..000000000000
--- a/games-fps/doom3-roe-1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Doom III: Resurrection of Evil expansion pack
-EAPI=5
-HOMEPAGE=http://www.doom3.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=DOOM3
-PROPERTIES=interactive
-RDEPEND=>=games-fps/doom3-1.3.1302-r2 games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4c32c516cf793c563ea065abc3dc112c
diff --git a/games-fps/doom3-roe/Manifest b/games-fps/doom3-roe/Manifest
new file mode 100644
index 000000000000..a8bc306fede9
--- /dev/null
+++ b/games-fps/doom3-roe/Manifest
@@ -0,0 +1,2 @@
+EBUILD doom3-roe-1.ebuild 1125 BLAKE2B 39336ef1c81bbd9ce7cf241a4769bfb273f683826db9cd948bdea246ad08c1eef3fbad1bfca898b179a1e95a6ab4304f8ccd23186c87356a854bb4b76300f2bf SHA512 6298e6825517288bd5bc745c342d4c87e39aedfa7f25875aca52f7ce174bbeec3feba66888e59aead072bcf4e1f8952befcdde192f7ec35a7971fabc3aa5acfc
+MISC metadata.xml 708 BLAKE2B 13bbc429d58051c74aa1be7c2f817c8608789ee089d14e39d7fc1835e99c346d947da3deafe4704e5cc785b626e2f4e0e9059ef60db8a0f3ad42e8ada85fed9c SHA512 b6e3b1a4256c90d51a69f0c74f6a4e991f62af0721fce6c4e2ba884c08f92f7083c4b9ab1ea736f39f5886a2b246e11ababb6c0906151fe50fa0a0adaa8c01bf
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 000000000000..1c8c05a0b84d
--- /dev/null
+++ b/games-fps/doom3-roe/doom3-roe-1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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
+
+ 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 000000000000..1cfc52506137
--- /dev/null
+++ b/games-fps/doom3-roe/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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 000000000000..d1c91a6f2603
--- /dev/null
+++ b/games-fps/doom3/Manifest
@@ -0,0 +1,4 @@
+DIST doom3-linux-1.3.1.1304.x86.run 21145838 BLAKE2B ac69b20193b188556143ff57464f81c088dc008abfda98ff49d8a2d802fa06ff383e6bcde4a8a056066e8cd663a07fa01f4f171e30ec5fe9185fd975a13efb60 SHA512 f2a42478d84a6242a7982d1acd726b746596b7a13147acbd920d618223d6f52ab4c49aa7d7f07067674da2881372a181396a0bdd476e3956fb702c76eebb0d02
+DIST doom3.png 6502 BLAKE2B e467e622bb8955024aaf13dc97e0facc7f83aa344007172890d1982f39d35a643c859663fbdc60424332fe1b4b57711b7ce75fcdda8c77b4b2e8e6b71e9431e2 SHA512 9a2b3831babbf3fa0d354e1a4a779c972676edbcc0b287de9b9f3eb830e0a00d557ba9645fbf0e58e07d5705efb0ef2b7ab96cd92493e2a0afc30c8842c0043b
+EBUILD doom3-1.3.1304-r1.ebuild 2468 BLAKE2B e5d8c74d8ca00b94b73d89c5a49d36269e6bf275a8d13b44ff692dea545549e922e860f58c34259b6bceef1d789dcce0fffd20d7c32c50dc5c813413267ad47a SHA512 ad05556e1bdc829156ad8d21807dbc3df276e75f082a8f477f24bda8918dcf0c0705493fbbae3e3a8a687a1f73d5b515504b7ac9b71360c3c3af990a9149a9ca
+MISC metadata.xml 891 BLAKE2B 0b944b27943005ae45f7adcf1c5106b104f8c6d96adfe656cfed97c640793bfa5bd93799d8387393b7277bd9eaffbd5d4236755e705475836e2c13646ddffc53 SHA512 6652538b02d91c4fcb4ae39e6abdbfa66339481a4dc33c177cb9b5fca1787025b0819fcccd89de53fbc851b12db3d1b77f4d0c2baa03766f74e79458d463bdcd
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 000000000000..04242157ec3f
--- /dev/null
+++ b/games-fps/doom3/doom3-1.3.1304-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..23889c3beb20
--- /dev/null
+++ b/games-fps/doom3/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-2.0.3 b/games-fps/doomsday-2.0.3
deleted file mode 100644
index b64ab8bd8f48..000000000000
--- a/games-fps/doomsday-2.0.3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=dev-qt/qtnetwork:5 dev-qt/qtopengl:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5 dev-qt/qtgui:5[-gles2] dev-qt/qtcore:5 net-misc/curl sys-libs/zlib media-libs/assimp fmod? ( media-libs/fmod ) fluidsynth? ( media-sound/fluidsynth ) openal? ( media-libs/openal ) tools? ( sys-libs/ncurses:0 ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=A modern gaming engine for Doom, Heretic, and Hexen
-EAPI=6
-HOMEPAGE=http://www.dengine.net
-IUSE=fluidsynth openal +doom demo freedoom heretic hexen tools fmod python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3+ LGPL-3+
-PDEPEND=demo? ( games-fps/doom-data ) freedoom? ( games-fps/freedoom )
-RDEPEND=dev-qt/qtnetwork:5 dev-qt/qtopengl:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5 dev-qt/qtgui:5[-gles2] dev-qt/qtcore:5 net-misc/curl sys-libs/zlib media-libs/assimp fmod? ( media-libs/fmod ) fluidsynth? ( media-sound/fluidsynth ) openal? ( media-libs/openal ) tools? ( sys-libs/ncurses:0 )
-REQUIRED_USE=|| ( python_targets_python2_7 ) demo? ( doom ) freedoom? ( doom )
-SLOT=0
-SRC_URI=https://downloads.sourceforge.net/project/deng/Doomsday%20Engine/2.0.3/doomsday-2.0.3.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 readme.gentoo-r1 54aecea034d5e90bdb0684b80da5c9f3 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=a1a09408d6e19f3a06c9fc0c03d11d82
diff --git a/games-fps/doomsday-resources-1.01-r1 b/games-fps/doomsday-resources-1.01-r1
deleted file mode 100644
index 9f13f49143b8..000000000000
--- a/games-fps/doomsday-resources-1.01-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Improved models & textures for doomsday
-EAPI=5
-HOMEPAGE=http://www.doomsdayhq.com/
-KEYWORDS=~amd64 ~x86
-LICENSE=free-noncomm
-RDEPEND=>=games-fps/doomsday-1.9.8 games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://sourceforge/deng/jdoom-resource-pack-1.01.zip mirror://sourceforge/deng/jdoom-details.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2568a4d19b5c25499c56a0ddda4d80cf
diff --git a/games-fps/doomsday-resources/Manifest b/games-fps/doomsday-resources/Manifest
new file mode 100644
index 000000000000..76b505c2f20d
--- /dev/null
+++ b/games-fps/doomsday-resources/Manifest
@@ -0,0 +1,4 @@
+DIST jdoom-details.zip 1379495 BLAKE2B 9ab216895ac44431ce39a89a75c00a4b076edf577cb1489f5d6b7050d69664cdd2b74976dcd43152adbf56b49602a063ca18ab121def79248ce1d1e89cab665c SHA512 94f0c29940795368e9ffdb9fad57f0de65a936a90ad6256effe6fbaa72d1ddf45a016bb72431d1603ade84c01036f84b7dc3e739d04e6c33a41bdf50a9b45dce
+DIST jdoom-resource-pack-1.01.zip 23114845 BLAKE2B 42d514a80ffb15adfd505a96e2ef7152ad1d9a2de111f4f00ffbc4f5da514d3901b8a8f64ce3a85daa51b194d696acbc8dd8f953122fb3019bd7c2c459f5e011 SHA512 ec40f3920338040803b7cb3029e6b52352179fe63a1c56bb74ff398e9eca0ae4c7c058213c812644add70b833c26f9a69844c2ae068cdf7d4c7a4f6c9e277636
+EBUILD doomsday-resources-1.01-r1.ebuild 909 BLAKE2B 181b73af006439a87303cdafb0743cbedb595fd90d606ca0822d3e6df5fbc4e34cab6e37bf95e6c52922cb4eacf57764f607c6e5840f7c3315e4d05450d63902 SHA512 98696ede580ebbba812a67c33c65c6d9151bd72664ad6ad1bce5ab69f1e1bfc92ca0d1717b0e237b421641bb0f77e49ad7c6c46aa1d91c99fd1b9f239e6683cf
+MISC metadata.xml 327 BLAKE2B aa7f8c1d71b7ec0f8378b2e62ed9b0b7da2cf993c7098a2e389e4a1ec345fd3eea7d6182c6af6492482bb69b0231242140ff1b043b1de0d013d5eecd21838dbe SHA512 a28389106aa0322f671b0c09000457a24d4ccfe12e18385e9c6e10bfe5043e46318d6eefd264102f6ed65fe4f9a1511da0ba24baa0841a5072e17011520f6028
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 000000000000..884a7ef7f3f1
--- /dev/null
+++ b/games-fps/doomsday-resources/doomsday-resources-1.01-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..f2f6b346799c
--- /dev/null
+++ b/games-fps/doomsday-resources/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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 000000000000..5678892783a9
--- /dev/null
+++ b/games-fps/doomsday/Manifest
@@ -0,0 +1,3 @@
+DIST doomsday-2.0.3.tar.gz 18060670 BLAKE2B e01545f5d719310a78f01de77249a72f9c3c61a1d295ee0827475439b63653f613660bdc033c1651180cc390469c89120d262c15c6e22cece52600e2889e1437 SHA512 4f8e737df9e004cf3ac3cf16b84ffce0c85e2180af552bac41a224595c7f6932397c39f7d3e9fa522e1ae62828cb87f564a5fa411e742eb07bbee96f14c3ee7c
+EBUILD doomsday-2.0.3.ebuild 1752 BLAKE2B b65b8da028703868366192847f12b26e22a3f5b4a4a88a7d17f2b0d9378ecbdb21a3e5f1561c90e8465b4ce7403190d89afdc1da3a5e500b2f681be8dbf9a3b1 SHA512 d954a9b61ee050ec9f30e376aee0e79be62ab6ff254db77dbd1f855c6d79e5ca104e1d47aef3418911f2ba963296d8da5f6ee486e43df1bc50dbbbaf48753b58
+MISC metadata.xml 956 BLAKE2B 762c3c0aa85b8d59cdc333f381e4028c7708d113017c84d7dad4ae2659f7c9c875ec410c04b29baccfb9df267f6a081a2cd5321068a328cfe95d2861d0108c7d SHA512 2efbdb770fec0865b8f6a2b6a1ceab526842f2ff70eb9317048d3595b19ed43ba7a67857d7e698081e28463c9a925630030674992d267e6ec5a37efe67c39cfa
diff --git a/games-fps/doomsday/doomsday-2.0.3.ebuild b/games-fps/doomsday/doomsday-2.0.3.ebuild
new file mode 100644
index 000000000000..c50b22ad60ee
--- /dev/null
+++ b/games-fps/doomsday/doomsday-2.0.3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 readme.gentoo-r1 cmake-utils
+
+DESCRIPTION="A modern gaming engine for Doom, Heretic, and Hexen"
+HOMEPAGE="http://www.dengine.net"
+SRC_URI="https://downloads.sourceforge.net/project/deng/Doomsday%20Engine/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3+ LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="fluidsynth openal +doom demo freedoom heretic hexen tools fmod"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ demo? ( doom ) freedoom? ( doom )
+"
+
+RDEPEND="
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ dev-qt/qtgui:5[-gles2]
+ dev-qt/qtcore:5
+ net-misc/curl
+ sys-libs/zlib
+ media-libs/assimp
+ fmod? ( media-libs/fmod )
+ fluidsynth? ( media-sound/fluidsynth )
+ openal? ( media-libs/openal )
+ tools? ( sys-libs/ncurses:0 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
+PDEPEND="
+ demo? ( games-fps/doom-data )
+ freedoom? ( games-fps/freedoom )
+"
+
+S="${WORKDIR}/${P}/${PN}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+You need to copy Doom, Doom 2, Chex Quest, Heretic, Hexen, HexenDD,
+and Doom64 wads to a folder of your choice. Then configure in game
+engine where that folder is. This is different than old versions,
+which had centralized launchers for each game, and required the
+files to be in a specific place
+"
+
+internal_src_configure() {
+ export QT_SELECT=qt5
+ local mycmakeargs=(
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DDENG_ASSIMP_EMBEDDED=off
+ )
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ python_foreach_impl internal_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/games-fps/doomsday/metadata.xml b/games-fps/doomsday/metadata.xml
new file mode 100644
index 000000000000..851017e48a82
--- /dev/null
+++ b/games-fps/doomsday/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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="fmod">Enable support for fmod music and sound effects lib</flag>
+ <flag name="freedoom">Install launcher for doom1.wad from <pkg>games-fps/freedoom</pkg></flag>
+ <flag name="heretic">Install launcher for jheretic game</flag>
+ <flag name="hexen">Install launcher for jhexen game</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-20040817-r2 b/games-fps/duke3d-20040817-r2
deleted file mode 100644
index 2bce54ced8d8..000000000000
--- a/games-fps/duke3d-20040817-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=media-libs/libsdl media-libs/sdl-mixer media-sound/timidity++ media-sound/timidity-eawpatches perl? ( dev-lang/perl[-ithreads] ) opengl? ( virtual/opengl ) demo? ( app-arch/unzip ) !pic? ( x86? ( dev-lang/nasm ) )
-DESCRIPTION=Port of the original Duke Nukem 3D
-EAPI=5
-HOMEPAGE=http://icculus.org/projects/duke3d/
-IUSE=demo pic perl opengl
-KEYWORDS=~hppa ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl media-libs/sdl-mixer media-sound/timidity++ media-sound/timidity-eawpatches perl? ( dev-lang/perl[-ithreads] ) opengl? ( virtual/opengl ) games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://gentoo/duke3d-20040817.tar.bz2 demo? ( ftp://ftp.3drealms.com/share/3dduke13.zip ftp://ftp.planetmirror.com/pub/gameworld/downloads/3dduke13.zip )
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a2d2da18de822d8fe9cc385258981832
diff --git a/games-fps/duke3d-data-1.0-r4 b/games-fps/duke3d-data-1.0-r4
deleted file mode 100644
index 89fb63c4564a..000000000000
--- a/games-fps/duke3d-data-1.0-r4
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=install nofetch unpack
-DEPEND=gog? ( app-arch/unzip )
-DESCRIPTION=Duke Nukem 3D data files
-EAPI=5
-HOMEPAGE=http://www.3drealms.com/
-IUSE=gog cdinstall
-KEYWORDS=~amd64 ~hppa ~x86
-LICENSE=DUKE3D gog? ( GOG-EULA )
-PROPERTIES=cdinstall? ( interactive )
-RDEPEND=|| ( games-fps/eduke32 games-fps/duke3d )
-REQUIRED_USE=^^ ( cdinstall gog )
-RESTRICT=mirror bindist gog? ( fetch )
-SLOT=0
-SRC_URI=gog? ( gog_duke_nukem_3d_atomic_edition_2.0.0.9.sh )
-_eclasses_=cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f56b9dcb10364968216f459776019a0b
diff --git a/games-fps/duke3d-data/Manifest b/games-fps/duke3d-data/Manifest
new file mode 100644
index 000000000000..431aef1fb05d
--- /dev/null
+++ b/games-fps/duke3d-data/Manifest
@@ -0,0 +1,3 @@
+DIST gog_duke_nukem_3d_atomic_edition_2.0.0.9.sh 31969896 BLAKE2B 7e93515f8aedaedf6f0dc90faf5e7fef165c000414ae9dc62bad77c78568ecdec1f16b72befe1c80c7c9c8c4bd7fb11f2fd3c36f53aa9ef9d787f8b7215228f3 SHA512 d06f20bc1334172b80e4a75bd3321c3835cd95ac823836899fda8d5f8667ac83471b04a5863646aa953a39fd1cb64eb1818ee668340ede62d0a356ebdcb4065c
+EBUILD duke3d-data-1.0-r4.ebuild 1789 BLAKE2B e0487a217eb7e7452f26fbbf0ecd74e465c266144a01fb631f87261795fe25604067e7ed476cbd12d5f044020a5deadf8b6587149669a355735597222c97d609 SHA512 60e9c27f77748143e12ab76581183a091af3209496c26817b7709f96801e9043a3b9b355574e60fef7d90371850b872b0c0d984e888fffd92ee60c764f6a60a2
+MISC metadata.xml 339 BLAKE2B afb442a147713d5f9000bb54afb2b62841086063b530f74a1da843ed7d08c3ffa995d98964f5e59b344c54eea7ea27ccc3eb563ea94e31452b352c80dc3848d3 SHA512 f5cfb8b76fafaea5c08660ecb9ed1a3d25efc85898b37a249c945547c4c4fc40335ec19711025955e12f6e3922f418f81e42c5dcc9a7f8ad82d3cc9dabbe50ef
diff --git a/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild b/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild
new file mode 100644
index 000000000000..100efef9882d
--- /dev/null
+++ b/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+CDROM_OPTIONAL="yes"
+inherit eutils cdrom unpacker
+
+GOG_FILE="gog_duke_nukem_3d_atomic_edition_2.0.0.9.sh"
+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 ~x86"
+IUSE="gog"
+REQUIRED_USE="^^ ( cdinstall gog )"
+RESTRICT="mirror bindist gog? ( fetch )"
+
+RDEPEND="|| ( games-fps/eduke32 games-fps/duke3d )"
+DEPEND="gog? ( app-arch/unzip )"
+
+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_zip "${DISTDIR}"/${GOG_FILE}
+ cd data/noarch/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 /usr/share/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 data/noarch/data/{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con}
+ fi
+}
diff --git a/games-fps/duke3d-data/metadata.xml b/games-fps/duke3d-data/metadata.xml
new file mode 100644
index 000000000000..bb71cbd28b6a
--- /dev/null
+++ b/games-fps/duke3d-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>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="gog">Extract the data from the GOG.com installer.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/duke3d-demodata-1.3 b/games-fps/duke3d-demodata-1.3
deleted file mode 100644
index b79ea8ce12f7..000000000000
--- a/games-fps/duke3d-demodata-1.3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Duke Nukem 3D 1.3d shareware data
-EAPI=5
-HOMEPAGE=http://www.3drealms.com/duke3d/
-KEYWORDS=~amd64 ~x86
-LICENSE=DUKE3D
-RDEPEND=games-fps/eduke32 games-misc/games-envd
-SLOT=0
-SRC_URI=ftp://ftp.3drealms.com/share/3dduke13.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cdfd792e188cb9edc6b6b553ce5be127
diff --git a/games-fps/duke3d-demodata/Manifest b/games-fps/duke3d-demodata/Manifest
new file mode 100644
index 000000000000..1103c2132991
--- /dev/null
+++ b/games-fps/duke3d-demodata/Manifest
@@ -0,0 +1,3 @@
+DIST 3dduke13.zip 5924374 BLAKE2B 177329f04defdd2a2ab35a1926a321bbc8de023878ad6bec610669b5578cbe2f38bc0b03a37c0d0d2dcc99acf2b473ddf683b498b971b857b20964bcdbc7d7c8 SHA512 eb92daa88b4e7cfeebe1fb3d2c021e0a4a66262d0d6e76b5e27fe3cedd382e381d23b392a6d9adb42a418b9318e011c2d8adfbdc77d7c5371e61d8c091c7eb65
+EBUILD duke3d-demodata-1.3.ebuild 1136 BLAKE2B 0223ae9ec801d575d630cdbbf0f6a609b99a4e67b108a14b3c02e4a8c44e0a5a1df0c46ab69d3affb70a35eca592b0dd68f118e519c485edc8bd6fae4fc93b29 SHA512 1c234c8c8759d68b5b0b81afae55add183754c8237b84fc935a22e6c847e17c4692940f1e7dae21e9c108b542a24d3c735a51e18579c8376b2473867b0aeec03
+MISC metadata.xml 253 BLAKE2B 443ca9c8d4f6801169382e87a0ecd1385c56e65229209e7200f9d313ef380e92ae8d7dc3c38e5989a4166289f22607a20b1e13bb960fff6b3d9f78629d8ab020 SHA512 61c4689cbc649d84a00be211b7b5b98dd03e1d3f813eff370df549f2998cd4343f391c18b57cf20e4a8f4dd2311e3bfa04eb60f356f2bbac78f0b68f5091f254
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 000000000000..dbe45f7cb3f2
--- /dev/null
+++ b/games-fps/duke3d-demodata/duke3d-demodata-1.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..26079e608bed
--- /dev/null
+++ b/games-fps/duke3d-demodata/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/duke3d/Manifest b/games-fps/duke3d/Manifest
new file mode 100644
index 000000000000..520c2e10e5e3
--- /dev/null
+++ b/games-fps/duke3d/Manifest
@@ -0,0 +1,14 @@
+AUX 20040817-credits.patch 1271 BLAKE2B 9602782518bbc25b92dd72d8c10f57c7842ea97121b642aec2a61a6dcf233a285159459aaaab8c3772eab30fbe049444a4fff4f7bf329f1defeb121b354269ee SHA512 40648806d616846198a990b6e0608c76fe44ddaaa593d855fafa89697f575fe968232939cc28602db60d0e941b9067705b38c5eb66ed0a824ed8007f5d5deb70
+AUX 20040817-duke3d-makefile-opts.patch 867 BLAKE2B c382bbd818ab15173a2d4e3053dcb3c243e54f3e7f1df2dfffae53f7e5d6b320586c431cffdfd0f2311970d35870f5973b80817ce8f1f219a88f6d715cfeb202 SHA512 752937486d8f16bb7ced895b1659571aaa99ae94b14cca543f5c248cd532d52a580d324978a8b71c27e99423cdbad95266b5c58eca6e027c49fbb64ef186c6bf
+AUX 20040817-endian.patch 744 BLAKE2B c1af086ff1d452b356348ed019d743e1ed692cf3e448de55dc4ee741b563dfbdbf22303bb1b952bbf710005736794d5f07d1ec8d756e41cc0d5de39bb5156c4b SHA512 44fe2bc1509f528bc74a542325703a845d0ad9198b102d400108eb7999c73d776c0ed552b98746a5dae4dd4e8bdfc558efe83d7d5e30dac2e211076244fdbe70
+AUX 20040817-gcc34.patch 1886 BLAKE2B 7f8359098d1cbbbe94417ed899ccde72e9fee2316b3120d68d066765ac1e9b8d7d8624d4c1dcbea8f7b146070e4a87514b67af4a333a2f4f1b51a439d9ba5c94 SHA512 96e6ccffaa0334b1acfeb6542cf729eab22be5ea04c8985f5133c3a73d3ba26a568de7de00ff9bfbdc822edfb1b1438740f742d92b5fb3da62887e2aaf3f1076
+AUX duke3d-20040817-as-needed.patch 2730 BLAKE2B 86fcfead798ffb14b4399a8d931c93635656957372cc7fdd7e126e0013c03c8de5921e24a4314ef1134af0805475df62f53aa52d5b840f6ba42be7099c04ac35 SHA512 e9032d43edfb03bebd63de8cdd666e2ffd8bd1ec7e45dc2b50f6ca9db09853dba627f66454549a6c473984e610046a48539323a0ec02f2a19e2c3df4d15ceee0
+AUX duke3d-20040817-gcc4.patch 10413 BLAKE2B ddb013a5ff9e48fd7b871fa254c514f33148087c0593fbdc40878e17c339d928f7b497152f32fa17f895398e556cfaf8d2a8c1ea889f26dd5b6243ddd0ac3b68 SHA512 d00c07b987e10485313dea04d4b42bff530275f8c618e46104d435d3f65671d2271dc1c41426d816eddb9c41c0677269d4930f57780b23451355581e48f70dcf
+AUX duke3d-20040817-ldflags.patch 2132 BLAKE2B 2ad5c888753ac91b17209c99a0b97b6d3db0108083d8b98e2c4877f660f9390d43b0ef7260a199819d08e0a8c86e2924f0436d840ba5bf0322d3f8ab8a88da96 SHA512 afdcbc422b98c3c07bc4aea54865f2c7a167838eaa2270109e0066fb2e1db069bf5034bb78c0dd428baa0372465be4614125243a33aedfba19938b8e8f905b27
+AUX duke3d-20040817-noinline.patch 545 BLAKE2B b257119e4ac991f3ce2f7135d387baf40fb7fa168c2a130995916efb03fe0ab2efd170b3f3bfd2748a2716cd7c83f6238075b150205a70ada802c6191e028686 SHA512 aad5543419c762083a908b3905c22efa102cc6d9724a7fb5ee5eab96fd490c1afce632395a53049ec1b6d2123aed1c2440e583994773916eb1268bc75471ea79
+AUX duke3d.cfg 4314 BLAKE2B a6db96d8bf23823ce1df5458248a5a6b5b1ceb3f119bb939206b886311ebe7bedec9d7ff93a509bd7873a57ff9b0b28d5d5b16d1fe5dbb8bc4e7c2d9e6c5c3a8 SHA512 5b4d020d6ea9b5bfdc4333c2a0b90667577662ed32a826263560e74bd436372d689d179290a87c86d921c4accbaa75da013a3426d98f49cc7ffb6a1be5fb25a7
+AUX network.cfg 398 BLAKE2B 7f60933e9cabb129899021c3b70315cad6d9e608c53b26a39575ffc7e4a121d47b3c8e6cbb1a1363d25e142914e6224977f16856fcc972bc003333687356b0fa SHA512 89a5261453c5ad14caed7e768ef6a337f601afd2e02809987708cfad9f356847a3249ab7b1fb6f0e084874100afc1494d62e4d898f4433c1f4f763a1e822f26b
+DIST 3dduke13.zip 5924374 BLAKE2B 177329f04defdd2a2ab35a1926a321bbc8de023878ad6bec610669b5578cbe2f38bc0b03a37c0d0d2dcc99acf2b473ddf683b498b971b857b20964bcdbc7d7c8 SHA512 eb92daa88b4e7cfeebe1fb3d2c021e0a4a66262d0d6e76b5e27fe3cedd382e381d23b392a6d9adb42a418b9318e011c2d8adfbdc77d7c5371e61d8c091c7eb65
+DIST duke3d-20040817.tar.bz2 1509273 BLAKE2B 261ffcce5d3ed68f52e04167c43ae70ccb08818fce8a0790ef333ad1b421d9184e9c9ede7c2e6a5eb73978f384e6439439824ac7da7c4ac2f23ef87820a6c4cc SHA512 a08aa07153458501fb01878769af9797460525015b34d743250e3f04f15ee2dcfbb4110c94c83912ba2435e6d6c48127e2d36c0dc29833e0f6f95e3b925b571c
+EBUILD duke3d-20040817-r2.ebuild 2810 BLAKE2B 3724a3ffc357bbc82ad05dc02b6979fd40dbff34ebc5e4fdfa18ca468dafb5f1439d3235dca937d330c401505be26e80fa13300a5355ed099ba98d6ec2615b43 SHA512 bc8336762f214e334cf78da61ac077f2760bdeab4e6162184b2fbc90e8f24377c45fead7b82ec13a08755521edc1e32c019aa9b59a5b39020c992bf075e6849c
+MISC metadata.xml 2851 BLAKE2B 9f72d139d238f08adfc7c404dd93aa49d593d738d0080b8f4345aebc2f4ae308576f950ad97b1b35f1051368b1fc10892ed1d2446bdbfb06a24a3132dc39df55 SHA512 ae872ac33570fc2f067e50a29e4a9c8d51477d64cbf2596889421a09a07b78e9041d8c60abf33cdaa4f16a6079fc49bd4307493620ea8d47c74b37b4cc697d04
diff --git a/games-fps/duke3d/duke3d-20040817-r2.ebuild b/games-fps/duke3d/duke3d-20040817-r2.ebuild
new file mode 100644
index 000000000000..e75632b67acc
--- /dev/null
+++ b/games-fps/duke3d/duke3d-20040817-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+fromcvs=0
+inherit unpacker eutils flag-o-matic games
+
+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 ~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() {
+ unpack ${A}
+ 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
+ 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
+ if ! use pic && use x86 ; then
+ sed -i \
+ -e 's:^#USE_ASM:USE_ASM:' buildengine/Makefile || die
+ sed -i \
+ -e '/^#use_asm := /s:#::' Makefile || die
+ 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}"
+ emake -C source OPTIMIZE="${CFLAGS}"
+}
+
+src_install() {
+ games_make_wrapper duke3d "${GAMES_BINDIR}/duke3d.bin" "${GAMES_DATADIR}/${PN}"
+ newgamesbin source/duke3d duke3d.bin
+
+ 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"
+ 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 000000000000..19eefa4bf423
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-credits.patch
@@ -0,0 +1,38 @@
+--- a/menues.c 2003-08-17 22:16:10.000000000 +0200
++++ b/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 000000000000..9ed2a0052153
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-duke3d-makefile-opts.patch
@@ -0,0 +1,33 @@
+--- a/Makefile.orig 2003-08-17 17:45:35.948650760 -0400
++++ b/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 000000000000..3bcdc1379db6
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-endian.patch
@@ -0,0 +1,26 @@
+--- buildengine/platform.h.old 2003-08-07 12:06:17.000000000 +0200
++++ 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 000000000000..a7de9c116383
--- /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/duke3d-20040817-as-needed.patch b/games-fps/duke3d/files/duke3d-20040817-as-needed.patch
new file mode 100644
index 000000000000..c7793a833bf9
--- /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
+--- source/buildengine/Makefile 2004-05-15 05:15:05.000000000 +0200
++++ 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
+--- source/Makefile 2004-05-15 05:14:16.000000000 +0200
++++ 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 000000000000..3aaf67c6c90b
--- /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
+--- source/buildengine/a.c 2004-11-25 13:55:21.000000000 -0500
++++ 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
+--- source/buildengine/pragmas.c 2003-07-25 20:11:32.000000000 -0400
++++ 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
+--- source/buildengine/a.h 2003-04-11 08:54:06.000000000 +0200
++++ 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 000000000000..79179e663805
--- /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 000000000000..a41c5c01d063
--- /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 000000000000..2e8c4a0671b7
--- /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 000000000000..46db8b3119fb
--- /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 000000000000..1f342d0fbdcc
--- /dev/null
+++ b/games-fps/duke3d/metadata.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-20180702.6937 b/games-fps/eduke32-20180702.6937
deleted file mode 100644
index b90b53b0994f..000000000000
--- a/games-fps/eduke32-20180702.6937
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm preinst unpack
-DEPEND=media-libs/libsdl2[joystick,opengl?,sound,video,X] media-libs/sdl2-mixer[flac?,fluidsynth?,midi,timidity?,vorbis?] sys-libs/zlib:= flac? ( media-libs/flac ) gtk? ( x11-libs/gtk+:2 ) opengl? ( virtual/glu virtual/opengl ) png? ( media-libs/libpng:0= ) timidity? ( media-sound/timidity-freepats ) vpx? ( media-libs/libvpx:= ) vorbis? ( media-libs/libogg media-libs/libvorbis ) xmp? ( media-libs/exempi:= ) app-arch/unzip x86? ( dev-lang/nasm ) >=sys-apps/sed-4
-DESCRIPTION=An open source engine port of the classic PC first person shooter Duke Nukem 3D
-EAPI=6
-HOMEPAGE=http://www.eduke32.com/
-IUSE=cdinstall demo flac fluidsynth gtk hrp offensive opengl opl png psx sc-55 server sdk timidity tools vorbis voxels vpx xmp
-KEYWORDS=~amd64 ~hppa ~x86
-LICENSE=BUILDLIC GPL-2 HRP
-RDEPEND=media-libs/libsdl2[joystick,opengl?,sound,video,X] media-libs/sdl2-mixer[flac?,fluidsynth?,midi,timidity?,vorbis?] sys-libs/zlib:= flac? ( media-libs/flac ) gtk? ( x11-libs/gtk+:2 ) opengl? ( virtual/glu virtual/opengl ) png? ( media-libs/libpng:0= ) timidity? ( media-sound/timidity-freepats ) vpx? ( media-libs/libvpx:= ) vorbis? ( media-libs/libogg media-libs/libvorbis ) xmp? ( media-libs/exempi:= ) cdinstall? ( games-fps/duke3d-data ) demo? ( games-fps/duke3d-demodata )
-REQUIRED_USE=cdinstall? ( !demo ) demo? ( !cdinstall ) hrp? ( ^^ ( demo cdinstall ) !voxels ) offensive? ( ^^ ( demo cdinstall ) ) opl? ( ^^ ( demo cdinstall ) !sc-55 ) psx? ( ^^ ( demo cdinstall ) ) sc-55? ( ^^ ( demo cdinstall ) !opl ) voxels? ( !hrp ) vpx? ( opengl )
-SLOT=0
-SRC_URI=http://dukeworld.com/eduke32/synthesis/20180702-6937/eduke32_src_20180702-6937.tar.xz http://www.eduke32.com/images/eduke32_classic.png hrp? ( http://www.duke4.org/files/nightfright/hrp/duke3d_hrp.zip -> duke3d_hrp-5.4.zip ) offensive? ( http://www.duke4.org/files/nightfright/related/duke3d_xxx.zip -> duke3d_xxx-1.33.zip ) opl? ( http://www.moddb.com/downloads/mirror/95750/102/ce9e8f422c6cccdb297852426e96740a -> duke3d_musopl-2.01.zip ) psx? ( http://www.duke4.org/files/nightfright/related/duke3d_psx.zip -> duke3d_psx-1.11.zip ) sc-55? ( http://www.duke4.org/files/nightfright/music/duke3d_music-sc55.zip -> duke3d_music-sc55-4.02.zip ) voxels? ( https://www.dropbox.com/s/yaxfahyvskyvt4r/duke3d_voxels.zip -> duke3d_voxels-1.21.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=1be49671d65817925c0fc186be820422
diff --git a/games-fps/eduke32/Manifest b/games-fps/eduke32/Manifest
new file mode 100644
index 000000000000..19ca4a0b2b8f
--- /dev/null
+++ b/games-fps/eduke32/Manifest
@@ -0,0 +1,13 @@
+AUX eduke32-bin 268 BLAKE2B 20941b736b5062f237a39d769a28bbbe1442116259bfe8ff5de4e4c5d9ea2a6139a10efcfd687ee681f56a99382e817f9ad00c2eb2da9c0f1e817912b783261e SHA512 f7a472eb7225800f09d22b617aa12d75dca50892a462a128f901f8df1efc3684d324948f553e1fb44a1e9b786aa60279311ee52d1a6d695cdac0b457a8eee937
+AUX log-to-tmpdir.patch 356 BLAKE2B 9cdb65c0e15270b4970144d57e126bef5c5b468c8142b797717536852c71f5f8183f63c5a6adffd6d411b2972831320d5a4f214e05d54bca67129ab84c3b0608 SHA512 f1ac030d0d9bed2cc4e67d33563dc7d2f34d2cda75835ec875ce0c3957191c7a61b8d9a16a1d040ee7d5ca8e98e8a2660fe9ff1d8047bbd86953425124140512
+AUX search-duke3d-path.patch 485 BLAKE2B 5a21dec8abc4cc13922a306107d968d1ad6341e5a0c62802d3069a6ad9d2378ae8d19ab6018c86b9e9ec9553a053bbbd45a04d9dd32eb5a31bc1dd1afb4aa757 SHA512 2c3fa40564bfd8c99090f46aaa03f0ff38f965a65e6e03c93f5c469dbcb1feb32c0092ff7aa13b15f5a531731045ab2cbeb6ec746ca56197d28439b36f591a96
+DIST duke3d_hrp-5.4.zip 933440151 BLAKE2B 20749d6e1bdd07d0e5f28ac2f7e3aff60e8638223b934795320046922311533d6ecaefa3923650568aaa4e026927b53087032415d2d343fc4bd179c9e9ddd640 SHA512 fd5aba0a09193ccd49781d3f06a040000a134ad90f099ab7bf10a8abe474c3a742f922f8fa31522b8993828d516bdd0b5ded327e9c4615c2c101fe655d533f4d
+DIST duke3d_music-sc55-4.02.zip 155441427 BLAKE2B 7fa0c98927dd9a18411ad473269a795d1bc809fa8f9479deef06e12cd0dc97953680e7519c9d22e2d32b6ff79726682746820f78429ad11cb5edf1b64d2e4fe7 SHA512 70d3d7b4705e30cdb19ddc95e11a88afff1dc01dfc6495a488ea665f8097c1200695ec67246ac47a2480d0e68cd7d74e1d61c2120485f53bb93d9c0fb16ba9b2
+DIST duke3d_musopl-2.01.zip 266444823 BLAKE2B 5255c671782279c7723fb1f848a331645a89fdc8dd5336250d06e6eed5b63511c37bfbb07d22d7e7ce29707efe2c55406f2ee81522374de3633f2b448c7dbd6b SHA512 08308b672516a6f3a3b9b85fd836f2a29a24c8fa5f353953f5f55a281dea370046817ccfb8467b4ce25385277ced8afd83c00882e8a246b03afa5e0e349efd35
+DIST duke3d_psx-1.11.zip 7636016 BLAKE2B 63094c0eb2343e443f98844675ddc23a138d87c17b1163107e1f8c6eab4be2b5a2ed74f302604f5769d3bb71d3ce8355b69b75352dc470918ebd5c0c73d68665 SHA512 e98f3bbfb2055fa72c4376ebbdb64814b1bca7c66968ffea8ca4d980d432f59f6ae013c889a57a28b2961bbeca2cc80b83b573dc0cbc2550cd9f428cf9d2a625
+DIST duke3d_voxels-1.21.zip 2997999 BLAKE2B dcb3103a82b45cfcf906d00147a57fe47997680ff7550973ed9741e62e78f9a099c1a13f65eaa133076d6551fcdfbf34e28ff59f2ad59f91ece98753e7d39523 SHA512 4b55dcc192cb2aa8830250fd222664272176bea8f6c6e4ac6d488abfecb1332b5793986c164fde78901904e2bde37e6ee4aa020c5eb578002de8f6102f44df15
+DIST duke3d_xxx-1.33.zip 26586453 BLAKE2B 7e3c46172d3db1b2eb49eb07f243a9ead4f260d6b1dcae9f8bd599b8e9ba3a19068032afeb4ec2cf61742b6216e3a06c24f2b7e8903f9636f9d00f4d57ada47f SHA512 4783d159610fc178e748446b7a5f9c13d90e1aca3cef34deb82e99655b7f4a254f1130e16dbcfad9013b95bc07161d5c5dccfcc552fbb7a88404b4b9cedbadbf
+DIST eduke32_classic.png 5129 BLAKE2B 332ad44b7f6b4f51362387aa6870e7db54423ca5a1f0586cb5019322fb72317d8e88e0bbf46ac89b56290db7e2e4a8442179a6eb87a615fd741b5f00ce96a1c8 SHA512 b41dece8f1ddcadde3367a83f6029ffdc5805811b40380e270169684fb3b368258bd8caeb55623dadffb6fb9d72faf9a3d75907722623f4fac94a4347f8ce833
+DIST eduke32_src_20180702-6937.tar.xz 14703496 BLAKE2B b1028551621bf12cbf8e6b0626cfb9634aa096d59a9dcc173cdb89614e68006d56468e2507e8f44f9c7a81e3c2bb392b79ccdafda420d456e169f135f78e106b SHA512 f219c30c6b5892846cc1f2a025e192d868610607213671658a62bcc833a5e0d8f5a3841681475574451e9938a8b8f47410e5f7f34267b618d03a2f154539cfef
+EBUILD eduke32-20180702.6937.ebuild 6076 BLAKE2B e3e92d3a8fbca3591855495294ec06bedd7b545f8d618f3730e9544df02a7559229291915db32ed0ae236fdcd0c9eb058c3ee2ec6345daabfe7c469e20ab88e2 SHA512 ab65151e77139a4805a6a2292540e6c30c8eec695195bc28d2ff294ddac29fbbac42eacc00a35e61e4270aa25dbfe483b2c0448cb265421e1d5b1439d2c5e2d5
+MISC metadata.xml 1727 BLAKE2B 3448f8633a915311ffb9ccc6d53bf8a94928df2625eaba9e21952dab0c6eb6ec1d5da514c8ad6f810a94005571e69d1d00d1d4ecc2e2afc6ea99ee5aa9de73f5 SHA512 8aeb500968ff3b161f244cc0374f9d6b2261ad11104f92f496ab501675cc50e68981a28f0482b06845a2e058ac63464db92c0250373d2036c249739e2954063a
diff --git a/games-fps/eduke32/eduke32-20180702.6937.ebuild b/games-fps/eduke32/eduke32-20180702.6937.ebuild
new file mode 100644
index 000000000000..c42e95c4417b
--- /dev/null
+++ b/games-fps/eduke32/eduke32-20180702.6937.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop eapi7-ver gnome2-utils toolchain-funcs
+
+MY_BUILD="$(ver_cut 2)"
+MY_DATE="$(ver_cut 1)"
+
+MY_PN_HRP="duke3d_hrp"
+MY_PN_OPL="duke3d_musopl"
+MY_PN_PSX="duke3d_psx"
+MY_PN_SC55="duke3d_music-sc55"
+MY_PN_VOXELS="duke3d_voxels"
+MY_PN_XXX="duke3d_xxx"
+
+MY_PV_HRP="5.4"
+MY_PV_OPL="2.01"
+MY_PV_PSX="1.11"
+MY_PV_SC55="4.02"
+MY_PV_VOXELS="1.21"
+MY_PV_XXX="1.33"
+
+DESCRIPTION="An open source engine port of the classic PC first person shooter Duke Nukem 3D"
+HOMEPAGE="http://www.eduke32.com/"
+SRC_URI="http://dukeworld.com/eduke32/synthesis/${MY_DATE}-${MY_BUILD}/${PN}_src_${MY_DATE}-${MY_BUILD}.tar.xz
+ http://www.eduke32.com/images/eduke32_classic.png
+ hrp? ( http://www.duke4.org/files/nightfright/hrp/duke3d_hrp.zip -> ${MY_PN_HRP}-${MY_PV_HRP}.zip )
+ offensive? ( http://www.duke4.org/files/nightfright/related/${MY_PN_XXX}.zip -> ${MY_PN_XXX}-${MY_PV_XXX}.zip )
+ opl? ( http://www.moddb.com/downloads/mirror/95750/102/ce9e8f422c6cccdb297852426e96740a -> ${MY_PN_OPL}-${MY_PV_OPL}.zip )
+ psx? ( http://www.duke4.org/files/nightfright/related/duke3d_psx.zip -> ${MY_PN_PSX}-${MY_PV_PSX}.zip )
+ sc-55? ( http://www.duke4.org/files/nightfright/music/${MY_PN_SC55}.zip -> ${MY_PN_SC55}-${MY_PV_SC55}.zip )
+ voxels? ( https://www.dropbox.com/s/yaxfahyvskyvt4r/duke3d_voxels.zip -> ${MY_PN_VOXELS}-${MY_PV_VOXELS}.zip )"
+
+KEYWORDS="~amd64 ~hppa ~x86"
+LICENSE="BUILDLIC GPL-2 HRP"
+SLOT="0"
+IUSE="cdinstall demo flac fluidsynth gtk hrp offensive opengl opl png psx sc-55 server sdk timidity tools vorbis voxels vpx xmp"
+REQUIRED_USE="cdinstall? ( !demo )
+ demo? ( !cdinstall )
+ hrp? ( ^^ ( demo cdinstall )
+ !voxels )
+ offensive? ( ^^ ( demo cdinstall ) )
+ opl? ( ^^ ( demo cdinstall )
+ !sc-55 )
+ psx? ( ^^ ( demo cdinstall ) )
+ sc-55? ( ^^ ( demo cdinstall )
+ !opl )
+ voxels? ( !hrp )
+ vpx? ( opengl )"
+
+S="${WORKDIR}/${PN}_${MY_DATE}-${MY_BUILD}"
+
+MY_DEPEND_RDEPEND="media-libs/libsdl2[joystick,opengl?,sound,video,X]
+ media-libs/sdl2-mixer[flac?,fluidsynth?,midi,timidity?,vorbis?]
+ sys-libs/zlib:=
+ flac? ( media-libs/flac )
+ gtk? ( x11-libs/gtk+:2 )
+ opengl? ( virtual/glu
+ virtual/opengl )
+ png? ( media-libs/libpng:0= )
+ timidity? ( media-sound/timidity-freepats )
+ vpx? ( media-libs/libvpx:= )
+ vorbis? ( media-libs/libogg
+ media-libs/libvorbis )
+ xmp? ( media-libs/exempi:= )"
+
+RDEPEND="${MY_DEPEND_RDEPEND}
+ cdinstall? ( games-fps/duke3d-data )
+ demo? ( games-fps/duke3d-demodata )"
+
+DEPEND="${MY_DEPEND_RDEPEND}
+ app-arch/unzip
+ x86? ( dev-lang/nasm )"
+
+PATCHES=( "${FILESDIR}/log-to-tmpdir.patch" "${FILESDIR}/search-duke3d-path.patch" )
+
+src_unpack() {
+ # Extract only the eduke32 archive
+ unpack ${PN}_src_${MY_DATE}-${MY_BUILD}.tar.xz
+
+ # Unpack only the documentation
+ if use hrp; then
+ unzip -q "${DISTDIR}"/${MY_PN_HRP}-${MY_PV_HRP}.zip hrp_readme.txt hrp_todo.txt || die
+ fi
+ if use offensive; then
+ unzip -q "${DISTDIR}"/${MY_PN_XXX}-${MY_PV_XXX}.zip xxx_readme.txt || die
+ fi
+ if use opl; then
+ unzip -q "${DISTDIR}"/${MY_PN_OPL}-${MY_PV_OPL}.zip readme.txt || die
+ fi
+ if use sc-55; then
+ unzip -q "${DISTDIR}"/${MY_PN_SC55}-${MY_PV_SC55}.zip readme/music_readme.txt || die
+ fi
+ if use voxels; then
+ unzip -q "${DISTDIR}"/${MY_PN_VOXELS}-${MY_PV_VOXELS}.zip voxelpack_readme.txt || die
+ fi
+}
+
+src_compile() {
+ local myemakeopts=(
+ ALLOCACHE_AS_MALLOC=0
+ AS=$(tc-getAS)
+ CC=$(tc-getCC)
+ CXX=$(tc-getCXX)
+ CLANG=0
+ CPLUSPLUS=1
+ CUSTOMOPT=""
+ DEBUGANYWAY=0
+ F_JUMP_TABLES=""
+ FORCEDEBUG=0
+ HAVE_FLAC=$(usex flac 1 0)
+ HAVE_GTK2=$(usex gtk 1 0)
+ HAVE_VORBIS=$(usex vorbis 1 0)
+ HAVE_XMP=$(usex xmp 1 0)
+ LINKED_GTK=$(usex gtk 1 0)
+ LTO=1
+ LUNATIC=0
+ KRANDDEBUG=0
+ MEMMAP=0
+ MIXERTYPE=SDL
+ NETCODE=$(usex server 1 0)
+ NOASM=0
+ OPTLEVEL=0
+ OPTOPT=""
+ PACKAGE_REPOSITORY=1
+ POLYMER=$(usex opengl 1 0)
+ PRETTY_OUTPUT=0
+ PROFILER=0
+ RELEASE=1
+ RENDERTYPE=SDL
+ SDL_TARGET=2
+ SIMPLE_MENU=0
+ STRIP=""
+ TANDALONE=0
+ STARTUP_WINDOW=$(usex gtk 1 0)
+ USE_OPENGL=$(usex opengl 1 0)
+ USE_LIBVPX=$(usex vpx 1 0)
+ USE_LIBPNG=$(usex png 1 0)
+ USE_LUAJIT_2_1=0
+ WITHOUT_GTK=$(usex gtk 0 1)
+ )
+
+ emake "${myemakeopts[@]}"
+
+ if use tools; then
+ emake utils "${myemakeopts[@]}"
+ fi
+}
+
+src_install() {
+ local binary
+ local binaries=(
+ eduke32
+ mapster32
+ "${FILESDIR}"/eduke32-bin
+ )
+ for binary in "${binaries[@]}"; do
+ dobin "${binary}"
+ done
+
+ if use tools; then
+ local tool
+ local tools=(
+ arttool
+ bsuite
+ cacheinfo
+ generateicon
+ givedepth
+ ivfrate
+ kextract
+ kgroup
+ kmd2tool
+ makesdlkeytrans
+ map2stl
+ md2tool
+ mkpalette
+ transpal
+ unpackssi
+ wad2art
+ wad2map
+ )
+ for tool in "${tools[@]}"; do
+ dobin ${tool}
+ done
+ fi
+
+ keepdir /usr/share/games/eduke32
+ insinto /usr/share/games/eduke32
+ if use hrp; then
+ doins "${DISTDIR}"/${MY_PN_HRP}-${MY_PV_HRP}.zip
+ fi
+ if use offensive; then
+ doins "${DISTDIR}"/${MY_PN_XXX}-${MY_PV_XXX}.zip
+ fi
+ if use opl; then
+ doins "${DISTDIR}"/${MY_PN_OPL}-${MY_PV_OPL}.zip
+ fi
+ if use psx; then
+ doins "${DISTDIR}"/${MY_PN_PSX}-${MY_PV_PSX}.zip
+ fi
+ if use sc-55; then
+ doins "${DISTDIR}"/${MY_PN_SC55}-${MY_PV_SC55}.zip
+ fi
+ if use sdk; then
+ doins -r package/sdk
+ fi
+ if use voxels; then
+ doins "${DISTDIR}"/${MY_PN_VOXELS}-${MY_PV_VOXELS}.zip
+ fi
+
+ newicon "${DISTDIR}"/eduke32_classic.png eduke32.png
+
+ make_desktop_entry eduke32-bin EDuke32 eduke32 Game
+ make_desktop_entry mapster32 Mapster32 eduke32 Game
+
+ local DOCS=( package/sdk/samples/*.txt source/build/doc/*.txt source/duke3d/src/lunatic/doc/*.txt )
+ if use hrp; then
+ DOCS+=( "${WORKDIR}"/hrp_readme.txt "${WORKDIR}"/hrp_todo.txt )
+ fi
+ if use offensive; then
+ DOCS+=( "${WORKDIR}"/xxx_readme.txt )
+ fi
+ if use opl; then
+ DOCS+=( "${WORKDIR}"/readme.txt )
+ fi
+ if use sc-55; then
+ DOCS+=( "${WORKDIR}"/readme/music_readme.txt )
+ fi
+ if use voxels; then
+ DOCS+=( "${WORKDIR}"/voxelpack_readme.txt )
+ fi
+ einstalldocs
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/eduke32/files/eduke32-bin b/games-fps/eduke32/files/eduke32-bin
new file mode 100755
index 000000000000..18e5b08e1eaa
--- /dev/null
+++ b/games-fps/eduke32/files/eduke32-bin
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Get all installed zip files
+zips=$(ls /usr/share/games/eduke32/*.zip)
+
+# Create opts for eduke32
+for zip in ${zips[@]}; do
+ opts+="-g ${zip} "
+done
+
+# Switch to /tmp, for writing there the log file and run eduke32 with set opts
+cd /tmp && eduke32 ${opts}
diff --git a/games-fps/eduke32/files/log-to-tmpdir.patch b/games-fps/eduke32/files/log-to-tmpdir.patch
new file mode 100644
index 000000000000..24cec1b00af1
--- /dev/null
+++ b/games-fps/eduke32/files/log-to-tmpdir.patch
@@ -0,0 +1,11 @@
+--- a/source/duke3d/src/game.cpp 2018-05-08 19:32:19.000000000 +0200
++++ b/source/duke3d/src/game.cpp 2018-05-10 23:46:21.540213019 +0200
+@@ -6234,7 +6234,7 @@
+ }
+ else
+ #endif
+- OSD_SetLogFile(APPBASENAME ".log");
++ OSD_SetLogFile("/tmp/" APPBASENAME ".log");
+
+ OSD_SetFunctions(GAME_drawosdchar,
+ GAME_drawosdstr,
diff --git a/games-fps/eduke32/files/search-duke3d-path.patch b/games-fps/eduke32/files/search-duke3d-path.patch
new file mode 100644
index 000000000000..c35af40c749e
--- /dev/null
+++ b/games-fps/eduke32/files/search-duke3d-path.patch
@@ -0,0 +1,11 @@
+--- a/source/duke3d/src/common.cpp 2018-04-12 23:03:47.000000000 +0200
++++ b/source/duke3d/src/common.cpp 2018-05-11 00:04:36.590712915 +0200
+@@ -794,6 +794,8 @@
+
+ addsearchpath("/usr/share/games/jfduke3d");
+ addsearchpath("/usr/local/share/games/jfduke3d");
++ addsearchpath("/usr/share/games/duke3d");
++ addsearchpath("/usr/share/duke3d");
+ addsearchpath("/usr/share/games/eduke32");
+ addsearchpath("/usr/local/share/games/eduke32");
+ #elif defined EDUKE32_OSX
diff --git a/games-fps/eduke32/metadata.xml b/games-fps/eduke32/metadata.xml
new file mode 100644
index 000000000000..15de77d47f59
--- /dev/null
+++ b/games-fps/eduke32/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ck+gentoo@bl4ckb0x.de</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ EDuke32 is an awesome, free homebrew game engine and source port
+ of the classic PC first person shooter Duke Nukem 3D - Duke3D
+ for short to Windows, Linux, Mac OS X, FreeBSD and several handhelds.
+ </longdescription>
+ <use>
+ <flag name="demo">Install the Duke Nukem 3D demo files, provided by <pkg>games-fps/duke3d-demodata</pkg>.</flag>
+ <flag name="fluidsynth">Install <pkg>media-libs/sdl2-mixer</pkg> with fluidsynth support.</flag>
+ <flag name="hrp">Install the Duke Nukem 3D High Resolution Pack.</flag>
+ <flag name="offensive">Install the Duke Nukem 3D XXX Pack.</flag>
+ <flag name="opl">Install the Duke Nukem 3D OPL music files.</flag>
+ <flag name="psx">Install the Duke Nukem 3D PSX high resolution voice files.</flag>
+ <flag name="sc-55">Install the Duke Nukem 3D Roland SC-55 music files.</flag>
+ <flag name="server">Enable support for multiplayer.</flag>
+ <flag name="sdk">Install the SDK files.</flag>
+ <flag name="tools">Install the support tools for mapster32.</flag>
+ <flag name="voxels">Install the Duke Nukem 3D Voxels Pack.</flag>
+ <flag name="vpx">Enable support for <pkg>media-libs/libvpx</pkg>.</flag>
+ <flag name="xmp">Enable support for <pkg>media-libs/exempi</pkg>.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory-2.60b-r1 b/games-fps/enemy-territory-2.60b-r1
deleted file mode 100644
index 46c340ee34b2..000000000000
--- a/games-fps/enemy-territory-2.60b-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=standalone multi-player game based on Return to Castle Wolfenstein
-EAPI=5
-HOMEPAGE=http://www.idsoftware.com/
-IUSE=dedicated
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=RTCW-ETEULA
-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(-)] ) games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=0
-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-2.60b.zip dedicated? ( https://dev.gentoo.org/~wolf31o2/sources/dump/enemy-territory-all-0.1.tar.bz2 mirror://gentoo/enemy-territory-all-0.1.tar.bz2 )
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b30681b28f222523900f9312c0dc4ac8
diff --git a/games-fps/enemy-territory-etpro-3.2.6-r1 b/games-fps/enemy-territory-etpro-3.2.6-r1
deleted file mode 100644
index f0f398e6568a..000000000000
--- a/games-fps/enemy-territory-etpro-3.2.6-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Enemy Territory ETPro - Minor additions to Enemy Territory to make it more fun
-EAPI=5
-HOMEPAGE=http://etpro.anime.net/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/enemy-territory[dedicated] ) opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://bani.anime.net/etpro/etpro-3_2_6.zip http://www.enemyterritory.sk/files/etpro-3_2_6.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=20d5772ba1bc7313e22fe908f1002031
diff --git a/games-fps/enemy-territory-etpro/Manifest b/games-fps/enemy-territory-etpro/Manifest
new file mode 100644
index 000000000000..f4769d1832f0
--- /dev/null
+++ b/games-fps/enemy-territory-etpro/Manifest
@@ -0,0 +1,3 @@
+DIST etpro-3_2_6.zip 3698539 BLAKE2B 08179b55e4c3dacdde65e12a94946f28e9f28d32c989a408bf53af7480b41d4ae442c2309ead867f8745d5b575380430b931a5cefa06f0280bc2f5eca17140da SHA512 366da5b7aaaa4b88da050aca95342425cba855182c59bf2fbe104252cc2241f79be629ae5dc15f9c396284910eb63721db01fc0aa02303cc51015d36263db9de
+EBUILD enemy-territory-etpro-3.2.6-r1.ebuild 537 BLAKE2B c9073ed33d089d1796530a6fd6c357912a2dd39d3c21b5123d7f8dba746d2deac832f8f470ba9b80eecaa59bb433afd636b4bb317538f62d69a2c245a9b5d044 SHA512 52ef43888d08678aab3a6caed4a080272b786d804cf10ecf266d0d969cb5845c0024cbe8d507df77598719f5ba5374ab04dce7878069fdc379ce3a4f78efabf9
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..d86355ef1353
--- /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
+
+EAPI=5
+
+GAME="enemy-territory"
+MOD_DESC="Minor additions to Enemy Territory to make it more fun"
+MOD_NAME="ETPro"
+MOD_DIR="etpro"
+
+inherit games games-mods
+
+HOMEPAGE="http://etpro.anime.net/"
+SRC_URI="http://bani.anime.net/etpro/etpro-${PV//./_}.zip
+ http://www.enemyterritory.sk/files/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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/enemy-territory-etpro/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory-omnibot-0.85 b/games-fps/enemy-territory-omnibot-0.85
deleted file mode 100644
index 70c037f3f282..000000000000
--- a/games-fps/enemy-territory-omnibot-0.85
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Enemy Territory Omnibot - Bots for Ennemy Territory
-EAPI=5
-HOMEPAGE=http://www.omni-bot.com/
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( games-fps/enemy-territory[dedicated] ) opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://omni-bot.invisionzone.com/index.php?/files/getdownload/208-omni-bot-enemy-territory -> omni-bot_0_85_ET_linux.zip http://omni-bot.invisionzone.com/index.php?/files/getdownload/207-omni-bot-enemy-territory -> omni-bot_0_85_ET_waypoint_mod.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fee36890513605cdc132305f2a3f0427
diff --git a/games-fps/enemy-territory-omnibot/Manifest b/games-fps/enemy-territory-omnibot/Manifest
new file mode 100644
index 000000000000..b9774a888b3f
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/Manifest
@@ -0,0 +1,4 @@
+DIST omni-bot_0_85_ET_linux.zip 19662449 BLAKE2B c4327be6a60e23982569f84243736cbc9068948b0dc1d113057d750194e6ab0b516e2305f24091b970f2ce3274e612ca9ffef70c6eef5c18d7a1080c2f7d910f SHA512 83ca166556cbbae26ab8d498437b5922e1db5ad4e7be3718a6ccc158af8f143550b159bcc01b48e7c82901285edc3cbde02e59f7bb3d068d016c2fe5e0728b93
+DIST omni-bot_0_85_ET_waypoint_mod.zip 4344830 BLAKE2B cb37d4f4ef5be155b45ff40ea3d1813fdb723e15301140e57397f3f0f8940f0073f06324b2e21913d92e5d4a3a4a17999d52ccdcadb54fbea4f8c565d3142805 SHA512 e63eb693879a4e85add3ac3def6698aa1a08c3293c2180664903adfede8aa6df682afb8ed8f549d573d3baee236d5eefe50a4f1142798cf1ac13e75b80b99558
+EBUILD enemy-territory-omnibot-0.85.ebuild 641 BLAKE2B 1ab3d6b3546033e2912d7be039b1272f4424ef892cc7f04ad46a8930b3025fd88d5755b6110ff06bd1fb85778a1c6d42c9f59cc752eed99456dd3f8bcee9abd1 SHA512 508df412492bccbc27cea01f1eb72a29052556b110bc17ef91b4ab393844931847455bff7b5d4757114612610ab0aabf5631a00c713a0aa605bc540177956053
+MISC metadata.xml 368 BLAKE2B c7ddfd60946ebc15ec02840097337c6c69c04bccfe62871a9504b92d2a1f0bb2a55ce54f3460ba26e4d77f36e1ce317cbc536c27ed40c5d4413ba38e797bfee9 SHA512 99b24da1ab137ccf7078a2d845e52ed4cbb22b8e64f0b2514a3c02d87cbf1210fc0e60d938864623994a9f47f9e6bbe92a54eb361030bedd35afd18759d3137d
diff --git a/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.85.ebuild b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.85.ebuild
new file mode 100644
index 000000000000..f2e55798684e
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/enemy-territory-omnibot-0.85.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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//./_}"
+SRC_URI="http://omni-bot.invisionzone.com/index.php?/files/getdownload/208-omni-bot-enemy-territory -> omni-bot_${MY_PV}_ET_linux.zip
+ http://omni-bot.invisionzone.com/index.php?/files/getdownload/207-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 000000000000..907a3f30fd04
--- /dev/null
+++ b/games-fps/enemy-territory-omnibot/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>junghans@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ </pkgmetadata>
diff --git a/games-fps/enemy-territory-truecombat-0.49b b/games-fps/enemy-territory-truecombat-0.49b
deleted file mode 100644
index de19816f2ffe..000000000000
--- a/games-fps/enemy-territory-truecombat-0.49b
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Enemy Territory True Combat - a team-based realism modification
-EAPI=5
-HOMEPAGE=http://www.truecombatelite.com/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=~virtual/libstdc++-3.3 games-misc/games-envd dedicated? ( games-fps/enemy-territory[dedicated] ) opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/enemy-territory[opengl] games-fps/enemy-territory[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-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/tce049b_all_os_fixed.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=bc36a68d903ca85777218eb768f7af8a
diff --git a/games-fps/enemy-territory-truecombat/Manifest b/games-fps/enemy-territory-truecombat/Manifest
new file mode 100644
index 000000000000..79aed18da578
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/Manifest
@@ -0,0 +1,4 @@
+DIST tce049b_all_os_fixed.zip 6795533 BLAKE2B e2dc54e031d6d0e6f67a965ef2a92808af08305b9a9a14f46d374bc16b761f557a99182a86a09bd3993b733a84a980fc82665911442d3388f00375789efc0304 SHA512 8814f193437551c29edf88087229ee813317df10e264c3a0200942ef7c1e876aacff4d985d28bd59d1b3bd9589c86ad034d59a8f434cb443a31e07db9b0562da
+DIST tcetest049.zip 472749193 BLAKE2B da9ac999c282540a2dd022d4a77a0b5e2f9ccd5da01384e52e7dfdaa4997ed791152a9f480bce8804729dcf4742b8b64b5a89e06b577a76c1bc91c9787fc5f37 SHA512 9c5dfaad2f427b4fdc3fa0d5ed7b88e68776167049e0fa75e72a84a6735ff1e97926dfd0d5c290351ac0eb3123018afc1f478d8c0506b4c8ddfa39cc22474985
+EBUILD enemy-territory-truecombat-0.49b.ebuild 844 BLAKE2B 56747341ab576baab8c60e8edc89c6b021f5f29c78bc8bea3579ed7877a20ea60166c2e0278e9febc1defcc0478b3d972b53d16308a89278ee0b24979261bc8d SHA512 b8311768259dd3f2eda7096947ec3cc4443ceb78b85e03cd2474e7fdad0864be63348c24737be27e07306b1556e92a187139cf1c4dadc13d85426639031cc14a
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..ec5f4920f712
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/enemy-territory-truecombat-0.49b.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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://www.truecombatelite.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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/enemy-territory-truecombat/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/enemy-territory/Manifest b/games-fps/enemy-territory/Manifest
new file mode 100644
index 000000000000..397706a0f6be
--- /dev/null
+++ b/games-fps/enemy-territory/Manifest
@@ -0,0 +1,5 @@
+DIST ET-2.60b.zip 4143401 BLAKE2B d7af97b7d5c30feeef46ec47e159120be50d276013b0627152ad503e62f17513350d7920cab42fa6082dada262b2a460ff1510de20f178626eebfd046cbb9daa SHA512 f86d0d172a170cd894f1c60a817d2159768bf7d03cb0146f3470edd54828096a62e890c24bac80a5851adc9356cb2716d5f0c756fab063a9c0eb561b72825b84
+DIST enemy-territory-all-0.1.tar.bz2 876 BLAKE2B fa144dee1768266841a77b6dab9bc27db3846f6697bb923c1e9d688a33422afdbdaa0c3c9a699e54bd8513f20aec9b2173e583c66604b3b2e783fc86769866cf SHA512 7e00ac4a30ebbbc5db646e0edf6683d8e4d99756c1010922ccfd16a3dc27c0a5b23a91c9f3adb3e120bfcd5f9a3302a466a86888ff1496dda29a3b09e87eacb2
+DIST et-linux-2.60.x86.run 270965248 BLAKE2B c774c8ccd4dc72e0b6afcd779dfc0dfad0c7f4fb208b549b04aa2fa1f9b2fd6c884a928a70b23adcd4789b7c446051a7b1fa88f4d87278b04f5461fbc3dd2869 SHA512 7321a3d831dd375c49aff81f30098c5201880e9fc783a25dd7dee3bd2211372e0e07a482e6c78982bc1f27d62bceb769dffc30f820c3144b4a64268fd9ef5cfe
+EBUILD enemy-territory-2.60b-r1.ebuild 3270 BLAKE2B 2005efddb1f293f38fb8d048b1284780a90e13991ec19444348e77eea44b7317f930afbc81ff94b3b60703a2b5eff70a709bb00cf4aeff17b99d43ea6069d777 SHA512 1916e4eac3058a7df30bf99255cfced33a1f57a25d9978e4d53d15417b98fd3aeb53ca21ce5a5eaa69e2b602d2b58ebe70471f63ab66cecf6c00cb242cc7f981
+MISC metadata.xml 1044 BLAKE2B 728088321b9eed48827feffbeaa22496d43e0ecc336c7bd271b8365c4d401c02ca5deffb8e999d5305bc9bd977d754ccd29384c7b0de4e53af44de6f8106ee61 SHA512 8ec59ef948ae9471580cb39a80bb99fc1b524c45ad60f031560fde9f2358998335e414ba09fa49c9909a005da424db84543a0b39a8b68479c097d392c2ce9bb9
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 000000000000..0f2d212e0452
--- /dev/null
+++ b/games-fps/enemy-territory/enemy-territory-2.60b-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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? (
+ https://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}/etded.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_prepare() {
+ if use dedicated ; then
+ sed 's@/sbin/runscript@/sbin/openrc-run@' \
+ -i et-ded.rc || die
+ fi
+}
+
+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 000000000000..8ab2e0c01fff
--- /dev/null
+++ b/games-fps/enemy-territory/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-1.5-r1 b/games-fps/etqw-bin-1.5-r1
deleted file mode 100644
index da3dfb4a100d..000000000000
--- a/games-fps/etqw-bin-1.5-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Enemy Territory: Quake Wars
-EAPI=5
-HOMEPAGE=http://zerowing.idsoftware.com/linux/etqw/
-IUSE=cdinstall
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=ETQW
-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 ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=ftp://ftp.i3d.net/Games/Enemy%20Territory%20Quake%20Wars/Patches/ETQW-client-1.5-full.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0d7fabdb983e5008e0c80b5b9718356f
diff --git a/games-fps/etqw-bin/Manifest b/games-fps/etqw-bin/Manifest
new file mode 100644
index 000000000000..0dacdbad9fb4
--- /dev/null
+++ b/games-fps/etqw-bin/Manifest
@@ -0,0 +1,3 @@
+DIST ETQW-client-1.5-full.x86.run 556383725 BLAKE2B 8fcaa8518c7c452a4fe593a00beea0f5a6d5849c72b03d4a443fffde8540ea53b7bf0376d90b2f2ed4e3a736628f8871e009a49b938344516b2db0495cf1e826 SHA512 32bb3d7ef47790ac6b790a5a5d61592c3504d034372254102985e58dee25b5d200e507330226bf8458c628154c246b2abcb08bf550fa044189c4c8de813af0c2
+EBUILD etqw-bin-1.5-r1.ebuild 2012 BLAKE2B 688f996448189c1525475aea0534e09b69d09f7da0b3626c38fbf251afe61ceefb16e925abc81eba5fab7d4e498484d83f81a0314a6267ab0757b1343f9630ed SHA512 6314fd268f98d28fce833aa8c3cba5be60ad8d50372a810cfbf3f29bf04903569ca82016b2ff8e7bd063a123c90b09442287afce1fac20c036f94f73562f54a6
+MISC metadata.xml 252 BLAKE2B 1b951d2e730631865ae5f379b19ed9de2c8adf2f2786da3f75d0871d967374198ddd9106433f388bdc7050c37063fb28cda4320ae7bdc9a03854838693d9f952 SHA512 90798aff93ec7e3881b882e7b10bb1680e8cb7d82b0ef4280e562ab0c9e8a2daba8afe57333dc64697322267a4b651c00ee9b4fdeb56278ff70c073da7b91638
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 000000000000..8270e50c21ee
--- /dev/null
+++ b/games-fps/etqw-bin/etqw-bin-1.5-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..3c186688e265
--- /dev/null
+++ b/games-fps/etqw-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/etqw-data-1.0 b/games-fps/etqw-data-1.0
deleted file mode 100644
index c7ede5c48f24..000000000000
--- a/games-fps/etqw-data-1.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install postinst preinst setup unpack
-DESCRIPTION=Enemy Territory: Quake Wars data files
-EAPI=0
-HOMEPAGE=http://zerowing.idsoftware.com/linux/etqw/
-IUSE=videos
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=ETQW
-PROPERTIES=interactive
-RDEPEND=games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=df962036de84be4a124baff7bf2e4e86
diff --git a/games-fps/etqw-data/Manifest b/games-fps/etqw-data/Manifest
new file mode 100644
index 000000000000..7c6214fe2f0c
--- /dev/null
+++ b/games-fps/etqw-data/Manifest
@@ -0,0 +1,2 @@
+EBUILD etqw-data-1.0.ebuild 1301 BLAKE2B d8d4e6fb5ccb3df9e3f336c16a87cceba197236e8bc91b3fdfffc4c184a553cb2b95be9801af42b6d0248816279efaf3aba51f2efce0d1d392c9ba6a690848ff SHA512 f17c60fc3705f86d052082d1806e7a3f1e9450469bbbe4c4b4d72e7f4fb357361cfa46cd596be6cca54bcc4e618b4aa09e35c9509f981b65d11362ca00687147
+MISC metadata.xml 252 BLAKE2B 1b951d2e730631865ae5f379b19ed9de2c8adf2f2786da3f75d0871d967374198ddd9106433f388bdc7050c37063fb28cda4320ae7bdc9a03854838693d9f952 SHA512 90798aff93ec7e3881b882e7b10bb1680e8cb7d82b0ef4280e562ab0c9e8a2daba8afe57333dc64697322267a4b651c00ee9b4fdeb56278ff70c073da7b91638
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 000000000000..048efa9cd245
--- /dev/null
+++ b/games-fps/etqw-data/etqw-data-1.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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 000000000000..3c186688e265
--- /dev/null
+++ b/games-fps/etqw-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/etqw-demo-2.0_p1-r1 b/games-fps/etqw-demo-2.0_p1-r1
deleted file mode 100644
index abbddc888d18..000000000000
--- a/games-fps/etqw-demo-2.0_p1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Enemy Territory: Quake Wars demo
-EAPI=5
-HOMEPAGE=http://zerowing.idsoftware.com/linux/etqw/
-KEYWORDS=~amd64 ~x86
-LICENSE=ETQW
-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(-)] games-misc/games-envd
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://idsoftware/etqw/ETQW-demo2-client-full.r1.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=32b3bfa88d8d86bf8bed408168861f9b
diff --git a/games-fps/etqw-demo/Manifest b/games-fps/etqw-demo/Manifest
new file mode 100644
index 000000000000..27fa7eec7fdc
--- /dev/null
+++ b/games-fps/etqw-demo/Manifest
@@ -0,0 +1,3 @@
+DIST ETQW-demo2-client-full.r1.x86.run 691248874 BLAKE2B 42692da7b2f7f35730dea9557c26bb189ac555eccdaf2873d3b5e91bff640b1cd121022aa671c990f92164a97874e9f46f47c76ad01f2ff2973ad3edea6898db SHA512 41332208626449da74bea71a9926258f50986f0af85045d470d4405d27e497085ba318337181802be58eb50c724ab91df6b9c810e5fcc5f8dc131486d6529f38
+EBUILD etqw-demo-2.0_p1-r1.ebuild 1571 BLAKE2B 543abe8bd0d12d46745eb178d4741788e45f759cf736b31e5bab290bcbfe6028a71a4e2414c9b24d30517bcbb1e7529f58d90f9d8a2742fe40c95e820a632ac3 SHA512 5491d3b22dcbc7c3d623863e61f5db062a8998f888a4554a02ebae745cd7cbb19c9edd3967c9387459825dd12e1eacf752ab43554d4affe39412b54837ac2824
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..8915a443830f
--- /dev/null
+++ b/games-fps/etqw-demo/etqw-demo-2.0_p1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/etqw-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ezquake-bin-2.2 b/games-fps/ezquake-bin-2.2
deleted file mode 100644
index 1c9b1ad08138..000000000000
--- a/games-fps/ezquake-bin-2.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=cdinstall? ( games-fps/quake1-data )
-DESCRIPTION=Quakeworld client with mqwcl functionality and many more features
-EAPI=5
-HOMEPAGE=http://ezquake.sf.net/
-IUSE=cdinstall
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=cdinstall? ( games-fps/quake1-data ) virtual/opengl x11-libs/libXxf86dga x11-libs/libXxf86vm games-misc/games-envd
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=amd64? ( mirror://sourceforge/ezquake/ezquake_linux-x86_64.1.9.3.tar.gz mirror://sourceforge/ezquake/ezquake_linux64_2.2.tar.gz ) x86? ( mirror://sourceforge/ezquake/ezquake_linux-x86_1.9.3.tar.gz mirror://sourceforge/ezquake/ezquake_linux32_2.2.tar.gz )
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d80fd4804e5779995cc4eb782e61adda
diff --git a/games-fps/ezquake-bin/Manifest b/games-fps/ezquake-bin/Manifest
new file mode 100644
index 000000000000..87e86e0d944c
--- /dev/null
+++ b/games-fps/ezquake-bin/Manifest
@@ -0,0 +1,6 @@
+DIST ezquake_linux-x86_1.9.3.tar.gz 19230315 BLAKE2B df2128f8aa05a1e4d970b52d193539a93ac2d849720859d97a223a5dc313ff7142bfbc0dd2ac405eede96e247d032483c392c9d1fe0d20e107fbd4be79210fd7 SHA512 c362b0103fa4beb578fec5653b4b9196d0202a00c662e3e001615c07041968daa7bd8edf194e310ac8501d01768b2bda79e250830733fb4dd56cb1517844d79f
+DIST ezquake_linux-x86_64.1.9.3.tar.gz 18624824 BLAKE2B 619d2ef3c03a9d105000c75c0c2d21398d4080810b7cab6d6a143ac0a4513420f0756c01d932f7332cbd87dfba335d6b82b1ee122fb94c2fcf4331e7beab7689 SHA512 4c2f5060bbf08ca3b9583d4c3502e69bf6d503efd0e14df9d5fe54e1e8ac1c5ca0b920c3748e4a8e1f86c60d6e5809977352636d4758fd9cb3934cea03b1138f
+DIST ezquake_linux32_2.2.tar.gz 1685934 BLAKE2B f4e1374992ac548c45ca59161c0e86214f50db17502f6bc89d56ec4e9c596478399ff02c86a539e3590f0ad82d90dd7b2f02df25089573068b4e24e1085d0898 SHA512 2a42b43a0b4ad75c22c58bb53f8161eec1460cac3b841ccf2593e0cb803c4ef5cee23f939f859eb6d95409a01c4ccc3eabae108eac6c1cb850f9c5c3445bf5ab
+DIST ezquake_linux64_2.2.tar.gz 1804397 BLAKE2B 9ad294fda829a9dd68201a7c5deb9e3a708f4ac81caa97745e965bcececfc0c1aa787b53ad5465238452bee4ded256214eb234658e8bc17795ef519faaa67057 SHA512 c1f1772971980a7b349da6c6eea5643591d5bc81a939b28e50651c5773d8372277fb6bc9a5681c59e8273ca6250fa712c3b76db488bf521dd3675aabd5e1af8e
+EBUILD ezquake-bin-2.2.ebuild 1947 BLAKE2B 320e929a05931406741c86197f2942edd1f5ced3e39624d3cc548cceff87213987b444d2941ff9c89e5719953a21aa0780dbe3c812b80e2f9b7d158986df95ff SHA512 00f22b5412d339d18b4d533cf976ae604649473ccf98217425977959f323980d06e2c9fa534c2e4bb0c94e0a124a8f2110316d7668bfeb5797c9edc261e9252f
+MISC metadata.xml 340 BLAKE2B 0e535869685c648fd759901404ee04e736d85783bd09f34756917ce5bfb1239048accdf32fd59ae3a11828da8dbc6ca1b337f28259013b864b9e02e687758cac SHA512 4922600550155470211bb2fe2eab50f02e120d82261d2956f7f73604ec5e76c71e37be5d9a542d9f963eaa0927da7bcb9b464428a7b778d17a383135e423063e
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 000000000000..5e6fe5800999
--- /dev/null
+++ b/games-fps/ezquake-bin/ezquake-bin-2.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..8789378885ba
--- /dev/null
+++ b/games-fps/ezquake-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ezquake</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/freedoom-0.10.1-r1 b/games-fps/freedoom-0.10.1-r1
deleted file mode 100644
index 544a1ca4e75a..000000000000
--- a/games-fps/freedoom-0.10.1-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install postinst
-DEPEND=app-arch/unzip
-DESCRIPTION=Freedoom - Open Source Doom resources
-EAPI=6
-HOMEPAGE=http://www.nongnu.org/freedoom/
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=BSD
-SLOT=0
-SRC_URI=https://github.com/freedoom/freedoom/releases/download/v0.10.1/freedoom-0.10.1.zip https://github.com/freedoom/freedoom/releases/download/v0.10.1/freedm-0.10.1.zip
-_eclasses_=readme.gentoo-r1 54aecea034d5e90bdb0684b80da5c9f3
-_md5_=8692ada031f3b3a1ef2e1c005621b824
diff --git a/games-fps/freedoom/Manifest b/games-fps/freedoom/Manifest
new file mode 100644
index 000000000000..78ede7d22c24
--- /dev/null
+++ b/games-fps/freedoom/Manifest
@@ -0,0 +1,4 @@
+DIST freedm-0.10.1.zip 7230096 BLAKE2B 2b553e6f263acbd6c63ddb123d1bf9fe80ce1d7a3a6b7e1b7ec64446acb520c147336da5431c5c93f0843ecfa039645cc21a4a62b39268b34f99306e1eae4f14 SHA512 cc3b393e20b503e83ca2bf90ac528d42c951881b58d22970b154fd262e69f7bae038f7300d74e467af6e31e626a12d4a9fb5bf5ff3e9da84506df41be18577f2
+DIST freedoom-0.10.1.zip 18496121 BLAKE2B b9fe88e086fb35b29d9562c5ac1335bd7eeb18ea7900c44d4ca7707bc52f03b73ec1190c578f57548320c70c0f73415a268d737cc545310fecb66ba47d242107 SHA512 a98d400267801dfdf67aa035def6d62fffff1c3a2d1aebd482929274e1f86e05e79c9cbe528a80d5c87df7306364ca74a3b03674273a0079bad724e7b23e38eb
+EBUILD freedoom-0.10.1-r1.ebuild 1107 BLAKE2B 20f9de2e03a87686acd9fd69bd3400332f7bcdce6dfbb31e498dbdb52503b6fc626c26c77f261338f1685cabc5b9c0bf34582c8fc212f756e139f711c1e0120a SHA512 c4d2d314dd2c298e86de7e9616fa77901d321075404269a0e1b48a44f019a0f0559661c16c3e19b53cb2783c2a3a9e240bdce5d387647784740c8324fba7dd68
+MISC metadata.xml 345 BLAKE2B 856529c69e0cede9d5ddfc4476945783de0ba760f0c1719d1f58a012da24a6739757af14561a04e9393c49cdd7e2cf69fb3a2a690140adbe3e0635953175c46b SHA512 d830ba46200839ec37d298883c566cc63eafbc45ad6683ef028d4168e0bd4aa245fb13d4c5e84eb5113ee37db85d018f8ef7222da00682524157ff5d29a6da6b
diff --git a/games-fps/freedoom/freedoom-0.10.1-r1.ebuild b/games-fps/freedoom/freedoom-0.10.1-r1.ebuild
new file mode 100644
index 000000000000..357def0066df
--- /dev/null
+++ b/games-fps/freedoom/freedoom-0.10.1-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit readme.gentoo-r1
+
+DESCRIPTION="Freedoom - Open Source Doom resources"
+HOMEPAGE="http://www.nongnu.org/freedoom/"
+SRC_URI="https://github.com/freedoom/freedoom/releases/download/v${PV}/freedoom-${PV}.zip
+ https://github.com/freedoom/freedoom/releases/download/v${PV}/freedm-${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+A Doom engine is required to play the wad
+but games-fps/doomsday doesn't count since it doesn't
+have the necessary features.
+To play freedoom with Doom engines which do not support
+subdirectories, create symlinks by running the following:
+(Be careful of overwriting existing wads.)
+
+# cd /usr/share/doom-data
+# ln -sn freedoom/*.wad .
+"
+
+src_install() {
+ insinto /usr/share/doom-data/${PN}
+ doins */*.wad
+ dodoc "${P}"/CREDITS
+ HTMLDOCS="${P}/README.html" einstalldocs
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/games-fps/freedoom/metadata.xml b/games-fps/freedoom/metadata.xml
new file mode 100644
index 000000000000..700dad658c01
--- /dev/null
+++ b/games-fps/freedoom/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">freedoom/freedoom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/glxquake-bin-0-r2 b/games-fps/glxquake-bin-0-r2
deleted file mode 100644
index b6d11ccde999..000000000000
--- a/games-fps/glxquake-bin-0-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=A binary that works with any 3D-graphics-card that supports the glx X-extension
-EAPI=5
-HOMEPAGE=http://mfcn.ilo.de/glxquake/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=GPL-2
-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(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://www.wh-hms.uni-ulm.de/~mfcn/shared/glxquake/glxquake.tar.gz
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=42875a9f9b5043a8ef7456eded0670f6
diff --git a/games-fps/glxquake-bin/Manifest b/games-fps/glxquake-bin/Manifest
new file mode 100644
index 000000000000..2bfbc4adc7e7
--- /dev/null
+++ b/games-fps/glxquake-bin/Manifest
@@ -0,0 +1,3 @@
+DIST glxquake.tar.gz 164094 BLAKE2B 4f9fa9c1e65dc8f1b3721dd068b9920c622a042875d4cb43a15b6d514bfd5e827f776b142a2087ef62e0adbd539c11a53d2b1f3769545b730531ddbbaaa348fb SHA512 0adb92dbdc8b3130bef7e46ad95a7efa6ddb3723e3e8891cacc3c2e46bccacb6235f688e12b8a1f35099615b6683b1409b2e380fd4278e0827897b2e0c8f3090
+EBUILD glxquake-bin-0-r2.ebuild 1154 BLAKE2B 42b2b9b445e61a06a6ed029876952f38bde7db67e1240e596a9e3719891ebe6a8493318de2e2a8d41159f6d684916e20f81399d10e526626ca7a6762c3869d55 SHA512 fcd428a392de67eadf279d2a2f5de1b81152d5c0a0c10e8eb8c58432a5ba97f8d7439cb44d0d15ef4752a5e7307f4690ec8fc25d34fee3bc0c2af8543102d382
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..14f81de25338
--- /dev/null
+++ b/games-fps/glxquake-bin/glxquake-bin-0-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+DESCRIPTION="A binary that works with any 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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/glxquake-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/industri-1.01 b/games-fps/industri-1.01
deleted file mode 100644
index aafab85cfb47..000000000000
--- a/games-fps/industri-1.01
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=virtual/opengl x11-libs/libXxf86dga x11-libs/libXext x11-libs/libX11 x11-libs/libXxf86vm media-libs/libpng:0 cdinstall? ( games-fps/quake1-data ) x11-base/xorg-proto app-arch/unzip
-DESCRIPTION=Quake/Tenebrae based, single player game
-EAPI=5
-HOMEPAGE=http://industri.sourceforge.net/
-IUSE=cdinstall
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=virtual/opengl x11-libs/libXxf86dga x11-libs/libXext x11-libs/libX11 x11-libs/libXxf86vm media-libs/libpng:0 cdinstall? ( games-fps/quake1-data ) games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://sourceforge/industri/industri_BIN-1.01-src.tar.gz mirror://sourceforge/industri/industri-1.00.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=80d16facd1918497fae106085eaea34b
diff --git a/games-fps/industri/Manifest b/games-fps/industri/Manifest
new file mode 100644
index 000000000000..641cc08c2f07
--- /dev/null
+++ b/games-fps/industri/Manifest
@@ -0,0 +1,8 @@
+AUX industri-1.01-exec-stack.patch 642 BLAKE2B cc7ab05c14499a2075605bb2a3b818eed7b219e92b49d90ad777d74481387ac20cae3e85611e9150644ffdb99014c25aceb2c678889332ec4d97b1801f27824e SHA512 c23b38be46b3b692f7b04415b2893c9884d76e627910f9e93579c286e2142fd36bff0c335beffd541226920ce22dfbdb6ffc51537b42afe6d660466905c7be3e
+AUX industri-1.01-glext.patch 983 BLAKE2B 370d7c55d61e38716e84d0af84772b186312a46e12d3bcabf74e2a3d43708798ad7ffda2f1881e8355246ea67b0b7a5f4caddcfa3b5f670dca181e11d95b5e51 SHA512 0d17e3c54fdce139a25b9c51892cf7d9c9b04b0fe2d4f543cabdce141cfe321892dbc630f40ba3e75ffb1612f6c1df5d4108f95d3a06bce3b7f49601cbb2282a
+AUX industri-1.01-ldflags.patch 840 BLAKE2B a4187070a6205de7187cb606baf9e7ae7ab5332d6e4c53c24cc3329fbc29fdd4e10bcf3f340dca9f2df5abfa594b10e902a7625940a411df4cbbb102479dddce SHA512 fc45f5edb2dfabf8815186c66cf071f119cb0c83cd785fa3be083bbcb1be11c1c898f73f7b1b3d3af83c95daddbc0fe226cfaa0ed9c0b9776d718a10562b496e
+AUX industri.pretty 42 BLAKE2B 2a53501c32d6b88a2d56c3560a6f55b4fe62c53a5aa659854b0c2dc2e440bc36572dee3e11bde73bcda30c03e0532d3977e7a17810bd721571a13a74ce0d63e1 SHA512 4cd0732b3a9cc3a48a759b68b03c249c854ce90234984ca770f8e3fc61e7bd01651012d64320d9114eb4567ccab254b183af15bdce51dee25a71c35613013df1
+DIST industri-1.00.zip 30339989 BLAKE2B e673bef0e5b79a9081ffe48c9e106de8f3900c3e57d8a9af3f48942a2257305e58b74a41c0338f5349c0414847415547c5bb86c8f4c42a8f41adb7b8621215e0 SHA512 e0eea9d881819fbcc039d91ed613bb4603e76302c892ed315bf1535b023173b742f4b881dc345f9eaca255a5531e3afc5584c2da948a9c6127c9a815a6bfcae9
+DIST industri_BIN-1.01-src.tar.gz 1086838 BLAKE2B 82a88fc640834c8c56deb9a30ea36cfaf7a631b4d1773a4bde588b64b56ab1471f54975fc5a250546685201829a790fd334f973826372dfb32f1abc0a2c3a761 SHA512 023dfcc72faa685a042afcf66b21e040b21c881f3d936af9e4da3e7836320a262c014296ab6fa564d93038c34a106f70f7cc8dd760c6b79e11689df92bff3625
+EBUILD industri-1.01.ebuild 1837 BLAKE2B 28e1565e2214fe15a5b1cdcd480e7950c8454ab7cc2c60312a73c6f6a09456fce8874f61a88c3367175671166d6e2f45777e5aec23b3c7a753e4971f9660d707 SHA512 092ed982e86942cb9d81aef4f26d530b4385fcb0a70b2442a918f3ffb6aa40f561c7097d4c5e193ffccb2b6bc85b132ea7de4861d94b9db226b256956e000f6d
+MISC metadata.xml 753 BLAKE2B 58d04346b2529f24ebb8558c2ae7c15b0677f2c22951a0ecfb5367e706632b92a5c2e8196a2d010409214aa0da24b655c5a9b0055ff0cc144b8210ff4c257248 SHA512 fe652528480dd111ae034805ffe48a75682fef68562e8ad55218f0b41b3ab05fd99d1b33b0959a09ed3fad97fe66d8171efd8e79f5472956aa42ac3263e6f9b0
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 000000000000..bc74e951fe6a
--- /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 000000000000..8a5042e431f2
--- /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 000000000000..987d464f6b48
--- /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 000000000000..b328c803b9df
--- /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 000000000000..70c8dba417f3
--- /dev/null
+++ b/games-fps/industri/industri-1.01.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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:0
+ cdinstall? ( games-fps/quake1-data )"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto
+ app-arch/unzip"
+
+S=${WORKDIR}/industri_BIN
+
+src_prepare() {
+ mv linux/Makefile{.i386linux,}
+ sed -i -e "s:-mpentiumpro.*:${CFLAGS} \\\\:" linux/Makefile || die
+
+ # 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
+ 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
+}
+
+src_install() {
+ newgamesbin linux/release*/bin/industri.run industri
+ dogamesbin "${FILESDIR}"/industri.pretty
+ insinto /usr/share/icons
+ doins industri.ico quake.ico
+ dodoc linux/README
+ cd "${WORKDIR}"/${PN}
+ dodoc *.txt
+ insinto "${GAMES_DATADIR}"/quake1/${PN}
+ doins *.pak *.cfg
+ 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 000000000000..4ed41644ffca
--- /dev/null
+++ b/games-fps/industri/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-0.4.1.43-r2 b/games-fps/legends-0.4.1.43-r2
deleted file mode 100644
index d834438c382a..000000000000
--- a/games-fps/legends-0.4.1.43-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=Fast-paced first-person-shooter online multiplayer game, similar to Tribes
-EAPI=6
-HOMEPAGE=http://legendsthegame.net/
-IUSE=+dedicated
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=Legends LGPL-2.1+
-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(-)]
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://legendsthegame.net/files/legends_linux-0.4.1.43.run mirror://gentoo/legends.png
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cd5481e39a51bd057b18ba8b2d615422
diff --git a/games-fps/legends/Manifest b/games-fps/legends/Manifest
new file mode 100644
index 000000000000..73c8d619d299
--- /dev/null
+++ b/games-fps/legends/Manifest
@@ -0,0 +1,4 @@
+DIST legends.png 5092 BLAKE2B 74715a28e6c25e3ce9a3357be23b07a998181e12e7a19d721b094c10b7f1312b273307ad1ac2830c0d71a710434be679149e0d758ee5a785cebc6b71d91f965f SHA512 7b9f336335dc69e2fbc24286b2076a228739ab4abf1b77d977321d9dccfb453897bdbd51388e3ed54369ba39b7faa92e458700928d8bf5ccc0f3639f8737489a
+DIST legends_linux-0.4.1.43.run 123964866 BLAKE2B d16da9613a13c4d78d207fc474b859e222d6c387a676bc2fe851f34fed7e689a5457a022674e2e96abd7cfc8e9e68977078811147ffe44388986796a2157cd69 SHA512 17b1caa3aa6124f2389e2220ced82c41c4523897bde2f8211d219dc9ef8620583c4ae68999b0761155e3d45cb1ad9679cd65ba50c8440dd1848ef3b1a7a590d2
+EBUILD legends-0.4.1.43-r2.ebuild 1856 BLAKE2B 17a7e175a6d5ec4f9914b7436c909ee1e20eadcbf711b7030385d2c45162eb7414a453aeaa18aa2269d96c1512c198dd15106a0c942fb61bc9ef5611a2f5465e SHA512 f0c2de1529d004821b6b308553b1845908ce04e6ae85c2da00f788b935e91cde46bceeb22585064f3a1bd7c7238082f2eb9bb7a14d6324694774c175c6df28e6
+MISC metadata.xml 1427 BLAKE2B c9e4086f3639e290c414a48d30a56a56c9f541f2e4ad082a19f6361c55f2f57e862ab571e27d63bdb04702c64c2bc53404d345a8f1328902d03aaac2b4f3d150 SHA512 987ace71750e486c141c1010d1699194c656fda09a4952b51b31ad8f526de8f77372e57632d1636034e6de080871a4fc3140b1e2a49e98b3758d907a0eb3bba3
diff --git a/games-fps/legends/legends-0.4.1.43-r2.ebuild b/games-fps/legends/legends-0.4.1.43-r2.ebuild
new file mode 100644
index 000000000000..0412178e3f4b
--- /dev/null
+++ b/games-fps/legends/legends-0.4.1.43-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils unpacker
+
+MY_P=${PN}_linux-${PV}
+dir=/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 || die
+}
+
+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"
+
+ make_wrapper ${PN} "./LinLegends" "${dir}" "${dir}"
+ if use dedicated ; then
+ make_wrapper ${PN}-ded "./lindedicated" "${dir}" "${dir}"
+ fi
+
+ doicon "${DISTDIR}"/${PN}.png || die "doicon failed"
+ make_desktop_entry legends "Legends"
+}
+
+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 000000000000..f1ba53514225
--- /dev/null
+++ b/games-fps/legends/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-1.5 b/games-fps/lsdldoom-1.5
deleted file mode 100644
index 0dd863be5971..000000000000
--- a/games-fps/lsdldoom-1.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=media-libs/libsdl[video] media-libs/sdl-mixer net? ( media-libs/sdl-net )
-DESCRIPTION=Port of ID's doom to SDL
-EAPI=5
-HOMEPAGE=http://jesshaas.com/lsdldoom/
-IUSE=+net +shareware freedoom
-KEYWORDS=~arm ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl[video] media-libs/sdl-mixer net? ( media-libs/sdl-net ) shareware? ( games-fps/doom-data ) freedoom? ( games-fps/freedoom ) games-misc/games-envd
-SLOT=0
-SRC_URI=http://jesshaas.com/lsdldoom/src/lsdldoom-1.5.tar.gz
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cf8c5370782b762d8283d5cc250e29fc
diff --git a/games-fps/lsdldoom/Manifest b/games-fps/lsdldoom/Manifest
new file mode 100644
index 000000000000..d3598b55d17b
--- /dev/null
+++ b/games-fps/lsdldoom/Manifest
@@ -0,0 +1,4 @@
+AUX lsdldoom-1.5-paths.patch 2315 BLAKE2B cf95f2bffe29975281125a1dcb7b1da96d5c9eb8333761cb754837e4cb188ed0cc85d110fea1d0bbf9c11474c66868b23109512fe433d2f7a33692b1cd280300 SHA512 c1222ed33816ddd4aa9101ca55a8d70f9913320736f6b50a80e95ff6ee721fd794509aeb2196e8480ea469d7ed45686402f32df6592fa75bf4c55d296592564d
+DIST lsdldoom-1.5.tar.gz 1227060 BLAKE2B cda64dc664f9fbe20264ef3a140a5f9eaad9589138df58cbe311b59208094affbdf090a0ebc8cd8f1841e46c69cccb2e5b17fb3a6ae927b00c3ae38d83f7bb77 SHA512 49d68040c312e8a27b452eb54acb1a4197dee157678de9e902cc2f17a38e621c5980eadf9c78e1945b9d5fb863dd1bdbdcd08c1c5e50971ee73857b7b3e47e33
+EBUILD lsdldoom-1.5.ebuild 814 BLAKE2B 408320357c2439374f179591ed81512aaa3e1a6275157fa0366577030a5cda71491cabd76377e597b565e87da2b85b8fc5d4cee9931c73f94975f3a39b5c7167 SHA512 82a3ee2ad9258b70c96479930109242560fac734b1a10706c503ea155d31bc87020b81d260dc2db07914e0b840c68493671b8c78f8d6587ad1065649c54ed1fd
+MISC metadata.xml 486 BLAKE2B 8ab7197444deb3b435ad00d20a452414e0b371c5e26864ebf1f2694a2c18ab39b391bbfe087e7e675a9da2ad12484eb3962d19f5408b2d540e4d9a9a0d08073d SHA512 7f58f30b49baa935063333338a91229452f799321774779ac67d965b5ccbeb40825fa97cffe2932d625219142767184e516159343b84f598559673f30ed2c1a1
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 000000000000..686e3450a620
--- /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.5.ebuild b/games-fps/lsdldoom/lsdldoom-1.5.ebuild
new file mode 100644
index 000000000000..805a8dfc2d87
--- /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
+
+EAPI=5
+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 ~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 )"
+
+src_prepare() {
+ epatch "${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() {
+ DOCS="ChangeLog" \
+ default
+ prepgamesdirs
+}
diff --git a/games-fps/lsdldoom/metadata.xml b/games-fps/lsdldoom/metadata.xml
new file mode 100644
index 000000000000..fdebef0b5c68
--- /dev/null
+++ b/games-fps/lsdldoom/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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 000000000000..9df41d653f06
--- /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-2.5.2-r1 b/games-fps/nexuiz-2.5.2-r1
deleted file mode 100644
index 81e608bff88c..000000000000
--- a/games-fps/nexuiz-2.5.2-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=virtual/jpeg:0 net-misc/curl opengl? ( media-libs/libmodplug media-libs/libogg >=media-libs/libpng-1.4:0 media-libs/libtheora media-libs/libvorbis x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext x11-libs/libXpm x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl alsa? ( media-libs/alsa-lib ) sdl? ( media-libs/libsdl[joystick,opengl,video] ) ) !dedicated? ( !opengl? ( media-libs/libmodplug media-libs/libogg >=media-libs/libpng-1.4:0 media-libs/libtheora media-libs/libvorbis x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext x11-libs/libXpm x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl alsa? ( media-libs/alsa-lib ) sdl? ( media-libs/libsdl[joystick,opengl,video] ) ) ) app-arch/unzip opengl? ( x11-base/xorg-proto ) !dedicated? ( !opengl? ( x11-base/xorg-proto ) )
-DESCRIPTION=Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine
-EAPI=6
-HOMEPAGE=http://www.nexuiz.com/
-IUSE=alsa dedicated maps opengl sdl
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=virtual/jpeg:0 net-misc/curl opengl? ( media-libs/libmodplug media-libs/libogg >=media-libs/libpng-1.4:0 media-libs/libtheora media-libs/libvorbis x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext x11-libs/libXpm x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl alsa? ( media-libs/alsa-lib ) sdl? ( media-libs/libsdl[joystick,opengl,video] ) ) !dedicated? ( !opengl? ( media-libs/libmodplug media-libs/libogg >=media-libs/libpng-1.4:0 media-libs/libtheora media-libs/libvorbis x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext x11-libs/libXpm x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl alsa? ( media-libs/alsa-lib ) sdl? ( media-libs/libsdl[joystick,opengl,video] ) ) )
-SLOT=0
-SRC_URI=mirror://sourceforge/nexuiz/nexuiz-252.zip maps? ( mirror://sourceforge/nexuiz/nexmappack_r2.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7766a1615db509d71a0f9af81cadaa45
diff --git a/games-fps/nexuiz/Manifest b/games-fps/nexuiz/Manifest
new file mode 100644
index 000000000000..b8da8286d5bf
--- /dev/null
+++ b/games-fps/nexuiz/Manifest
@@ -0,0 +1,5 @@
+AUX nexuiz-2.5.2-libpng-1.4.patch 1607 BLAKE2B dbe06a42ecfc2fda130d2eb29a1cbefcf59631b7b5662e73ae8557cf90b7f3083369dc1d277529f09504e1cd74e17a7eee0d6176713b561ad608f9a2e03d9868 SHA512 38aa8fbd0765283c03c0bf6cc13362ed692f4776a12ad23ef582eb9c238fda6eea475284a662ba84d70eab7a7df71a0cb28b5b90f19c12d2594c3ba67f0851aa
+DIST nexmappack_r2.zip 113533483 BLAKE2B 32da18020e80835c0fea24280c4793fc33d017774311fb154ec438de97c46f58608cb83cdc8b27fd033c4086384b5bb3d5ffc9a8841618d7cc54401073cc7d8b SHA512 f7e2dd60530b58f3fc505cdf0d605208b6905136586107210031233cb870b1892bae59efc4fb38403a4f0fc5301321297d03107b38daa501cb90e5669455eac0
+DIST nexuiz-252.zip 931253731 BLAKE2B 620d46cf90ef73cd0039721597d11b7a5924a6614f065d413339f6e01fff8396b49a576bd293f3f64882e51c05fd0dea190eb8c9fbef5ab57cdd26736ccffd4c SHA512 da661eb2ff1764fed1d5f5547b89e4f9aa47613d41a3999c0202d8858ec2b882e4ef0ec182a81d1bdb25dff2ef65aad6af132009884e3557206941a736c2a68c
+EBUILD nexuiz-2.5.2-r1.ebuild 2532 BLAKE2B 2f7f9955e6970fa0b402421246edf312aa0984e5f91aa64618b482f24c8057f8125a50e78e65021fd4e8f79a09f38d3c02987e7a1882d6e9a95a1cfc43638fd7 SHA512 f4dc28ac428b31c352794d2a361cbb41d633cf82fbc1c00eccd520dbe77a7ca1ce84479f6a82d9b596f73ff3a48652ad6f26fade745b30b18faf051478bbd545
+MISC metadata.xml 416 BLAKE2B 5401c62409ae99347c0ed229edeb5af36b4200b1ba5e9cf35bf70674ac1119fe93bb22bb99f24a4b38b0dfced7d89a724f1985b119b237be1f49c566d27d797a SHA512 f07e139d436fba2f1ef78c41788f8e860258755de93cb8bb1b7f4315b6f9efa140013584f627cbb4cd1d46bb3071021f8d3cef2084e46a81fdd52d9d277ede34
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 000000000000..0e064f8b6c3f
--- /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 000000000000..8655ab7fd6f6
--- /dev/null
+++ b/games-fps/nexuiz/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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-r1.ebuild b/games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild
new file mode 100644
index 000000000000..2778fcff0c04
--- /dev/null
+++ b/games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+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 ~x86"
+IUSE="alsa dedicated maps opengl sdl"
+
+# no headers for libpng needed
+UIRDEPEND="
+ media-libs/libmodplug
+ media-libs/libogg
+ >=media-libs/libpng-1.4:0
+ media-libs/libtheora
+ media-libs/libvorbis
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXpm
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ sdl? ( media-libs/libsdl[joystick,opengl,video] )"
+UIDEPEND="x11-base/xorg-proto"
+RDEPEND="virtual/jpeg:0
+ net-misc/curl
+ opengl? ( ${UIRDEPEND} )
+ !dedicated? ( !opengl? ( ${UIRDEPEND} ) )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ opengl? ( ${UIDEPEND} )
+ !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
+
+S=${WORKDIR}/darkplaces
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libpng-1.4.patch
+)
+
+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() {
+ default
+
+ # 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=/usr/share/${PN}\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
+ dobin ${PN}-glx
+ doicon ${PN}.xpm
+ make_desktop_entry ${PN}-glx "Nexuiz (GLX)"
+ if use sdl ; then
+ dobin ${PN}-sdl
+ make_desktop_entry ${PN}-sdl "Nexuiz (SDL)"
+ dosym ${PN}-sdl /usr/bin/${PN}
+ else
+ dosym ${PN}-glx /usr/bin/${PN}
+ fi
+ fi
+
+ if use dedicated ; then
+ dobin ${PN}-dedicated
+ fi
+
+ cd "${WORKDIR}"/${MY_PN} || die
+
+ dodoc Docs/*.txt
+ dodoc -r readme.html Docs
+
+ insinto /usr/share/${PN}
+
+ if use dedicated ; then
+ doins -r server
+ fi
+
+ doins -r data havoc
+}
diff --git a/games-fps/openarena-0.8.8-r1 b/games-fps/openarena-0.8.8-r1
deleted file mode 100644
index eda6002b7d05..000000000000
--- a/games-fps/openarena-0.8.8-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=media-libs/libsdl[joystick,opengl,video] media-libs/speex media-libs/speexdsp virtual/jpeg:0 virtual/opengl x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp curl? ( net-misc/curl ) openal? ( media-libs/openal ) vorbis? ( media-libs/libvorbis ) app-arch/unzip
-DESCRIPTION=Open-source replacement for Quake 3 Arena
-EAPI=6
-HOMEPAGE=http://openarena.ws/
-IUSE=+curl +openal +vorbis
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl[joystick,opengl,video] media-libs/speex media-libs/speexdsp virtual/jpeg:0 virtual/opengl x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp curl? ( net-misc/curl ) openal? ( media-libs/openal ) vorbis? ( media-libs/libvorbis )
-SLOT=0
-SRC_URI=mirror://sourceforge/oarena/openarena-0.8.8.zip mirror://sourceforge/oarena/src/openarena-engine-source-0.8.8.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b3eee15f66296c23c8f48436d959c634
diff --git a/games-fps/openarena/Manifest b/games-fps/openarena/Manifest
new file mode 100644
index 000000000000..523e9d5cc047
--- /dev/null
+++ b/games-fps/openarena/Manifest
@@ -0,0 +1,6 @@
+AUX openarena-0.8.8-makefile.patch 763 BLAKE2B 0e671cf5be41b48670954fa133d11806b1ad4becb98379e34bd7ea7127af467c15db9421f8590c3a73fbe0890e5e3f2a348437bef4cea7910400f488bedc3168 SHA512 2cc60cfd43536f55690dd90346f11d383f39d20be4509167604d0506bddd6375a73e933eeed2c7fbbd0e2c2c9c7ce126943549a9e0194d0f831d0a9b9e59c376
+AUX openarena-0.8.8-unbundling.patch 3054 BLAKE2B f1f90e3d61d77ec2d36fcc9ce55a53d456084b9862687b49037fceefca7758784e886bf66a689fba7a202a3ead60823311c9f31da804509dc3b60e4b12869964 SHA512 85a7300e78f741d0bcb4c949e17ffac13790bbdf0942fc739fa357ac5cec7a27c67393bb42342981a78fbb12141e3a9e1ffead352db6073bdf63b4135f4dbb43
+DIST openarena-0.8.8.zip 425189255 BLAKE2B f8a8d20cee344a615907e85b8487b8211246888b63d001b5f0fe1b676a699d9268cdf15d7c749837e5789ef254e959f289d9026a1ea3924f50b291a4c7224f28 SHA512 9fa4dabe8a3428dc3cbec97f3b4d20c04569c14cdd00b60e6391c6dd61e310f246ff5ec97e7549821b3d6f5f94b140eb5411a2ddd83dafcad66937b7f78ea8dd
+DIST openarena-engine-source-0.8.8.tar.bz2 3777830 BLAKE2B c20e2ad37aeb3467e2ebd90eab599c4e25a2dc834df81286b01bde9c7081b1b954e3524e5c4110bddcbda5593a40e595aa0a1eae8f20b98a06b4410fcb93f4c8 SHA512 d4ba3655fae500cf5b7475c83d39c81b6abc759da15cfb4ea9e1dc0f47ffb11c1bbbc2b6f85d613ab1d729978eda93d4d7677c9a45a33853e363c820d8b81c43
+EBUILD openarena-0.8.8-r1.ebuild 1790 BLAKE2B 84b530c8efd5617b062b4194e885ad41dcb23cace4a48d5d5c6460e32839ccc99ccd1695c1322916418be6cfad4956c74d1c2eac86a9a93eb4b77b737622260c SHA512 fa0c3302527b579bde188c1c44d928026181d5ccf1e88a871583d1ad0394a56e5d6dc2cdd907e603e52b155e1ee76bc9a99cd43397fa6ed8081487890975d987
+MISC metadata.xml 329 BLAKE2B e35a14a26bbcd2aa34d851acbc510d5e4ba3fa9ee9dc9ecc1c75995c6b8d3f0aea569f55c402295f1835e71d2d8609c226ccd20f9c4f5819c071c54e7d19e08b SHA512 40e88c8cec824e6c3d815516c018292ec64e5b968ede35a4c3c235331cfb32370ceffa954f01ceedffbf64e182f4e6c753a5fe45ce2ed627b6383dfc6b0d39f7
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 000000000000..d72bbe79b29d
--- /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 000000000000..b2c872f34cbd
--- /dev/null
+++ b/games-fps/openarena/files/openarena-0.8.8-unbundling.patch
@@ -0,0 +1,104 @@
+--- openarena-engine-source-0.8.8/Makefile
++++ openarena-engine-source-0.8.8/Makefile
+@@ -1406,41 +1406,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 \
+--- 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 000000000000..fb6c4d02068e
--- /dev/null
+++ b/games-fps/openarena/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">oarena</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/openarena/openarena-0.8.8-r1.ebuild b/games-fps/openarena/openarena-0.8.8-r1.ebuild
new file mode 100644
index 000000000000..7440f19e8ec0
--- /dev/null
+++ b/games-fps/openarena/openarena-0.8.8-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop epatch flag-o-matic versionator
+
+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="
+ media-libs/libsdl[joystick,opengl,video]
+ media-libs/speex
+ media-libs/speexdsp
+ virtual/jpeg:0
+ virtual/opengl
+ 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="/usr/share/${PN}"
+
+src_prepare() {
+ default
+ 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}"
+ newbin openarena-smp.* "${PN}"
+ newbin 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"
+}
diff --git a/games-fps/postal2-1409.2-r2 b/games-fps/postal2-1409.2-r2
deleted file mode 100644
index 20fb1f0a5750..000000000000
--- a/games-fps/postal2-1409.2-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-util/loki_patch
-DESCRIPTION=Postal 2: Share the Pain
-EAPI=5
-HOMEPAGE=http://www.linuxgamepublishing.com/info.php?id=postal2
-KEYWORDS=~amd64 ~x86
-LICENSE=postal2
-PROPERTIES=interactive
-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(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://updatefiles.linuxgamepublishing.com/postal2/postal2-1409.1.run http://updatefiles.linuxgamepublishing.com/postal2/postal2-1409.2.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ec8ab791af686173d8d0ce9e04a25e0e
diff --git a/games-fps/postal2/Manifest b/games-fps/postal2/Manifest
new file mode 100644
index 000000000000..d73f9c22f532
--- /dev/null
+++ b/games-fps/postal2/Manifest
@@ -0,0 +1,4 @@
+DIST postal2-1409.1.run 4816304 BLAKE2B a93e7af6f5332572c8344f3431ae540dd8e1b5e820244d710e578d69577dfcc533cdade56fc021d5254db30998a3b734bb527ca4e4d2f238c6ee33540b212f22 SHA512 5ff4880435394c552e7c1f33baf8dfdb71eb56fe5e3067eeb746826a25e585d3901292618668de50dc8bf641b2628a26a82cdf5b642e33f4113b55d72df9c4fe
+DIST postal2-1409.2.run 5645624 BLAKE2B 3aa4b466995344e767223d7c3296b498ca74f6b960fc32b4da7632b939df81e9d7a58836d3b9d26f5f85e51f3ba6e4a27e5b447c8318d90deede21498177ff95 SHA512 9fafcfec30d99e30b879318a96f484d3723853a213606f58b02a37631b4393ab4925022fcef3f84c95907269c6675090100358c16cec8b779140bf83fe7cb660
+EBUILD postal2-1409.2-r2.ebuild 1666 BLAKE2B ae877d64f61a0051dd375c3a235d39d2341b22459265c2c39a2c084725ffcae4a601eac3a87967b0b36d9aa891c5b4176cb1c6fb7190dcba08631eab348ab4e4 SHA512 b73dbcc452265a2143fa42b768229e88e2e23ea36b2071241d64ec56362571d0c78cb95ec7e8e00f230305a3448c87a4ea4aee718e9a24d8b8c4ddff61a3d03d
+MISC metadata.xml 252 BLAKE2B 1b951d2e730631865ae5f379b19ed9de2c8adf2f2786da3f75d0871d967374198ddd9106433f388bdc7050c37063fb28cda4320ae7bdc9a03854838693d9f952 SHA512 90798aff93ec7e3881b882e7b10bb1680e8cb7d82b0ef4280e562ab0c9e8a2daba8afe57333dc64697322267a4b651c00ee9b4fdeb56278ff70c073da7b91638
diff --git a/games-fps/postal2/metadata.xml b/games-fps/postal2/metadata.xml
new file mode 100644
index 000000000000..3c186688e265
--- /dev/null
+++ b/games-fps/postal2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</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 000000000000..f0ee7ff50e1c
--- /dev/null
+++ b/games-fps/postal2/postal2-1409.2-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-1409 b/games-fps/postal2mp-demo-1409
deleted file mode 100644
index bce69dfc116f..000000000000
--- a/games-fps/postal2mp-demo-1409
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=You play the Postal Dude: Postal 2 is only as violent as you are
-EAPI=5
-HOMEPAGE=http://icculus.org/news/news.php?id=4419
-KEYWORDS=~amd64 ~x86
-LICENSE=postal2
-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(-)] games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=0
-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
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2c029ea81e227b2e2d458c9b60911a4b
diff --git a/games-fps/postal2mp-demo/Manifest b/games-fps/postal2mp-demo/Manifest
new file mode 100644
index 000000000000..373caac5ccbb
--- /dev/null
+++ b/games-fps/postal2mp-demo/Manifest
@@ -0,0 +1,3 @@
+DIST Postal2STP-FreeMP-linux.tar.bz2 591082047 BLAKE2B b633ec1d5337438af3abfee30584b6977136abd6aaa52b1ba946f30ccc7a03c3de6539fa2d3519a5e106af4113d0ee9171fbe92fdeb3057db052f870e4ae3bec SHA512 92580c2ce0593f37890013a5b2e5c1d420b57ae4e90569725446dbb2c939d1dd29b6df566783f020419dd8c4b1301213d1e8d9d581c95efd3f5950e8e54b46d1
+EBUILD postal2mp-demo-1409.ebuild 1462 BLAKE2B 8327290b7e045c9a3b03afc97a322150aff40cad7a4f787d53587ee5f9ef5dcfe5e37bf2893b1ad7aceae2a7998fb30a94c4590ec16d3443649c730bb2d5dde1 SHA512 652979dbb2d4b43a807b18cb1321f20285d390c02f99ed7e7690b3586200a61690d817ce4bf4da961f4880df05c635bb67d5b497b2fd5c12d328290706c542d4
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/postal2mp-demo/metadata.xml b/games-fps/postal2mp-demo/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/postal2mp-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..d01d21b14e0b
--- /dev/null
+++ b/games-fps/postal2mp-demo/postal2mp-demo-1409.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-2.5.0-r1 b/games-fps/prboom-2.5.0-r1
deleted file mode 100644
index de1530ee84b0..000000000000
--- a/games-fps/prboom-2.5.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare
-DEPEND=media-libs/libsdl[joystick,video] media-libs/sdl-mixer media-libs/sdl-net !<games-fps/lsdldoom-1.5 virtual/opengl virtual/glu
-DESCRIPTION=Port of ID's doom to SDL and OpenGL
-EAPI=6
-HOMEPAGE=http://prboom.sourceforge.net/
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl[joystick,video] media-libs/sdl-mixer media-libs/sdl-net !<games-fps/lsdldoom-1.5 virtual/opengl virtual/glu
-SLOT=0
-SRC_URI=mirror://sourceforge/prboom/prboom-2.5.0.tar.gz mirror://gentoo/prboom.png
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 multilib 97f470f374f2e94ccab04a2fb21d811e readme.gentoo-r1 54aecea034d5e90bdb0684b80da5c9f3 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=4b810e04c77b642653282950bec9291b
diff --git a/games-fps/prboom/Manifest b/games-fps/prboom/Manifest
new file mode 100644
index 000000000000..b558a0db3d4b
--- /dev/null
+++ b/games-fps/prboom/Manifest
@@ -0,0 +1,7 @@
+AUX prboom-2.5.0-libpng14.patch 547 BLAKE2B b159e7e2654aad0c9d37109c5d6919ca4cc5d29401f839c45690a73ce6b8391aa5ab4f4f1495d48635f87eca0c25b671ef60753ad636f8ee8be0bebd3db56c0b SHA512 0ecebc1f9b8db2662ba643ee36422f11152870e95305cd0e7fda351b4397df002ba8a770664be451fc86c46afd85bd7122aa3a1ed75901d48197accdf35464cf
+AUX prboom-2.5.0-nvidia-test.c 90 BLAKE2B 60afd518380bb119087a3ddde1ce1af2490a650184677e7720dd40be601c227ccf450d68bf1f8afaa54c62ff4272d4a7351b36d7eb1f000b19b48c68ef6f6a6e SHA512 2b864be0a40c213c4dfbef18b25db34ac62968f932f534dbe549019f0000ff7ce524e345740aff8c5b8aecdd2e5df9e42fef298d11f5d2366ad324c3003c4466
+AUX prboom-2.5.0-nvidia.patch 1746 BLAKE2B 94acec8ebe5a1ce554c257790ac1721c68e5adf8537acf600b0ea8b3d291f29d80bab1f689c3e1d436a86412f07479a23c231f610f313ae38d8cb101f9d9754b SHA512 f9f99aa310b82e467fda789630a156c6d96b0cf7ff65678365a4b466f5d9a98773daf529f79a35178cd127460199be589a443d9562932332a5a82f7804269592
+DIST prboom-2.5.0.tar.gz 1049505 BLAKE2B eb044c091279e04bfb65f9fea26bb706be213510b82a95ebe9d482a7c5d2c2ca5a51776afb3af6e8cebeba5df2441922f2298e52c54414b56e98e637c6feb544 SHA512 9e25b55047c66931ea010751fb64484e466395b04dfb738ed9dc515bd8b78e1124a337da33bf7be6e97280016ed1f01c852d8bc12704bdb82074488d7b5d2894
+DIST prboom.png 4254 BLAKE2B cf70f0ee9d41ad41c3f326b30a12df90f76fdb788d252b29bce1925ef253ec272feedc7040a8bf33146f313517afdc038c66324b9c671d90a7db89a5da2569db SHA512 72631d253c6754484ab1c96c953ed37a734197fa851dc88156fd3d4fb8396a77347805233481470b936a504d08e06d994de1eba613e6bf70a89db8fc7ee9b1ac
+EBUILD prboom-2.5.0-r1.ebuild 2010 BLAKE2B f1b0a15691446d91f2143ee808e1d0b285c5223607416936b50def2c304287d080427627e332482399252d6e8e1910821d947c75c40976aa9fb66ce04a717b15 SHA512 15b2d4337f9d9d9b4ad909a7096bc4b533988e7fe6f27f0852ecbb95f76f4833274d5092eaf48beb7ec24c5599bf5d95f84794f60d83d66a13bacd6961fd21df
+MISC metadata.xml 329 BLAKE2B 6c5388579683b49a47404b9f68b46ac1f1a67596bbb523a80fe247ec6fe48d3a4b59ea15aa7be0201879c5f8f050d1713cc2d8c28f128009ba92c8662f71a28f SHA512 a1c50442cb2fb1e0b536fd7b2402f74f4edf3a8edb0ff45ea6873cf24402fd5c37535006604e98b3c0073f9788763efaff2e51a91cd44b7fc37343549be87e80
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 000000000000..3dea0e7a983b
--- /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
+
+--- a/src/SDL/i_sshot.c
++++ b/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 000000000000..f9e4bd700f8a
--- /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 000000000000..c602c784c13f
--- /dev/null
+++ b/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
@@ -0,0 +1,48 @@
+--- a/src/gl_intern.h.orig 2003-09-21 16:39:30.247451624 -0400
++++ b/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
+--- a/src/gl_main.c.orig 2003-09-21 16:39:55.436622288 -0400
++++ b/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)
+--- a/src/gl_texture.c.orig 2003-09-21 16:43:18.450759448 -0400
++++ b/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 000000000000..55dd7e52946f
--- /dev/null
+++ b/games-fps/prboom/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">prboom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/prboom/prboom-2.5.0-r1.ebuild b/games-fps/prboom/prboom-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..9cb1017bc0a2
--- /dev/null
+++ b/games-fps/prboom/prboom-2.5.0-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop readme.gentoo-r1 toolchain-funcs
+
+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 ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl[joystick,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-net
+ !<games-fps/lsdldoom-1.5
+ virtual/opengl
+ virtual/glu
+"
+DEPEND="${RDEPEND}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+To play the original Doom levels, place doom.wad and/or doom2.wad
+into /usr/share/doom-data
+Then run ${PN} accordingly.
+
+doom1.wad is the shareware demo wad consisting of 1 episode,
+and doom.wad is the full Doom 1 set of 3 episodes
+(or 4 in the Ultimate Doom wad).
+
+You can even emerge doom-data and/or freedoom to play for free.
+"
+
+src_prepare() {
+ default
+
+ 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 ] || eapply "${FILESDIR}"/${P}-nvidia.patch
+
+ eapply "${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 ...
+ econf \
+ --enable-gl \
+ --disable-i386-asm \
+ --disable-cpu-opt \
+ --with-waddir="/usr/share/doom-data"
+}
+
+src_install() {
+ default
+
+ doman doc/*.{5,6}
+
+ dodoc doc/README.* doc/*.txt
+ readme.gentoo_create_doc
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} "PrBoom"
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/games-fps/quake1-data-2.40 b/games-fps/quake1-data-2.40
deleted file mode 100644
index e06ed5966c13..000000000000
--- a/games-fps/quake1-data-2.40
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/lha
-DESCRIPTION=iD Software's Quake 1 ... the data files
-EAPI=5
-HOMEPAGE=http://www.idsoftware.com/games/quake/quake/
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-PROPERTIES=interactive
-RDEPEND=!games-fps/quake1-demodata[symlink] games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c9b9674c382b70b781aaf3ce7a8978d4
diff --git a/games-fps/quake1-data/Manifest b/games-fps/quake1-data/Manifest
new file mode 100644
index 000000000000..23df2121b2c5
--- /dev/null
+++ b/games-fps/quake1-data/Manifest
@@ -0,0 +1,2 @@
+EBUILD quake1-data-2.40.ebuild 1560 BLAKE2B b1b5ec112c089c9bccf674b87717b41e2ee3a25d0f8864564ed88a1755245cf7fc35559fb9e44e31971a2ff37d14a1304b329493067f00588dec0dd75ae0edbe SHA512 2c707806c09b87ce4211fc88b270688256fe5fdc697d3ea11b4d77b9b0ac636124f987c5fa9def893559b979eb6b9609cb1dc85a12424d22a88ffd1cdc4a3f3d
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-data/metadata.xml b/games-fps/quake1-data/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..b5b088ccdbbb
--- /dev/null
+++ b/games-fps/quake1-data/quake1-data-2.40.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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=5
+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 ~x86"
+IUSE=""
+
+DEPEND="app-arch/lha"
+RDEPEND="!games-fps/quake1-demodata[symlink]"
+
+S=${WORKDIR}
+
+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
+ rm -f q101_int.exe
+ elif [[ ${CDROM_SET} == "3" ]] ; then
+ echo ">>> Unpacking resource.1 to ${PWD}"
+ lha xqf "${CDROM_ROOT}"/resource.1 || die
+ fi
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/quake1/id1
+ case ${CDROM_SET} in
+ 0) doins "${CDROM_ROOT}"/id1/*
+ dodoc "${CDROM_ROOT}"/*.txt
+ ;;
+ 1|3)doins id1/*
+ dodoc *.txt
+ ;;
+ 2) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak
+ newins "${CDROM_ROOT}"/Setup/ID1/PAK1.PAK pak1.pak
+ dodoc "${CDROM_ROOT}"/Docs/*
+ ;;
+ esac
+ prepgamesdirs
+}
diff --git a/games-fps/quake1-demodata-1.06 b/games-fps/quake1-demodata-1.06
deleted file mode 100644
index a49f841f5619..000000000000
--- a/games-fps/quake1-demodata-1.06
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/lha app-arch/unzip
-DESCRIPTION=Demo data for Quake 1
-EAPI=5
-HOMEPAGE=https://en.wikipedia.org/wiki/Quake_I
-IUSE=symlink
-KEYWORDS=~amd64 ~x86
-LICENSE=quake1-demodata
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/quake/quake106.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ad0828b814bf09bf39daf13960eca27f
diff --git a/games-fps/quake1-demodata/Manifest b/games-fps/quake1-demodata/Manifest
new file mode 100644
index 000000000000..42a818047274
--- /dev/null
+++ b/games-fps/quake1-demodata/Manifest
@@ -0,0 +1,3 @@
+DIST quake106.zip 9094045 BLAKE2B 39d639a7c4daf48bacfed3d8f7488131cabd61eba3d1969b23958f4f35ac7f693a165500a4a1cf2b917bb8d363d360a402c7100ba8f6b7083c7eaba1fe16756a SHA512 8960c48d9c3c8bb142fd812968d29f05304384bd559b5cdb1d2cb8b6faac84d30ebf9cdf5e5e4eb3739907d9b599ca2ba34035647c58a8ed1874bdc7f0b75e1d
+EBUILD quake1-demodata-1.06.ebuild 1649 BLAKE2B 0cb318c5343cec04bc601b03b08ce00c31f28ea67757e6ea066a1786b30399ebe0e5ad1f4df8ebb0f260b0d9fd63f204f5813676900cb93841022f73b3a787d7 SHA512 5e54e5e87fbe59ba0a08ffdeea300958ec4c7246fc984ef72e565028c328a4420ec4a51f55e181755e28a8f1572182a4a77badd225b04f45ca6b3dcafe88e98b
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-demodata/metadata.xml b/games-fps/quake1-demodata/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-demodata/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..7b8a34815e89
--- /dev/null
+++ b/games-fps/quake1-demodata/quake1-demodata-1.06.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils versionator games
+
+MY_PV=$(delete_all_version_separators)
+MY_PN="quake"
+
+DESCRIPTION="Demo data for Quake 1"
+HOMEPAGE="https://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-2.2z b/games-fps/quake1-killer-2.2z
deleted file mode 100644
index 1ddf27119850..000000000000
--- a/games-fps/quake1-killer-2.2z
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=The Killer Quake Patch
-EAPI=5
-HOMEPAGE=http://kqp.horoy.com/
-KEYWORDS=~amd64 ~x86
-LICENSE=quake1-killer
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=http://www.gamers.org/pub/idgames2/quakec/compilations/kqp220z.zip mirror://gentoo/kqp220z.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d1a9d275ca56b48f0181efb1794355d2
diff --git a/games-fps/quake1-killer/Manifest b/games-fps/quake1-killer/Manifest
new file mode 100644
index 000000000000..7018b29eb81f
--- /dev/null
+++ b/games-fps/quake1-killer/Manifest
@@ -0,0 +1,3 @@
+DIST kqp220z.zip 2952348 BLAKE2B 1e31576e137d9943bc3eb62ceac9ca3e6e66f5081252422818f24fe8710f9ba5b2212dd5dff146ced751873872aa23fdb988b96d34ef157ec922fddcf7fdc15a SHA512 8149795435cf72c4358dc35cce473482b718b67cc799ce4739d975cf5fe3e856735cbcd1f40c7b6a345aee8bf830147ecb37e312b1cb141b40c14cc95fd0f56e
+EBUILD quake1-killer-2.2z.ebuild 646 BLAKE2B 01d5b2cacb23ed8dc71966aaf8d80ff140f82604a6dd404ca9fecdf10e0fb5c0b851f0b95cd09eed6da65ffb226113f82f1abacc199443799c9096f337d0468f SHA512 56fffc89e5cc1ebbb78052f529d1c4e7c095bf79d776578d5a86fa5e9becfe668085fe743445d1935b4ad7c7c0692e696e9dbb6cbbb051a4b70d2dc8267ac2e8
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-killer/metadata.xml b/games-fps/quake1-killer/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-killer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..258296f7f514
--- /dev/null
+++ b/games-fps/quake1-killer/quake1-killer-2.2z.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-rally-1.2 b/games-fps/quake1-rally-1.2
deleted file mode 100644
index 5c8c82ab0a48..000000000000
--- a/games-fps/quake1-rally-1.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=TC which turns Quake into a Rally racing game
-EAPI=5
-HOMEPAGE=http://wiki.quakeworld.nu/Quake_Rally
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://ehall.freeshell.org/quake/qr12.zip http://ehall.freeshell.org/quake/qrlo1.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2d6dae53a2bacb17e41261ea10382a7a
diff --git a/games-fps/quake1-rally/Manifest b/games-fps/quake1-rally/Manifest
new file mode 100644
index 000000000000..a4d4981e02b7
--- /dev/null
+++ b/games-fps/quake1-rally/Manifest
@@ -0,0 +1,4 @@
+DIST qr12.zip 9885866 BLAKE2B a2fa1ad28033bd5530c53c132b44732325fcfc58585474859b6e3cc34c94751142ff69bcaf01062a8adb16e259583bae923c90d294b08ea7278862621c39a8b2 SHA512 a49b00e67b95c06b4898ad8e1f9e0a718c025736e7d68d3aa8e6ff9cf3062ea8a0cd0ea0deee5c2af8e3e30652c4420cd4b030b3bd8f1dd4ace9236bfaaf5e5a
+DIST qrlo1.zip 4086037 BLAKE2B 066945f0121efe38a222dc475d30d759ad50ab0c58f98e798955b18b3723001e2aeeac8d2627972bb3e9706786032ccf53e7fd96874815ae13f9167589435854 SHA512 94af61a0f6978c39425cbc414e094417deef99f109aac2905877b3723873657c3ef7d7ae7d3b247144d68eabbfb79750a654e627ac039d315ff0f2fd323f395d
+EBUILD quake1-rally-1.2.ebuild 929 BLAKE2B b446cebd96148077c9f0756cf711bd19c8b409e71521edc2e9ee8eb6150fb7517724077a003e3d2feca957b410d201a8739e907314bdb22b80c45b9b236ea659 SHA512 efba1aed594e9a8e759654165f7967c9e2c96409a3fbc117e07fd5800dd8b2741baf96840b3a4c5f477dc69493e7085734a1b857f5b73d5c9290c634badb913d
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-rally/metadata.xml b/games-fps/quake1-rally/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-rally/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..e7c086e83cbe
--- /dev/null
+++ b/games-fps/quake1-rally/quake1-rally-1.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-2.9 b/games-fps/quake1-teamfortress-2.9
deleted file mode 100644
index e9a4ecbb11af..000000000000
--- a/games-fps/quake1-teamfortress-2.9
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=The classic Team Fortress Quake World mod
-EAPI=5
-HOMEPAGE=http://www.planetfortress.com/teamfortress/
-KEYWORDS=~amd64 ~x86
-LICENSE=quake1-teamfortress
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://gentoo/tf28.zip mirror://gentoo/tf29qw.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4a54fc04c928eb271148fdb7318dfc79
diff --git a/games-fps/quake1-teamfortress/Manifest b/games-fps/quake1-teamfortress/Manifest
new file mode 100644
index 000000000000..7cb703baff5d
--- /dev/null
+++ b/games-fps/quake1-teamfortress/Manifest
@@ -0,0 +1,4 @@
+DIST tf28.zip 4204316 BLAKE2B 9cb90e942d58380e8b9fd8ec527232d7461860621ed2bce888fadbbae03ad7c4cfb96035b74dc10c1a3124659869c161bb716178b7d7954fac2a6c828cbbef1f SHA512 2b158982fbf501712fa31fae7b8d34ce4adf41c7ada7c32549bc94ea7370f56b7ebb03f08f70c38c4e53a4ba49a95cbd23acda39eddc4a360d236cc0129a3262
+DIST tf29qw.zip 626175 BLAKE2B b480cfc0f3ce330142fc1816632b6da8207b532fac9f5e47fd93d4b1b8bc3fc02dbfc541f1ef052782db0ae6251bec90b09f384e607b6ec9272386b6e18623e4 SHA512 77ea488e5d9fcd3ad91317f2a35bd9e19ca38712cf9bf248bcfa88d1a5a66577ccc504476ecfb5d06bb7a28cd93ce92d3728f4be825c93567c8c2b61cb80c08d
+EBUILD quake1-teamfortress-2.9.ebuild 857 BLAKE2B 25253ea854401ca24110656b077c48c56c7e05d1b743880c9dfac41b5fffe59d682be0218259d4b0f9ffa16709924cd75876c2a730da870861fc1e2e5304ab08 SHA512 1ac13963cc26e7933374a42e33223cf2a06e20b862fa78c00758fd2450b2964794fac98c1fff552420b0e1ade02bf4ec7f665d7da2ab1a8555b666310494469b
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-teamfortress/metadata.xml b/games-fps/quake1-teamfortress/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-teamfortress/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..19e52511fc51
--- /dev/null
+++ b/games-fps/quake1-teamfortress/quake1-teamfortress-2.9.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-20050820 b/games-fps/quake1-textures-20050820
deleted file mode 100644
index 48e961cf8b3f..000000000000
--- a/games-fps/quake1-textures-20050820
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip || ( app-arch/unrar app-arch/rar )
-DESCRIPTION=Collection of graphical improvements for Quake 1
-EAPI=5
-HOMEPAGE=http://facelift.quakedev.com/
-KEYWORDS=~amd64 ~x86
-LICENSE=quake1-textures
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=http://facelift.quakedev.com/download/SKINSbmodels-48files-4-23-05.zip http://facelift.quakedev.com/download/textures-486files-8-20-05.rar
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c8cb85ae0e5fc20acd93b9a5094e242d
diff --git a/games-fps/quake1-textures/Manifest b/games-fps/quake1-textures/Manifest
new file mode 100644
index 000000000000..f30678a7a3c0
--- /dev/null
+++ b/games-fps/quake1-textures/Manifest
@@ -0,0 +1,4 @@
+DIST SKINSbmodels-48files-4-23-05.zip 12627945 BLAKE2B 0197f230ef0506aa2fe6ff47e270da9ccc28c78ac3f9e3f961e1026921723999606a41082072ea8c498d9ee49ad7a7c796c21566dc3a1fbab0ccfac2535921d4 SHA512 dcd39b7d8544d4c381b2917820e1cec193f4279eca1c2d1b260cfc0d019a224bef84b4cd6a19da37331913533541d90ac72ac119592eb95cc82c9e2bac8ab37e
+DIST textures-486files-8-20-05.rar 207799283 BLAKE2B 3c59200ded0fecf986261ebe9f85e63291e3c003821f5f8e6157bbe4731ceba98133d0bf98a0dd5ca4b5a52fe2f490e0c65e98e53dcf4f994f47e550f0c4f29e SHA512 3809bea3ff1d7bc7acff51d8f19890677a563778cfb418d3f6ae940ceffa8953a1cf10dd7cc3a5d30715e6d2e79331ec88dd72f1ba22ebec0d179a01ad0eda2a
+EBUILD quake1-textures-20050820.ebuild 1014 BLAKE2B a5cb1d36d13b9dfd8daa0f76a09435ff23a4f7d95bdb93f4db3210a907635a9b12ef09798362249c178850bde54f6ab3082d5e44b8be909fd3ee42a34f7f16d6 SHA512 338fcdfc6fb881239a231e2aad25ebaa1943030009632e9a2525a7c96b0665c327b631c38c3fb6f572aa4606b49c24a44febbc1d2a2d224442844d8f45264bad
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake1-textures/metadata.xml b/games-fps/quake1-textures/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake1-textures/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..4489581ed4ad
--- /dev/null
+++ b/games-fps/quake1-textures/quake1-textures-20050820.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~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-3.20 b/games-fps/quake2-data-3.20
deleted file mode 100644
index 2967195f0614..000000000000
--- a/games-fps/quake2-data-3.20
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=iD Software's Quake 2 ... the data files
-EAPI=5
-HOMEPAGE=http://www.idsoftware.com/
-IUSE=videos
-KEYWORDS=~alpha ~amd64 ~x86 ~x86-fbsd
-LICENSE=Q2EULA
-PROPERTIES=interactive
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/quake2/q2-3.20-x86-full-ctf.exe
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fd31d09fe4b1001a0193f0bc9a902b70
diff --git a/games-fps/quake2-data/Manifest b/games-fps/quake2-data/Manifest
new file mode 100644
index 000000000000..dc41788d0bb1
--- /dev/null
+++ b/games-fps/quake2-data/Manifest
@@ -0,0 +1,3 @@
+DIST q2-3.20-x86-full-ctf.exe 19267584 BLAKE2B a388035f1694f83ecb9fbbaf48668c190179cd62fd6b013c80dee02edf2a7eb02d5b26a382cc3e4e078fd39b95f04ca82ee74407b19ca2696cc226845b62ff14 SHA512 056a56f218f3fd7a3c5270665990bb347ce3e6f4aa8afa3b65a5d291d3b0cd149e3b58ed0cd136bd3edecb3c080f790f9dac68c63d19f095818720f0537b5bad
+EBUILD quake2-data-3.20.ebuild 2461 BLAKE2B 21c854632681c34036f8e61d19fd657fc6a5231c247cee4321db474e7bb2c56ff38b14228cb288d1699015681343e0d33c8d275bc51c2fbe2c55f69b41cd6855 SHA512 1c1bb1b8b8de1e0e66c9dc8ab3c1ab64660956f0707431fa8463b4c1f42d526f481d2850dd6509d970b7ca3eb62a347ff3cbc870bab4229cc296d2785e300637
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake2-data/metadata.xml b/games-fps/quake2-data/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake2-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..0a8b671417b7
--- /dev/null
+++ b/games-fps/quake2-data/quake2-data-3.20.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~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/*
+ fi
+
+ insinto "${GAMES_DATADIR}"/quake2/baseq2
+ doins "${baseq2_cdpath}"/pak0.pak
+ doins baseq2/*.pak baseq2/maps.lst
+ dodir "${GAMES_DATADIR}"/quake2/baseq2/players
+ cp -R "${baseq2_cdpath}"/players/* baseq2/players/* \
+ "${D}/${GAMES_DATADIR}"/quake2/baseq2/players/ || die
+
+ 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
+ fi
+ fi
+ done
+
+ insinto "${GAMES_DATADIR}"/quake2/ctf
+ doins ctf/*.{cfg,ico,pak}
+
+ prepgamesdirs
+}
diff --git a/games-fps/quake2-demodata-3.14 b/games-fps/quake2-demodata-3.14
deleted file mode 100644
index de4f95e11857..000000000000
--- a/games-fps/quake2-demodata-3.14
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip !games-fps/quake2-data
-DESCRIPTION=Demo data for Quake 2
-EAPI=5
-HOMEPAGE=https://en.wikipedia.org/wiki/Quake_II
-IUSE=symlink
-KEYWORDS=~alpha ~amd64 ~x86 ~x86-fbsd
-LICENSE=quake2-demodata
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/quake2/q2-314-demo-x86.exe
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=214729a3ef4c229b66724ff28a6f54b7
diff --git a/games-fps/quake2-demodata/Manifest b/games-fps/quake2-demodata/Manifest
new file mode 100644
index 000000000000..52965c85ea5e
--- /dev/null
+++ b/games-fps/quake2-demodata/Manifest
@@ -0,0 +1,3 @@
+DIST q2-314-demo-x86.exe 39015499 BLAKE2B 1259d8e2481e5667a1a458e356593b026619a16d8dff32b664143121481f61b5e29129aac6b1aee0c0f0f12eee0f254965355f265c6c66d0ba3acab6e1b5983d SHA512 9aa5123807a64a6e3e3b113b582efd353f176f093fd0aae6bd01d9cff397374c06948a7147f59748b3aa6f4251769e409fae838157edb66429c9d41381b3df86
+EBUILD quake2-demodata-3.14.ebuild 1312 BLAKE2B fde56c8e7c52375e09293e8014aad9cff9044fb5fa5f05cc4fc5baf75e33d7862035144f1019777dd62224dd3a10c59330bf92a5b920cc9fb3a9759638641f1e SHA512 66d0d393d270e6364a58ee26ac9e7e26404431248483248915d557492230f29f8f1ed2cf9141dd4e78c49f8d63a9e091fdf7e0fa8fbb5cd1d5030c02551d700c
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake2-demodata/metadata.xml b/games-fps/quake2-demodata/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake2-demodata/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..cd68c344cd8a
--- /dev/null
+++ b/games-fps/quake2-demodata/quake2-demodata-3.14.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://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 ~x86 ~x86-fbsd"
+IUSE="symlink"
+
+RDEPEND=""
+DEPEND="app-arch/unzip
+ !games-fps/quake2-data" # games-fps/quake2-data already includes the demo data
+
+S=${WORKDIR}
+dir=${GAMES_DATADIR}/${MY_PN}
+
+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-0.16.1-r1 b/games-fps/quake2-icculus-0.16.1-r1
deleted file mode 100644
index 01450b2e5872..000000000000
--- a/games-fps/quake2-icculus-0.16.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=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 ) X? ( x11-base/xorg-proto ) rogue? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) ) xatrix? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) )
-DESCRIPTION=The icculus.org Linux port of iD's Quake 2 engine
-EAPI=5
-HOMEPAGE=http://icculus.org/quake2/
-IUSE=aalib alsa cdinstall dedicated demo ipv6 joystick opengl qmax rogue sdl X xatrix
-KEYWORDS=~amd64 ~x86 ~x86-fbsd
-LICENSE=GPL-2
-RDEPEND=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 ) cdinstall? ( games-fps/quake2-data ) demo? ( games-fps/quake2-demodata ) games-misc/games-envd
-SLOT=0
-SRC_URI=http://icculus.org/quake2/files/quake2-r0.16.1.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 )
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b62c0dd88de38ab8fc508d94030e5242
diff --git a/games-fps/quake2-icculus/Manifest b/games-fps/quake2-icculus/Manifest
new file mode 100644
index 000000000000..dda2f9248fa8
--- /dev/null
+++ b/games-fps/quake2-icculus/Manifest
@@ -0,0 +1,20 @@
+AUX 0.16-rogue-armor.patch 240 BLAKE2B 5643b1af747e3b6d34d21f8ee830d6d5bec91e356e724dfb66e6840df3a594af7ebfe9a442979801fc3096b35b6485f9cd41db3295b154cdf096526779e34fca SHA512 591fccd0cbc1225982b6d95d4818a4d0ff409717de8799b1d49f424633169d8a8187206220c24b60a341337aec2e297dfd8517dd478223e7d557ee85f6ecc453
+AUX 0.16-rogue-nan.patch 170 BLAKE2B 76beecbd38d07bad65595a049aea6802f7575d65e1640cef2a05ce5ecef8031d333af2df56995bcf2b420034e663896d89dadc362959786a92eea0078d609c3c SHA512 3d9b3a95a85a6fa39f2c6f7ad5e49b313b723bfb0fa88392f8690df27c16a7d6ad7617043b6fd66dc87cbbac9b01b941b8cbc8ecf4e045b908e844832c80d26a
+AUX README-postinstall 3083 BLAKE2B 364510b4eb37b6623e8346c74743b27156f99938fc9726929500c4488fd9d8a54b45d762586bfb43996d27f8aab09b2cd2feda08cad2aba0be534f4b8ca303e0 SHA512 cc7441ce14117ea765a7df98b3de0370b251f444289fd8aaa03c97ea5b383d626088977bc30dfc7a30124dedce4796b5d6392dad7e3d203ee2257d71a9b49bfe
+AUX quake2-icculus-0.16.1-alsa.patch 4386 BLAKE2B f85c0332ee7ff5fec98dcc5762cf63733f8442e76864cbd844dc19426f14eb22b4d3fec7fea8592fc9fe95cb55193324cefb87076fefb254cb7773cd2423f567 SHA512 8bb9e4d6f551ebe3e6715e044453affd7edd749650791fca32b5286038e75a59685c7d47efce8ac7b9dff488e6c2952dfdc68807f3365d276afb4b7387ad5dbc
+AUX quake2-icculus-0.16.1-amd64.patch 534 BLAKE2B 8f3afa80b23784a6683762a94b651b5999a7570ae954c87e5bf963ea52bf1fbdb3150c22715b4d4711b31892e3d67ef01bdfbb3285338add10bcbba0aaa335c2 SHA512 03faf4b85aa176a267847196fb56204b6d02bde0ebef858a34edb3c87cb41e57636d9b6e5b3be44163e918cb4b3ff38299b2db9de90690179108ee77146b942d
+AUX quake2-icculus-0.16.1-gcc41.patch 292 BLAKE2B 393df8fbd236fb3eb509fa640c650144e734f15baf3b1f985ca0a0d81810e227e87b4a19ceb5db95067b40370ce7dab1e641f48a9ecd00d7f0bcaa3726f9bc56 SHA512 87193f69670e7cd6573bd4ff550202fda2702a5d7dfadb3af31f673b8910958ec3718e0d7ae558666c6a6921c43d543626dc8eaa0e3822345f33aecdbdf7ee50
+AUX quake2-icculus-0.16.1-gentoo-paths.patch 6419 BLAKE2B ed3fe4cd3f812b6dda63bd017eca74a57dafe0ae56a877a30e814c486b4378a04a7c0525f71a13804f653febec5b6ff855be5cea3b8c4a4ca9bccf0e2d441e4f SHA512 91a83f82b013245256db386a212c044bfbd637e1685e532d2ca75959e6870e65f3763f6d83c85db184d46a0ed77b5d4a53c4f7421b55b82a4709bdfc70d0f307
+AUX quake2-icculus-0.16.1-gnusource.patch 316 BLAKE2B 344afcbda64c0a52e06a91cbcfd4a53f9badf8c0d25ac384525e84eff164a1f103df9289d5a691b413e5e1a1a2749872841ad18ff4e3517465fb1c1cd729edce SHA512 0e1bed0bfd7ab31ad574a17534a49e89b44ef99308b90d9a30726f7d39ec4606514643e064968a5d9e53dd7a20394d5a27162fba06f37713ee3bc1e65f31b76b
+AUX quake2-icculus-0.16.1-ia64.patch 2399 BLAKE2B e4dcbc6528f0859ac791627f4a043c479e8a6024c1947196d540e11e53f9909f1151f26b8eaa272e371190f7287f323304ab7f5518704702aad64569278d4ee3 SHA512 fce5f699ecabe8ca9f215507172be537c8850fc91ed44224a588780bf76901d60486c220d5bf821b70fe9d2687f6ec9d966b78008de1f6cf4f1ac3644bb66844
+AUX quake2-icculus-0.16.1-ldflags.patch 1537 BLAKE2B d91b2a7f43f50ef615628e62951701ae4d920f2d8e9cc6f4d5e55368c00c80f2fbc9940df1bcc786b51e85e28fbb43e0c70d04225002a22f302d01a4775185dd SHA512 c4a1dc06b02c227e0cbb8e289b2eab864f5f599f0f92cb376d2a6be7d746774b89fddba21c003c91908a9a140fe639e1588dcff28cccc1a531a6eff8e8f4ccf0
+AUX quake2-icculus-0.16.1-no-asm-io.patch 513 BLAKE2B dbfb2134697e0fdedb47019595a740dfc9c56fa0cb7e21f40cf3a785b20a859d63eb81917cf95157866fd467cd8b0e4f4a8ffa1a871b35679d68c4d77d64bca5 SHA512 ad2d62ce9c69f10683bd5a0970339c82acdf9543b802a0ed070fb025efab6b3aad6e352cc29de5e3120449a3b679823feb920dc175f33b00d230cb9082be3f16
+AUX quake2-icculus-0.16.1-x11_mouse.patch 330 BLAKE2B 0b3da68e551dd76104c29acb9956393d29cd74462c38e9546575ce8951bbf05a14d2f01bd1246aaee842b59e46b25e90fd64e889a5e113dc325aaf7aa948b4e1 SHA512 4387615cab034dd37fb502e7f7411a9cf5ac9370ef474e123c1ea550d79fb06c838ac1de6e443d3e9aeea73ec905bd7464f57f9a561d4eca90852abace20eea0
+AUX quake2-icculus-0.16.1-x11_soft.patch 1128 BLAKE2B 0a0ffe6ced6a6b18f2a1f888d4f329f49b0ddd1ab8c31b20e37cbb6de9dbc703e681ca117aac0eb9e5c98b9b5e5e35b9c3fa6edc6f1925bbbfc7f8d2e21b8e8f SHA512 c8d479919fd4440041d1f2e3a020c45cfb6522d6ff675845bd646c0b736d6ce4b400bcdf99b7f4d456938e8e946e02e40ebab4d574779fb86cff49e4213abc1f
+AUX quake2.xpm 1234 BLAKE2B 7525cb6b2be194822bd57554c7de5e4fcc9f7db9363e3216acac8dd13d8bd17810ff19f18000027f4de112b464a13aaf37c6be5370261283abac7d0a9f6ab8c4 SHA512 e7ed561123c2919a514ba7e4bcd32214bb368764cb53ad314b2816abefa0368247c0a9d463d9e96217c3583aa30f0f79b80bb5f798f6af857f4a0b069ab57e80
+DIST maxpak.pak 3282742 BLAKE2B 3ad4dd5aade5747b100a24499bae0f0d7fd5cc610e4671c1eafb3fc9fe50cbb955bb1d0d0cbaa19b08be7c07499c6a488200f1d811fb2fbe98e190dd58b324b8 SHA512 49eef504190323add8bbe6fd007ee51a17dc843898a2199a44a0b214a14da90202070f9eb025503c58b64d6306832bdb6c0d04efe927ea651eb83b0517a59782
+DIST quake2-r0.16.1.tar.gz 1525384 BLAKE2B b95db08ed3799d2788a20d24f63ea3a84d7ff4b581ee5f01dc5d588a1d5af50d52586a04ca28d9942e953d028e140112737432e499edcebf999085a29c63fcfb SHA512 63e8fa10446698b1f1cbd20b4bbfeec75d7620cb6454bb90b853cd2a3d6cd9040041a164666a5e015c3a8289423127f9164b500f57793505f6e4671dec932cf2
+DIST roguesrc320.shar.Z 626769 BLAKE2B f6d79630ee41e834ad07907f886766fdc9fd99152c2a1964629d2c74de259b9a232f691e5e3c4ad26ff3239d127f06d20878422dd7c1b896591db7c732a41ef7 SHA512 330db4966b758b8e363eb8d699b30ce5ec7d9fa581936288e7267000d0815996388adebc0206a8903734cdc1c5658616b15518a2bf888ad9e6059f8155960141
+DIST xatrixsrc320.shar.Z 455917 BLAKE2B 646801fad3c7eaac4957a971f507b13fff0ea6ae0423cb7fe8e8276666c4f89165384e2e2148e828b692533f9f582b64db849efe8d858e51026b9fb847282101 SHA512 6723440d3cfdaf7f9b260d5777d9823937a4c3ee800c8c204e8a5c3d29f2b37f6bdc7c0786025a19d040b5692aa54b99b9db2dc121bc0ca2b53c8763b4ab4dfa
+EBUILD quake2-icculus-0.16.1-r1.ebuild 5274 BLAKE2B a5b340d6375dfa039ab42159c94867b7e2123d2381cad6fbc1ac9c53cb97bfcd45adbaa698fe162d2de1813f2a6f5c3856b57e1f65278a86693c00a752ebcba9 SHA512 d3e70d7c722c9ea0dcb288e0c32ab3976a79dedb987844c0f2fff951874dd9ae9c1c1e83d3b6f0a31c882c8d73c6f553da94e90416a2e83d2d320d7ca16c4184
+MISC metadata.xml 612 BLAKE2B 0e452fab96a1eaa0cdbb5113cd957576e968eef662103403cef968ae05b909a3d3bc25939dfbb4d36a191d18853e1af0d342ce37cbd6a30defc4fb5ac9e4285c SHA512 0c143ca3470f6b33b35d660e3ad55678356e7139cab94589d18947617988f63f8c69485167d9d8c3e21ef231b0521f993a5063df26ae3e5e5cf4c64bee30d45b
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 000000000000..194f965a0501
--- /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 000000000000..0961fa68a985
--- /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 000000000000..3e2245f3bb0a
--- /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 000000000000..185359373c4b
--- /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 000000000000..b3291827996c
--- /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 000000000000..626cf5a1b64d
--- /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 000000000000..61f0bb2286e5
--- /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 000000000000..ad1f37309c30
--- /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 000000000000..ae1aa2e4068c
--- /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 000000000000..978c9c9820ea
--- /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 000000000000..d94925b83e4b
--- /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 000000000000..6dc6f0f1ddfb
--- /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 000000000000..e23caf9db09f
--- /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 000000000000..bbbcbb8f064f
--- /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 000000000000..62d0273c2558
--- /dev/null
+++ b/games-fps/quake2-icculus/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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 000000000000..38e4fb6d071a
--- /dev/null
+++ b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~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-base/xorg-proto )
+ 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-0_beta8 b/games-fps/quake2-textures-0_beta8
deleted file mode 100644
index 2ae8122da3ab..000000000000
--- a/games-fps/quake2-textures-0_beta8
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=High-resolution textures for Quake 2
-EAPI=5
-HOMEPAGE=http://jdolan.tastyspleen.net/
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://jdolan.tastyspleen.net/pak8.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6ff988b0f7fef663efa81cfe414b0dba
diff --git a/games-fps/quake2-textures/Manifest b/games-fps/quake2-textures/Manifest
new file mode 100644
index 000000000000..0165b697f978
--- /dev/null
+++ b/games-fps/quake2-textures/Manifest
@@ -0,0 +1,3 @@
+DIST pak8.zip 15099933 BLAKE2B 297c56b3115462c627febbc5cbcba684a3c36e01f088fe975793c7980abbf274fe721668aa0d6b5a4d5ab6b893fd774be0dda73eb2585bbae05cc11b8fb48e1b SHA512 2d51e3e97796e1ad86894767374bb335f5da59852aacc2dead622c4e51f4b73258c5a852561afbc6c6df54149424e96b3d433179864f7d52af81d9445ada8337
+EBUILD quake2-textures-0_beta8.ebuild 782 BLAKE2B eb293dc21a0be2c1a731a460fcf970e06bb5ecf975be32cab385f4548b9852b548c96df277fae3f063e964ee4012a64c23dd7399e5b7c7a6888c2c284d4ffbd3 SHA512 3daf6ae686340dbfaee5d6920171c24b0986864cf3eb8e7e3c98d8c9b1a0e5ac0fc55895be23662b24b2d276dedd2624188446c0c69e9955fc864d1b1cdd4ead
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake2-textures/metadata.xml b/games-fps/quake2-textures/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake2-textures/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..7c3cf3832513
--- /dev/null
+++ b/games-fps/quake2-textures/quake2-textures-0_beta8.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-1.36-r1 b/games-fps/quake3-1.36-r1
deleted file mode 100644
index 89bdeaa6b338..000000000000
--- a/games-fps/quake3-1.36-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=opengl? ( 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 ) ) !dedicated? ( 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 ) )
-DESCRIPTION=Quake III Arena - 3rd installment of the classic id 3D first-person shooter
-EAPI=5
-HOMEPAGE=https://ioquake3.org/
-IUSE=dedicated opengl teamarena +openal curl vorbis voice mumble
-KEYWORDS=~amd64 ~x86 ~x86-fbsd
-LICENSE=GPL-2
-RDEPEND=opengl? ( 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 ) ) !dedicated? ( 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 ) ) opengl? ( voice? ( mumble? ( media-sound/mumble ) ) ) !dedicated? ( voice? ( mumble? ( media-sound/mumble ) ) ) games-fps/quake3-data teamarena? ( games-fps/quake3-teamarena ) games-misc/games-envd
-SLOT=0
-SRC_URI=https://ioquake3.org/files/1.36/ioquake3-1.36.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=043aff3c4f0fa4f939150a2ae1a407cf
diff --git a/games-fps/quake3-9999 b/games-fps/quake3-9999
deleted file mode 100644
index 577ee5f4778a..000000000000
--- a/games-fps/quake3-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=opengl? ( virtual/opengl media-libs/libsdl[sound,video,joystick,X,opengl] virtual/jpeg:0 openal? ( media-libs/openal ) vorbis? ( media-libs/libogg media-libs/libvorbis ) voice? ( media-libs/speex ) curl? ( net-misc/curl ) ) !dedicated? ( virtual/opengl media-libs/libsdl[sound,video,joystick,X,opengl] virtual/jpeg:0 openal? ( media-libs/openal ) vorbis? ( media-libs/libogg media-libs/libvorbis ) voice? ( media-libs/speex ) curl? ( net-misc/curl ) ) >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Quake III Arena - 3rd installment of the classic id 3D first-person shooter
-EAPI=5
-HOMEPAGE=https://ioquake3.org/
-IUSE=dedicated opengl teamarena +openal curl vorbis voice mumble
-LICENSE=GPL-2
-RDEPEND=opengl? ( virtual/opengl media-libs/libsdl[sound,video,joystick,X,opengl] virtual/jpeg:0 openal? ( media-libs/openal ) vorbis? ( media-libs/libogg media-libs/libvorbis ) voice? ( media-libs/speex ) curl? ( net-misc/curl ) ) !dedicated? ( virtual/opengl media-libs/libsdl[sound,video,joystick,X,opengl] virtual/jpeg:0 openal? ( media-libs/openal ) vorbis? ( media-libs/libogg media-libs/libvorbis ) voice? ( media-libs/speex ) curl? ( net-misc/curl ) ) opengl? ( voice? ( mumble? ( media-sound/mumble ) ) ) !dedicated? ( voice? ( mumble? ( media-sound/mumble ) ) ) games-fps/quake3-data teamarena? ( games-fps/quake3-teamarena ) games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 games 2bb3ede665927a68ffdb7c41eec7efde git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=952f84458b68c4f5e1fff99f5e3c6682
diff --git a/games-fps/quake3-alliance-3.3-r1 b/games-fps/quake3-alliance-3.3-r1
deleted file mode 100644
index dda282a8b2ca..000000000000
--- a/games-fps/quake3-alliance-3.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Alliance - fast paced, off-handed grapple mod
-EAPI=5
-HOMEPAGE=https://wiki.gentoo.org/wiki/No_homepage
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-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
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1b0d7356ba67d467ecad512796a91c07
diff --git a/games-fps/quake3-alliance/Manifest b/games-fps/quake3-alliance/Manifest
new file mode 100644
index 000000000000..e075888ac71b
--- /dev/null
+++ b/games-fps/quake3-alliance/Manifest
@@ -0,0 +1,4 @@
+DIST alliance30-33.zip 1995207 BLAKE2B 7a04b2fe357ea88e004ec2dc0aa72d70221725ce3acbdedda301c8601c5e5623b77fb61fbc17e4830b9ce138f190a9983b5a1f46219389f70566c76f2e09ee9b SHA512 e5cebec74e5c61d983453217b0a26f3111a23b76f9e20a5840231d45ca7323105dca983ee33e2d185902a353b5b882ddc488888a62b7ee38a000371e3f5dde61
+DIST alliance30.zip 60476973 BLAKE2B d29bb3b26d1b5d6b3558a548c1a3347e6a9368c048760167bd0f7bf48ca16edddfcde7ce003c217c4007b2a72f0f45a74216c8934a4ab2c41258aebc6520f9b7 SHA512 c48a5d78a85d667e0fd1d6ed321f716f932195fb48a479bc5405df50a50a4cd67e7d35b5a61080255e56b16eaa19acd7f394ed8fce320716d1a6c3f1be41107d
+EBUILD quake3-alliance-3.3-r1.ebuild 631 BLAKE2B eed742c44ad13a6928acc9acc5ac87c29d11f8e2f57348e39fbff5dd945dd29b0401b345f253dc42d6508edb8a791a0e3062655704c9acca2a1033c2f8716cdc SHA512 73d1a5eee90304cdb96dc44a01d8eea237147a077827dfc2df4bc553ddb90da93b6da6a2cc916f2a0f96853a2c6d94e64f399a3f2d21fbdf6a58d9fbb94b153e
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-alliance/metadata.xml b/games-fps/quake3-alliance/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-alliance/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..730bbf5f5b7f
--- /dev/null
+++ b/games-fps/quake3-alliance/quake3-alliance-3.3-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="fast paced, off-handed grapple mod"
+MOD_NAME="Alliance"
+MOD_DIR="alliance"
+
+inherit games games-mods
+
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+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"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f *.exe
+}
diff --git a/games-fps/quake3-alternatefire-2.0-r1 b/games-fps/quake3-alternatefire-2.0-r1
deleted file mode 100644
index 423ea36db92e..000000000000
--- a/games-fps/quake3-alternatefire-2.0-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Alternate Fire - adds unique new secondary attacks to weapons
-EAPI=5
-HOMEPAGE=https://wiki.gentoo.org/wiki/No_homepage
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/alternatefire/alternatefire-2.0.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6f6d2da5cd790406218985b56fe6db9c
diff --git a/games-fps/quake3-alternatefire/Manifest b/games-fps/quake3-alternatefire/Manifest
new file mode 100644
index 000000000000..1d2b7dba7b1c
--- /dev/null
+++ b/games-fps/quake3-alternatefire/Manifest
@@ -0,0 +1,4 @@
+AUX server.cfg 3645 BLAKE2B 0653366f94bb7f00194f7dcd3afdd7826dc35bea50d897f185fc9b052d6bceef3420c80a701e6a9af8c90373ea94d46068bae3fd5e7f3870dc240d2dd5c5cd77 SHA512 a7b4d64adad075ba7ee7af3461ef36216fd374d852267ba712882549d44c137f7638ac100c31081528e6b384865cba6fcdeeccdb22bb0133bcac869e60c30e6f
+DIST alternatefire-2.0.zip 2015159 BLAKE2B 7e291c88d479dacf3bf7e7141faf10cd401ab660f2363818af0458a142484dd27e744a7a8fc9c99246a0938ca7e5cddbfa58cd7410189788d8daf4180eebf498 SHA512 178c5470037e711c58cb09854d7e607166253a6f613c29f23fbbcd46cdff8786dfd53770dfc9d518d75d9a3e42b0745bfaa742a09bad0493dbd335d1bb3fcbf2
+EBUILD quake3-alternatefire-2.0-r1.ebuild 450 BLAKE2B c8f5458b09d55559c6b40c2122243798b43c8f68d36e3f40c44a6475e107176da2c2704552fdcfc822397b4f1849db42d2a6f5b8e21292c89ce95ff86da371fe SHA512 6a1639946e6e0df8183844780bddc641a87cb9d9d980382f3f7c4b785cfdc3b36ad9a1e916adbbe6e74ec6de406c5c248692a7975685bc758f9976440f6405bd
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-alternatefire/files/server.cfg b/games-fps/quake3-alternatefire/files/server.cfg
new file mode 100644
index 000000000000..0ee5c8a202e3
--- /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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-alternatefire/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..d0d7066df6a7
--- /dev/null
+++ b/games-fps/quake3-alternatefire/quake3-alternatefire-2.0-r1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="adds unique new secondary attacks to weapons"
+MOD_NAME="Alternate Fire"
+MOD_DIR="alternatefire"
+
+inherit games games-mods
+
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="mirror://quakeunity/modifications/alternatefire/alternatefire-${PV}.zip"
+
+LICENSE="freedist"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-bfp-1.2-r1 b/games-fps/quake3-bfp-1.2-r1
deleted file mode 100644
index 1fb10c89ea0f..000000000000
--- a/games-fps/quake3-bfp-1.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Bid For Power - Control Ki-powered superheros and battle in the air
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/bid-for-power
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/bidforpower/bidforpower1-2.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=82ce2b643d31291b67a12ab674e7af47
diff --git a/games-fps/quake3-bfp/Manifest b/games-fps/quake3-bfp/Manifest
new file mode 100644
index 000000000000..acbb9fe576e8
--- /dev/null
+++ b/games-fps/quake3-bfp/Manifest
@@ -0,0 +1,3 @@
+DIST bidforpower1-2.zip 129645741 BLAKE2B 4ed67fc9470d3c1a74beceeaee95f6ab4fc64fe4630884b83418773d9e80bb54a44c9486c8b694f16621b49f21fde82fee7af5d052a7c66b15bd4fd3ce3e8822 SHA512 9559af36f6efa46e7d20e4a4dc1293ddf8e5bf310672eebdc3f04536e926c05ce699819adaba2c9a29794815a7b766ed9f70b4d83121196f675cb0d221e77b18
+EBUILD quake3-bfp-1.2-r1.ebuild 465 BLAKE2B b0c137d13e6ef823e2012c72d8043721a0e96b7ab717927a499744515fd8b7fd126742be67472e009ad222e96ed398025e08c4272a06af233110633a159837de SHA512 45e095332b91534c0cbf485acde94530caf32cf8789896e93ca59423e5bcedbc801c959ad4e037679c8b3c1354ca60d5daec67a2fea708d689df789354f3a93f
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-bfp/metadata.xml b/games-fps/quake3-bfp/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-bfp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..a16a448c5598
--- /dev/null
+++ b/games-fps/quake3-bfp/quake3-bfp-1.2-r1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="Control Ki-powered superheros and battle in the air"
+MOD_NAME="Bid For Power"
+MOD_DIR="bfpq3"
+MOD_ICON="bfp.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/bid-for-power"
+SRC_URI="mirror://quakeunity/modifications/bidforpower/bidforpower${PV/./-}.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-bin-1.32c-r2 b/games-fps/quake3-bin-1.32c-r2
deleted file mode 100644
index 274c68a5357a..000000000000
--- a/games-fps/quake3-bin-1.32c-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=3rd installment of the classic id 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.idsoftware.com/
-IUSE=cdinstall dedicated teamarena
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=Q3AEULA GPL-2
-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(-)] ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://idsoftware/quake3/linux/linuxq3apoint-1.32b-3.x86.run mirror://idsoftware/quake3/quake3-1.32c.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a0bc945e7234ec4dacfaa4b2c9811139
diff --git a/games-fps/quake3-bin/Manifest b/games-fps/quake3-bin/Manifest
new file mode 100644
index 000000000000..a1c828549e5a
--- /dev/null
+++ b/games-fps/quake3-bin/Manifest
@@ -0,0 +1,6 @@
+AUX q3ded.conf.d 193 BLAKE2B 4086b386dee78761016c70f1ac41abab18af899be3df072bddcfea39ce300cf2979c63b765b9050b7b3eb3206d3f9d38071e105db1b49527fcc24eca5f09ef4a SHA512 231ad60874f701efcd85010fbe41d6891db9c7e926d56c88993c5c9025c33884bfb11d83578858cb5b564d2596198cb90da123e67a53e219d08a69c3968e06ff
+AUX q3ded.rc 742 BLAKE2B 920ef23fe62051714850e39e36224fdd2bd7b22b00e77f40a2166582c55e24008286aed21a8acd2b7059940e59ddfac4e2b9b3dbba09c60d07f8bc1900a2c903 SHA512 930b278c0f9ea227b1d64a8167aee72d58ff4f564e46846d4028de8128e66651c47dd52eca12c21e34e3bdbe43a44ae3a6dde6993b556aaf933dad596e027396
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 BLAKE2B 79585534d930a466af58cd34acaac7b9d95da2ad665525b7f7d9ad2e05f3efe5f94b7958b5adca8dd8f687b37d82323a76a701af4bd2cf6011df1e4cc59f4ca9 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78
+DIST quake3-1.32c.zip 3056760 BLAKE2B ad328cde18afba538236fac97d76081f69dd2c92c0c4068cb0ec2605ada8a8beb6668dd01d05724d0536db8e3e6668ac64958758510c3e3d9dd674fde8cdcabf SHA512 8bc68d4a1e015e5d5abb88bee1e52cb6375c005d707147869d16383bdbfd37f092a75e8fb3f8678120621433d98de40dcda9dbdbd255a92399caec2c545ff689
+EBUILD quake3-bin-1.32c-r2.ebuild 2999 BLAKE2B 042725801c1116ee1778782bf3f6bc75aa4dd57161789ae0f705effb8f780db3c994fdd989ae070fab59090b06a8b42d15df0665105b060d61608e8c492b98e8 SHA512 64fcd21454b0967b31bdd8481bba00f46429806b4f8a0010e75a8f9c4576d3fd6e5b4ffdee505ede74e4d0db75e402b2bbcebb34605beb1a803334b6ceb03dc1
+MISC metadata.xml 1151 BLAKE2B 1eeb20916d7e617f8171e4be5b19994699c4c154e6aab0aec07f99d6c927d380e350bc48c989de25a0b5e2e52543d35ac81cc8f5044e0c5c713c3d77df009ebc SHA512 3a76be6152f7b32374df36281551036dcf9a98531347b24250c83dd12ad7c267cb0271c8ad747f312e2cdec2a4ff1c8f66b9ee9898fc58f7b9c78092cbc99ecd
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 000000000000..5ecb89b6c445
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.conf.d
@@ -0,0 +1,5 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..1faaf0384e3b
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.rc
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..7af61d9d28bf
--- /dev/null
+++ b/games-fps/quake3-bin/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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 000000000000..e8b0f6c18faf
--- /dev/null
+++ b/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-1.48 b/games-fps/quake3-cpma-1.48
deleted file mode 100644
index e915ee4ce1c9..000000000000
--- a/games-fps/quake3-cpma-1.48
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Challenge Pro Mode Arena - advanced FPS competition mod
-EAPI=5
-HOMEPAGE=https://wiki.gentoo.org/wiki/No_homepage
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://packages.vstone.eu/quake3/install/cpma148-nomaps.zip http://packages.vstone.eu/quake3/install/cpma-mappack-full.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7921d7b9678a39a00af2509d49ebf4f9
diff --git a/games-fps/quake3-cpma/Manifest b/games-fps/quake3-cpma/Manifest
new file mode 100644
index 000000000000..b1743b56113e
--- /dev/null
+++ b/games-fps/quake3-cpma/Manifest
@@ -0,0 +1,5 @@
+AUX server.cfg 2977 BLAKE2B 33b58ebd3f75dc0ccb08ee1c059b61a2b13c44ede5433dc133a3bc70aae700629c45b7e8926a8e78f719b8960d478ec58fbff6dda5ce2a0646dceef85867108b SHA512 bf380b227eb2c1fcb0365bf930d6c89410942ecc1dec42d1cff1017d9bf3a1164126cb4a22e94b2f3baa3874a520650702b2013fb9b41e7be91151d543106045
+DIST cpma-mappack-full.zip 122543145 BLAKE2B a5a3884612715d370d8455ff08a7edf4122df73994551ac3a5e11e3acb779a7eeaf1688d03db560fdb3750abc96350bb9f86364558df93b12a61ad9800beded7 SHA512 bbc1ddd378f76ece224403ac7e1aeb1de2fec2756f438be07fb8f018e5e8cc6679cbf574eac51ce75daa0ee53b8b095ce5b46dffbd120df5450039ce754b9b37
+DIST cpma148-nomaps.zip 8045352 BLAKE2B f73fac90fe4aa8f862ca71b930fd37ebbf076c4050c020952e54895b40814a1e0865ca7ddc3c55a1425603a91ece51fafcb10ff8e863524580e0a9147d044e05 SHA512 6908065a98922774f3b80924a7286fe9008dea0e6e5e7d808e07d9d474bebf30c3e4ca2cd2587c93903095213fbaaff4154d309fd0ca002e80e871c99631c120
+EBUILD quake3-cpma-1.48.ebuild 635 BLAKE2B cd43801cc2ba8fa6b864ae576f1feaa14e834d3db96298c50a7b7f28a2d875d7bc3f1f6e95c2b7109440256e516ec43e0281b988198332d2ce0dccb5e3ce2e44 SHA512 17457bec277ab1626e28f929719748e8ddb6e8e561c8d1a48b2827f55f3db3165447ce2abf19f792e4fa8f27223ad74d8790053481b9ca7901a222b1586893dd
+MISC metadata.xml 2140 BLAKE2B 2754a5009f48d11395932b039a46d789b4d29b4a3e9c47c650550a8c0bf5a934206d5b7231f6f4f15a8feaf965e4eb51a9b60c3bc9a9fc4cc257ef334dbd0398 SHA512 3ee4c8bb057183cc7aa852ce76fb793c9372ecfac8569eb9b8361e1c18d659f907424098733f3fe3ad24eb141ea97e354a6a8d813c0f5fb3e6f2de70bcefcebf
diff --git a/games-fps/quake3-cpma/files/server.cfg b/games-fps/quake3-cpma/files/server.cfg
new file mode 100644
index 000000000000..352d1e8e69fd
--- /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 000000000000..a5a834212f58
--- /dev/null
+++ b/games-fps/quake3-cpma/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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 000000000000..91092175ebe1
--- /dev/null
+++ b/games-fps/quake3-cpma/quake3-cpma-1.48.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="advanced FPS competition mod"
+MOD_NAME="Challenge Pro Mode Arena"
+MOD_DIR="cpma"
+
+inherit games games-mods
+
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="http://packages.vstone.eu/quake3/install/cpma${PV//.}-nomaps.zip
+ http://packages.vstone.eu/quake3/install/cpma-mappack-full.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~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-1.32b b/games-fps/quake3-data-1.32b
deleted file mode 100644
index e12403b8e922..000000000000
--- a/games-fps/quake3-data-1.32b
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Quake III Arena - data portion
-EAPI=5
-HOMEPAGE=http://icculus.org/quake3/
-IUSE=cdinstall
-KEYWORDS=~alpha ~amd64 ~x86 ~x86-fbsd
-LICENSE=Q3AEULA
-PROPERTIES=cdinstall? ( interactive )
-RDEPEND=games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/quake3/linux/linuxq3apoint-1.32b-3.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8f357e93cf472b179787f6862478396d
diff --git a/games-fps/quake3-data/Manifest b/games-fps/quake3-data/Manifest
new file mode 100644
index 000000000000..0a9447256798
--- /dev/null
+++ b/games-fps/quake3-data/Manifest
@@ -0,0 +1,3 @@
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 BLAKE2B 79585534d930a466af58cd34acaac7b9d95da2ad665525b7f7d9ad2e05f3efe5f94b7958b5adca8dd8f687b37d82323a76a701af4bd2cf6011df1e4cc59f4ca9 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78
+EBUILD quake3-data-1.32b.ebuild 1167 BLAKE2B aa47c948c8623134d14d585c52d2ac6a49f42377dca0bf0a8e789ca4f29ea50dbacfcaa5a154a48f28366b8005392c6f81f9b187e975d4ef968c37d020db14e9 SHA512 57bede2c620392fa1407e768c63e0fa9f8733ecdc1a63612b8854d458e4cb40745e546391ac661c65fb6a40f16b9bec076972f84f7646f463e7de2199918a7c8
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-data/metadata.xml b/games-fps/quake3-data/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..bc98a7d7c2e5
--- /dev/null
+++ b/games-fps/quake3-data/quake3-data-1.32b.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~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 ..."
+ newins "${CDROM_ABSMATCH}" pak0.pk3
+ 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-1.91.21 b/games-fps/quake3-defrag-1.91.21
deleted file mode 100644
index 8a72b6e89680..000000000000
--- a/games-fps/quake3-defrag-1.91.21
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Defrag - Trickjumping challenges for Quake III
-EAPI=5
-HOMEPAGE=http://cggdev.org/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://q3defrag.org/files/defrag/defrag_1.91.21.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
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d464f9ece12c8af3db5075bd59fe3aff
diff --git a/games-fps/quake3-defrag/Manifest b/games-fps/quake3-defrag/Manifest
new file mode 100644
index 000000000000..d29858433202
--- /dev/null
+++ b/games-fps/quake3-defrag/Manifest
@@ -0,0 +1,15 @@
+DIST defrag_1.91.21.zip 4035256 BLAKE2B 3713b9e642d7be0761c70a92cc08b57bc7d27193837f9dab06c5316feb68d5bbfd9952f20e3ebac4bfb89cad34a231fbb358719a9f2a8ff2ff9fbb5f2dd2d71a SHA512 bfc1614b0e2f2dd674369c9c162c412249e6c514f878eaf82a456c882e2081867d6a7260f62ce4a143c23ff28f4f3a5e75a152db788d66b7a0978225bf4417b8
+DIST defragcpmpak01.zip 8567363 BLAKE2B bb1f60ae471db3370f28f2ca856c690084897ec5c43f7ec3e0ce2c5af1647c212f75b965022b3886ddaa12dbd2b70d7a57ffa72497b55fd60f0a2575669a448b SHA512 2ad013e27886bd5547ac1555711c026b27131311d0261e36f50ee2cc715a21f2781fc57d90fb398b5b6b49eb2b9cdad212fd3da9828c4680dd3ad684d0348cf5
+DIST defragpak1.zip 3778055 BLAKE2B 4c8cfccfa1320f33a0340a296012b6cc1cf1b95ae449308e3fe881df768772a50f3270e8cb86a8ee3016085521dc7820c00002045fb7d9bd8fa2a2aab5ccc0d5 SHA512 9c42035db51d70f66d2526a67e5a83f1bbfb61a91b73c6f52308d4cc4c84d7322c3a6372392a87de531684c6c75b25955d17121166b0ba4f2e3e1f5b09b12cee
+DIST defragpak10.zip 7913269 BLAKE2B 50afd97f2640b58baa8e5538446156160df61e0796cd5202489f89fe4e3c1f4dec92dadf7f268392d966070832b9186049376b5e1f9d593b8b3cbcb461c740ac SHA512 112b27b5ccf9304971bf65b9099b0d20741b7ec9d3b946ef2483e11b509687c50d5d1bd2faabf0199af9f4b03325d3309d6911a8397c623595498f0288b5f9c7
+DIST defragpak11.zip 9959458 BLAKE2B 4563ca760f38ff14caf9720673652d095da3187e2dc260dc9fc230ddd7995b877c234720c8dc616d1f3054b3ba89694ae7d56420f9c18af1f48d0e318e19b2fe SHA512 df8d30dc1cc18c754f090d441b4a6d6550a78e3f4bcb50069f73c021fa3ccc2408782d961d97eebf8e4d21d542ee1217d18eae352559f55f175d5cd1e8fb3672
+DIST defragpak2.zip 2056082 BLAKE2B ab08fd153a538fc4fa1c5317d97b773ce52659ea2c63dff6e98f5e3780f8b22a53606d7fbf9b9103080ca4bf609f004bb46acbaf62cf8413b566827d80eeb99f SHA512 9f9715c35e2dc81ac95348fae0100930781d06d607be6ce552463c18dae2495e644034e9674ccebada4b532c901284fc357bb7ea190c84dc6a6d9a406366e2d6
+DIST defragpak3.zip 4699963 BLAKE2B b05c81e0ab188bb8f14458996033701a96d752d008cb1a46d755d539e31cd8f03ec4629356c16ddbb8f6c6ee7270750bff2d35d320e529c8eff5837592215c6c SHA512 5ca4e6da3083bc89c066a8af46f9d4fb368f9a6e3c96271d5b995b3e1be8efe9ea08e83988c0f153a86c9c03aed77cbe2d7aa0ac280e4dd99b6cf2aac5cdc939
+DIST defragpak4.zip 3711149 BLAKE2B 8553afb71f7c41d9baa40062d400c7231792635b6dca630d1d154beff977887a05f21a61f8c65f7d7b0cc33ff6195a4ab89b7c5ab7f9ad08e7ca2416fd9b565a SHA512 5b2807c565c5c535e07984d6006cf152f01384170be351e70aecf13633cc80ad9a3b83ef5dbe3271d1adbf2a25aeec844fca899e8c8c8c9b06ead608fa64f329
+DIST defragpak5.zip 6100341 BLAKE2B aa97db63b9989aed2c3880f28ae764141e630a49e44673cbe77ebd3988473e326cd631b7a79b04683cf84b5664d9a6ecb83eac5aab46f677f6955fed4c643760 SHA512 41da373058f8198c71c664ea52fe6ca0825af97a6b4c71f08e0cc4e29377c3f0300f951d2d2966634260be0ca9cd9adc9f686da408685172b6b61c3ef172502a
+DIST defragpak7.zip 10915548 BLAKE2B e7a78446bd6254c554771086e56fe113e08945e62440ee5a9df76fdfcefb367248a19903ba311dbd1b0f263b42bb296886ab9be27d4e2ac280fbf9686cc01be2 SHA512 73f9e11ee1beec35d268e60cf8051fbd99b68009c582c087448b966560b7f4cc7543fb3f210dddfde4ce00a7596a5450a7cb470c17b35bbec13965830f39e56f
+DIST defragpak8.zip 11972907 BLAKE2B 93a738411df34718c44b7ac366becaf86e0c9ac780d24335baa3486c699a94a279ad66a33e503bdb77ab2aa5033f9f7402aaf9ba7ae511d05f4e208833d0cbbf SHA512 f6dc7646b87f5a9ceface82f479064b49d2c6f785d9f0fc7228bc6b4e399d90cf72d6fdde71246fe5bc75da0385734cc76e6ac66d9760f9b85b90359d815b080
+DIST defragpak9.zip 8531944 BLAKE2B 821f7865409e9db75a5e2238c77bae033e96f63843b663c6d783f24d28e51bb95ec8c6229cebe2c866ac022f87d783165e06446fd955a2dc438f3f8190f8b539 SHA512 8c03a2a5d8553792bbd2557c8a19a66e7a2301d87c2e0f8e695700c26ff32a1d83ebfd47e18060fc9ca6d6acb5772566b659ce0567d36da99add65d5faabdaa0
+DIST df-extras002.zip 6538951 BLAKE2B f5ad82ee6d2c4d5703c9454164f37580d7caad8a0b10e52012b9b988b68b41032cd77e6803b58d3368ba6232a3986299283232414ca922494dbf811cea340594 SHA512 ec4fcc2f42f2c130babd5712a548eea836307b102d29d5cf4402924f4ffdbd8dd9d6872b6d2be0c277a19cf7babd4ea163733895902946d09df1a9e94372dd48
+EBUILD quake3-defrag-1.91.21.ebuild 1396 BLAKE2B 5777463733ea1c950b91d7fb45572f23c76418f51a0b0e68141c1fd455494e908556a5fae6cd5c14f7372d892f430547d115ff0680586f83e838858910079297 SHA512 4961f526e5f051b1d749d7749b5dcb25f1d8906ac17b73f00a1b7f537bbc76f4a115f1e3ddadf60242dcae00e66590cc8d5d01ab36ba796df928aa80c054dc28
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-defrag/metadata.xml b/games-fps/quake3-defrag/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-defrag/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
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 000000000000..aeac35425a75
--- /dev/null
+++ b/games-fps/quake3-defrag/quake3-defrag-1.91.21.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack defrag_${PV}.zip
+ cd ${MOD_DIR} || die
+ 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} || die
+ mv -f DeFRaG/* . || die
+ rm -rf DeFRaG || die
+ mv -f *.txt docs/ || die
+ rm -rf misc/{mirc-script,misc,tools} || die
+}
diff --git a/games-fps/quake3-demo-1.11-r1 b/games-fps/quake3-demo-1.11-r1
deleted file mode 100644
index d2084d6f4193..000000000000
--- a/games-fps/quake3-demo-1.11-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=the playable demo of Quake III Arena by Id Software
-EAPI=5
-HOMEPAGE=http://www.idsoftware.com/games/quake/quake3-arena/
-IUSE=dedicated
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=Q3AEULA
-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(-)] ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://idsoftware/quake3/linux/linuxq3ademo-1.11-6.x86.gz.sh mirror://3dgamers/quake3arena/linuxq3ademo-1.11-6.x86.gz.sh
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=39f907c1aceb7d2895b6322b49310e27
diff --git a/games-fps/quake3-demo/Manifest b/games-fps/quake3-demo/Manifest
new file mode 100644
index 000000000000..20429f3802ef
--- /dev/null
+++ b/games-fps/quake3-demo/Manifest
@@ -0,0 +1,3 @@
+DIST linuxq3ademo-1.11-6.x86.gz.sh 49289300 BLAKE2B 879402114754e7c3c2b9cb668827e8c5a70dc35f9f8801713074e40bf127b98145859a32d9d5984a4db81075b6837ba19149f9b0ee32c94207c823c83368d32b SHA512 aa74f8e1e8b5036fd68761e5f38cbc3d771e9bd0d5c3cc1f5d89d7eba8fd4fda8108dfd4f31d2b846114e4ec89f6aa15849b95232e0570181a104563ec0faeb5
+EBUILD quake3-demo-1.11-r1.ebuild 1455 BLAKE2B d736315bac79d4219691d82b969e47ffcee335d7cd7212eefa00acfaed12c6a2323101be16354a23af54abefd9148e831bb3390a4598e8da1482103c9e8c2e13 SHA512 4d5c7679d46c0684d360fde55f8c6d306a7c3325320e088fc55b07b9121e55ba25406d6772e0bb7df8241c2f767433e08a0783a692a750476760c31a539f979e
+MISC metadata.xml 332 BLAKE2B 0207451e30faf5cad4db18ee0f62ba08e6ca008a223413a2aad0186635619e565f14cedb2668a3b5c72c08eac4171edbf0b1c0256b58e40dea8e5d1d58b97af8 SHA512 0852d9f223e893d40f4376708c32ceb59b5df65c5cb345a3ba81700ec4198c6bb7396be42910aa3c406df40b8bc4d97d777624ced523cd8de56f4dd406a89d01
diff --git a/games-fps/quake3-demo/metadata.xml b/games-fps/quake3-demo/metadata.xml
new file mode 100644
index 000000000000..b8a2e88c3c6c
--- /dev/null
+++ b/games-fps/quake3-demo/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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 000000000000..6d37eb990467
--- /dev/null
+++ b/games-fps/quake3-demo/quake3-demo-1.11-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-2.3 b/games-fps/quake3-excessiveplus-2.3
deleted file mode 100644
index 78adab1f3104..000000000000
--- a/games-fps/quake3-excessiveplus-2.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Excessive Plus - Makes the weapons much faster and stronger
-EAPI=5
-HOMEPAGE=https://www.excessiveplus.net
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://www.excessiveplus.net/files/release/xp-2.3.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4f25b95a0e941b0dde32e750fe858719
diff --git a/games-fps/quake3-excessiveplus/Manifest b/games-fps/quake3-excessiveplus/Manifest
new file mode 100644
index 000000000000..8af1764d4705
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/Manifest
@@ -0,0 +1,3 @@
+DIST xp-2.3.zip 17266975 BLAKE2B e5cfaba73ac82316a3ba19b778b9c31da24dbffd0e76d2b14b6f3991285853a1f26d8473d78129d5bc4b77fac08b7b18da508dbd8ae610691487b9330b705d04 SHA512 80a8663c8d42139661ccd5333f9c543854ad82ae38f7838139c78413f7fa3e163c27a66aed4014e56ca756cabf2fd835179cba2336ada7158fdbde1e2841535b
+EBUILD quake3-excessiveplus-2.3.ebuild 518 BLAKE2B 762790669935b626ba0d3aadcbdf2182d1150a716362c954ec717fb7f793605ae12519377f68d31ae225874aa8b0f9b00255042d2d07f33452e36b1208d0997c SHA512 55ea13902ac4cc764761003fe728f53f321b425d0d8265070c3db411e96ba0e3f1671c7124da35d72795d434768fe8afbf4aa1c803751831426e8b288ef8ff67
+MISC metadata.xml 800 BLAKE2B bd7941cbdea7443be6aa914a839100fa264f45fa69f848fe1d5985ae6241f03cbf8ca8f236a4022c94d56df9edf9d1593c3618ee9081ee1064d3a7791c269595 SHA512 4320259a818af53b8d6034ec82e6a329113365e0ca7e0465897fc8cef064089154e37db00a92b8c1ffbc53307f9ea6033ec002923e0b53b29672f1ee531b085f
diff --git a/games-fps/quake3-excessiveplus/metadata.xml b/games-fps/quake3-excessiveplus/metadata.xml
new file mode 100644
index 000000000000..dd6f510a8e43
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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.3.ebuild b/games-fps/quake3-excessiveplus/quake3-excessiveplus-2.3.ebuild
new file mode 100644
index 000000000000..ac2472d83781
--- /dev/null
+++ b/games-fps/quake3-excessiveplus/quake3-excessiveplus-2.3.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="Makes the weapons much faster and stronger"
+MOD_NAME="Excessive Plus"
+MOD_DIR="excessiveplus"
+MOD_ICON="excessiveplus.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.excessiveplus.net"
+SRC_URI="https://www.excessiveplus.net/files/release/xp-${PV}.zip"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f *.bat
+ rm -rf ${MOD_DIR}/tools
+}
diff --git a/games-fps/quake3-lrctf-1.1 b/games-fps/quake3-lrctf-1.1
deleted file mode 100644
index 8475624834ed..000000000000
--- a/games-fps/quake3-lrctf-1.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Loki's Revenge CTF - offhand grapple all-weapons capture the flag mod
-EAPI=5
-HOMEPAGE=http://www.lrctf.com/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=LRCTF
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://lrctf.com/release/LRCTF_Q3A_v1.1_full.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b7200e225096f67c83706b797a736c68
diff --git a/games-fps/quake3-lrctf/Manifest b/games-fps/quake3-lrctf/Manifest
new file mode 100644
index 000000000000..ad52188f82eb
--- /dev/null
+++ b/games-fps/quake3-lrctf/Manifest
@@ -0,0 +1,3 @@
+DIST LRCTF_Q3A_v1.1_full.zip 340050745 BLAKE2B 686d88d6f6ca527a85d0574c7b7277d96a0318fdaf7d85e429e9606bf083a72b860975a8daa94d485f8c086b1c61cf9e896085639cfce81daa06d6809d00d78e SHA512 0e397d8044427e0dfe1bc3dfd288b7b3988e9705018c5005c87feef68b065826a7117962c0172ebed48ba1bd63b67e4264c8282a8495d6074a0e26224f2ef533
+EBUILD quake3-lrctf-1.1.ebuild 406 BLAKE2B 253fce29fc0baea606c0eb69c7ad0dd3602e37e77dbb4c0c779d6210ea81ce6b2fb824b48fd531030e0d3c0a86115a890dcafb50c63f9a8cc3f3a3d5684deb0d SHA512 584fb48b061ffa8c27f08322d348b83ee10e5a5f8fdd289e6d221d62b97058edba1acdccda4622f4a5d6735f17e0d7b044614da51984a248478be72b28dfe7ee
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-lrctf/metadata.xml b/games-fps/quake3-lrctf/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-lrctf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..8ac9cdec512a
--- /dev/null
+++ b/games-fps/quake3-lrctf/quake3-lrctf-1.1.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-matrix-2.4_beta-r1 b/games-fps/quake3-matrix-2.4_beta-r1
deleted file mode 100644
index da67afb23f0c..000000000000
--- a/games-fps/quake3-matrix-2.4_beta-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Matrix - Matrix conversion mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/matrix-quake-3
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/matrix24.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=743e7f2892f5bac92aa2a4479bfa339e
diff --git a/games-fps/quake3-matrix/Manifest b/games-fps/quake3-matrix/Manifest
new file mode 100644
index 000000000000..8e17bb51914f
--- /dev/null
+++ b/games-fps/quake3-matrix/Manifest
@@ -0,0 +1,3 @@
+DIST matrix24.zip 21191819 BLAKE2B 04f97bc7fd711b59069e4447f7003a528683939ec209962124cff8d97c5b7e17750b595fd89a17f76a7e00ce06b127cc93bdd343f04ac8a2fb5d20eef2d4a45b SHA512 f19b7d9d6b54eee23480a4217e6c47fdca184fcd7653a04a147ad6a2af6151420381adb340db37f445e3a23d8c0f045c760c7f10218d6c2622f9cb74acd792db
+EBUILD quake3-matrix-2.4_beta-r1.ebuild 465 BLAKE2B 9638505bf201d62e72a9b0c2bc3466dc685476585a284bdfaab29243552473201e7b14479f7cd77a74adf3fe0f9c547a38f97f411b56cf9ae7a17513715be679 SHA512 c75dfa4ebf49479c1185d04078543498ff7942eedf0cd7e89da62728925eecd06d000f91c5a24ecb0cd1a7912e54b024a4476b8c78b5930b89a4c838e6b4ec1a
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-matrix/metadata.xml b/games-fps/quake3-matrix/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-matrix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..184a4a09b17b
--- /dev/null
+++ b/games-fps/quake3-matrix/quake3-matrix-2.4_beta-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="Matrix conversion mod"
+MOD_NAME="Matrix"
+MOD_DIR="matrix"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/matrix-quake-3"
+SRC_URI="mirror://quakeunity/modifications/matrix24.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ mkdir ${MOD_DIR} || die
+ cd ${MOD_DIR} || die
+ unpack ${A}
+}
diff --git a/games-fps/quake3-nsco-1.93-r1 b/games-fps/quake3-nsco-1.93-r1
deleted file mode 100644
index cef6bf610636..000000000000
--- a/games-fps/quake3-nsco-1.93-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Navy Seals: Covert Operations - a US Navy Seals conversion mod
-EAPI=5
-HOMEPAGE=https://wiki.gentoo.org/wiki/No_homepage
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/navyseals/nsco_beta19.zip mirror://quakeunity/modifications/navyseals/nsco_beta193upd.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0f5332657d6fbdacd8545a8cc28459b0
diff --git a/games-fps/quake3-nsco/Manifest b/games-fps/quake3-nsco/Manifest
new file mode 100644
index 000000000000..c2a3a4183980
--- /dev/null
+++ b/games-fps/quake3-nsco/Manifest
@@ -0,0 +1,5 @@
+AUX server.cfg 3518 BLAKE2B e01da5f7dd888e2166206e0a0b9d4153d0bbcd7a10aef3e72ca0a2585bf81335e144149be74d5a7739cb357455e5f36fba063340e3344ce685c0385387deb38b SHA512 2e7719a5805e92b9dad5ed38f7865abc1c7cb31390fe5240edf1e5a421529d49eb5811b753ec60cb6bb9c8e6e3ce2053004225d661f5a671e3d84820230148cc
+DIST nsco_beta19.zip 314224296 BLAKE2B 65a1313889b8d9c9e8858f3d0372d41ba941a2ec31b5e5a62219b2284e99ba0fa9dd4e64c44e0e227f7537120f6a1378f8bfa1b3000cab79dec65a95a9894fbc SHA512 bf125ab25e841536686e0a4d7de98b62b35f1034e9120daf86a1c2536b189252f22ab0b4105337e311758103cce7a9e1f371d5ba4f859dacbf2d7b41e48952c5
+DIST nsco_beta193upd.zip 55808681 BLAKE2B abc518d483e4f652d18fbb6a96ad2486cda2af9c7df5194d6904ff4a29a4532baa607b4f05d969bc6aaf5d6a910fed96098726ba7373737ebb9d6eded2d8bb33 SHA512 8233a54b65ba29babab47056468fb112cac6a687db151d416dbabb754fe03006db4f0d0bb403e0e44f03d2b6e99428d67aed0fa27d4473331035dea5bc3563eb
+EBUILD quake3-nsco-1.93-r1.ebuild 567 BLAKE2B b9e4dc16e5d3badb0b380600563ce4468b16a168d3aa6466b8af7b7453017c172264f31312c1589510cd497210c266efb4c16e130eea37dda974b27bd7df258c SHA512 366db429bce4b8dd2706967c5f85821cb7af30e8d878b210647d86abd23ada1069bf8bd75737aa8cfb254e83967501badf8ee0f7c7bf942278a677891457f56e
+MISC metadata.xml 1006 BLAKE2B 1aae974ea3733be2e7ab2a9170d828753a2bae4427a793b1bcc4454c2bb4746abbe43996cd63ac88e82c0433300dad24db1327a69238b76d050cfe67476a21d8 SHA512 8937940f78ff4174f570be92d750fc19d7ac8035acd1523044c818244414a11e08a61a5b7ff0559b40b7b3ba7d8ac7bf5034e337f410bee5b211f49a3a50c6f7
diff --git a/games-fps/quake3-nsco/files/server.cfg b/games-fps/quake3-nsco/files/server.cfg
new file mode 100644
index 000000000000..2a0eba41e0f6
--- /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 000000000000..b7aeaff31a83
--- /dev/null
+++ b/games-fps/quake3-nsco/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+
+
+ <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 000000000000..0d80eb2dfe04
--- /dev/null
+++ b/games-fps/quake3-nsco/quake3-nsco-1.93-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="a US Navy Seals conversion mod"
+MOD_NAME="Navy Seals: Covert Operations"
+MOD_DIR="seals"
+
+inherit games games-mods
+
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="mirror://quakeunity/modifications/navyseals/nsco_beta19.zip
+ mirror://quakeunity/modifications/navyseals/nsco_beta193upd.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+RESTRICT="strip mirror"
+
+src_prepare() {
+ rm -rf seals/launch* || die
+}
diff --git a/games-fps/quake3-osp-1.03a-r1 b/games-fps/quake3-osp-1.03a-r1
deleted file mode 100644
index 1d924d0e6c85..000000000000
--- a/games-fps/quake3-osp-1.03a-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III OSP - a tournament mod
-EAPI=5
-HOMEPAGE=http://www.orangesmoothie.org/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://osp.dget.cc/orangesmoothie/downloads/osp-Quake3-1.03a_full.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ea56d9e992407b74e59b882116982a6a
diff --git a/games-fps/quake3-osp/Manifest b/games-fps/quake3-osp/Manifest
new file mode 100644
index 000000000000..f008fdfbaf5e
--- /dev/null
+++ b/games-fps/quake3-osp/Manifest
@@ -0,0 +1,4 @@
+AUX server.cfg 5532 BLAKE2B 1a6b6b474ad8bd9b56ba572c31e06fd41b900615a786fca017df97794dfe02b391a3b51cfac33d6ec2cd4c3f08ec2c79433cfd2b34092a54df8693eb789c95fc SHA512 31fd512e9a614950292a7d80b376ec6dbd673773ff973af96ac806360cccf5835d1985d978b078e3d68f632f8ecbb3dfb86d90aa27e2529e58c4682ac89e908e
+DIST osp-Quake3-1.03a_full.zip 55882759 BLAKE2B f5d0ff6c6b9a2ceef0c0269c8d20f12f8040b328612e6893ef12bedc15c9f92e4e9b3160a64f269535aa2f64ed010d2ea60050587fbe5a9787f717da8a6e8068 SHA512 9a9bc76ca2e582432e0f8ff6a3fe0bd2e0b0767a1f52bdea8debc7bc9053dc78951335da085b88e0f3690f1f7fda25a628cff9bace7f683f543c5eff90307e19
+EBUILD quake3-osp-1.03a-r1.ebuild 491 BLAKE2B fec264040a526cd53732da1562e11fb31f624b3db0550e10c8ad41c31b2cff700bdfea874d7cd390df19b75d10053f4a9a4974c367977e972717fb3dcff0e964 SHA512 c91bb86ab60d9f7341086dfb3c521f406787f1101c61c85965035e932d1f59edf31244a85c3ba60f3f259ea87cda57317eab164133c31337e39cb701ec021b7c
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-osp/files/server.cfg b/games-fps/quake3-osp/files/server.cfg
new file mode 100644
index 000000000000..887ff1e2784e
--- /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 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-osp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..f7620d7bea89
--- /dev/null
+++ b/games-fps/quake3-osp/quake3-osp-1.03a-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~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-1.76-r1 b/games-fps/quake3-ra3-1.76-r1
deleted file mode 100644
index 9e27f1e8260c..000000000000
--- a/games-fps/quake3-ra3-1.76-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Rocket Arena 3 - a rocket dueling mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/rocket-arena-3
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/rocketarena3/ra3176.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=94149304d0e30a9c0b217b098c0ac769
diff --git a/games-fps/quake3-ra3/Manifest b/games-fps/quake3-ra3/Manifest
new file mode 100644
index 000000000000..0aed79f0207f
--- /dev/null
+++ b/games-fps/quake3-ra3/Manifest
@@ -0,0 +1,3 @@
+DIST ra3176.zip 138018848 BLAKE2B 173d514e6033beeb46775e1e0122c0ea1ad6d0acf5268e8341200e95181f8dc3bbffde0dcc011cc665fe46e580f78930e35f3c4f51b8075e5ac275c4123441eb SHA512 64240dcb1460465eac5279162ed04b97f20bbf10437b1519b1da22c73368c9af0e57191b884fb2712cddd8e0086816a871ad0657dfdb73ab70940ec8f37daff9
+EBUILD quake3-ra3-1.76-r1.ebuild 451 BLAKE2B 4a05ce6c99049e9c66f98221735cba0ae8aa513122ceb81f94a0137e99c026997e354364390db3993d58abafa8f3b3be73c162083b4e8db9fc3fc472ce37e4ae SHA512 c85835ebf88b976f143b556881ff15678acea03d9fcd8267b56288325a985601602b44b79d39c01343ed7c7561d209ee887aa00b766f57b8a9a687a5fec72880
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-ra3/metadata.xml b/games-fps/quake3-ra3/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-ra3/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..f7d8d6db4557
--- /dev/null
+++ b/games-fps/quake3-ra3/quake3-ra3-1.76-r1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="a rocket dueling mod"
+MOD_NAME="Rocket Arena 3"
+MOD_DIR="arena"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/rocket-arena-3"
+SRC_URI="mirror://quakeunity/modifications/rocketarena3/ra3${PV/.}.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+QA_PREBUILT="${INS_DIR:1}/${MOD_DIR}/*so"
diff --git a/games-fps/quake3-reaction-3.2 b/games-fps/quake3-reaction-3.2
deleted file mode 100644
index cafcf97db736..000000000000
--- a/games-fps/quake3-reaction-3.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Reaction - port of Action Quake 2 to Quake 3: Arena
-EAPI=5
-HOMEPAGE=http://www.rq3.com/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/reactionquake3/ReactionQuake3-v3.1-Full.zip mirror://quakeunity/modifications/reactionquake3/ReactionQuake3-v3.2-Update.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=253631e179c9ee56f8e4023a892a9175
diff --git a/games-fps/quake3-reaction/Manifest b/games-fps/quake3-reaction/Manifest
new file mode 100644
index 000000000000..ddc8c8b0ce72
--- /dev/null
+++ b/games-fps/quake3-reaction/Manifest
@@ -0,0 +1,4 @@
+DIST ReactionQuake3-v3.1-Full.zip 327488276 BLAKE2B 8a26d2c0841175fa9db95b5443d653d1b6b252e80c0c73418a46edb6b747b85e543dddbc0e034a954d87ae0b99a8341f8fcdfb7df01a21a13f0ad91d19cba509 SHA512 78d141a09d73daedcbaf2c3ec24a7c017592f556610011e8143ebc7c16e24f24bc8575b59ac43f46119beb0eb5d1744e6f21854e19fc5e8ee65a3f6124f2d5e4
+DIST ReactionQuake3-v3.2-Update.zip 182810088 BLAKE2B db5d28f71d3e894ad3b068f34ff63d89a16dc5c5b83698ebf0587b750b4575a62cc6845c50e7b0c560272ed7c6bcbcab338ea929a0a9e6eb42b3af22cc6c3ba5 SHA512 80d798d4153fe6072e297caad8999c95b3132ac8026f2b2b8c684a63be0cbb66d7c812bd68f9c8c28b297a93664b19962c1bae4741b3bba225099e6db87ae2d5
+EBUILD quake3-reaction-3.2.ebuild 536 BLAKE2B cf540d088915067f660d201816b9a9985ad408c955693d7b562abd203b5f820c634af4693745407518817115ea1010f4d20542c75b5f9182b1b890770f51e80d SHA512 fbdeb31441d455c9274642f27170e8129d2b132da8e4d63bc8026e5ecdd27cf86915548df78f148bc05c5db38c80e16cd9996229618d38b7ebed07f5b003f427
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-reaction/metadata.xml b/games-fps/quake3-reaction/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-reaction/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..e5ca16d89d4f
--- /dev/null
+++ b/games-fps/quake3-reaction/quake3-reaction-3.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/quake3-ruinhunters-1.0a-r1 b/games-fps/quake3-ruinhunters-1.0a-r1
deleted file mode 100644
index 7a2b6166cbd4..000000000000
--- a/games-fps/quake3-ruinhunters-1.0a-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Ruin Hunters - Anime mod with cartoon actors and arcade-like gameplay
-EAPI=5
-HOMEPAGE=https://wiki.gentoo.org/wiki/No_homepage
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10.zip mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10a_patch.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=bf8d8baf75f6b715ac0800e2c69d87ce
diff --git a/games-fps/quake3-ruinhunters/Manifest b/games-fps/quake3-ruinhunters/Manifest
new file mode 100644
index 000000000000..dfac90a16634
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/Manifest
@@ -0,0 +1,4 @@
+DIST ruin_hunters_v10.zip 67679542 BLAKE2B a366ab8c3a10905f5d4b50fbc2b386c21a7da9cbdc37d88a0a8bf4cd4a27bf491f924f8e1ef25834377c9b5806692bccd5aeb03823d779e8ee4c27f7b0237526 SHA512 9eabab8460c2ddffeb7cc48eea272028a9623f9df3078c328599f83e2827e73e8578d7846d51026d426007d9579bb34ebe9321e27548fe245840063efbcb8d54
+DIST ruin_hunters_v10a_patch.zip 7186582 BLAKE2B b3e78c0ed15a93c525f285bf46340c8a2d7be16d3232ca6525f3880461365c716860f189675c4ec662944951acb4aa99aa88bffc6cec1dd8623be46599768668 SHA512 898e5fe7c16fdeb030b6fd1873171c9f37eedbcf55162963a1f2ea7ac281ad0021116f705964cfd20aa08a462270bddbb2a4a071331641eab11b8e3dc60abc45
+EBUILD quake3-ruinhunters-1.0a-r1.ebuild 552 BLAKE2B 56ec61e3d0c4dadddc5363d51236797e6897a2673f90627e7e71018bc534d4922e0350358c0f012b3e3781648ce64c0d0de0a5d3a270f4ec587cb8998fc72c96 SHA512 ef6cbc86ce4d031dd364b871e8ff5a95a099cfe5d9392896b55407eaeac53acbd26f22c77cc2b4f256b101cf6ca03a95f103e765cf43d5e85fa924ad10003842
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-ruinhunters/metadata.xml b/games-fps/quake3-ruinhunters/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..4964206061fb
--- /dev/null
+++ b/games-fps/quake3-ruinhunters/quake3-ruinhunters-1.0a-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="Anime mod with cartoon actors and arcade-like gameplay"
+MOD_NAME="Ruin Hunters"
+MOD_DIR="ruin"
+
+inherit games games-mods
+
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="
+ mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10.zip
+ mirror://quakeunity/modifications/ruinhunters/ruin_hunters_v10a_patch.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f *.bat
+}
diff --git a/games-fps/quake3-teamarena-1.32b b/games-fps/quake3-teamarena-1.32b
deleted file mode 100644
index 7567f38a5ae8..000000000000
--- a/games-fps/quake3-teamarena-1.32b
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Quake III Team Arena - data portion
-EAPI=5
-HOMEPAGE=http://icculus.org/quake3/
-IUSE=cdinstall
-KEYWORDS=~amd64 ~x86 ~x86-fbsd
-LICENSE=Q3AEULA
-PROPERTIES=cdinstall? ( interactive )
-RDEPEND=|| ( games-fps/quake3 games-fps/quake3-bin ) games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/quake3/linux/linuxq3apoint-1.32b-3.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=781022a5b6ca7f7a7aaab9ddb8c9faa3
diff --git a/games-fps/quake3-teamarena/Manifest b/games-fps/quake3-teamarena/Manifest
new file mode 100644
index 000000000000..d30bbd373680
--- /dev/null
+++ b/games-fps/quake3-teamarena/Manifest
@@ -0,0 +1,3 @@
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 BLAKE2B 79585534d930a466af58cd34acaac7b9d95da2ad665525b7f7d9ad2e05f3efe5f94b7958b5adca8dd8f687b37d82323a76a701af4bd2cf6011df1e4cc59f4ca9 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78
+EBUILD quake3-teamarena-1.32b.ebuild 1256 BLAKE2B ceb31493ac1372af155e07ddb48f207a21d61ad53585f22e95e945b376ed863b8f6c4b47f6d366083de82dd89177c614afa714680a2813189a92aae39e67cd64 SHA512 b0db55d685e39ae75b9f95005251186f9a94c0923f6d3be186e34509bc86aadc060a449745112ff275feb0aed3e2cd1efd4b291fa4a5437b7de27d02d75da390
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-teamarena/metadata.xml b/games-fps/quake3-teamarena/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-teamarena/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..628004441da5
--- /dev/null
+++ b/games-fps/quake3-teamarena/quake3-teamarena-1.32b.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~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-1.7-r1 b/games-fps/quake3-threewave-1.7-r1
deleted file mode 100644
index bff560a74635..000000000000
--- a/games-fps/quake3-threewave-1.7-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Quake III Threewave CTF - Threewave CTF
-EAPI=5
-HOMEPAGE=http://www.threewave.com/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-fps/quake3[dedicated] games-fps/quake3-bin[dedicated] ) ) opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) !dedicated? ( !opengl? ( || ( || ( games-fps/quake3[opengl] games-fps/quake3[-dedicated] ) || ( games-fps/quake3-bin[opengl] games-fps/quake3-bin[-dedicated] ) ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=mirror://quakeunity/modifications/threewavectf/threewave_16_full.zip mirror://quakeunity/modifications/threewavectf/threewave_17_update.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8d26f2ecca9c01713db94e3ff1328e7e
diff --git a/games-fps/quake3-threewave/Manifest b/games-fps/quake3-threewave/Manifest
new file mode 100644
index 000000000000..4747e541c9cf
--- /dev/null
+++ b/games-fps/quake3-threewave/Manifest
@@ -0,0 +1,4 @@
+DIST threewave_16_full.zip 187896825 BLAKE2B d1217e9b403254cf5226457129dc56bc3f07cb00f0c8a5a926c6b4241c778e17a1d41601684c98b268fcba598aa55e6d0aecec7a7d6628e16a8f2ea5caef2511 SHA512 06d7ce75453f79dc2621086cac816a5bb81cc3c1dcc96015c4f7e18f07144c2cca384d437edda51e431c11854977b5d6197a70be06e1660da9a0c3ab67dae6af
+DIST threewave_17_update.zip 6139861 BLAKE2B 20325e06bfa1bf6899e4de053c3e673d01381f24fb35ce3096d2738241ade30f56ba72317dd5dc5c73ec61d4731d54b036dde2b8b77c5ea4212bb7f2d4376246 SHA512 b2c98112d3c671fb08db154079cf2a085536dd121600301884779030722a18301e73a5d41321dff98508659feda689c8af08be1b05420527c395bb036a627962
+EBUILD quake3-threewave-1.7-r1.ebuild 527 BLAKE2B d13bcc6d742fa13f065c7f7a40f5bdaacc923956cf6facd08d7164e0e24611bb506833d4fcc3b38bc4647f4fa81fca097f66071f216e06439f96a89c808105f3 SHA512 adc06794df2d9cf38f96392494dfd1726d30ad9a7ea67f2f94aaa4b006a7fa574075166aa544e259ea0251fc807039443d948664048c3c0f7521875bb66e6eb8
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake3-threewave/metadata.xml b/games-fps/quake3-threewave/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake3-threewave/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..c5ea539aae0b
--- /dev/null
+++ b/games-fps/quake3-threewave/quake3-threewave-1.7-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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 ~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 000000000000..e6ee7ca4c809
--- /dev/null
+++ b/games-fps/quake3/Manifest
@@ -0,0 +1,5 @@
+AUX quake3-1.36-bots.patch 499 BLAKE2B d8f9f0df531519e2ca96584ab728a18929f5a27891ec6c5c24e34a705c458205f020e4fa509ec8e66571aad16e21f26fbc45a8e3abc44585469aa589fc191288 SHA512 75d0659a07902cd78153792353796e77ce1baf7545da370d88f37accca090bee9b94d7447bfa0d284fb98769c94ee434cf7baa6fe9f457018d00dd6431eecba0
+DIST ioquake3-1.36.tar.bz2 3503058 BLAKE2B f5688bc66f19eeeb0cc925208ac4f8a95905f4a2a9be6380f408d354d466020135e0944abc1344e81a9f67aeb714111af2d0f968c2c2eab6138f1a55b2db7191 SHA512 fdd8e0ab56966cdc614eff45ab478b87255cfb1b50ba10b3141bcfcc569fc620d281de93333d39119b2d7b43aac3900ecf826a0459fc89bb2f57e30ae2425645
+EBUILD quake3-1.36-r1.ebuild 3013 BLAKE2B 19680c247cc7fb09143118f8190ad387f800e3da789bbef509a8e632fa1dd1bd7fef763bc37fab62af99d6d7b6f22345c5c07f3ecc2a559c9a275a6c01d24b3e SHA512 b20cd53c7dacab10a6948ef1f88dd0c3218d6b156b3b81e4f33a6700abc22e7ee5bf6e4a751ab1bf70f93c3d1fe398600f14cfeb754389cf342ab29600b83179
+EBUILD quake3-9999.ebuild 3537 BLAKE2B a9e2d29981768255e2d532c66baa4e6fb13bf9040c4bd88c2f2d9c545d920165975c5120843bfc93f08cb62d16c473cc90b1ab76568cb426e9cf0d137ec811b2 SHA512 aebd3073b92f3d8878697cca0c7183f7f4f5eca8b9e111dbe80649648d2db951dfd2071247aaaf7912822643d5f6a4649cd5f3d0515989f5f2475bc821368ca9
+MISC metadata.xml 1286 BLAKE2B b6b6ec5139fe9f86f102a52bec57df55a0228ff70cb958cdd5af84c332ddd9e7b78f2e334874d70429f857dcd6e9eb8cd5e843d509b19438040d572b1a3218a8 SHA512 6a82390bc52e5995c1ff12e001cb6d54d70366b618c71107e0c79c5b03c9717b6e7426e221ac499126ea0ea870c75bdfe40418e04a2f3c4241ac5e0b99dd22b9
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 000000000000..31d2f2041c6f
--- /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/metadata.xml b/games-fps/quake3/metadata.xml
new file mode 100644
index 000000000000..c62fb568e143
--- /dev/null
+++ b/games-fps/quake3/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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 000000000000..d2ce233ab185
--- /dev/null
+++ b/games-fps/quake3/quake3-1.36-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs games
+
+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="https://ioquake3.org/"
+SRC_URI="https://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~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 )"
+
+S="${WORKDIR}/${MY_P}"
+
+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() {
+ epatch "${FILESDIR}"/${P}-bots.patch
+ einfo "Fixing libspeex linking..."
+ sed -i -e 's/\(-lspeex\)/\1 -lspeexdsp/' Makefile || die
+}
+
+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)" \
+ V=1 \
+ 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)
+}
+
+src_install() {
+ dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README TODO
+ if use voice ; then
+ dodoc voip-readme.txt
+ fi
+
+ if use opengl || ! use dedicated ; then
+ doicon misc/quake3.svg
+ make_desktop_entry quake3 "Quake III Arena"
+ 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}
+ dosym ${target} "${GAMES_BINDIR}/${target/io}"
+ 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 000000000000..a5273e1ac571
--- /dev/null
+++ b/games-fps/quake3/quake3-9999.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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=5
+inherit eutils flag-o-matic toolchain-funcs games
+[[ "${PV}" == 9999* ]] && inherit git-r3
+
+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="https://ioquake3.org/"
+[[ "${PV}" != 9999* ]] && SRC_URI="https://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2"
+EGIT_REPO_URI="https://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:0
+ 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}/${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)" \
+ V=1 \
+ 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)
+}
+
+src_install() {
+ dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README.md TODO voip-readme.txt
+ if use voice ; then
+ dodoc voip-readme.txt
+ fi
+
+ if use opengl || ! use dedicated ; then
+ doicon misc/quake3.svg
+ 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}
+ dosym ${exe} "${GAMES_BINDIR}/${exe/io}"
+ 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
+
+ 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-1.4.2-r2 b/games-fps/quake4-bin-1.4.2-r2
deleted file mode 100644
index cf963303083b..000000000000
--- a/games-fps/quake4-bin-1.4.2-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Sequel to Quake 2, an id Software 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.quake4game.com/
-IUSE=cdinstall dedicated l10n_cs l10n_fr l10n_it l10n_pl l10n_ru
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=QUAKE4
-RDEPEND=sys-libs/glibc amd64? ( sys-libs/glibc[multilib] ) sys-libs/zlib[abi_x86_32(-)] dedicated? ( app-misc/screen ) !dedicated? ( || ( virtual/opengl[abi_x86_32(-)] x11-drivers/nvidia-drivers ) >=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 ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://idsoftware/quake4/linux/quake4-linux-1.4.2.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=94127d03eb70d4a3dc1dcabc7170f71d
diff --git a/games-fps/quake4-bin/Manifest b/games-fps/quake4-bin/Manifest
new file mode 100644
index 000000000000..02bd8299ed75
--- /dev/null
+++ b/games-fps/quake4-bin/Manifest
@@ -0,0 +1,3 @@
+DIST quake4-linux-1.4.2.x86.run 287552973 BLAKE2B 93c507f17c91168108545e581baf3a7ab7e75a8c7b8a89772292191b87a81ccf6fbd331592e3442a1781df5b71f357c00bb955244a609c48c51d3d4b8c815c6c SHA512 a6a390a8f46c7e696fe865d0688c9a95eb0d9e32ad62ecb796dcc03618994ec065e8c74358518221cb6c8771d2414ed7e144c77a1a8ecd4ae9ce6406459c5f36
+EBUILD quake4-bin-1.4.2-r2.ebuild 3429 BLAKE2B 148a5141c9424fa9d3f6bdbd20e0782cf985eb8329154e2e5248e5f48065e799130daa59a75417a8a54783d9c5881e8237a6a2f17d5d83baad941d8a161b76d0 SHA512 20c98d4f1cb9226e333ab8d5194b35edef3560aa656eb7d45eac0a7cd6926bfc70877bf01b605f7d5e8e4053f19053d2875d5d362309d9563d4f1cf18af6f837
+MISC metadata.xml 1137 BLAKE2B e7787584e4ccd9af82c56f186188e21df5b5c13783685d3b65227e27ccf32e8a860ec065f7a4edb506e2dca604d88d43f5af0ba0e89ee9accc6233d3bfdd0891 SHA512 1ede51f4fcebc6a451ab4790e5d26fd07f464461d15b31c065eb02a77bdc114ba4ec35fb0ca380d980c416007e4671532b053477709fd7d28210b64423132d31
diff --git a/games-fps/quake4-bin/metadata.xml b/games-fps/quake4-bin/metadata.xml
new file mode 100644
index 000000000000..068a2588cec4
--- /dev/null
+++ b/games-fps/quake4-bin/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-r2.ebuild b/games-fps/quake4-bin/quake4-bin-1.4.2-r2.ebuild
new file mode 100644
index 000000000000..9fcbebba8bf3
--- /dev/null
+++ b/games-fps/quake4-bin/quake4-bin-1.4.2-r2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 l10n_cs l10n_fr l10n_it l10n_pl l10n_ru"
+RESTRICT="strip"
+
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ sys-libs/zlib[abi_x86_32(-)]
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ || (
+ virtual/opengl[abi_x86_32(-)]
+ x11-drivers/nvidia-drivers
+ )
+ >=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 l10n_${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."
+ echo
+ fi
+ elog "To start the dedicated server, run: quake4-ded"
+}
diff --git a/games-fps/quake4-data-1.0.2147.12 b/games-fps/quake4-data-1.0.2147.12
deleted file mode 100644
index ef1056b15124..000000000000
--- a/games-fps/quake4-data-1.0.2147.12
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/bzip2 app-arch/tar
-DESCRIPTION=sequel to Quake 2, an id 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.quake4game.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=QUAKE4
-PDEPEND=games-fps/quake4-bin
-PROPERTIES=interactive
-RDEPEND=games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6382ab7a5e7cca65b14b4388535b8474
diff --git a/games-fps/quake4-data/Manifest b/games-fps/quake4-data/Manifest
new file mode 100644
index 000000000000..6a9f21e4f4c4
--- /dev/null
+++ b/games-fps/quake4-data/Manifest
@@ -0,0 +1,2 @@
+EBUILD quake4-data-1.0.2147.12.ebuild 1361 BLAKE2B a0de8eaff617a7d141522bee966d0d99bc199f46acefcf1a9eed83eb867d4ca0ef08314799f1690f600ff1848ed03237cab8088e549b13881633b3494328eeee SHA512 cd704c1ee316a4388582743f5b04efd3114f65acd11692654f9657616b2ad380668c83f1e7b01ba70dfb9718f237750074ec10d9cc25e686b3365ef32f38563e
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/quake4-data/metadata.xml b/games-fps/quake4-data/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/quake4-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</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 000000000000..a4675a6b575f
--- /dev/null
+++ b/games-fps/quake4-data/quake4-data-1.0.2147.12.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 2..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{1,2,3}.pk4
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 3..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{4,5,6}.pk4
+ cdrom_load_next_cd
+ einfo "Copying files from Disk 4..."
+ doins "${CDROM_ROOT}"/Setup/Data/q4base/pak00{7,8,9}.pk4
+
+ 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-1.0-r2 b/games-fps/quake4-demo-1.0-r2
deleted file mode 100644
index 2108e0bafecc..000000000000
--- a/games-fps/quake4-demo-1.0-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Sequel to Quake 2, an Id 3D first-person shooter
-EAPI=5
-HOMEPAGE=http://www.quake4game.com/
-IUSE=dedicated
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=QUAKE4
-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? ( || ( virtual/opengl[abi_x86_32(-)] x11-drivers/nvidia-drivers ) >=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(-)] ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://idsoftware/quake4/demo/quake4-linux-1.0-demo.x86.run http://www.3ddownloads.com/Action/Quake%204/Demos/quake4-linux-1.0-demo.x86.run mirror://3dgamers/quake4/quake4-linux-1.0-demo.x86.run http://filebase.gmpf.de/quake4/quake4-linux-1.0-demo.x86.run http://www.holarse.de/mirror/quake4-linux-1.0-demo.x86.run http://sonic-lux.net/data/mirror/quake4/quake4-linux-1.0-demo.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e710089ebe7d62a97fc515e672694616
diff --git a/games-fps/quake4-demo/Manifest b/games-fps/quake4-demo/Manifest
new file mode 100644
index 000000000000..e57e9828b5f2
--- /dev/null
+++ b/games-fps/quake4-demo/Manifest
@@ -0,0 +1,3 @@
+DIST quake4-linux-1.0-demo.x86.run 337276597 BLAKE2B 1fa657287210e717486955c5b6190e52665c2c8eb4faf44b1a4ba851347e934436f1153c9df2c3296e3e981c7cf981dbcf5bdb042b6eab1d36214f6937839161 SHA512 c7fa64ca9f95ab61fd02f2d7d3a85c718a5dea9f60a89ba8b46e7500f090fe45bbe498775e41541e33a0bb3483b75da10529755bef3a97d3e362d1c173a02abe
+EBUILD quake4-demo-1.0-r2.ebuild 1897 BLAKE2B aa7a681e68bcf05f42f660cfff2916c0accb0a91db2b297bd57deba6b4e123d2679a554c14d7b6f8b561ae881dfeb925b9f8717ac7388cbfc4cdb02bc2e9739f SHA512 743e53e31e2c88114e7ee02b5869447e3a0930006b6673f191895e89dec2113c56ef85d7e44ec76cf3b42955055b2449b5194ddc5dda9d897ddf6452ed3d7acb
+MISC metadata.xml 1090 BLAKE2B 0cef05f0bb46b9e1ddc0a2c30a3441d98bba5e5f16563b52eefccf1a7bcb4d4c5f2528413ed2ca4680c8bfe9bcbadf3a76c6f6efe26e84d663cec985e2add058 SHA512 d1e6906e94fb8a42f605310a3a2e18fdc99f7557ac7605116c2fa328838f624ff70d7e7f716b1b841de78a5e35067f2f6866d8f36feaf6fd36f8b4c964bbbc0f
diff --git a/games-fps/quake4-demo/metadata.xml b/games-fps/quake4-demo/metadata.xml
new file mode 100644
index 000000000000..c4e94c39a17d
--- /dev/null
+++ b/games-fps/quake4-demo/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<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-r2.ebuild b/games-fps/quake4-demo/quake4-demo-1.0-r2.ebuild
new file mode 100644
index 000000000000..a576d70253bb
--- /dev/null
+++ b/games-fps/quake4-demo/quake4-demo-1.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+
+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? (
+ || (
+ virtual/opengl[abi_x86_32(-)]
+ x11-drivers/nvidia-drivers
+ )
+ >=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
+ fi
+ elog "To start the gameserver, run:"
+ elog " quake4-demo-ded"
+}
diff --git a/games-fps/quakeforge-0.7.2-r1 b/games-fps/quakeforge-0.7.2-r1
deleted file mode 100644
index 8f91011dea20..000000000000
--- a/games-fps/quakeforge-0.7.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare
-DEPEND=media-libs/libsamplerate net-misc/curl virtual/opengl alsa? ( media-libs/alsa-lib ) dga? ( x11-libs/libXxf86dga ) flac? ( media-libs/flac ) ncurses? ( sys-libs/ncurses:0 ) png? ( media-libs/libpng:0 ) sdl? ( media-libs/libsdl[video] ) vorbis? ( media-libs/libogg media-libs/libvorbis ) wildmidi? ( media-sound/wildmidi ) X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm ) xv? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm ) zlib? ( sys-libs/zlib ) cdinstall? ( games-fps/quake1-data ) >=sys-devel/bison-2.6 sys-devel/flex virtual/pkgconfig >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=New 3d engine based off of id Softwares's Quake and QuakeWorld game engine
-EAPI=6
-HOMEPAGE=http://www.quakeforge.net/
-IUSE=alsa cdinstall debug dga fbcon flac ipv6 ncurses oss png sdl vorbis wildmidi X xdg xv zlib
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsamplerate net-misc/curl virtual/opengl alsa? ( media-libs/alsa-lib ) dga? ( x11-libs/libXxf86dga ) flac? ( media-libs/flac ) ncurses? ( sys-libs/ncurses:0 ) png? ( media-libs/libpng:0 ) sdl? ( media-libs/libsdl[video] ) vorbis? ( media-libs/libogg media-libs/libvorbis ) wildmidi? ( media-sound/wildmidi ) X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm ) xv? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm ) zlib? ( sys-libs/zlib )
-RESTRICT=userpriv
-SLOT=0
-SRC_URI=mirror://sourceforge/quake/quakeforge-0.7.2.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0cf5aab32b2bf670000205abdc89012d
diff --git a/games-fps/quakeforge/Manifest b/games-fps/quakeforge/Manifest
new file mode 100644
index 000000000000..ec595124a5ed
--- /dev/null
+++ b/games-fps/quakeforge/Manifest
@@ -0,0 +1,4 @@
+AUX quakeforge-0.7.2-gentoo.patch 1365 BLAKE2B 486c303505940d78b982b92848b04532a77cf2a5896d1cb26b9cf4dc013dca03aea0686102e42a30f7c4038819859c69f01890f55632c0d5af1102cf91d23f86 SHA512 521ba870e7b04e98c4d5507f661b0bfe7f18dc3901b671aed8c03c7691466e4e67f382d0fe05545eabff3ae684b8ed39e6681b4179348682f9adeb3eab177d9d
+DIST quakeforge-0.7.2.tar.bz2 2887823 BLAKE2B 27526b0e5491cc9a052f70c387c46b0d5518c0d63264f799cac81e471a87b978c9edcf22f4a68db25b8c05b7b51371504459e8ba5de450719e92aae712940cc7 SHA512 d296e10b86466aee0a4be527a5fea7a44bae60ebef52ad86381744dc96e2bed2ad14d3b790b4514a5c59ac897662e91b80a9d49c822910930742a1d2b8a2ec55
+EBUILD quakeforge-0.7.2-r1.ebuild 3110 BLAKE2B e33ebe3b29114e0311f073fb311b9ac4bd783971b54af4cac2e48f49aa4887d64fb47ec42785e5bd03b371221f256667f06a4bafb7a6c8620c4add2fb9916a3c SHA512 c0031fac48ad0a1307264b2d077db618636fd247af4cc8efb2ae9e54bc6c99a6514cd15b4f8889286a4956cf56703111d1eda87d082dfc3b2c6213b8f1412716
+MISC metadata.xml 1685 BLAKE2B f2ee32565cd97551e6cd22200d0ce2332a014b774511b172dc1e2b486a27e417af441f1f944b8325bf23dc7363e46a01fa6b51237353f8964e98dd5836357cb3 SHA512 caf9d7549c8e5d801f8d626b8a4c2528735a13fa2c721f4b9d5c9ae74ae15ee55c22f165d3027fcfed8309d6bf1face5dea9ebbb1b8624d679658c6768d77bc0
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 000000000000..38fb0c187689
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch
@@ -0,0 +1,33 @@
+--- a/nq/source/Makefile.am 2012-11-18 16:57:56.658388682 +0100
++++ b/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)
+
+--- a/qw/source/Makefile.am 2012-11-18 17:10:59.148172332 +0100
++++ b/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)
+
+--- a/tools/qwaq/Makefile.am 2012-11-18 17:15:16.024714317 +0100
++++ b/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 000000000000..bd3de0628e47
--- /dev/null
+++ b/games-fps/quakeforge/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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.7.2-r1.ebuild b/games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild
new file mode 100644
index 000000000000..37a670a5b276
--- /dev/null
+++ b/games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="New 3d engine based off of id Softwares's 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 ~x86"
+IUSE="alsa cdinstall debug dga fbcon flac ipv6 ncurses oss png sdl vorbis wildmidi X xdg xv zlib"
+RESTRICT="userpriv"
+
+RDEPEND="
+ media-libs/libsamplerate
+ net-misc/curl
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ dga? ( x11-libs/libXxf86dga )
+ flac? ( media-libs/flac )
+ ncurses? ( sys-libs/ncurses:0 )
+ png? ( media-libs/libpng:0 )
+ sdl? ( media-libs/libsdl[video] )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ wildmidi? ( media-sound/wildmidi )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ xv? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ cdinstall? ( games-fps/quake1-data )
+ >=sys-devel/bison-2.6
+ sys-devel/flex
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+ append-cflags -std=gnu89 # build with gcc5 (bug #570392)
+}
+
+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}
+
+ econf \
+ --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=/etc/quakeforge.conf \
+ --with-sharepath=/usr/share/quake1 \
+ --with-clients=${clients} \
+ --with-servers=${servers} \
+ --with-tools=${tools}
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ dodoc ChangeLog NEWS TODO
+}
+
+pkg_postinst() {
+ # same warning used in quake1 / quakeforge / nprquake-sdl
+ 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 /usr/share/quake1/id1"
+ elog "2 Symlink pak*.pak files in /usr/share/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 /usr/share/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-0.40.1 b/games-fps/qudos-0.40.1
deleted file mode 100644
index 44bad80dbf42..000000000000
--- a/games-fps/qudos-0.40.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=opengl? ( virtual/opengl virtual/glu ) sdl? ( media-libs/libsdl[joystick?,opengl,sound,video] virtual/opengl virtual/glu ) virtual/jpeg:0 media-libs/libogg media-libs/libpng:0 media-libs/libvorbis sys-libs/zlib x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86dga x11-libs/libXxf86vm
-DESCRIPTION=Enhanced Quake 2 engine
-EAPI=5
-HOMEPAGE=https://github.com/ZwS/qudos
-IUSE=cdinstall debug dedicated demo dga ipv6 joystick mods opengl qmax oss sdl textures
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2+
-RDEPEND=opengl? ( virtual/opengl virtual/glu ) sdl? ( media-libs/libsdl[joystick?,opengl,sound,video] virtual/opengl virtual/glu ) virtual/jpeg:0 media-libs/libogg media-libs/libpng:0 media-libs/libvorbis sys-libs/zlib x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86dga x11-libs/libXxf86vm cdinstall? ( games-fps/quake2-data ) demo? ( games-fps/quake2-demodata[symlink] ) textures? ( games-fps/quake2-textures ) games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://gentoo/QuDos-0.40.1-src.tar.bz2 https://github.com/ZwS/qudos/raw/master/quake2/baseq2/qudos.pk3 -> QuDos-0.40.1.pk3
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7ea1e992cfd3eb9fe4d4cc114e8cd082
diff --git a/games-fps/qudos/Manifest b/games-fps/qudos/Manifest
new file mode 100644
index 000000000000..b544a3a1cf03
--- /dev/null
+++ b/games-fps/qudos/Manifest
@@ -0,0 +1,6 @@
+AUX qudos-0.40.1-gnusource.patch 338 BLAKE2B 31b811ca4592ee82e15cc55ab0d5e9e054dc3456f421bada3be8c41993bb7e15ae40f1c53b8aa54e9600ac850c5c4336a67647863c4f6e2b6b473f49a40b8fac SHA512 6e6411e0d6a4c48a82f70cc83eb64eb8b86a15f0ffa552007cb5af6a8d0f718527f6acbcdb80393b45344e133f52ee366cf7923423afae25b3c6ab10829dae98
+AUX qudos-0.40.1-libpng15.patch 205 BLAKE2B 254b56d3933f6eaa5c818042b7875c978c8864b2db711e9fe820942aa3316f593eb9ccd20558ccc95083b6350075e6830fcddb1d694b4e27e7dab6727d91fa8f SHA512 4a2ccb3566f0d3126910b48c024fc5b9d40fe471ca73ce043bc8c8339d2a08f124b921e622bdee05ed007861f4b816941307184bfcbdb8281eca02733b289f70
+DIST QuDos-0.40.1-src.tar.bz2 2031636 BLAKE2B 4940f589cc6239e1489bb81f2e0c0afd6efb36930595c57131927b777913c904ada04883eb5f12f9aaf0ba06d687bf4be8b03f369dd9684fe21d7b1068240599 SHA512 97b9c6bac0d09c060ab33174604deb2781f0ebdc48b00bd0bc402523fb04cdf84edd8abc18507bba8c7e616f6d460a1de6debc96ec39bb5562b20a7f06eea734
+DIST QuDos-0.40.1.pk3 4210489 BLAKE2B 98e07682368e52f4c318e7b9ab98d01b0363986bfea54edff3b13f7f2f4cad20de0146eb498569d024d22200830b341b02f135bf50df4a317915429bb1437439 SHA512 19c3c6b3d17cbd9642320d8eb7a83d667afeafd0ee5eb818e9f07be71e2ab69182474c1f529ecbcfcfa59590bafedb0de3c70dfff10e4bc7a6e07a1546f27d4b
+EBUILD qudos-0.40.1.ebuild 4100 BLAKE2B a510073509090e1871fde9845ab019ddc9b3941ec5f433a8afb0ab16a206706406cf3bd26037b546f81270c4ae70736df9e50bbf40ca2a665ba3b594f873aeb0 SHA512 af3b10b7fc9ea21978a6f69a743a7ec62bd57ef3a85e12dcdfd51c0f783a2758d3b709045269a2503dac72adf3388037d06e8760b2c22b18f11f83bbd2fdb2a1
+MISC metadata.xml 665 BLAKE2B 1f84309c0351baa3d365661d5840a05358889318eb0d42c4e71a42962b730bfe87f3e4bdee7a3f79f130d4d727f33e98ae5399eaa0f0f2aea4594fd5ac648888 SHA512 c96f5c164edea2f535115ca1fdd9ff39755f2be2a3f8846eb91d22e6d12f6e0e589e6d7e97a69d0afc65464df62390117296a27bb7b4b2e8da79735b206e5966
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 000000000000..dd2113b0c3bb
--- /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 000000000000..ecf9de9370e9
--- /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 000000000000..114138906332
--- /dev/null
+++ b/games-fps/qudos/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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>
+ <upstream>
+ <remote-id type="github">ZwS/qudos</remote-id>
+ </upstream>
+</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 000000000000..27988248d7dd
--- /dev/null
+++ b/games-fps/qudos/qudos-0.40.1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://github.com/ZwS/qudos"
+SRC_URI="mirror://gentoo/${FILE_STEM}.tar.bz2
+ https://github.com/ZwS/qudos/raw/master/quake2/baseq2/qudos.pk3 -> ${PK3_FILE}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdinstall debug dedicated demo dga ipv6 joystick mods opengl qmax oss sdl textures"
+
+DEPEND="opengl? (
+ virtual/opengl
+ virtual/glu )
+ sdl? ( media-libs/libsdl[joystick?,opengl,sound,video]
+ virtual/opengl
+ virtual/glu )
+ virtual/jpeg:0
+ media-libs/libogg
+ media-libs/libpng:0
+ media-libs/libvorbis
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+RDEPEND="${DEPEND}
+ cdinstall? ( games-fps/quake2-data )
+ demo? ( games-fps/quake2-demodata[symlink] )
+ textures? ( games-fps/quake2-textures )"
+
+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"
+ # 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
+ fi
+}
+
+src_unpack() {
+ unpack "${FILE_STEM}.tar.bz2"
+}
+
+src_prepare() {
+ rm docs/gnu.txt
+
+ # Change default sound driver and its location
+ sed -i \
+ -e "s:\"oss\":\"${snd_drv}\":" \
+ -e "s:\"\./snd:\"$(games_get_libdir)/${PN}/snd:" \
+ src/client/snd_dma.c || die
+
+ sed -i \
+ -e 's:jpeg_mem_src:qudos_jpeg_mem_src:g' \
+ src/ref_gl/gl_image.c || die
+
+ if has_version '>=sys-libs/zlib-1.2.5.1-r1' ; then
+ sed -i \
+ -e '1i#define OF(x) x' \
+ src/qcommon/unzip/ioapi.h || die
+ fi
+ sed -i -e '106,119 s/CFL/LED/' Makefile || die
+
+ epatch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-gnusource.patch
+}
+
+src_compile() {
+ yesno() { usex $1 YES NO; }
+
+ local client="YES"
+ default_client || client="NO"
+
+ local type="release"
+ use debug && type="debug"
+
+ emake \
+ BUILD_QUAKE2="${client}" \
+ BUILD_DEDICATED=$(yesno dedicated) \
+ BUILD_GLX=$(yesno opengl) \
+ BUILD_SDLGL=$(yesno sdl) \
+ BUILD_ALSA_SND=NO \
+ 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
+}
diff --git a/games-fps/red-blue-quake2-0.1 b/games-fps/red-blue-quake2-0.1
deleted file mode 100644
index 4488c0397a92..000000000000
--- a/games-fps/red-blue-quake2-0.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=x11-libs/libX11 app-arch/unzip
-DESCRIPTION=red-blue Quake II ! play quake2 w/3d glasses !
-EAPI=5
-HOMEPAGE=https://www.jfedor.org/red-blue-quake2/
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=x11-libs/libX11 games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://idsoftware/source/q2source-3.21.zip https://www.jfedor.org/red-blue-quake2/red-blue-quake2-0.1.tar.gz
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=3092c647792987afc2b1734012a4776d
diff --git a/games-fps/red-blue-quake2/Manifest b/games-fps/red-blue-quake2/Manifest
new file mode 100644
index 000000000000..b5a457d5be80
--- /dev/null
+++ b/games-fps/red-blue-quake2/Manifest
@@ -0,0 +1,7 @@
+AUX 0.1-gentoo.patch 1964 BLAKE2B 75d24546aa8792f0cc0888c5730882ec8939f0ea654a17dad0b3bb2b1921ee0c0928593c667daf87180e1d63634d5afa479c71e942c907a1787b3ecd47cdce41 SHA512 87b7d3a355a57940b1ce2be3e30ff5053aa83af2e53018f1ea00556dba67cbb1767729867eabf062faf1a08eb2ca601176dbccd6c9585160edb2e3477b22fa5a
+AUX red-blue-quake2-0.1-gcc41.patch 895 BLAKE2B eb246353c60602806a835a6ef375d45cb14b08bf51fdeab4eaea884ce1b94b03c7d017ee3c8295d1c2f8d80cf9c0c478423e7033dee515581c497459ee0501b6 SHA512 9cb57a27bc5e8e7123c40a55625f4e227d5c81e179de3119441d7447de7701c9f6e8fc76a24e1b6c21bb92eff142aed24ffed2da39cb5bf2f87eaf8600b210bc
+AUX red-blue-quake2-0.1-ldflags.patch 3382 BLAKE2B 04576aaef36280b2dc62ce22f50c6689ac5343c148760aef3ad68150a8560bdf5e31f671fa09bcdeb3716b547f0509b4e83c1a2b4a7f741ed2798b7c3a4e6327 SHA512 a49ab8462322740fcfef70c6bff16df9b164cfa0cace00bdf366e10db1d0fc13770d97f9aa8dcf1f92d1555d7d978ce7f947d58bc3d030fd2c1be0983e74470a
+DIST q2source-3.21.zip 1477764 BLAKE2B afdeeff318e23397d24f9ecc68f4015b03d58d3f7794dd23febc4e285a916b2cf8c93b872a62a33dc1a4b7c2fff34ad92781e0320296cc13d4721b8cd5bf345a SHA512 eb3fcf3327272b7472a044336be4d73111f5b9f50b4916609996ecb690555654990c1f86e63cd6e7d4a30844e66d3eca2e428e29a598bce52e953c326caf9752
+DIST red-blue-quake2-0.1.tar.gz 34874 BLAKE2B 6dc10e8307c4274961ee133af0721d5cb9e1605de4fb47c3256b4a54b91c5e7ea79622140bf5eda2cbce10075ba971c40547726cf45f99e81cadc20828663384 SHA512 4123fb1cceb788068c5cd525e3e03cce8a993ecdd0d86c3c154426689a7893b6d33cddeafbb53761a27473a050829545e7fc802f1236f4dc60161103ad259da5
+EBUILD red-blue-quake2-0.1.ebuild 1314 BLAKE2B 612a708a4f576beb4e121c55781ad5b47768fa27a0d9514b030650ace4a10fc1168e18387c059e13d46af76b3186205dfbb8163938c86791eca95987f3defa37 SHA512 22c42fa7611234616e2cc4f5f4d648e0cc0772033071aa27b78dacb54d804b5af42c6703747b8844078880f3bf7b10c23daeaf6ac9fce43963c58b52fa162fa0
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..fd13df9bcb45
--- /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 000000000000..1f933d33537e
--- /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 000000000000..58beb0f3cec5
--- /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 +682,7 @@
+ $(BUILDDIR)/ctf/q_shared.o
+
+ $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
+- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(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) $(LDFLAGS) $(CFLAGS) $(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) $(LDFLAGS) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
+
+ $(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c
+ $(DO_SHLIB_CC)
+@@ -1287,11 +1287,11 @@
+ $(BUILDDIR)/ref_soft/rw_x11.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) $(LDFLAGS) $(CFLAGS) $(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) $(LDFLAGS) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
+ $(REF_SOFT_X11_OBJS) $(XLDFLAGS)
+
+ $(BUILDDIR)/ref_soft/r_aclip.o : $(REF_SOFT_DIR)/r_aclip.c
+@@ -1431,10 +1431,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) $(LDFLAGS) $(CFLAGS) $(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) $(LDFLAGS) $(CFLAGS) $(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/red-blue-quake2/metadata.xml b/games-fps/red-blue-quake2/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/red-blue-quake2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild b/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild
new file mode 100644
index 000000000000..96715daaab62
--- /dev/null
+++ b/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="red-blue Quake II ! play quake2 w/3d glasses !"
+HOMEPAGE="https://www.jfedor.org/red-blue-quake2/"
+SRC_URI="mirror://idsoftware/source/q2source-3.21.zip
+ https://www.jfedor.org/red-blue-quake2/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/quake2-3.21/linux
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}/${P}"-gcc41.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
+ echo "$(games_get_libdir)"/${PN} > "${T}"/${PN}.conf || die
+}
+
+src_compile() {
+ mkdir -p releasei386-glibc/ref_soft
+ emake \
+ GENTOO_CFLAGS="${CFLAGS}" \
+ GENTOO_DATADIR="${GAMES_DATADIR}"/quake2/baseq2/ \
+ build_release
+}
+
+src_install() {
+ cd release*
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe gamei386.so ref_softx.so
+ exeinto "$(games_get_libdir)"/${PN}/ctf
+ doexe ctf/gamei386.so
+ newgamesbin quake2 red-blue-quake2
+
+ insinto "${GAMES_SYSCONFDIR}"
+ doins "${T}"/${PN}.conf
+
+ prepgamesdirs
+}
diff --git a/games-fps/redeclipse-1.6.0-r2 b/games-fps/redeclipse-1.6.0-r2
deleted file mode 100644
index 628739118008..000000000000
--- a/games-fps/redeclipse-1.6.0-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=!dedicated? ( media-libs/freetype:2 media-libs/libsdl:0[opengl] media-libs/sdl2-image:0[jpeg,png] media-libs/sdl2-mixer:0[mp3,vorbis] virtual/opengl x11-libs/libX11 ) >=net-libs/enet-1.3.9 sys-libs/zlib
-DESCRIPTION=First-person ego-shooter, built as a total conversion of Cube Engine 2
-EAPI=6
-HOMEPAGE=https://www.redeclipse.net
-IUSE=dedicated
-KEYWORDS=~amd64 ~x86
-LICENSE=HPND ZLIB CC-BY-SA-3.0
-RDEPEND=!dedicated? ( media-libs/freetype:2 media-libs/libsdl:0[opengl] media-libs/sdl2-image:0[jpeg,png] media-libs/sdl2-mixer:0[mp3,vorbis] virtual/opengl x11-libs/libX11 ) >=net-libs/enet-1.3.9 sys-libs/zlib
-SLOT=0
-SRC_URI=https://github.com/red-eclipse/base/releases/download/v1.6.0/redeclipse_1.6.0_nix.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=6d0bb95010fb4ef031685244310c811b
diff --git a/games-fps/redeclipse/Manifest b/games-fps/redeclipse/Manifest
new file mode 100644
index 000000000000..8238f6d4a88e
--- /dev/null
+++ b/games-fps/redeclipse/Manifest
@@ -0,0 +1,4 @@
+AUX redeclipse 400 BLAKE2B e2f26d4883194948f32a68e1c7ebe0967b41f8cd7678aa282d1647beeefdd44952af9588ece5f7dddd2e4b6ea2ef51faac614eb88f435e382518ca82c01838de SHA512 da4deee6f5ffbc54bfeb501b3a3b4377a0cd04a2dca4284e51113d5073c9f267fb7d1a2b7b59095a200eeff17abff66d60de9b28106259aa0b2ce5b726912768
+DIST redeclipse_1.6.0_nix.tar.bz2 898467399 BLAKE2B 85b4d02ea95cc44d902f6512ec5ce512583353107deb690ec24608d9b96fd4a6b7fd720250413a192cf7229b2f66294ddeb81230e5ace06abdcd4f6f3dc8d92f SHA512 e944aed8155b5e89e8df000516d4a019a63d38d7ad9c3982b2e111f8a20bc848a98e30c1b60f4fdaf006c2ff9e2cb04647c07778eb2562eaf7db733dbce11233
+EBUILD redeclipse-1.6.0-r2.ebuild 2014 BLAKE2B 57d781179e4f91ca1fa637251978af63deeecab6a09b959bfc001ae32f39fa26bf1aab184d53e9ca87e01de3c8738626602fd4f5c0e0c5f6003d6367af6fc897 SHA512 e460594124b265f6c1db43411488d7b8453127ca7cba35a132065f56c3b21055e8a8f0cc5b9d1e290b53cc41ab2697564b2b63c8e972045cd177b68f844270a6
+MISC metadata.xml 574 BLAKE2B 6a74f40eb547d6ebcc8ca987609c22ebf171cde9286351e2f459f8eb95e8545399dcce6107540c249bdfc0a431f3282a50ae8a1fbe6239cb1b372755dd638c36 SHA512 1f78ab3ec83d4c8887f2f15addf8935f0026a8494340b346ae4c694fd7bf753962830274c572036490d514b2683df8164f9943b6714cff8cebaba896d70d549d
diff --git a/games-fps/redeclipse/files/redeclipse b/games-fps/redeclipse/files/redeclipse
new file mode 100644
index 000000000000..9f2c62fead05
--- /dev/null
+++ b/games-fps/redeclipse/files/redeclipse
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# It is necessary to run the binary from the root of the data directory
+# for the binary to properly locate its assets and load properly.
+# Upstream's original install procedure is doing the same thing.
+
+SERVER=/usr/bin/redeclipse_server_linux
+CLIENT=/usr/bin/redeclipse_linux
+cd /usr/share/redeclipse || exit 1
+[ "${0##*/}" = "redeclipse_server" ] && exec "${SERVER}" || exec "${CLIENT}"
diff --git a/games-fps/redeclipse/metadata.xml b/games-fps/redeclipse/metadata.xml
new file mode 100644
index 000000000000..82f11922de55
--- /dev/null
+++ b/games-fps/redeclipse/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kitsunenokenja@protonmail.ch</email>
+ <name>Rob Levitsky</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="dedicated">Install only as a dedicated game server</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/redeclipse/redeclipse-1.6.0-r2.ebuild b/games-fps/redeclipse/redeclipse-1.6.0-r2.ebuild
new file mode 100644
index 000000000000..a752c8763624
--- /dev/null
+++ b/games-fps/redeclipse/redeclipse-1.6.0-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop
+
+DESCRIPTION="First-person ego-shooter, built as a total conversion of Cube Engine 2"
+HOMEPAGE="https://www.redeclipse.net"
+SRC_URI="https://github.com/red-eclipse/base/releases/download/v${PV}/${PN}_${PV}_nix.tar.bz2"
+
+# According to doc/license.txt file
+LICENSE="HPND ZLIB CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated"
+
+DEPEND="!dedicated? (
+ media-libs/freetype:2
+ media-libs/libsdl:0[opengl]
+ media-libs/sdl2-image:0[jpeg,png]
+ media-libs/sdl2-mixer:0[mp3,vorbis]
+ virtual/opengl
+ x11-libs/libX11
+ )
+ >=net-libs/enet-1.3.9
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -e "s:@APPNAME@:${PN}:" \
+ src/install/nix/redeclipse.desktop.am \
+ > src/install/nix/redeclipse.desktop || die
+
+ if ! use dedicated; then
+ sed -e "s:@LIBEXECDIR@:/usr/libexec:g" \
+ -e "s:@DATADIR@:/usr/share:g" \
+ -e "s:@DOCDIR@:/usr/share/doc/${PF}:" \
+ -e "s:@CAPPNAME@:${PN^^}:g" \
+ -e "s:@APPNAME@:${PN}:g" \
+ doc/man/redeclipse.6.am \
+ > doc/man/redeclipse.6 || die
+ fi
+
+ sed -e "s:@LIBEXECDIR@:/usr/libexec:g" \
+ -e "s:@DATADIR@:/usr/share:g" \
+ -e "s:@DOCDIR@:/usr/share/doc/${PF}:" \
+ -e "s:@CAPPNAME@:${PN^^}:g" \
+ -e "s:@APPNAME@:${PN}:g" \
+ doc/man/redeclipse-server.6.am \
+ > doc/man/redeclipse-server.6 || die
+
+ default
+}
+
+src_compile() {
+ if ! use dedicated; then
+ emake CXXFLAGS="${CXXFLAGS}" STRIP= -C src client server
+ else
+ emake CXXFLAGS="${CXXFLAGS}" STRIP= -C src server
+ fi
+}
+
+src_install() {
+ insinto /usr/share/redeclipse
+ doins -r config data
+
+ dobin src/redeclipse_server_linux
+
+ if ! use dedicated; then
+ dobin src/redeclipse_linux
+ newicon "src/install/nix/${PN}_x128.png" "${PN}.png"
+ domenu "src/install/nix/${PN}.desktop"
+ doman doc/man/redeclipse.6
+ fi
+
+ doman doc/man/redeclipse-server.6
+ dodoc readme.txt doc/examples/servinit.cfg
+
+ dobin "${FILESDIR}/redeclipse"
+ dosym redeclipse /usr/bin/redeclipse_server
+}
diff --git a/games-fps/rott-1.1.2-r1 b/games-fps/rott-1.1.2-r1
deleted file mode 100644
index c07b08b33cf6..000000000000
--- a/games-fps/rott-1.1.2-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare
-DEPEND=media-libs/libsdl[sound,joystick,video] media-libs/sdl-mixer app-arch/unzip
-DESCRIPTION=Rise of the Triad for Linux!
-EAPI=6
-HOMEPAGE=http://www.icculus.org/rott/
-IUSE=demo
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl[sound,joystick,video] media-libs/sdl-mixer
-SLOT=0
-SRC_URI=http://www.icculus.org/rott/releases/rott-1.1.2.tar.gz demo? ( http://filesingularity.timedoctor.org/swdata.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0a8ccdb72ec2157c57465f1fceafe4ea
diff --git a/games-fps/rott/Manifest b/games-fps/rott/Manifest
new file mode 100644
index 000000000000..470de2fc72d5
--- /dev/null
+++ b/games-fps/rott/Manifest
@@ -0,0 +1,4 @@
+DIST rott-1.1.2.tar.gz 749079 BLAKE2B 1c18ef25b8bb97a7edf8c376bf0b6da3829ca0406100ee9f44652077c06414d826086e354850a551152901036673b91d686d4d2e816ba6bb29b8dcce68144c00 SHA512 809a9064fe31c63afccb9a6397ac2c9d4172cdd802b055697cf3b0090ee6a78c9e40b52a4a8df25196489d9a0259304c91e2f84f95413a293bc66192502cf200
+DIST swdata.zip 2889672 BLAKE2B 593f95cbfb4a285ab3b946372d618b6b5cf785aa4b2e5228ac8aaaf702ceb8e4cc000d606f5b3aea85af1b34a4fe45bdebc2f692ba3bfc9c1d3afc7c570ad8a0 SHA512 99373097356afa583021367b2e0ec6ec745941890e4f17f4e07206c66dd370dfa9e928bc0bd6ab9809d8c72646dcc609e3c19f688d2b89a886f215a153b6dd0d
+EBUILD rott-1.1.2-r1.ebuild 1088 BLAKE2B c6dd102f9aa2d38218f1da5e89db7318c7b4cd7fb6a23a834078fff7347badd5b786fb382dffa1e8d2eb43e196092537db68e14c7385eefaa814501741441827 SHA512 0ecd207fb8ec9ecb103611623bdc918e68a499fa58636bc2c9e5719351a4f9efb4ea843da0096fec8abc4d4492339a55210e1d3f4b3d324c152d27a5a446e182
+MISC metadata.xml 1095 BLAKE2B 4a41d9a0bc9962a6a824d7ecc4d0bb774aa2b7feb21829aae74db25874c7f050698a724d7fe3d19e63d2e6aaf1c98d4870ac4d51f14145df24eea9646b3be2a0 SHA512 6e2d291f04b343b366ad9b7e5c18ae7cce327dd27cfdb496247a0228d2cf160d8d42f803f21aed07181dc1395ad8db9431270abd174dfc3c3d46a951294a3325
diff --git a/games-fps/rott/metadata.xml b/games-fps/rott/metadata.xml
new file mode 100644
index 000000000000..5bc2b194722d
--- /dev/null
+++ b/games-fps/rott/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+THE STORY
+
+You are part of an elite group of operatives called HUNT (High-risk
+United Nations Taskforce), and you must stop a maniac cult leader from
+killing millions of people. While scouting a remote island, you are
+suddenly surrounded by enemy troops with guns blaring. In the distance
+you see your boat--your only chance to escape--explode into matchsticks.
+In front of you is a huge fortress monastery, and your only chance to
+stop the madness. You are e quipped with awesome, high-tech weaponry
+like heat-seeking missiles, split missiles, and the Flamewall cannon,
+which leaves a trail of charred skeletons in its wake. You'll also find
+magical instruments and weapons so incredible they defy description.
+</longdescription>
+ <use>
+ <flag name="demo">Install the shareware version</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/rott/rott-1.1.2-r1.ebuild b/games-fps/rott/rott-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..5eabd67d2f86
--- /dev/null
+++ b/games-fps/rott/rott-1.1.2-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="Rise of the Triad for Linux!"
+HOMEPAGE="http://www.icculus.org/rott/"
+SRC_URI="http://www.icculus.org/rott/releases/${P}.tar.gz
+ demo? ( http://filesingularity.timedoctor.org/swdata.zip )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="demo"
+
+RDEPEND="media-libs/libsdl[sound,joystick,video]
+ media-libs/sdl-mixer"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${P}/rott
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^CC =/d' \
+ Makefile || die "sed failed"
+ emake clean
+}
+
+src_compile() {
+ emake -j1 \
+ EXTRACFLAGS="${CFLAGS} -DDATADIR=\\\"/usr/share/${PN}/\\\"" \
+ SHAREWARE=$(usex demo "1" "0")
+}
+
+src_install() {
+ dobin rott
+ dodoc ../doc/*.txt ../README
+ doman ../doc/rott.6
+ if use demo ; then
+ cd "${WORKDIR}" || die
+ insinto /usr/share/${PN}
+ doins *.dmo huntbgin.* remote1.rts
+ fi
+}
+
+pkg_postinst() {
+ if ! use demo ; then
+ elog "To play the full version, just copy the"
+ elog "data files to /usr/share/${PN}/"
+ fi
+}
diff --git a/games-fps/rtcw-1.41b b/games-fps/rtcw-1.41b
deleted file mode 100644
index 002a36b84a72..000000000000
--- a/games-fps/rtcw-1.41b
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Return to Castle Wolfenstein - Long awaited sequel to Wolfenstein 3D
-EAPI=5
-HOMEPAGE=http://games.activision.com/games/wolfenstein/
-IUSE=opengl dedicated
-KEYWORDS=~amd64 ~x86
-LICENSE=RTCW GPL-2
-RDEPEND=sys-libs/glibc sys-libs/lib-compat dedicated? ( app-misc/screen ) !dedicated? ( x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] virtual/opengl[abi_x86_32(-)] ) opengl? ( x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] virtual/opengl[abi_x86_32(-)] ) games-misc/games-envd
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://idsoftware/wolf/linux/wolf-linux-GOTY-maps.x86.run mirror://idsoftware/wolf/linux/wolf-linux-1.41b.x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f959ed9d4a098fc519309832652691a1
diff --git a/games-fps/rtcw/Manifest b/games-fps/rtcw/Manifest
new file mode 100644
index 000000000000..07c3ea36bb88
--- /dev/null
+++ b/games-fps/rtcw/Manifest
@@ -0,0 +1,5 @@
+AUX wolf-ded.rc 466 BLAKE2B 44e446448d1e21fed0e16808c6d7edaa67a237ccd992db6697a407ad88a20eb6b0fd0d8d22bd765e8cdaa165166a93d184acd6db34c0f7b06c7fe7de08fc3f08 SHA512 f949364731a608f397228db8f1b6753c6b307c32ded4330cfd19d76b1378317ab3f0b87f9db0435c255befd5cc5b1bcc37fa6af472b55f757e02b29f74a4645e
+DIST wolf-linux-1.41b.x86.run 73940068 BLAKE2B 252c2fe5028e8325481508fb2b1f944302895faf96f57f933092336899f10b29d4676f299072e852a4c57d20186bd14d0fe0aa780eba063f78881c4616d7f09c SHA512 8c018bcdeca5b14fe1b8c35f46031416978b27b57a38897fa5b1b0c26fbf3ab6f44c22582223ad98a695a793ba1444a2e092beee687e835a279a12121422e93f
+DIST wolf-linux-GOTY-maps.x86.run 51930759 BLAKE2B a675208035fd826b154c27cf9c77082bb0b69681725dfe9255e1a4cd2572ffc3db2b8998a7c7e04a4b423720d73d40317ff5ae07a121e979d5c707abf1cdd631 SHA512 85f334f75d538bb68c7507d36600b433b0ab0c92572c8e8c022eaeb8783fc72d56ff39ee0ee9eb3272ab09025bca56cca70b077b7e7b02a38cd556fb9f425dcc
+EBUILD rtcw-1.41b.ebuild 2771 BLAKE2B e00e1b7852e9ced1b4c5433520eba439cbd642c619f05f0f451a90678e7702b870b6644598dcf98d1bd31dcb7004ee88351cddca7d018059218870985aac3de6 SHA512 c9797beabed04ab34f4621f1a90d856a97bdb3c95fb9dc1d560159ab9dc754f35152fce972d93fb946c371ba9b9e2306642b87734482fde77fd21513771fafcf
+MISC metadata.xml 1048 BLAKE2B 25a54f490819a3e31dcdccbb907f95741721342654f362881021a8d4690aa2a97f5bd48568072286a67cd76fe382d1805f778af2bc9f60cbb8a38668262b14fd SHA512 9fe9d74cb94a07ba0b87c28ee050135e608ccae13e70aa8332e10adb5f2c11d7b86618c2c6a9824ccfe54425439f44827ebf85dbcf8add66178e538e81eb13a7
diff --git a/games-fps/rtcw/files/wolf-ded.rc b/games-fps/rtcw/files/wolf-ded.rc
new file mode 100644
index 000000000000..3f7bf956c10a
--- /dev/null
+++ b/games-fps/rtcw/files/wolf-ded.rc
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting RTCW dedicated server..."
+ screen -A -m -d -S rtcw su - dedicated -c GENTOO_DIR/startwolfded
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RTCW dedicated server..."
+ kill `screen -list | grep rtcw | awk -F . '{ print $1 }' | sed -e s/.//`
+ eend $?
+
+}
+
+status() {
+ screen -list | grep rtcwded
+}
diff --git a/games-fps/rtcw/metadata.xml b/games-fps/rtcw/metadata.xml
new file mode 100644
index 000000000000..4c558817e05b
--- /dev/null
+++ b/games-fps/rtcw/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Return to Castle Wolfenstein is a first-person 3-D shooter based loosely on the original Wolfenstein series by id software. The game takes place in Europe during World War II. In the single player game, you play as a US military special operative sent behind enemy lines to stop the Nazi studies into the supernatural and the occult. The multi-player game is a team-based, goal-oriented series of missions 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. The port to Linux was done by TTimo of id software and is an unsupported binary release. This game is commercial software and requires data from the retail Windows version to play.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/rtcw/rtcw-1.41b.ebuild b/games-fps/rtcw/rtcw-1.41b.ebuild
new file mode 100644
index 000000000000..2cd098cbd9cf
--- /dev/null
+++ b/games-fps/rtcw/rtcw-1.41b.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Return to Castle Wolfenstein - Long awaited sequel to Wolfenstein 3D"
+HOMEPAGE="http://games.activision.com/games/wolfenstein/"
+SRC_URI="mirror://idsoftware/wolf/linux/wolf-linux-GOTY-maps.x86.run
+ mirror://idsoftware/wolf/linux/wolf-linux-${PV}.x86.run"
+# mirror://3dgamers/returnwolfenstein/wolf-linux-${PV}.x86.run
+
+LICENSE="RTCW GPL-2" # gpl for init script bug #425944
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="opengl dedicated"
+RESTRICT="strip mirror"
+
+UIDEPEND="x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
+RDEPEND="sys-libs/glibc
+ sys-libs/lib-compat
+ dedicated? ( app-misc/screen )
+ !dedicated? ( ${UIDEPEND} )
+ opengl? ( ${UIDEPEND} )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/* ${dir:1}/pb/* ${dir:1}/main/*"
+
+src_install() {
+ insinto "${dir}"
+ doins -r main Docs pb
+
+ exeinto "${dir}"
+ doexe bin/Linux/x86/*.x86 openurl.sh
+
+ games_make_wrapper rtcwmp ./wolf.x86 "${dir}" "${dir}"
+ games_make_wrapper rtcwsp ./wolfsp.x86 "${dir}" "${dir}"
+ # work around buggy video driver (bug #326837)
+ sed -i \
+ -e 's/^exec /__GL_ExtensionStringVersion=17700 exec /' \
+ "${D}/${GAMES_BINDIR}/rtcwsp" \
+ || die
+
+ if use dedicated; then
+ games_make_wrapper wolf-ded ./wolfded.x86 "${dir}" "${dir}"
+ newinitd "${FILESDIR}"/wolf-ded.rc wolf-ded
+ sed -i \
+ -e "s:GENTOO_DIR:${dir}:" \
+ "${D}"/etc/init.d/wolf-ded \
+ || die
+ fi
+
+ insinto ${dir}
+ doins WolfMP.xpm WolfSP.xpm QUICKSTART CHANGES RTCW-README-1.4.txt
+ doicon WolfMP.xpm WolfSP.xpm
+
+ prepgamesdirs
+ make_desktop_entry rtcwmp "Return to Castle Wolfenstein (MP)" WolfMP
+ make_desktop_entry rtcwsp "Return to Castle Wolfenstein (SP)" WolfSP
+}
+
+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
+ elog "You need to copy pak0.pk3, mp_pak0.pk3, mp_pak1.pk3, mp_pak2.pk3,"
+ elog "sp_pak1.pk3 and sp_pak2.pk3 from a Window installation into ${dir}/main/"
+ elog
+ elog "To play the game run:"
+ elog " rtcwsp (single-player)"
+ elog " rtcwmp (multi-player)"
+ elog
+ if use dedicated
+ then
+ elog "To start a dedicated server run:"
+ elog " /etc/init.d/wolf-ded start"
+ elog
+ elog "To run the dedicated server at boot, type:"
+ elog " rc-update add wolf-ded default"
+ elog
+ elog "The dedicated server is started under the ${GAMES_USER_DED} user account"
+ echo
+ fi
+}
diff --git a/games-fps/rtcwmp-demo-1.1-r2 b/games-fps/rtcwmp-demo-1.1-r2
deleted file mode 100644
index 77e9c001f88c..000000000000
--- a/games-fps/rtcwmp-demo-1.1-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=Return to Castle Wolfenstein - Multi-player demo
-EAPI=6
-HOMEPAGE=http://games.activision.com/games/wolfenstein/
-IUSE=dedicated
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=RTCW GPL-2
-RDEPEND=sys-libs/glibc amd64? ( sys-libs/glibc[multilib] ) dedicated? ( app-misc/screen ) !dedicated? ( virtual/opengl x11-libs/libX11 x11-libs/libXext )
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://idsoftware/wolf/linux/old/wolfmpdemo-linux-1.1-MP.x86.run mirror://3dgamers/returnwolfenstein/wolfmpdemo-linux-1.1-MP.x86.run
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5318669bed5f2b9339dc5d8b0bc1bbca
diff --git a/games-fps/rtcwmp-demo/Manifest b/games-fps/rtcwmp-demo/Manifest
new file mode 100644
index 000000000000..3a86c3c1618c
--- /dev/null
+++ b/games-fps/rtcwmp-demo/Manifest
@@ -0,0 +1,4 @@
+AUX rtcwmp-demo-ded.rc 488 BLAKE2B 35f8d58737ab3ac285ebc1c86acaf67fff3a4946ac77dcad058b6a606c9ce525497d196940d98146d21fc7e1fcae636dea5d530b585e55eea08d0af5fc1ba931 SHA512 e05da90a615a505fc921caf080e32895dcfd828ca584cbd9bdab3e927eb174c3c9c6cfbed3a5fe0bc3b93851eb2085b1dfc49073ce1858c7954ad1a0c8fa456a
+DIST wolfmpdemo-linux-1.1-MP.x86.run 69650634 BLAKE2B e1ee7e204622eb6dcc708db8a84d50fc1638a1412957111d6e4fb69dc0bd09ec2b53ac3f785d2120e35e4d87315c7d5687b59aa2b8d8671250c8611fac8433c9 SHA512 2e497ca8cb0552dfbc90bfd10544b44f0dca2b7dc74ad6428041fd9885926a03cfdae72d6e5ccbd61b0d0c5b051355c567a9101746838110ebeb0f3fdcaf3ad5
+EBUILD rtcwmp-demo-1.1-r2.ebuild 1709 BLAKE2B cd215756f62755a0457f6c3a41787eaf5e1bd51f23070f880884ec1a6f2ac1435468071eb58344e0c613aba6a45fcad9c94ee2741446c1d7dc9c243fbe5daa11 SHA512 c148774dc69368f518e6ca0c26c2d14b0ac040b38c0e8d4b1accadde4f2f461319a746e3b143539043a29edaebde11fe38a772f555bd709ef7ea11019dbffecb
+MISC metadata.xml 391 BLAKE2B ebfd12186a3d96402c2fc9c51e82f56986d6ecb5b6e6450b3802b62c24549758cba628b2f2d988f3e52a30f7ca9fd03acb1385280ec0791bf610e0e75baf14f1 SHA512 7c19f0975d4df1c3f116d4563400b9e9028d3f7c70c2fa4f1fa6612d1d76141e0f157eba97804640aed191a59715869f4ac325ab32818433cff6e99e74579257
diff --git a/games-fps/rtcwmp-demo/files/rtcwmp-demo-ded.rc b/games-fps/rtcwmp-demo/files/rtcwmp-demo-ded.rc
new file mode 100644
index 000000000000..7d711d08acee
--- /dev/null
+++ b/games-fps/rtcwmp-demo/files/rtcwmp-demo-ded.rc
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting RTCW demo dedicated server..."
+ screen -A -m -d -S rtcwdemo su - dedicated -c GENTOO_DIR/startrtcwded
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RTCW demo dedicated server..."
+ kill `screen -list | grep rtcwdemo | awk -F . '{ print $1 }' | sed -e s/.//`
+ eend $?
+
+}
+
+status() {
+ screen -list | grep rtcwdemoded
+}
diff --git a/games-fps/rtcwmp-demo/metadata.xml b/games-fps/rtcwmp-demo/metadata.xml
new file mode 100644
index 000000000000..d1a52b2afdce
--- /dev/null
+++ b/games-fps/rtcwmp-demo/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+The sequel to id Software's classic Wolfenstein 3-D. This version of the demo is only for multi-player.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/rtcwmp-demo/rtcwmp-demo-1.1-r2.ebuild b/games-fps/rtcwmp-demo/rtcwmp-demo-1.1-r2.ebuild
new file mode 100644
index 000000000000..a62dd413ecd7
--- /dev/null
+++ b/games-fps/rtcwmp-demo/rtcwmp-demo-1.1-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils unpacker
+
+MY_P="wolfmpdemo-linux-${PV}-MP.x86.run"
+
+DESCRIPTION="Return to Castle Wolfenstein - Multi-player demo"
+HOMEPAGE="http://games.activision.com/games/wolfenstein/"
+SRC_URI="mirror://idsoftware/wolf/linux/old/${MY_P}
+ mirror://3dgamers/returnwolfenstein/${MY_P}"
+
+LICENSE="RTCW GPL-2" # gpl for init script bug #425946
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="dedicated"
+RESTRICT="strip mirror"
+
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXext
+ )"
+
+QA_PREBUILT="/opt/${PN}/*
+ /opt/${PN}/demomain/*"
+
+S=${WORKDIR}
+
+dir="/opt/${PN}"
+
+src_install() {
+ insinto "${dir}"
+ doins -r demomain Docs
+ doins WolfMP.xpm
+ dodoc CHANGES QUICKSTART
+
+ exeinto "${dir}"
+ doexe bin/x86/wolfded.x86 openurl.sh
+ make_wrapper rtcwmp-demo-ded ./wolfded.x86 "${dir}" "${dir}"
+ newinitd "${FILESDIR}"/rtcwmp-demo-ded.rc rtcwmp-demo-ded
+ sed "s:GENTOO_DIR:${dir}:" "${ED}"/etc/init.d/rtcwmp-demo-ded || die
+
+ if ! use dedicated; then
+ doexe bin/x86/wolf.x86
+ make_wrapper rtcwmp-demo ./wolf.x86 "${dir}" "${dir}"
+ newicon WolfMP.xpm rtcwmp-demo.xpm
+ make_desktop_entry rtcwmp-demo "Return to Castle Wolfenstein (MP demo)" \
+ rtcwmp-demo.xpm
+ fi
+}
+
+pkg_postinst() {
+ elog "Install 'rtcwsp-demo' for single-player"
+ elog
+ if ! use dedicated; then
+ elog "Run 'rtcwmp-demo' for multi-player"
+ elog
+ fi
+ elog "Start a dedicated server with"
+ elog "'/etc/init.d/rtcwmp-demo-ded start'"
+ elog
+ elog "Start the server at boot with"
+ elog "'rc-update add rtcwmp-demo-ded default'"
+}
diff --git a/games-fps/rtcwsp-demo-1.1b-r2 b/games-fps/rtcwsp-demo-1.1b-r2
deleted file mode 100644
index 3fdec8e946fc..000000000000
--- a/games-fps/rtcwsp-demo-1.1b-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=Return to Castle Wolfenstein - Single-player demo
-EAPI=6
-HOMEPAGE=http://games.activision.com/games/wolfenstein/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=RTCW
-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(-)]
-RESTRICT=strip mirror
-SLOT=0
-SRC_URI=mirror://idsoftware/wolf/linux/old/wolfspdemo-linux-1.1b.x86.run mirror://3dgamers/returnwolfenstein/wolfspdemo-linux-1.1b.x86.run
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=daeeb52c33097a3e18eabe31a3c8a722
diff --git a/games-fps/rtcwsp-demo/Manifest b/games-fps/rtcwsp-demo/Manifest
new file mode 100644
index 000000000000..2f9755aa28d1
--- /dev/null
+++ b/games-fps/rtcwsp-demo/Manifest
@@ -0,0 +1,3 @@
+DIST wolfspdemo-linux-1.1b.x86.run 117813349 BLAKE2B bb5ee4bddc7bc11a093a383bf750717ca435facc5cc314a3465bea4e04bfa186012088a7cd36156c49bbc43647e8603db10f3929aaad033084eb510b65534112 SHA512 3fc540c8721780747e14fe66d634c1347ab0cbc09eb795edfad0802663caa63393ac5a224792fd3e423e725b66cc2738877324c86a08698e0d7b6f2f804b7392
+EBUILD rtcwsp-demo-1.1b-r2.ebuild 1280 BLAKE2B 5793e4f3a8173cfd61a29044a7f987e3578480c272a884419cdb2b5dad05ca1db0d8b1c1bd31816d44ff44534dc12338ac9de795e9f88981d7040b46212a4da4 SHA512 8001a2b85c4eb0680a2b95b9cb466b61b4a8b686578858e961824eeb20f13f3292ab81643f39efced444297724e9bbd58de7bed6512a08a79e70ffbd878ca5d4
+MISC metadata.xml 392 BLAKE2B c1de2b6454879bfdf4efd4afc0f39bbbd7224e086534f414f453f2389fbc91afa33577cde57a6209163e259d4d8edbe7fa22d4b4d37452e8f5f8263a0fae215d SHA512 341a171b1ee0fd2bf16c24124366e027a008c274dea77866ab95c8103c675cd33684ecf295f2a4b2e2075e6770bdfcfbab944236865c43855e57337cb37a51b5
diff --git a/games-fps/rtcwsp-demo/metadata.xml b/games-fps/rtcwsp-demo/metadata.xml
new file mode 100644
index 000000000000..5b9fbad7c313
--- /dev/null
+++ b/games-fps/rtcwsp-demo/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+The sequel to id Software's classic Wolfenstein 3-D. This version of the demo
+is only for single-player.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/rtcwsp-demo/rtcwsp-demo-1.1b-r2.ebuild b/games-fps/rtcwsp-demo/rtcwsp-demo-1.1b-r2.ebuild
new file mode 100644
index 000000000000..aac6233260ea
--- /dev/null
+++ b/games-fps/rtcwsp-demo/rtcwsp-demo-1.1b-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils unpacker
+
+MY_P="wolfspdemo-linux-${PV}.x86.run"
+
+DESCRIPTION="Return to Castle Wolfenstein - Single-player demo"
+HOMEPAGE="http://games.activision.com/games/wolfenstein/"
+SRC_URI="mirror://idsoftware/wolf/linux/old/${MY_P}
+ mirror://3dgamers/returnwolfenstein/${MY_P}"
+
+LICENSE="RTCW"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip mirror"
+
+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(-)]"
+
+S=${WORKDIR}
+
+dir="/opt/${PN}"
+#Ddir=${D}/${dir}
+
+src_install() {
+ insinto "${dir}"
+ doins -r demomain Docs
+
+ exeinto "${dir}"
+ doexe bin/x86/wolfsp.x86 openurl.sh || die "copying exe"
+
+ make_wrapper ${PN} ./wolfsp.x86 "${dir}" "${dir}"
+
+ # fix buffer overflow
+ sed -i -e '/^exec/i \
+export MESA_EXTENSION_MAX_YEAR=2003 \
+export __GL_ExtensionStringVersion=17700' "${ED}/usr/bin/${PN}"
+
+ doins WolfSP.xpm CHANGES
+ newicon WolfSP.xpm ${PN}.xpm
+
+ make_desktop_entry ${PN} "Return to Castle Wolfenstein (SP demo)" \
+ ${PN}.xpm
+}
+
+pkg_postinst() {
+ elog "Install 'rtcwmp-demo' for multi-player"
+ elog
+ elog "Run '${PN}' for single-player"
+}
diff --git a/games-fps/sauerbraten-2013.02.03 b/games-fps/sauerbraten-2013.02.03
deleted file mode 100644
index f4e40826de82..000000000000
--- a/games-fps/sauerbraten-2013.02.03
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup unpack
-DEPEND=sys-libs/zlib >=net-libs/enet-1.3.6:1.3 !dedicated? ( media-libs/libsdl[X,opengl] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[png,jpeg] virtual/opengl virtual/glu x11-libs/libX11 ) >=sys-apps/sed-4
-DESCRIPTION=Sauerbraten is a FOSS game engine (Cube 2) with freeware game data (Sauerbraten)
-EAPI=5
-HOMEPAGE=http://sauerbraten.org/
-IUSE=debug dedicated server
-KEYWORDS=~amd64 ~x86
-LICENSE=ZLIB freedist
-RDEPEND=sys-libs/zlib >=net-libs/enet-1.3.6:1.3 !dedicated? ( media-libs/libsdl[X,opengl] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[png,jpeg] virtual/opengl virtual/glu x11-libs/libX11 ) games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://sourceforge/sauerbraten/sauerbraten/2013_02_03/sauerbraten_2013_02_03_collect_edition_linux.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 games 2bb3ede665927a68ffdb7c41eec7efde gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=454db34f44c4fc929701ac79abaa4690
diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
new file mode 100644
index 000000000000..0119d453acde
--- /dev/null
+++ b/games-fps/sauerbraten/Manifest
@@ -0,0 +1,7 @@
+AUX sauerbraten-2013.02.03-QA.patch 2037 BLAKE2B e9311a8bb64dcd67355767f57261fd5ef11955ce899dedfcb97cf863f7a9b35617169c24286d5ce3074c233a453364efb56477c6de48009bb8106a73c7e50daf SHA512 1725945f0373f03e5ae81b8e9eee4e2a9260d9362ad424e4198bb71af2e69055439268197f784d2acbd9e17ff977e8b1a7f5193d378a036488ff758d0ead4b5a
+AUX sauerbraten-2013.02.03-system-enet.patch 1880 BLAKE2B 57c35e0d15344fdb226f829460d1c15cb163a103911b4d63d544c786f8cb4fe10a0624749e0d3b6fce5a643d2c8285001a8a63f3c700441971a9597f11deb776 SHA512 b53e7db4e6b7ce012ee292a24cbf6e84e1c6bce01cde1a41985d0b471a68c1d2978f8272bc359a81beb317b5ab2ff88a13a1e73aaeb7f5c643e778ffe9861c7a
+AUX sauerbraten.conf 605 BLAKE2B 454045423be96b14debca64e6f65fc3c335f3428affae889727f9bd598b7d3c4084f2d50b48a26f8571f8774f79a99705479ed73b68058c527f7d44bf5ad8a18 SHA512 685b7358ad7267b1b19ac00f879a82205f346b32fda8cb460c4f8c50e9f20263c102b0fca62ab437dabe67ebbdd281f130f28f3b8ef2bcf064ae45fbd23cce67
+AUX sauerbraten.init 1951 BLAKE2B 48402bfcc32caf16491886c6ccb7395628b2c067a5126d59908fe676311bfc781b9aec89aceda8920cedbd3c2c5477e9b404c29a0f6f7c64fd29263432076d1c SHA512 9a96557cb2822f30693900b1dc9ecad9f1eab9e8a3d75432667bfba784ee86754649cf08ccab5f9cbff6be7ab584f3325b9c40c947005cdee425716a888d5c40
+DIST sauerbraten_2013_02_03_collect_edition_linux.tar.bz2 589941180 BLAKE2B b8a1c929dcf7a32bc289262fffcbcd4e7bbab3a9030c12bce7d086d63aaddee0c573c5d38f9ac845b3080aeac38d1b548aa9d243b462c3c682b158a379fe8cc2 SHA512 7864e346cc2bc86d78973db1b341fd8256cc2e1953be51263ef91a5374f9ec00276ba2940850e6d5bba7a57c71190b670dc7ba97021be2935c31f8694fed4897
+EBUILD sauerbraten-2013.02.03.ebuild 3202 BLAKE2B 158a7d5d4a66582b57cbbbc0478154d5488e9f92d29e397093b1fc6ed17c20393014701335db7f9fed9b14d0cc4f4271625e673a63a4cb7ed6531d5b96d23e44 SHA512 f00b9644c6d3cc3867e315a37da362ee23af17ca0e499daffdc16b9aa9ce2a05bbcac77092c39e70567ea4a5a22faa62c25c6afb956e22f14fdbd6df46bda83e
+MISC metadata.xml 401 BLAKE2B 0447e0bdea4cbb8ea99d24ac4f854ff4aefd0e62c4fb1e349485a5ec8429239c95299f5f26736e5458525787d6ef54bda400441ac5b6de920a2ddf949d2cab20 SHA512 1087c8ed886c5066a8bd600cbc9878e6bf21c41f163939daf22c503ce1e9095aff13b8986959aadaaaaf04cd2f314bb664042829deb30196b88a8c2608ce8266
diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch
new file mode 100644
index 000000000000..21f1b13c7a2a
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch
@@ -0,0 +1,50 @@
+applied on top of sauerbraten-2013.01.04-system-enet.patch
+
+respect LDFLAGS, CXXFLAGS and CPPFLAGS
+--- sauerbraten/src/Makefile
++++ sauerbraten/src/Makefile
+@@ -1,4 +1,4 @@
+-CXXFLAGS= -O3 -fomit-frame-pointer
++CXXFLAGS ?= -O3 -fomit-frame-pointer
+ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
+
+ PLATFORM= $(shell uname -s)
+@@ -139,11 +139,11 @@
+ -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master
+
+ %.h.gch: %.h
+- $(CXX) $(CXXFLAGS) -o $(subst .h.gch,.tmp.h.gch,$@) $(subst .h.gch,.h,$@)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(subst .h.gch,.tmp.h.gch,$@) $(subst .h.gch,.h,$@)
+ $(MV) $(subst .h.gch,.tmp.h.gch,$@) $@
+
+ %-standalone.o: %.cpp
+- $(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)
+
+ $(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
+ $(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH))
+@@ -168,19 +168,19 @@
+ install: all
+ else
+ client: $(CLIENT_OBJS)
+- $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
+
+ server: $(SERVER_OBJS)
+- $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
+
+ master: $(MASTER_OBJS)
+- $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
+
+ shared/cube2font.o: shared/cube2font.c
+- $(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
+
+ cube2font: shared/cube2font.o
+- $(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz
+
+ install: all
+ cp sauer_client ../bin_unix/$(PLATFORM_PREFIX)_client
diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch
new file mode 100644
index 000000000000..e87b280ba0c1
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch
@@ -0,0 +1,64 @@
+--- sauerbraten/src/Makefile
++++ sauerbraten/src/Makefile
+@@ -4,7 +4,7 @@
+ PLATFORM= $(shell uname -s)
+ PLATFORM_PREFIX= native
+
+-INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include
++INCLUDES= -Ishared -Iengine -Ifpsgame
+
+ STRIP=
+ ifeq (,$(findstring -g,$(CXXFLAGS)))
+@@ -36,8 +36,8 @@
+ endif
+ CLIENT_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lSDL -lSDL_image -lSDL_mixer -lzlib1 -lopengl32 -lenet -lws2_32 -lwinmm
+ else
+-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
+-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
++CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags`
++CLIENT_LIBS= -lenet -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
+ endif
+ ifeq ($(PLATFORM),Linux)
+ CLIENT_LIBS+= -lrt
+@@ -106,7 +106,7 @@
+ MASTER_LIBS= $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
+ else
+ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
+-SERVER_LIBS= -Lenet/.libs -lenet -lz
++SERVER_LIBS= -lenet -lz
+ MASTER_LIBS= $(SERVER_LIBS)
+ endif
+ SERVER_OBJS= \
+@@ -135,15 +135,6 @@
+
+ all: client server
+
+-enet/Makefile:
+- cd enet; ./configure --enable-shared=no --enable-static=yes
+-
+-libenet: enet/Makefile
+- $(MAKE) -C enet/ all
+-
+-clean-enet: enet/Makefile
+- $(MAKE) -C enet/ clean
+-
+ clean:
+ -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master
+
+@@ -176,13 +167,13 @@
+
+ install: all
+ else
+-client: libenet $(CLIENT_OBJS)
++client: $(CLIENT_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
+
+-server: libenet $(SERVER_OBJS)
++server: $(SERVER_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
+
+-master: libenet $(MASTER_OBJS)
++master: $(MASTER_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
+
+ shared/cube2font.o: shared/cube2font.c
diff --git a/games-fps/sauerbraten/files/sauerbraten.conf b/games-fps/sauerbraten/files/sauerbraten.conf
new file mode 100644
index 000000000000..8d93bf62b788
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten.conf
@@ -0,0 +1,28 @@
+# Config file for /etc/init.d/sauerbraten
+
+# Owner of Sauerbraten server processes (must be existing)
+USER="%GAMES_USER_DED%"
+GROUP="%GAMES_GROUP%"
+
+
+# Whether to run the dedicated server
+RUNSERVER="Yes"
+
+# Location of the dedicated server config directory
+SERVERCONFIG="%SYSCONFDIR%"
+
+# Additional command line arguments to the dedicated server
+SERVERARGS=""
+
+
+# Whether to run the master server
+RUNMASTER="No"
+
+# Location of the master server config directory
+MASTERCONFIG="%SYSCONFDIR%"
+
+# What port should the masterserver use
+MASTERPORT="28787"
+
+# What ip should the masterserver bind to
+MASTERIP=""
diff --git a/games-fps/sauerbraten/files/sauerbraten.init b/games-fps/sauerbraten/files/sauerbraten.init
new file mode 100644
index 000000000000..a5a7bb32966d
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten.init
@@ -0,0 +1,74 @@
+#!/sbin/openrc-run
+
+depend() {
+ use net
+}
+
+start() {
+ [ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_master
+ [ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_server
+ true
+}
+
+start_server() {
+ ebegin "Starting Sauerbraten dedicated server"
+
+ # Make sure necessary parameters are set
+ SERVERCONFIG="${SERVERCONFIG:-%SYSCONFDIR%}"
+
+ if [ ! -d ${SERVERCONFIG} ]; then
+ einfo "No ${SERVERCONFIG} around. Creating new..."
+ mkdir ${SERVERCONFIG}
+ chown ${USER}:${GROUP} ${SERVERCONFIG}
+ fi
+
+ start-stop-daemon \
+ --quiet --start --user ${USER}:${GROUP} --chdir ${SERVERCONFIG} \
+ --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid \
+ --background --exec %LIBEXECDIR%/sauer_server -- ${SERVERARGS}
+ eend $?
+}
+
+start_master() {
+ ebegin "Starting Sauerbraten master server"
+
+ # Make sure necessary parameters are set
+ MASTERCONFIG="${MASTERCONFIG:-%SYSCONFDIR%}"
+ [ -n "${MASTERIP}" ] && MASTERPORT="${MASTERPORT:-28787}"
+ MASTERARGS="${MASTERCONFIG}/ ${MASTERPORT} ${MASTERIP}"
+
+ if [ ! -d ${MASTERCONFIG} ]; then
+ einfo "No ${MASTERCONFIG} around. Creating new..."
+ mkdir ${MASTERCONFIG}
+ chown ${USER}:${GROUP} ${MASTERCONFIG}
+ fi
+
+ start-stop-daemon \
+ --quiet --start --user ${USER}:${GROUP} \
+ --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid \
+ --background --exec %LIBEXECDIR%/sauer_master -- ${MASTERARGS}
+ eend $?
+}
+
+stop() {
+ [ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_server
+ [ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_master
+ true
+}
+
+stop_server() {
+ ebegin "Stopping Sauerbraten dedicated server"
+ start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid
+ eend $?
+}
+
+stop_master() {
+ ebegin "Stopping Sauerbraten master server"
+ start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid
+ eend $?
+}
+
+restart() {
+ svc_stop
+ svc_start
+}
diff --git a/games-fps/sauerbraten/metadata.xml b/games-fps/sauerbraten/metadata.xml
new file mode 100644
index 000000000000..ee6f39587e0e
--- /dev/null
+++ b/games-fps/sauerbraten/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="server">Compile server support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sauerbraten</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild b/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild
new file mode 100644
index 000000000000..4bb7c3603b58
--- /dev/null
+++ b/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic gnome2-utils games
+
+EDITION="collect_edition"
+DESCRIPTION="Sauerbraten is a FOSS game engine (Cube 2) with freeware game data (Sauerbraten)"
+HOMEPAGE="http://sauerbraten.org/"
+SRC_URI="mirror://sourceforge/sauerbraten/sauerbraten/2013_02_03/sauerbraten_${PV//./_}_${EDITION}_linux.tar.bz2"
+
+LICENSE="ZLIB freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dedicated server"
+
+RDEPEND="
+ sys-libs/zlib
+ >=net-libs/enet-1.3.6:1.3
+ !dedicated? (
+ media-libs/libsdl[X,opengl]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-image[png,jpeg]
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11 )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ ecvs_clean
+ rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp}
+
+ # Patch makefile to use system enet instead of bundled
+ # respect CXXFLAGS, LDFLAGS
+ epatch "${FILESDIR}"/${P}-{system-enet,QA}.patch
+
+ # Fix links so they point to the correct directory
+ sed -i -e 's:docs/::' README.html || die
+}
+
+src_compile() {
+ use debug && append-cppflags -D_DEBUG
+ emake -C src master $(usex dedicated "server" "$(usex server "server client" "client")")
+}
+
+src_install() {
+ local LIBEXECDIR="${GAMES_PREFIX}/lib"
+ local DATADIR="${GAMES_DATADIR}/${PN}"
+ local STATEDIR="${GAMES_STATEDIR}/${PN}"
+
+ if ! use dedicated ; then
+ # Install the game data
+ insinto "${DATADIR}"
+ doins -r data packages
+
+ # Install the client executable
+ exeinto "${LIBEXECDIR}"
+ doexe src/sauer_client
+
+ # Install the client wrapper
+ games_make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}"
+
+ # Create menu entry
+ newicon -s 256 data/cube.png ${PN}.png
+ make_desktop_entry "${PN}-client" "Cube 2: Sauerbraten"
+ fi
+
+ # Install the server config files
+ insinto "${STATEDIR}"
+ doins "server-init.cfg"
+
+ # Install the server executables
+ exeinto "${LIBEXECDIR}"
+ doexe src/sauer_master
+ use dedicated || use server && doexe src/sauer_server
+
+ games_make_wrapper "${PN}-server" \
+ "${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}"
+ games_make_wrapper "${PN}-master" \
+ "${LIBEXECDIR}/sauer_master ${STATEDIR}"
+
+ # Install the server init script
+ keepdir "${GAMES_STATEDIR}/run/${PN}"
+ cp "${FILESDIR}"/${PN}.init "${T}" || die
+ sed -i \
+ -e "s:%SYSCONFDIR%:${STATEDIR}:g" \
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
+ -e "s:%GAMES_STATEDIR%:${GAMES_STATEDIR}:g" \
+ "${T}"/${PN}.init || die
+ newinitd "${T}"/${PN}.init ${PN}
+ cp "${FILESDIR}"/${PN}.conf "${T}" || die
+ sed -i \
+ -e "s:%SYSCONFDIR%:${STATEDIR}:g" \
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
+ -e "s:%GAMES_USER_DED%:${GAMES_USER_DED}:g" \
+ -e "s:%GAMES_GROUP%:${GAMES_GROUP}:g" \
+ "${T}"/${PN}.conf || die
+ newconfd "${T}"/${PN}.conf ${PN}
+
+ dodoc src/*.txt docs/dev/*.txt
+ dohtml -r README.html docs/*
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "If you plan to use map editor feature copy all map data from ${DATADIR}"
+ elog "to corresponding folder in your HOME/.${PN}"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/serious-sam-tfe-1_beta3 b/games-fps/serious-sam-tfe-1_beta3
deleted file mode 100644
index 5325a0a93c07..000000000000
--- a/games-fps/serious-sam-tfe-1_beta3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-util/loki_patch
-DESCRIPTION=Serious Sam: The First Encounter
-EAPI=5
-HOMEPAGE=http://www.croteam.com/ http://www.seriouszone.com/ http://icculus.org/betas/ssam/
-IUSE=alsa
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=LOKI-EULA
-PROPERTIES=interactive
-RDEPEND=>=media-libs/libsdl-1.2.15-r5[X,joystick,opengl,video,abi_x86_32(-)] virtual/opengl[abi_x86_32(-)] alsa? ( >=media-libs/libogg-1.3.1[abi_x86_32(-)] >=media-libs/libsdl-1.2.15-r5[alsa,sound,abi_x86_32(-)] >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)] ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://icculus.org/betas/ssam/ssam-tfe-lnx-beta1a.run http://icculus.org/updates/ssam/ssamtfe-beta1b.sh.bin http://icculus.org/updates/ssam/ssamtfe-beta2.sh.bin http://icculus.org/updates/ssam/ssamtfe-beta3.sh.bin
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=65f05e6629168fbabe24352ecedd0e01
diff --git a/games-fps/serious-sam-tfe/Manifest b/games-fps/serious-sam-tfe/Manifest
new file mode 100644
index 000000000000..8e8afac7b1bc
--- /dev/null
+++ b/games-fps/serious-sam-tfe/Manifest
@@ -0,0 +1,6 @@
+DIST ssam-tfe-lnx-beta1a.run 8802528 BLAKE2B 44704392f74d94236d550d178b40df8553292e4f835982eedcb9d11ec94600f71247168dda540b628cd2f2a1eb646d286662cce693cfeea1eb19ff80f25fa1bc SHA512 dfef0c34a6f96e296272a1e82a3ffeaa3fde4a7affc8290f6d1878e5c65855ec24ab57fe895b62795369acf11fdfbc93e47c8cfaf362d531fbccca9aadb8f0fc
+DIST ssamtfe-beta1b.sh.bin 1799399 BLAKE2B a32284317178ca56c0434c027366a607cfafdc231d040ce236ecf35f95e37244ef10dc858238db01d93f50a8df2694c071fce14435e2de289afeeb805a7cf09c SHA512 c7f416b2b21443c2092ebe8806757b59d19b286956f6c2ce74b77f9aaf4ec6a0ff3cd1db888bdb39cc8b427238c4a851c875bc9c9ec4733c82a557231391a346
+DIST ssamtfe-beta2.sh.bin 3083565 BLAKE2B 18938110be74e727fbd54f1e19caafb9bc234857b7c4c6e19daa7235141e688fe606d63992a8e4388a745f489aa7f56387778e0eed5db35d398168113238b883 SHA512 9e592d8c47d169738eb9b0c7c3ee4960fdf1f0427d53ed1d5918934ecd0fe0f81c34798de7410f971e36b7b11f7a569fdcb74136610bde0472d059c529c826c5
+DIST ssamtfe-beta3.sh.bin 3828409 BLAKE2B 1e6b14489f3e5bed922862f2c34d2e0b290fc39c47893c98a0b0a138c34977386d3ef94837fdb5d2cdea072895a330e9f09a40d729dfaa6eaaad03119d8d6428 SHA512 a3055cab0a5162358ae7696eac5613a344a3ab2a1369f3693e56647650f4d21ebc566ee99fb5f03885b4416aec830d93b00e838d9ebb8187924918b333b072a2
+EBUILD serious-sam-tfe-1_beta3.ebuild 3179 BLAKE2B 81e7a03584a13d07d86b8b6a23eff79ccc0288c4a0c0414d48f9a257908005044a366d892fad98b71777f5b9f3edcea60d57e6d47800b2d556c761f1c34a8ec1 SHA512 85a7f0571f2d7cf715a5902c88bec1de1095ae784c6ad2aef0a2080ab7eb73a374a18447ced56fb52f129e517fa9bc449f42a911f878fe651c42156444d877e9
+MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33
diff --git a/games-fps/serious-sam-tfe/metadata.xml b/games-fps/serious-sam-tfe/metadata.xml
new file mode 100644
index 000000000000..7a38bb900964
--- /dev/null
+++ b/games-fps/serious-sam-tfe/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/games-fps/serious-sam-tfe/serious-sam-tfe-1_beta3.ebuild b/games-fps/serious-sam-tfe/serious-sam-tfe-1_beta3.ebuild
new file mode 100644
index 000000000000..e42a75cfd668
--- /dev/null
+++ b/games-fps/serious-sam-tfe/serious-sam-tfe-1_beta3.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit cdrom eutils games unpacker
+
+MY_PN="ssamtfe"
+
+DESCRIPTION="Serious Sam: The First Encounter"
+HOMEPAGE="http://www.croteam.com/
+ http://www.seriouszone.com/
+ http://icculus.org/betas/ssam/"
+SRC_URI="http://icculus.org/betas/ssam/ssam-tfe-lnx-beta1a.run
+ http://icculus.org/updates/ssam/${MY_PN}-beta1b.sh.bin
+ http://icculus.org/updates/ssam/${MY_PN}-beta2.sh.bin
+ http://icculus.org/updates/ssam/${MY_PN}-beta3.sh.bin"
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="strip"
+IUSE="alsa"
+
+RDEPEND="
+ >=media-libs/libsdl-1.2.15-r5[X,joystick,opengl,video,abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]
+ alsa? (
+ >=media-libs/libogg-1.3.1[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r5[alsa,sound,abi_x86_32(-)]
+ >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
+ )
+"
+
+DEPEND="games-util/loki_patch"
+
+S=${WORKDIR}
+
+QA_TEXTRELS="
+opt/ssamtfe/Bin/libGame.so
+opt/ssamtfe/Bin/libEntities.so
+opt/ssamtfe/Bin/libamp11lib.so
+opt/ssamtfe/Bin/libShaders.so
+"
+
+QA_FLAGS_IGNORED="
+opt/ssamtfe/Bin/libEntities.so
+opt/ssamtfe/Bin/libGame.so
+opt/ssamtfe/Bin/libamp11lib.so
+opt/ssamtfe/Bin/libShaders.so
+opt/ssamtfe/Bin/ssam_lnxded
+opt/ssamtfe/Bin/ssam_lnxded.dynamic
+opt/ssamtfe/Bin/ssam_lnx.dynamic
+opt/ssamtfe/Bin/ssam_lnx
+"
+
+pkg_setup() {
+ games_pkg_setup
+
+ cdrom_get_cds "Install/1_00c.gro"
+}
+
+src_unpack() {
+ mkdir Mods Levels
+ unpack_makeself ssam-tfe-lnx-beta1a.run
+
+ # Copy files during unpack as the patches below apply to some of them
+ einfo "Copying from ${CDROM_ROOT}"
+ cp -r "${CDROM_ROOT}/Install"/* . || die "copy from CD failed"
+
+ nonfatal unpack ./SeriousSamPatch105_USA_linux.tar.bz2
+ unpack ./setupstuff.tar.gz
+ unpack ./bins.tar.bz2
+
+ # We need only runscript from bin/ directory
+ mv bin/${MY_PN} .
+ rm -r bin
+}
+
+src_prepare() {
+ # Apply the Icculus patches
+ local v
+ for v in 1b 2 3 ; do
+ echo "Unpacking version ${v}"
+ unpack_makeself "${MY_PN}-beta${v}.sh.bin"
+ loki_patch patch.dat . || die "loki patch ${v} failed"
+ rm patch.dat
+ done
+
+ # Remove unneeded files from Loki patches
+ rm -r bin
+
+ # Switch to dynamic executable - runs at sane speeds on modern hardware
+ sed -i -e 's;exec "./ssam_lnx";exec "./ssam_lnx.dynamic";' ${MY_PN} \
+ || die "dynamic binary update failed"
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/${MY_PN}
+
+ # Remove bundled libs
+ rm Bin/{libogg,libvorbis,libvorbisfile}.so
+
+ # Remove unneeded files
+ rm *.{bin,bz2,cab,exe,ex_,ini,gz,sh}
+ rm -r data setup* Players Temp
+
+ # Install icon
+ newicon ssam.xpm ${MY_PN}.xpm
+
+ # Install documentation
+ dodoc README*
+
+ # Install all other files
+ insinto "${dir}"
+ doins -r *
+
+ # Install executables and wrapper script
+ exeinto "${dir}"
+ doexe ${MY_PN}
+ exeinto "${dir}"/Bin
+ doexe Bin/ssam_lnx*
+
+ games_make_wrapper ${MY_PN} ./${MY_PN} "${dir}" "${dir}"
+ make_desktop_entry ${MY_PN} "Serious Sam - First Encounter" ${MY_PN}
+
+ # Ensure that file datestamps from the CD are sane
+ find "${D}/${dir}" -exec touch '{}' \;
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "The warning regarding 'XiG-SUNDRY-NONSTANDARD missing' is harmless"
+ echo
+}
diff --git a/games-fps/serious-sam-tse-1_beta1-r1 b/games-fps/serious-sam-tse-1_beta1-r1
deleted file mode 100644
index 520dbb8bc15e..000000000000
--- a/games-fps/serious-sam-tse-1_beta1-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=install postinst prepare setup unpack
-DEPEND=>=app-arch/unshield-0.6
-DESCRIPTION=Serious Sam: The Second Encounter
-EAPI=6
-HOMEPAGE=http://www.croteam.com/ http://www.seriouszone.com/
-IUSE=alsa
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=LOKI-EULA
-PROPERTIES=interactive
-RDEPEND=>=media-libs/libogg-1.3.1[abi_x86_32(-)] >=media-libs/libsdl-1.2.15-r5[X,joystick,opengl,video,abi_x86_32(-)] virtual/opengl[abi_x86_32(-)] alsa? ( >=media-libs/libsdl-1.2.15-r5[alsa,sound,abi_x86_32(-)] >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)] )
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://icculus.org/betas/ssam/ssamtse-beta1.sh.bin
-_eclasses_=cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=75b4ff4010338c10a5ebd51089ef84a0
diff --git a/games-fps/serious-sam-tse/Manifest b/games-fps/serious-sam-tse/Manifest
new file mode 100644
index 000000000000..8a4c991a0a41
--- /dev/null
+++ b/games-fps/serious-sam-tse/Manifest
@@ -0,0 +1,3 @@
+DIST ssamtse-beta1.sh.bin 7952607 BLAKE2B 775c5f22b5c2d8418e69a6ac9d8e46f7f3d958108900ca0bc2135a889b4ee34d4d6528b2dfbe1de343fc8cd28af3f0d86cc764014875d8bb4d7a32ee55f361ea SHA512 43f07fbaef0bf8f90644a748931220331ed5f9179412e5a37daf0472aa98c5bb2455148c54254eae1af0b38ba8a3fde9c310cd8d488ea6b2806fa0f6fb1e1644
+EBUILD serious-sam-tse-1_beta1-r1.ebuild 4698 BLAKE2B 9632ec11724b4e81e05225cf680201f44513ab3725d7e6d70e21ba9a2fe8f245627c03a8a0ccacb6aec7e19df385980e1e47d86216791b641440a173bac153aa SHA512 f9d5b86d18d3cd1257ad087445a0bd45c088fd0376a367e89aa3c1236d3d7fe29929cfb4945dcf2dcfe126faf37635295263f688a185fdf514ef47b8a172c571
+MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33
diff --git a/games-fps/serious-sam-tse/metadata.xml b/games-fps/serious-sam-tse/metadata.xml
new file mode 100644
index 000000000000..7a38bb900964
--- /dev/null
+++ b/games-fps/serious-sam-tse/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/games-fps/serious-sam-tse/serious-sam-tse-1_beta1-r1.ebuild b/games-fps/serious-sam-tse/serious-sam-tse-1_beta1-r1.ebuild
new file mode 100644
index 000000000000..f2ebf0bb2038
--- /dev/null
+++ b/games-fps/serious-sam-tse/serious-sam-tse-1_beta1-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cdrom eutils versionator unpacker
+
+# MY_PV will be e.g. "beta1"
+MY_PN="ssamtse"
+MY_PV=$(get_version_component_range 2-2)
+
+DESCRIPTION="Serious Sam: The Second Encounter"
+HOMEPAGE="http://www.croteam.com/
+ http://www.seriouszone.com/"
+SRC_URI="http://icculus.org/betas/ssam/${MY_PN}-${MY_PV}.sh.bin"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="strip"
+IUSE="alsa"
+
+DEPEND=">=app-arch/unshield-0.6"
+RDEPEND="
+ >=media-libs/libogg-1.3.1[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r5[X,joystick,opengl,video,abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]
+ alsa? (
+ >=media-libs/libsdl-1.2.15-r5[alsa,sound,abi_x86_32(-)]
+ >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
+ )
+"
+
+S=${WORKDIR}
+
+QA_TEXTRELS="
+opt/ssamtse/Bin/libEntitiesMP.so
+opt/ssamtse/Bin/libGameMP.so
+opt/ssamtse/Bin/libamp11lib.so
+opt/ssamtse/Bin/libShaders.so
+"
+
+QA_FLAGS_IGNORED="
+opt/ssamtse/Bin/libEntitiesMP.so
+opt/ssamtse/Bin/libGameMP.so
+opt/ssamtse/Bin/libamp11lib.so
+opt/ssamtse/Bin/libShaders.so
+opt/ssamtse/Bin/ssam_lnxded
+opt/ssamtse/Bin/ssam_lnxded.dynamic
+opt/ssamtse/Bin/ssam_lnx.dynamic
+opt/ssamtse/Bin/ssam_lnx
+"
+
+pkg_setup() {
+ cdrom_get_cds "Install/SE1_00.gro"
+}
+
+src_unpack() {
+ mkdir Levels Mods
+
+ unpack_makeself "${MY_PN}-${MY_PV}.sh.bin"
+ unpack ./setupstuff.tar.gz
+ unpack ./bins.tar.bz2
+}
+
+src_prepare() {
+ # Switch to dynamic executable - runs at sane speeds on modern hardware
+ sed -i -e 's;exec "./ssam_lnx";exec "./ssam_lnx.dynamic";' bin/${MY_PN} \
+ || die "dynamic binary update failed"
+}
+
+src_install() {
+ local dir="/opt/${MY_PN}"
+
+ # Remove bundled libs
+ rm -f Bin/{libogg.so,libvorbis.so,libvorbisfile.so} || die "failed to remove bundled libs"
+
+ einfo "Copying from ${CDROM_ROOT}"
+ insinto "${dir}"
+ doins -r "${CDROM_ROOT}"/Install/* || die "doins CD failed"
+
+ # Correct paths of copied resource files
+ mv "${D}/${dir}"/Locales/eng/Controls/* "${D}/${dir}"/Controls/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Data/Var/* "${D}/${dir}"/Data/Var/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Demos/* "${D}/${dir}"/Demos/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Help/* "${D}/${dir}"/Help/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Mods/Warped/Scripts/Addons/WarpedTweak.des "${D}/${dir}"/Mods/Warped/Scripts/Addons/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Mods/Warped/Readme.html "${D}/${dir}"/Mods/Warped/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Mods/*.des "${D}/${dir}"/Mods/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Scripts/Addons/* "${D}/${dir}"/Scripts/Addons/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Scripts/CustomOptions/* "${D}/${dir}"/Scripts/CustomOptions/ || die "Failed to move file"
+ mv "${D}/${dir}"/Locales/eng/Scripts/NetSettings/* "${D}/${dir}"/Scripts/NetSettings/ || die "Failed to move file"
+ rm -rf "${D}/${dir}"/Locales || die "failed to removed Locales dir"
+
+ # The data CABs contain optional multiplayer maps in the "Levels" directory
+ einfo "Extracting additional levels"
+ unshield x "${D}/${dir}"/data1.cab >/dev/null || die "unshield data1.cab failed"
+ rm "${D}/${dir}"/data?.cab || die "Failed to remove cab"
+
+ # Correct paths of extracted levels
+ mv Levels/Levels/LevelsMP/* Levels/LevelsMP/ || die "Failed to move file"
+ rm -rf Levels/Levels || die "Failed to remove dir"
+ mv Levels/LevelsMP/Technology/* Levels/ || die "Failed to move file"
+ rmdir Levels/LevelsMP/Technology || die "Failed to remove dir"
+ mv Levels/Mods/Warped/ Mods/ || die "Failed to move file"
+ rmdir Levels/Mods/ || die "Failed to remove dir"
+
+ doins -r Bin Data Levels Mods *.txt README* \
+ || die "doins main failed"
+
+ # Install bins last to ensure they are marked executable
+ exeinto "${dir}"
+ doexe bin/${MY_PN}
+ exeinto "${dir}"/Bin
+ doexe Bin/{ssam_lnx*,*.so}
+
+ # Remove useless Windows files
+ rm -rf "${D}/${dir}/Bin"/{*.exe,*.dll,*.DLL,GameSpy} || die "Failed to remove windows cruft"
+ rm -f "${D}/${dir}"/{*.exe,*.ex_,*.bmp,*.inx,*.hdr,*.bin} || die "Failed to remove windows cruft"
+
+ dodoc README.linux
+
+ newicon ssam.xpm ${MY_PN}.xpm
+ make_wrapper ${MY_PN} ./${MY_PN} "${dir}" "${dir}"
+ make_desktop_entry ${MY_PN} "Serious Sam - Second Encounter" ${MY_PN}
+
+ # Ensure that file datestamps from the CD are sane
+ find "${D}/${dir}" -exec touch '{}' \; || die "touch failed"
+}
+
+pkg_postinst() {
+ elog "The warning regarding 'XiG-SUNDRY-NONSTANDARD missing' is harmless."
+ elog "Important information about the Linux port is at:"
+ elog " http://files.seriouszone.com/download.php?fileid=616"
+ echo
+}
diff --git a/games-fps/soldieroffortune-1.06a-r1 b/games-fps/soldieroffortune-1.06a-r1
deleted file mode 100644
index ff1c828fe965..000000000000
--- a/games-fps/soldieroffortune-1.06a-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup unpack
-DEPEND=games-util/loki_patch
-DESCRIPTION=First-person shooter based on the mercenary trade
-EAPI=5
-HOMEPAGE=http://www.lokigames.com/products/sof/
-KEYWORDS=~amd64 ~x86
-LICENSE=LOKI-EULA
-PROPERTIES=interactive
-RDEPEND=sys-libs/glibc amd64? ( sys-libs/glibc[multilib] ) virtual/opengl[abi_x86_32(-)] media-libs/libsdl[X,opengl,sound,abi_x86_32(-)] x11-libs/libXrender[abi_x86_32(-)] x11-libs/libXrandr[abi_x86_32(-)] media-libs/smpeg[abi_x86_32(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://lokigames/sof/sof-1.06a-cdrom-x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=67072d9e842a580585df909382e9b4f6
diff --git a/games-fps/soldieroffortune-demo-0.57-r1 b/games-fps/soldieroffortune-demo-0.57-r1
deleted file mode 100644
index 527c35126649..000000000000
--- a/games-fps/soldieroffortune-demo-0.57-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-util/loki_patch
-DESCRIPTION=First-person shooter based on the mercenary trade
-EAPI=5
-HOMEPAGE=http://www.lokigames.com/products/sof/
-KEYWORDS=~amd64 ~x86
-LICENSE=LOKI-EULA
-RDEPEND=virtual/opengl[abi_x86_32(-)] media-libs/libsdl[X,opengl,sound,abi_x86_32(-)] x11-libs/libXrender[abi_x86_32(-)] x11-libs/libXrandr[abi_x86_32(-)] x11-libs/libXcursor[abi_x86_32(-)] media-libs/smpeg[abi_x86_32(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://lokigames/loki_demos/sof-demo.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=42a8d005d14fd67e8bba0d2987d4635a
diff --git a/games-fps/soldieroffortune-demo/Manifest b/games-fps/soldieroffortune-demo/Manifest
new file mode 100644
index 000000000000..5a72cd4fe63a
--- /dev/null
+++ b/games-fps/soldieroffortune-demo/Manifest
@@ -0,0 +1,3 @@
+DIST sof-demo.run 92496052 BLAKE2B 6aded47641d13eb8438d5bf4f7d4df2b8e46dbb9a14c31d02ac8adade6b2ea1063bca0f8c0a712df3f078b413e655a5d8bd50f1ff7d7d01270e50387f3a70b9a SHA512 d285cffe5ed9017409737120d63f1bb14a4ae2f54a83bc2b4d838e82440f43fe430ea63b7765496121633e6fbf40053fe2c5bbda37e48e6da8b18aaa2ff540a6
+EBUILD soldieroffortune-demo-0.57-r1.ebuild 1684 BLAKE2B 753951e650603498822cbc235854fe5fd727df0e3905229da4515903e7fd0997740ccc4328cd40093e7f17f2692d555ff3fbb159d3c93966f8a35e6fc87be95f SHA512 3103f38c6ccb19bc47f5a0b5cf0d75cd587ba5cec16ba82b4b8e25ef87b506cb8d4ec6bc11af07bf21661175b61c08a0d19ca6c3546ac464a49bc185b496dc58
+MISC metadata.xml 766 BLAKE2B aacf0ceb3d8e12b603920615dd71be310538f5e3cd31dd31a9c30d889a2234805dea8d296958d1808abadaf28033ecb82da07bd50deaebfc4e7dd06f6a22e6a4 SHA512 6033ad956b8814ed58beb37af9f197abd0f9ea3c3e52ece7cca26c2f300035870952f4f9ed6e717c977b7224fc043e8836b1463e9c899dc5026006778e7c410a
diff --git a/games-fps/soldieroffortune-demo/metadata.xml b/games-fps/soldieroffortune-demo/metadata.xml
new file mode 100644
index 000000000000..0ea4bdc912f5
--- /dev/null
+++ b/games-fps/soldieroffortune-demo/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Soldier of Fortune is a first-person 3-D shooter based on the mercenary trade. You play as John, an ex-military mercinary who still has plenty of good friends on the inside. For a wad of bucks, you'll do the job -- no cares, no worries. Just get the gun, play for keeps, get paid, on to the next one -- that's your life. That's what you do. And you're good at it, one of the best even. But now is the time for your biggest challenge ever. This is the demo version of the game.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild b/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
new file mode 100644
index 000000000000..91362dc07442
--- /dev/null
+++ b/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_PN=${PN/soldieroffortune/sof}
+
+DESCRIPTION="First-person shooter based on the mercenary trade"
+HOMEPAGE="http://www.lokigames.com/products/sof/"
+SRC_URI="mirror://lokigames/loki_demos/${MY_PN}.run"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="games-util/loki_patch"
+RDEPEND="virtual/opengl[abi_x86_32(-)]
+ media-libs/libsdl[X,opengl,sound,abi_x86_32(-)]
+ x11-libs/libXrender[abi_x86_32(-)]
+ x11-libs/libXrandr[abi_x86_32(-)]
+ x11-libs/libXcursor[abi_x86_32(-)]
+ media-libs/smpeg[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/* ${dir:1}/base/*so"
+
+src_install() {
+ local demo="data/demos/sof_demo"
+ local exe="sof-bin.x86"
+
+ loki_patch patch.dat data/ || die
+
+ insinto "${dir}"
+ exeinto "${dir}"
+ doins -r "${demo}"/*
+ doexe "${demo}/${exe}"
+
+ # Replace bad library
+ dosym /usr/$(use amd64 && echo lib32 || echo lib)/libSDL.so "${dir}"/libSDL-1.1.so.0
+
+ games_make_wrapper ${PN} "./${exe}" "${dir}" "${dir}"
+
+ # fix buffer overflow
+ sed -i \
+ -e '/^exec/i \
+export MESA_EXTENSION_MAX_YEAR=2003 \
+export __GL_ExtensionStringVersion=17700' "${ED}"${GAMES_BINDIR}/${PN} || die
+
+ newicon "${demo}"/launch/box.png ${PN}.png
+ make_desktop_entry ${PN} "Soldier of Fortune (Demo)"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "This game requires OSS sound device /dev/dsp ; make sure the module"
+ ewarn "snd_pcm_oss is loaded and/or built into your kernel or there will be no sound"
+ elog
+ elog "Run '${PN}' to start the game"
+}
diff --git a/games-fps/soldieroffortune/Manifest b/games-fps/soldieroffortune/Manifest
new file mode 100644
index 000000000000..d62e537d805e
--- /dev/null
+++ b/games-fps/soldieroffortune/Manifest
@@ -0,0 +1,3 @@
+DIST sof-1.06a-cdrom-x86.run 22928437 BLAKE2B f76f605af08a19b77548455c0101e03aca7cae69462914e47911da2fadd6d4f3b766e1069556ead0d06c757b179ae2e8105e76ea37852f17796b47b4712aec87 SHA512 91ef3953bd6b6630ab602f64d15a3056f85d90139b18aa3eb9a9a0a75db2ece61ef683ddf1d03b63f0dfc902d7a27914ae673398713941f281e96555d9645078
+EBUILD soldieroffortune-1.06a-r1.ebuild 2098 BLAKE2B 0e1be93ed8fbf27b6024cc3cdfb89bbbc69d2f1b5f0c6d9d91728e61b9e4c1d169be3530378c65b83b2136f4fab7a19bc278b527a95f41e0dac9f2ead89fbe23 SHA512 afe8941cdab0a3235f95e99a570f58944123c0b49cddc466ab857f0455c1bdf1b01e36d04ea83d51fcb3649cafc80d3312e2db07356066d26f910912843b7f06
+MISC metadata.xml 963 BLAKE2B 3e6d4e2bf56378a5b2db55c5ce7ac3505a2b14a75ef00b409aa37b31d79b190284bbedd1206f9df78922844d583d947dc064ed272444ea77941b8e48dc82dd94 SHA512 59c285b27116238b779238f0179124a2ef1eefca76ae20a84f65ea8850548228dd540ba90b856dafccdd489f911beabb7b2b0a1fa4630562c995f845421f4895
diff --git a/games-fps/soldieroffortune/metadata.xml b/games-fps/soldieroffortune/metadata.xml
new file mode 100644
index 000000000000..dc508d82ecaa
--- /dev/null
+++ b/games-fps/soldieroffortune/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Soldier of Fortune is a first-person 3-D shooter based on the mercenary trade. You play as John, an ex-military mercinary who still has plenty of good friends on the inside. For a wad of bucks, you'll do the job -- no cares, no worries. Just get the gun, play for keeps, get paid, on to the next one -- that's your life. That's what you do. And you're good at it, one of the best even. But now is the time for your biggest challenge ever. The game was ported to Linux by the now defunct Loki Entertainment and is commercial software. You can still pick up a copy from Tuxgames (http://www.tuxgames.com), but supplies are limited, as the publisher is no longer in business.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/soldieroffortune/soldieroffortune-1.06a-r1.ebuild b/games-fps/soldieroffortune/soldieroffortune-1.06a-r1.ebuild
new file mode 100644
index 000000000000..a9cfb2fbe14c
--- /dev/null
+++ b/games-fps/soldieroffortune/soldieroffortune-1.06a-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit check-reqs eutils unpacker cdrom games
+
+DESCRIPTION="First-person shooter based on the mercenary trade"
+HOMEPAGE="http://www.lokigames.com/products/sof/"
+SRC_URI="mirror://lokigames/sof/sof-${PV}-cdrom-x86.run"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="strip"
+IUSE=""
+
+DEPEND="games-util/loki_patch"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ virtual/opengl[abi_x86_32(-)]
+ media-libs/libsdl[X,opengl,sound,abi_x86_32(-)]
+ x11-libs/libXrender[abi_x86_32(-)]
+ x11-libs/libXrandr[abi_x86_32(-)]
+ media-libs/smpeg[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${ED}/${dir}
+unpackDir=${T}/unpack
+
+CHECKREQS_DISK_BUILD="1450M"
+CHECKREQS_DISK_USR="725M"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+}
+
+src_unpack() {
+ cdrom_get_cds sof.xpm
+ unpack_makeself
+ mkdir ${unpackDir} || die
+ tar xzf "${CDROM_ROOT}"/paks.tar.gz -C "${unpackDir}" || die
+ tar xzf "${CDROM_ROOT}"/binaries.tar.gz -C "${unpackDir}" || die
+}
+
+src_install() {
+ einfo "Copying files... this may take a while..."
+ exeinto "${dir}"
+ doexe "${CDROM_ROOT}"/bin/x86/glibc-2.1/sof
+ insinto "${dir}"
+ doins -r "${unpackDir}"/*
+ doins "${CDROM_ROOT}"/{README,kver.pub,sof.xpm}
+
+ cd "${S}"
+ export _POSIX2_VERSION=199209
+ loki_patch --verify patch.dat
+ loki_patch patch.dat "${Ddir}" >& /dev/null || die
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' +
+
+ games_make_wrapper sof ./sof "${dir}" "${dir}"
+
+ # fix buffer overflow
+ sed -i -e '/^exec/i \
+export MESA_EXTENSION_MAX_YEAR=2003 \
+export __GL_ExtensionStringVersion=17700' \
+ "${ED}/${GAMES_BINDIR}/sof" || die
+
+ doicon "${CDROM_ROOT}"/sof.xpm
+ make_desktop_entry sof "Soldier of Fortune" sof
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play the game run:"
+ elog " sof"
+}
diff --git a/games-fps/tenebrae-1.04-r1 b/games-fps/tenebrae-1.04-r1
deleted file mode 100644
index 079446f398da..000000000000
--- a/games-fps/tenebrae-1.04-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=virtual/glu virtual/opengl media-libs/libpng:0 x11-libs/libXxf86dga x11-libs/libXxf86vm app-arch/unzip x11-base/xorg-proto
-DESCRIPTION=adds stencil shadows and per pixel lights to quake
-EAPI=6
-HOMEPAGE=http://tenebrae.sourceforge.net/
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=virtual/glu virtual/opengl media-libs/libpng:0 x11-libs/libXxf86dga x11-libs/libXxf86vm
-SLOT=0
-SRC_URI=mirror://sourceforge/tenebrae/tenebraedata.zip mirror://gentoo/tenebrae-1.04.tbz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=beed7e7093433efa5df654731a2e5391
diff --git a/games-fps/tenebrae/Manifest b/games-fps/tenebrae/Manifest
new file mode 100644
index 000000000000..fea075644218
--- /dev/null
+++ b/games-fps/tenebrae/Manifest
@@ -0,0 +1,7 @@
+AUX 1.04-glhax.patch 1086 BLAKE2B 10e1ac1e10070c23deada452c6b4d69fac860e8cedbf80d317cf0c28d5316e50c2f59c815dea8bf366e41c8181dc801e9f0c6dec4e32851fc3a9ab50b2740714 SHA512 6641a82ba17909aa3ab1d583595d45d0abb1ac34cb8997dc17d1bda736b6a07417276f6ec358b73c08f74d84ca9168e76ed224d2d5220ec773f4a2077dd09800
+AUX tenebrae-1.04-exec-stack.patch 658 BLAKE2B 0b6dc3dd385f3bb7d00748e7c32c3e2ec135359427b4766c27314056fc2cdcf657018be05c04d95b6ac53ccb86da8a56b8b59624e50df9d73a44bb2d7fcc0b29 SHA512 d3b6c712f79612265a31eaeccae3b9688bcfb7916be34e1b9dc6e698c33750f82b323fa51cb09768546c3cdf55bc80fadf0cbc46d4e478ca126ac4124fa06765
+AUX tenebrae-1.04-redef.patch 393 BLAKE2B 3ea2d06e37dc2a33a8766de606480b027f0d4d6334410d551cdf44d817424f72fccaa7d44e97d8ca1bf36e47aa515a2511a9b495d0494353715a086a0b706cba SHA512 57f63560f3cdf3f0070954109f753cad5ace8828d5f81dc87044a37ac2144594e6bca68d12de186077349c9f42ea17bacbf32a2481216be79569e27bfe1065a6
+DIST tenebrae-1.04.tbz2 625988 BLAKE2B f6eebd483c9dc7d4df3484e6dc55cde6d4d6166c029ff73133217d36c8064175e57bc1a3578f6119884f2d4d471cf717902b490c9a308ea38414c60d1d0a1909 SHA512 f74d1dcaf5b29fcc047f93e4c99c8b5264751c5687370ba4605cad76f85fe346e0e17a6546b8766acedabf23fed69d6894dda6499c854ef0736dddeddc89e18e
+DIST tenebraedata.zip 3989498 BLAKE2B 3f78240c0c3be4b265f4d8d1fc53f0ed331b01097afdb77c1146eef667330ae7ce8965a12a974ee23133a183e3dd92d39de320937cab2fcf10659d1d97f5162a SHA512 c69e8e18ab0c7d10b5e1c9ad3b396b0906302e6d75c0969d8c2b513df0a11b410de86736a67632378bf28d564c04c3e937f164cb3850742e183616ddc8ac4742
+EBUILD tenebrae-1.04-r1.ebuild 1503 BLAKE2B 85579ddab05c2ba454ee844b6753c2fa5e0b7c2073a62768d6f04d12d0ac6b103a6dfaa3b3c7d30fa3a3f016c00387b4c5d9e3e5bb566b5e6b3a0bb2e878fd91 SHA512 814ed0cdd765a5030392e3d0dd4928ed13e558901153c8d3bb0b70ad2147a58d6b7fae33d87c5e0d3ac67fa302c3f350b1e7603805eedcb5a9d9cd96fd9f21ac
+MISC metadata.xml 709 BLAKE2B 65e253236ac1af184022f0f648cc38781ec78bd5c8d75134bfb238fab26cc299d2f82beb5d31c90196c564ff3799260444430658128ddf2754c68b6a62bc0da7 SHA512 15881aa13e08c8803a638ff40c022871116ffdd6de8141b149433d09c98055163f0661aa299ad041215612fe2ea149a5e04e44dbb1afb1de18a53cadcd196107
diff --git a/games-fps/tenebrae/files/1.04-glhax.patch b/games-fps/tenebrae/files/1.04-glhax.patch
new file mode 100644
index 000000000000..a185d8e10c7d
--- /dev/null
+++ b/games-fps/tenebrae/files/1.04-glhax.patch
@@ -0,0 +1,32 @@
+--- tenebrae_0/glquake.h 2004-12-25 00:28:28.707288592 -0500
++++ tenebrae_0/glquake.h 2004-12-25 00:27:35.000000000 -0500
+@@ -34,6 +34,7 @@
+ #else
+ #include <GL/gl.h>
+ #include <GL/glu.h>
++#include <GL/glext.h>
+ #endif /* __APPLE__ ||ÊMACOSX */
+
+ /* use the correct dynamic function address binder */
+@@ -420,8 +421,10 @@
+ void GL_Bind (int texnum);
+
+ #ifndef _WIN32
++#ifndef APIENTRY
+ #define APIENTRY /* */
+ #endif
++#endif
+
+ #if !defined (__APPLE__) && !defined (MACOSX)
+
+@@ -1134,8 +1137,10 @@
+ // <AWE> There are some diffs with the function parameters. wgl stuff not present with MacOS X. -DC- and SDL
+ #if defined (__APPLE__) || defined (MACOSX) || defined(SDL) || defined (__glx__)
+
++#ifndef GL_APPLE_vertex_array_range
+ typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, const GLvoid *pointer);
+ typedef void (APIENTRY * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei size, const GLvoid *pointer);
++#endif
+
+ extern PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC qglFlushVertexArrayRangeAPPLE;
+ extern PFNGLVERTEXARRAYRANGEAPPLEPROC qglVertexArrayRangeAPPLE;
diff --git a/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch b/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch
new file mode 100644
index 000000000000..abc8bd4a2b87
--- /dev/null
+++ b/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch
@@ -0,0 +1,36 @@
+--- a/math.s
++++ b/math.s
+@@ -416,3 +416,6 @@
+ call C(BOPS_Error)
+
+ #endif // id386
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/snd_mixa.s
++++ b/snd_mixa.s
+@@ -216,3 +216,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/sys_dosa.s
++++ b/sys_dosa.s
+@@ -93,3 +93,6 @@
+
+ ret
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/worlda.s
++++ b/worlda.s
+@@ -142,3 +142,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/games-fps/tenebrae/files/tenebrae-1.04-redef.patch b/games-fps/tenebrae/files/tenebrae-1.04-redef.patch
new file mode 100644
index 000000000000..8bd89aa18e6f
--- /dev/null
+++ b/games-fps/tenebrae/files/tenebrae-1.04-redef.patch
@@ -0,0 +1,19 @@
+--- a/sys_dosa.s 2017-09-06 16:41:31.875358788 -0500
++++ b/sys_dosa.s 2017-09-06 16:41:35.947376646 -0500
+@@ -44,6 +44,8 @@
+
+ .text
+
++// Falls back to an empty stub on non-i386, in sys_linux.c
++#if id386
+ .globl C(Sys_LowFPPrecision)
+ C(Sys_LowFPPrecision):
+ fldcw single_cw
+@@ -55,6 +57,7 @@
+ fldcw full_cw
+
+ ret
++#endif
+
+ .globl C(Sys_PushFPCW_SetHigh)
+ C(Sys_PushFPCW_SetHigh):
diff --git a/games-fps/tenebrae/metadata.xml b/games-fps/tenebrae/metadata.xml
new file mode 100644
index 000000000000..04edb8b61c7e
--- /dev/null
+++ b/games-fps/tenebrae/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+Tenebrae is a modification of the quake source that adds stencil shadows
+and per pixel lights to quake. Stencil shadows allow for realistic
+shadow effects on every object in the game world. Per pixel lighting
+allows you to have fine surface details correctly lit. These are
+essentially the same algorithms as used by the new Doom game.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tenebrae</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/tenebrae/tenebrae-1.04-r1.ebuild b/games-fps/tenebrae/tenebrae-1.04-r1.ebuild
new file mode 100644
index 000000000000..85a7552e4015
--- /dev/null
+++ b/games-fps/tenebrae/tenebrae-1.04-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+#ECVS_SERVER="cvs.tenebrae.sourceforge.net:/cvsroot/tenebrae"
+#ECVS_MODULE="tenebrae_0"
+#inherit cvs
+inherit eutils
+
+DESCRIPTION="adds stencil shadows and per pixel lights to quake"
+HOMEPAGE="http://tenebrae.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tenebrae/tenebraedata.zip
+ mirror://gentoo/${P}.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ virtual/glu
+ virtual/opengl
+ media-libs/libpng:0
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-base/xorg-proto"
+
+S=${WORKDIR}
+
+src_unpack() {
+ if [[ -z ${ECVS_MODULE} ]] ; then
+ unpack ${A}
+ else
+ cvs_src_unpack
+ fi
+}
+
+src_prepare() {
+ cd tenebrae_0 || die "cd failed"
+
+ 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
+
+ eapply "${FILESDIR}"/${PV}-glhax.patch
+ eapply "${FILESDIR}"/${P}-exec-stack.patch
+ eapply "${FILESDIR}"/${P}-redef.patch
+
+ default
+
+ cd linux || die "cd failed"
+ sed \
+ -e "/^LDFLAGS/s:=:+=:" \
+ -e "s:-mpentiumpro -O6:${CFLAGS}:" \
+ Makefile.i386linux > Makefile || die
+}
+
+src_compile() {
+ cd "${S}"/tenebrae_0/linux || die "cd failed"
+ emake MASTER_DIR="/usr/share/quake1" build_release
+}
+
+src_install() {
+ newbin tenebrae_0/linux/release*/bin/tenebrae.run tenebrae
+ insinto "/usr/share/quake1/tenebrae"
+ doins "${WORKDIR}"/tenebrae/*
+ dodoc tenebrae_0/linux/README "${WORKDIR}"/Tenebrae_Readme.txt
+}
diff --git a/games-fps/transfusion-bin-1.01-r1 b/games-fps/transfusion-bin-1.01-r1
deleted file mode 100644
index fe3b636fbd79..000000000000
--- a/games-fps/transfusion-bin-1.01-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install
-DEPEND=sys-libs/glibc app-arch/unzip
-DESCRIPTION=Blood remake
-EAPI=6
-HOMEPAGE=http://www.transfusion-game.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/glibc
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/blood/transfusion-1.0-linux.i386.zip mirror://sourceforge/blood/transfusion-patch-1.01-linux.i386.zip mirror://gentoo/transfusion.png
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c123632b9e1261ee42b51ac516b3f2de
diff --git a/games-fps/transfusion-bin/Manifest b/games-fps/transfusion-bin/Manifest
new file mode 100644
index 000000000000..a2001e9c6689
--- /dev/null
+++ b/games-fps/transfusion-bin/Manifest
@@ -0,0 +1,6 @@
+AUX transfusion 65 BLAKE2B efad05a6cdbe57c12a95d57deafd67f9c377db323fe12f24dd0a16c2ff6cfaf762d223e6eb735225239268c205c799129caef30dfc496b26cd39f0ef1743c222 SHA512 28e217bcbd11d287319ddf17fb90d2e3f2779c1db378ca1ab21c7ab07966b80f3d6d23f25bdc2e6acd7147ce32d1ee8b9ef97bc6a93605509959cae1e90f689f
+DIST transfusion-1.0-linux.i386.zip 40532193 BLAKE2B 9b12f8d6ed91a1c31935f21a3094e186439159401411f3e1291381832dc09dcbc265113ed6df056109394b2c59ee9b556a7e16ebde6b001acd63a8854a58ebbe SHA512 cd4372e09ac6e3e4f1e2fe99afb18b1c5981c56dac84edd4d440be8914322984a377d4622e2b45719fead86d1b1c7f3ab74580430eba8b69bbe01702c8dbcafb
+DIST transfusion-patch-1.01-linux.i386.zip 8790776 BLAKE2B b8faa46a259a2f13f876540860b01b269a31969516b48901cf1e54c372e7db91f416f86af80b9a131e4bf2cb17cffc93dd04b50c1450f361601b3a048b8d2729 SHA512 b5d6b446be580ab09a79bdb651436de242603a7f215e85ab61ecc45d02739ca285a9a0bfaaf95c08df77f79928a42a27cace76a1695300d80172e2f4e9a488cf
+DIST transfusion.png 2102 BLAKE2B 5d062ee459ab8f309b35d07abdb63c442f30b98bb2cce6e55b23336e9ddf36f099f1d554a5ea0a76a3a1b1484a6559cf085e5e3d8aa27972c04d52bee3b7a701 SHA512 902c630c5f0956678a905760674be7c8bd0a4d72e217ca8cddd56681d0b1161051602bd7bf6e24cc25b6d99cf7c0e5a9802f8230eec7c6a9831aecd700838363
+EBUILD transfusion-bin-1.01-r1.ebuild 1146 BLAKE2B bb8b06f9c7ef1e01b2df467e1f740117044f563aa705b53d85c5fb452912d7a7cefa7e0b9e5e691c0e32eb22d5a10eb7c27890aa9c3405fed2f3c586500488f2 SHA512 2a71f2d5f854f621f076f8da8abfe9f24b0485017622c4ca8c6258c06c62b58bcef40fbc89d9f483bbc9ed188aa7c01774df49b32baf692a14028baf909ff083
+MISC metadata.xml 328 BLAKE2B be547572a9876be9ff3065dc5203ad70a0907c88ed8eafb48338a582bb28c9d417931b4243d673caee83ec0665963707bc00609fcda74259fe6ba3173f0ec32b SHA512 85e11b06989c540831ee3981820d63507c3a233014e73cb577089d599019de54db3bd52f4304623a5b81ae8dfacd7a6b9f59098865da0aff418cc79a46009f8d
diff --git a/games-fps/transfusion-bin/files/transfusion b/games-fps/transfusion-bin/files/transfusion
new file mode 100644
index 000000000000..316b16625997
--- /dev/null
+++ b/games-fps/transfusion-bin/files/transfusion
@@ -0,0 +1,2 @@
+#!/bin/sh
+cd GENTOO_DIR && exec ./transfusion-glx ${@} || exit 1
diff --git a/games-fps/transfusion-bin/metadata.xml b/games-fps/transfusion-bin/metadata.xml
new file mode 100644
index 000000000000..ca74fa8ae7a2
--- /dev/null
+++ b/games-fps/transfusion-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">blood</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/transfusion-bin/transfusion-bin-1.01-r1.ebuild b/games-fps/transfusion-bin/transfusion-bin-1.01-r1.ebuild
new file mode 100644
index 000000000000..a535a8e3f9c6
--- /dev/null
+++ b/games-fps/transfusion-bin/transfusion-bin-1.01-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+MY_PN="${PN/-bin/}"
+DESCRIPTION="Blood remake"
+HOMEPAGE="http://www.transfusion-game.com/"
+SRC_URI="mirror://sourceforge/blood/${MY_PN}-1.0-linux.i386.zip
+ mirror://sourceforge/blood/${MY_PN}-patch-${PV}-linux.i386.zip
+ mirror://gentoo/${MY_PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+RDEPEND="sys-libs/glibc"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/${MY_PN}"
+
+dir="/opt/${MY_PN}"
+Ddir="${D}/${dir}"
+
+src_install() {
+ # install everything that looks anything like docs...
+ dodoc ${MY_PN}/doc/*.txt ${MY_PN}/*txt qw/*txt
+ HTML_DOCS="${MY_PN}/doc/*.html" einstalldocs
+
+ #...then mass copy everything to the install dir...
+ dodir "${dir}"
+ cp -R * "${Ddir}" || die
+
+ # ...and remove the docs since we don't need them installed twice.
+ rm -rf \
+ "${Ddir}"/${MY_PN}/doc \
+ "${Ddir}"/qw/*txt \
+ "${Ddir}"/${MY_PN}/*txt
+
+ doicon "${DISTDIR}"/${MY_PN}.png
+ make_wrapper ${MY_PN} ./${MY_PN}-glx "${dir}" "${dir}"
+ make_desktop_entry ${MY_PN} "Transfusion" ${MY_PN}
+}
diff --git a/games-fps/tribes2-25034 b/games-fps/tribes2-25034
deleted file mode 100644
index c4023b954d7b..000000000000
--- a/games-fps/tribes2-25034
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=sys-libs/glibc games-util/loki_patch
-DESCRIPTION=Tribes 2 - Team Combat on an Epic Scale
-EAPI=5
-HOMEPAGE=http://www.lokigames.com/products/tribes2/
-KEYWORDS=-amd64 ~x86
-LICENSE=LOKI-EULA
-PROPERTIES=interactive
-RDEPEND=sys-libs/glibc games-util/loki_patch virtual/opengl games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://www.libsdl.org/projects/tribes2/release/tribes2-25034-cdrom-x86.run mirror://3dgamers/tribes2/tribes2-25034-cdrom-x86.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=dfa29ee226650165e704480f0e524231
diff --git a/games-fps/tribes2/Manifest b/games-fps/tribes2/Manifest
new file mode 100644
index 000000000000..5d06ddab1330
--- /dev/null
+++ b/games-fps/tribes2/Manifest
@@ -0,0 +1,3 @@
+DIST tribes2-25034-cdrom-x86.run 95560158 BLAKE2B a4516fddde83a8623348557983b3b5592c24108805da521d1b24bee21c06f8300ca812db8533855b70d924c59cf2bf417a771daa417c7f9b79e39f34a3611f98 SHA512 a3d2800af06d8659193ed1da4b9042af0924e1a0ade8a410aec31d66591efa2d2773aa12b33f7234975efee083974a77434bb1c0124bd57bfcc3be4898c46ad8
+EBUILD tribes2-25034.ebuild 2122 BLAKE2B 56abbd3c628f94595c2eb2415b8fd344f446bc71398f144bf3c092f7896f223ac0512315b83c2faef56fb9f9b7f9915505bcf8cd6d72387e2eaea330801ad344 SHA512 acfc53599d9754d526975641040b6cb520ffd7e2435eb0637df4a319d35db1900d76f4bc6c103f4e2dfeae8e67488bc0944384fa605978f51c4932f253d564db
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/tribes2/metadata.xml b/games-fps/tribes2/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/tribes2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/tribes2/tribes2-25034.ebuild b/games-fps/tribes2/tribes2-25034.ebuild
new file mode 100644
index 000000000000..817ede1c3913
--- /dev/null
+++ b/games-fps/tribes2/tribes2-25034.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Tribes 2 - Team Combat on an Epic Scale"
+HOMEPAGE="http://www.lokigames.com/products/tribes2/"
+SRC_URI="http://www.libsdl.org/projects/${PN}/release/${P}-cdrom-x86.run
+ mirror://3dgamers/${PN}/${P}-cdrom-x86.run"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+# This package is broken and doesn't patch right on AMD64. I've not taken the
+# time to try to figure it out but this definitely needs to stay -amd64 until
+# someone does fix the patching.
+KEYWORDS="-amd64 ~x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+DEPEND="sys-libs/glibc
+ games-util/loki_patch"
+RDEPEND="${DEPEND}
+ virtual/opengl"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+pkg_setup() {
+ games_pkg_setup
+ ewarn "The installed game takes about 507MB of space!"
+}
+
+src_unpack() {
+ cdrom_get_cds README.tribes2d
+ unpack_makeself
+}
+
+src_install() {
+ einfo "Copying files... this may take a while..."
+ exeinto "${dir}"
+ doexe "${CDROM_ROOT}"/bin/x86/glibc-2.1/{t2launch,tribes2,tribes2.dynamic,tribes2d,tribes2d-restart.sh,tribes2d.dynamic}
+
+ insinto "${dir}"
+ doins "${CDROM_ROOT}"/{README,README.tribes2d,Tribes2_Manual.pdf,console_start.cs,kver.pub} "${Ddir}"
+
+ # Video card profiles
+ # TODO: move this to src_unpack where it belongs.
+ tar xzf ${CDROM_ROOT}/profiles.tar.gz -C "${Ddir}" || die
+
+ # Base (Music, Textures, Maps, etc.)
+ doins -r ${CDROM_ROOT}/base ${CDROM_ROOT}/menu
+
+ cd "${S}"
+ loki_patch --verify patch.dat
+ loki_patch patch.dat "${Ddir}" >& /dev/null || die
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' +
+
+ newicon "${CDROM_ROOT}"/icon.xpm tribes2.xpm
+ games_make_wrapper t2launch ./t2launch "${dir}" "${dir}"
+ make_desktop_entry t2launch "Tribes 2" tribes2
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play the game run:"
+ elog " t2launch"
+}
diff --git a/games-fps/turtlearena-0.6.1-r1 b/games-fps/turtlearena-0.6.1-r1
deleted file mode 100644
index 334a45673fe3..000000000000
--- a/games-fps/turtlearena-0.6.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm preinst prepare
-DEPEND=sys-libs/zlib[minizip] !dedicated? ( media-libs/freetype:2 media-libs/libsdl[X,sound,joystick,opengl,video] virtual/jpeg:0 virtual/opengl curl? ( net-misc/curl ) openal? ( media-libs/openal ) theora? ( media-libs/libtheora ) voice? ( media-libs/speex mumble? ( media-sound/mumble ) ) vorbis? ( media-libs/libvorbis ) ) app-arch/unzip virtual/pkgconfig >=sys-apps/sed-4
-DESCRIPTION=A turtle featuring free and open source third-person action game (ioq3 engine)
-EAPI=6
-HOMEPAGE=http://ztm.x10host.com/ta/index.htm
-IUSE=+curl debug dedicated mumble openal server theora voice vorbis
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2+ CC-BY-SA-3.0 mplus-fonts lcc
-RDEPEND=sys-libs/zlib[minizip] !dedicated? ( media-libs/freetype:2 media-libs/libsdl[X,sound,joystick,opengl,video] virtual/jpeg:0 virtual/opengl curl? ( net-misc/curl ) openal? ( media-libs/openal ) theora? ( media-libs/libtheora ) voice? ( media-libs/speex mumble? ( media-sound/mumble ) ) vorbis? ( media-libs/libvorbis ) )
-SLOT=0
-SRC_URI=https://turtlearena.googlecode.com/files/turtlearena-0.6.1-0-src.tar.bz2 https://turtlearena.googlecode.com/files/turtlearena-0.6.1-0.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=6eaaba1a269e95c09d546a52adf842b2
diff --git a/games-fps/turtlearena/Manifest b/games-fps/turtlearena/Manifest
new file mode 100644
index 000000000000..4faeedd9fd50
--- /dev/null
+++ b/games-fps/turtlearena/Manifest
@@ -0,0 +1,6 @@
+AUX turtlearena-0.6.1-build.patch 6401 BLAKE2B e69fda1f38253fcc4ae3a541624dbe365a217a026c384abee27abaddb97cec1da37b57f004c14af744e0274a9fba91c4157aab5b42f772c9a09cc3c85bbb15df SHA512 c072ef951b86872a45ae6b5a8732921859605a30d00fe1c64e1c275b88d7f146f3f1435c34365907b926048d3391fbea2841228f0001dc4c249202c07aedcd4c
+AUX turtlearena-0.6.1-freetype.patch 451 BLAKE2B 33c2f46261d75149e2151bfd38a4c4f895579c374924c08ee0ae64ef27a6cf5274a00dd4aad6a3ee4ed3885f63ee0e1475fb45226f33eb43f4b591d63564099a SHA512 cc16c0a69b77627956254b000a4b42e77f57f7d073488c0dde3c0b155e01288aaba958fc16d932550200add0b5429afb10f15c3e23a22d874fe31014ebe090a1
+DIST turtlearena-0.6.1-0-src.tar.bz2 33355448 BLAKE2B 492eafd29e60a2528d11c91a6c48d8cad4a47718d7aa52c7241590b4e758cc65b76c5eea08b92f16db2eb8feff83d8484c9bd9b02015c1af575309cd92635014 SHA512 aa11f66a9ec584226267d34ecd637245a068c3c13ffc49fe0ff1ca16699b3eebf6435255ad68b953fbf02f25c807833830eb76497d53bcff977814e87b804edf
+DIST turtlearena-0.6.1-0.zip 73713016 BLAKE2B 346222691553122814d92ea42bac3f21e39de499d019c92813d8769690540da5257c52b673ac17440f2fb6819ded6221e19fb0cba67c9d7ad9539dbfc4eeb7b8 SHA512 83c96e572687bbdc6183393d21435806b1032295156c1905d82b300bcb6e00a34cd247731f6958e65f085c4c022fc52195313bc0f44edc7a726f04367483a378
+EBUILD turtlearena-0.6.1-r1.ebuild 3148 BLAKE2B 18a0caf0de43d38dd25d5ed62f77183c168c17f79ebcc37fb0dcfda042decab92b2a77013e0c4798ddcbd9fa003974f3fbec6ab3042c46d2738a7aece62aefa9 SHA512 b535dcd923c9e7dc7f03626157284dec5b636429d460f5d1b9e9da5b04db14424eccb28591400e316f1131886bd7baae1710daa8d74254c28324afe837bff068
+MISC metadata.xml 448 BLAKE2B 0dd50368438ba4e015bdd06cca3f02104a43e9c9cee7dd28e610a9cd8b57dda4c34e27bd77082f30265ac6d7d0b0ab17b4e93d6e012f041778aba2e047ed5147 SHA512 633c20ebfe668a103133f8f4ca5bcefeffcde149c325973534ad1b362d72b4396c2e4c60681e027eb3f56c1a6ebbb073acc0078e22808627b7f39c0788f80069
diff --git a/games-fps/turtlearena/files/turtlearena-0.6.1-build.patch b/games-fps/turtlearena/files/turtlearena-0.6.1-build.patch
new file mode 100644
index 000000000000..0b6ad877b3f2
--- /dev/null
+++ b/games-fps/turtlearena/files/turtlearena-0.6.1-build.patch
@@ -0,0 +1,201 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Apr 27 20:53:37 UTC 2013
+
+* use PKG_CONFIG var (used in cross compiling scripts, does
+ cross compiling even work?)
+* consistently use pkg-config where possible, define proper fallbacks
+* unbundle the unzip.c properly and fix headers
+* make -m* flags depend on CROSS_COMPILING var
+
+--- a/engine/Makefile
++++ b/engine/Makefile
+@@ -346,27 +346,31 @@
+
+ bin_path=$(shell which $(1) 2> /dev/null)
+
++PKG_CONFIG ?= pkg-config
++SDL_CONFIG ?= sdl-config
++
+ # We won't need this if we only build the server
+ ifneq ($(BUILD_CLIENT),0)
+- # set PKG_CONFIG_PATH to influence this, e.g.
+- # PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
+- ifneq ($(call bin_path, pkg-config),)
+- CURL_CFLAGS=$(shell pkg-config --silence-errors --cflags libcurl)
+- CURL_LIBS=$(shell pkg-config --silence-errors --libs libcurl)
+- OPENAL_CFLAGS=$(shell pkg-config --silence-errors --cflags openal)
+- OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal)
+- SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//')
+- SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl)
+- FREETYPE_CFLAGS=$(shell pkg-config --silence-errors --cflags freetype2)
+- endif
+- # Use sdl-config if all else fails
+- ifeq ($(SDL_CFLAGS),)
+- ifneq ($(call bin_path, sdl-config),)
+- SDL_CFLAGS=$(shell sdl-config --cflags)
+- SDL_LIBS=$(shell sdl-config --libs)
+- endif
+- endif
+-endif
++ CURL_CFLAGS=$(shell $(PKG_CONFIG) --cflags libcurl 2>/dev/null)
++ CURL_LIBS=$(shell $(PKG_CONFIG) --libs libcurl 2>/dev/null || echo "-lcurl")
++ OPENAL_CFLAGS=$(shell $(PKG_CONFIG) --cflags openal 2>/dev/null || echo "-I/usr/include/AL")
++ OPENAL_LIBS=$(shell $(PKG_CONFIG) --libs openal 2>/dev/null || echo "-lopenal")
++ SDL_CFLAGS=$(shell $(PKG_CONFIG) --cflags sdl 2>/dev/null || $(SDL_CONFIG) --cflags 2>/dev/null || echo "-I/usr/include/SDL")
++ SDL_LIBS=$(shell $(PKG_CONFIG) --libs sdl 2>/dev/null || $(SDL_CONFIG) --libs 2>/dev/null || echo "-lsdl")
++ FREETYPE_CFLAGS=$(shell $(PKG_CONFIG) --cflags freetype2 2>/dev/null || echo "-I/usr/include/freetype2")
++ FREETYPE_LIBS=$(shell $(PKG_CONFIG) --libs freetype2 2>/dev/null || echo "-lfreetype")
++ OPENGL_LIBS=$(shell $(PKG_CONFIG) --libs gl 2>/dev/null || echo "-lGL")
++ VORIBS_CFLAGS=$(shell $(PKG_CONFIG) --cflags vorbis vorbisfile 2>/dev/null)
++ VORBIS_LIBS=$(shell $(PKG_CONFIG) --libs vorbis vorbisfile 2>/dev/null || echo "-lvorbis -lvorbisfile -logg")
++ THEORA_CFLAGS=$(shell $(PKG_CONFIG) --cflags theora 2>/dev/null)
++ THEORA_LIBS=$(shell $(PKG_CONFIG) --libs theora 2>/dev/null || echo "-ltheora")
++ SPEEX_CFLAGS=$(shell $(PKG_CONFIG) --cflags speex speexdsp 2>/dev/null)
++ SPEEX_LIBS=$(shell $(PKG_CONFIG) --libs speex speexdsp 2>/dev/null || echo "-lspeex")
++endif
++
++# common deps
++ZLIB_CFLAGS=$(shell $(PKG_CONFIG) --cflags zlib minizip 2>/dev/null || echo "-I/usr/include/minizip")
++ZLIB_LIBS=$(shell $(PKG_CONFIG) --libs zlib minizip 2>/dev/null || echo "-lz -lminizip")
+
+ ifneq ($(BUILD_FINAL),1)
+ # Add svn version info
+@@ -421,7 +425,7 @@
+ endif
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+- -pipe -DUSE_ICON
++ -DUSE_ICON
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
+
+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
+@@ -470,25 +474,29 @@
+ LIBS=-ldl -lm
+
+ CLIENT_LIBS=$(SDL_LIBS)
+- RENDERER_LIBS = $(SDL_LIBS) -lGL
++ RENDERER_LIBS = $(SDL_LIBS) $(OPENGL_LIBS)
+
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+- CLIENT_LIBS += -lopenal
+- endif
++ CLIENT_CFLAGS += $(OPENAL_CFLAGS)
++ CLIENT_LIBS += $(OPENAL_LIBS)
++ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+- CLIENT_LIBS += -lcurl
++ CLIENT_CFLAGS += $(CURL_CFLAGS)
++ CLIENT_LIBS += $(CURL_LIBS)
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+- CLIENT_LIBS += -lvorbisfile -lvorbis -logg
++ CLIENT_CFLAGS += $(VORBIS_CFLAGS)
++ CLIENT_LIBS += $(VORBIS_LIBS)
+ endif
+ ifeq ($(USE_CODEC_THEORA),1)
+- CLIENT_LIBS += -ltheora
++ CLIENT_CFLAGS += $(THEORA_CFLAGS)
++ CLIENT_LIBS += $(THEORA_LIBS)
+ endif
+
+ ifeq ($(USE_MUMBLE),1)
+@@ -503,14 +511,18 @@
+ BASE_CFLAGS += $(FREETYPE_CFLAGS)
+ endif
+
++ # cross-compiling tweaks
+ ifeq ($(ARCH),i386)
+- # linux32 make ...
+- BASE_CFLAGS += -m32
+- else
+- ifeq ($(ARCH),ppc64)
+- BASE_CFLAGS += -m64
++ ifeq ($(CROSS_COMPILING),1)
++ BASE_CFLAGS += -m32
++ endif
+ endif
++ ifeq ($(ARCH),amd64)
++ ifeq ($(CROSS_COMPILING),1)
++ BASE_CFLAGS += -m64
++ endif
+ endif
++
+ else # ifeq Linux
+
+ #############################################################################
+@@ -1155,7 +1167,8 @@
+ ifeq ($(USE_INTERNAL_SPEEX),1)
+ CLIENT_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include
+ else
+- CLIENT_LIBS += -lspeex -lspeexdsp
++ CLIENT_CFLAGS += $(SPEEX_CFLAGS)
++ CLIENT_LIBS += $(SPEEX_LIBS)
+ endif
+ endif
+
+@@ -1163,7 +1176,8 @@
+ BASE_CFLAGS += -DNO_GZIP
+ BASE_CFLAGS += -I$(ZDIR)
+ else
+- LIBS += -lz
++ BASE_CFLAGS += $(ZLIB_CFLAGS)
++ LIBS += $(ZLIB_LIBS)
+ endif
+
+ ifeq ($(USE_INTERNAL_JPEG),1)
+@@ -1177,7 +1191,8 @@
+ BASE_CFLAGS += -I$(FTDIR)/include \
+ -DFT2_BUILD_LIBRARY
+ else
+- RENDERER_LIBS += -lfreetype
++ BASE_CFLAGS += $(FREETYPE_CFLAGS)
++ RENDERER_LIBS += $(FREETYPE_LIBS)
+ endif
+
+ ifeq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+@@ -1650,8 +1665,6 @@
+ $(B)/client/q_math.o \
+ $(B)/client/q_shared.o \
+ \
+- $(B)/client/unzip.o \
+- $(B)/client/ioapi.o \
+ $(B)/client/puff.o \
+ $(B)/client/vm.o \
+ $(B)/client/vm_interpreted.o \
+@@ -2076,8 +2089,6 @@
+ $(B)/ded/q_math.o \
+ $(B)/ded/q_shared.o \
+ \
+- $(B)/ded/unzip.o \
+- $(B)/ded/ioapi.o \
+ $(B)/ded/vm.o \
+ $(B)/ded/vm_interpreted.o \
+ \
+--- a/engine/code/qcommon/files.c
++++ b/engine/code/qcommon/files.c
+@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth
+
+ #include "q_shared.h"
+ #include "qcommon.h"
+-#include "unzip.h"
++#include <minizip/unzip.h>
+
+ /*
+ =============================================================================
+--- a/engine/code/renderer/tr_public.h
++++ b/engine/code/renderer/tr_public.h
+@@ -25,7 +25,7 @@
+ #include "tr_types.h"
+
+ #ifdef IOQ3ZTM // PNG_SCREENSHOTS
+-#include "../zlib/zlib.h"
++#include <zlib.h>
+ #endif
+
+ #define REF_API_VERSION 8
diff --git a/games-fps/turtlearena/files/turtlearena-0.6.1-freetype.patch b/games-fps/turtlearena/files/turtlearena-0.6.1-freetype.patch
new file mode 100644
index 000000000000..9ecd6df2bf57
--- /dev/null
+++ b/games-fps/turtlearena/files/turtlearena-0.6.1-freetype.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/show_bug.cgi?id=479822#c3
+http://github.com/ioquake/ioq3/commit/ab4c602374caa0f520b3a0801d384a73e29e0bc7
+
+--- a/engine/code/renderer/tr_font.c
++++ b/engine/code/renderer/tr_font.c
+@@ -47,10 +47,10 @@
+ #include "../qcommon/qcommon.h"
+
+ #include <ft2build.h>
++#include FT_FREETYPE_H
+ #include FT_ERRORS_H
+ #include FT_SYSTEM_H
+ #include FT_IMAGE_H
+-#include FT_FREETYPE_H
+ #include FT_OUTLINE_H
+
+ #define _FLOOR(x) ((x) & -64)
diff --git a/games-fps/turtlearena/metadata.xml b/games-fps/turtlearena/metadata.xml
new file mode 100644
index 000000000000..76847d643c80
--- /dev/null
+++ b/games-fps/turtlearena/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="mumble">Adds player-location (positional audio) support to VoIP</flag>
+ <flag name="server">Build server target</flag>
+ <flag name="voice">Adds VoIP support</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild b/games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild
new file mode 100644
index 000000000000..ee3525548a70
--- /dev/null
+++ b/games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gnome2-utils
+
+MY_P=${PN/-/}-${PV}
+
+DESCRIPTION="A turtle featuring free and open source third-person action game (ioq3 engine)"
+HOMEPAGE="http://ztm.x10host.com/ta/index.htm"
+SRC_URI="https://turtlearena.googlecode.com/files/${MY_P}-0-src.tar.bz2
+ https://turtlearena.googlecode.com/files/${MY_P}-0.zip"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0 mplus-fonts lcc"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+curl debug dedicated mumble openal server theora voice vorbis"
+
+RDEPEND="
+ sys-libs/zlib[minizip]
+ !dedicated? (
+ media-libs/freetype:2
+ media-libs/libsdl[X,sound,joystick,opengl,video]
+ virtual/jpeg:0
+ virtual/opengl
+ curl? ( net-misc/curl )
+ openal? ( media-libs/openal )
+ theora? ( media-libs/libtheora )
+ voice? (
+ media-libs/speex
+ mumble? ( media-sound/mumble )
+ )
+ vorbis? ( media-libs/libvorbis )
+ )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}-0-src
+
+src_prepare() {
+ default
+
+ eapply "${FILESDIR}"/${P}-build.patch
+ eapply "${FILESDIR}"/${P}-freetype.patch
+
+ sed -i \
+ -e 's:JPEG_LIB_VERSION < 80:JPEG_LIB_VERSION < 62:' \
+ engine/code/renderer/tr_image_jpg.c || die #479822
+
+ rm -r engine/code/{AL,libcurl,libogg,libspeex,libtheora,libvorbis,SDL12,zlib} \
+ engine/code/freetype* engine/code/jpeg-* \
+ engine/code/qcommon/unzip.{c,h} || die
+}
+
+src_compile() {
+ buildit() { use $1 && echo 1 || echo 0 ; }
+ nobuildit() { use $1 && echo 0 || echo 1 ; }
+
+ myarch=$(usex amd64 "x86_64" "x86")
+ emake -C engine \
+ Q="" \
+ ARCH=${myarch} \
+ CROSS_COMPILING=0 \
+ BUILD_GAME_QVM=0 \
+ BUILD_GAME_SO=0 \
+ BUILD_CLIENT=$(nobuildit dedicated) \
+ BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
+ DEFAULT_BASEDIR="/usr/share/${PN}" \
+ GENERATE_DEPENDENCIES=0 \
+ OPTIMIZEVM="" \
+ OPTIMIZE="" \
+ DEBUG_CFLAGS="" \
+ USE_MUMBLE=$(buildit mumble) \
+ USE_VOIP=$(buildit voice) \
+ USE_INTERNAL_SPEEX=0 \
+ USE_INTERNAL_OGG=0 \
+ USE_INTERNAL_ZLIB=0 \
+ USE_INTERNAL_JPEG=0 \
+ USE_INTERNAL_FREETYPE=0 \
+ USE_CODEC_VORBIS=$(buildit vorbis) \
+ USE_INTERNAL_VORBIS=0 \
+ USE_CODEC_THEORA=$(buildit theora) \
+ USE_OPENAL=$(buildit openal) \
+ USE_OPENAL_DLOPEN=0 \
+ USE_CURL=$(buildit curl) \
+ USE_CURL_DLOPEN=0 \
+ USE_LOCAL_HEADERS=0 \
+ $(usex debug "debug" "release")
+}
+
+src_install() {
+ dodoc engine/{ChangeLog,BUGS,TODO}
+ use voice && dodoc engine/voip-readme.txt
+
+ if ! use dedicated ; then
+ newbin engine/build/$(usex debug "debug" "release")-linux-${myarch}/turtlearena.${myarch} turtlearena
+ newicon -s scalable engine/misc/quake3-tango.svg ${PN}.svg
+ newicon -s 256 engine/misc/quake3-tango.png ${PN}.png
+ make_desktop_entry ${PN}
+ fi
+
+ if use dedicated || use server ; then
+ newbin engine/build/$(usex debug "debug" "release")-linux-${myarch}/turtlearena-server.${myarch} turtlearena-server
+ fi
+
+ insinto "/usr/share/${PN}"
+ doins -r "${WORKDIR}"/${MY_P}-0/base
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ use dedicated || gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ use dedicated || gnome2_icon_cache_update
+}
diff --git a/games-fps/unreal-226 b/games-fps/unreal-226
deleted file mode 100644
index 695168b76308..000000000000
--- a/games-fps/unreal-226
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=sys-libs/lib-compat app-arch/unzip
-DESCRIPTION=Futuristic FPS (a hack that runs on top of Unreal Tournament)
-EAPI=5
-HOMEPAGE=http://www.unreal.com/ http://icculus.org/~chunky/ut/unreal/
-IUSE=X opengl
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=all-rights-reserved
-PROPERTIES=interactive
-RDEPEND=>=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)] x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] opengl? ( virtual/opengl[abi_x86_32(-)] ) games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://www.icculus.org/%7Echunky/ut/unreal/unreali-install.run ftp://ftp.lokigames.com/pub/patches/ut/ut-install-436.run ftp://ftp.lokigames.com/pub/patches/ut/IpDrv-436-Linux-08-20-02.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d89e2d01a84ce9f97b8cec5e8d09b387
diff --git a/games-fps/unreal-tournament-451 b/games-fps/unreal-tournament-451
deleted file mode 100644
index c841742e1b72..000000000000
--- a/games-fps/unreal-tournament-451
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=>=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)] x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] opengl? ( virtual/opengl[abi_x86_32(-)] ) !games-fps/unreal-tournament-goty
-DESCRIPTION=Futuristic FPS
-EAPI=5
-HOMEPAGE=http://www.oldunreal.com/
-IUSE=3dfx opengl
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=all-rights-reserved
-PROPERTIES=interactive
-RDEPEND=>=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)] x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] opengl? ( virtual/opengl[abi_x86_32(-)] ) games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://www.ut-files.com/Patches/ut-install-436.run http://www.ut-files.com/Patches/utpgpatch451.tar.bz2 -> UTPGPatch451.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d967ca4976051268817eaeaf17bd35f7
diff --git a/games-fps/unreal-tournament-bonuspacks-436 b/games-fps/unreal-tournament-bonuspacks-436
deleted file mode 100644
index f2c0a0ccb6e0..000000000000
--- a/games-fps/unreal-tournament-bonuspacks-436
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=|| ( games-fps/unreal-tournament games-fps/unreal-tournament-goty ) app-arch/unzip games-util/umodpack
-DESCRIPTION=Futuristic FPS (bonus packs)
-EAPI=5
-HOMEPAGE=http://www.oldunreal.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=all-rights-reserved
-RDEPEND=|| ( games-fps/unreal-tournament games-fps/unreal-tournament-goty ) games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://www.ut-files.com/Patches/utbonuspack4.zip -> UTBonusPack4.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d2693daf79df2e3c8587228e0edd129f
diff --git a/games-fps/unreal-tournament-bonuspacks/Manifest b/games-fps/unreal-tournament-bonuspacks/Manifest
new file mode 100644
index 000000000000..685d43ddf105
--- /dev/null
+++ b/games-fps/unreal-tournament-bonuspacks/Manifest
@@ -0,0 +1,3 @@
+DIST UTBonusPack4.zip 14916708 BLAKE2B da4b2db40e2a360fe90c8a67d58304639d072cbc9f857488b25b3710c84689ea753fb5e7d2a178e825515d687c0bf7821842056fa15110f902651acd42584cd1 SHA512 4abc29b108926aebce872a0c8257f97604265cdc837b2e46443ee8cf98adfcba69b6b7ab2bd2379723c11301ef2bf60298ab075a6befe5eeed6d8526f3f653b0
+EBUILD unreal-tournament-bonuspacks-436.ebuild 1135 BLAKE2B d86ddb0fad98b433f7167c088ff6c66b60985e358daaaa04d82f3164dc2bf05153ca4e7a04bc3e50fbe41581eeb323633bdb3da82ae90a49616fb3043e28e1c5 SHA512 8a85c38456b6298bb5d19a21247c1c15b3caf4b09bbf892612f688d2e7e48b3ef5c802386507300e6b78101d81178aece8610fc9df37e5aa3d3416038fa291b7
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/unreal-tournament-bonuspacks/metadata.xml b/games-fps/unreal-tournament-bonuspacks/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/unreal-tournament-bonuspacks/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament-bonuspacks/unreal-tournament-bonuspacks-436.ebuild b/games-fps/unreal-tournament-bonuspacks/unreal-tournament-bonuspacks-436.ebuild
new file mode 100644
index 000000000000..bbc8edb8a3fe
--- /dev/null
+++ b/games-fps/unreal-tournament-bonuspacks/unreal-tournament-bonuspacks-436.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+DESCRIPTION="Futuristic FPS (bonus packs)"
+HOMEPAGE="http://www.oldunreal.com/"
+# UT has 4 official bonus packs ...
+# [UTBonusPack] -> loki put into games-fps/unreal-tournament
+# [UTBonusPack2] -> loki put into games-fps/unreal-tournament
+# [UTiNoxxPack] -> loki put into games-fps/unreal-tournament
+# [UTBonusPack4] -> none of this is in games-fps/unreal-tournament
+SRC_URI="http://www.ut-files.com/Patches/utbonuspack4.zip -> UTBonusPack4.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND="|| (
+ games-fps/unreal-tournament
+ games-fps/unreal-tournament-goty )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ games-util/umodpack"
+
+S=${WORKDIR}
+
+src_install() {
+ # unpack the UTBonusPack4 umod
+ umod -v -b "$(pwd)" -x UTBonusPack4.umod || die
+
+ # move stuff around
+ rm UTBonusPack4.umod
+ mv system System
+ mv textures Textures
+
+ # install it all
+ local dir=${GAMES_PREFIX_OPT}/unreal-tournament
+ dodir "${dir}"
+ mv * "${D}/${dir}/"
+
+ prepgamesdirs
+}
diff --git a/games-fps/unreal-tournament-goty-451 b/games-fps/unreal-tournament-goty-451
deleted file mode 100644
index cb451056c358..000000000000
--- a/games-fps/unreal-tournament-goty-451
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Futuristic FPS (Game Of The Year edition)
-EAPI=5
-HOMEPAGE=http://www.oldunreal.com/
-IUSE=3dfx S3TC nls opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=all-rights-reserved
-PROPERTIES=interactive
-RDEPEND=opengl? ( virtual/opengl[abi_x86_32(-)] ) >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] games-misc/games-envd
-RESTRICT=mirror bindist
-SLOT=0
-SRC_URI=http://www.ut-files.com/Patches/ut-install-436-GOTY.run http://www.ut-files.com/Patches/utpgpatch451.tar.bz2 -> UTPGPatch451.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=45057e462144412bcf28a3db7caecf58
diff --git a/games-fps/unreal-tournament-goty/Manifest b/games-fps/unreal-tournament-goty/Manifest
new file mode 100644
index 000000000000..55dad12bc1d7
--- /dev/null
+++ b/games-fps/unreal-tournament-goty/Manifest
@@ -0,0 +1,4 @@
+DIST UTPGPatch451.tar.bz2 3064473 BLAKE2B 43fd1573f714b59d7069b8fbd30bd822024971277dd863793a3f2c05d1a973904fd9ef6f22f8efcec0389cdb36ec6abb6c8f3eb5b700eba29aa6b5284d433cb4 SHA512 d11ecb3e60e8bba0288be0a4860acb563c277e75ce30a749de04673219d484b7a8c7e6207bc582872df33db684658dc1a15235b9d79ceb98fcd2ad1410982423
+DIST ut-install-436-GOTY.run 6340417 BLAKE2B 255fcfe95f0c23c52e9f2aec914f023db532b1e6fdaba39c17baaf34f58c7f44b815b10757083602fdd95ca61a7ebcb6167c6cef9cf9750323557c499d29ea37 SHA512 daa2da9f21f1b6e057e19d72d9c1b2446a250b30eb80b24d6a059a5d1eec24a9326d4e6af0401ba4ade3610fbf3a44c1fe44c26b7ae0eb4b7301a20f9574859c
+EBUILD unreal-tournament-goty-451.ebuild 5059 BLAKE2B bbf170479dce41e4f86d3c9c707f5b7980cf4054032d722df89495d7f9d9fe5c5d66380f2da8f4dbec650bf48eae0b73fcd51564695b56585aa4677c3e06dbab SHA512 bcb67d66e53d2244c24b6e0b1bc367115f0c6ac11ba941a6c7d7911f12ee1d1c4c8fe1f6d2e96988fbf0da52c8117d2c9f4660723a37f3511dc91eca793340e0
+MISC metadata.xml 1737 BLAKE2B 25f4868993c97b2f62e363095313763d0a16b2007b6606d42942c2e6caa8cc80db0d8aa576910ad7da0d74551e4cbbc591e6992418c8ae55c3a28713b0da0597 SHA512 68d571ba7b3af66b65d7e68db7598bd3aefb252892cc35fcb956de3e30175e83f79c866c5c04e6d4d19d7fa4f7533555fcc83e0bfac71fb26d0fb2b87c0e67dc
diff --git a/games-fps/unreal-tournament-goty/metadata.xml b/games-fps/unreal-tournament-goty/metadata.xml
new file mode 100644
index 000000000000..5f8f103990d5
--- /dev/null
+++ b/games-fps/unreal-tournament-goty/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+In the single player mode, the player squares off
+against computer controlled Bots in all the game modes
+through a tournament ladder with increasing difficulty.
+Thanks to Epic's unmatched AI coding wizardry, Unreal
+Tournament's Bots are more life like than any
+computer-controlled characters to date. They understand
+each game's unique rules. They have a firm handle on all
+the different weapons at their disposal and how best to
+use them. They can swim, use elevators, climb stairs,
+and put on Toxin suits if they have to. If they're on
+the player's team, they can take orders to attack,
+defend or freelance.
+
+Unreal Tournament's bread and butter is the online multiplayer
+mode. Squaring off against other combatants from around the world, or on
+the other end of a LAN connection, provides some of the most thrilling and
+tense battles seen on a PC. Unreal Tournament's unparalleled networking
+code makes it as easy to play the game against anyone, anytime. If the
+host server has unique content -- like custom skins or maps -- UT
+will automatically download and install that content in REAL TIME, as the
+game is connecting. And thanks to Epic Games' amazing work on Unreal
+Tournament's network play, you can be sure that even a 33.6K modem can get
+a silky smooth connection to the server.
+</longdescription>
+ <use>
+ <flag name="S3TC">Add the extra fancy textures to UT ... only works on certain cards (nvidia/ati/s3)</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild b/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
new file mode 100644
index 000000000000..f61422fa334b
--- /dev/null
+++ b/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Futuristic FPS (Game Of The Year edition)"
+HOMEPAGE="http://www.oldunreal.com/"
+SRC_URI="http://www.ut-files.com/Patches/ut-install-436-GOTY.run
+ http://www.ut-files.com/Patches/utpgpatch${PV}.tar.bz2 -> UTPGPatch${PV}.tar.bz2"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="3dfx S3TC nls opengl"
+RESTRICT="mirror bindist"
+
+RDEPEND="
+ opengl? ( virtual/opengl[abi_x86_32(-)] )
+ >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+"
+DEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ cdrom_get_cds System/ Help/chaosut
+ unpack_makeself ut-install-436-GOTY.run
+ mkdir UTPG && cd UTPG
+ unpack UTPGPatch${PV}.tar.bz2
+ rm checkfiles.sh patch.md5
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/${PN/-goty/}
+ local Ddir=${D}/${dir}
+ dodir "${dir}"
+
+ ###########
+ ### PRE ###
+ # System
+ if use 3dfx ; then
+ tar -zxf Glide.ini.tar.gz -C "${Ddir}" || die "install Glide ini"
+ else
+ tar -zxf OpenGL.ini.tar.gz -C "${Ddir}" || die "install OpenGL ini"
+ fi
+ tar -zxf data.tar.gz -C "${Ddir}" || die "extract System data"
+
+ # the most important things, ucc & ut :)
+ exeinto "${dir}"
+ doexe bin/x86/{ucc,ut} || die "install ucc/ut"
+ sed -i -e "s:\`FindPath \$0\`:${dir}:" "${ED}/${dir}"/ucc || die
+
+ # export some symlinks so ppl can run
+ dodir "${GAMES_BINDIR}"
+ dosym "${dir}"/ucc "${GAMES_BINDIR}"/ucc
+ dosym "${dir}"/ut "${GAMES_BINDIR}"/ut
+ ### PRE ###
+ ###########
+
+ ###########
+ ### CD1 ###
+ # Help, Logs, Music, Sounds, Textures, Web
+ cp -rf "${CDROM_ROOT}"/{Help,Logs,Music,Textures,Web} "${Ddir}"/ || die "copy Help, Logs, Music, Textures, Web CD1"
+ dodir "${dir}"/Sounds
+ if use nls ; then
+ cp -rf "${CDROM_ROOT}"/Sounds/* "${Ddir}"/Sounds/ || die "copy Sounds CD1"
+ else
+ cp -rf "${CDROM_ROOT}"/Sounds/*.uax "${Ddir}"/Sounds/ || die "copy Sounds CD1"
+ fi
+
+ # System
+ dodir "${dir}"/System
+ if use nls ; then
+ cp "${CDROM_ROOT}"/System/*.{est,frt,itt,int,u} "${Ddir}"/System/ || die "copy System data CD1"
+ else
+ cp "${CDROM_ROOT}"/System/*.{int,u} "${Ddir}"/System/ || die "copy System data CD1"
+ fi
+
+ # now we uncompress the maps
+ einfo "Uncompressing CD1 Maps ... this may take some time"
+ dodir "${dir}"/Maps
+ cd "${Ddir}"
+ export HOME=${T}
+ export UT_DATA_PATH="${Ddir}"/System
+ for f in `find "${CDROM_ROOT}"/Maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress "${CDROM_ROOT}"/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
+ mv System/${f:0:${#f}-3} Maps/ || die "copy map CD1 ${f}"
+ done
+ ### CD1 ###
+ ###########
+
+ ### Have user switch cds if need be ###
+ cdrom_load_next_cd
+
+ ###########
+ ### CD2 ###
+ # Help, Sounds
+ cp -rf "${CDROM_ROOT}"/{Help,Sounds} "${Ddir}"/ || die "copy Help, Sounds CD2"
+
+ # S3TC Textures
+ if use S3TC ; then
+ cp -rf "${CDROM_ROOT}"/Textures "${Ddir}"/ || die "copy S3TC Textures CD2"
+ else
+ cp -rf "${CDROM_ROOT}"/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx "${Ddir}"/Textures/ || die "copy Textures CD2"
+ fi
+
+ # System
+ cp -rf "${CDROM_ROOT}"/System/*.{u,int} "${Ddir}"/System/ || die "copy System CD2"
+
+ # now we uncompress the maps
+ einfo "Uncompressing CD2 Maps ... this may take some time"
+ dodir "${dir}"/Maps
+ cd "${Ddir}"
+ export HOME=${T}
+ export UT_DATA_PATH="${Ddir}"/System
+ for f in `find "${CDROM_ROOT}"/maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress "${CDROM_ROOT}"/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
+ mv System/${f:0:${#f}-3} Maps/ || die "copy map CD2 ${f}"
+ done
+ ### CD2 ###
+ ###########
+
+ ###########
+ ### END ###
+ cd "${S}"
+
+ # Textures
+ tar -zxf Credits.tar.gz -C "${Ddir}" || die "extract credits texture"
+ # NetGamesUSA.com
+ tar -zxf NetGamesUSA.com.tar.gz -C "${Ddir}"/ || die "extract NetGamesUSA.com"
+
+ # first apply any patch remaints loki has for us
+ cd setup.data
+ cp patch.dat{,.orig} || die "cp failed"
+ sed -e 's:sh uz-maps.sh:echo:' patch.dat.orig > patch.dat || die "sed failed"
+ ./bin/Linux/x86/loki_patch patch.dat "${Ddir}" >& /dev/null
+ cd "${S}"
+
+ # finally, unleash the UTPG patch
+ cp -rf UTPG/* "${Ddir}"/ || die "cp failed"
+ # fix a small bug until next official release
+ sed -i -e "/^LoadClassMismatch/s:%s.%s:%s:" "${ED}/${dir}"/System/Core.int
+
+ # install a few random files
+ insinto "${dir}"
+ doins README icon.{bmp,xpm} || die "installing random files"
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' \;
+ ### END ###
+ ###########
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "You might want to install the bonus packs too."
+ elog "Many servers on the internet use them, and the"
+ elog "majority of players do too."
+ elog
+ elog "Just run: emerge unreal-tournament-bonuspacks"
+}
diff --git a/games-fps/unreal-tournament-strikeforce-1.81 b/games-fps/unreal-tournament-strikeforce-1.81
deleted file mode 100644
index 7fc8ba51f6fa..000000000000
--- a/games-fps/unreal-tournament-strikeforce-1.81
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=A UT addon where you fight terrorists as part of an elite strikeforce
-EAPI=5
-HOMEPAGE=http://www.strike-force.com/
-KEYWORDS=~x86
-LICENSE=unreal-tournament-strikeforce
-RDEPEND=|| ( games-fps/unreal-tournament games-fps/unreal-tournament-goty ) games-misc/games-envd
-RESTRICT=bindist
-SLOT=0
-SRC_URI=mirror://gentoo/sf_180_server_files.tar.gz mirror://gentoo/unreal-tournament-strikeforce-1.81.tar.bz2 mirror://gentoo/sf180lnx.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=56014cbc02d7cc0caeab661c62edab79
diff --git a/games-fps/unreal-tournament-strikeforce/Manifest b/games-fps/unreal-tournament-strikeforce/Manifest
new file mode 100644
index 000000000000..3aa00178ebfd
--- /dev/null
+++ b/games-fps/unreal-tournament-strikeforce/Manifest
@@ -0,0 +1,5 @@
+DIST sf180lnx.zip 11965 BLAKE2B 535787a47c5e22866ca4dc02a92955bd152b3bafb136e4f7788ba1b3785da3bc13bc937951164094e5eb43932ad48ef6ded9c95c0d561c60f6dd9d92a4e83c8d SHA512 e64644f470f2506df05159c03f27f3e1df9dc5cf547a7e2415ee8005fadcc1124c02f4e932de7c92b2781511ed8d44f5b8a314a8c246d57da750e30e57fcdfad
+DIST sf_180_server_files.tar.gz 396772949 BLAKE2B b30b2ffc9d9a737df159e5e8efaef75f829edb155032e57d0ac5526d8cf2ef1e6de31f0fa503615edb8a2ce4dd53b8295132457e2ddef36f3a24a6a01f179916 SHA512 74850d42be59f9d974cf5f89bb85385ff204a0635e0f71315c59cae3fc0eb8032d69797aedc380427ad21e7cdda809a326587ccf3835f9abaaf14b92a3c0dabe
+DIST unreal-tournament-strikeforce-1.81.tar.bz2 42039142 BLAKE2B 660e760453b889df05fc4d75e8e7fe0ee701a9707a5cc458511566b0bec4b99b8c41604757a1e97fccaa05a2a014e3f704ac797536dea82692676764e18572ba SHA512 ec5a755e2771f879553970d565391268c152aa3fe14cefccfea8582108dd87687176712e548bd3457328e2bc9f831714a41fb4834abdad2b04d83db0b3fc64a2
+EBUILD unreal-tournament-strikeforce-1.81.ebuild 1170 BLAKE2B e319dbdfb027924d87cb3bbc27621c8cf0d8e81b0f3dd44200d63939343de8e66c7281b90e42c396b1ac185ec609658491f33bbc29f88fd22be084003965a32a SHA512 58b65b4c33cc9c60de34c9d5b7fdc88d8dcd0a28521b7e515a244e75c6822826eaadf15a73fca402c2cef7bdbda93f8e1dbfafc935df86c0b0281ab42acb2283
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/unreal-tournament-strikeforce/metadata.xml b/games-fps/unreal-tournament-strikeforce/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/unreal-tournament-strikeforce/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament-strikeforce/unreal-tournament-strikeforce-1.81.ebuild b/games-fps/unreal-tournament-strikeforce/unreal-tournament-strikeforce-1.81.ebuild
new file mode 100644
index 000000000000..34337e207484
--- /dev/null
+++ b/games-fps/unreal-tournament-strikeforce/unreal-tournament-strikeforce-1.81.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+MY_PV=${PV/./}
+DESCRIPTION="A UT addon where you fight terrorists as part of an elite strikeforce"
+HOMEPAGE="http://www.strike-force.com/"
+#http://strikeforce.redconcepts.net:8888/sf_180_server_files.tar.gz
+SRC_URI="mirror://gentoo/sf_180_server_files.tar.gz
+ mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/sf180lnx.zip"
+#http://www.hut.fi/~kalyytik/sf/linux-sf.html
+
+LICENSE="unreal-tournament-strikeforce"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+RESTRICT="bindist"
+
+RDEPEND="|| (
+ games-fps/unreal-tournament
+ games-fps/unreal-tournament-goty
+ )"
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack sf_180_server_files.tar.gz
+ unpack ${P}.tar.bz2
+ unpack sf180lnx.zip
+ mv "README - sf orm mappack.txt" Strikeforce/SFDoc/ || die
+ rm -rf Help/OpenGL\ Alternate || die
+ rm System/*.{dll,lnk,exe} System/ServerAdds.zip || die
+ rm Strikeforce/SF_System/*.bat || die
+ find -type f -exec chmod a-x '{}' + || die
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/unreal-tournament
+ dodir "${dir}"
+ mv * "${D}/${dir}/" || die
+ prepgamesdirs
+}
diff --git a/games-fps/unreal-tournament/Manifest b/games-fps/unreal-tournament/Manifest
new file mode 100644
index 000000000000..3fe2e03eef82
--- /dev/null
+++ b/games-fps/unreal-tournament/Manifest
@@ -0,0 +1,4 @@
+DIST UTPGPatch451.tar.bz2 3064473 BLAKE2B 43fd1573f714b59d7069b8fbd30bd822024971277dd863793a3f2c05d1a973904fd9ef6f22f8efcec0389cdb36ec6abb6c8f3eb5b700eba29aa6b5284d433cb4 SHA512 d11ecb3e60e8bba0288be0a4860acb563c277e75ce30a749de04673219d484b7a8c7e6207bc582872df33db684658dc1a15235b9d79ceb98fcd2ad1410982423
+DIST ut-install-436.run 6225010 BLAKE2B 107a4991db59e1ff800bf2a1e002f0e56f5415b14a936ced149ace57c5359f10b75d0c2506e5fe40dfb2ca28b068cf225b35dda5fae0af84864df4edb560e05a SHA512 cfdeb9f345daef4b81acadfa24d711477ba208dffd50716087d034df2dc1eb0ac5bb03570f4f1701b3c4d46b8f954e6d23dde36fc20dafdc114e68730a1fc932
+EBUILD unreal-tournament-451.ebuild 3677 BLAKE2B dce626054b14a503f585366d9190d955c2c9f9c128c9f884b58516ce14dbd924697bdac516f4557d8995d37ed75737e08525d325fb1976e9a28f93459b85f35a SHA512 c359b3a8219463a984a534b0458ab27cb0f81ba4d27819c8a71f0bacea81b9b3bf566a718f7b0feefb8ab159b9f5a3b0e979e54bfb8158b2ae6ce6e1063a9cb8
+MISC metadata.xml 1596 BLAKE2B a6b8460fe469bfef5c7a56526d5387532de532da41eb57c06b20b6319bdf4c5c28596f86c151f27a8f9bcb76a7d74019371b8be2d26f0b7802c92bdd4f575953 SHA512 d9250b157b97a1f21aa905fae2ef62e2b06573e7cb168835ae904278e41e7103166d817a2ce266b8969b912c156685c1b6e6e0b976a7c933f6811e8b9ec20270
diff --git a/games-fps/unreal-tournament/metadata.xml b/games-fps/unreal-tournament/metadata.xml
new file mode 100644
index 000000000000..d6fc95339e12
--- /dev/null
+++ b/games-fps/unreal-tournament/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+In the single player mode, the player squares off
+against computer controlled Bots in all the game modes
+through a tournament ladder with increasing difficulty.
+Thanks to Epic's unmatched AI coding wizardry, Unreal
+Tournament's Bots are more life like than any
+computer-controlled characters to date. They understand
+each game's unique rules. They have a firm handle on all
+the different weapons at their disposal and how best to
+use them. They can swim, use elevators, climb stairs,
+and put on Toxin suits if they have to. If they're on
+the player's team, they can take orders to attack,
+defend or freelance.
+
+Unreal Tournament's bread and butter is the online multiplayer
+mode. Squaring off against other combatants from around the world, or on
+the other end of a LAN connection, provides some of the most thrilling and
+tense battles seen on a PC. Unreal Tournament's unparalleled networking
+code makes it as easy to play the game against anyone, anytime. If the
+host server has unique content -- like custom skins or maps -- UT
+will automatically download and install that content in REAL TIME, as the
+game is connecting. And thanks to Epic Games' amazing work on Unreal
+Tournament's network play, you can be sure that even a 33.6K modem can get
+a silky smooth connection to the server.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament/unreal-tournament-451.ebuild b/games-fps/unreal-tournament/unreal-tournament-451.ebuild
new file mode 100644
index 000000000000..d5b0e7f88342
--- /dev/null
+++ b/games-fps/unreal-tournament/unreal-tournament-451.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Futuristic FPS"
+HOMEPAGE="http://www.oldunreal.com/"
+SRC_URI="http://www.ut-files.com/Patches/ut-install-436.run
+ http://www.ut-files.com/Patches/utpgpatch${PV}.tar.bz2 -> UTPGPatch${PV}.tar.bz2"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="3dfx opengl"
+RESTRICT="mirror bindist"
+
+RDEPEND="
+ >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ opengl? ( virtual/opengl[abi_x86_32(-)] )
+"
+DEPEND="${RDEPEND}
+ !games-fps/unreal-tournament-goty
+"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cdrom_get_cds System/
+ unpack_makeself ut-install-436.run
+ mkdir UTPG && cd UTPG
+ unpack UTPGPatch${PV}.tar.bz2
+ rm checkfiles.sh patch.md5
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/${PN}
+ local Ddir=${D}/${dir}
+ dodir "${dir}"
+
+ # Help, Logs, Music, Textures, Web
+ cp -rf "${CDROM_ROOT}"/{Help,Logs,Music,Textures,Web} "${Ddir}/" || die "copy Help, Logs, Music, Textures, Web"
+ tar -zxf Credits.tar.gz -C "${Ddir}" || die "extract credits texture"
+ # NetGamesUSA.com
+ tar -zxf NetGamesUSA.com.tar.gz -C "${Ddir}/" || die "extract NetGamesUSA.com"
+ # Sounds
+ dodir "${dir}"/Sounds
+ cp -rf "${CDROM_ROOT}"/Sounds/*.uax "${Ddir}"/Sounds/ || die "copy Sounds"
+
+ # System
+ if use 3dfx ; then
+ tar -zxf Glide.ini.tar.gz -C "${Ddir}" || die "install Glide ini"
+ else
+ tar -zxf OpenGL.ini.tar.gz -C "${Ddir}" || die "install OpenGL ini"
+ fi
+ tar -zxf data.tar.gz -C "${Ddir}" || die "extract System data"
+ cp "${CDROM_ROOT}"/System/*.u "${Ddir}"/System/ || die "copy System data"
+
+ # the most important things, ucc & ut :)
+ exeinto "${dir}"
+ doexe bin/x86/{ucc,ut} || die "install ucc/ut"
+ sed -i -e "s:\`FindPath \$0\`:${dir}:" "${ED}/${dir}"/ucc || die
+
+ # install a few random files
+ insinto "${dir}"
+ doins README icon.{bmp,xpm} || die "installing random files"
+
+ # install a menu item (closes bug #27542)
+ newicon icon.xpm ut.xpm
+ make_desktop_entry ut "Unreal Tournament" ut
+
+ # first apply any patch remaints loki has for us
+ cd setup.data
+ ./bin/Linux/x86/loki_patch patch.dat "${Ddir}" >& /dev/null
+ cd "${S}"
+
+ # finally, unleash the UTPG patch
+ cp -rf UTPG/* "${Ddir}/"
+ # fix a small bug until next official release
+ sed -i -e "/^LoadClassMismatch/s:%s.%s:%s:" "${ED}/${dir}"/System/Core.int || die
+
+ # now we uncompress the maps (GOTY edition installs maps as .uz)
+ einfo "Uncompressing Maps ... this may take some time"
+ dodir "${dir}"/Maps
+ cd "${Ddir}"
+ export HOME=${T}
+ export UT_DATA_PATH=${Ddir}/System
+ for f in $(find "${CDROM_ROOT}"/Maps/ -name '*.uz' -printf '%f ') ; do
+ ./ucc decompress "${CDROM_ROOT}"/Maps/"${f}" -nohomedir || die "uncompressing map ${f}"
+ mv "System/${f:0:${#f}-3}" Maps/ || die "copy map ${f}"
+ done
+ cp -rf "${CDROM_ROOT}"/Maps/*.unr "${Ddir}"/Maps/ # some cd's have uncompressed maps ??
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' +
+
+ # export some symlinks so ppl can run
+ dodir "${GAMES_BINDIR}"
+ dosym "${dir}/ut" "${GAMES_BINDIR}/ut"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "You might want to install the bonus packs too."
+ elog "Many servers on the internet use them, and the"
+ elog "majority of players do too."
+ elog
+ elog "Just run: emerge unreal-tournament-bonuspacks"
+ echo
+}
diff --git a/games-fps/unreal/Manifest b/games-fps/unreal/Manifest
new file mode 100644
index 000000000000..fe23ac1cea90
--- /dev/null
+++ b/games-fps/unreal/Manifest
@@ -0,0 +1,6 @@
+AUX unreal 53 BLAKE2B da95fd3d009a468bed4eb4e26bfc182e92b7d63067df309ee7a69f5a132a46f74335b3ca3ca20dff0902a3a32ec38eb993b55496d0204912397afff41e16faae SHA512 0728ca1599fb289812c99d45801cf0566e9651ecefdd4fe10252e6bde3bc035e7cf1294e34056e35b851dcb0f3826907ffaea60b974f61ce75660d144d5955ce
+DIST IpDrv-436-Linux-08-20-02.zip 105435 BLAKE2B 3b0c960513f3bfdaa5394148978f1258b54cedec0722890fd1d89a81b7c809a9d837f6da0e147f1566ee253ed6fd0c7692d043e50ddd383d99245f7aec3df759 SHA512 5f10152b87cf702225fe50d213f3fbd4865cb2f190e0c2c87c996420c115e5f84de7748af635705b8a2ea789bfeaaab4b927364563a4b83f973dcb5af866ccd7
+DIST unreali-install.run 4118594 BLAKE2B 6c105e0901882b1a04cc7983eaeb60dbe50379579a177d3ccd78f1fafda9c1ed4ab603006f0dfc4faaad4f425ec3f242bd28c09bb91e4a1f07a2dd5ab702cf1a SHA512 9b918fec89de0bb273a2c351dbaccfe32eaaaf9c5ba012ddaf38c1e8617d7c6b8a08c9ac04135105bea89f4127f7f64f52c8d2c00a00e9418f4807fc1f3aff7b
+DIST ut-install-436.run 6225010 BLAKE2B 107a4991db59e1ff800bf2a1e002f0e56f5415b14a936ced149ace57c5359f10b75d0c2506e5fe40dfb2ca28b068cf225b35dda5fae0af84864df4edb560e05a SHA512 cfdeb9f345daef4b81acadfa24d711477ba208dffd50716087d034df2dc1eb0ac5bb03570f4f1701b3c4d46b8f954e6d23dde36fc20dafdc114e68730a1fc932
+EBUILD unreal-226.ebuild 2194 BLAKE2B 6863c259080438a133a86d81fc5e523bdf1123d77b4703420adabaf4803fb8fb9cc57409dfc1d92931e97fcf712f0fd499c617476fe3ff4c756d5a1e0ada82a0 SHA512 fc4dc6962c0b7779fc9dd0bb1dff2fa3e2f0a4d23b2c632a60e32a6e2a907a6e05fe887e4a1745f99385782152a10eeaf7ab852ed92e6bae38cf6b3bf6940125
+MISC metadata.xml 1029 BLAKE2B 66573c17f1f7598f72cf8fae650d16e05dcaeb082e99b7ecbc220bf765cafd2b4e45ead9f0c36d33989a6efedab7bf20e1b851e582de1f63b5733565e430893d SHA512 2a8b13fb3eb26a76f6f9bd0da9d186e05d10ad24112bc74d8b1494768e3360ea6059453e1fe1645df03f8f793f9a6ff695e5754117ecb90054279c960039de95
diff --git a/games-fps/unreal/files/unreal b/games-fps/unreal/files/unreal
new file mode 100644
index 000000000000..7bbeb753fbe9
--- /dev/null
+++ b/games-fps/unreal/files/unreal
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd GENTOO_DIR
+exec ./UnrealTournament "$@"
diff --git a/games-fps/unreal/metadata.xml b/games-fps/unreal/metadata.xml
new file mode 100644
index 000000000000..6a1fcf4b013c
--- /dev/null
+++ b/games-fps/unreal/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+In Unreal, players take on the role of a criminal whose transfer ship
+has crashed on the mysterious planet Gryphon, where a peaceful race
+known as the Nali have been hunted and enslaved by bloodthirsty aliens
+called Skaarj. To dominate Gryphon and mine its precious Tarydium, the
+Skaarj command legions of other menacing species like the gigantic
+Titans, the bio-engineered Brutes and the pack-hunting Krall. Unreal
+combatants must survive in the midst of this inter-species warfare
+armed with an array of deadly weapons. Players will visit ancient Nali
+ruins, underground mines, cities in the sky, spacecraft wreckage and
+even the mysterious Skaarj Mothership in this deadly hunt in which
+every character is both predator and prey.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/unreal/unreal-226.ebuild b/games-fps/unreal/unreal-226.ebuild
new file mode 100644
index 000000000000..81318a0aa9f4
--- /dev/null
+++ b/games-fps/unreal/unreal-226.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Futuristic FPS (a hack that runs on top of Unreal Tournament)"
+HOMEPAGE="http://www.unreal.com/ http://icculus.org/~chunky/ut/unreal/"
+SRC_URI="http://www.icculus.org/%7Echunky/ut/unreal/unreali-install.run
+ ftp://ftp.lokigames.com/pub/patches/ut/ut-install-436.run
+ ftp://ftp.lokigames.com/pub/patches/ut/IpDrv-436-Linux-08-20-02.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="X opengl"
+RESTRICT="mirror bindist"
+
+DEPEND="sys-libs/lib-compat
+ app-arch/unzip
+"
+RDEPEND="
+ >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ opengl? ( virtual/opengl[abi_x86_32(-)] )
+"
+
+S=${WORKDIR}
+
+src_unpack() {
+ export CDROM_NAME_1="Unreal CD"
+ export CDROM_NAME_2="Unreal Tournament CD"
+ cdrom_get_cds System/Unreal.ini System/UnrealTournament.ini
+ unpack_makeself unreali-install.run
+ mkdir ut
+ cd ut
+ unpack_makeself ut-install-436.run
+ unpack IpDrv-436-Linux-08-20-02.zip
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/unreal
+ dodir "${dir}"
+
+ tar -zxf ut/data.tar.gz -C "${D}/${dir}"
+ tar -zxf ut/OpenGL.ini.tar.gz -C "${D}/${dir}"
+ tar -zxf System.tar.gz -C "${D}/${dir}"
+ insinto "${dir}"/System
+ doins ut/IpDrv.so
+
+ cp -rf "${CDROM_ROOT}"/{Maps,Music,Sounds} "${D}/${dir}/"
+ for f in "${D}/${dir}"/Maps/Dm*.unr ; do
+ mv "${f}" "${f/Dm/DM-}"
+ done
+ dosym Maps "${dir}"/maps
+
+ if has_version '<games-fps/unreal-tournament-451' \
+ || has_version '<games-fps/unreal-tournament-goty-451' ; then
+ CDROM_ROOT="${GAMES_PREFIX_OPT}/unreal-tournament"
+ else
+ cdrom_load_next_cd
+ fi
+ insinto "${dir}"/Textures
+ doins "${CDROM_ROOT}"/Textures/*.utx
+ insinto "${dir}"/Sounds
+ doins "${CDROM_ROOT}"/Sounds/*.uax
+ insinto "${dir}"/System
+ doins "${CDROM_ROOT}"/System/*.u
+ insinto "${dir}"/Music
+ doins "${CDROM_ROOT}"/Music/*.umx
+
+ insinto "${dir}"
+ doins icon.* README*
+
+ exeinto "${dir}"
+ doexe bin/x86/unreal
+
+ games_make_wrapper unreal ./unreal "${dir}" "${dir}"
+
+ prepgamesdirs
+}
diff --git a/games-fps/urbanterror-4.3.4_p20180627 b/games-fps/urbanterror-4.3.4_p20180627
deleted file mode 100644
index 08ee23e19457..000000000000
--- a/games-fps/urbanterror-4.3.4_p20180627
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm pretend
-DEPEND=client? ( media-libs/libsdl2:=[X,sound,joystick,opengl,video] mumble? ( media-sound/mumble:= ) openal? ( media-libs/openal:= ) opus? ( media-libs/opusfile:= ) vorbis? ( media-libs/libvorbis:= ) ) curl? ( net-misc/curl ) ~games-fps/urbanterror-data-4.3.4 sys-libs/zlib:=[minizip] virtual/jpeg:0
-DESCRIPTION=Hollywood tactical shooter based on the ioquake3 engine
-EAPI=6
-HOMEPAGE=https://urbanterror.info https://github.com/mickael9/ioq3
-IUSE=+altgamma +client +curl debug mumble openal +opus server +skeetshootmod voip vorbis
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=client? ( media-libs/libsdl2:=[X,sound,joystick,opengl,video] mumble? ( media-sound/mumble:= ) openal? ( media-libs/openal:= ) opus? ( media-libs/opusfile:= ) vorbis? ( media-libs/libvorbis:= ) ) curl? ( net-misc/curl ) ~games-fps/urbanterror-data-4.3.4 sys-libs/zlib:=[minizip] virtual/jpeg:0
-REQUIRED_USE=|| ( client server ) voip? ( opus )
-SLOT=0
-SRC_URI=https://github.com/mickael9/ioq3/archive/e8c941ec8b753b9ecb4f8c4fcec07e4fe3babc64.tar.gz -> urbanterror-4.3.4_p20180627.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=79e7cf19aff009c8eb61bec007ad93e8
diff --git a/games-fps/urbanterror-data-4.3.4 b/games-fps/urbanterror-data-4.3.4
deleted file mode 100644
index 688e1ac20db9..000000000000
--- a/games-fps/urbanterror-data-4.3.4
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install prepare pretend setup
-DEPEND=app-arch/unzip
-DESCRIPTION=Data files for UrbanTerror
-EAPI=6
-HOMEPAGE=http://www.urbanterror.info
-KEYWORDS=~amd64 ~x86
-LICENSE=Q3AEULA-20000111 urbanterror-4.2-maps
-SLOT=0
-SRC_URI=https://up.barbatos.fr/urt/UrbanTerror43_full_2.zip -> urbanterror-data-4.3.0.zip https://up.barbatos.fr/urt/UrbanTerror-4.3.0-to-4.3.1.zip -> urbanterror-data-4.3.0-to-4.3.1.zip https://up.barbatos.fr/urt/UrbanTerror-4.3.1-to-4.3.2.zip -> urbanterror-data-4.3.1-to-4.3.2.zip https://up.barbatos.fr/urt/UrbanTerror-4.3.2-to-4.3.3.zip -> urbanterror-data-4.3.2-to-4.3.3.zip https://up.barbatos.fr/urt/UrbanTerror-4.3.3-to-4.3.4.zip -> urbanterror-data-4.3.3-to-4.3.4.zip
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=78966198a7d0177aac2105c55318c366
diff --git a/games-fps/urbanterror-data/Manifest b/games-fps/urbanterror-data/Manifest
new file mode 100644
index 000000000000..908b7f561cfa
--- /dev/null
+++ b/games-fps/urbanterror-data/Manifest
@@ -0,0 +1,7 @@
+DIST urbanterror-data-4.3.0-to-4.3.1.zip 7495315 BLAKE2B a4562c81169274e6f7685c9ca771c0e004ec40aa123d0757794e89c019bbd6e280f22e0929dc6917b0a43d9fe6e6ea90a4f190ce01ff2e6be087299a9bb64cab SHA512 f05564babadff73793778926411bc7914bfef4a5f7dfc1003c36e8a549c568ab520adcff8a38e7dd905238738d242aa865e7c6d7db36ed6d592b144e497ed823
+DIST urbanterror-data-4.3.0.zip 1490106979 BLAKE2B 2bee5e869b3929564cdba268765f6fda67ec1e4fb55209cac3f7b51b418bba287ba22112e5cd4db8ff2aae81ac836a31640760b1e4b24440054f2b2ee4d7e3c3 SHA512 2f54b59355f790a65b3dbd205e9e8b30d41856f5010a55e9e1436a6ec78e986ceecf78c8d84fac1060702c38a7df849f78a2832bdccb91ea46444877635b32ea
+DIST urbanterror-data-4.3.1-to-4.3.2.zip 15305498 BLAKE2B d3b21c893dc6f5ce2323ca383ff52c1f6711ba57ab752c30d8fbb76b5d72125427a14fc30127589c5612df34cfda869a0727a838006fd6fc566005a54b7e741d SHA512 cb24939fffef9310c6ca8496d0d4f3be8656685e749ff1d6589fd193990be67ac70494b61ef6a12dd1f6995a78d451b9f09098e03970e82e1e3153ec3f89792c
+DIST urbanterror-data-4.3.2-to-4.3.3.zip 10409736 BLAKE2B edc33e959cd16528ef732ae31335412c7c7741ccc5f106d2c0c6236f180cf9fd9b14a23b5e4a60d91aa9b8c4126fae5f110034216d5d2ae63ab784fc16532730 SHA512 f2100bf11b5dc0dac265f43fe6c8aa0a1e604728ce02b5b6ca770c9145d11bf02a7e2118ff818d1fdb2b9693ddb85eb012814f346337ef14c58c3a4f3e3abb90
+DIST urbanterror-data-4.3.3-to-4.3.4.zip 10421275 BLAKE2B 95ad6f395fef538fcb5e0413070fda7752759244d968649b0f59d2d9060cd79645a5485c554f2afc74028b7664dc907183ab99274db96826c00169ef5235c577 SHA512 05e14a1411a606fc7aeec3fa6393227af87afcf1ddd5ed5210c6612a9a1c15e0c4f9e14c40d43c078ac3fdbf519e9e8cb7d7a7983b7fceb39d11222d14ed39d6
+EBUILD urbanterror-data-4.3.4.ebuild 1653 BLAKE2B d20d9cc4c54cdf472141a3921a8c36cca785ff6634dcde49e6edbff5cb437a7122b19db6b46561f0df8c1bfc07a58fd12d6bf8fa5e2abf19638574e27ebdf6fb SHA512 e1583cdc80d7fb824234b85b0a12661cc5fe256c59547b89fb35e8742bc35dc6915457cd3b89df84ddbf375172994200aceffc4e4f8bc561baf8c448f2257a5b
+MISC metadata.xml 480 BLAKE2B 8a3fd7bc4b93959b7d499e9454896285f8bfa4e1abeccf08b3d419f278d51a1e708fbc261d69fd42964e2ac04b5c008a1b22d2f6ad3e275e762c9ace799bc8b7 SHA512 94c46a1dffab072012fbdda9831db4ed465561866d5f3c7ba01045ef6424780f690bfdf381dd32664f1237b65828fefa1199cae98c5fd23757ceda76142ef5a9
diff --git a/games-fps/urbanterror-data/metadata.xml b/games-fps/urbanterror-data/metadata.xml
new file mode 100644
index 000000000000..866bc44b9828
--- /dev/null
+++ b/games-fps/urbanterror-data/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>holgersson@posteo.de</email>
+ <name>Nils Freydank</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-fps/urbanterror-data/urbanterror-data-4.3.4.ebuild b/games-fps/urbanterror-data/urbanterror-data-4.3.4.ebuild
new file mode 100644
index 000000000000..0fbf35551184
--- /dev/null
+++ b/games-fps/urbanterror-data/urbanterror-data-4.3.4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit check-reqs eutils
+
+ENGINE_PV=${PV}
+
+MY_PN=UrbanTerror
+MY_PV=43_full
+
+DESCRIPTION="Data files for UrbanTerror"
+HOMEPAGE="http://www.urbanterror.info"
+
+# load the base image and save it as .0 file
+# use 43_full-2.zip as upstream fixed something back then
+SRC_URI="https://up.barbatos.fr/urt/${MY_PN}${MY_PV}_2.zip -> ${PN}-4.3.0.zip"
+
+# fetch updates recursively for |4.3.x-4.3.0|
+if [[ "${PV}" != "4.3.0" ]]; then
+ MY_CTR=0
+ while [[ "${MY_CTR}" -lt "${PV/4.3./}" ]]; do
+ SRC_URI="${SRC_URI} https://up.barbatos.fr/urt/${MY_PN}-4.3.${MY_CTR}-to-4.3.$(( ${MY_CTR} + 1 )).zip -> ${PN}-4.3.${MY_CTR}-to-4.3.$(( ${MY_CTR} + 1 )).zip"
+ MY_CTR=$(( ${MY_CTR} + 1 ))
+ done
+fi
+unset MY_CTR
+
+LICENSE="Q3AEULA-20000111 urbanterror-4.2-maps"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${MY_PN}43"
+
+CHECKREQS_DISK_BUILD="3300M"
+CHECKREQS_DISK_USR="1400M"
+
+src_prepare() {
+ default
+
+ # apply updates we fetched before
+ # again recursively for |4.3.x - 4.3.0|
+ local MY_CTR
+ if [[ "${PV}" != "4.3.0" ]]; then
+ MY_CTR=0
+ while [[ "${MY_CTR}" -lt "${PV/4.3./}" ]]; do
+ cp -dfpr \
+ "${WORKDIR}"/${MY_PN}-4.3.${MY_CTR}-to-4.3.$(( ${MY_CTR} + 1 ))/* "${S}"
+ MY_CTR=$(( ${MY_CTR} + 1 ))
+ done
+ fi
+}
+
+src_install() {
+ insinto /usr/share/urbanterror/q3ut4
+ doins q3ut4/*.pk3
+ # These files are *essential* for startup
+ newins q3ut4/server_example.cfg server.cfg
+ newins q3ut4/autoexec_example.cfg autoexec.cfg
+
+ dodoc q3ut4/readme43.txt
+ docinto examples
+ dodoc q3ut4/{server_example.cfg,mapcycle_example.txt}
+}
diff --git a/games-fps/urbanterror/Manifest b/games-fps/urbanterror/Manifest
new file mode 100644
index 000000000000..d2cc4f1ff165
--- /dev/null
+++ b/games-fps/urbanterror/Manifest
@@ -0,0 +1,5 @@
+AUX urbanterror-4.3-fix-build_system.patch 2774 BLAKE2B d750fab8dcf67e6ac37d6b9e44abf3c7961320bbd51093b198d31e470396dc415219b09ac910a7938a557b6af4d9df39bb7f35cf5e90bb56f97cd334b584db4c SHA512 90d06ee5bb77e13e34923f446c0e8e90fdef5628c6199a4f9508336aa0bb30c0ab273ac794a8eb483c2534e64bf81f76ef449ed90000314f227d39de572809f2
+AUX urbanterror-4.3.3_p20180218-fix-loop.patch 1442 BLAKE2B 045a018bb3476f94b471f62ccf3bacce2b68523de235698b47f2e98979f3a1284b826e9dc74f4fd225ba930057df6d9bed599872568330952fa4ffe0389e2563 SHA512 7a31cded5b99fda6f4c92f5d1ce9ef7606dc87f08a70efc3aea970e6a870e22aeb0a772f63a11d151cd227f68803e028b2f5adee381d8f65c523c585a474b53c
+DIST urbanterror-4.3.4_p20180627.tar.gz 10069715 BLAKE2B 179a952d51448af39636560e71c33dba8491fa195dd29d149f3d87d11ca2efff9a50041cdb585df9944361cfef8ac2b9efd2967cb6ffeeceb553fbc6aa17b218 SHA512 8eb314143fb336ff32d5b4a97075e54d5577570f1193c2220648ba7866373c8aa158015efebcb8325ade7964f4622baff8a30d89e889f64141d748bba28712ef
+EBUILD urbanterror-4.3.4_p20180627.ebuild 4525 BLAKE2B 66031a89f019f983363ad4d19f2cdaa6a28040234785ff2c873384bfa64070c51c037764f6158dd95d5c046e0b7c820afdf412119c99666bfc5ff64b348189cf SHA512 f67174fe11786d9dca773548c39fed04aa7ec2744d9f9887261253e52fdfa1ac2b03cb1dcc863db59819b87a2a3f055d2b0dd50bdccfc0dbe668df130ec3c52b
+MISC metadata.xml 1109 BLAKE2B 9e9f6a21667badafad0c007a2694a50ceaa467ce28fdc9b3f8838d58dd201f56b0b08c78d3285dfd53dd14db6c5ab26461cb400308abc920ce234048fdc48f8b SHA512 cb55a92c3c03065a17f71e5cfc8151a8c12acbc341389a14f96119960eb23c11613adaa8e9b552946d2db728121118a5130447c892d61a1a909b4dd8b94a5dcc
diff --git a/games-fps/urbanterror/files/urbanterror-4.3-fix-build_system.patch b/games-fps/urbanterror/files/urbanterror-4.3-fix-build_system.patch
new file mode 100644
index 000000000000..e0c4eb27f539
--- /dev/null
+++ b/games-fps/urbanterror/files/urbanterror-4.3-fix-build_system.patch
@@ -0,0 +1,99 @@
+Author: Nils Freydank <holgersson@posteo.de>
+Date: Fri Nov 17 20:30:00 2017 +0100
+
+Respect CFLAGS, CPPFLAGS etc. This patch is inspired
+by hasufell’s patch.
+
+Edit 2018-03-19: Now with server support!
+
+--- a/Makefile 2018-03-19 11:00:00.000000000 +0100
++++ b/Makefile 2018-03-19 11:00:00.000000001 +0100
+@@ -223,7 +223,7 @@
+ ifndef USE_ALTGAMMA
+ # Clearskies - X11-based gamma for Linux
+ USE_ALTGAMMA=1
+-endif
++ endif
+
+ ifndef USE_SKEETMOD
+ USE_SKEETMOD=0
+@@ -306,34 +306,33 @@
+ CLIENT_EXTRA_FILES=
+
+ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
+- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+- -pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\"
++ BASE_CFLAGS = -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\"
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
+
+- OPTIMIZEVM = -O3
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
++ OPTIMIZEVM =
++ OPTIMIZE = $(OPTIMIZEVM)
+
+ ifeq ($(ARCH),x86_64)
+- OPTIMIZEVM = -O3
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
++ OPTIMIZEVM =
++ OPTIMIZE = $(OPTIMIZEVM)
+ HAVE_VM_COMPILED = true
+ else
+ ifeq ($(ARCH),x86)
+- OPTIMIZEVM = -O3 -march=i586
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
++ OPTIMIZEVM =
++ OPTIMIZE = $(OPTIMIZEVM)
+ HAVE_VM_COMPILED=true
+ else
+ ifeq ($(ARCH),ppc)
+- BASE_CFLAGS += -maltivec
++ BASE_CFLAGS +=
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),ppc64)
+- BASE_CFLAGS += -maltivec
++ BASE_CFLAGS +=
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),sparc)
+- OPTIMIZE += -mtune=ultrasparc3 -mv8plus
+- OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
++ OPTIMIZE +=
++ OPTIMIZEVM +=
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),armv7l)
+@@ -1130,12 +1129,12 @@
+
+ define DO_CC
+ $(echo_cmd) "CC $<"
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
++$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+ endef
+
+ define DO_REF_CC
+ $(echo_cmd) "REF_CC $<"
+-$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
++$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+ endef
+
+ define DO_REF_STR
+@@ -1148,7 +1147,7 @@
+
+ define DO_BOT_CC
+ $(echo_cmd) "BOT_CC $<"
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $<
++$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $<
+ endef
+
+ ifeq ($(GENERATE_DEPENDENCIES),1)
+@@ -1162,7 +1161,7 @@
+
+ define DO_DED_CC
+ $(echo_cmd) "DED_CC $<"
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $<
++$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(CPPFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+ endef
+
+ define DO_WINDRES
+
diff --git a/games-fps/urbanterror/files/urbanterror-4.3.3_p20180218-fix-loop.patch b/games-fps/urbanterror/files/urbanterror-4.3.3_p20180218-fix-loop.patch
new file mode 100644
index 000000000000..c34ebe84cedf
--- /dev/null
+++ b/games-fps/urbanterror/files/urbanterror-4.3.3_p20180218-fix-loop.patch
@@ -0,0 +1,59 @@
+Author: Nils Freydank <holgersson@posteo.de>
+Date: Wed Mar 14 21:00:00 2017 +0100
+
+Imported patch written by Tom Murphy via github.com:
+
+https://github.com/ioquake/ioq3/pull/356
+
+diff --git a/code/sys/con_tty.c b/code/sys/con_tty.c
+index 2c2b595cf..58f178ade 100644
+--- a/code/sys/con_tty.c
++++ b/code/sys/con_tty.c
+@@ -73,20 +73,6 @@ static int hist_current = -1, hist_count = 0;
+ #define TTY_CONSOLE_PROMPT "]"
+ #endif
+
+-/*
+-==================
+-CON_FlushIn
+-
+-Flush stdin, I suspect some terminals are sending a LOT of shit
+-FIXME relevant?
+-==================
+-*/
+-static void CON_FlushIn( void )
+-{
+- char key;
+- while (read(STDIN_FILENO, &key, 1)!=-1);
+-}
+-
+ /*
+ ==================
+ CON_Back
+@@ -441,7 +427,7 @@ char *CON_Input( void )
+ TTY_con = *history;
+ CON_Show();
+ }
+- CON_FlushIn();
++ tcflush(STDIN_FILENO, TCIFLUSH);
+ return NULL;
+ break;
+ case 'B':
+@@ -455,7 +441,7 @@ char *CON_Input( void )
+ Field_Clear(&TTY_con);
+ }
+ CON_Show();
+- CON_FlushIn();
++ tcflush(STDIN_FILENO, TCIFLUSH);
+ return NULL;
+ break;
+ case 'C':
+@@ -467,7 +453,7 @@ char *CON_Input( void )
+ }
+ }
+ Com_DPrintf("droping ISCTL sequence: %d, TTY_erase: %d\n", key, TTY_erase);
+- CON_FlushIn();
++ tcflush(STDIN_FILENO, TCIFLUSH);
+ return NULL;
+ }
+ if (TTY_con.cursor >= sizeof(text) - 1)
diff --git a/games-fps/urbanterror/metadata.xml b/games-fps/urbanterror/metadata.xml
new file mode 100644
index 000000000000..38fad51f813c
--- /dev/null
+++ b/games-fps/urbanterror/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>holgersson@posteo.de</email>
+ <name>Nils Freydank</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="altgamma">Alternative way for gamma setting with modesetting driver</flag>
+ <flag name="client">Build binary for client (includes code for non-dedicated server)</flag>
+ <flag name="mumble">Use Mumble for ingame VoIP (experimental)</flag>
+ <flag name="opus">Use opus as sound codec</flag>
+ <flag name="server">Build binary for dedicated server</flag>
+ <flag name="skeetshootmod">Build support for skeetshoot mod for specific maps</flag>
+ <flag name="voip">Use ioq3 ingame VoIP (experimental)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Barbatos/ioq3-for-UrbanTerror-4</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/urbanterror/urbanterror-4.3.4_p20180627.ebuild b/games-fps/urbanterror/urbanterror-4.3.4_p20180627.ebuild
new file mode 100644
index 000000000000..04d4459533ea
--- /dev/null
+++ b/games-fps/urbanterror/urbanterror-4.3.4_p20180627.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit desktop eapi7-ver flag-o-matic toolchain-funcs xdg-utils
+
+DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine"
+HOMEPAGE="https://urbanterror.info https://github.com/mickael9/ioq3"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/mickael9/ioq3.git"
+ EGIT_BRANCH="urt"
+else
+ COMMIT_ID="e8c941ec8b753b9ecb4f8c4fcec07e4fe3babc64"
+ SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ioq3-${COMMIT_ID}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+altgamma +client +curl debug mumble openal +opus server +skeetshootmod voip vorbis"
+REQUIRED_USE="|| ( client server )
+ voip? ( opus )"
+
+DOCS=( ChangeLog README.md README.ioq3.md md4-readme.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.3-fix-build_system.patch
+ "${FILESDIR}"/${PN}-4.3.3_p20180218-fix-loop.patch
+)
+
+RDEPEND="
+ client? (
+ media-libs/libsdl2:=[X,sound,joystick,opengl,video]
+ mumble? ( media-sound/mumble:= )
+ openal? ( media-libs/openal:= )
+ opus? ( media-libs/opusfile:= )
+ vorbis? ( media-libs/libvorbis:= )
+ )
+ curl? ( net-misc/curl )
+ ~games-fps/urbanterror-data-4.3.4
+ sys-libs/zlib:=[minizip]
+ virtual/jpeg:0
+"
+
+DEPEND="${RDEPEND}"
+
+pkg_pretend() {
+ if use client; then
+ if ! use openal && ! use opus && ! use vorbis; then
+ ewarn
+ ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!"
+ fi
+ fi
+}
+
+src_configure() {
+ default
+
+ tc-export CC
+}
+
+src_compile() {
+ # Workaround for used zlib macro, which got renamed in Gentoo
+ # wrt bug #449510
+ append-cppflags "-DOF=_Z_OF"
+
+ local myemakeargs=(
+ ARCH=$(usex amd64 "x86_64" "i686" )
+ DEFAULT_BASEDIR="/usr/share/urbanterror"
+ BUILD_CLIENT=$(usex "client" 1 0)
+ BUILD_SERVER=$(usex "server" 1 0)
+ BUILD_BASEGAME=1
+ BUILD_MISSIONPACK=0
+ BUILD_GAME_SO=0
+ BUILD_GAME_QVM=0
+ BUILD_STANDALONE=1
+ SERVERBIN="Quake3-UrT-Ded"
+ CLIENTBIN="Quake3-UrT"
+ USE_RENDERER_DLOPEN=0
+ USE_YACC=0
+ BASEGAME="q3ut4"
+ BASEGAME_CFLAGS="${CFLAGS}"
+ USE_OPENAL=$(usex "openal" 1 0)
+ USE_OPENAL_DLOPEN=$(usex "openal" 1 0)
+ USE_CURL=$(usex "curl" 1 0)
+ USE_CURL_DLOPEN=$(usex "curl" 1 0)
+ USE_CODEC_VORBIS=$(usex "vorbis" 1 0)
+ USE_CODEC_OPUS=$(usex "opus" 1 0)
+ USE_MUMBLE=$(usex "mumble" 1 0)
+ USE_SKEETMOD=$(usex "skeetshootmod" 1 0)
+ USE_VOIP=$(usex "mumble" 1 0)
+ USE_INTERNAL_LIBS=0
+ USE_LOCAL_HEADERS=0
+ USE_ALTGAMMA=$(usex "altgamma" 1 0)
+ $(usex "debug" "debug" "release")
+ )
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ local myarch=$(usex amd64 "x86_64" "i386")
+ local myreleasetype=$(usex debug "debug" "release")
+
+ if use client; then
+ newbin build/${myreleasetype}-linux-${myarch}/Quake3-UrT.${myarch} ${PN}
+ # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html
+ make_desktop_entry ${PN} "UrbanTerror" ${PN}
+ fi
+
+ if use server && ! use client; then
+ # dedicated server only
+ newbin build/${myreleasetype}-linux-${myarch}/Quake3-UrT-Ded.${myarch} ${PN}-ded
+ fi
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ use client && xdg_desktop_database_update
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # ^this is a new installation, so:
+ if use openal; then
+ elog ""
+ elog "You might need to set:"
+ elog " seta s_useopenal \"1\""
+ elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work."
+ fi
+
+ if use altgamma; then
+ elog ""
+ elog "You might need to set:"
+ elog " seta r_altgamma \"1\""
+ elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work."
+ elog "Be aware that altgamme works on a global scale, so external"
+ elog "applications like redshift can cause trouble. Disabling"
+ elog "these while playing is a usable workaround."
+ fi
+
+ if ! use altgamma; then
+ elog ""
+ elog "If you are using a modesetting graphics driver you might"
+ elog "consider setting USE=\"altgamma\"."
+ elog "For details take a look at:"
+ elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222"
+ fi
+
+ if ! use client; then
+ elog ""
+ elog "You disabled client support. You won't be able to connect"
+ elog "to any servers and play. If you want to do so, enable"
+ elog "USE=\"client\"."
+ fi
+
+ if use skeetshootmod; then
+ elog ""
+ elog "You might need to set:"
+ elog " seta sv_skeetshoot \"1\""
+ elog "in your ~/.q3a/q3ut4/q3config.cfg to use the skeetshoot mod."
+ fi
+ fi
+}
+
+pkg_postrm() {
+ use client && xdg_desktop_database_update
+}
diff --git a/games-fps/ut2003-2225-r4 b/games-fps/ut2003-2225-r4
deleted file mode 100644
index 77f2baa7b9f8..000000000000
--- a/games-fps/ut2003-2225-r4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare setup unpack
-DESCRIPTION=Sequel to the 1999 Game of the Year multi-player first-person shooter
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2003.com/
-IUSE=dedicated
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-RDEPEND=games-fps/ut2003-data dedicated? ( games-server/ut2003-ded ) !dedicated? ( virtual/opengl[abi_x86_32(-)] ) games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=ftp://ftp.infogrames.net/misc/ut2003/ut2003lnx_patch2225.tar.tar
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4dd2599c108058dc908112ce8825ade2
diff --git a/games-fps/ut2003-bonuspack-cm-1 b/games-fps/ut2003-bonuspack-cm-1
deleted file mode 100644
index 0575fcc47219..000000000000
--- a/games-fps/ut2003-bonuspack-cm-1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-fps/ut2003 app-arch/unzip
-DESCRIPTION=Community Bonus Pack for UT2003
-EAPI=5
-HOMEPAGE=https://liandri.beyondunreal.com/Unreal_Tournament_2003
-KEYWORDS=~x86
-LICENSE=ut2003
-RDEPEND=games-fps/ut2003 games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=1
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/cbp2003.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=30bb1756e3768840371182dd82429c5e
diff --git a/games-fps/ut2003-bonuspack-cm/Manifest b/games-fps/ut2003-bonuspack-cm/Manifest
new file mode 100644
index 000000000000..f4483b3d052b
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-cm/Manifest
@@ -0,0 +1,3 @@
+DIST cbp2003.zip 149198671 BLAKE2B c5f7352b7fb1e0e6a18c99a6212cd5cb4e5e6144988534f91aed93bf33b031d437e86eebf239f0a49fa20b90ca0ded09e912a96b798bc855d527423f2a299ba7 SHA512 92e136c03f1385a28163718cc6ef1c36e46fbad14c74d0f266dfe3d9f4a5093e1bd02dde54e68f70539ba2c4ee163b1e886529f7e734059a85223ab6f853a474
+EBUILD ut2003-bonuspack-cm-1.ebuild 799 BLAKE2B 61040ee3113609c8eae4fa49fa2a9ccf0663d891e38783d7b0af9f2824b30e6dd6a4f77dc1a28b6201c248b654c6ba1c03ad86d76fa687c125de55caf7ef5157 SHA512 8bd64550a6a770e531aa42a7cf41933860ec363d3e278fdaf57d2969ecf4dda135b7ae81e8ab44b83094b4425e64a304f1ca83f4d47df31276d414b51f4e378b
+MISC metadata.xml 771 BLAKE2B 705c6aa979f650220a52db3ef5d8c5b8b468b28eac8692a2fbe583ed4b3f694fdfe088d64cc3f6d8506494522f8ca11b491e21e322e3f50ff4453e93ce0d543f SHA512 d30d55503e3b3897d2a5093c06a39f684bdf0879214931a360a87637cd62ae1ca019577f42275bf2b4ba28649ab2989b0a2e184998497ddc5ffddbb6ba35ef5e
diff --git a/games-fps/ut2003-bonuspack-cm/metadata.xml b/games-fps/ut2003-bonuspack-cm/metadata.xml
new file mode 100644
index 000000000000..e716a53e0747
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-cm/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is commercial software and requires data from the original retail discs to play. If you're interested in checking out the technology behind Unreal Tournament 2003, you can "emerge ut2003-demo" to get the playable demo.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild b/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild
new file mode 100644
index 000000000000..56ad68474614
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+IUSE=""
+DESCRIPTION="Community Bonus Pack for UT2003"
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2003"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/cbp2003.zip"
+
+LICENSE="ut2003"
+SLOT="1"
+KEYWORDS="~x86"
+RESTRICT="mirror strip"
+
+RDEPEND="games-fps/ut2003"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/ut2003
+Ddir=${D}/${dir}
+
+src_unpack() {
+ unzip -qq "${DISTDIR}"/${A} || die
+}
+
+src_install() {
+ for i in Animations Help Music Maps StaticMeshes Textures System
+ do
+ mkdir -p "${Ddir}"/${i} || die
+ done
+ games_umod_unpack CBP2003.ut2mod
+ rm "${Ddir}/Readme.txt" "${Ddir}/cbp installer logo1.bmp"
+ prepgamesdirs
+}
diff --git a/games-fps/ut2003-bonuspack-de-1 b/games-fps/ut2003-bonuspack-de-1
deleted file mode 100644
index d2b617c4c82a..000000000000
--- a/games-fps/ut2003-bonuspack-de-1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-fps/ut2003 app-arch/unzip
-DESCRIPTION=Digital Extremes Bonus Pack for UT2003
-EAPI=5
-HOMEPAGE=https://www.moddb.com/games/unreal-tournament-2003
-KEYWORDS=~x86
-LICENSE=ut2003
-RDEPEND=games-fps/ut2003 games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=1
-SRC_URI=http://ftp.student.utwente.nl/pub/games/UT2003/BonusPack/debonus.ut2mod.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1280c87439e76a96c3f6b50e7f5cdb88
diff --git a/games-fps/ut2003-bonuspack-de/Manifest b/games-fps/ut2003-bonuspack-de/Manifest
new file mode 100644
index 000000000000..03b7e7c3b808
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-de/Manifest
@@ -0,0 +1,3 @@
+DIST debonus.ut2mod.zip 74977458 BLAKE2B bd9c91524e1d3b3ac24434c7daedd886044884cbb36b919452e408b73de317cf43b1c18e3f843a0c272652dd40ae7ad2da007d87ea370da23e88ea599c1026ab SHA512 2c70d39eea1ea647d2fbee21dda5b00057b7feb1607a89d86982ac43e6063820aa70c633fbc21c768d1491fec909a06634e0e883aa771be2607b51ab193f0935
+EBUILD ut2003-bonuspack-de-1.ebuild 744 BLAKE2B c7995eef8b98f54ccee81554edcfa61c020ad715a800195c1000916d379b5bcd7807405f4eed87359f4dbd9760809833204fa96340f34d868d909d0c95c84fea SHA512 016eafeed87552d793a1048f07f7e78cbaa077ddfcfbd76c0e51da71b167546e72dabbbe50107b70f3c4d92fb6ce1bde575830549aa682e854830e494da77e84
+MISC metadata.xml 771 BLAKE2B 705c6aa979f650220a52db3ef5d8c5b8b468b28eac8692a2fbe583ed4b3f694fdfe088d64cc3f6d8506494522f8ca11b491e21e322e3f50ff4453e93ce0d543f SHA512 d30d55503e3b3897d2a5093c06a39f684bdf0879214931a360a87637cd62ae1ca019577f42275bf2b4ba28649ab2989b0a2e184998497ddc5ffddbb6ba35ef5e
diff --git a/games-fps/ut2003-bonuspack-de/metadata.xml b/games-fps/ut2003-bonuspack-de/metadata.xml
new file mode 100644
index 000000000000..e716a53e0747
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-de/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is commercial software and requires data from the original retail discs to play. If you're interested in checking out the technology behind Unreal Tournament 2003, you can "emerge ut2003-demo" to get the playable demo.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/ut2003-bonuspack-de/ut2003-bonuspack-de-1.ebuild b/games-fps/ut2003-bonuspack-de/ut2003-bonuspack-de-1.ebuild
new file mode 100644
index 000000000000..e983511c3272
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-de/ut2003-bonuspack-de-1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+MY_P="debonus.ut2mod.zip"
+DESCRIPTION="Digital Extremes Bonus Pack for UT2003"
+HOMEPAGE="https://www.moddb.com/games/unreal-tournament-2003"
+SRC_URI="http://ftp.student.utwente.nl/pub/games/UT2003/BonusPack/${MY_P}"
+
+LICENSE="ut2003"
+SLOT="1"
+KEYWORDS="~x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="games-fps/ut2003"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/ut2003
+Ddir=${D}/${dir}
+
+src_unpack() {
+ unzip -qq "${DISTDIR}"/${A} || die
+}
+
+src_install() {
+ mkdir -p "${Ddir}"/{System,Maps,StaticMeshes,Textures,Music,Help} || die
+ games_umod_unpack DEBonus.ut2mod
+ prepgamesdirs
+}
diff --git a/games-fps/ut2003-bonuspack-epic-1 b/games-fps/ut2003-bonuspack-epic-1
deleted file mode 100644
index 0699b1fb43e7..000000000000
--- a/games-fps/ut2003-bonuspack-epic-1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Epic Bonus Pack for UT2003
-EAPI=5
-HOMEPAGE=https://www.moddb.com/games/unreal-tournament-2003
-KEYWORDS=~x86
-LICENSE=ut2003
-RDEPEND=games-fps/ut2003 games-misc/games-envd
-RESTRICT=strip
-SLOT=1
-SRC_URI=http://ftp.student.utwente.nl/pub/games/UT2003/BonusPack/UT2003-epicbonuspackone.exe
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=57b8ff35c90a286f0cb316d8fd6656f1
diff --git a/games-fps/ut2003-bonuspack-epic/Manifest b/games-fps/ut2003-bonuspack-epic/Manifest
new file mode 100644
index 000000000000..43f229037b16
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-epic/Manifest
@@ -0,0 +1,4 @@
+AUX epic-installer 925 BLAKE2B 4d86c44875d58a01e4226fc746aba8d3fa44875554c4aa4ed150797a4d157915cf0335420a019f6b9d32689e1f34f774cfd8ee756996d890240ff558d5bf22a9 SHA512 0e49953e28c1be196c67d5d29a5f6ac0f636f1315a18bf883c35c8236b74f4a5aea45693fba013578592bb0601a9eaa734446cfd533af70db9a24371162c2524
+DIST UT2003-epicbonuspackone.exe 156913152 BLAKE2B ea420203dfd7f12a1f790d06875af34073fa30764a7184d6945e97063291100ef4377025afb86fab2038f7a824d60e2c93b991202465864de993456b10638f94 SHA512 26fa06637c6a99704d11b58f5fe54454f8018c6f07b06b6a9a2075d17b9a9fb7d7155298de5502cefa0f07995f4513ce9531863cef8c344996b5e6dd5fbd339d
+EBUILD ut2003-bonuspack-epic-1.ebuild 2504 BLAKE2B 014935b88571701eabfcd1a0ccabc2fa50fe34cd89674ceac244320529045ae9a0794b87a4ff25474f29ec28ca5f6935f9370bf8a19fa5dbd877bac64822376a SHA512 a761a8651258e62193151ff6d6919d975bc40fcf4663f290309c8322166f242f836d69ac1bcd387176f53b18cf202c263f2e82bd80eabf11140604a2b2d7c8c0
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2003-bonuspack-epic/files/epic-installer b/games-fps/ut2003-bonuspack-epic/files/epic-installer
new file mode 100644
index 000000000000..a8c35aa0c751
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-epic/files/epic-installer
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+if [[ -d $HOME/.ut2003/System ]] ; then
+ cd "$HOME/.ut2003/System"
+ echo "Editing UT2003.ini in $PWD"
+ cat >> UT2003.ini <<EOT
+
+[Xinterface.Tab_AudioSettings]
+BonusPackInfo[1]=(PackageName="AnnouncerEvil.uax",Description="Evil")
+BonusPackInfo[2]=(PackageName="AnnouncerFemale.uax",Description="Female")
+BonusPackInfo[3]=(PackageName="AnnouncerSexy.uax",Description="Aroused")
+
+EOT
+
+ ed UT2003.ini >/dev/null 2>&1 <<EOT
+/\[xInterface.ExtendedConsole\]
+a
+MusicManagerClassName=OGGPlayer.UT2OGGMenu
+.
+wq
+EOT
+
+ ed UT2003.ini >/dev/null 2>&1 <<EOT
+$
+?EditPackages?
+a
+EditPackages=BonusPack
+EditPackages=SkaarjPack
+EditPackages=SkaarjPack_rc
+.
+wq
+EOT
+
+ ed UT2003.ini >/dev/null 2>&1 <<EOT
+$
+?ServerPackages?
+a
+ServerPackages=BonusPack
+ServerPackages=SkaarjPack
+ServerPackages=SkaarjPack_rc
+.
+wq
+EOT
+
+ echo "Editing User.ini in $PWD"
+ sed 's/^F11=.*$/F11=MusicMenu/g' < User.ini > User.ini~~
+ mv User.ini~~ User.ini
+fi
diff --git a/games-fps/ut2003-bonuspack-epic/metadata.xml b/games-fps/ut2003-bonuspack-epic/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-epic/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild b/games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild
new file mode 100644
index 000000000000..00d2d8927eef
--- /dev/null
+++ b/games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit games
+
+DESCRIPTION="Epic Bonus Pack for UT2003"
+HOMEPAGE="https://www.moddb.com/games/unreal-tournament-2003"
+SRC_URI="http://ftp.student.utwente.nl/pub/games/UT2003/BonusPack/UT2003-epicbonuspackone.exe"
+
+LICENSE="ut2003"
+SLOT="1"
+KEYWORDS="~x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="games-fps/ut2003"
+
+S=${WORKDIR}/UT2003-BonusPack
+
+dir=${GAMES_PREFIX_OPT}/ut2003
+Ddir=${D}/${dir}
+
+src_unpack() {
+ unzip -qq "${DISTDIR}"/${A} || die
+ # This is done since the files are the same
+ rm -f "${S}"/Textures/LastManStanding.utx || die
+}
+
+src_install() {
+ insinto "${dir}"/Help
+ newins "${S}"/Help/BonusPackReadme.txt EpicBonusPack.README
+
+ exeinto "${dir}"
+ doexe "${FILESDIR}"/epic-installer
+ dodir "${dir}"/System
+
+ cp -r "${S}"/{Maps,Sounds,StaticMeshes,Textures} "${Ddir}" || die
+ cp "${S}"/System/{*.{det,est,frt,int,itt,kot,tmt,u},User.ini} "${Ddir}"/System || die
+ cp -v "${S}"/System/Manifest.ini "${Ddir}"/System/Manifest.ini.epic || die
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "You will need to run:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "to make the necessary changes to the system .ini files."
+ elog
+ elog "Each user whom has already played the game will need to run:"
+ elog " ${dir}/epic-installer"
+ echo
+ elog "to update their configuration files in their home directory."
+ echo
+}
+
+pkg_config() {
+ cd ${dir}/System || die
+ cp Manifest.ini Manifest.ini.pre-epic || die
+ cp ${dir}/System/Manifest.ini.epic Manifest.ini || die
+
+ cp Default.ini Default.ini.pre-epic || die
+ cat >> Default.ini <<EOT
+
+[Xinterface.Tab_AudioSettings]
+BonusPackInfo[1]=(PackageName="AnnouncerEvil.uax",Description="Evil")
+BonusPackInfo[2]=(PackageName="AnnouncerFemale.uax",Description="Female")
+BonusPackInfo[3]=(PackageName="AnnouncerSexy.uax",Description="Aroused")
+
+EOT
+
+ ed Default.ini >/dev/null 2>&1 <<EOT
+/\[xInterface.ExtendedConsole\]
+a
+MusicManagerClassName=OGGPlayer.UT2OGGMenu
+.
+w
+q
+EOT
+
+ ed Default.ini >/dev/null 2>&1 <<EOT
+$
+?EditPackages?
+a
+EditPackages=BonusPack
+EditPackages=SkaarjPack
+EditPackages=SkaarjPack_rc
+.
+w
+q
+EOT
+
+ ed Default.ini >/dev/null 2>&1 <<EOT
+$
+?ServerPackages?
+a
+ServerPackages=BonusPack
+ServerPackages=SkaarjPack
+ServerPackages=SkaarjPack_rc
+.
+w
+q
+EOT
+
+ cp DefUser.ini DefUser.ini.pre-epic || die
+ sed -i 's/^F11=.*$/F11=MusicMenu/g' DefUser.ini || die
+ chown games:games ${dir}/System/*.ini || die
+}
diff --git a/games-fps/ut2003-data-2107 b/games-fps/ut2003-data-2107
deleted file mode 100644
index 825e5d894ac2..000000000000
--- a/games-fps/ut2003-data-2107
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip games-util/uz2unpack
-DESCRIPTION=Unreal Tournament 2003 - Sequel to the 1999 multi-player first-person shooter
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2003.com/
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-PROPERTIES=interactive
-RDEPEND=games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://download.factoryunreal.com/mirror/UT2003CrashFix.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=41fea78d1a305b47e6af75e5cf5ce9d7
diff --git a/games-fps/ut2003-data/Manifest b/games-fps/ut2003-data/Manifest
new file mode 100644
index 000000000000..d8c5cfffde7e
--- /dev/null
+++ b/games-fps/ut2003-data/Manifest
@@ -0,0 +1,3 @@
+DIST UT2003CrashFix.zip 2764 BLAKE2B 697c35a02f447d0d436fc32bebdeafbca55ef644d951e92085c33f7597108625770b76e027f31287cd2ac66607692ff8c908f6971f936a134d58d0effc2586fc SHA512 24fdaac873b08a0860c23f66b9bd93922fc4f64486adbe9bfefeb340f9d9374778b5e7bacd0e12cc79d819fb340e007ab2a7f1f45c9e4f27ab3ab6b11033d444
+EBUILD ut2003-data-2107.ebuild 4035 BLAKE2B 74da1f7c3dd392d9d9c7bc4a7123cdb7a0aec4c36aaa9582146f5db4deb20171149475d4434193f089d1bc2888831d401a7749a3e5027f27a0f96a912918116e SHA512 7ccaba13a464a8f17242f564dbed14e6f2345275e8798e5e2779e4167bde30dec7d25df8df0aaf3e471504048aff3aec7f1a8cda3b9e8225c83d2160d6829c9a
+MISC metadata.xml 771 BLAKE2B 705c6aa979f650220a52db3ef5d8c5b8b468b28eac8692a2fbe583ed4b3f694fdfe088d64cc3f6d8506494522f8ca11b491e21e322e3f50ff4453e93ce0d543f SHA512 d30d55503e3b3897d2a5093c06a39f684bdf0879214931a360a87637cd62ae1ca019577f42275bf2b4ba28649ab2989b0a2e184998497ddc5ffddbb6ba35ef5e
diff --git a/games-fps/ut2003-data/metadata.xml b/games-fps/ut2003-data/metadata.xml
new file mode 100644
index 000000000000..e716a53e0747
--- /dev/null
+++ b/games-fps/ut2003-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is commercial software and requires data from the original retail discs to play. If you're interested in checking out the technology behind Unreal Tournament 2003, you can "emerge ut2003-demo" to get the playable demo.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/ut2003-data/ut2003-data-2107.ebuild b/games-fps/ut2003-data/ut2003-data-2107.ebuild
new file mode 100644
index 000000000000..933dc8498d89
--- /dev/null
+++ b/games-fps/ut2003-data/ut2003-data-2107.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Unreal Tournament 2003 - Sequel to the 1999 multi-player first-person shooter"
+HOMEPAGE="http://www.unrealtournament2003.com/"
+SRC_URI="http://download.factoryunreal.com/mirror/UT2003CrashFix.zip"
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+RDEPEND=""
+DEPEND="app-arch/unzip
+ games-util/uz2unpack"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/ut2003
+Ddir=${D}/${dir}
+
+pkg_setup() {
+ games_pkg_setup
+ ewarn "The installed game takes about 2.7GB of space!"
+}
+
+src_unpack() {
+ cdrom_get_cds System/Packages.md5 StaticMeshes/AWHardware.usx.uz2 \
+ Extras/MayaPLE/Maya4PersonalLearningEditionEpic.exe
+ unzip "${DISTDIR}"/UT2003CrashFix.zip || die
+}
+
+src_install() {
+ insinto "${dir}"
+ # Disk 1
+ einfo "Copying files from Disk 1..."
+ doins -r "${CDROM_ROOT}"/{Animations,ForceFeedback,KarmaData,Maps,Sounds,Textures,Web}
+ insinto "${dir}"/System
+ doins -r "${CDROM_ROOT}"/System/{editorres,*.{bmp,dat,det,est,frt,ini,int,itt,md5,u,upl,url}}
+ insinto "${dir}"/Benchmark/Stuff
+ doins -r "${CDROM_ROOT}"/Benchmark/Stuff/*
+ cdrom_load_next_cd
+
+ # Disk 2
+ insinto "${dir}"
+ einfo "Copying files from Disk 2..."
+ doins -r "${CDROM_ROOT}"/{Music,Sounds,StaticMeshes,Textures}
+ cdrom_load_next_cd
+
+ # Disk 3
+ einfo "Copying files from Disk 3..."
+ doins -r "${CDROM_ROOT}"/Sounds
+
+ # TODO: move this to src_unpack, where it belongs
+ unpack_makeself "${CDROM_ROOT}"/linux_installer.sh || die
+ tar xf "${S}"/ut2003lnxbins.tar || die
+
+ # create empty files in Benchmark
+ for j in {CSVs,Logs,Results} ; do
+ mkdir -p "${Ddir}"/Benchmark/${j} || die
+ touch "${Ddir}"/Benchmark/${j}/DO_NOT_DELETE.ME || die
+ done
+
+ # Cleaning up our installation
+ rm "${Ddir}"/System/{Build,Def{ault,User},Manifest,UT2003,User}.ini || die
+ rm -f "${Ddir}"/System/{Core,Engine,Setup,UnrealGame,Window,XGame,XInterface,XWeapons}.{det,est,frt,int,itt,u} || die
+ rm -rf "${Ddir}"/Web/ServerAdmin || die
+ rm -f "${Ddir}"/System/{Editor,Fire,IpDrv,UnrealEd,Vehicles,XEffects,XPickups,XWebAdmin}.u || die
+ rm -f "${Ddir}"/System/{UWeb,XAdmin}.{int,u} || die
+ rm -f "${Ddir}"/System/GamePlay.{det,itt,u} || die
+ rm -f "${Ddir}"/System/XMaps.{det,est} "${Ddir}"/System/Xweapons.itt || die
+ rm -f "${Ddir}"/System/Manifest.int "${Ddir}"/System/Packages.md5 || die
+
+ # install extra help files
+ insinto "${dir}"/Help
+ doins "${S}"/Help/Unreal.bmp
+
+ # install Default and DefUser ini files
+ insinto "${dir}"/System
+ doins "${S}"/System/Def{ault,User}.ini
+
+ # install eula
+ insinto "${dir}"
+ doins "${S}"/eula/License.int
+
+ # copying extra/updater
+ doins -r "${S}"/{extras,updater}
+ rm -f "${Ddir}"/updater/update || die
+
+ # copy libraries
+ exeinto "${dir}"/System
+ doexe "${S}"/System/libSDL-1.2.so.0 || die
+
+ # uncompressing files
+ einfo "Uncompressing files... this may take a while..."
+ for j in {Animations,Maps,Sounds,StaticMeshes,Textures} ; do
+ games_ut_unpack "${Ddir}"/${j} || die "uncompressing files"
+ done
+
+ # installing documentation/icon
+ dodoc "${S}"/README.linux || die "dodoc README.linux"
+ newicon "${S}"/Unreal.xpm ut2003.xpm || die "copying icon"
+ doins "${S}"/README.linux "${S}"/Unreal.xpm || die "copying readme/icon"
+ # copy ut2003/ucc
+ exeinto "${dir}"
+ doexe "${S}"/bin/ut2003 "${S}"/ucc || die "copying ut2003/ucc"
+
+ # Here we apply DrSiN's crash patch
+ cp "${S}"/CrashFix/System/crashfix.u "${Ddir}"/System
+
+ ed "${Ddir}"/System/Default.ini >/dev/null 2>&1 <<EOT
+$
+?Engine.GameInfo?
+a
+AccessControlClass=crashfix.iaccesscontrolini
+.
+w
+q
+EOT
+
+ # Here we apply fix for bug #54726
+ sed -i -e "s:UplinkToGamespy=True:UplinkToGamespy=False:" \
+ "${Ddir}"/System/Default.ini || die
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' + || die
+
+ prepgamesdirs
+}
diff --git a/games-fps/ut2003-demo-2206-r3 b/games-fps/ut2003-demo-2206-r3
deleted file mode 100644
index f4b9f9ba1c4b..000000000000
--- a/games-fps/ut2003-demo-2206-r3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Demo for the sequel to the 1999 multi-player first-person shooter
-EAPI=5
-HOMEPAGE=http://www.ut2003.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=ut2003-demo
-RDEPEND=sys-devel/bc virtual/libstdc++:3.3 virtual/opengl[abi_x86_32(-)] x11-libs/libX11[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=http://unreal.epicgames.com/linux/ut2003/ut2003demo-lnx-2206.sh.bin http://download.factoryunreal.com/mirror/UT2003CrashFix.zip https://dev.gentoo.org/~wolf31o2/sources/ut2003-demo/ut2003-demo-misc.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=08e87ed02db549ad455172c0b896f12d
diff --git a/games-fps/ut2003-demo/Manifest b/games-fps/ut2003-demo/Manifest
new file mode 100644
index 000000000000..c90565989ede
--- /dev/null
+++ b/games-fps/ut2003-demo/Manifest
@@ -0,0 +1,8 @@
+AUX benchmark 1180 BLAKE2B d1b909ae5aba80656f777ec53250c004e5b9ceaf9c330ebda057ac2109545daba5c711c85dfe6241292cbd7b0e3325df0c7900b95e6c3b742082ab97404f6b5f SHA512 4da05b170e3b8a983d264c83e094a8084a9a9b9b58c6f7fce30ea7273f625f8e6c03794a519cdaab5cfba64fb4b5047ab73eb3190c6a076a5fde4eb0399c1785
+AUX results.sh 2107 BLAKE2B 97c8a2f835608d99fd2d0382d43088835743dc8f0cd1693a15efa06604e7f370671d0876aff0ec3a0fa4f2b7dc502503cd1fa824850261d39f38dcd7c0ba29b4 SHA512 749ccf70249d848605437da43f99f0fc881ee58edc85535d6ee0bf2bf57c5642a985979d5bc048a64363f711af35cafcd53d438974a13e62f705551ba6ec3d51
+AUX ut2003-demo 692 BLAKE2B c9eef6a5ee06c4c9619ca29c7cdafab5763a3cb63a8b060ac4c2da94935a63aff3276d6045eed24b6152df19bc0aab84db8e5264b6abea8a62289ac7d95280be SHA512 50b927c70865ca808cd060fc1a3e1bc7549f85acdeb18e90343108823db858e3580db5e584cad2e41358e205e4b5375c4deba6990aff4227a9b7e5333dcf51a8
+DIST UT2003CrashFix.zip 2764 BLAKE2B 697c35a02f447d0d436fc32bebdeafbca55ef644d951e92085c33f7597108625770b76e027f31287cd2ac66607692ff8c908f6971f936a134d58d0effc2586fc SHA512 24fdaac873b08a0860c23f66b9bd93922fc4f64486adbe9bfefeb340f9d9374778b5e7bacd0e12cc79d819fb340e007ab2a7f1f45c9e4f27ab3ab6b11033d444
+DIST ut2003-demo-misc.tar.bz2 31851 BLAKE2B 585fe83e142fecdce330ae6116d2c3ef94c870e9bfadb8d7e32185bf0880464bf162330da1f0960feef0d6f3eda7ba591565291d7b25f70f9834d4fbb5a41c58 SHA512 9a1e154aac7a8ccd043135e2a617a19203f6942e8e152d06ec8ed1e6877118cfb3ddbeab7ec2617670e26f13c0e394b8b8dbc747688b8b0b244a8c404f33d7f0
+DIST ut2003demo-lnx-2206.sh.bin 137253079 BLAKE2B 9048a6f82e6302c84481989c4ce176fb969eb5c7a86e9d5a8b28060b0e2d139de786b8edbd5080cbf5d49ca9c6114d3f750ed8ad9bcdff6e69841933830538ea SHA512 8018d58999010c17198185838e42f7cbda0f55476f1e6065b4b2957db3652fe9c1af39ba65451565f54d41507413f4e0b1edf2678c9cc7c221f2ca278ec655be
+EBUILD ut2003-demo-2206-r3.ebuild 3553 BLAKE2B f171933b013e60d8420f14a58ed6296e532ad076e3f43929e70a6e3be6282620161986f6a7eeec5cdd90d1d781993de70155d6d8db83c618c2478809809644b6 SHA512 c35fa9c2b8ff0f6b9a8c6e2ebf6e74402ab444f992cc60afe8b2769de094fc307330db721d9a6220a5928ce526046eb2c3caa8ab133600d180b4c5cdac05e244
+MISC metadata.xml 602 BLAKE2B 860e51d942ba4cb4200404571230e2f9b7962a050c57e3c7ae336fa909e183a248c191f4dd0718a564945f5cb02592d578f774e1c50db208639ac02470980799 SHA512 2c956bf66965f83b68bb0c04d79d479ae76af9b7781bca93a1ff7898f02838ee0c1cc72290943be9902dee38096f2b119f95f21e5bed781e8c04f331a60adac2
diff --git a/games-fps/ut2003-demo/files/benchmark b/games-fps/ut2003-demo/files/benchmark
new file mode 100644
index 000000000000..2047897da9ab
--- /dev/null
+++ b/games-fps/ut2003-demo/files/benchmark
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Originally from linuxforen.de
+# Modified by phoen][x <phoenix@gentoo.org>, Sep/19/2002
+# Modifications, enhancements or bugs? Mail me.
+
+# Tweaks by Daniel Robbins <drobbins@gentoo.org> 25 Feb 2003
+
+STUFF=GAMES_PREFIX_OPT/ut2003-demo/Benchmark/Stuff
+MYPATH=${HOME}/.ut2003/Benchmark
+TEMPLOG=${MYPATH}/benchmark.log
+LOG=${MYPATH}/bench.log
+
+[ -d ${MYPATH} ] || mkdir -p ${MYPATH}
+
+rm -f ${TEMPLOG} ${LOG}
+touch ${TEMPLOG} ${LOG}
+
+date > $LOG
+
+echo ">> Starting benchmark"
+cd GAMES_PREFIX_OPT//ut2003-demo/System
+for BENCH in GAMES_PREFIX_OPT//ut2003-demo/Benchmark/*-*.sh
+do
+ echo "Running ${BENCH} with MinDetail"
+ ${BENCH} -ini=${STUFF}/MinDetail.ini -userini=${STUFF}/MinDetailUser.ini &> /dev/null
+ echo -n "${BENCH} / MinDetail / " >> ${LOG}
+ cat ${TEMPLOG} | tail -n1 >> ${LOG}
+
+ echo "Running ${BENCH} with MaxDetail"
+ ${BENCH} -ini=${STUFF}/MaxDetail.ini -userini=${STUFF}/MaxDetailUser.ini &> /dev/null
+ echo -n "${BENCH} / MaxDetail / " >> ${LOG}
+ cat ${TEMPLOG} | tail -n1 >> ${LOG}
+done
+
+echo ">> Benchmark complete"
+GAMES_PREFIX_OPT/ut2003-demo/Benchmark/results.sh
+echo ">> Use 'ut2003-demo --results' to show these results again (without benchmarking)"
diff --git a/games-fps/ut2003-demo/files/results.sh b/games-fps/ut2003-demo/files/results.sh
new file mode 100644
index 000000000000..a74cf909c9ad
--- /dev/null
+++ b/games-fps/ut2003-demo/files/results.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+# Written by phoen][x <phoenix@gentoo.org>, Sep/21/2002
+# Modifications, enhancements or bugs? Contact games@gentoo.org
+
+[[ -z "${1}" ]] \
+ && FILE="${HOME}/.ut2003/Benchmark/bench.log" \
+ || FILE="${1}"
+
+CURLINE=0
+
+BM_MIN_SCORE=0
+BM_MIN_COUNT=0
+BM_MAX_SCORE=0
+BM_MAX_COUNT=0
+
+FB_MIN_SCORE=0
+FB_MIN_COUNT=0
+FB_MAX_SCORE=0
+FB_MAX_COUNT=0
+
+while read LINE ; do
+ CURLINE=`expr $CURLINE + 1`
+ if [[ ${CURLINE} -eq 1 ]] ; then
+ echo ">> Results of the UT2003-demo benchmark"
+ echo ">> Created on ${LINE}"
+ continue
+ fi
+
+ set -- ${LINE}
+ TYPE=$(echo $(basename ${1}) | cut -d- -f1)
+ DETAIL=${3}
+ SCORE=${14}
+
+ case ${TYPE} in
+ "botmatch")
+ case ${DETAIL} in
+ "MinDetail")
+ BM_MIN_SCORE=`echo ${BM_MIN_SCORE} + ${SCORE} | bc`
+ BM_MIN_COUNT=`expr ${BM_MIN_COUNT} + 1`
+ ;;
+ "MaxDetail")
+ BM_MAX_SCORE=`echo ${BM_MAX_SCORE} + ${SCORE} | bc`
+ BM_MAX_COUNT=`expr ${BM_MAX_COUNT} + 1`
+ ;;
+ esac
+ ;;
+ "flyby")
+ case ${DETAIL} in
+ "MinDetail")
+ FB_MIN_SCORE=`echo ${FB_MIN_SCORE} + ${SCORE} | bc`
+ FB_MIN_COUNT=`expr ${FB_MIN_COUNT} + 1`
+ ;;
+ "MaxDetail")
+ FB_MAX_SCORE=`echo ${FB_MAX_SCORE} + ${SCORE} | bc`
+ FB_MAX_COUNT=`expr ${FB_MAX_COUNT} + 1`
+ ;;
+ esac
+ ;;
+ esac
+done < ${FILE}
+
+BM_MIN_AVG=`echo "scale=6; ${BM_MIN_SCORE} / ${BM_MIN_COUNT}" | bc`
+BM_MAX_AVG=`echo "scale=6; ${BM_MAX_SCORE} / ${BM_MAX_COUNT}" | bc`
+BM_ALL_AVG=`echo "scale=6; (${BM_MIN_SCORE} + ${BM_MAX_SCORE}) / (${BM_MIN_COUNT} + ${BM_MAX_COUNT})" | bc`
+
+FB_MIN_AVG=`echo "scale=6; ${FB_MIN_SCORE} / ${FB_MIN_COUNT}" | bc`
+FB_MAX_AVG=`echo "scale=6; ${FB_MAX_SCORE} / ${FB_MAX_COUNT}" | bc`
+FB_ALL_AVG=`echo "scale=6; (${FB_MIN_SCORE} + ${FB_MAX_SCORE}) / (${FB_MIN_COUNT} + ${FB_MAX_COUNT})" | bc`
+
+echo "
+>> Score for Botmatch
+MinDetail: ${BM_MIN_AVG} (${BM_MIN_COUNT} tests)
+MaxDetail: ${BM_MAX_AVG} (${BM_MAX_COUNT} tests)
+Average : ${BM_ALL_AVG} (`expr ${BM_MIN_COUNT} + ${BM_MAX_COUNT}` tests)
+
+>> Score for FlyBy
+MinDetail: ${FB_MIN_AVG} (${FB_MIN_COUNT} tests)
+MaxDetail: ${FB_MAX_AVG} (${FB_MAX_COUNT} tests)
+Average : ${FB_ALL_AVG} (`expr ${FB_MIN_COUNT} + ${FB_MAX_COUNT}` tests)"
diff --git a/games-fps/ut2003-demo/files/ut2003-demo b/games-fps/ut2003-demo/files/ut2003-demo
new file mode 100644
index 000000000000..56d7e10e6a73
--- /dev/null
+++ b/games-fps/ut2003-demo/files/ut2003-demo
@@ -0,0 +1,30 @@
+#!/bin/bash
+# Written by phoen][x <phoenix@gentoo.org>, Sep/19/2002
+# Modifications, enhancements or bugs? Mail me.
+
+INSTALL="GAMES_PREFIX_OPT//ut2003-demo"
+
+case ${1} in
+ "--results")
+ pushd ${INSTALL}/Benchmark &> /dev/null
+ ./results.sh
+ popd &> /dev/null
+ ;;
+ "--bench")
+ pushd ${INSTALL}/Benchmark &> /dev/null
+ ./benchmark
+ popd &> /dev/null
+ ;;
+ "--help")
+ echo "Usage:"
+ echo " ut2003-demo [--bench] || [--results]"
+ echo " Optional parameters, only one at a time."
+ echo " --bench : starts ut2003-demo in benchmark mode"
+ echo " --results : outputs the results of your last benchmark"
+ ;;
+ *)
+ pushd ${INSTALL} &> /dev/null
+ ./ut2003_demo
+ popd &> /dev/null
+ ;;
+esac
diff --git a/games-fps/ut2003-demo/metadata.xml b/games-fps/ut2003-demo/metadata.xml
new file mode 100644
index 000000000000..a7cd2290aab2
--- /dev/null
+++ b/games-fps/ut2003-demo/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is a playable demo of the full commercial version.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild b/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild
new file mode 100644
index 000000000000..2300c78fa96d
--- /dev/null
+++ b/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils unpacker games
+
+DESCRIPTION="Demo for the sequel to the 1999 multi-player first-person shooter"
+HOMEPAGE="http://www.ut2003.com/"
+SRC_URI="http://unreal.epicgames.com/linux/ut2003/ut2003demo-lnx-${PV}.sh.bin
+ http://download.factoryunreal.com/mirror/UT2003CrashFix.zip
+ https://dev.gentoo.org/~wolf31o2/sources/${PN}/${PN}-misc.tar.bz2"
+
+LICENSE="ut2003-demo"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ sys-devel/bc
+ virtual/libstdc++:3.3
+ 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}/*.so ${dir:1}/*-bin ${dir:1}/System/libSDL-1.2.so.0"
+
+src_unpack() {
+ unpack_makeself "${DISTDIR}"/ut2003demo-lnx-${PV}.sh.bin || die
+ unzip "${DISTDIR}"/UT2003CrashFix.zip || die
+ cd "${S}"
+ unpack ./setupstuff.tar.gz || die
+ unpack ./ut2003lnx_demo.tar.bz2 || die
+ unpack ${PN}-misc.tar.bz2 || die
+}
+
+src_install() {
+ einfo "This will take a while ... go get a pizza or something"
+ dodir "${dir}"
+
+ local i
+ for i in Animations Benchmark Help KarmaData Maps Music Sounds \
+ StaticMeshes System Textures Web extras
+ do
+ dodir "${dir}"/${i}
+ cp -pPR "${S}"/${i}/* "${Ddir}"/${i}
+ done
+
+ # Fix the benchmark configurations to use SDL rather than the Windows driver
+ local f
+ for f in MaxDetail.ini MinDetail.ini
+ do
+ sed -i \
+ -e 's/RenderDevice=D3DDrv.D3DRenderDevice/\;RenderDevice=D3DDrv.D3DRenderDevice/' \
+ -e 's/ViewportManager=WinDrv.WindowsClient/\;ViewportManager=WinDrv.WindowsClient/' \
+ -e 's/\;RenderDevice=OpenGLDrv.OpenGLRenderDevice/RenderDevice=OpenGLDrv.OpenGLRenderDevice/' \
+ -e 's/\;ViewportManager=SDLDrv.SDLClient/ViewportManager=SDLDrv.SDLClient/' \
+ "${Ddir}"/Benchmark/Stuff/${f} || die
+ done
+
+ # Have the benchmarks run the nifty wrapper script rather than
+ # ../System/ut2003-bin directly
+ for f in "${Ddir}"/Benchmark/*-*.sh ; do
+ sed -i \
+ -e 's:\.\./System/ut2003-bin:../ut2003_demo:' "${f}" || die
+ done
+
+ # Wrapper and benchmark-scripts
+ dogamesbin "${FILESDIR}"/ut2003-demo
+ exeinto "${dir}"/Benchmark
+ doexe "${FILESDIR}/"{benchmark,results.sh}
+ sed -i -e "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" \
+ "${ED}/${GAMES_BINDIR}/${PN}" "${ED}/${dir}"/Benchmark/benchmark || die
+
+ # Here we apply DrSiN's crash patch
+ cp "${S}"/CrashFix/System/crashfix.u "${Ddir}"/System || die
+
+ed "${Ddir}"/System/Default.ini >/dev/null 2>&1 <<EOT
+$
+?Engine.GameInfo?
+a
+AccessControlClass=crashfix.iaccesscontrolini
+.
+w
+q
+EOT
+
+ exeinto "${dir}"
+ insinto "${dir}"
+ doins DemoLicense.int README.linux
+ doexe ucc ut2003_demo
+ newicon Unreal.xpm ut2003-demo.xpm
+ make_desktop_entry ut2003-demo "Unreal Tournament 2003 (Demo)" ${PN}
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "You can run benchmarks by typing 'ut2003-demo --bench' (MinDetail seems"
+ elog "to not be working for some unknown reason :/)"
+ echo
+ elog "Read ${dir}/README.linux for instructions on how to run a"
+ elog "dedicated server."
+ echo
+ ewarn "If you are not installing for the first time and you plan on running"
+ ewarn "a server, you will probably need to edit your"
+ ewarn "~/.ut2003demo/System/UT2003.ini file and add a line that says"
+ ewarn "AccessControlClass=crashfix.iaccesscontrolini to your"
+ ewarn "[Engine.GameInfo] section to close a security issue."
+ echo
+ elog "To play the demo run:"
+ elog " ut2003-demo"
+ echo
+}
diff --git a/games-fps/ut2003/Manifest b/games-fps/ut2003/Manifest
new file mode 100644
index 000000000000..c4bba0f77386
--- /dev/null
+++ b/games-fps/ut2003/Manifest
@@ -0,0 +1,3 @@
+DIST ut2003lnx_patch2225.tar.tar 10039316 BLAKE2B a15398eb2b66606f3e7b1382b01fda6b5d38982bc3fe7065184232eb18a8c85792147187951e810ecb6af738b5f5a15a2e56832d7e91fb21ab8956d699817f76 SHA512 3c44b6254b2b778bf2aca826c710f51db4ec0687c21f1c98e1070f3a9ad7e1a809e741a5b94e20a44c56c60a8b1e4a049788ff5f2a4d581c4eedf3dbbc0da86d
+EBUILD ut2003-2225-r4.ebuild 2643 BLAKE2B dfa82e2155fe0b58c4081ae39be0806d28d0a14a31fd4bb95aba99614929019787a6afce327b0d1a7de7b3a0bfeea2c178475e4ca26bbb8c8f270841d0f07b5a SHA512 103316444d7a041f3f6d042c4741853fe6de5d28f37f56755615b057ca8d57102ecb9d6e7f5fda597b2772cd59c63c1c2bd1d3b7f1d89cd7f9744d7c249455e3
+MISC metadata.xml 771 BLAKE2B 705c6aa979f650220a52db3ef5d8c5b8b468b28eac8692a2fbe583ed4b3f694fdfe088d64cc3f6d8506494522f8ca11b491e21e322e3f50ff4453e93ce0d543f SHA512 d30d55503e3b3897d2a5093c06a39f684bdf0879214931a360a87637cd62ae1ca019577f42275bf2b4ba28649ab2989b0a2e184998497ddc5ffddbb6ba35ef5e
diff --git a/games-fps/ut2003/metadata.xml b/games-fps/ut2003/metadata.xml
new file mode 100644
index 000000000000..e716a53e0747
--- /dev/null
+++ b/games-fps/ut2003/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is commercial software and requires data from the original retail discs to play. If you're interested in checking out the technology behind Unreal Tournament 2003, you can "emerge ut2003-demo" to get the playable demo.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/ut2003/ut2003-2225-r4.ebuild b/games-fps/ut2003/ut2003-2225-r4.ebuild
new file mode 100644
index 000000000000..9c9c1483ac4e
--- /dev/null
+++ b/games-fps/ut2003/ut2003-2225-r4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils games
+
+DESCRIPTION="Sequel to the 1999 Game of the Year multi-player first-person shooter"
+HOMEPAGE="http://www.unrealtournament2003.com/"
+SRC_URI="ftp://ftp.infogrames.net/misc/ut2003/ut2003lnx_patch2225.tar.tar"
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated"
+RESTRICT="strip"
+
+RDEPEND="
+ games-fps/ut2003-data
+ dedicated? ( games-server/ut2003-ded )
+ !dedicated? ( virtual/opengl[abi_x86_32(-)] )
+"
+DEPEND=""
+
+S=${WORKDIR}
+
+dir="${GAMES_PREFIX_OPT}/${PN}"
+Ddir="${D}/${dir}"
+
+src_unpack() {
+ unpack ut2003lnx_patch${PV}.tar.tar
+}
+
+src_install() {
+ insinto "${dir}"
+
+ games_make_wrapper ut2003 ./ut2003 "${dir}" "${dir}"
+ make_desktop_entry ut2003 "Unreal Tournament 2003" ut2003
+
+ # TODO: change this to use doexe/doins
+ # this brings our install up to the newest version
+ cp -r "${S}"/ut2003-lnx-2225/* "${Ddir}" || die
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ # here is where we check for the existence of a cdkey...
+ # if we don't find one, we ask the user for it
+ if [[ -f "${dir}"/System/cdkey ]] ; then
+ elog "A cdkey file is already present in ${dir}/System"
+ else
+ ewarn "You MUST run this before playing the game:"
+ ewarn "emerge --config =${CATEGORY}/${PF}"
+ ewarn "That way you can (re)enter your cdkey."
+ fi
+ elog
+ elog "To play the game run:"
+ elog " ut2003"
+ ewarn
+ ewarn "If you are not installing for the first time and you plan on running"
+ ewarn "a server, you will probably need to edit your"
+ ewarn "~/.ut2003/System/UT2003.ini file and add a line that says"
+ ewarn "AccessControlClass=crashfix.iaccesscontrolini to your"
+ ewarn "[Engine.GameInfo] section to close a security issue."
+}
+
+pkg_postrm() {
+ ewarn "This package leaves a cdkey file in ${dir}/System that you need"
+ ewarn "to remove to completely get rid of this game's files."
+}
+
+pkg_config() {
+ ewarn "Your CD key is NOT checked for validity here."
+ ewarn " Make sure you type it in correctly."
+ eerror "If you CTRL+C out of this, the game will not run!"
+ echo
+ einfo "CD key format is: XXXX-XXXX-XXXX-XXXX"
+ while true ; do
+ einfo "Please enter your CD key:"
+ read CDKEY1
+ einfo "Please re-enter your CD key:"
+ read CDKEY2
+ if [[ "${CDKEY1}" == "" ]] ; then
+ echo "You entered a blank CD key. Try again."
+ else
+ if [[ "${CDKEY1}" == "${CDKEY2}" ]] ; then
+ echo "${CDKEY1}" | tr a-z A-Z > ${dir}/System/cdkey
+ einfo "Thank you!"
+ chown games:games "${dir}"/System/cdkey
+ break
+ else
+ eerror "Your CD key entries do not match. Try again."
+ fi
+ fi
+ done
+}
diff --git a/games-fps/ut2004-3369.3-r1 b/games-fps/ut2004-3369.3-r1
deleted file mode 100644
index fe4fd8a2a7d8..000000000000
--- a/games-fps/ut2004-3369.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare setup unpack
-DEPEND=app-arch/p7zip
-DESCRIPTION=Editor's Choice Edition plus Mega Pack for the well-known first-person shooter
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2004.com/
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-RDEPEND=sys-libs/glibc games-fps/ut2004-data games-fps/ut2004-bonuspack-ece games-fps/ut2004-bonuspack-mega dedicated? ( !games-server/ut2004-ded ) opengl? ( =virtual/libstdc++-3.3 virtual/opengl x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp media-libs/libsdl media-libs/openal ) !dedicated? ( !opengl? ( =virtual/libstdc++-3.3 virtual/opengl x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp media-libs/libsdl media-libs/openal ) ) games-misc/games-envd
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://treefort.icculus.org/ut2004/ut2004-lnxpatch3369-2.tar.bz2 http://storage.guntoo.de/downs/downloads/Patch/ut2004-v3369-3-linux-dedicated.7z mirror://gentoo/ut2004-v3369-3-linux-dedicated.7z
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=667853a7c364952dda1928f85b3f4607
diff --git a/games-fps/ut2004-action-1 b/games-fps/ut2004-action-1
deleted file mode 100644
index 2491f0ec0657..000000000000
--- a/games-fps/ut2004-action-1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Action - Action movie mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/action-unreal-tournament/addons/action-unreal-tournament-r1
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/aut-r1-msuc.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=3ca8a19469a1b24de768ac6d8c06a6bb
diff --git a/games-fps/ut2004-action/Manifest b/games-fps/ut2004-action/Manifest
new file mode 100644
index 000000000000..5a30410ccc89
--- /dev/null
+++ b/games-fps/ut2004-action/Manifest
@@ -0,0 +1,3 @@
+DIST aut-r1-msuc.zip 323878282 BLAKE2B 509036928b33697926d81e920cb9ca3496549d1024f33912d8de48d5328cd4a20cf5412b4c3ebf4d3e0f3dbba347d486c3d2ed4a14185e817e7aad4b560312ee SHA512 50aafff330839c9b8fe8be2e6a98d9532f8429e2a8f258a9a6dabd39f555a9ce11f9178592575996ebce2629ff5c7f3046777bc1605f21c2bbefb80e11ca4f65
+EBUILD ut2004-action-1.ebuild 536 BLAKE2B f9a8b6470101b6f78a4c92286177717a8b741dd0b5bd05f60ce320773417cdf7af19c447399764de869b6c5e9cf2dcc2e9bbb554f97dbd28f39160705cbcb059 SHA512 a1024f140abc613ffbf31feb2958be91aaddbc62b4013e920226c4ecf36bd2b31e043c6bc1c359454e7c9092447220795c7a07699f686fff2843b458479b0f40
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-action/metadata.xml b/games-fps/ut2004-action/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-action/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-action/ut2004-action-1.ebuild b/games-fps/ut2004-action/ut2004-action-1.ebuild
new file mode 100644
index 000000000000..d4dca4341dda
--- /dev/null
+++ b/games-fps/ut2004-action/ut2004-action-1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Action movie mod"
+MOD_NAME="Action"
+MOD_DIR="action"
+MOD_ICON="aut.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/action-unreal-tournament/addons/action-unreal-tournament-r1"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/aut-r1-msuc.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ mkdir ${MOD_DIR} || die
+ cd ${MOD_DIR} || die
+ unpack ${A}
+}
diff --git a/games-fps/ut2004-airbuccaneers-1.6-r2 b/games-fps/ut2004-airbuccaneers-1.6-r2
deleted file mode 100644
index d2a67394aaf5..000000000000
--- a/games-fps/ut2004-airbuccaneers-1.6-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Air Buccaneers - Pirate-style conversion with flying wooden ships
-EAPI=5
-HOMEPAGE=http://www.ludocraft.com/entertainment/airbuccaneers-mod/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://bin.ludocraft.com/files/airbuccaneers_mod_1_6_zipinstall_with_info.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c6cc9762b260352b9deb2710c938279e
diff --git a/games-fps/ut2004-airbuccaneers/Manifest b/games-fps/ut2004-airbuccaneers/Manifest
new file mode 100644
index 000000000000..33e3528d76b1
--- /dev/null
+++ b/games-fps/ut2004-airbuccaneers/Manifest
@@ -0,0 +1,3 @@
+DIST airbuccaneers_mod_1_6_zipinstall_with_info.zip 255641963 BLAKE2B 24ac4e58a1a075430f92fcef1f8223e4d64d5fcb65af2bd3df0a4dde975422beacc45c7baa41683bb74365b448cbf59d1e26f6d80d7ef5edd73f320d6732fe3f SHA512 6c91919538b1d74157bf5586b66effcd3aabd397dc698384673425a53227c68b1ec0c4a07c342e399136673dc106b11727103ca6a06dff117d93b73645bd981b
+EBUILD ut2004-airbuccaneers-1.6-r2.ebuild 505 BLAKE2B be1705acc1cb5bddc28007c1d4441e383ab16bfec1e0b3e3440ebc96ae34571e73bc05bcf375f88a4afd2b92a82dab34300fb1a9eca683c539045e439139db09 SHA512 bee4df2d19965b8c9e80cc1b788e0f08daa67554b06de6e001d5806b0f31a841df93cc830032909f792bec44300a02091ea5764cc91e314ea0559131d6792ccc
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-airbuccaneers/metadata.xml b/games-fps/ut2004-airbuccaneers/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-airbuccaneers/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-airbuccaneers/ut2004-airbuccaneers-1.6-r2.ebuild b/games-fps/ut2004-airbuccaneers/ut2004-airbuccaneers-1.6-r2.ebuild
new file mode 100644
index 000000000000..e8d587664787
--- /dev/null
+++ b/games-fps/ut2004-airbuccaneers/ut2004-airbuccaneers-1.6-r2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Pirate-style conversion with flying wooden ships"
+MOD_NAME="Air Buccaneers"
+MOD_DIR="AirBuccaneers"
+MOD_ICON="Help/abuicon.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.ludocraft.com/entertainment/airbuccaneers-mod/"
+SRC_URI="http://bin.ludocraft.com/files/airbuccaneers_mod_1_6_zipinstall_with_info.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
diff --git a/games-fps/ut2004-bonuspack-cbp1-1-r2 b/games-fps/ut2004-bonuspack-cbp1-1-r2
deleted file mode 100644
index edc951f00e52..000000000000
--- a/games-fps/ut2004-bonuspack-cbp1-1-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Community Bonus Pack Vol 1 - UT2003 Community Bonus Pack for UT2004
-EAPI=5
-HOMEPAGE=https://liandri.beyondunreal.com/Unreal_Tournament_2004
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://downloads.unrealadmin.org/UT2004/BonusPack/cbp1.zip http://files.volved.com/qsr/ut2004_map_packs/cbp1.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b9c3684a510499e072e3e4214d28b2c2
diff --git a/games-fps/ut2004-bonuspack-cbp1/Manifest b/games-fps/ut2004-bonuspack-cbp1/Manifest
new file mode 100644
index 000000000000..d79404a5906a
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp1/Manifest
@@ -0,0 +1,3 @@
+DIST cbp1.zip 144163647 BLAKE2B ff32fbf431475ae2c24920574e5d158c4242fca2359bf1817131e189c0cd25e52d17de3232acb0b118d7f689ee67821cf6707a2e416e1a9b3f2b5f2e8fbcca86 SHA512 e2ead75796fd68b3f0d6ea50b4ed9988fef043730c6b81487d34c45aa26f63cac7b6a43991b673fbd6315f1496d2eecc52a5845c12f244411cd71fedab93c6fd
+EBUILD ut2004-bonuspack-cbp1-1-r2.ebuild 473 BLAKE2B 78ba7ef84beeebf910ed6a9116a4a99ac79443ef85bbbce36a37f07b3f8422bbe0c4c17c4266a19966190639fe9df8ae832c77d59edea19379af0cc36fd855dc SHA512 448eb5ef971f6256c7b95735f6bc5af52300c69f72999b93bd594cd7f77b44e072bc663a498bf75f9756a809113bab76a130315af4c26eaf393bf37b46fec362
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-bonuspack-cbp1/metadata.xml b/games-fps/ut2004-bonuspack-cbp1/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp1/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-bonuspack-cbp1/ut2004-bonuspack-cbp1-1-r2.ebuild b/games-fps/ut2004-bonuspack-cbp1/ut2004-bonuspack-cbp1-1-r2.ebuild
new file mode 100644
index 000000000000..3a2c9a8576d8
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp1/ut2004-bonuspack-cbp1-1-r2.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="UT2003 Community Bonus Pack for UT2004"
+MOD_NAME="Community Bonus Pack Vol 1"
+
+inherit games games-mods
+
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
+SRC_URI="http://downloads.unrealadmin.org/UT2004/BonusPack/cbp1.zip
+ http://files.volved.com/qsr/ut2004_map_packs/cbp1.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
diff --git a/games-fps/ut2004-bonuspack-cbp2-1-r2 b/games-fps/ut2004-bonuspack-cbp2-1-r2
deleted file mode 100644
index 6259df99572b..000000000000
--- a/games-fps/ut2004-bonuspack-cbp2-1-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Community Bonus Pack 2 Vol 1 and 2 - Community Bonus Pack 2 Vol 1 and 2
-EAPI=5
-HOMEPAGE=https://liandri.beyondunreal.com/Unreal_Tournament_2004
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-fps/ut2004-bonuspack-cbp1 games-fps/ut2004-bonuspack-mega games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/official/ut2004/cbp2-volume1_zip.zip https://ut.rushbase.net/beyondunreal/official/ut2004/cbp2-volume2_zip.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f828a6dc6c45c41603c9d735203f674b
diff --git a/games-fps/ut2004-bonuspack-cbp2/Manifest b/games-fps/ut2004-bonuspack-cbp2/Manifest
new file mode 100644
index 000000000000..6b55c624b5b1
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp2/Manifest
@@ -0,0 +1,4 @@
+DIST cbp2-volume1_zip.zip 203766207 BLAKE2B 7f7d19f4a1a1caaf388eccecadb8123a103d4aafbb95f2b344e106b881507f9bac0ffdda48435be7c2303b8bd70545d3d74ca7971f97a989bfa955d3155d956c SHA512 9e425985640f9fcf9c1696d75e0794b31110715ba3bf664087ede1f1925a68e76e4ee87d248b245429702c2bffc1fb16362fcc43f795681efcc5880a2a7c3213
+DIST cbp2-volume2_zip.zip 200444127 BLAKE2B 21d61d09af54e86047d46cc8d136cd6ba746098c4d0a53ade1e8e5c4143b543f0a90eb0dbca2cb00e29754f916dc84e7040a5d64f582bedd2a0107bb4c182291 SHA512 52982b302bb2d8f0839392f8bad05935bb8c5cae9e98528dfada7fa80f595050829ff6872b834197486c3401256f60c6c023133f6446299cbd72e1fd7ec3c8f4
+EBUILD ut2004-bonuspack-cbp2-1-r2.ebuild 857 BLAKE2B c6fda00042d988e77915e9afd736f03f7072296bb0bfe5cf4c0c9cd49d81b7fbaa84f0ea39270012e709ae9985c335b93cf772a9994bb4fb1762a5d6e8df5633 SHA512 b5fa77133c8420a01782124d22570585251c6cee7877648c4e209c1f0c2b432dd09052c5f15956524080ac6f520590a8aa0a67b02b9797d6fbb8e3ec0db08d13
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-bonuspack-cbp2/metadata.xml b/games-fps/ut2004-bonuspack-cbp2/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-bonuspack-cbp2/ut2004-bonuspack-cbp2-1-r2.ebuild b/games-fps/ut2004-bonuspack-cbp2/ut2004-bonuspack-cbp2-1-r2.ebuild
new file mode 100644
index 000000000000..d1d4cee91dde
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-cbp2/ut2004-bonuspack-cbp2-1-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Community Bonus Pack 2 Vol 1 and 2"
+MOD_NAME="Community Bonus Pack 2 Vol 1 and 2"
+
+inherit games games-mods
+
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
+SRC_URI="https://ut.rushbase.net/beyondunreal/official/ut2004/cbp2-volume1_zip.zip
+ https://ut.rushbase.net/beyondunreal/official/ut2004/cbp2-volume2_zip.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="games-fps/ut2004-bonuspack-cbp1
+ games-fps/ut2004-bonuspack-mega"
+
+src_prepare() {
+ # Provided by ut2004-bonuspack-cbp1
+ rm Music/Soeren.ogg
+ # Provided by ut2004-bonuspack-mega
+ rm Textures/Ty_RocketTextures.utx
+
+ cd Help
+ # Useless orphan file
+ rm Note.txt
+ mv GERROIDREADME.txt DOM-CBP2-Gerroid.txt
+ mv Readme.txt CBP2-Readme.txt
+}
diff --git a/games-fps/ut2004-bonuspack-ece-1-r3 b/games-fps/ut2004-bonuspack-ece-1-r3
deleted file mode 100644
index 889e57a90b1d..000000000000
--- a/games-fps/ut2004-bonuspack-ece-1-r3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Editor's Choice Edition - Editor's Choice Edition bonus pack
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2004.com/
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://ut2004.ut-files.com/BonusPacks/ut2004megapack-linux.tar.bz2 http://unrealmassdestruction.com/downloads/ut2k4/essentials/UT2004-ONSBonusMapPack.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=749a3135aba12254b0b61098ab7aa2d9
diff --git a/games-fps/ut2004-bonuspack-ece/Manifest b/games-fps/ut2004-bonuspack-ece/Manifest
new file mode 100644
index 000000000000..39652d72e6e5
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-ece/Manifest
@@ -0,0 +1,4 @@
+DIST UT2004-ONSBonusMapPack.zip 11018471 BLAKE2B bc915d6942c321df4031b02eaa25f83793b3fa1f2bb916c5d413c5569a3f887b6517fc4dceb8cb914e22be62f58512e727a41d5efbc6066113be12a9da9621d0 SHA512 8193375b89cd6fbc8b00de195797099c128fcf5cb73757bbc57d3c5350c497a878eaf0200f2e0711bf062e25c5d170e05b055c63f85b908b18dcc89572d71fd2
+DIST ut2004megapack-linux.tar.bz2 203124107 BLAKE2B 1459e2638181411446ec5679bceb44023382b3533951478ee06c274199688f3bbe341d7f7806299a332373791b6d0a9e1b57efdc6a13a5983220e0adbc413118 SHA512 4ae5eec0622c2bd96dfc162541bc0771399b012fb00f022282bc8c34600cb8e9bb7c18a52dd55fbef6f16fedaf225e301c46077a6accd001f4c77ddad89ed17b
+EBUILD ut2004-bonuspack-ece-1-r3.ebuild 1754 BLAKE2B c9e1b4c1f06416739670ef7d2af8a3ab5c57d5fa970a4f103f3fa5c4e570a5a85687c268c63d5cf679ba40bfc2036ffc7ba77d66b203eab17f5e69514d6d9278 SHA512 4136dd65c99555dd1bb859e79d4000db11d22e47f7d0846fff15b696a7e282b840dac973352815e85c4c14a4ca43d3cbae0e1eddc21f842cb25d67d960329fa6
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-bonuspack-ece/metadata.xml b/games-fps/ut2004-bonuspack-ece/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-ece/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1-r3.ebuild b/games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1-r3.ebuild
new file mode 100644
index 000000000000..e5ebe2ab3b90
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Editor's Choice Edition bonus pack"
+MOD_NAME="Editor's Choice Edition"
+
+inherit games games-mods
+
+MY_P="ut2004megapack-linux.tar.bz2"
+HOMEPAGE="http://www.unrealtournament2004.com/"
+SRC_URI="http://ut2004.ut-files.com/BonusPacks/${MY_P}
+ http://unrealmassdestruction.com/downloads/ut2k4/essentials/UT2004-ONSBonusMapPack.zip"
+
+LICENSE="ut2003"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${MY_P}
+ cd UT2004MegaPack/Maps || die
+ unpack UT2004-ONSBonusMapPack.zip # bug #278002
+}
+
+src_prepare() {
+ mv -f UT2004MegaPack/* . || die
+ rmdir UT2004MegaPack || die
+
+ rm -r Music Speech || die
+
+ # Remove megapack files which are not in ece
+ rm Animations/ONSNewTank-A.ukx || die
+ rm Help/ReadMePatch.int.txt || die
+ # Help/{DebuggerLogo.bmp,InstallerLogo.bmp,Unreal.ico,UnrealEd.ico}
+ # are not in megapack.
+ # Keep new Help/UT2004Logo.bmp
+ # Manual dir does not exist in megapack
+ rm Maps/{AS*,CTF*,DM*} || die
+ rm Sounds/A_Announcer_BP2.uax || die
+ rm StaticMeshes/{JumpShipObjects.usx,Ty_RocketSMeshes.usx} || die
+ rm System/{A*,b*,B*,CacheRecords.ucl} || die
+ rm System/{*.det,*.est,*.frt,*.itt,*.kot} || die
+ rm System/{CTF*,D*,Editor*,G*,I*,L*,Onslaught.*,*.md5} || die
+ rm System/{u*,U*,V*,X*,Core.u,Engine.u,F*,*.ucl,Sk*} || die
+ rm Textures/{J*,j*,T*} || die
+ rm -r Web || die
+
+ # The file lists of ut2004-3369-r1 and -r2 are identical
+ # Remove files owned by ut2004-3369-r2
+ rm Help/UT2004Logo.bmp || die
+ # The 2 Manifest files have not changed
+ rm System/{Manifest.in{i,t},OnslaughtFull.int} || die
+ rm System/{Core.int,Engine.int,Setup.int,Window.int} || die
+ rm System/{OnslaughtFull.u,OnslaughtBP.u} || die
+}
diff --git a/games-fps/ut2004-bonuspack-mega-1-r2 b/games-fps/ut2004-bonuspack-mega-1-r2
deleted file mode 100644
index a7498dc97557..000000000000
--- a/games-fps/ut2004-bonuspack-mega-1-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Megapack - Megapack bonus pack
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2004.com/
-IUSE=dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://ut2004.ut-files.com/BonusPacks/ut2004megapack-linux.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1849e071749d572e6e3ba0166f8435d3
diff --git a/games-fps/ut2004-bonuspack-mega/Manifest b/games-fps/ut2004-bonuspack-mega/Manifest
new file mode 100644
index 000000000000..f525e2204f0a
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-mega/Manifest
@@ -0,0 +1,3 @@
+DIST ut2004megapack-linux.tar.bz2 203124107 BLAKE2B 1459e2638181411446ec5679bceb44023382b3533951478ee06c274199688f3bbe341d7f7806299a332373791b6d0a9e1b57efdc6a13a5983220e0adbc413118 SHA512 4ae5eec0622c2bd96dfc162541bc0771399b012fb00f022282bc8c34600cb8e9bb7c18a52dd55fbef6f16fedaf225e301c46077a6accd001f4c77ddad89ed17b
+EBUILD ut2004-bonuspack-mega-1-r2.ebuild 1156 BLAKE2B bac0ef4f8854377b0b6989d1150a814ad7d60a00701c493c502140bd1ed8ebe6156f1ff0878c346016922b6f823abe13ffb0ae760c065c49d4595f7cec8854bf SHA512 6aeb92058fe6a534f1ab5c688f4c8e3c14baa166dad5356944fe4cb39e29e4bedd4792799e040eacad9dffae4d6e7c5919452fbaa0b5c6cbc91a72c6030861d5
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-bonuspack-mega/metadata.xml b/games-fps/ut2004-bonuspack-mega/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-mega/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-bonuspack-mega/ut2004-bonuspack-mega-1-r2.ebuild b/games-fps/ut2004-bonuspack-mega/ut2004-bonuspack-mega-1-r2.ebuild
new file mode 100644
index 000000000000..807f91c6bf04
--- /dev/null
+++ b/games-fps/ut2004-bonuspack-mega/ut2004-bonuspack-mega-1-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Megapack bonus pack"
+MOD_NAME="Megapack"
+
+inherit games games-mods
+
+MY_P="ut2004megapack-linux.tar.bz2"
+HOMEPAGE="http://www.unrealtournament2004.com/"
+SRC_URI="http://ut2004.ut-files.com/BonusPacks/${MY_P}"
+
+LICENSE="ut2003"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ mv -f UT2004MegaPack/* . || die
+ rmdir UT2004MegaPack
+
+ # Remove files in Megapack which are already installed
+ rm -r Animations Speech Web
+
+ rm Help/{ReadMePatch.int.txt,UT2004Logo.bmp}
+ mv Help/BonusPackReadme.txt Help/MegapackReadme.txt
+
+ rm Maps/ONS-{Adara,IslandHop,Tricky,Urban}.ut2
+ rm Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax
+ rm StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx
+
+ # System
+ rm System/{AL,AS-,B,b,C,D,E,F,G,I,L,O,o,S,s,U,V,W,X,x}*
+ rm System/{ucc,ut2004}-bin
+ rm System/{ucc,ut2004}-bin-linux-amd64
+ rm Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S,HourAdaraTexor,jwfasterfiles,ONSBP_DestroyedVehicles,ONSBPTextures,PC_UrbanTex,UT2004ECEPlayerSkins}.utx
+}
diff --git a/games-fps/ut2004-cor-1.01-r1 b/games-fps/ut2004-cor-1.01-r1
deleted file mode 100644
index 46884aebf408..000000000000
--- a/games-fps/ut2004-cor-1.01-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Counter Organic Revolution - Shape-shifting robot teamplay mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/counter-organic-revolution
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/cor_beta_v1.0.zip https://ut.rushbase.net/beyondunreal/mods/cor_patch_b1_to_b101.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7c1ea5c2528bdc4062679329aeadd6ee
diff --git a/games-fps/ut2004-cor/Manifest b/games-fps/ut2004-cor/Manifest
new file mode 100644
index 000000000000..67aaf112f834
--- /dev/null
+++ b/games-fps/ut2004-cor/Manifest
@@ -0,0 +1,4 @@
+DIST cor_beta_v1.0.zip 278979612 BLAKE2B 39cc74b36bb8b752d6390c320077f5c6fa43de835fa490cad7156a57e2c5406f6ba2f15d8991a4bcb5605e5c722d221a093c11df1d47455568a804ab3d34df0d SHA512 04a8db1b31478785052d162e2007eb336d1d99c76f96098163c71616d3951e4e3c7b95c1b29a05e9acf2e0554c5bd20e5e2df10b93325b0e2cabf3a5a60640a6
+DIST cor_patch_b1_to_b101.zip 20386490 BLAKE2B 03091a14d15d749e33d92e5fa98a46b5a4d0c3fef83ab84869da490cff8395bef7bfabe42903271cb91324ad3931461d9f3080a267c0c2ea0c03faf692991471 SHA512 7b7243727a0e4570545f9d3f93a141b61da5e4cbe458894602925733396b3f9037c7a9a21a1ee9c9638181b4c321a9030a29837e1e808826a70bb52f54e2d6a6
+EBUILD ut2004-cor-1.01-r1.ebuild 560 BLAKE2B c9d72ca7375d8e7498b4f98c287d61a389e571601d7c8023dfa487e430ed8ec7578c20208c63d367739d70eaaa455b334a282f88e92712fc9b76f851793175b1 SHA512 e6cf39b4239ec7553385cab526bc92c8444488e410bb6966ada0148a5598d1bc4bc63b45cc4b938f56cd8856b39e9e7c389036d3427ed7ca9040c0485dc27167
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-cor/metadata.xml b/games-fps/ut2004-cor/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-cor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-cor/ut2004-cor-1.01-r1.ebuild b/games-fps/ut2004-cor/ut2004-cor-1.01-r1.ebuild
new file mode 100644
index 000000000000..3cde6540eb44
--- /dev/null
+++ b/games-fps/ut2004-cor/ut2004-cor-1.01-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Shape-shifting robot teamplay mod"
+MOD_NAME="Counter Organic Revolution"
+MOD_DIR="COR"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/counter-organic-revolution"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/cor_beta_v1.0.zip
+ https://ut.rushbase.net/beyondunreal/mods/cor_patch_b1_to_b101.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f ${MOD_DIR}/*.bat || die
+}
diff --git a/games-fps/ut2004-crossfire-1.95 b/games-fps/ut2004-crossfire-1.95
deleted file mode 100644
index c180222b7b57..000000000000
--- a/games-fps/ut2004-crossfire-1.95
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Crossfire - Special Forces vs Terrorists
-EAPI=5
-HOMEPAGE=http://to-crossfire.tnc-clan.de/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=free-noncomm
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=ftp://files.tnc-clan.de/TOCrossfire/client/TOCrossfire_beta_1.95_full.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=04b49aa7636a85d6795d58ea2d56743c
diff --git a/games-fps/ut2004-crossfire/Manifest b/games-fps/ut2004-crossfire/Manifest
new file mode 100644
index 000000000000..76897d013e26
--- /dev/null
+++ b/games-fps/ut2004-crossfire/Manifest
@@ -0,0 +1,3 @@
+DIST TOCrossfire_beta_1.95_full.zip 1243833907 BLAKE2B ec6ce5ecec8357ed0a3b90eb7c64b25f372a37224454840bb2f55f0080d0f722fa4cd436d3299f11670627e7da1c46ad92ea6459cdbe734ed7d075117403b9e0 SHA512 a02c8221f7687e4a2276f6da9f9fc480b0c8aaf3f98517134614079699a0ecda088e781d5d0251b7da8588493afa394acc5eed99f40034d3555feeef6e175bbe
+EBUILD ut2004-crossfire-1.95.ebuild 699 BLAKE2B bca60fc8d3f2b8a938d72f6ca1d8ec7d4235fbca317d1ca138380ace55037c95443c874edcf46b24c1455990c1607cba9d646aabac4f8322ddddf30a0221204f SHA512 b1912616eb0e3feec1db88dc4d7a7b72d9dfcab6d91c9e880c7fa090f4eec6faa360e449f8d761edecc296c213ed0d034ede98493e256ff1d1b9fb4535081806
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-crossfire/metadata.xml b/games-fps/ut2004-crossfire/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-crossfire/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-crossfire/ut2004-crossfire-1.95.ebuild b/games-fps/ut2004-crossfire/ut2004-crossfire-1.95.ebuild
new file mode 100644
index 000000000000..52d8a5e9ed13
--- /dev/null
+++ b/games-fps/ut2004-crossfire/ut2004-crossfire-1.95.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_NAME="Crossfire"
+MOD_DESC="Special Forces vs Terrorists"
+MOD_DIR="TOCrossfire"
+MOD_ICON="Help/icons/TOC_TERROR2.png"
+
+inherit games games-mods
+
+HOMEPAGE="http://to-crossfire.tnc-clan.de/"
+SRC_URI="ftp://files.tnc-clan.de/TOCrossfire/client/TOCrossfire_beta_${PV}_full.zip"
+
+# See Help/EULA.txt
+LICENSE="free-noncomm"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_unpack() {
+ unpack ${A}
+ unpack ./TOCinstall.tgz
+}
+
+src_prepare() {
+ rm -f *.{exe,reg,sh,tgz,txt} || die
+ rm -rf TOCInstaller.app stuff || die
+ cd ${MOD_DIR} || die
+ rm -f *.{bat,exe} Help/*.{exe,zip} || die
+}
diff --git a/games-fps/ut2004-data-3186-r4 b/games-fps/ut2004-data-3186-r4
deleted file mode 100644
index f552570d63a0..000000000000
--- a/games-fps/ut2004-data-3186-r4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=games-util/uz2unpack >=app-arch/unshield-0.5-r1
-DESCRIPTION=Unreal Tournament 2004 - This is the data portion of UT2004
-EAPI=5
-HOMEPAGE=http://www.unrealtournament2004.com/
-KEYWORDS=~amd64 ~x86
-LICENSE=ut2003
-PDEPEND=games-fps/ut2004
-PROPERTIES=interactive
-RDEPEND=games-misc/games-envd
-SLOT=0
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 cdrom c64e4c5e9cbf2a58be31431e015a6210 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2d5b0504a4fb75a5ff3a76225798499d
diff --git a/games-fps/ut2004-data/Manifest b/games-fps/ut2004-data/Manifest
new file mode 100644
index 000000000000..ec4b009b4825
--- /dev/null
+++ b/games-fps/ut2004-data/Manifest
@@ -0,0 +1,2 @@
+EBUILD ut2004-data-3186-r4.ebuild 12493 BLAKE2B 5a1aaf249c8e678108e2ce9d1600959498c2b2a08401d842d431a8ed2119a7ede486b402da582d2e4cca72f0e1eceb03034672c0b6132a14d7340a22f0ffee6d SHA512 68b5d2a24c5818235edc984c60de39a3a9b17bab304d1ecb601eab6db170f119c9a300756900700cde88c1e17ed103879d2db8982dfa2ec3ae0d83ea3e9a069e
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-data/metadata.xml b/games-fps/ut2004-data/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild b/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild
new file mode 100644
index 000000000000..7c761a8f9873
--- /dev/null
+++ b/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild
@@ -0,0 +1,377 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker cdrom portability games
+
+DESCRIPTION="Unreal Tournament 2004 - This is the data portion of UT2004"
+HOMEPAGE="http://www.unrealtournament2004.com/"
+SRC_URI=""
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="games-util/uz2unpack
+ >=app-arch/unshield-0.5-r1"
+PDEPEND="games-fps/ut2004"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/ut2004
+Ddir=${D}/${dir}
+
+check_dvd() {
+ # The following is a nasty mess to determine if we are installing from
+ # a DVD or from multiple CDs. Anyone feel free to submit patches to this
+ # to bugs.gentoo.org as I know it is a very ugly hack.
+
+ USE_DVD=
+ USE_ECE_DVD=
+ USE_MIDWAY_DVD=
+ USE_GERMAN_MIDWAY_DVD=
+
+ local point foo fs mnts=()
+ while read point foo fs foo ; do
+ [[ ${fs} =~ (9660|udf) ]] && mnts+=( "${point//\040/ }" )
+ done < <(get_mounts)
+
+ local r
+ for r in "${CD_ROOT}" "${CD_ROOT_1}" "${mnts[@]}" ; do
+ if [[ -n ${r} ]] ; then
+ einfo "Searching ${r}"
+ if [[ -f ${r}/AutoRunData/Unreal.ico ]] \
+ && [[ -f ${r}/Disk5/data6.cab ]] ; then
+ USE_MIDWAY_DVD=1
+ USE_DVD=1
+ elif [[ -f ${r}/autorund/unreal.ico ]] \
+ && [[ -f ${r}/disk7/data8.cab ]] ; then
+ USE_MIDWAY_DVD=1
+ USE_GERMAN_MIDWAY_DVD=1
+ USE_DVD=1
+ else
+ [[ -d ${r}/CD1 ]] && USE_DVD=1
+ [[ -d ${r}/CD7 ]] && USE_ECE_DVD=1
+ fi
+ fi
+ done
+}
+
+grabdirs() {
+ local d
+ for d in {Music,Sounds,Speech,StaticMeshes,Textures} ; do
+ local srcdir=${CDROM_ROOT}/${1}/${d}
+ # Is flexible to handle CD_ROOT vs CD_ROOT_1 mixups
+ [[ -d ${srcdir} ]] || srcdir=${CDROM_ROOT}/${d}
+ if [[ -d ${srcdir} ]] ; then
+ insinto "${dir}"
+ doins -r "${srcdir}"
+ fi
+ done
+}
+
+pkg_setup() {
+ games_pkg_setup
+
+ ewarn "This is a huge package. If you do not have at least 7GB of free"
+ ewarn "disk space in ${PORTAGE_TMPDIR} and also in ${GAMES_PREFIX_OPT}"
+ ewarn "then you should abort this installation now and free up some space."
+}
+
+src_unpack() {
+ check_dvd
+
+ if [[ ${USE_DVD} -eq 1 ]] ; then
+ if [[ ${USE_MIDWAY_DVD} -eq 1 ]] ; then
+ # Is 1 DVD, either UT2004-only or Anthology
+ if [[ ${USE_GERMAN_MIDWAY_DVD} -eq 1 ]] ; then
+ cdrom_get_cds autorund/unreal.ico
+ else
+ cdrom_get_cds AutoRunData/Unreal.ico
+ fi
+ else
+ DISK1="CD1"
+ DISK2="CD2"
+ DISK3="CD3"
+ DISK4="CD4"
+ DISK5="CD5"
+ DISK6="CD6"
+ if [[ ${USE_ECE_DVD} -eq 1 ]] ; then
+ # Editor's Choice Edition DVD
+ cdrom_get_cds \
+ ${DISK1}/System/UT2004.ini \
+ ${DISK2}/Textures/2K4Fonts.utx.uz2 \
+ ${DISK3}/Textures/ONSDeadVehicles-TX.utx.uz2 \
+ ${DISK4}/Textures/XGameShaders2004.utx.uz2 \
+ ${DISK5}/Speech/ons.xml \
+ ${DISK6}/Sounds/TauntPack.det_uax.uz2
+ else
+ # Original DVD
+ cdrom_get_cds \
+ ${DISK1}/System/UT2004.ini \
+ ${DISK2}/Textures/2K4Fonts.utx.uz2 \
+ ${DISK3}/Textures/ONSDeadVehicles-TX.utx.uz2 \
+ ${DISK4}/StaticMeshes/AlienTech.usx.uz2 \
+ ${DISK5}/Speech/ons.xml \
+ ${DISK6}/Sounds/TauntPack.det_uax.uz2
+ fi
+ fi
+ else
+ # 6 CDs
+ cdrom_get_cds \
+ System/UT2004.ini \
+ Textures/2K4Fonts.utx.uz2 \
+ Textures/ONSDeadVehicles-TX.utx.uz2 \
+ StaticMeshes/AlienTech.usx.uz2 \
+ Speech/ons.xml \
+ Sounds/TauntPack.det_uax.uz2
+ fi
+
+ if [[ ${USE_MIDWAY_DVD} -ne 1 ]] ; then
+ unpack_makeself "${CDROM_ROOT}"/linux-installer.sh
+ use x86 && unpack ./linux-x86.tar
+ use amd64 && unpack ./linux-amd64.tar
+ fi
+}
+
+src_install() {
+ local j
+
+ if [[ ${USE_MIDWAY_DVD} -eq 1 ]] ; then
+ einfo "Copying files from UT2004 Midway DVD."
+
+ if [[ -f ${CDROM_ROOT}/Manual/Manual.pdf ]] ; then
+ insinto "${dir}"/Manual
+ doins "${CDROM_ROOT}"/Manual/Manual.pdf
+ elif [[ -f ${CDROM_ROOT}/Manual.pdf ]] ; then
+ insinto "${dir}"/Manual
+ doins "${CDROM_ROOT}"/Manual.pdf
+ fi
+
+ # Symlinks for unshield. data1&2.cab are both in Disk1.
+ # unshield needs data1.hdr
+ # The Midway Anthology DVD contains up to data9.cab
+ local cabfile
+ for cabfile in "${CDROM_ROOT}"/[dD]isk*/data*.{cab,hdr} ; do
+ ln -sfn "${cabfile}" .
+ done
+
+ # The big extraction
+ einfo "Extracting from CAB files - this will take several minutes..."
+ unshield x data1.cab || die
+
+ if [[ -d 4_UT2004_Animations ]] ; then
+ # Delete the other games on the Anthology DVD
+ rm -rf {1,2,3}_Unreal* 4_UT2004_EXE Launcher_* OCXFiles
+ # Rename directories to be same as Midway UT2004-only DVD,
+ # i.e. rename "4_UT2004_Animations" to "Animations".
+ for j in 4_UT2004_* ; do
+ mv -f ${j} ${j/4_UT2004_} || die
+ done
+ fi
+
+ # The "logging" subdirectory is created by unshield.
+ rm -rf logging
+ rm -f *.{cab,hdr}
+
+ for j in Animations Benchmark ForceFeedback Help KarmaData \
+ Manual Maps Music Sounds Speech StaticMeshes \
+ System Textures Web ; do
+
+ # UT2004-only DVD has "All_*" dirs, and Anthology DVD has "*_All"
+ if [[ -d All_${j} ]] ; then
+ if [[ -d ${j} ]] ; then
+ cp -rf All_${j}/* ${j}/ || die
+ else
+ mv -f All_${j} ${j} || die
+ fi
+ fi
+ if [[ -d ${j}_All ]] ; then
+ if [[ -d ${j} ]] ; then
+ cp -rf ${j}_All/* ${j}/ || die
+ else
+ mv -f ${j}_All ${j} || die
+ fi
+ fi
+
+ if [[ -d English_${j} ]] ; then
+ if [[ -d ${j} ]] ; then
+ cp -rf English_${j}/* ${j}/ || die
+ else
+ mv -f English_${j} ${j} || die
+ fi
+ fi
+ if [[ -d ${j}_English ]] ; then
+ if [[ -d ${j} ]] ; then
+ cp -rf ${j}_English/* ${j}/ || die
+ else
+ mv -f ${j}_English ${j} || die
+ fi
+ fi
+
+ # Ensure that the directory exists
+ mkdir -p ${j}
+ done
+
+ # Rearrange directories
+ if [[ -d English_Sounds_Speech_System_Help ]] ; then
+ # http://utforums.epicgames.com/showthread.php?t=558146
+ for j in Sounds Speech System Help ; do
+ cp -rf English_Sounds_Speech_System_Help/${j}/* ${j}/ || die
+ done
+ fi
+
+ if [[ ! -d Benchmark/Stuff ]] ; then
+ mkdir -p Benchmark/Stuff || die
+ cp -f BenchmarkStuff/timedemo.txt Benchmark/Stuff || die
+ fi
+
+ if [[ ! -d System/editorres ]] ; then
+ mkdir -p System/editorres || die
+ cp -rf Systemeditorres/* System/editorres || die
+ fi
+
+ if [[ ! -d Web/images ]] ; then
+ mkdir -p Web/{images,ServerAdmin,Src} || die
+ cp -rf Webimages/* Web/images || die
+ cp -rf WebServerAdmin/* Web/ServerAdmin || die
+ cp -rf WebSrc/* Web/Src || die
+ fi
+
+ # Other languages
+ for j in Help_* Sounds_* System_* ; do
+ [[ ! -d ${j} ]] && continue
+ mv -n ${j}/* ${j/_*}/ || die
+ done
+
+ # Remove unnecessary directories
+ rm -rf Benchmark{CSVs,Logs,Results,Stuff}
+ rm -rf Systemeditorres Web{images,ServerAdmin,Src}
+ rm -rf Help_* Sounds_* Speech_* System_*
+ rm -rf \<* \[* _* All_* English_* *_All *_English
+
+ # These files are replaced later, for all installations
+ rm -f $(find . -type f -name 'DO_NOT_DELETE.ME')
+
+ # Install icon
+ if [[ -f ut2004.xpm ]] ; then
+ doicon ut2004.xpm
+ elif [[ -f Help/Unreal.ico ]] ; then
+ newicon Help/Unreal.ico ut2004.ico
+ elif [[ -f ${CDROM_ROOT}/AutoRunData/Unreal.ico ]] ; then
+ newicon "${CDROM_ROOT}"/AutoRunData/Unreal.ico ut2004.ico
+ elif [[ -f Help/Unreal.bmp ]] ; then
+ newicon Help/Unreal.bmp ut2004.bmp
+ fi
+
+ # The big install
+ einfo "Installing UT2004 directories..."
+ insinto "${dir}"
+ doins -r *
+ else
+ # Disk 1
+ einfo "Copying files from Disk 1..."
+ insinto "${dir}"
+ doins -r "${CDROM_ROOT}"/${DISK1}/{Animations,ForceFeedback,Help,KarmaData,Maps,Sounds,Web}
+ insinto "${dir}"/System
+ doins -r "${CDROM_ROOT}"/${DISK1}/System/{editorres,*.{bat,bmp,dat,det,est,frt,ini,int,itt,kot,md5,smt,tmt,u,ucl,upl,url}}
+ insinto "${dir}"/Manual
+ doins "${CDROM_ROOT}"/${DISK1}/Manual/Manual.pdf
+ insinto "${dir}"/Benchmark/Stuff
+ doins -r "${CDROM_ROOT}"/${DISK1}/Benchmark/Stuff/*
+ cdrom_load_next_cd
+
+ local diskno
+ for diskno in {2..5} ; do
+ einfo "Copying files from Disk ${diskno}..."
+ local varname="DISK${diskno}"
+ grabdirs ${!varname}
+ cdrom_load_next_cd
+ done
+
+ # Disk 6
+ einfo "Copying files from Disk 6..."
+ grabdirs "${DISK6}"
+
+ # Install extra help files
+ insinto "${dir}"/Help
+ doins README.linux Unreal.bmp UT2004_EULA.txt ut2004.xpm
+
+ doicon ut2004.xpm
+
+ # Uncompress files
+ einfo "Uncompressing files... this *will* take a while..."
+ for j in Animations Maps Sounds StaticMeshes Textures ; do
+ fperms -R u+w "${dir}/${j}" || die
+ games_ut_unpack "${Ddir}"/${j}
+ done
+ fi
+
+ # Create empty files in Benchmark
+ for j in {CSVs,Logs,Results} ;do
+ keepdir "${dir}"/Benchmark/${j}
+ done
+
+ make_wrapper ut2004 ./ut2004-bin "${dir}"/System "${dir}"/System "${dir}"
+
+ # Remove unneccessary files
+ rm -f "${Ddir}"/*.{bat,exe,EXE,int}
+ rm -f "${Ddir}"/Help/{.DS_Store,SAPI-EULA.txt}
+ rm -f "${Ddir}"/Manual/*.exe
+ rm -rf "${Ddir}"/Speech/Redist
+ rm -f "${Ddir}"/System/*.{bat,dll,exe,tar}
+ rm -f "${Ddir}"/System/{{License,Manifest}.smt,{ucc,StdOut}.log}
+ rm -f "${Ddir}"/System/{User,UT2004}.ini
+
+ # Remove file collisions with ut2004-3369-r4
+ rm -f "${Ddir}"/Animations/ONSNewTank-A.ukx
+ rm -f "${Ddir}"/Help/UT2004Logo.bmp
+ rm -f "${Ddir}"/System/{ALAudio.kot,AS-{Convoy,FallenCity,Glacier}.kot,AS-{Convoy,FallenCity,Glacier,Junkyard,Mothership,RobotFactory}.int,bonuspack.{det,est,frt},BonusPack.{int,itt,u},BR-Serenity.int}
+ rm -f "${Ddir}"/System/CTF-{AbsoluteZero,BridgeOfFate,DE-ElecFields,DoubleDammage,January,LostFaith}.int
+ rm -f "${Ddir}"/System/DM-{1on1-Albatross,1on1-Desolation,1on1-Mixer,Corrugation,IronDeity,JunkYard}.int
+ rm -f "${Ddir}"/System/{DOM-Atlantis.int,OnslaughtBP.{kot,u,ucl},OnslaughtFull.int}
+ rm -f "${Ddir}"/System/{Build.ini,CacheRecords.ucl,Core.{est,frt,kot,int,itt,u},CTF-January.kot,D3DDrv.kot,DM-1on1-Squader.kot}
+ rm -f "${Ddir}"/System/{Editor,Engine,Gameplay,GamePlay,UnrealGame,UT2k4Assault,XInterface,XPickups,xVoting,XVoting,XWeapons,XWebAdmin}.{det,est,frt,int,itt,u}
+ rm -f "${Ddir}"/System/{Fire.u,IpDrv.u,License.int,ONS-ArcticStronghold.kot}
+ rm -f "${Ddir}"/System/{OnslaughtFull,onslaughtfull,UT2k4AssaultFull}.{det,est,frt,itt,u}
+ rm -f "${Ddir}"/System/{GUI2K4,Onslaught,skaarjpack,SkaarjPack,XGame}.{det,est,frt,int,itt,kot,u}
+ rm -f "${Ddir}"/System/{Setup,Window}.{det,est,frt,int,itt,kot}
+ rm -f "${Ddir}"/System/XPlayers.{det,est,frt,int,itt}
+ rm -f "${Ddir}"/System/{UnrealEd.u,UTClassic.u,UTV2004c.u,UTV2004s.u,UWeb.u,Vehicles.kot,Vehicles.u,Xweapons.itt,UT2K4AssaultFull.int,UTV2004.kot,UTV2004s.kot}
+ rm -f "${Ddir}"/System/{XAdmin.kot,XAdmin.u,XMaps.det,XMaps.est}
+ rm -f "${Ddir}"/Textures/jwfasterfiles.utx
+ rm -f "${Ddir}"/Web/ServerAdmin/{admins_home.htm,current_bots.htm,ut2003.css,current_bots_species_group.inc}
+ rm -f "${Ddir}"/Web/ServerAdmin/ClassicUT/current_bots.htm
+ rm -f "${Ddir}"/Web/ServerAdmin/UnrealAdminPage/{adminsframe.htm,admins_home.htm,admins_menu.htm,current_bots.htm,currentframe.htm,current_menu.htm}
+ rm -f "${Ddir}"/Web/ServerAdmin/UnrealAdminPage/{defaultsframe.htm,defaults_menu.htm,footer.inc,mainmenu.htm,mainmenu_itemd.inc,rootframe.htm,UnrealAdminPage.css}
+ rm -f "${Ddir}"/Web/ServerAdmin/UT2K3Stats/{admins_home.htm,current_bots.htm,ut2003stats.css}
+
+ # Remove file collisions with ut2004-bonuspack-ece
+ rm -f "${Ddir}"/Animations/{MechaSkaarjAnims,MetalGuardAnim,NecrisAnim,ONSBPAnimations}.ukx
+ rm -f "${Ddir}"/Help/BonusPackReadme.txt
+ rm -f "${Ddir}"/Maps/ONS-{Adara,IslandHop,Tricky,Urban}.ut2
+ rm -f "${Ddir}"/Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax
+ rm -f "${Ddir}"/StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx
+ rm -f "${Ddir}"/System/{ONS-Adara.int,ONS-IslandHop.int,ONS-Tricky.int,ONS-Urban.int,OnslaughtBP.int,xaplayersl3.upl}
+ rm -f "${Ddir}"/Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S}.utx
+ rm -f "${Ddir}"/Textures/{HourAdaraTexor,ONSBPTextures,ONSBP_DestroyedVehicles,PC_UrbanTex,UT2004ECEPlayerSkins}.utx
+
+ # Remove file collisions with ut2004-bonuspack-mega
+ rm -f "${Ddir}"/Help/MegapackReadme.txt
+ rm -f "${Ddir}"/Maps/{AS-BP2-Acatana,AS-BP2-Jumpship,AS-BP2-Outback,AS-BP2-SubRosa,AS-BP2-Thrust}.ut2
+ rm -f "${Ddir}"/Maps/{CTF-BP2-Concentrate,CTF-BP2-Pistola,DM-BP2-Calandras,DM-BP2-GoopGod}.ut2
+ rm -f "${Ddir}"/Music/APubWithNoBeer.ogg
+ rm -f "${Ddir}"/Sounds/A_Announcer_BP2.uax
+ rm -f "${Ddir}"/StaticMeshes/{JumpShipObjects,Ty_RocketSMeshes}.usx
+ rm -f "${Ddir}"/System/{AssaultBP.u,Manifest.in{i,t},Packages.md5}
+ rm -f "${Ddir}"/Textures/{JumpShipTextures,T_Epic2k4BP2,Ty_RocketTextures}.utx
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "This is only the data portion of the game. To play UT2004,"
+ elog "you still need to install games-fps/ut2004."
+}
diff --git a/games-fps/ut2004-deathball-2.4w b/games-fps/ut2004-deathball-2.4w
deleted file mode 100644
index d4cc751d3bdb..000000000000
--- a/games-fps/ut2004-deathball-2.4w
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Deathball - Fast-paced first person sport mod
-EAPI=5
-HOMEPAGE=http://www.deathball.net/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=http://www.deathball.net/downloads/deathball24w.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5d6c0197adb74cf91567011de187d420
diff --git a/games-fps/ut2004-deathball/Manifest b/games-fps/ut2004-deathball/Manifest
new file mode 100644
index 000000000000..7b209e2d629b
--- /dev/null
+++ b/games-fps/ut2004-deathball/Manifest
@@ -0,0 +1,3 @@
+DIST deathball24w.zip 79276308 BLAKE2B 4e060e5f4f3dc8df7ee22b1c703531e5e1f97842aaf01fef9b87ef00895525f81cb1560cabdf5946fc8b7120c458557816857fba6e24f253da858133039d92b1 SHA512 b310c38dcc5889fc3f56861fe8d05e53c4b399b33e318614bfeb86b899051c8870b23bc39a82eda7eb7d469d7d2d32c361df922bcba18f01d03aa66239b133bc
+EBUILD ut2004-deathball-2.4w.ebuild 528 BLAKE2B 1e455b5cb36b8546c5dc79dbc56cb9cd849474c01197d7c46822198688e84ac0917953048f8e009943c7955dec66e7e01d237147e720bbb74bc0aed55e767854 SHA512 f2f455aeb238441e1387d12f275b5b5bca24118cc698946fb7888796b75acd42d1e4b4128f34719d2e444a03048fac3f025a8027c68478eb940ed9a05e07d0fe
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-deathball/metadata.xml b/games-fps/ut2004-deathball/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-deathball/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-deathball/ut2004-deathball-2.4w.ebuild b/games-fps/ut2004-deathball/ut2004-deathball-2.4w.ebuild
new file mode 100644
index 000000000000..bd51db1c6c89
--- /dev/null
+++ b/games-fps/ut2004-deathball/ut2004-deathball-2.4w.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Fast-paced first person sport mod"
+MOD_NAME="Deathball"
+MOD_DIR="deathball"
+MOD_ICON="dbicon.ico"
+
+inherit games games-mods
+
+HOMEPAGE="http://www.deathball.net/"
+SRC_URI="http://www.deathball.net/downloads/deathball${PV/.}.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ cd ${MOD_DIR} || die
+ mv -f ../*.txt . || die
+ rm -f *.bat *.cmd *.db Help/*.db || die
+}
diff --git a/games-fps/ut2004-demo-3334 b/games-fps/ut2004-demo-3334
deleted file mode 100644
index 249e9ee9b5df..000000000000
--- a/games-fps/ut2004-demo-3334
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DESCRIPTION=Demo for the critically-acclaimed first-person shooter
-EAPI=5
-HOMEPAGE=http://www.unrealtournament.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=ut2003-demo
-RDEPEND=virtual/libstdc++:3.3 x11-libs/libX11[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] virtual/opengl[abi_x86_32(-)] games-misc/games-envd
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://gentoo/ut2004-lnx-demo3334.run
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c15c31e344aaf6bafb95565e084377bf
diff --git a/games-fps/ut2004-demo/Manifest b/games-fps/ut2004-demo/Manifest
new file mode 100644
index 000000000000..08be85fa9a4f
--- /dev/null
+++ b/games-fps/ut2004-demo/Manifest
@@ -0,0 +1,3 @@
+DIST ut2004-lnx-demo3334.run 288950743 BLAKE2B 82a45af7de4735cbcb1b8b4b5303d28d96e3e4888e12b60b920db096ed07b4c5d902eda258276c95865316206ddfd5828174397a8e921118e33f63be01e71861 SHA512 4cdd61901f4c082d1e02caf301a24f1e18e89f4efc9fbce0e4496178916b6c14245131b62f27deb17f1763cd4b8bf68ee60cc7af5ece5fa2b39d1bf349361da0
+EBUILD ut2004-demo-3334.ebuild 1865 BLAKE2B 2654f4494e232e40d44622e1cd997f327b4c152a67ddb17ce54efd3f7be5de290eb6ebf63c79dae7b817d3ed19075c4384079559590ad64607f763f42d232988 SHA512 859a82c7cb969396640f35824cd0fe3a7ad6c0a172e1ce68a60230e57599b174838c773a71f756374ffdf551617945999744f7e4f4ec7bb06ea5529b492dfded
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-demo/metadata.xml b/games-fps/ut2004-demo/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-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>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-demo/ut2004-demo-3334.ebuild b/games-fps/ut2004-demo/ut2004-demo-3334.ebuild
new file mode 100644
index 000000000000..53cca08e3d83
--- /dev/null
+++ b/games-fps/ut2004-demo/ut2004-demo-3334.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_P="ut2004-lnx-demo${PV}.run"
+DESCRIPTION="Demo for the critically-acclaimed first-person shooter"
+HOMEPAGE="http://www.unrealtournament.com/"
+SRC_URI="mirror://gentoo/${MY_P}"
+
+LICENSE="ut2003-demo"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="strip"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ virtual/libstdc++:3.3
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]
+"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/System/*"
+
+src_unpack() {
+ unpack_makeself
+ unpack ./setupstuff.tar.gz
+}
+
+src_install() {
+ dodir "${dir}"
+
+ tar xjf ut2004demo.tar.bz2 -C "${Ddir}" || die
+
+ if use x86
+ then
+ tar xjf linux-x86.tar.bz2 || die
+ fi
+ if use amd64
+ then
+ tar xjf linux-amd64.tar.bz2 || die
+ fi
+
+ insinto "${dir}"
+ doins README.linux ut2004.xpm
+ newicon ut2004.xpm ut2004-demo.xpm
+
+ exeinto "${dir}"
+ doexe bin/ut2004-demo
+
+ exeinto "${dir}"/System
+ doexe System/{libSDL-1.2.so.0,openal.so,ucc-bin,ut2004-bin}
+
+ games_make_wrapper ut2004-demo ./ut2004-demo "${dir}" "${dir}"
+ make_desktop_entry ut2004-demo "Unreal Tournament 2004 (Demo)" ut2004-demo
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "For Text To Speech:"
+ elog " 1) emerge festival speechd"
+ elog " 2) Edit your ~/.ut2004demo/System/UT2004.ini file."
+ elog " In the [SDLDrv.SDLClient] section, add:"
+ elog " TextToSpeechFile=/dev/speech"
+ elog " 3) Start speechd."
+ elog " 4) Start the game. Be sure to go into the Audio"
+ elog " options and enable Text To Speech."
+ echo
+ elog "To test, pull down the console (~) and type:"
+ elog " TTS this is a test."
+ echo
+ elog "You should hear something that sounds like 'This is a test.'"
+ echo
+}
diff --git a/games-fps/ut2004-fragops-2.20 b/games-fps/ut2004-fragops-2.20
deleted file mode 100644
index 4ef654dd8f20..000000000000
--- a/games-fps/ut2004-fragops-2.20
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Frag Ops - realism mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/fragops
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/fragops_v220_fulllmw.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6e49f21012842d9471d173361bcba31d
diff --git a/games-fps/ut2004-fragops/Manifest b/games-fps/ut2004-fragops/Manifest
new file mode 100644
index 000000000000..852dd3fe5045
--- /dev/null
+++ b/games-fps/ut2004-fragops/Manifest
@@ -0,0 +1,3 @@
+DIST fragops_v220_fulllmw.zip 554114758 BLAKE2B a3cfb94b64e6bb114077a0c802bbafe7d374c943c9524fd52a5982ab46c7c5e2c9d72622ea79ad0058c15ee3aa5e27fe0bb5a74e9c88847f8477cf7890a1fdce SHA512 f2a0b1a8e035e038a5241053c30761f725003aba8c45c862348ab8a8895c2db056bab45e2a1791080dcf54234923d736bd7d7361bb38bb2b67ebf5e077fc83e5
+EBUILD ut2004-fragops-2.20.ebuild 478 BLAKE2B b34bd14552676b701491e74344a9bbc6d7484aaf8088ab79c50df7a089e6b3a8095b6c2cba60298ca60f28d3fcca1328b3e4bd38efbb11e0ae66540ff3fdb365 SHA512 f06e65496e4f76f3468149c9c17c7d5b60b1e968a8302d2aa40cce86f93bcd85fb89a50bfa257ba4e6144e95a36d845ba25cbefe81224e9b3fad6db52e1ec5c9
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-fragops/metadata.xml b/games-fps/ut2004-fragops/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-fragops/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-fragops/ut2004-fragops-2.20.ebuild b/games-fps/ut2004-fragops/ut2004-fragops-2.20.ebuild
new file mode 100644
index 000000000000..c20d529387f3
--- /dev/null
+++ b/games-fps/ut2004-fragops/ut2004-fragops-2.20.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="realism mod"
+MOD_NAME="Frag Ops"
+MOD_DIR="FragOps"
+MOD_ICON="Help/FragOps.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/fragops"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/fragops_v220_fulllmw.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f *.TXT ${MOD_DIR}/*.bat || die
+}
diff --git a/games-fps/ut2004-hamsterbash-1 b/games-fps/ut2004-hamsterbash-1
deleted file mode 100644
index a17732a73ad2..000000000000
--- a/games-fps/ut2004-hamsterbash-1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Hamster Bash - Cute and violent hamster cage rampage mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/hamsterbash
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=fetch
-SLOT=0
-SRC_URI=HamsterBashFinal.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e422c2e99fb25b52a3cd1d5007fefcc9
diff --git a/games-fps/ut2004-hamsterbash/Manifest b/games-fps/ut2004-hamsterbash/Manifest
new file mode 100644
index 000000000000..3e1811f310ff
--- /dev/null
+++ b/games-fps/ut2004-hamsterbash/Manifest
@@ -0,0 +1,3 @@
+DIST HamsterBashFinal.zip 98608028 BLAKE2B f80aabf16768adfa511efd72d762e50fdf45e98286306dab861d1989405d32712d03631d53b3f959c033e4e9c491b3ff16825fb00f33f75bfbe697d1f22be65b SHA512 641a642ce08d5188045f9d015a92f0846ac22c65b7b047bb0096f216d7cb9d0a8074e5e11b01fc187b56fbdf2d5cbc0e5cd56c2eb3f40f744fbeadf291e08573
+EBUILD ut2004-hamsterbash-1.ebuild 601 BLAKE2B 9d6b099dde214bb8d3fec6ee40a930384cb81909cdf62f1ec62cc4357d3df398f0f26822dc008f6e6094f5367ae4e16339e7ab7b824543e5cefe0fcc50992c46 SHA512 4682c645342549fc30c6bfd85fcd6be72ebb48342e9a2fc10d4e65f71b1b4adf796dee9bdb077e2bc54647c42c4760baa6ef4c656dc69ad86c13ab261d610c87
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-hamsterbash/metadata.xml b/games-fps/ut2004-hamsterbash/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-hamsterbash/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-hamsterbash/ut2004-hamsterbash-1.ebuild b/games-fps/ut2004-hamsterbash/ut2004-hamsterbash-1.ebuild
new file mode 100644
index 000000000000..deff807a29dd
--- /dev/null
+++ b/games-fps/ut2004-hamsterbash/ut2004-hamsterbash-1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="Cute and violent hamster cage rampage mod"
+MOD_NAME="Hamster Bash"
+MOD_DIR="hamsterbash"
+
+inherit unpacker games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/hamsterbash"
+SRC_URI="HamsterBashFinal.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "${HOMEPAGE}"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ mv -f HamsterBash ${MOD_DIR} || die
+ rm -rf System
+}
diff --git a/games-fps/ut2004-muralis-1.15 b/games-fps/ut2004-muralis-1.15
deleted file mode 100644
index d79686035e09..000000000000
--- a/games-fps/ut2004-muralis-1.15
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Muralis - third-person hand-to-hand single/multiplayer mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/muralis
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/muralis-v1.15-zip.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=25f0e773d2d0a5113c32a0788c2c68c4
diff --git a/games-fps/ut2004-muralis/Manifest b/games-fps/ut2004-muralis/Manifest
new file mode 100644
index 000000000000..d17b08ef7865
--- /dev/null
+++ b/games-fps/ut2004-muralis/Manifest
@@ -0,0 +1,3 @@
+DIST muralis-v1.15-zip.zip 62575050 BLAKE2B e168053472e63507667707295b3bfee261f802017cdd82e3b35b33855747fa19b75c4861f991b7678861cf8bfe84ea00ce697d979cd19c297c05c06b1c87d910 SHA512 b50477e3ef221241a430f95a390e34d5ffee3ea460e62bafa30b534d6499ef1a616d8ca35f77179e8f7a50b5e69f82441cb9779d38e71388c2868add45822330
+EBUILD ut2004-muralis-1.15.ebuild 489 BLAKE2B 2e483fe134a76c22546c53209786eaca5db34733ac57cafeb963aff512b4a34a73c92b4fd2874a1e18c31b2d81308f45e5c0888443902ecbe34e415f175d82f9 SHA512 14476b7cf20ba34492a1084388a63d8010bb78dabc84ea087e35cd418334510aa0d459c7ef611497744d90cd662d714f45d938a089d9cf25cc181ed8d142f845
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-muralis/metadata.xml b/games-fps/ut2004-muralis/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-muralis/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-muralis/ut2004-muralis-1.15.ebuild b/games-fps/ut2004-muralis/ut2004-muralis-1.15.ebuild
new file mode 100644
index 000000000000..70fe77742c3c
--- /dev/null
+++ b/games-fps/ut2004-muralis/ut2004-muralis-1.15.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="third-person hand-to-hand single/multiplayer mod"
+MOD_NAME="Muralis"
+MOD_DIR="muralis"
+
+inherit unpacker games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/muralis"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/muralis-v${PV}-zip.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ mv -f Muralis ${MOD_DIR} || die
+}
diff --git a/games-fps/ut2004-strikeforce-4.1 b/games-fps/ut2004-strikeforce-4.1
deleted file mode 100644
index 5c1cfaca2d64..000000000000
--- a/games-fps/ut2004-strikeforce-4.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Strike Force - a terrorist vs. strike force mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/strike-force-2004
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=mirror strip
-SLOT=0
-SRC_URI=https://ut.rushbase.net/beyondunreal/mods/strikeforce-ce-v4.1.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=dad35897abac4779f8618aeca334de16
diff --git a/games-fps/ut2004-strikeforce/Manifest b/games-fps/ut2004-strikeforce/Manifest
new file mode 100644
index 000000000000..f1630ab367c5
--- /dev/null
+++ b/games-fps/ut2004-strikeforce/Manifest
@@ -0,0 +1,3 @@
+DIST strikeforce-ce-v4.1.zip 452020366 BLAKE2B de157150409c0be828241c06eab56cd75af777dd52eecf0c0aefa47970a693606428cef84d1c6e6f85730f6e95b1c165cb56cf2801ca926888d308ff0309b68b SHA512 758de1fa2a39b822114b7f224668acdbeffba6d62cc1b1a31104fcac4f84b6859cfa9a024d4d682682cf4f52de7118c1cbaa080a4887c6d882c0c7fb78ef3b49
+EBUILD ut2004-strikeforce-4.1.ebuild 477 BLAKE2B 96d6bcd20032d56429dbfaa05b3753faa2b84eea34f38cb049e223baf4d1c04aed25087b7a4e828ac665b583c3ef4676d3c9073af7d0fdb332426626b893e3b9 SHA512 415ff6790b094c038548a7d2425ec6ddfc1f5cc63c26c2f5e9771926fb5b9feb2e37522909c8d8c8ef26df03c568a0e8bdee8b116d6fdbf994ee0b45c2304c34
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-strikeforce/metadata.xml b/games-fps/ut2004-strikeforce/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-strikeforce/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-strikeforce/ut2004-strikeforce-4.1.ebuild b/games-fps/ut2004-strikeforce/ut2004-strikeforce-4.1.ebuild
new file mode 100644
index 000000000000..d29a723f4f68
--- /dev/null
+++ b/games-fps/ut2004-strikeforce/ut2004-strikeforce-4.1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="a terrorist vs. strike force mod"
+MOD_NAME="Strike Force"
+MOD_DIR="StrikeForce"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/strike-force-2004"
+SRC_URI="https://ut.rushbase.net/beyondunreal/mods/strikeforce-ce-v${PV}.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+
+src_prepare() {
+ rm -f ${MOD_DIR}/*.exe
+}
diff --git a/games-fps/ut2004-troopers-6.0 b/games-fps/ut2004-troopers-6.0
deleted file mode 100644
index 65adea5e15d3..000000000000
--- a/games-fps/ut2004-troopers-6.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 Troopers - Star Wars mod
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/troopers-dawn-of-destiny/
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=freedist
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=fetch
-SLOT=0
-SRC_URI=troopersversion60zip.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8296f6a17e2359a430782d745c532aa1
diff --git a/games-fps/ut2004-troopers/Manifest b/games-fps/ut2004-troopers/Manifest
new file mode 100644
index 000000000000..cddb251a3d33
--- /dev/null
+++ b/games-fps/ut2004-troopers/Manifest
@@ -0,0 +1,3 @@
+DIST troopersversion60zip.zip 447383148 BLAKE2B 4eed868b0a8631529f0e09227d45db4f0a89ff7088cec2c03c263323aa9385f204561b278a9e6c408db6d972e773e2c3d3cbc7dff64ba0cd04fc603ce541d297 SHA512 2eec66a55b0733f2f5ee65e8a4deb329a50bcd47aa6fdcb7252a88c01e4e8db563b568d3176233a51711240e7b4dfebe0d8a8712d624915a872e8bfeb321cda4
+EBUILD ut2004-troopers-6.0.ebuild 585 BLAKE2B eb699a6086fa94879053b6c8d052e8ac79c6f8f1af72b4dbfac05e065254155ef33cd5f42a281fb9d95ce224f6f370e80d56663dc66fb367c9ab30433c91688d SHA512 dce38c80bbd43f75b412af28d701a12c681e19773af1412509831926ad519dc3f55af0b48f804e679f1b06a39aaea3d97efb21eebb0de8360b6ffa0bba5083e5
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-troopers/metadata.xml b/games-fps/ut2004-troopers/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-troopers/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-troopers/ut2004-troopers-6.0.ebuild b/games-fps/ut2004-troopers/ut2004-troopers-6.0.ebuild
new file mode 100644
index 000000000000..f3a202a6c7b3
--- /dev/null
+++ b/games-fps/ut2004-troopers/ut2004-troopers-6.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MOD_DESC="Star Wars mod"
+MOD_NAME="Troopers"
+MOD_DIR="Troopers"
+MOD_ICON="Help/Troopers.ico"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/troopers-dawn-of-destiny/"
+SRC_URI="troopersversion${PV/.}zip.zip"
+
+LICENSE="freedist"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+RESTRICT="fetch"
+
+pkg_nofetch() {
+ elog "Please download ${SRC_URI} from:"
+ elog "${HOMEPAGE}"
+ elog "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ rm -f ${MOD_DIR}/*.{bat,sh}
+}
diff --git a/games-fps/ut2004-unwheel-0_beta5 b/games-fps/ut2004-unwheel-0_beta5
deleted file mode 100644
index 712123df835e..000000000000
--- a/games-fps/ut2004-unwheel-0_beta5
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare setup unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=UT2004 UnWheel - multiplayer driving mod focusing on fun driving
-EAPI=5
-HOMEPAGE=https://www.moddb.com/mods/unwheel
-IUSE=dedicated opengl dedicated opengl
-KEYWORDS=~amd64 ~x86
-LICENSE=GameFront
-RDEPEND=games-misc/games-envd dedicated? ( || ( games-server/ut2004-ded games-fps/ut2004[dedicated] ) ) opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) !dedicated? ( !opengl? ( || ( games-fps/ut2004[opengl] games-fps/ut2004[-dedicated] ) ) )
-RESTRICT=fetch bindist
-SLOT=0
-SRC_URI=unwheel_r5.zip unwheelcbpvol1.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde games-mods 717d443e8308768de4178537c370a7ab ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=efe2a5d59c74a1e624b0e2da1b6ffc0b
diff --git a/games-fps/ut2004-unwheel/Manifest b/games-fps/ut2004-unwheel/Manifest
new file mode 100644
index 000000000000..7c366041cb15
--- /dev/null
+++ b/games-fps/ut2004-unwheel/Manifest
@@ -0,0 +1,4 @@
+DIST unwheel_r5.zip 596390232 BLAKE2B 583b89cd10962e09084f66d85ba437cc336fc3818a9af1cab30d553dc213efa23f88692d555842dbf5c5a7fc27fe607066695163503131d4cadff548d1bb5f91 SHA512 4cf319b1e20c9faa5e248e3a39a015b9a37d6defe4a8f31d634931a426dec957a1330d559d45333fda9a2451f9f3a0f7161d94c101d46950f6921fcfc0d87ee3
+DIST unwheelcbpvol1.zip 138178365 BLAKE2B 25f3f61803c63e7cf6f5e4dd7da29ff9c3d90481677416bcb10cc3fae26db5aa6b0065fe945e46b632852b6e9853a7263f97bfc6de2a2a8b13067d1e917d12b4 SHA512 0cb1c3a64d8cd4448ebdfde175a25afa253336102831fa8a2abc113064cca4a0afbe90e806b4c1d1fa898142496070349566e2bcf5aad42ba12dec2c947e6fcc
+EBUILD ut2004-unwheel-0_beta5.ebuild 684 BLAKE2B bbde5642bc4d9a656dd1ddc265c16647c26bc30775a7553cf0cd14f2020c9e6da882a1ac27aeb68da9f350b43bb7ab1ee7672e11a8423a36e3f9779f1f6e9068 SHA512 0255c0782601f5200b31ae93a1d77ec466c28821be69550ae8b57b23c48ce414cb3aa1757deb2c4b138e3bad17f11b86d8598e9da0753b5751a46bdf97305f08
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004-unwheel/metadata.xml b/games-fps/ut2004-unwheel/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004-unwheel/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004-unwheel/ut2004-unwheel-0_beta5.ebuild b/games-fps/ut2004-unwheel/ut2004-unwheel-0_beta5.ebuild
new file mode 100644
index 000000000000..934b1d4547dd
--- /dev/null
+++ b/games-fps/ut2004-unwheel/ut2004-unwheel-0_beta5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MOD_DESC="multiplayer driving mod focusing on fun driving"
+MOD_NAME="UnWheel"
+MOD_DIR="unwheel"
+
+inherit games games-mods
+
+HOMEPAGE="https://www.moddb.com/mods/unwheel"
+SRC_URI="unwheel_r5.zip
+ unwheelcbpvol1.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/5110896"
+ elog "http://www.filefront.com/13792114"
+ elog "and move them to ${DISTDIR}"
+}
+
+src_unpack() {
+ mkdir ${MOD_DIR} || die
+ cd ${MOD_DIR} || die
+ unpack ${A}
+}
diff --git a/games-fps/ut2004/Manifest b/games-fps/ut2004/Manifest
new file mode 100644
index 000000000000..dc7dd6fa984d
--- /dev/null
+++ b/games-fps/ut2004/Manifest
@@ -0,0 +1,4 @@
+DIST ut2004-lnxpatch3369-2.tar.bz2 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
+DIST ut2004-v3369-3-linux-dedicated.7z 5013927 BLAKE2B 72d24d7bc37c777f3697b767a03e052ad9b547005dd6da73833e439496e87a9c1ebbe01f88d62b29a41b2bf6380a3b3bd745e6883fbb6d0f2b7e52998d4af276 SHA512 3b2a7b64934a3647c02c9fec48565c5c2c35370d635b2af4059eb76587bfa13f46e6a4e14fdb0494ba7a4182497ed5963601986f4fcfa318e69a8a8a8c0178cf
+EBUILD ut2004-3369.3-r1.ebuild 3947 BLAKE2B d5737cd41897625b609361390af6fe310f9548b3d7778c8dfe8334798ecd3897b157910bbe1ca92497f80d986c155d99e078a266179e7143b296a84428977a95 SHA512 6b4f7f517e6cf35faa699478e505f65d050f9f3cb68546b96af563f18e8baec3e5ce3e7d494de794f76c62bc37feaa91666ef8f803521a7c726b6cded2461e70
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004/metadata.xml b/games-fps/ut2004/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-fps/ut2004/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-fps/ut2004/ut2004-3369.3-r1.ebuild b/games-fps/ut2004/ut2004-3369.3-r1.ebuild
new file mode 100644
index 000000000000..7ea5df936e1b
--- /dev/null
+++ b/games-fps/ut2004/ut2004-3369.3-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib games
+
+MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
+DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
+HOMEPAGE="http://www.unrealtournament2004.com/"
+SRC_URI="
+ http://treefort.icculus.org/${PN}/${MY_P}
+ http://storage.guntoo.de/downs/downloads/Patch/ut2004-v${PV/./-}-linux-dedicated.7z
+ mirror://gentoo/ut2004-v${PV/./-}-linux-dedicated.7z"
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dedicated opengl"
+RESTRICT="mirror strip"
+
+UIDEPEND="=virtual/libstdc++-3.3
+ virtual/opengl
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ media-libs/libsdl
+ media-libs/openal"
+RDEPEND="sys-libs/glibc
+ games-fps/ut2004-data
+ games-fps/ut2004-bonuspack-ece
+ games-fps/ut2004-bonuspack-mega
+ dedicated? ( !games-server/ut2004-ded )
+ opengl? ( ${UIDEPEND} )
+ !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
+DEPEND="app-arch/p7zip"
+
+S=${WORKDIR}/UT2004-Patch
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+# The executable pages are required #114733
+QA_PREBUILT="${dir:1}/System/ut2004-bin
+ ${dir:1}/System/ucc-bin"
+
+src_prepare() {
+ cd "${S}"/System
+
+ # These files are owned by ut2004-bonuspack-mega
+ rm -f Manifest.in{i,t} Packages.md5 ucc-bin* || die
+
+ if use amd64 ; then
+ mv -f ut2004-bin-linux-amd64 ut2004-bin || die
+ else
+ rm -f ut2004-bin-linux-amd64 || die
+ fi
+
+ cd "${WORKDIR}"/ut2004-ucc-bin-09192008
+ if use amd64 ; then
+ mv -f ucc-bin-linux-amd64 "${S}"/System/ucc-bin || die
+ else
+ mv -f ucc-bin "${S}"/System/ || die
+ fi
+
+ if use dedicated && ! use opengl ; then
+ rm -f "${S}"/System/ut2004-bin || die
+ fi
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r *
+ fperms +x "${dir}"/System/ucc-bin
+
+ if use opengl || ! use dedicated ; then
+ fperms +x "${dir}"/System/ut2004-bin
+
+ 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 ut2004 ./ut2004 "${dir}" "${dir}"
+ make_desktop_entry ut2004 "Unreal Tournament 2004"
+ fi
+
+ if use dedicated ; then
+ games_make_wrapper ut2004-ded "./ucc-bin server" "${dir}"/System
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ # Here is where we check for the existence of a cdkey...
+ # If we don't find one, we ask the user for it
+ if [[ -f ${dir}/System/cdkey ]] ; then
+ einfo "A cdkey file is already present in ${dir}/System"
+ else
+ ewarn "You MUST run this before playing the game:"
+ ewarn "emerge --config =${CATEGORY}/${PF}"
+ ewarn "That way you can [re]enter your cdkey."
+ fi
+ elog "Starting with 3369, the game supports render-to-texture. To enable"
+ elog "it, you will need the Nvidia drivers of at least version 7676 and"
+ elog "you should edit the following:"
+ elog 'Set "UseRenderTargets=True" in the "[OpenGLDrv.OpenGLRenderDevice]"'
+ elog 'section of your UT2004.ini or Default.ini and set "bPlayerShadows=True"'
+ elog 'and "bBlobShadow=False" in the "[UnrealGame.UnrealPawn]" section of'
+ elog 'your User.ini or DefUser.ini.'
+}
+
+pkg_postrm() {
+ ewarn "This package leaves a cdkey file in ${dir}/System that you need"
+ ewarn "to remove to completely get rid of this game's files."
+}
+
+pkg_config() {
+ ewarn "Your CD key is NOT checked for validity here so"
+ ewarn "make sure you type it in correctly."
+ ewarn "If you CTRL+C out of this, the game will not run!"
+ echo
+ einfo "CD key format is: XXXXX-XXXXX-XXXXX-XXXXX"
+ while true ; do
+ einfo "Please enter your CD key:"
+ read CDKEY1
+ einfo "Please re-enter your CD key:"
+ read CDKEY2
+ if [[ -z ${CDKEY1} ]] || [[ -z ${CDKEY2} ]] ; then
+ echo "You entered a blank CD key. Try again."
+ else
+ if [[ ${CDKEY1} == ${CDKEY2} ]] ; then
+ echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${dir}"/System/cdkey
+ einfo "Thank you!"
+ break
+ else
+ eerror "Your CD key entries do not match. Try again."
+ fi
+ fi
+ done
+}
diff --git a/games-fps/wolfgl-0.93-r2 b/games-fps/wolfgl-0.93-r2
deleted file mode 100644
index fb8c5aed8496..000000000000
--- a/games-fps/wolfgl-0.93-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install postinst
-DEPEND=virtual/opengl app-arch/unzip x11-base/xorg-proto
-DESCRIPTION=Wolfenstein and Spear of Destiny port using OpenGL
-EAPI=6
-HOMEPAGE=http://wolfgl.sourceforge.net/
-KEYWORDS=~x86
-LICENSE=GPL-2
-RDEPEND=virtual/opengl
-SLOT=0
-SRC_URI=mirror://gentoo/wolfgl-0.93.tbz2 mirror://sourceforge/wolfgl/wolfdata.zip mirror://sourceforge/wolfgl/sdmdata.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ee158baa655752be3846fae71f50cde8
diff --git a/games-fps/wolfgl/Manifest b/games-fps/wolfgl/Manifest
new file mode 100644
index 000000000000..ab3156b98e53
--- /dev/null
+++ b/games-fps/wolfgl/Manifest
@@ -0,0 +1,10 @@
+AUX 0.93-gcc.patch 5604 BLAKE2B 56f6bae7ee24f69bf628bbb81fbc664673b233675ac2bffa358a31a21161b0e00507c2c8bacf0b6c3dd65e42413c3904d8bfd8afeddeabbcc8890d0aa86e00a2 SHA512 5de8a4fb661b8b1ca4c7abbc56f2dd676333157ccf459297fd455e15132b5e5356d3ea8dde418c0848cb521dac5ad9ac017252829eae5936a2d6abf4fcfdf841
+AUX 0.93-gcc4.patch 2095 BLAKE2B 792a92d13add55505d0268cfa6764b46e5b7d7370e6cbb157624d4db9025ed6ac3a646a92bb6f4dd37de324d167bf1ebbf9936704e6ea3713d853e282ad2c361 SHA512 7b7452a22f4bdf4dedc1ba2ed46f8c629a0f0596d8c518f49f28ba01a346b5e6d388f80c265eb16d17ca3fd7b9b9fa4c15580e8b89968a11c2e8614ffafb191e
+AUX 0.93-sample-rate.patch 344 BLAKE2B a0f7fd0673a2be1d24b27a340f3465e654352f65438bec8e58a953086d10c97d466c14432d9a8612c7fdbd5e6a8edead08a5a8cf36bd41490b09dbc3e21cc3ce SHA512 63a7d2b18bde6f3b443aa6cb32bc6f9be0c094836231e97495e0f8d553a4c38166036a2233af37bde6f2b2198d81d4e27f3a10393d9a4ae74a802c2881e20bbc
+AUX 0.93-sprite.patch 2318 BLAKE2B 1fd1deb499b6c3ee513064dbba5573b3cae31c50f2bda4ba0cebc6e09f216e7debc82aac0d5367ab4518c9a682671f8abb9eba5a3932ea8505101372993681e9 SHA512 8904f5470e84b416cdfdd7acabc89122885600f759a938cd81b1d96fe067c8c82378400e5ddf225eb774b24c5ac18e6e7b8f6d27681c3462130f2122b2f53c3a
+AUX wolfgl-0.93-as-needed.patch 397 BLAKE2B f51e7d40ead7ae01ba2f362ccd33107128841bc61d751529cfc697dc316c350a795670e3ec205f3bf27a8dc0324921e27248345bd5fc4d7d3fb507e9fa178851 SHA512 cdcd1aa914a6fe48e3477b24f051fb36d255542031abb2d2f46a9bb0da081b0093d1efb1b35b55cbfeec1ef6e989102e45bfb6f14246923263e102b2f0920bae
+DIST sdmdata.zip 557147 BLAKE2B a70a821941175aecfd3edd7746ed54e13181863ddb25bfcc77bf354b1366541b71462739543a1ba9aa548a754b8a88db60eff0cf5d8313097f6d41cb62892b3a SHA512 cf6eae7027acbe6e3da6985639eb36def04254790f6449f5353ffe5edd13a73c01b0a35ef9873f2e97d09ec59e632337c5b3a1a26185befdf4dfa5a161267076
+DIST wolfdata.zip 564771 BLAKE2B 0c1343cae6fbcb695930899fd2ba9e5798af47f4bec984fa15cdca85c9d96e5dd9ed6e5ff2b7bc489251e5be6342ed94a8cb7c626f39564a8599d5d3fe5eb6d2 SHA512 2b14c477e54d14fc543e146fa699f55dabb003bd3bac1e89422a49391cf8f29b5db6967b09c08a82c612f73fe71d624902c180d81481ad42f011f51448652a43
+DIST wolfgl-0.93.tbz2 146132 BLAKE2B b9dbf442be01a516c5cbf1146892d610df881109ca163ec7c1c79bd9ea1c328d8e9401ba5615e1be9c2df5df3940b83fdbe36154c4f0429b617dc6208b6ccf78 SHA512 834dda2eb4e099d70fad52e40760886208c5ca60e687024f1fe51088b94c8cdea7c058d326daa61966946bb70feeee97d0b7fb7c284e98fdec0eb8c503de7e30
+EBUILD wolfgl-0.93-r2.ebuild 1410 BLAKE2B fe736a982fb871c177ab9fcc27a19af1144bd1dbe91e1e5fbd0853adb9ea81850c7d5d812f16bac78a110c1285aa4fe84db2fff6f98fdf468cd4e3a0270d9fe5 SHA512 ec96d3f9c8a716c359314e179727c0512b55e12c706d3ddc3d35348fcf00e8f43f11da17f7500d3551eac18ee6978b42e398df6398cebeccda5ed713b876ec86
+MISC metadata.xml 451 BLAKE2B 0b88acdbf3a154c982180c671b1e5ee23fdac3b2c36650e7b425cffb752dbe209d8beb010047fdd5a8e654740c49453c5b6eb556d68bc9b7b1ffa583e83b1286 SHA512 2623437ddb8f1ebc5290d5076894cf2059df12f31a22043de4cb3246648076f7ba6dc923fde07812038a2405836d57d4f9171f5c80fcfc498ae452616128a8e8
diff --git a/games-fps/wolfgl/files/0.93-gcc.patch b/games-fps/wolfgl/files/0.93-gcc.patch
new file mode 100644
index 000000000000..a22923393678
--- /dev/null
+++ b/games-fps/wolfgl/files/0.93-gcc.patch
@@ -0,0 +1,209 @@
+diff -abur a/common/console.c b/common/console.c
+--- a/common/console.c 2000-09-27 16:19:44.000000000 +0200
++++ b/common/console.c 2003-09-11 19:59:46.037562040 +0200
+@@ -3,6 +3,14 @@
+ #include "id_us.h"
+ #include "console.h"
+
++#ifdef _LINUX
++#include <string.h>
++#endif
++
++#ifdef _LINUX
++#include <string.h>
++#endif
++
+ static char con_lines[32][45]; // buffer
+ static int con_active; // console is visible
+ static int con_current; // current line
+diff -abur a/common/id_in.h b/common/id_in.h
+--- a/common/id_in.h 2000-09-27 16:04:26.000000000 +0200
++++ b/common/id_in.h 2003-09-11 19:32:14.368653880 +0200
+@@ -178,6 +178,7 @@
+
+ void IN_Startup();
+ void IN_Shutdown();
++void IN_KeyEvent(unsigned char key);
+ void IN_Default(wbool gotit, ControlType in);
+ void IN_ClearKeysDown();
+ void IN_ReadControl(int player, ControlInfo *info);
+diff -abur a/common/id_vh.c b/common/id_vh.c
+--- a/common/id_vh.c 2000-09-26 17:39:36.000000000 +0200
++++ b/common/id_vh.c 2003-09-11 19:24:57.183116184 +0200
+@@ -230,3 +230,4 @@
+
+ }
+ */
+\ No newline at end of file
++
+diff -abur a/common/opengl.c b/common/opengl.c
+--- a/common/opengl.c 2000-09-27 16:04:26.000000000 +0200
++++ b/common/opengl.c 2003-09-11 19:22:35.622636648 +0200
+@@ -1,5 +1,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++
++#ifdef _LINUX
++#include <string.h>
++#endif
++
+ #include "system.h"
+ #include "opengl.h"
+ #include "wl_def.h"
+diff -abur a/common/wl_act2.c b/common/wl_act2.c
+--- a/common/wl_act2.c 2000-09-27 16:04:26.000000000 +0200
++++ b/common/wl_act2.c 2003-09-11 19:19:45.511497472 +0200
+@@ -1,5 +1,9 @@
+ // WL_ACT2.C
+
++#ifdef _LINUX
++#include <stdlib.h>
++#endif
++
+ #include "wl_def.h"
+
+ //=============================================================================
+diff -abur a/common/wl_agent.c b/common/wl_agent.c
+--- a/common/wl_agent.c 2003-09-11 20:04:40.738760648 +0200
++++ b/common/wl_agent.c 2003-09-11 19:57:06.860760592 +0200
+@@ -3,6 +3,10 @@
+ #include <string.h>
+ #include "wl_def.h"
+
++#ifdef _LINUX
++#include <stdlib.h>
++#endif
++
+ //=============================================================================
+ // LOCAL CONSTANTS
+ //=============================================================================
+diff -abur a/common/wl_draw.c b/common/wl_draw.c
+--- a/common/wl_draw.c 2003-09-11 20:04:40.739760496 +0200
++++ b/common/wl_draw.c 2003-09-11 19:20:33.512200256 +0200
+@@ -2,6 +2,11 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++
++#ifdef _LINUX
++#include <string.h>
++#endif
++
+ #include "system.h"
+ #include "opengl.h"
+ #include "wl_def.h"
+diff -abur a/common/wl_menu.c b/common/wl_menu.c
+--- a/common/wl_menu.c 2000-09-27 16:04:27.000000000 +0200
++++ b/common/wl_menu.c 2003-09-11 20:07:38.892677136 +0200
+@@ -5,6 +5,10 @@
+ //
+ ////////////////////////////////////////////////////////////////////
+
++#ifdef _LINUX
++#include "../linux/input.h"
++#endif
++
+ #include <string.h>
+ #include "opengl.h"
+ #include "wl_def.h"
+diff -abur a/common/wl_menu.h b/common/wl_menu.h
+--- a/common/wl_menu.h 2000-09-26 17:38:31.000000000 +0200
++++ b/common/wl_menu.h 2003-09-11 18:31:41.593919584 +0200
+@@ -233,3 +233,4 @@
+ void NonShareware();
+ /*int GetYorN(int x,int y,int pic);
+ */
+\ No newline at end of file
++
+diff -abur a/common/wl_play.c b/common/wl_play.c
+--- a/common/wl_play.c 2000-09-27 16:04:27.000000000 +0200
++++ b/common/wl_play.c 2003-09-11 19:40:31.293109880 +0200
+@@ -1,6 +1,11 @@
+ // WL_PLAY.C
+
+ #include <memory.h>
++
++#ifdef _LINUX
++#include "../linux/input.h"
++#endif
++
+ #include "wl_def.h"
+ #include "system.h"
+
+diff -abur a/common/wl_state.c b/common/wl_state.c
+--- a/common/wl_state.c 2000-09-27 16:04:27.000000000 +0200
++++ b/common/wl_state.c 2003-09-11 19:23:26.895841936 +0200
+@@ -2,6 +2,10 @@
+
+ #include "wl_def.h"
+
++#ifdef _LINUX
++#include <stdlib.h>
++#endif
++
+ //=============================================================================
+ // GLOBAL VARIABLES
+ //=============================================================================
+diff -abur a/common/wl_text.c b/common/wl_text.c
+--- a/common/wl_text.c 2000-09-26 17:40:23.000000000 +0200
++++ b/common/wl_text.c 2003-09-11 19:19:00.110399488 +0200
+@@ -4,6 +4,10 @@
+ #include "wl_def.h"
+ #include "system.h"
+
++#ifdef _LINUX
++#include <string.h>
++#endif
++
+ #ifndef SPEAR
+
+ void FreeMusic(); // WL_MENU.C
+diff -abur a/linux/sound.c b/linux/sound.c
+--- a/linux/sound.c 2000-09-26 17:57:48.000000000 +0200
++++ b/linux/sound.c 2003-09-11 19:55:16.702507192 +0200
+@@ -9,6 +9,8 @@
+ #include <stdlib.h>
+
+ #include <sys/time.h>
++#include <string.h>
++#include <errno.h>
+
+ #include <fcntl.h>
+ #include <unistd.h>
+diff -abur a/linux/sound.h b/linux/sound.h
+--- a/linux/sound.h 2000-09-26 17:57:48.000000000 +0200
++++ b/linux/sound.h 2003-09-11 19:44:03.663824624 +0200
+@@ -1,5 +1,8 @@
+ void S_LoadSound(int id, void* data, long length);
+ void S_PlaySound(int id, int pan);
++void S_UpdateSound();
++void S_InitSound();
++void S_ShutDownSound();
+
+ extern int DigitalDevice;
+
+diff -abur a/linux/system.c b/linux/system.c
+--- a/linux/system.c 2000-09-26 17:57:48.000000000 +0200
++++ b/linux/system.c 2003-09-11 19:42:14.955350824 +0200
+@@ -1,9 +1,12 @@
+ #include <stdio.h>
++#include <string.h>
++#include <unistd.h>
+ #include <sys/time.h>
+ #include <X11/keysym.h>
+ #include <GL/gl.h>
+ #include <GL/glx.h>
+ #include "wl_def.h"
++#include "sound.h"
+
+ int screen_width, screen_height;
+ Display *dpy;
+@@ -117,7 +120,7 @@
+ visinfo = glXChooseVisual( dpy, scrnum, attrib );
+ if (!visinfo) {
+ printf("Error: couldn't get an RGB, Double-buffered visual\n");
+- exit(1);
++ _exit(1);
+ }
+
+ /* window attributes */
diff --git a/games-fps/wolfgl/files/0.93-gcc4.patch b/games-fps/wolfgl/files/0.93-gcc4.patch
new file mode 100644
index 000000000000..5dcccd76049b
--- /dev/null
+++ b/games-fps/wolfgl/files/0.93-gcc4.patch
@@ -0,0 +1,80 @@
+diff -ur wolfgl-0.93-orig/common/id_ca.c wolfgl-0.93/common/id_ca.c
+--- wolfgl-0.93-orig/common/id_ca.c 2006-01-28 16:59:10.000000000 -0500
++++ wolfgl-0.93/common/id_ca.c 2006-01-28 17:04:26.000000000 -0500
+@@ -252,6 +252,7 @@
+ {
+ unsigned short ch,chhigh,count,offset;
+ unsigned short *copyptr, *inptr, *outptr;
++ unsigned char *uc_inptr;
+
+ length/=2;
+
+@@ -268,13 +269,17 @@
+ if (!count)
+ {
+ // have to insert a word containing the tag byte
+- ch |= *((unsigned char*)inptr)++;
++ uc_inptr = (unsigned char*)inptr;
++ ch |= *(uc_inptr)++;
++ inptr = (unsigned short *)uc_inptr;
+ *outptr++ = ch;
+ length--;
+ }
+ else
+ {
+- offset = *((unsigned char*)inptr)++;
++ uc_inptr = (unsigned char*)inptr;
++ offset = *(uc_inptr)++;
++ inptr = (unsigned short *)uc_inptr;
+ copyptr = outptr - offset;
+ length -= count;
+ while (count--)
+@@ -287,7 +292,9 @@
+ if (!count)
+ {
+ // have to insert a word containing the tag byte
+- ch |= *((unsigned char*)inptr)++;
++ uc_inptr = (unsigned char*)inptr;
++ ch |= *(uc_inptr)++;
++ inptr = (unsigned short *)uc_inptr;
+ *outptr++ = ch;
+ length --;
+ }
+@@ -806,7 +813,7 @@
+
+ for (i=0;i<NUMCHUNKS;i++)
+ if (grsegs[i])
+- MM_SetPurge (&(memptr)grsegs[i],3);
++ MM_SetPurge ((memptr)&grsegs[i],3);
+ ca_levelbit<<=1;
+ ca_levelnum++;
+ }
+@@ -862,7 +869,7 @@
+
+ for (i = 0; i < NUMCHUNKS; i++)
+ if (grsegs[i])
+- MM_SetPurge (&(memptr)grsegs[i],3);
++ MM_SetPurge ((memptr)&grsegs[i],3);
+ }
+
+ //===========================================================================
+diff -ur wolfgl-0.93-orig/common/wl_game.c wolfgl-0.93/common/wl_game.c
+--- wolfgl-0.93-orig/common/wl_game.c 2006-01-28 16:59:10.000000000 -0500
++++ wolfgl-0.93/common/wl_game.c 2006-01-28 17:07:08.000000000 -0500
+@@ -545,13 +545,13 @@
+ {
+ // solid wall
+ tilemap[x][y] = tile;
+- (unsigned short)actorat[x][y] = tile;
++ actorat[x][y] = tile;
+ }
+ else
+ {
+ // area floor
+ tilemap[x][y] = 0;
+- (unsigned short)actorat[x][y] = 0;
++ actorat[x][y] = 0;
+ }
+ }
+
+
diff --git a/games-fps/wolfgl/files/0.93-sample-rate.patch b/games-fps/wolfgl/files/0.93-sample-rate.patch
new file mode 100644
index 000000000000..6e7156a1c716
--- /dev/null
+++ b/games-fps/wolfgl/files/0.93-sample-rate.patch
@@ -0,0 +1,11 @@
+--- a/linux/sound.c 2003-09-11 20:28:32.032170976 +0200
++++ b/linux/sound.c 2003-09-11 20:28:45.111182664 +0200
+@@ -64,7 +64,7 @@
+ #define BUFMUL 4
+ #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
+
+-#define SAMPLERATE 11025 // Hz
++#define SAMPLERATE 8000 // Hz
+ #define SAMPLESIZE 2 // 16bit
+
+ // The actual output device.
diff --git a/games-fps/wolfgl/files/0.93-sprite.patch b/games-fps/wolfgl/files/0.93-sprite.patch
new file mode 100644
index 000000000000..135eb8e26eed
--- /dev/null
+++ b/games-fps/wolfgl/files/0.93-sprite.patch
@@ -0,0 +1,82 @@
+--- a/common/wl_agent.c 2003-09-11 20:39:02.674298800 +0200
++++ b/common/wl_agent.c 2003-09-11 20:42:17.229721880 +0200
+@@ -919,32 +919,31 @@
+ viewdist = 0x7fffffffl;
+ closest = NULL;
+
+-// while (1)
++ while (1)
+ {
+ oldclosest = closest;
+
+ for (check=ob->next ; check ; check=check->next)
+ if ((check->flags & FL_SHOOTABLE)
+- //&&
++ &&
+ // (check->flags & FL_VISABLE) &&
+-// (abs(check->viewx - centerx) < shootdelta)
++ (abs(check->viewx - centerx) < shootdelta)
+ )
+-// {
++ {
+ if (CheckLine(check))
+-// if (check->transx < viewdist)
++ if (check->transx < viewdist)
+ {
+-// viewdist = check->transx;
++ viewdist = check->transx;
+ closest = check;
+- break;
+ }
+-// }
++ }
+
+ if (closest == oldclosest)
+ return; // no more targets, all missed
+
+ // trace a line from player to enemey
+-// if (CheckLine(closest))
+-// break;
++ if (CheckLine(closest))
++ break;
+ }
+
+ // hit something
+--- a/common/wl_draw.c 2003-09-11 20:43:26.473195272 +0200
++++ b/common/wl_draw.c 2003-09-11 20:46:57.859059736 +0200
+@@ -877,7 +877,7 @@
+ tilespot = &tilemap[0][0]+spotloc;
+
+ // could be in any of the nine surrounding tiles
+- if ((*visspot) ||
++ if (1 || (*visspot) ||
+ (*(visspot-1) && !*(tilespot-1)) ||
+ (*(visspot+1) && !*(tilespot+1)) ||
+ (*(visspot-65) && !*(tilespot-65)) ||
+@@ -980,6 +980,8 @@
+
+ for (obj = player->next; obj; obj = obj->next)
+ {
++ int sprite;
++
+ if (!areabyplayer[obj->areanumber])
+ continue;
+ if (!gamestates[obj->state].shapenum)
+@@ -989,10 +991,14 @@
+ glTranslated((float)obj->x/(1<<16), (float)obj->y/(1<<16), 0);
+ glRotated(-player->angle, 0,0,1);
+
+- if (texture_index[PMSpriteStart+gamestates[obj->state].shapenum] == 0)
+- CreateSprite(PMSpriteStart+gamestates[obj->state].shapenum);
++ sprite = gamestates[obj->state].shapenum;
++ if (gamestates[obj->state].rotate)
++ sprite += CalcRotate(obj);
++
++ if (texture_index[PMSpriteStart+sprite] == 0)
++ CreateSprite(PMSpriteStart+sprite);
+ else
+- glBindTexture(GL_TEXTURE_2D, texture_index[PMSpriteStart+gamestates[obj->state].shapenum]);
++ glBindTexture(GL_TEXTURE_2D, texture_index[PMSpriteStart+sprite]);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0,0);
diff --git a/games-fps/wolfgl/files/wolfgl-0.93-as-needed.patch b/games-fps/wolfgl/files/wolfgl-0.93-as-needed.patch
new file mode 100644
index 000000000000..f9da771e1d79
--- /dev/null
+++ b/games-fps/wolfgl/files/wolfgl-0.93-as-needed.patch
@@ -0,0 +1,11 @@
+--- a/linux/Makefile 2009-02-06 14:27:11.000000000 +0100
++++ b/linux/Makefile 2009-02-06 14:27:40.000000000 +0100
+@@ -19,7 +19,7 @@
+ @echo 'Do not call this file directly'
+
+ wolfgl: $(LINUX_OBJS) $(COMMON_OBJS)
+- $(CC) $(LINK_FLAGS) $(COMMON_OBJS) $(LINUX_OBJS) -o $(OUTDIR)/wolfgl
++ $(CC) $(LDFLAGS) $(COMMON_OBJS) $(LINUX_OBJS) $(LINK_FLAGS) -o $(OUTDIR)/wolfgl
+
+ # common directory
+
diff --git a/games-fps/wolfgl/metadata.xml b/games-fps/wolfgl/metadata.xml
new file mode 100644
index 000000000000..92093a34cff1
--- /dev/null
+++ b/games-fps/wolfgl/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">wolfgl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/wolfgl/wolfgl-0.93-r2.ebuild b/games-fps/wolfgl/wolfgl-0.93-r2.ebuild
new file mode 100644
index 000000000000..a76843aa4066
--- /dev/null
+++ b/games-fps/wolfgl/wolfgl-0.93-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+#ECVS_SERVER="wolfgl.cvs.sourceforge.net:/cvsroot/wolfgl"
+#ECVS_MODULE="wolfgl"
+#inherit cvs
+
+inherit eutils
+
+DESCRIPTION="Wolfenstein and Spear of Destiny port using OpenGL"
+HOMEPAGE="http://wolfgl.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tbz2
+ mirror://sourceforge/wolfgl/wolfdata.zip
+ mirror://sourceforge/wolfgl/sdmdata.zip"
+# mirror://sourceforge/wolfgl/wolfglx-wl6-${PV}.zip
+# mirror://sourceforge/wolfgl/wolfglx-sod-${PV}.zip
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="virtual/opengl"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-base/xorg-proto"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-gcc.patch
+ "${FILESDIR}"/${PV}-sample-rate.patch
+ "${FILESDIR}"/${PV}-sprite.patch
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${PV}-gcc4.patch
+)
+
+src_compile() {
+ emake -j1 CFLAGS="${CFLAGS}" DATADIR="/usr/share/${PN}" || die "emake failed"
+}
+
+src_install() {
+ newbin linux/SDM/wolfgl wolfgl-sdm
+ newbin linux/SOD/wolfgl wolfgl-sod
+ newbin linux/WL1/wolfgl wolfgl-wl1
+ newbin linux/WL6/wolfgl wolfgl-wl6
+
+ insinto /usr/share/${PN}
+ doins "${WORKDIR}"/*.{sdm,wl1}
+}
+
+pkg_postinst() {
+ elog "This installed the shareware data files for"
+ elog "Wolfenstein 3D and Spear Of Destiny."
+ elog "If you wish to play the full versions just"
+ elog "copy the data files to /usr/share/${PN}/"
+}
diff --git a/games-fps/worldofpadman-1.6-r1 b/games-fps/worldofpadman-1.6-r1
deleted file mode 100644
index 8ca4d3995374..000000000000
--- a/games-fps/worldofpadman-1.6-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=sys-libs/zlib !dedicated? ( >=media-libs/speex-1.2.0 media-libs/speexdsp virtual/jpeg:0 media-libs/libsdl[opengl,video,X] virtual/opengl virtual/glu openal? ( media-libs/openal ) curl? ( net-misc/curl ) vorbis? ( media-libs/libvorbis ) theora? ( media-libs/libtheora media-libs/libogg ) ) app-arch/unzip
-DESCRIPTION=A cartoon style multiplayer first-person shooter
-EAPI=6
-HOMEPAGE=https://worldofpadman.net/
-IUSE=+curl dedicated maps +openal +theora +vorbis
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 worldofpadman
-RDEPEND=sys-libs/zlib !dedicated? ( >=media-libs/speex-1.2.0 media-libs/speexdsp virtual/jpeg:0 media-libs/libsdl[opengl,video,X] virtual/opengl virtual/glu openal? ( media-libs/openal ) curl? ( net-misc/curl ) vorbis? ( media-libs/libvorbis ) theora? ( media-libs/libtheora media-libs/libogg ) )
-SLOT=0
-SRC_URI=mirror://sourceforge/worldofpadman/wop-1.5-unified.zip mirror://sourceforge/worldofpadman/wop-1.5.x-to-1.6-patch-unified.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=3e228d968719510d8a45ea5c01290ca2
diff --git a/games-fps/worldofpadman/Manifest b/games-fps/worldofpadman/Manifest
new file mode 100644
index 000000000000..a1240f9f2fd1
--- /dev/null
+++ b/games-fps/worldofpadman/Manifest
@@ -0,0 +1,5 @@
+AUX worldofpadman-1.6-gentoo.patch 2106 BLAKE2B ae27668e8e3e570b5a5beff3fbaefc4fb44c41d3d0686c90437256df66f994eeb66337ec4444d6190cd5398d8f044067fce6234b952082d2ea44a8195c3ceedb SHA512 9c5a3e85a2e67cfca2e066b9f92103020e005988a000029439f0678249041bc3675718beca0addf1bb360180af72d7e1acfa1136e289784d39abaea44096db2d
+DIST wop-1.5-unified.zip 947290087 BLAKE2B 5fb87cde661882fc095376012d9aca134d6399b4cedd4f3c78b739dd19e126360070278045d74c3318306e17490338111b8621e1c543b46e6bbecfbcd3658675 SHA512 fea0207efadf15afab7001227e27126aef4a673bd478dccb513c3011d0811074b2788083862f07e2f02f1a80ccb57a45ff64de8de155d8f8f7f1ab53ecf2402b
+DIST wop-1.5.x-to-1.6-patch-unified.zip 122204892 BLAKE2B a0f9feb04a15ec04dd64dbacdf5a158738d625651b2293bc8b3740067e849f33cdd144bce6afd11914524d89fe4bcfd48dbcbc455e51017b1216439e9bae484a SHA512 a45018bd79e9e23c57bcaf692fa14c323671103558caad6acb794c2990cc5fe9cc8bdbe6a6c8254c4560d81eb59f5e3b9a6800a61b21a15870c4439f7179d936
+EBUILD worldofpadman-1.6-r1.ebuild 2074 BLAKE2B 7b4eb271e0ed208b9bbbb052a7021260940960ee0f20e3e51a116db387b70f463c7a7eada7a40c1c0034aea04ff40ef3d17dd7ee8bdd92bbb7b56b2c3709862c SHA512 637675f347fc2494759bf18eefa3b5250e5abf251bfbc2f6df57320175280e32a74034dc4ebe32bb39b7bf6cd7ed44a39af69dfe87bb0223a36ee919434656d2
+MISC metadata.xml 421 BLAKE2B 0c13dc1221c5aa3f8ba78de2614ec62e48177ab0433652ec97ce454883b4a12ffe767ef6786f7f0ea5a75a2a67e868a01e771d7eb575c7ab8eeb4689ad5a8cdf SHA512 2716235255bd6e00d84c6f11f784850959fd50a6542fd98d9c7815d0c7a6f5a201807b02f1cd7d1ace59f1f19f40cb97aa01b9d649bb198678ac60f84d81eb1e
diff --git a/games-fps/worldofpadman/files/worldofpadman-1.6-gentoo.patch b/games-fps/worldofpadman/files/worldofpadman-1.6-gentoo.patch
new file mode 100644
index 000000000000..d55e43ffcf52
--- /dev/null
+++ b/games-fps/worldofpadman/files/worldofpadman-1.6-gentoo.patch
@@ -0,0 +1,92 @@
+--- a/Makefile.old 2012-04-26 21:40:25.277417417 +0200
++++ b/Makefile 2012-04-26 21:43:34.300835150 +0200
+@@ -344,11 +344,11 @@
+ endif
+
+ ifeq ($(USE_CIN_THEORA),1)
+- CLIENT_LDFLAGS += -ltheora
++ CLIENT_LIBS += -ltheora
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+
+ ifeq ($(USE_CURL),1)
+@@ -380,12 +380,12 @@
+
+ ifeq ($(USE_CIN_THEORA),1)
+ BASE_CFLAGS += -DUSE_CIN_THEORA
+- CLIENT_LDFLAGS += -ltheora
++ CLIENT_LIBS += -ltheora
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+ BASE_CFLAGS += -DUSE_CODEC_MP3
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+ else # ifeq Linux
+
+@@ -435,12 +435,12 @@
+
+ ifeq ($(USE_CIN_THEORA),1)
+ BASE_CFLAGS += -DUSE_CIN_THEORA
+- CLIENT_LDFLAGS += -ltheora
++ CLIENT_LIBS += -ltheora
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+ BASE_CFLAGS += -DUSE_CODEC_MP3
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+
+ BASE_CFLAGS += -D_THREAD_SAFE=1
+@@ -565,7 +565,7 @@
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+
+ ifeq ($(ARCH),x86)
+@@ -662,11 +662,11 @@
+ endif
+
+ ifeq ($(USE_CIN_THEORA),1)
+- CLIENT_LDFLAGS += -ltheora
++ CLIENT_LIBS += -ltheora
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+
+ # cross-compiling tweaks
+@@ -732,11 +732,11 @@
+ endif
+
+ ifeq ($(USE_CIN_THEORA),1)
+- CLIENT_LDFLAGS += -ltheora
++ CLIENT_LIBS += -ltheora
+ endif
+
+ ifeq ($(USE_CODEC_MP3),1)
+- CLIENT_LDFLAGS += -lmad
++ CLIENT_LIBS += -lmad
+ endif
+
+ ifeq ($(USE_CURL),1)
+@@ -1780,7 +1780,7 @@
+
+ $(B)/wop-smp$(FULLBINEXT): $(Q3OBJ) $(Q3ROBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
+ $(echo_cmd) "LD $@"
+- $(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(THREAD_LDFLAGS) \
++ $(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(THREAD_LDFLAGS) \
+ -o $@ $(Q3OBJ) $(Q3ROBJ) $(Q3POBJ_SMP) \
+ $(THREAD_LIBS) $(LIBSDLMAIN) $(CLIENT_LIBS) $(RENDERER_LIBS) $(LIBS)
+ endif
diff --git a/games-fps/worldofpadman/metadata.xml b/games-fps/worldofpadman/metadata.xml
new file mode 100644
index 000000000000..3450a58db130
--- /dev/null
+++ b/games-fps/worldofpadman/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="maps">Install extra maps (PadPack)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">worldofpadman</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/worldofpadman/worldofpadman-1.6-r1.ebuild b/games-fps/worldofpadman/worldofpadman-1.6-r1.ebuild
new file mode 100644
index 000000000000..523ca7b597b2
--- /dev/null
+++ b/games-fps/worldofpadman/worldofpadman-1.6-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="A cartoon style multiplayer first-person shooter"
+HOMEPAGE="https://worldofpadman.net/"
+SRC_URI="mirror://sourceforge/${PN}/wop-1.5-unified.zip
+ mirror://sourceforge/${PN}/wop-1.5.x-to-1.6-patch-unified.zip"
+
+LICENSE="GPL-2 worldofpadman"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+curl dedicated maps +openal +theora +vorbis"
+
+RDEPEND="sys-libs/zlib
+ !dedicated? (
+ >=media-libs/speex-1.2.0
+ media-libs/speexdsp
+ virtual/jpeg:0
+ media-libs/libsdl[opengl,video,X]
+ virtual/opengl
+ virtual/glu
+ openal? ( media-libs/openal )
+ curl? ( net-misc/curl )
+ vorbis? ( media-libs/libvorbis )
+ theora? (
+ media-libs/libtheora
+ media-libs/libogg
+ )
+ )
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+"
+
+S="${WORKDIR}/${P}_svn2178-src"
+
+src_unpack() {
+ unpack ${A}
+ unzip XTRAS/"editing files"/${P}-src.zip
+}
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}"/${P}-gentoo.patch
+ sed -i \
+ -e 's:JPEG_LIB_VERSION < 80:JPEG_LIB_VERSION < 62:' \
+ code/renderer/tr_image_jpg.c || die #479652
+}
+
+src_compile() {
+ local arch
+
+ if use amd64 ; then
+ arch=x86_64
+ elif use x86 ; then
+ arch=i386
+ fi
+
+ emake \
+ V=1 \
+ ARCH=${arch} \
+ BUILD_CLIENT=$(use dedicated && echo 0) \
+ DEFAULT_BASEDIR=/usr/share/${PN} \
+ OPTIMIZE= \
+ USE_CURL=$(usex curl 1 0) \
+ USE_CURL_DLOPEN=0 \
+ USE_OPENAL=$(usex openal 1 0) \
+ USE_OPENAL_DLOPEN=0 \
+ USE_CODEC_VORBIS=$(usex vorbis 1 0) \
+ USE_CIN_THEORA=$(usex theora 1 0) \
+ USE_RENDERER_DLOPEN=0 \
+ USE_INTERNAL_ZLIB=0 \
+ USE_INTERNAL_JPEG=0 \
+ USE_INTERNAL_SPEEX=0
+}
+
+src_install() {
+ newbin build/release-*/wopded.* ${PN}-ded
+ if ! use dedicated ; then
+ newbin build/release-*/wop.* ${PN}
+ newicon misc/quake3.png ${PN}.png
+ make_desktop_entry ${PN} "World of Padman"
+ fi
+ insinto /usr/share/${PN}
+ doins -r ../wop
+
+ dodoc id-readme.txt \
+ IOQ3-README \
+ voip-readme.txt \
+ ../XTRAS/changelog.txt \
+ ../XTRAS/sounds_readme.txt
+ HTML_DOCS="../XTRAS/readme ../XTRAS/readme.html" einstalldocs
+}
diff --git a/games-fps/xonotic-0.8.2 b/games-fps/xonotic-0.8.2
deleted file mode 100644
index f8ac52847b37..000000000000
--- a/games-fps/xonotic-0.8.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare pretend setup
-DEPEND=sys-libs/zlib virtual/jpeg:0 media-libs/libpng:0 net-misc/curl ~dev-libs/d0_blind_id-1.0 !dedicated? ( media-libs/libogg media-libs/libtheora media-libs/libvorbis media-libs/libmodplug x11-libs/libX11 x11-libs/libXau x11-libs/libXpm x11-libs/libXext x11-libs/libXdmcp x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl media-libs/freetype:2 alsa? ( media-libs/alsa-lib ) ode? ( dev-games/ode[double-precision] ) sdl? ( media-libs/libsdl2[X,sound,joystick,opengl,video,alsa?] ) ) !dedicated? ( x11-base/xorg-proto )
-DESCRIPTION=Fork of Nexuiz, Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine
-EAPI=6
-HOMEPAGE=http://www.xonotic.org/
-IUSE=alsa debug dedicated doc ode sdl
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/zlib virtual/jpeg:0 media-libs/libpng:0 net-misc/curl ~dev-libs/d0_blind_id-1.0 !dedicated? ( media-libs/libogg media-libs/libtheora media-libs/libvorbis media-libs/libmodplug x11-libs/libX11 x11-libs/libXau x11-libs/libXpm x11-libs/libXext x11-libs/libXdmcp x11-libs/libXxf86dga x11-libs/libXxf86vm virtual/opengl media-libs/freetype:2 alsa? ( media-libs/alsa-lib ) ode? ( dev-games/ode[double-precision] ) sdl? ( media-libs/libsdl2[X,sound,joystick,opengl,video,alsa?] ) )
-SLOT=0
-SRC_URI=http://dl.xonotic.org/xonotic-0.8.2.zip
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=07e311ba364cacb31f65fb6bc28b923e
diff --git a/games-fps/xonotic/Manifest b/games-fps/xonotic/Manifest
new file mode 100644
index 000000000000..5021861e3bcb
--- /dev/null
+++ b/games-fps/xonotic/Manifest
@@ -0,0 +1,3 @@
+DIST xonotic-0.8.2.zip 991045679 BLAKE2B 3005473da954492bb7387f9e0e13c2415e638877fa8b83e14872f3b04ed0fc21b82e18f51aa6c68e8bf02d09d4a73f290cbcaebdfa8c0a12ceb6582309baee8a SHA512 0787fcf326827ae0292e5917c7ff2c7fd79947209d4b62e7f83b8b828bec15b575da304e0631f9f163c9b0bd93bed13616e142398ff08cbdaaea890a939dfca5
+EBUILD xonotic-0.8.2.ebuild 2315 BLAKE2B 5f54f8c0de24a305b9035761dd4cf1aac7f785558c6c5e79d7897ce2a85390372fce5942966e08960d376fa14466769050bf9034465ec1f903f95c36d1809c57 SHA512 ef80a84c48a1fa55373e99519eec4e7da391a0ad54865b7733a9ebb5a047bee85b1e573849ef4dd8e446fc9136506b52bd1e20c229f2535240c453dcc4b4d50f
+MISC metadata.xml 351 BLAKE2B a5005814468014cf93d7f807b7f1c5d9252aecf20584267cdef61547d109727230f14c3f21297e202c4876e0534fac7d5ab86022c3741d582115c04b1bcf18f9 SHA512 14665ca256c368cbf80a08aaff18c005a25a4197eae82b559e934fbe6a3b17ef6f1fbd323621e38af5725f3e61ff750c72bb8fe650fb76eeed818070d411e3f6
diff --git a/games-fps/xonotic/metadata.xml b/games-fps/xonotic/metadata.xml
new file mode 100644
index 000000000000..2b46931205d2
--- /dev/null
+++ b/games-fps/xonotic/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<use>
+ <flag name="ode">Enable support for physics engine from <pkg>dev-games/ode</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/games-fps/xonotic/xonotic-0.8.2.ebuild b/games-fps/xonotic/xonotic-0.8.2.ebuild
new file mode 100644
index 000000000000..32b2eab5bb41
--- /dev/null
+++ b/games-fps/xonotic/xonotic-0.8.2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils check-reqs toolchain-funcs
+
+MY_PN="${PN^}"
+DESCRIPTION="Fork of Nexuiz, Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine"
+HOMEPAGE="http://www.xonotic.org/"
+SRC_URI="http://dl.xonotic.org/${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug dedicated doc ode sdl"
+
+UIRDEPEND="
+ media-libs/libogg
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libmodplug
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXpm
+ x11-libs/libXext
+ x11-libs/libXdmcp
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ virtual/opengl
+ media-libs/freetype:2
+ alsa? ( media-libs/alsa-lib )
+ ode? ( dev-games/ode[double-precision] )
+ sdl? ( media-libs/libsdl2[X,sound,joystick,opengl,video,alsa?] )"
+UIDEPEND="
+ x11-base/xorg-proto"
+RDEPEND="
+ sys-libs/zlib
+ virtual/jpeg:0
+ media-libs/libpng:0
+ net-misc/curl
+ ~dev-libs/d0_blind_id-1.0
+ !dedicated? ( ${UIRDEPEND} )"
+DEPEND="${RDEPEND}
+ !dedicated? ( ${UIDEPEND} )"
+
+CHECKREQS_DISK_BUILD="1200M"
+CHECKREQS_DISK_USR="950M"
+
+S="${WORKDIR}/${MY_PN}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "/^EXE_/s:darkplaces:${PN}:" \
+ -e "s:-O3:${CFLAGS}:" \
+ -e "/-lm/s:$: ${LDFLAGS}:" \
+ -e '/^STRIP/s/strip/true/' \
+ source/darkplaces/makefile.inc || die
+
+ if ! use alsa; then
+ sed -i \
+ -e "/DEFAULT_SNDAPI/s:ALSA:OSS:" \
+ source/darkplaces/makefile || die
+ fi
+}
+
+src_compile() {
+ local t="$(usex debug debug release)"
+ local i
+
+ tc-export CC CXX LD AR RANLIB
+
+ # use a for-loop wrt bug 473352
+ for i in sv-${t} $(usex !dedicated "cl-${t} $(usex sdl "sdl-${t}" "")" "") ; do
+ emake \
+ -C source/darkplaces \
+ DP_LINK_ODE=$(usex ode shared no) \
+ DP_FS_BASEDIR="/usr/share/${PN}" \
+ ${i}
+ done
+}
+
+src_install() {
+ if ! use dedicated; then
+ dobin source/darkplaces/${PN}-glx
+ newicon misc/logos/${PN}_icon.svg ${PN}.svg
+ make_desktop_entry ${PN}-glx "${MY_PN} (GLX)"
+
+ if use sdl; then
+ dobin source/darkplaces/${PN}-sdl
+ make_desktop_entry ${PN}-sdl "${MY_PN} (SDL)"
+ fi
+ fi
+ dobin source/darkplaces/${PN}-dedicated
+
+ dodoc Docs/*.txt
+ use doc && dohtml -r Docs
+
+ insinto "/usr/share/${PN}"
+ doins -r key_0.d0pk server data
+}
diff --git a/games-fps/yamagi-quake2-7.10 b/games-fps/yamagi-quake2-7.10
deleted file mode 100644
index 3b99547bc48f..000000000000
--- a/games-fps/yamagi-quake2-7.10
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=sys-libs/zlib:0= client? ( media-libs/libsdl2[opengl,video] virtual/opengl ogg? ( media-libs/libogg media-libs/libvorbis ) openal? ( media-libs/openal ) !openal? ( media-libs/libsdl2[sound] ) )
-DESCRIPTION=Quake 2 engine focused on single player
-EAPI=6
-HOMEPAGE=https://www.yamagi.org/quake2/
-IUSE=+client ctf dedicated ogg openal rogue xatrix
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/zlib:0= client? ( media-libs/libsdl2[opengl,video] virtual/opengl ogg? ( media-libs/libogg media-libs/libvorbis ) openal? ( media-libs/openal ) !openal? ( media-libs/libsdl2[sound] ) )
-REQUIRED_USE=|| ( client dedicated )
-SLOT=0
-SRC_URI=https://deponie.yamagi.org/quake2/quake2-7.10.tar.xz ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-1.05.tar.xz ) rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-2.04.tar.xz ) xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-2.05.tar.xz )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ec694d27def610d5bae3e19661d3daa7
diff --git a/games-fps/yamagi-quake2-7.20 b/games-fps/yamagi-quake2-7.20
deleted file mode 100644
index 2e1a19481484..000000000000
--- a/games-fps/yamagi-quake2-7.20
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare
-DEPEND=sys-libs/zlib:0= client? ( media-libs/libsdl2[opengl,video] virtual/opengl ogg? ( media-libs/libogg media-libs/libvorbis ) openal? ( media-libs/openal ) !openal? ( media-libs/libsdl2[sound] ) )
-DESCRIPTION=Quake 2 engine focused on single player
-EAPI=6
-HOMEPAGE=https://www.yamagi.org/quake2/
-IUSE=+client ctf dedicated ogg openal rogue xatrix
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/zlib:0= client? ( media-libs/libsdl2[opengl,video] virtual/opengl ogg? ( media-libs/libogg media-libs/libvorbis ) openal? ( media-libs/openal ) !openal? ( media-libs/libsdl2[sound] ) )
-REQUIRED_USE=|| ( client dedicated )
-SLOT=0
-SRC_URI=https://deponie.yamagi.org/quake2/quake2-7.20.tar.xz ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-1.05.tar.xz ) rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-2.04.tar.xz ) xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-2.05.tar.xz )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c4e4d07dbc61e77468c11ab7c2e5443c
diff --git a/games-fps/yamagi-quake2/Manifest b/games-fps/yamagi-quake2/Manifest
new file mode 100644
index 000000000000..ea0bfa2f217c
--- /dev/null
+++ b/games-fps/yamagi-quake2/Manifest
@@ -0,0 +1,11 @@
+AUX yamagi-quake2-addon-respect-flags.patch 823 BLAKE2B 348115f8a35d61e9dc4a1121bb98cfe1c2d6925fc7fc3bb7965d1f10d8bc4958f222982892216ee312ec245c3e505c9e9b8c20c65539f24145af4355959a4542 SHA512 c570ea602d3d5fedc6defae5c6b8d99f079ea5562b9c864f896a97c01ca504dbbb669e9a43eb5757abca884ad39c7a2f685c3fb915d32bd8dd5ff22f6934a4fd
+AUX yamagi-quake2-respect-flags.patch 1209 BLAKE2B 757b7f1757a752871525ed397f53db8992292dde7a68fb22030ded806e64f4853ac1c2e75304afb2f88f1f2d36edc99758dee4fa6cbfe353fa5004aabb65b982 SHA512 abaa7041640556d1b7272fec820a987e02b4a7d466765a637ddc0ce39c38eafe95e46f91e5bdcf74030df2dff7674e96c8a49ca48b99400f74b85551e0d9a5c3
+AUX yamagi-quake2-zlib.patch 592 BLAKE2B 836093baf5f0a7554d07e8305dfb9fe83ece7069562d7c0d7941c241ba8442d02819234e5a4f89031e9d9b82ad5bdb85cdfd507bab5f3f1f9a53cec9ed948527 SHA512 cc0e0ee7807a4aa0edc540ccde8ee37f4550a34ee24efadb876d0defc08fb06d4d3be7c94e5ebf45247798b4d7d3b98184b0c93a6511fc7369f8ae1c5b4aa2d1
+DIST quake2-7.10.tar.xz 1792748 BLAKE2B 853d6db1eec46ce40952fd413a259653275081599a940941fc883921b310f436be62b80a1d911a0d8f95a33e540e60bd6db2377370cc443cbaa9c3eec6ae055f SHA512 46247c3e2c8e6dcb056dfc7785dd63bf4f896719894a1c5467f2eb313cc3d8a892fda9bafc2ca760a9ac96f6b8e23485a8740b03e118cf9a524f68657183fbb9
+DIST quake2-7.20.tar.xz 1852212 BLAKE2B 87a19be70680866b8b697ea4632239d33fe196dc648553d4a113025d9dc7996a27db2ec0178b28c04ad77854400d9f159bd800681a2bdf5a0121ef764e163ecb SHA512 466c21777e07da6aaec29cf9d3c9246a23d2157398a7e5ff1ad006f0fa7fd89e379b109936780361f03722f896ac34a188d12fc0a51cb543079e07aa6c9240df
+DIST quake2-ctf-1.05.tar.xz 134872 BLAKE2B eb987004b1c1b1743ec532b6bea96a257957377cbdb0571d6c6e7b2dae6c1b7abc154233d4f9d3af6fb546d7810e5c041b8e9293de2e409a7cace88aa455f526 SHA512 9eb951f4a9d7abc5f9a2ca53d886f68b745c1efdf3fea14db2e071b8d1592d33579c5fa56326aa583269a4810e16a7eda8dcd8930e36782cb4fcb8578c44951b
+DIST quake2-rogue-2.04.tar.xz 240436 BLAKE2B e7c3660378fe40b3f514b6e1de8714e3d3550baa244897b98bb81f362fa2b0aa57e3abceb5a38ea77cfec7621e2fcfab342a45bf9b66ccd0e44cc70292888fc2 SHA512 546deb74175c60ed7e5600a3d4b1c983fc0b1fae5922ebdb8fc3cdc5584931a0a5e34914ec2cd4ef9815323ba82cb56d427986d5c91dc040d6b68baff68ca5a8
+DIST quake2-xatrix-2.05.tar.xz 189888 BLAKE2B 9d884af6033d529ce8cca7a70a36608e45db47dab74ab0d88c04f4d928425cf22901b1299a69330bfa83810034c9f1eff2d9618b222db68564d81d569f0596cd SHA512 f7e14bb870eaf4515405f5f1162057669351a334993410101973b75e52d6d576c35c91112911f961ad122ebe664b294649e94e88a2f62b79f51e28d02f50487a
+EBUILD yamagi-quake2-7.10.ebuild 3007 BLAKE2B 5084aa0d925ad93d3f8e27b27b8548625469ba3dfc611583657150c04541b50d3cc71a2b8f2c7ad6816771ddf0a8ada67285e17d030263178a6216db930b79ef SHA512 ecf02bc816b1913d75a4c8b8c8cd01c042f762c825252d4f797cbbe71152db376524f50a0611844cacee7b10dcc385119b5c31960f39008ec77b1997bf35fb27
+EBUILD yamagi-quake2-7.20.ebuild 3403 BLAKE2B b62a57e2a7c11093718dee95ec19bf9a386bd6555ac1c1f960b1088157ecba2f58ba8a79ac97220b2d6cfb0dc5ddbca896f2909199f99f64ee7216bb189ce37e SHA512 7047e2a0c6232396d03a6d7ab538885a0b01b89d653e0072874ac02c4d48ecd2c55a6065e05b2647379f723ca1bf64237dc74a898f6b0a1c2aff9a36135dcb3b
+MISC metadata.xml 731 BLAKE2B 42af3854a50b6c7ef6a715af0a6d20c574a9e8ac8011f3ad3cc0d28af9834a32df3ba8b1e546b7017e634e323a4823610d6ffec111b29f4341b2a4f7bb4e7f96 SHA512 faa5df8f6af6efa7e90e17909ae8659d9b9273ad7ff6684845fde8849ad4eee4a933cd04dfd2b5578d661277da331a58076d87a8a4dde45b8f4afa7e408e4095
diff --git a/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags.patch b/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags.patch
new file mode 100644
index 000000000000..d767f04d4b09
--- /dev/null
+++ b/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags.patch
@@ -0,0 +1,30 @@
+--- a/Makefile 2017-05-25 12:45:51.000000000 +0300
++++ b/Makefile 2018-01-14 17:38:34.540167879 +0300
+@@ -64,11 +64,11 @@
+ #
+ # -MMD to generate header dependencies.
+ ifeq ($(OSTYPE), Darwin)
+-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
+- -Wall -pipe -g -fwrapv -arch i386 -arch x86_64
++CFLAGS += -fno-strict-aliasing -fomit-frame-pointer \
++ -Wall -fwrapv -arch i386 -arch x86_64
+ else
+-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
+- -Wall -pipe -g -MMD -fwrapv
++CFLAGS += -fno-strict-aliasing -fomit-frame-pointer \
++ -Wall -MMD -fwrapv
+ endif
+
+ # ----------
+@@ -80,9 +80,9 @@
+
+ # Base LDFLAGS.
+ ifeq ($(OSTYPE), Darwin)
+-LDFLAGS := -shared -arch i386 -arch x86_64
++LDFLAGS += -shared -arch i386 -arch x86_64
+ else
+-LDFLAGS := -shared
++LDFLAGS += -shared
+ endif
+
+ # ----------
diff --git a/games-fps/yamagi-quake2/files/yamagi-quake2-respect-flags.patch b/games-fps/yamagi-quake2/files/yamagi-quake2-respect-flags.patch
new file mode 100644
index 000000000000..76ac4b60f503
--- /dev/null
+++ b/games-fps/yamagi-quake2/files/yamagi-quake2-respect-flags.patch
@@ -0,0 +1,40 @@
+--- a/Makefile 2017-12-08 12:22:59.000000000 +0300
++++ b/Makefile 2018-01-14 15:42:56.804047742 +0300
+@@ -165,12 +165,12 @@
+ # -MMD to generate header dependencies. (They cannot be
+ # generated if building universal binaries on OSX)
+ ifeq ($(YQ2_OSTYPE), Darwin)
+-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
+- -Wall -pipe -g -fwrapv
++CFLAGS += -fno-strict-aliasing -fomit-frame-pointer \
++ -Wall -fwrapv
+ CFLAGS += $(OSX_ARCH)
+ else
+-CFLAGS := -std=gnu99 -O2 -fno-strict-aliasing \
+- -Wall -pipe -g -ggdb -MMD -fwrapv
++CFLAGS += -std=gnu99 -fno-strict-aliasing \
++ -Wall -MMD -fwrapv
+ endif
+
+ # ----------
+@@ -263,15 +263,15 @@
+
+ # Base LDFLAGS.
+ ifeq ($(YQ2_OSTYPE),Linux)
+-LDFLAGS := -L/usr/lib -lm -ldl -rdynamic
++LDFLAGS += -lm -ldl -rdynamic
+ else ifeq ($(YQ2_OSTYPE),FreeBSD)
+-LDFLAGS := -L/usr/local/lib -lm
++LDFLAGS += -lm
+ else ifeq ($(YQ2_OSTYPE),OpenBSD)
+-LDFLAGS := -L/usr/local/lib -lm
++LDFLAGS += -lm
+ else ifeq ($(YQ2_OSTYPE),Windows)
+-LDFLAGS := -L/usr/lib -lws2_32 -lwinmm -static-libgcc
++LDFLAGS += -lws2_32 -lwinmm -static-libgcc
+ else ifeq ($(YQ2_OSTYPE), Darwin)
+-LDFLAGS := $(OSX_ARCH) -lm
++LDFLAGS += $(OSX_ARCH) -lm
+ endif
+
+ CFLAGS += -fvisibility=hidden
diff --git a/games-fps/yamagi-quake2/files/yamagi-quake2-zlib.patch b/games-fps/yamagi-quake2/files/yamagi-quake2-zlib.patch
new file mode 100644
index 000000000000..1de79c986907
--- /dev/null
+++ b/games-fps/yamagi-quake2/files/yamagi-quake2-zlib.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/383179
+
+Upstream removed OF macro definition:
+https://github.com/yquake2/yquake2/commit/716d72a295c9247b3c88ccd180bb7a517ed99e13
+
+--- a/src/common/unzip/ioapi.h 2018-03-10 20:24:21.000000000 +0300
++++ b/src/common/unzip/ioapi.h 2018-04-10 00:34:08.688675097 +0300
+@@ -120,6 +120,9 @@
+ #define ZLIB_FILEFUNC_MODE_EXISTING (4)
+ #define ZLIB_FILEFUNC_MODE_CREATE (8)
+
++#ifdef _Z_OF
++#define OF _Z_OF
++#endif
+
+ #ifndef ZCALLBACK
+ #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
diff --git a/games-fps/yamagi-quake2/metadata.xml b/games-fps/yamagi-quake2/metadata.xml
new file mode 100644
index 000000000000..c573477de061
--- /dev/null
+++ b/games-fps/yamagi-quake2/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexander@tsoy.me</email>
+ <name>Alexander Tsoy</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">yquake2/yquake2</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build client</flag>
+ <flag name="ctf">Build support for the 'Capture The Flag' addon</flag>
+ <flag name="rogue">Build support for the 'Ground Zero' Mission Pack</flag>
+ <flag name="xatrix">Build support for the 'The Reckoning' Mission Pack</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/yamagi-quake2/yamagi-quake2-7.10.ebuild b/games-fps/yamagi-quake2/yamagi-quake2-7.10.ebuild
new file mode 100644
index 000000000000..09f38aad41cf
--- /dev/null
+++ b/games-fps/yamagi-quake2/yamagi-quake2-7.10.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop eutils
+
+CTF_V=1.05
+ROGUE_V=2.04
+XATRIX_V=2.05
+
+DESCRIPTION="Quake 2 engine focused on single player"
+HOMEPAGE="https://www.yamagi.org/quake2/"
+SRC_URI="https://deponie.yamagi.org/quake2/quake2-${PV}.tar.xz
+ ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-${CTF_V}.tar.xz )
+ rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-${ROGUE_V}.tar.xz )
+ xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-${XATRIX_V}.tar.xz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+client ctf dedicated ogg openal rogue xatrix"
+REQUIRED_USE="|| ( client dedicated )"
+
+RDEPEND="sys-libs/zlib:0=
+ client? (
+ media-libs/libsdl2[opengl,video]
+ virtual/opengl
+ ogg? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ openal? ( media-libs/openal )
+ !openal? ( media-libs/libsdl2[sound] )
+ )
+"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/quake2-${PV}"
+
+PATCHES=( "${FILESDIR}"/${PN}-respect-flags.patch )
+DOCS=( CHANGELOG CONTRIBUTE README.md )
+
+mymake() {
+ emake \
+ VERBOSE=1 \
+ DLOPEN_OPENAL=no \
+ WITH_CDA=no \
+ WITH_SYSTEMWIDE=yes \
+ WITH_SYSTEMDIR="${EPREFIX}"/usr/share/games/quake2 \
+ WITH_ZIP=yes \
+ WITH_OGG=$(usex ogg) \
+ WITH_OPENAL=$(usex openal) \
+ "$@"
+}
+
+src_prepare() {
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+
+ pushd "${WORKDIR}"/quake2-${addon}-* >/dev/null || die
+ eapply -l -- "${FILESDIR}"/${PN}-addon-respect-flags.patch
+ popd >/dev/null || die
+ done
+
+ default
+}
+
+src_compile() {
+ local targets=( game )
+ use client && targets+=( client ref_gl1 ref_gl3 )
+ use dedicated && targets+=( server )
+
+ mymake config
+ mymake "${targets[@]}"
+
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+ emake -C "${WORKDIR}"/quake2-${addon}-* VERBOSE=1
+ done
+}
+
+src_install() {
+ insinto /usr/lib/yamagi-quake2
+ # Yamagi Quake II expects all binaries to be in the same directory
+ # See stuff/packaging.md for more info
+ exeinto /usr/lib/yamagi-quake2
+ doins -r release/.
+
+ if use client; then
+ doexe release/quake2
+ dosym ../lib/yamagi-quake2/quake2 /usr/bin/yquake2
+
+ newicon stuff/icon/Quake2.svg "yamagi-quake2.svg"
+ make_desktop_entry "yquake2" "Yamagi Quake II"
+ fi
+
+ if use dedicated; then
+ doexe release/q2ded
+ dosym ../lib/yamagi-quake2/q2ded /usr/bin/yq2ded
+ fi
+
+ insinto /usr/lib/yamagi-quake2/baseq2
+ doins stuff/yq2.cfg
+
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+
+ insinto /usr/lib/yamagi-quake2/${addon}
+ doins "${WORKDIR}"/quake2-${addon}-*/release/game.so
+
+ local addon_name
+ case ${addon} in
+ ctf) addon_name="CTF" ;;
+ rogue) addon_name="Ground Zero" ;;
+ xatrix) addon_name="The Reckoning" ;;
+ esac
+
+ make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
+ make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
+ done
+
+ einstalldocs
+ if use client; then
+ docinto examples
+ dodoc stuff/cdripper.sh
+ fi
+}
diff --git a/games-fps/yamagi-quake2/yamagi-quake2-7.20.ebuild b/games-fps/yamagi-quake2/yamagi-quake2-7.20.ebuild
new file mode 100644
index 000000000000..779346e191f7
--- /dev/null
+++ b/games-fps/yamagi-quake2/yamagi-quake2-7.20.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop eutils
+
+CTF_V=1.05
+ROGUE_V=2.04
+XATRIX_V=2.05
+
+DESCRIPTION="Quake 2 engine focused on single player"
+HOMEPAGE="https://www.yamagi.org/quake2/"
+SRC_URI="https://deponie.yamagi.org/quake2/quake2-${PV}.tar.xz
+ ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-${CTF_V}.tar.xz )
+ rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-${ROGUE_V}.tar.xz )
+ xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-${XATRIX_V}.tar.xz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+client ctf dedicated ogg openal rogue xatrix"
+REQUIRED_USE="|| ( client dedicated )"
+
+RDEPEND="sys-libs/zlib:0=
+ client? (
+ media-libs/libsdl2[opengl,video]
+ virtual/opengl
+ ogg? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ openal? ( media-libs/openal )
+ !openal? ( media-libs/libsdl2[sound] )
+ )
+"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/quake2-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-respect-flags.patch
+ "${FILESDIR}"/${PN}-zlib.patch
+)
+DOCS=( CHANGELOG CONTRIBUTE README.md )
+
+mymake() {
+ emake \
+ VERBOSE=1 \
+ DLOPEN_OPENAL=no \
+ WITH_CDA=no \
+ WITH_SYSTEMWIDE=yes \
+ WITH_SYSTEMDIR="${EPREFIX}"/usr/share/games/quake2 \
+ WITH_ZIP=yes \
+ WITH_OGG=$(usex ogg) \
+ WITH_OPENAL=$(usex openal) \
+ "$@"
+}
+
+src_prepare() {
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+
+ pushd "${WORKDIR}"/quake2-${addon}-* >/dev/null || die
+ eapply -l -- "${FILESDIR}"/${PN}-addon-respect-flags.patch
+ popd >/dev/null || die
+ done
+
+ default
+}
+
+src_compile() {
+ local targets=( game )
+ use client && targets+=( client ref_gl1 ref_gl3 )
+ use dedicated && targets+=( server )
+
+ mymake config
+ mymake "${targets[@]}"
+
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+ emake -C "${WORKDIR}"/quake2-${addon}-* VERBOSE=1
+ done
+}
+
+src_install() {
+ insinto /usr/lib/yamagi-quake2
+ # Yamagi Quake II expects all binaries to be in the same directory
+ # See stuff/packaging.md for more info
+ exeinto /usr/lib/yamagi-quake2
+ doins -r release/.
+
+ if use client; then
+ doexe release/quake2
+ dosym ../lib/yamagi-quake2/quake2 /usr/bin/yquake2
+
+ newicon stuff/icon/Quake2.svg "yamagi-quake2.svg"
+ make_desktop_entry "yquake2" "Yamagi Quake II"
+ fi
+
+ if use dedicated; then
+ doexe release/q2ded
+ dosym ../lib/yamagi-quake2/q2ded /usr/bin/yq2ded
+ fi
+
+ insinto /usr/lib/yamagi-quake2/baseq2
+ doins stuff/yq2.cfg
+
+ local addon
+ for addon in ctf rogue xatrix; do
+ use ${addon} || continue
+
+ insinto /usr/lib/yamagi-quake2/${addon}
+ doins "${WORKDIR}"/quake2-${addon}-*/release/game.so
+
+ local addon_name
+ case ${addon} in
+ ctf) addon_name="CTF" ;;
+ rogue) addon_name="Ground Zero" ;;
+ xatrix) addon_name="The Reckoning" ;;
+ esac
+
+ make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
+ make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
+ done
+
+ einstalldocs
+ if use client; then
+ docinto examples
+ dodoc stuff/cdripper.sh
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "In order to play, you must at least install:"
+ elog "games-fps/quake2-data or games-fps/quake2-demodata or copy game"
+ elog "data files to ~/.yq2/ or ${EPREFIX}/usr/share/games/quake2/ manually."
+ elog "Read ${EPREFIX}/usr/share/doc/${PF}/README.md* for more information."
+ elog
+ fi
+}