summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorMike Swanson <mikeonthecomputer@gmail.com>2023-05-10 16:01:05 -0700
committerAndrew Kaster <andrewdkaster@gmail.com>2023-05-13 17:52:58 -0600
commit041e29e58560a3f78bf68a08caf66a4b20b81088 (patch)
treec3cd62d28461149ab6057cda3011f86bba285f02 /Ports
parentf947c4f4fccd214bc5b3a9b938bc2540769df4cb (diff)
downloadserenity-041e29e58560a3f78bf68a08caf66a4b20b81088.zip
Ports: Add chocolate-doom 3.0.1
Diffstat (limited to 'Ports')
-rw-r--r--Ports/AvailablePorts.md1
-rwxr-xr-xPorts/chocolate-doom/package.sh20
-rw-r--r--Ports/chocolate-doom/patches/0001-Remove-redundant-demoextend-definition.patch25
-rw-r--r--Ports/chocolate-doom/patches/ReadMe.md11
4 files changed, 57 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 9715820477..ae84fde131 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -33,6 +33,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`ccache`](ccache/) | ccache | 4.6.3 | https://ccache.dev/ |
| [`cfunge`](cfunge/) | cfunge | 2bc4fb2 | https://github.com/VorpalBlade/cfunge/ |
| [`chester`](chester/) | Chester Gameboy Emulator | | https://github.com/veikkos/chester |
+| [`chocolate-doom`](chocolate-doom/) | Chocolate Doom | 3.0.1 | https://www.chocolate-doom.org/ |
| [`citron`](citron/) | Citron Programming Language | 0.0.9.3 | https://github.com/alimpfard/citron |
| [`ClassiCube`](ClassiCube/) | ClassiCube | 1.3.3 | https://github.com/UnknownShadow200/ClassiCube |
| [`cmake`](cmake/) | CMake | 3.26.1 | https://cmake.org/ |
diff --git a/Ports/chocolate-doom/package.sh b/Ports/chocolate-doom/package.sh
new file mode 100755
index 0000000000..cb5cc33964
--- /dev/null
+++ b/Ports/chocolate-doom/package.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port='chocolate-doom'
+version='3.0.1'
+useconfigure='true'
+use_fresh_config_sub='true'
+config_sub_paths=('autotools/config.sub')
+files="https://www.chocolate-doom.org/downloads/${version}/chocolate-doom-${version}.tar.gz chocolate-doom-${version}.tar.gz d435d6177423491d60be706da9f07d3ab4fabf3e077ec2a3fc216e394fcfc8c7"
+auth_type='sha256'
+depends=(
+ 'libpng'
+ 'libsamplerate'
+ 'SDL2'
+ 'SDL2_mixer'
+ 'SDL2_net'
+)
+
+launcher_name='Chocolate Doom'
+launcher_category='Games'
+launcher_command='/usr/local/bin/chocolate-doom'
+icon_file='data/doom.png'
diff --git a/Ports/chocolate-doom/patches/0001-Remove-redundant-demoextend-definition.patch b/Ports/chocolate-doom/patches/0001-Remove-redundant-demoextend-definition.patch
new file mode 100644
index 0000000000..1f201debb5
--- /dev/null
+++ b/Ports/chocolate-doom/patches/0001-Remove-redundant-demoextend-definition.patch
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jordan Christiansen <xordspar0@gmail.com>
+Date: Sun, 15 Mar 2020 16:55:33 -0500
+Subject: [PATCH] Remove redundant demoextend definition
+
+GCC 10 enables -fno-common by default, which causes the linker to fail when
+there are multple definitions of a global variable.
+
+See https://gcc.gnu.org/gcc-10/porting_to.html
+---
+ src/hexen/mn_menu.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
+index a3ff999801b657a6dca4d1e62489d65bafe4e091..b9ad45eea7c915a4066edabff1c12cead2a6ae76 100644
+--- a/src/hexen/mn_menu.c
++++ b/src/hexen/mn_menu.c
+@@ -131,7 +131,6 @@ boolean MenuActive;
+ int InfoType;
+ int messageson = true;
+ boolean mn_SuicideConsole;
+-boolean demoextend; // from h2def.h
+
+ // PRIVATE DATA DEFINITIONS ------------------------------------------------
+
diff --git a/Ports/chocolate-doom/patches/ReadMe.md b/Ports/chocolate-doom/patches/ReadMe.md
new file mode 100644
index 0000000000..487156d7b2
--- /dev/null
+++ b/Ports/chocolate-doom/patches/ReadMe.md
@@ -0,0 +1,11 @@
+# Patches for chocolate-doom on SerenityOS
+
+## `0001-Remove-redundant-demoextend-definition.patch`
+
+Remove redundant demoextend definition
+
+GCC 10 enables -fno-common by default, which causes the linker to fail when
+there are multple definitions of a global variable.
+
+See https://gcc.gnu.org/gcc-10/porting_to.html
+