summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD42
-rw-r--r--math.patch39
-rw-r--r--sound.patch12
5 files changed, 101 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4a9ad1846fd..04955e500382 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,8 @@
-# Generated by mksrcinfo v8
-# Sun Feb 4 22:34:43 UTC 2018
pkgbase = doom3
pkgdesc = Doom 3 Engine. You need the retail .pk4 files to play.
pkgver = 1.3.1.1304
- pkgrel = 12
- url = http://www.doom3.com/
+ pkgrel = 13
+ url = https://doom.com/
install = doom3.install
arch = i686
arch = x86_64
@@ -20,6 +18,8 @@ pkgbase = doom3
source = doom3.launcher64
source = doom3-dedicated.launcher64
source = doom3.png
+ source = sound.patch
+ source = math.patch
source = http://www.gamers.org/pub/idgames/idstuff/source/idtech4-doom3-source-GPL.zip
source = http://www.gamers.org/pub/idgames/idstuff/doom3/linux/doom3-linux-1.3.1.1304.x86.run
sha256sums = ea9fe17fdb19cfe8a22e2b7859093f7a76eeaa51fd2571507b6dc37462515f21
@@ -28,8 +28,29 @@ pkgbase = doom3
sha256sums = 718378f2c3c42d56b916e9341e01261a2cfad5fb60ef15cc57954d1a4ce2a94e
sha256sums = e6654e29773b5ed01f897294ecbc21a84dcb59afc30cb60eb0d5a3c03c7d3de1
sha256sums = c9a701498a7b0f923182bf9f11aac8d2193026e509ae3643a5bc118b1a458c6b
+ sha256sums = a407c385c2a0a013c2bc464fd590e2b976f337e3ee04d769b238168bb5610f76
+ sha256sums = ac0abb77d44ceb28d7dbe40e2187ee5bc81a8a0314c7f08af17aea7156b6bf3c
sha256sums = 18b5e0b5dcbdce60e5f006e7995bc30c9ef7f606c2aa08c5f0a76eb6a6657ad0
sha256sums = 2f90dff20f2d3c0c47f17b3d6d45c4f0e7d27b986bf6084f21b85180cd1e03b4
+ depends_i686 = libgl
+ depends_i686 = alsa-lib
+ depends_i686 = openal
+ depends_i686 = libxxf86vm
+ depends_i686 = libstdc++5
+ optdepends_i686 = alsa-plugins: pulseaudio-support
+ optdepends_i686 = libpulse: pulseaudio support
+ makedepends_i686 = python2-scons
+ makedepends_i686 = zip
+ depends_x86_64 = lib32-libgl
+ depends_x86_64 = lib32-alsa-lib
+ depends_x86_64 = lib32-openal
+ depends_x86_64 = lib32-libxxf86vm
+ depends_x86_64 = lib32-libstdc++5
+ optdepends_x86_64 = lib32-alsa-plugins: pulseaudio-support
+ optdepends_x86_64 = lib32-libpulse: pulseaudio support
+ makedepends_x86_64 = python2-scons
+ makedepends_x86_64 = gcc-multilib
+ makedepends_x86_64 = zip
pkgname = doom3
diff --git a/.gitignore b/.gitignore
index 45886f85272d..279e1ded6a99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
+src/
+pkg/
+*.tar.zst
doom3-linux-1.3.1.1304.x86.run
idtech4-doom3-source-GPL.zip
diff --git a/PKGBUILD b/PKGBUILD
index 4acc553f9d2b..d087d96daafd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,30 +6,26 @@
pkgname=doom3
pkgver=1.3.1.1304
-pkgrel=12
+pkgrel=13
pkgdesc='Doom 3 Engine. You need the retail .pk4 files to play.'
-url='http://www.doom3.com/'
+url='https://doom.com/'
license=('custom:"DOOM 3"')
arch=('i686' 'x86_64')
-if [ "$CARCH" = "i686" ]; then
- depends=('libgl' 'alsa-lib' 'openal' 'libxxf86vm' 'libstdc++5')
- makedepends=('scons' 'zip')
- optdepends=(
- 'alsa-plugins: pulseaudio-support'
- 'libpulse: pulseaudio support'
- )
-fi
-if [ "$CARCH" = "x86_64" ]; then
- depends=('lib32-libgl' 'lib32-alsa-lib' 'lib32-openal' 'lib32-libxxf86vm' 'lib32-libstdc++5')
- makedepends=('scons' 'gcc-multilib' 'zip')
- optdepends=(
- 'lib32-alsa-plugins: pulseaudio-support'
- 'lib32-libpulse: pulseaudio support'
- )
-fi
+depends_i686=('libgl' 'alsa-lib' 'openal' 'libxxf86vm' 'libstdc++5')
+makedepends_i686=('python2-scons' 'zip')
+optdepends_i686=(
+ 'alsa-plugins: pulseaudio-support'
+ 'libpulse: pulseaudio support'
+)
+depends_x86_64=('lib32-libgl' 'lib32-alsa-lib' 'lib32-openal' 'lib32-libxxf86vm' 'lib32-libstdc++5')
+makedepends_x86_64=('python2-scons' 'gcc-multilib' 'zip')
+optdepends_x86_64=(
+ 'lib32-alsa-plugins: pulseaudio-support'
+ 'lib32-libpulse: pulseaudio support'
+)
install=doom3.install
source=('doom3.launcher' 'doom3-dedicated.launcher' 'doom3.desktop' \
- 'doom3.launcher64' 'doom3-dedicated.launcher64' 'doom3.png' \
+ 'doom3.launcher64' 'doom3-dedicated.launcher64' 'doom3.png' 'sound.patch' 'math.patch' \
'http://www.gamers.org/pub/idgames/idstuff/source/idtech4-doom3-source-GPL.zip' \
"http://www.gamers.org/pub/idgames/idstuff/doom3/linux/${pkgname}-linux-${pkgver}.x86.run")
provides=('doom3')
@@ -40,14 +36,20 @@ sha256sums=('ea9fe17fdb19cfe8a22e2b7859093f7a76eeaa51fd2571507b6dc37462515f21'
'718378f2c3c42d56b916e9341e01261a2cfad5fb60ef15cc57954d1a4ce2a94e'
'e6654e29773b5ed01f897294ecbc21a84dcb59afc30cb60eb0d5a3c03c7d3de1'
'c9a701498a7b0f923182bf9f11aac8d2193026e509ae3643a5bc118b1a458c6b'
+ 'a407c385c2a0a013c2bc464fd590e2b976f337e3ee04d769b238168bb5610f76'
+ 'ac0abb77d44ceb28d7dbe40e2187ee5bc81a8a0314c7f08af17aea7156b6bf3c'
'18b5e0b5dcbdce60e5f006e7995bc30c9ef7f606c2aa08c5f0a76eb6a6657ad0'
'2f90dff20f2d3c0c47f17b3d6d45c4f0e7d27b986bf6084f21b85180cd1e03b4')
build() {
cd "${srcdir}/doom3.gpl/neo"
+ # Apply patches
+ patch -p3 -i "${srcdir}/sound.patch"
+ patch -p3 -i "${srcdir}/math.patch"
+
# Build Binaries from Source
- scons NOCURL=1 BUILD=release BUILD_GAMEPAK=1
+ scons2 NOCURL=1 BUILD=release BUILD_GAMEPAK=1
cd "${srcdir}"
diff --git a/math.patch b/math.patch
new file mode 100644
index 000000000000..327fff8f654a
--- /dev/null
+++ b/math.patch
@@ -0,0 +1,39 @@
+diff -ur src/doom3.gpl/neo/tools/compilers/roqvq/codec.cpp src.new/doom3.gpl/neo/tools/compilers/roqvq/codec.cpp
+--- src/doom3.gpl/neo/tools/compilers/roqvq/codec.cpp 2011-11-22 13:15:52.000000000 -0500
++++ src.new/doom3.gpl/neo/tools/compilers/roqvq/codec.cpp 2021-03-28 11:26:37.968295020 -0400
+@@ -321,7 +321,7 @@
+ int codec::BestCodeword( unsigned char *tempvector, int dimension, VQDATA **codebook )
+ {
+ VQDATA dist;
+- VQDATA bestDist = HUGE;
++ VQDATA bestDist = HUGE_VAL;
+ VQDATA tempvq[64];
+ int bestIndex = -1;
+
+@@ -1510,7 +1510,7 @@
+ //
+ // find the closest two and eliminate one
+ //
+- double bestDist = HUGE;
++ double bestDist = HUGE_VAL;
+ double dist, simport;
+ int bestIndex = -1;
+ int bestOtherIndex = 0;
+@@ -1576,7 +1576,7 @@
+ // until we have reduced it to 256 entries, find one to toss
+ //
+ do {
+- bestDist = HUGE;
++ bestDist = HUGE_VAL;
+ bestIndex = -1;
+ bestOtherIndex = -1;
+ if (optimize) {
+@@ -1591,7 +1591,7 @@
+ }
+ }
+ if (bestIndex == -1 || !optimize) {
+- bestDist = HUGE;
++ bestDist = HUGE_VAL;
+ bestIndex = -1;
+ bestOtherIndex = 0;
+ aentries = 0;
diff --git a/sound.patch b/sound.patch
new file mode 100644
index 000000000000..c27fd10dc866
--- /dev/null
+++ b/sound.patch
@@ -0,0 +1,12 @@
+diff -ur src/doom3.gpl/neo/sys/linux/sound.cpp src.new/doom3.gpl/neo/sys/linux/sound.cpp
+--- src/doom3.gpl/neo/sys/linux/sound.cpp 2011-11-22 13:15:52.000000000 -0500
++++ src.new/doom3.gpl/neo/sys/linux/sound.cpp 2021-03-28 11:16:43.267629805 -0400
+@@ -279,7 +279,7 @@
+ }
+ // instead of an exact match, do a very close to
+ // there is some horrible Ensonic ES1371 which replies 44101 for a 44100 request
+- if ( abs( m_speed - PRIMARYFREQ ) > 5 ) {
++ if ( abs( (double) (m_speed - PRIMARYFREQ) ) > 5 ) {
+ common->Warning( "ioctl SNDCTL_DSP_SPEED failed to get the requested frequency %d, got %d", PRIMARYFREQ, m_speed );
+ InitFailed();
+ return false;