Compare commits
6 Commits
master
...
fix-darkpl
Author | SHA1 | Date | |
---|---|---|---|
|
8a5490bc40 | ||
|
ddb723e789 | ||
|
b55466cf5c | ||
|
1de5d29e5a | ||
|
289894eff4 | ||
|
e58538d4d1 |
@ -1,3 +1,3 @@
|
|||||||
DIST darkplacesengine20170829beta1.zip 29103945 BLAKE2B e6ddcb5a9f3a820879a70ca4578867f80a1df5e2143f20f924eb93b75cf9beafb74246dcca15cd3328e61189ff431fe678fc5a70f17d32dfa978499e8a1d0127 SHA512 49ec750199240eb7ba4eae6ede3a3ee85bafef07607b827111fb7846f7283c44a480637a45fd85a33f441ab2f99c44dc105348ea5da04d0397650f1a347cf3e9
|
DIST darkplacesenginesource-95ed24831ca8dcbf6ae8f886733c35ce2ad83272.tar.gz 4614280 BLAKE2B 933aa4dcbc262c8f62c12de8402f2b8e31063a89fde1901ba3378646be51b78b7f5f657ec26d52d1ecfd5f88b62677b912f82ce915e44a8d63819f16ab0235da SHA512 c5b8a1299c02e9eef59bbe36cbcb36005cedd9948f97597474cc05ce5ffdd33729825733877b9bac86cf7792d96cf80b6795281381c11eb84879b7823c5c5979
|
||||||
DIST fuhquake-lits.rar 8388829 BLAKE2B fb9c4db151deb43424de9331641154f412394ae6346864bc62a210c7d8d12c6ed6c8647cb4cd83fa853155c5f562f7e9b8d3c779fe74c1bb3f05bb6f627b1d5e SHA512 6e59f5e08a6c401b329b86b0cd677a04b1a5aee11f24973c77c9e7ea50cab9dedf4fc15c4f3d6b73bdc87bacdc9612a3c244d0a4ceceef943abb6e256ac23925
|
DIST fuhquake-lits.rar 8388829 BLAKE2B fb9c4db151deb43424de9331641154f412394ae6346864bc62a210c7d8d12c6ed6c8647cb4cd83fa853155c5f562f7e9b8d3c779fe74c1bb3f05bb6f627b1d5e SHA512 6e59f5e08a6c401b329b86b0cd677a04b1a5aee11f24973c77c9e7ea50cab9dedf4fc15c4f3d6b73bdc87bacdc9612a3c244d0a4ceceef943abb6e256ac23925
|
||||||
DIST id1.pk3 350470 BLAKE2B 76426667de5f42633f608b75286671344d439398aa9b819e9ba3979ca317a93930b1077de7efb4b1bad670a6341c7536d572cfc2590a5812c71dd0c4e8def784 SHA512 d4d7233bc1e5049e89d09448818219b0ce7941fecde5381cd95933e4c96ebc9b4e34ff7eae5eb5d0d1e3cc2ceb4f5254f4d600aded7dda373713149817621331
|
DIST id1.pk3 350470 BLAKE2B 76426667de5f42633f608b75286671344d439398aa9b819e9ba3979ca317a93930b1077de7efb4b1bad670a6341c7536d572cfc2590a5812c71dd0c4e8def784 SHA512 d4d7233bc1e5049e89d09448818219b0ce7941fecde5381cd95933e4c96ebc9b4e34ff7eae5eb5d0d1e3cc2ceb4f5254f4d600aded7dda373713149817621331
|
||||||
|
@ -1,190 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit flag-o-matic unpacker desktop wrapper
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
184
games-fps/darkplaces/darkplaces-20240226_pre20240226.ebuild
Normal file
184
games-fps/darkplaces/darkplaces-20240226_pre20240226.ebuild
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit flag-o-matic unpacker desktop wrapper
|
||||||
|
|
||||||
|
# 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="https://icculus.org/twilight/darkplaces/"
|
||||||
|
GIT_COMMIT="95ed24831ca8dcbf6ae8f886733c35ce2ad83272"
|
||||||
|
MY_SOURCE="${PN}enginesource-${GIT_COMMIT}.tar.gz"
|
||||||
|
SRC_URI="https://github.com/DarkPlacesEngine/darkplaces/archive/${GIT_COMMIT}.tar.gz -> "${MY_SOURCE}"
|
||||||
|
lights? (
|
||||||
|
http://www.fuhquake.net/files/extras/${MY_LIGHTS}
|
||||||
|
http://www.kgbsyndicate.com/romi/id1.pk3 )"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||||
|
IUSE="capture cpu_flags_x86_sse debug dedicated demo ipv6 lights sdl textures"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
amd64? ( cpu_flags_x86_sse )
|
||||||
|
"
|
||||||
|
|
||||||
|
SDL_RDEPEND="
|
||||||
|
media-libs/libsdl2[udev]
|
||||||
|
x11-libs/libX11
|
||||||
|
media-libs/libogg
|
||||||
|
media-libs/libtheora
|
||||||
|
media-libs/libvorbis
|
||||||
|
media-libs/libxmp
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/d0_blind_id
|
||||||
|
dev-games/ode
|
||||||
|
net-misc/curl
|
||||||
|
media-libs/libjpeg-turbo
|
||||||
|
sys-libs/zlib
|
||||||
|
media-libs/libpng
|
||||||
|
demo? ( games-fps/quake1-demodata )
|
||||||
|
textures? ( >=games-fps/quake1-textures-20050820 )
|
||||||
|
sdl? ( ${SDL_RDEPEND} )
|
||||||
|
"
|
||||||
|
BDEPEND="lights? (
|
||||||
|
app-arch/unrar
|
||||||
|
app-arch/unzip
|
||||||
|
)
|
||||||
|
app-alternatives/tar
|
||||||
|
app-alternatives/gzip
|
||||||
|
sys-apps/coreutils
|
||||||
|
sys-apps/sed
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
S="${WORKDIR}"
|
||||||
|
dir="/usr/share/quake1"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use lights ; then
|
||||||
|
elog "FuhQuake lights: enabled"
|
||||||
|
unpack "${MY_LIGHTS}"
|
||||||
|
unpack_zip "${DISTDIR}"/id1.pk3
|
||||||
|
mv *.lit maps/ || die
|
||||||
|
mv ReadMe.txt rtlights.txt
|
||||||
|
else
|
||||||
|
elog "FuhQuake lights: disabled"
|
||||||
|
fi
|
||||||
|
tar --strip-components 1 -xf "${DISTDIR}/${MY_SOURCE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
cd "${S}"
|
||||||
|
rm mingw_note.txt
|
||||||
|
strip-flags
|
||||||
|
patch -p1 -i "${FILESDIR}/0020-make-sse-selectable.patch"
|
||||||
|
patch -p1 -i "${FILESDIR}/0030-builddate-template.patch" || die
|
||||||
|
sed -i "s/%{PVR}/${PVR}/" builddate.c || die
|
||||||
|
# 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 ipv6; then
|
||||||
|
elog "IPv6 support: disabled"
|
||||||
|
sed -i 's/^#\(CFLAGS_NET+=-DNOSUPPORTIPV6\)$/\1/' makefile || die
|
||||||
|
else
|
||||||
|
elog "IPv6 support: enabled"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local video_capture="disabled"
|
||||||
|
if use capture; then
|
||||||
|
elog "Video capture: enabled"
|
||||||
|
video_capture="enabled"
|
||||||
|
else
|
||||||
|
elog "Video capture: disabled"
|
||||||
|
fi
|
||||||
|
local sse_enabled=0
|
||||||
|
if use cpu_flags_x86_sse; then
|
||||||
|
elog "Skeletal animations: uses SSE"
|
||||||
|
sse_enabled=1
|
||||||
|
else
|
||||||
|
if use amd64; then
|
||||||
|
elog "Skeletal animations: uses SSE, not disabling on AMD64"
|
||||||
|
sse_enabled=1
|
||||||
|
else
|
||||||
|
elog "Skeletal animations: uses generic code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
local opts="DP_FS_BASEDIR=\"${dir}\" \
|
||||||
|
DP_LINK_JPEG=shared \
|
||||||
|
DP_LINK_CRYPTO=shared \
|
||||||
|
DP_LINK_CRYPTO_RIJNDAEL=shared \
|
||||||
|
DP_LINK_ZLIB=shared \
|
||||||
|
DP_LINK_ODE=shared \
|
||||||
|
DP_VIDEO_CAPTURE=${video_capture} \
|
||||||
|
DP_PRELOAD_DEPENDENCIES=1 \
|
||||||
|
GENTOO_BUILD=1 \
|
||||||
|
DP_SSE=${sse_enabled}"
|
||||||
|
local type="release"
|
||||||
|
if use debug; then
|
||||||
|
type="debug"
|
||||||
|
fi
|
||||||
|
if use sdl; then
|
||||||
|
emake ${opts} "sdl-${type}"
|
||||||
|
fi
|
||||||
|
if use dedicated; then
|
||||||
|
emake ${opts} "sv-${type}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
if use sdl; then
|
||||||
|
local 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
|
||||||
|
make_wrapper ${PN}-demo "${PN} -game demo"
|
||||||
|
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 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 demo ; then
|
||||||
|
elog "Remember to place pak0.pak and pak1.pak in ${dir}/id1"
|
||||||
|
if use cdda; then
|
||||||
|
elog "If you wish to have the original soundtrack available without playing from an optical drive, please make sure that the path ${dir}/id1/sound/cdtracks exists, and that it contains the original soundtrack. The expected filename schema is track%i.%s with a double-digit count, either in WAV RIFF or OGG Vorbis format."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
149
games-fps/darkplaces/files/0020-make-sse-selectable.patch
Normal file
149
games-fps/darkplaces/files/0020-make-sse-selectable.patch
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
--- a/makefile.inc 2024-03-18 14:28:17.506666539 +0100
|
||||||
|
+++ b/makefile.inc 2024-03-18 14:34:25.586666536 +0100
|
||||||
|
@@ -157,9 +157,12 @@
|
||||||
|
|
||||||
|
ifeq ($(DP_SSE),1)
|
||||||
|
CFLAGS_SSE=-msse
|
||||||
|
- CFLAGS_SSE2=-msse2
|
||||||
|
else
|
||||||
|
CFLAGS_SSE=
|
||||||
|
+endif # ifeq ($(DP_SSE),1)
|
||||||
|
+ifeq ($(DP_SSE2),1)
|
||||||
|
+ CFLAGS_SSE2=-msse2
|
||||||
|
+else
|
||||||
|
CFLAGS_SSE2=
|
||||||
|
endif # ifeq ($(DP_SSE),1)
|
||||||
|
|
||||||
|
--- a/makefile 2024-03-31 16:39:13.059767771 +0200
|
||||||
|
+++ b/makefile 2024-03-31 16:28:43.563130538 +0200
|
||||||
|
@@ -26,29 +26,32 @@
|
||||||
|
endif # ifdef windir
|
||||||
|
endif # ifndef DP_MAKE_TARGET
|
||||||
|
|
||||||
|
+# If we are Gentoo, then we know what we're doing and we can move along
|
||||||
|
+ifndef GENTOO_BUILD
|
||||||
|
# If we're targeting an x86 CPU we want to enable DP_SSE (CFLAGS_SSE and SSE2)
|
||||||
|
-ifeq ($(DP_MAKE_TARGET), mingw)
|
||||||
|
- DP_SSE:=1
|
||||||
|
-else ifeq ($(OS),Windows_NT)
|
||||||
|
- ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else ifeq ($(PROCESSOR_ARCHITECTURE),x86)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else
|
||||||
|
- DP_SSE:=0
|
||||||
|
- endif
|
||||||
|
-else
|
||||||
|
- DP_MACHINE:=$(shell uname -m)
|
||||||
|
- ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else ifeq ($(DP_MACHINE),i686)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else ifeq ($(DP_MACHINE),i386)
|
||||||
|
+ ifeq ($(DP_MAKE_TARGET), mingw)
|
||||||
|
DP_SSE:=1
|
||||||
|
+ else ifeq ($(OS),Windows_NT)
|
||||||
|
+ ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else ifeq ($(PROCESSOR_ARCHITECTURE),x86)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else
|
||||||
|
+ DP_SSE:=0
|
||||||
|
+ endif
|
||||||
|
else
|
||||||
|
- DP_SSE:=0
|
||||||
|
+ DP_MACHINE:=$(shell uname -m)
|
||||||
|
+ ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else ifeq ($(DP_MACHINE),i686)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else ifeq ($(DP_MACHINE),i386)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else
|
||||||
|
+ DP_SSE:=0
|
||||||
|
+ endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
--- a/sys.h 2024-03-31 16:37:29.066439260 +0200
|
||||||
|
+++ b/sys.h 2024-03-31 16:37:02.229773838 +0200
|
||||||
|
@@ -93,39 +93,47 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || (__clang__)
|
||||||
|
-# if defined(__i386__)
|
||||||
|
-# define DP_ARCH_STR "686"
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
-# ifdef __SSE__
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# endif
|
||||||
|
-# ifdef __SSE2__
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-# endif
|
||||||
|
-# elif defined(__x86_64__)
|
||||||
|
-# define DP_ARCH_STR "x86_64"
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-# elif defined(__powerpc__)
|
||||||
|
-# define DP_ARCH_STR "ppc"
|
||||||
|
-# endif
|
||||||
|
-#elif defined(_WIN64)
|
||||||
|
-# define DP_ARCH_STR "x86_64"
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-#elif defined(WIN32)
|
||||||
|
-# define DP_ARCH_STR "x86"
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
+# if defined(__i386__) || defined(WIN32)
|
||||||
|
+# ifdef __SSE__
|
||||||
|
+# define SSE_POSSIBLE
|
||||||
|
+# endif
|
||||||
|
+# ifdef __SSE2__
|
||||||
|
+# define SSE2_POSSIBLE
|
||||||
|
+# endif
|
||||||
|
+# if defined(__i686__)
|
||||||
|
+# define DP_ARCH_STR "i686"
|
||||||
|
+# elif defined(__i586__)
|
||||||
|
+# define DP_ARCH_STR "i586"
|
||||||
|
+# elif defined(__i486__)
|
||||||
|
+# define DP_ARCH_STR "i486"
|
||||||
|
+# else
|
||||||
|
+# define DP_ARCH_STR "i386"
|
||||||
|
+# endif
|
||||||
|
+# elif defined(__amd64__) || defined(_WIN64)
|
||||||
|
+# define SSE_POSSIBLE
|
||||||
|
+# define SSE2_POSSIBLE
|
||||||
|
+# define DP_ARCH_STR "amd64"
|
||||||
|
+# elif defined(__powerpc64__)
|
||||||
|
+# define DP_ARCH_STR "ppc64"
|
||||||
|
+# elif defined(__powerpc__)
|
||||||
|
+# define DP_ARCH_STR "ppc"
|
||||||
|
+# elif defined(__arm64__)
|
||||||
|
+# define DP_ARCH_STR "arm64"
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef SSE_PRESENT
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
+#ifdef SSE_POSSIBLE
|
||||||
|
+# define SSE_PRESENT
|
||||||
|
+#endif
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
+# define SSE2_PRESENT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_SSE
|
||||||
|
-# undef SSE_PRESENT
|
||||||
|
-# undef SSE_POSSIBLE
|
||||||
|
-# undef SSE2_PRESENT
|
||||||
|
+# undef SSE_PRESENT
|
||||||
|
+# undef SSE_POSSIBLE
|
||||||
|
+# undef SSE2_PRESENT
|
||||||
|
+# undef SSE2_POSSIBLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SSE_POSSIBLE
|
22
games-fps/darkplaces/files/0030-builddate-template.patch
Normal file
22
games-fps/darkplaces/files/0030-builddate-template.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- a/builddate.c 2024-02-26 19:53:26.000000000 +0100
|
||||||
|
+++ b/builddate.c 2024-03-31 16:45:28.549750267 +0200
|
||||||
|
@@ -1,18 +1,2 @@
|
||||||
|
-#define STRINGIFY2(arg) #arg
|
||||||
|
-#define STRINGIFY(arg) STRINGIFY2(arg)
|
||||||
|
-
|
||||||
|
extern const char *buildstring;
|
||||||
|
-const char *buildstring =
|
||||||
|
-#ifdef VCREVISION
|
||||||
|
-STRINGIFY(VCREVISION)
|
||||||
|
-#else
|
||||||
|
-"-"
|
||||||
|
-#endif
|
||||||
|
-#ifndef NO_BUILD_TIMESTAMPS
|
||||||
|
-//" " __TIME__
|
||||||
|
-" " __DATE__
|
||||||
|
-#endif
|
||||||
|
-#ifdef BUILDTYPE
|
||||||
|
-" " STRINGIFY(BUILDTYPE)
|
||||||
|
-#endif
|
||||||
|
-;
|
||||||
|
+const char *buildstring = "%{PVR}";
|
@ -1,10 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>moog621@gmail.com</email>
|
||||||
|
<name>Michał Dec</name>
|
||||||
|
</maintainer>
|
||||||
<use>
|
<use>
|
||||||
<flag name="cdsound">Enables using CD audio in the engine</flag>
|
<flag name="capture">Adds support for video capture with media-libs/libtheora</flag>
|
||||||
<flag name="demo">Uses the demo data from quake1 (quake1-demodata)</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="lights">Install and setup the updated light maps</flag>
|
||||||
<flag name="textures">Install and setup the updated textures</flag>
|
<flag name="textures">Install and setup the updated textures</flag>
|
||||||
</use>
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">DarkPlacesEngine/darkplaces</remote-id>
|
||||||
|
</upstream>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
DIST Q15_PublicBeta1.7z 412650697 BLAKE2B f9f6ce082ec42d67e0d001b363b25ea53d05d433863e74454420f3f98f64cff7188a700343685ef6d2f3649de703ce52c18144ce982fdf34c8b7aca9bc18bfd2 SHA512 2ae9f2dc3a95331985621bde1d27187c009b66aa807e44125c2a0f019c4e3eada5578ea4cc1ef7aed2844390a4a7eda20c8eedde7d9c084635bf65dbf4908c27
|
DIST Q15_PublicBeta1.7z 412650697 BLAKE2B f9f6ce082ec42d67e0d001b363b25ea53d05d433863e74454420f3f98f64cff7188a700343685ef6d2f3649de703ce52c18144ce982fdf34c8b7aca9bc18bfd2 SHA512 2ae9f2dc3a95331985621bde1d27187c009b66aa807e44125c2a0f019c4e3eada5578ea4cc1ef7aed2844390a4a7eda20c8eedde7d9c084635bf65dbf4908c27
|
||||||
DIST Q15_patch2.7z 4045889 BLAKE2B f5bf7d7dc02758da7dd1969bd748c5861e8d47c102d5d4a823dda979e1404a7264147b477f751d649681fbb015f2d0777a13c09903458b7f92fdd742072b8279 SHA512 07f9a59202c2195af067a789b6075cdcdf2070953faae7460820ddb112a6d5aaec9015ce181ec4e9731280d36d8f13c7c8af63450d66eb7b287b8ed6261b8ba1
|
DIST Q15_patch2.7z 4045889 BLAKE2B f5bf7d7dc02758da7dd1969bd748c5861e8d47c102d5d4a823dda979e1404a7264147b477f751d649681fbb015f2d0777a13c09903458b7f92fdd742072b8279 SHA512 07f9a59202c2195af067a789b6075cdcdf2070953faae7460820ddb112a6d5aaec9015ce181ec4e9731280d36d8f13c7c8af63450d66eb7b287b8ed6261b8ba1
|
||||||
|
DIST darkplacesenginesource20170829_beta1.tar.gz 2063047 BLAKE2B c3d4a49a6f11f7d6458c0f94da05547abfe9b975d2d2810e9d06d6077dae293da7e547482d92fa58612a59acce592abfe8e1ac3f55ba05bad43436e46737981b SHA512 618ddda15f80c04d3d46499504213326a2b82f591e8f633e62ac988b2e525e8c5f310f12ea91a48f8ea0c8f02375568acad28a5558311b802f6a0e45eaf592f3
|
||||||
|
DIST lmp2tga.c 7006 BLAKE2B bb88766db283a5effa44ddd439da63d6966b3b76e806b0c907fcc5461a00f9c9f780f30aa4bd59d5688c3a267427a737f078961d00f7ff796d0fb28dfcf756dd SHA512 3c7d596de4d191876d9b336be83e1b28edf1e0e6bc79e1dcfad3c071a9c504af789b5f82c225fd546d94253a34da4dde7807fb8775d7052bac7b820a21d22cb2
|
||||||
|
76
games-fps/quake15/files/0010-fix-dpsoftras-alignment.patch
Normal file
76
games-fps/quake15/files/0010-fix-dpsoftras-alignment.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
--- a/dpsoftrast.c 2016-09-10 21:36:13.000000000 +0200
|
||||||
|
+++ b/dpsoftrast.c 2024-03-02 02:04:39.576523847 +0100
|
||||||
|
@@ -163,21 +163,21 @@
|
||||||
|
#define DPSOFTRAST_DRAW_MAXCOMMANDPOOL 2097152
|
||||||
|
#define DPSOFTRAST_DRAW_MAXCOMMANDSIZE 16384
|
||||||
|
|
||||||
|
-typedef ALIGN(struct DPSOFTRAST_State_Command_Pool_s
|
||||||
|
+typedef ALIGN(struct) DPSOFTRAST_State_Command_Pool_s
|
||||||
|
{
|
||||||
|
int freecommand;
|
||||||
|
int usedcommands;
|
||||||
|
ALIGN(unsigned char commands[DPSOFTRAST_DRAW_MAXCOMMANDPOOL]);
|
||||||
|
}
|
||||||
|
-DPSOFTRAST_State_Command_Pool);
|
||||||
|
+DPSOFTRAST_State_Command_Pool;
|
||||||
|
|
||||||
|
-typedef ALIGN(struct DPSOFTRAST_State_Triangle_s
|
||||||
|
+typedef ALIGN(struct) DPSOFTRAST_State_Triangle_s
|
||||||
|
{
|
||||||
|
unsigned char mip[DPSOFTRAST_MAXTEXTUREUNITS]; // texcoord to screen space density values (for picking mipmap of textures)
|
||||||
|
float w[3];
|
||||||
|
ALIGN(float attribs[DPSOFTRAST_ARRAY_TOTAL][3][4]);
|
||||||
|
}
|
||||||
|
-DPSOFTRAST_State_Triangle);
|
||||||
|
+DPSOFTRAST_State_Triangle;
|
||||||
|
|
||||||
|
#define DPSOFTRAST_CALCATTRIB(triangle, span, data, slope, arrayindex) { \
|
||||||
|
slope = _mm_load_ps((triangle)->attribs[arrayindex][0]); \
|
||||||
|
@@ -198,7 +198,7 @@
|
||||||
|
|
||||||
|
#define DPSOFTRAST_DRAW_MAXSUBSPAN 16
|
||||||
|
|
||||||
|
-typedef ALIGN(struct DPSOFTRAST_State_Span_s
|
||||||
|
+typedef ALIGN(struct) DPSOFTRAST_State_Span_s
|
||||||
|
{
|
||||||
|
int triangle; // triangle this span was generated by
|
||||||
|
int x; // framebuffer x coord
|
||||||
|
@@ -209,7 +209,7 @@
|
||||||
|
int depthbase; // depthbuffer value at x (add depthslope*startx to get first pixel's depthbuffer value)
|
||||||
|
int depthslope; // depthbuffer value pixel delta
|
||||||
|
}
|
||||||
|
-DPSOFTRAST_State_Span);
|
||||||
|
+DPSOFTRAST_State_Span;
|
||||||
|
|
||||||
|
#define DPSOFTRAST_DRAW_MAXSPANS 1024
|
||||||
|
#define DPSOFTRAST_DRAW_MAXTRIANGLES 128
|
||||||
|
@@ -236,7 +236,7 @@
|
||||||
|
}
|
||||||
|
DPSOFTRAST_BLENDMODE;
|
||||||
|
|
||||||
|
-typedef ALIGN(struct DPSOFTRAST_State_Thread_s
|
||||||
|
+typedef ALIGN(struct) DPSOFTRAST_State_Thread_s
|
||||||
|
{
|
||||||
|
void *thread;
|
||||||
|
int index;
|
||||||
|
@@ -300,9 +300,9 @@
|
||||||
|
DPSOFTRAST_State_Triangle triangles[DPSOFTRAST_DRAW_MAXTRIANGLES];
|
||||||
|
unsigned char pixelmaskarray[DPSOFTRAST_DRAW_MAXSPANLENGTH+4]; // LordHavoc: padded to allow some termination bytes
|
||||||
|
}
|
||||||
|
-DPSOFTRAST_State_Thread);
|
||||||
|
+DPSOFTRAST_State_Thread;
|
||||||
|
|
||||||
|
-typedef ALIGN(struct DPSOFTRAST_State_s
|
||||||
|
+typedef ALIGN(struct) DPSOFTRAST_State_s
|
||||||
|
{
|
||||||
|
int fb_width;
|
||||||
|
int fb_height;
|
||||||
|
@@ -358,7 +358,7 @@
|
||||||
|
|
||||||
|
DPSOFTRAST_State_Command_Pool commandpool;
|
||||||
|
}
|
||||||
|
-DPSOFTRAST_State);
|
||||||
|
+DPSOFTRAST_State;
|
||||||
|
|
||||||
|
DPSOFTRAST_State dpsoftrast;
|
||||||
|
|
@ -0,0 +1,381 @@
|
|||||||
|
--- a/makefile.inc 2024-03-18 14:28:17.506666539 +0100
|
||||||
|
+++ b/makefile.inc 2024-03-18 14:34:25.586666536 +0100
|
||||||
|
@@ -181,9 +181,12 @@
|
||||||
|
|
||||||
|
ifeq ($(DP_SSE),1)
|
||||||
|
CFLAGS_SSE=-msse
|
||||||
|
- CFLAGS_SSE2=-msse2
|
||||||
|
else
|
||||||
|
CFLAGS_SSE=
|
||||||
|
+endif # ifeq ($(DP_SSE),1)
|
||||||
|
+ifeq ($(DP_SSE2),1)
|
||||||
|
+ CFLAGS_SSE2=-msse2
|
||||||
|
+else
|
||||||
|
CFLAGS_SSE2=
|
||||||
|
endif # ifeq ($(DP_SSE),1)
|
||||||
|
|
||||||
|
--- a/makefile 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/makefile 2024-03-18 14:41:57.396666527 +0100
|
||||||
|
@@ -26,24 +26,29 @@
|
||||||
|
endif # ifdef windir
|
||||||
|
endif # ifndef DP_MAKE_TARGET
|
||||||
|
|
||||||
|
+# If we are Gentoo, then we know what we're doing and we can move along
|
||||||
|
+ifndef GENTOO_BUILD
|
||||||
|
# If we're targeting an x86 CPU we want to enable DP_SSE (CFLAGS_SSE and SSE2)
|
||||||
|
-ifeq ($(DP_MAKE_TARGET), mingw)
|
||||||
|
- DP_SSE:=1
|
||||||
|
-else
|
||||||
|
- DP_MACHINE:=$(shell uname -m)
|
||||||
|
- ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
+ ifeq ($(DP_MAKE_TARGET), mingw)
|
||||||
|
DP_SSE:=1
|
||||||
|
+ DP_SSE2:=1
|
||||||
|
else
|
||||||
|
- ifeq ($(DP_MACHINE),i686)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else
|
||||||
|
- ifeq ($(DP_MACHINE),i386)
|
||||||
|
- DP_SSE:=1
|
||||||
|
- else
|
||||||
|
- DP_SSE:=0
|
||||||
|
- endif # ifeq ($(DP_MACHINE),i386)
|
||||||
|
- endif # ifeq ($(DP_MACHINE),i686)
|
||||||
|
- endif # ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
+ DP_MACHINE:=$(shell uname -m)
|
||||||
|
+ ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ DP_SSE2:=1
|
||||||
|
+ else
|
||||||
|
+ ifeq ($(DP_MACHINE),i686)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else
|
||||||
|
+ ifeq ($(DP_MACHINE),i386)
|
||||||
|
+ DP_SSE:=1
|
||||||
|
+ else
|
||||||
|
+ DP_SSE:=0
|
||||||
|
+ endif # ifeq ($(DP_MACHINE),i386)
|
||||||
|
+ endif # ifeq ($(DP_MACHINE),i686)
|
||||||
|
+ endif # ifeq ($(DP_MACHINE),x86_64)
|
||||||
|
+ endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Makefile name
|
||||||
|
--- a/quakedef.h 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/quakedef.h 2024-03-18 15:22:43.836666480 +0100
|
||||||
|
@@ -470,39 +470,44 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
-# if defined(__i386__)
|
||||||
|
-# define DP_ARCH_STR "686"
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
-# ifdef __SSE__
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# endif
|
||||||
|
-# ifdef __SSE2__
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-# endif
|
||||||
|
-# elif defined(__x86_64__)
|
||||||
|
-# define DP_ARCH_STR "x86_64"
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-# elif defined(__powerpc__)
|
||||||
|
-# define DP_ARCH_STR "ppc"
|
||||||
|
-# endif
|
||||||
|
-#elif defined(_WIN64)
|
||||||
|
-# define DP_ARCH_STR "x86_64"
|
||||||
|
-# define SSE_PRESENT
|
||||||
|
-# define SSE2_PRESENT
|
||||||
|
-#elif defined(WIN32)
|
||||||
|
-# define DP_ARCH_STR "x86"
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
+# if defined(__i386__) || defined(WIN32)
|
||||||
|
+# ifdef __SSE__
|
||||||
|
+# define SSE_POSSIBLE
|
||||||
|
+# endif
|
||||||
|
+# ifdef __SSE2__
|
||||||
|
+# define SSE2_POSSIBLE
|
||||||
|
+# endif
|
||||||
|
+# if defined(__i686__)
|
||||||
|
+# define DP_ARCH_STR "i686"
|
||||||
|
+# elif defined(__i586__)
|
||||||
|
+# define DP_ARCH_STR "i586"
|
||||||
|
+# elif defined(__i486__)
|
||||||
|
+# define DP_ARCH_STR "i486"
|
||||||
|
+# else
|
||||||
|
+# define DP_ARCH_STR "i386"
|
||||||
|
+# endif
|
||||||
|
+# elif defined(__amd64__) || defined(_WIN64)
|
||||||
|
+# define SSE_POSSIBLE
|
||||||
|
+# define SSE2_POSSIBLE
|
||||||
|
+# define DP_ARCH_STR "amd64"
|
||||||
|
+# elif defined(__powerpc64__)
|
||||||
|
+# define DP_ARCH_STR "ppc64"
|
||||||
|
+# elif defined(__arm64__)
|
||||||
|
+# define DP_ARCH_STR "arm64"
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
-#ifdef SSE_PRESENT
|
||||||
|
-# define SSE_POSSIBLE
|
||||||
|
+#ifdef SSE_POSSIBLE
|
||||||
|
+# define SSE_PRESENT
|
||||||
|
+#endif
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
+# define SSE2_PRESENT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_SSE
|
||||||
|
-# undef SSE_PRESENT
|
||||||
|
-# undef SSE_POSSIBLE
|
||||||
|
-# undef SSE2_PRESENT
|
||||||
|
+# undef SSE_PRESENT
|
||||||
|
+# undef SSE_POSSIBLE
|
||||||
|
+# undef SSE2_PRESENT
|
||||||
|
+# undef SSE2_POSSIBLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SSE_POSSIBLE
|
||||||
|
--- a/dpsoftrast.c 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/dpsoftrast.c 2024-03-18 18:51:30.696666431 +0100
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
#define ALIGN_SIZE 16
|
||||||
|
#define ATOMIC_SIZE 4
|
||||||
|
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#include <libkern/OSAtomic.h>
|
||||||
|
#define ALIGN(var) var __attribute__((__aligned__(16)))
|
||||||
|
@@ -84,7 +84,7 @@
|
||||||
|
#define ATOMIC_ADD(counter, val) ((void)((counter) += (val)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
#include <emmintrin.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (__GNUC < 4 || __GNUC_MINOR__ < 6) && !defined(__clang__)
|
||||||
|
@@ -1393,7 +1393,7 @@
|
||||||
|
}
|
||||||
|
void DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM uniform, int arraysize, int transpose, const float *v)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int i, index;
|
||||||
|
for (i = 0, index = (int)uniform;i < arraysize;i++, index += 4, v += 16)
|
||||||
|
{
|
||||||
|
@@ -1467,7 +1467,7 @@
|
||||||
|
command->clipplane[3] = w;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
static void DPSOFTRAST_Load4fTo4f(float *dst, const unsigned char *src, int size, int stride)
|
||||||
|
{
|
||||||
|
float *end = dst + size*4;
|
||||||
|
@@ -1663,7 +1663,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Vertex_Transform(float *out4f, const float *in4f, int numitems, const float *inmatrix16f)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
static const float identitymatrix16f[4][4] = {{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}};
|
||||||
|
__m128 m0, m1, m2, m3;
|
||||||
|
float *end;
|
||||||
|
@@ -1716,7 +1716,7 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
#define DPSOFTRAST_PROJECTVERTEX(out, in, viewportcenter, viewportscale) \
|
||||||
|
{ \
|
||||||
|
__m128 p = (in), w = _mm_shuffle_ps(p, p, _MM_SHUFFLE(3, 3, 3, 3)); \
|
||||||
|
@@ -1919,7 +1919,7 @@
|
||||||
|
|
||||||
|
static float *DPSOFTRAST_Array_Load(int outarray, int inarray)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
float *outf = dpsoftrast.post_array4f[outarray];
|
||||||
|
const unsigned char *inb;
|
||||||
|
int firstvertex = dpsoftrast.firstvertex;
|
||||||
|
@@ -1986,7 +1986,7 @@
|
||||||
|
#if 0
|
||||||
|
static float *DPSOFTRAST_Array_Project(int outarray, int inarray)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
float *data = inarray >= 0 ? DPSOFTRAST_Array_Load(outarray, inarray) : dpsoftrast.post_array4f[outarray];
|
||||||
|
dpsoftrast.drawclipped = DPSOFTRAST_Vertex_Project(data, dpsoftrast.screencoord4f, &dpsoftrast.drawstarty, &dpsoftrast.drawendy, data, dpsoftrast.numvertices);
|
||||||
|
return data;
|
||||||
|
@@ -1998,7 +1998,7 @@
|
||||||
|
|
||||||
|
static float *DPSOFTRAST_Array_TransformProject(int outarray, int inarray, const float *inmatrix16f)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
float *data = inarray >= 0 ? DPSOFTRAST_Array_Load(outarray, inarray) : dpsoftrast.post_array4f[outarray];
|
||||||
|
dpsoftrast.drawclipped = DPSOFTRAST_Vertex_TransformProject(data, dpsoftrast.screencoord4f, &dpsoftrast.drawstarty, &dpsoftrast.drawendy, data, dpsoftrast.numvertices, inmatrix16f);
|
||||||
|
return data;
|
||||||
|
@@ -2036,7 +2036,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_FinishBGRA8(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, const unsigned char* RESTRICT in4ub)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x;
|
||||||
|
int startx = span->startx;
|
||||||
|
int endx = span->endx;
|
||||||
|
@@ -2545,7 +2545,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_Texture2DVaryingBGRA8(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char * RESTRICT out4ub, int texunitindex, int arrayindex, const float * RESTRICT zf)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x;
|
||||||
|
int startx = span->startx;
|
||||||
|
int endx = span->endx;
|
||||||
|
@@ -2981,7 +2981,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_MultiplyVaryingBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *in4ub, int arrayindex, const float *zf)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x;
|
||||||
|
int startx = span->startx;
|
||||||
|
int endx = span->endx;
|
||||||
|
@@ -3028,7 +3028,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_VaryingBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, int arrayindex, const float *zf)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x;
|
||||||
|
int startx = span->startx;
|
||||||
|
int endx = span->endx;
|
||||||
|
@@ -3073,7 +3073,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_AddBloomBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *ina4ub, const unsigned char *inb4ub, const float *subcolor)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
__m128i localcolor = _mm_shuffle_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_loadu_ps(subcolor), _mm_set1_ps(255.0f))), _MM_SHUFFLE(3, 0, 1, 2));
|
||||||
|
localcolor = _mm_packs_epi32(localcolor, localcolor);
|
||||||
|
@@ -3096,7 +3096,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_MultiplyBuffersBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *ina4ub, const unsigned char *inb4ub)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
for (x = startx;x+2 <= endx;x+=2)
|
||||||
|
{
|
||||||
|
@@ -3117,7 +3117,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_AddBuffersBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *ina4ub, const unsigned char *inb4ub)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
for (x = startx;x+2 <= endx;x+=2)
|
||||||
|
{
|
||||||
|
@@ -3139,7 +3139,7 @@
|
||||||
|
#if 0
|
||||||
|
static void DPSOFTRAST_Draw_Span_TintedAddBuffersBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *ina4ub, const unsigned char *inb4ub, const float *inbtintbgra)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
__m128i tint = _mm_cvtps_epi32(_mm_mul_ps(_mm_loadu_ps(inbtintbgra), _mm_set1_ps(256.0f)));
|
||||||
|
tint = _mm_packs_epi32(tint, tint);
|
||||||
|
@@ -3163,7 +3163,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_MixBuffersBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *ina4ub, const unsigned char *inb4ub)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
for (x = startx;x+2 <= endx;x+=2)
|
||||||
|
{
|
||||||
|
@@ -3186,7 +3186,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Draw_Span_MixUniformColorBGRA8(const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span, unsigned char *out4ub, const unsigned char *in4ub, const float *color)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
__m128i localcolor = _mm_shuffle_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_loadu_ps(color), _mm_set1_ps(255.0f))), _MM_SHUFFLE(3, 0, 1, 2)), blend;
|
||||||
|
localcolor = _mm_packs_epi32(localcolor, localcolor);
|
||||||
|
@@ -3320,7 +3320,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_PixelShader_FlatColor(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
unsigned char * RESTRICT pixelmask = span->pixelmask;
|
||||||
|
unsigned char * RESTRICT pixel = (unsigned char *)dpsoftrast.fb_colorpixels[0] + (span->y * dpsoftrast.fb_width + span->x) * 4;
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
@@ -3371,7 +3371,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_PixelShader_VertexColor(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
unsigned char * RESTRICT pixelmask = span->pixelmask;
|
||||||
|
unsigned char * RESTRICT pixel = (unsigned char *)dpsoftrast.fb_colorpixels[0] + (span->y * dpsoftrast.fb_width + span->x) * 4;
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
@@ -3445,7 +3445,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_PixelShader_Lightmap(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
unsigned char * RESTRICT pixelmask = span->pixelmask;
|
||||||
|
unsigned char * RESTRICT pixel = (unsigned char *)dpsoftrast.fb_colorpixels[0] + (span->y * dpsoftrast.fb_width + span->x) * 4;
|
||||||
|
int x, startx = span->startx, endx = span->endx;
|
||||||
|
@@ -4139,7 +4139,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_PixelShader_LightSource(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
float buffer_z[DPSOFTRAST_DRAW_MAXSPANLENGTH];
|
||||||
|
unsigned char buffer_texture_colorbgra8[DPSOFTRAST_DRAW_MAXSPANLENGTH*4];
|
||||||
|
unsigned char buffer_texture_normalbgra8[DPSOFTRAST_DRAW_MAXSPANLENGTH*4];
|
||||||
|
@@ -4847,7 +4847,7 @@
|
||||||
|
|
||||||
|
static void DPSOFTRAST_Interpret_Draw(DPSOFTRAST_State_Thread *thread, DPSOFTRAST_Command_Draw *command)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
int cullface = thread->cullface;
|
||||||
|
int minx, maxx, miny, maxy;
|
||||||
|
int miny1, maxy1, miny2, maxy2;
|
||||||
|
--- a/vid_shared.c 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/vid_shared.c 2024-03-18 19:11:31.063333077 +0100
|
||||||
|
@@ -1729,16 +1729,11 @@
|
||||||
|
|
||||||
|
void VID_Shared_Init(void)
|
||||||
|
{
|
||||||
|
-#ifdef SSE_POSSIBLE
|
||||||
|
- if (Sys_HaveSSE2())
|
||||||
|
- {
|
||||||
|
- Con_Printf("DPSOFTRAST available (SSE2 instructions detected)\n");
|
||||||
|
- Cvar_RegisterVariable(&vid_soft);
|
||||||
|
- Cvar_RegisterVariable(&vid_soft_threads);
|
||||||
|
- Cvar_RegisterVariable(&vid_soft_interlace);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- Con_Printf("DPSOFTRAST not available (SSE2 disabled or not detected)\n");
|
||||||
|
+#ifdef SSE2_POSSIBLE
|
||||||
|
+ Con_Printf("DPSOFTRAST available (SSE2 instructions compiled in)\n");
|
||||||
|
+ Cvar_RegisterVariable(&vid_soft);
|
||||||
|
+ Cvar_RegisterVariable(&vid_soft_threads);
|
||||||
|
+ Cvar_RegisterVariable(&vid_soft_interlace);
|
||||||
|
#else
|
||||||
|
Con_Printf("DPSOFTRAST not available (SSE2 not compiled in)\n");
|
||||||
|
#endif
|
21
games-fps/quake15/files/0030-builddate-template.patch
Normal file
21
games-fps/quake15/files/0030-builddate-template.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--- a/builddate.c 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/builddate.c 2024-03-18 20:00:09.076666379 +0100
|
||||||
|
@@ -1,17 +1,2 @@
|
||||||
|
-#define STRINGIFY2(arg) #arg
|
||||||
|
-#define STRINGIFY(arg) STRINGIFY2(arg)
|
||||||
|
-
|
||||||
|
extern const char *buildstring;
|
||||||
|
-const char *buildstring =
|
||||||
|
-#ifndef NO_BUILD_TIMESTAMPS
|
||||||
|
-__TIME__ " " __DATE__ " "
|
||||||
|
-#endif
|
||||||
|
-#ifdef SVNREVISION
|
||||||
|
-STRINGIFY(SVNREVISION)
|
||||||
|
-#else
|
||||||
|
-"-"
|
||||||
|
-#endif
|
||||||
|
-#ifdef BUILDTYPE
|
||||||
|
-" " STRINGIFY(BUILDTYPE)
|
||||||
|
-#endif
|
||||||
|
-;
|
||||||
|
+const char *buildstring = "%{PVR}";
|
20
games-fps/quake15/files/0040-enforce-quake15.patch
Normal file
20
games-fps/quake15/files/0040-enforce-quake15.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/common.c 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/common.c 2024-03-31 14:46:25.586415464 +0200
|
||||||
|
@@ -1480,6 +1480,7 @@
|
||||||
|
{ GAME_STRAPBOMB, GAME_STRAPBOMB, "strapbomb", "-strapbomb", "Strap-on-bomb Car", "Strap-on-bomb_Car", "id1", NULL, "strap", "strapbomb" }, // COMMANDLINEOPTION: Game: -strapbomb runs the game Strap-on-bomb Car
|
||||||
|
{ GAME_MOONHELM, GAME_MOONHELM, "moonhelm", "-moonhelm", "MoonHelm", "MoonHelm", "data", NULL, "mh", "moonhelm" }, // COMMANDLINEOPTION: Game: -moonhelm runs the game MoonHelm
|
||||||
|
{ GAME_VORETOURNAMENT, GAME_VORETOURNAMENT, "voretournament", "-voretournament", "Vore Tournament", "Vore_Tournament", "data", NULL, "voretournament", "voretournament" }, // COMMANDLINEOPTION: Game: -voretournament runs the multiplayer game Vore Tournament
|
||||||
|
+{ GAME_QUAKE15, GAME_NORMAL, "quake15", "-quake15", "Quake 1.5", "Quake 1.5", "id1", "quake15", "q15", "quake15"}, // COMMANDLINEOPTION: Game: -quake15 runs the game Quake 1.5
|
||||||
|
};
|
||||||
|
|
||||||
|
static void COM_SetGameType(int index);
|
||||||
|
--- a/common.h 2017-08-30 06:29:14.000000000 +0200
|
||||||
|
+++ b/common.h 2024-03-31 14:46:50.596414296 +0200
|
||||||
|
@@ -298,6 +298,7 @@
|
||||||
|
GAME_STRAPBOMB, // added by motorsep for Urre
|
||||||
|
GAME_MOONHELM,
|
||||||
|
GAME_VORETOURNAMENT,
|
||||||
|
+ GAME_QUAKE15,
|
||||||
|
GAME_COUNT
|
||||||
|
}
|
||||||
|
gamemode_t;
|
@ -1,4 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>moog621@gmail.com</email>
|
||||||
|
<name>Michał Dec</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="capture">Adds support for video capture with media-libs/libtheora</flag>
|
||||||
|
<flag name="textures">Install and setup the updated textures</flag>
|
||||||
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">DarkPlacesEngine/darkplaces</remote-id>
|
||||||
|
</upstream>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
252
games-fps/quake15/quake15-0_beta2-r1.ebuild
Normal file
252
games-fps/quake15/quake15-0_beta2-r1.ebuild
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit flag-o-matic unpacker desktop
|
||||||
|
|
||||||
|
# This is the only known version of the engine to work with this mod
|
||||||
|
ENGINE_PV="20170829_beta1"
|
||||||
|
ENGINE_SOURCE="darkplacesenginesource${ENGINE_PV}.tar.gz"
|
||||||
|
|
||||||
|
DESCRIPTION="A mod that makes Quake faster paced, harder, gorier and more violent."
|
||||||
|
HOMEPAGE="https://www.moddb.com/mods/quake-15 https://icculus.org/twilight/darkplaces"
|
||||||
|
GIT_COMMIT="175af02fa8e6bc5c14ebac952c6925f9328c2348"
|
||||||
|
SRC_URI="
|
||||||
|
https://github.com/DarkPlacesEngine/darkplaces/archive/${GIT_COMMIT}.tar.gz -> "${ENGINE_SOURCE}"
|
||||||
|
https://archive.org/download/quake15-mirror/Q15_PublicBeta1.7z
|
||||||
|
https://archive.org/download/quake15-mirror/patch2.7z -> Q15_patch2.7z
|
||||||
|
https://icculus.org/%7Emarco/sources/lmp2tga.c
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="GPL-2 UNKNOWN"
|
||||||
|
SLOT="0"
|
||||||
|
# DarkPlaces' PNG is broken on big endian and this mod unfortunately uses PNG a lot. Sorry :(
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||||
|
IUSE="alsa capture cdda cpu_flags_x86_sse cpu_flags_x86_sse2 debug dedicated ipv6 opengl oss sdl textures"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
alsa? ( !oss )
|
||||||
|
oss? ( !alsa )
|
||||||
|
|| ( alsa oss sdl )
|
||||||
|
^^ ( opengl sdl )
|
||||||
|
amd64? (
|
||||||
|
cpu_flags_x86_sse
|
||||||
|
cpu_flags_x86_sse2
|
||||||
|
)
|
||||||
|
"
|
||||||
|
GLX_RDEPEND="
|
||||||
|
x11-libs/libX11
|
||||||
|
x11-libs/libXpm
|
||||||
|
x11-libs/libXext
|
||||||
|
x11-libs/libXxf86vm
|
||||||
|
virtual/opengl
|
||||||
|
alsa? ( media-libs/alsa-lib )
|
||||||
|
media-libs/libogg
|
||||||
|
media-libs/libvorbis
|
||||||
|
capture? ( media-libs/libtheora[encode] )
|
||||||
|
!capture? ( media-libs/libtheora )
|
||||||
|
"
|
||||||
|
SDL_RDEPEND="
|
||||||
|
media-libs/libsdl2[udev]
|
||||||
|
x11-libs/libX11
|
||||||
|
alsa? ( media-libs/alsa-lib )
|
||||||
|
media-libs/libogg
|
||||||
|
media-libs/libvorbis
|
||||||
|
capture? ( media-libs/libtheora[encode] )
|
||||||
|
!capture? ( media-libs/libtheora )
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/d0_blind_id
|
||||||
|
dev-games/ode
|
||||||
|
net-misc/curl
|
||||||
|
media-libs/libjpeg-turbo
|
||||||
|
sys-libs/zlib
|
||||||
|
media-libs/libpng
|
||||||
|
textures? ( >=games-fps/quake1-textures-20050820 )
|
||||||
|
opengl? ( ${GLX_RDEPEND} )
|
||||||
|
sdl? ( ${SDL_RDEPEND} )
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
opengl? (
|
||||||
|
sys-devel/gcc
|
||||||
|
media-gfx/imagemagick
|
||||||
|
app-arch/unzip
|
||||||
|
)
|
||||||
|
sdl? (
|
||||||
|
sys-devel/gcc
|
||||||
|
media-gfx/imagemagick
|
||||||
|
app-arch/unzip
|
||||||
|
)
|
||||||
|
app-arch/p7zip
|
||||||
|
app-alternatives/tar
|
||||||
|
app-alternatives/gzip
|
||||||
|
sys-apps/coreutils
|
||||||
|
sys-devel/patch
|
||||||
|
sys-apps/sed
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
S="${WORKDIR}"
|
||||||
|
WAD_DIR="/usr/share/quake15"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
mkdir engine
|
||||||
|
tar -C engine --strip-components 1 -xf "${DISTDIR}/${ENGINE_SOURCE}"
|
||||||
|
7z x "${DISTDIR}/Q15_PublicBeta1.7z" quake15
|
||||||
|
7z x -y "${DISTDIR}/Q15_patch2.7z" quake15
|
||||||
|
ln -s /usr/share/quake1/id1/sound quake15/sound
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
cd "${S}/engine"
|
||||||
|
rm mingw_note.txt
|
||||||
|
strip-flags
|
||||||
|
patch -p1 -i "${FILESDIR}/0010-fix-dpsoftras-alignment.patch"
|
||||||
|
patch -p1 -i "${FILESDIR}/0020-do-not-assume-sse2-is-available-just-because-sse-is-available.patch"
|
||||||
|
# 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 cdda; then
|
||||||
|
elog "CD support: disabled"
|
||||||
|
sed -i \
|
||||||
|
-e "s:/dev/cdrom:/dev/null:" \
|
||||||
|
cd_linux.c || die
|
||||||
|
sed -i \
|
||||||
|
-e 's:COM_CheckParm("-nocdaudio"):1:' \
|
||||||
|
cd_shared.c || die
|
||||||
|
else
|
||||||
|
elog "CD support: enabled"
|
||||||
|
fi
|
||||||
|
if ! use ipv6; then
|
||||||
|
elog "IPv6 support: disabled"
|
||||||
|
sed -i 's/^#\(CFLAGS_NET+=-DNOSUPPORTIPV6\)$/\1/' makefile || die
|
||||||
|
else
|
||||||
|
elog "IPv6 support: enabled"
|
||||||
|
fi
|
||||||
|
patch -p1 -i "${FILESDIR}/0030-builddate-template.patch"
|
||||||
|
sed -i "s/%{PVR}/${ENGINE_PV}/" builddate.c || die
|
||||||
|
patch -p1 -i "${FILESDIR}/0040-enforce-quake15.patch"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local video_capture="disabled"
|
||||||
|
if use capture; then
|
||||||
|
elog "Video capture: enabled"
|
||||||
|
video_capture="enabled"
|
||||||
|
else
|
||||||
|
elog "Video capture: disabled"
|
||||||
|
fi
|
||||||
|
local sse_enabled=0
|
||||||
|
local sse2_enabled=0
|
||||||
|
if use cpu_flags_x86_sse; then
|
||||||
|
elog "Skeletal animations: uses SSE"
|
||||||
|
sse_enabled=1
|
||||||
|
else
|
||||||
|
if use amd64; then
|
||||||
|
elog "Skeletal animations: uses SSE, not disabling on AMD64"
|
||||||
|
sse_enabled=1
|
||||||
|
else
|
||||||
|
elog "Skeletal animations: uses generic code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if use cpu_flags_x86_sse2; then
|
||||||
|
elog "Softrender: uses SSE2"
|
||||||
|
sse2_enabled=1
|
||||||
|
else
|
||||||
|
if use amd64; then
|
||||||
|
elog "Softrender: uses SSE2, not disabling on AMD64"
|
||||||
|
sse2_enabled=1
|
||||||
|
else
|
||||||
|
elog "Softrender: disabled"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
local opts="DP_FS_BASEDIR=\"${WAD_DIR}\" \
|
||||||
|
DP_LINK_JPEG=shared \
|
||||||
|
DP_LINK_CRYPTO=shared \
|
||||||
|
DP_LINK_CRYPTO_RIJNDAEL=shared \
|
||||||
|
DP_LINK_ZLIB=shared \
|
||||||
|
DP_LINK_ODE=shared \
|
||||||
|
DP_VIDEO_CAPTURE=${video_capture} \
|
||||||
|
DP_PRELOAD_DEPENDENCIES=1 \
|
||||||
|
GENTOO_BUILD=1 \
|
||||||
|
DP_SSE=${sse_enabled} \
|
||||||
|
DP_SSE2=${sse2_enabled} \
|
||||||
|
FORCEGAME=quake15"
|
||||||
|
# If neither OSS or ALSA are selected, then SDL must be selected.
|
||||||
|
# However, SDL is a backend for both graphics and sound - so not
|
||||||
|
# having ALSA or OSS is only an option, if OpenGL is not.
|
||||||
|
local sound_api="NULL"
|
||||||
|
if use oss; then
|
||||||
|
sound_api="OSS"
|
||||||
|
elif use alsa; then
|
||||||
|
sound_api="ALSA"
|
||||||
|
elif ! use sdl; then
|
||||||
|
die "No sound API has been selected."
|
||||||
|
fi
|
||||||
|
opts+=" DP_SOUND_API=${sound_api}"
|
||||||
|
local type="release"
|
||||||
|
if use debug; then
|
||||||
|
type="debug"
|
||||||
|
fi
|
||||||
|
ln -s /usr/share/quake1/id1 id1
|
||||||
|
# Only compile a maximum of 1 client
|
||||||
|
pushd "${WORKDIR}/engine"
|
||||||
|
local compile_client=false
|
||||||
|
if use sdl; then
|
||||||
|
compile_client=true
|
||||||
|
emake ${opts} "sdl-${type}"
|
||||||
|
elif use opengl; then
|
||||||
|
compile_client=true
|
||||||
|
emake ${opts} "cl-${type}"
|
||||||
|
fi
|
||||||
|
if use dedicated; then
|
||||||
|
emake ${opts} "sv-${type}"
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
if ${compile_client}; then
|
||||||
|
pushd "${WORKDIR}"
|
||||||
|
unzip -j quake15/q15.pk3 gfx/qplaque.lmp
|
||||||
|
gcc "${DISTDIR}/lmp2tga.c" -o lmp2tga
|
||||||
|
./lmp2tga qplaque.lmp
|
||||||
|
convert qplaque.tga -gravity North -chop 0x112 "${WORKDIR}/engine/${PN}.png"
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
pushd "${WORKDIR}/engine"
|
||||||
|
if use opengl || use sdl ; then
|
||||||
|
local type=$(use sdl && echo "sdl" || echo "glx")
|
||||||
|
newbin "darkplaces-${type}" ${PN}
|
||||||
|
newicon ${PN}.png ${PN}.png
|
||||||
|
make_desktop_entry ${PN} "Quake 1.5"
|
||||||
|
fi
|
||||||
|
if use dedicated; then
|
||||||
|
newbin darkplaces-dedicated ${PN}-ded
|
||||||
|
fi
|
||||||
|
dodoc *.txt todo "${WORKDIR}"/engine/*.txt
|
||||||
|
popd
|
||||||
|
insinto "${WAD_DIR}"
|
||||||
|
doins id1
|
||||||
|
doins -r quake15
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
elog "Please make sure that the path /usr/share/quake1/id1 exists and place pak0.pak and pak1.pak in /usr/share/quake1/id1"
|
||||||
|
if use cdda; then
|
||||||
|
elog "If you wish to have the original soundtrack available without playing from an optical drive, please make sure that the path /usr/share/quake1/id1/sound/cdtracks exists, and that it contains the original soundtrack. The expected filename schema is track%i.%s with a double-digit count, either in WAV RIFF or OGG Vorbis format."
|
||||||
|
fi
|
||||||
|
if use sdl && ! use alsa; then
|
||||||
|
einfo "If audio latency is an issue, consider choosing OpenGL and ALSA USE flags instead of SDL."
|
||||||
|
fi
|
||||||
|
}
|
@ -1,32 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
DESCRIPTION="A mod that makes Quake faster paced, harder, gorier and more violent."
|
|
||||||
HOMEPAGE="https://www.moddb.com/mods/quake-15"
|
|
||||||
SRC_URI="
|
|
||||||
https://www.moddb.com/downloads/mirror/173517/114/5090a373c5249e55e509808983481a04 -> Q15_PublicBeta1.7z
|
|
||||||
https://www.moddb.com/downloads/mirror/173707/114/f7627345043efdfcd9e27d4906a382ac -> Q15_patch2.7z
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="HPND"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
|
|
||||||
|
|
||||||
RDEPEND=">=games-fps/darkplaces-20170829_beta1"
|
|
||||||
DEPEND="app-arch/p7zip"
|
|
||||||
|
|
||||||
S="${WORKDIR}"
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
insinto "/usr/share/quake1"
|
|
||||||
doins -r quake15
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
echo
|
|
||||||
elog "In order to play this mod run Quake with -game option:"
|
|
||||||
elog " darkplaces -game quake15"
|
|
||||||
echo
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user