summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorPavel Safar <safar.pavel@gmail.com>2021-06-07 14:26:26 +0200
committerLinus Groh <mail@linusgroh.de>2021-06-14 12:19:54 +0100
commitc38f051bf7a1b8846dce9314c0105a8558175938 (patch)
treeee9d9b52556dd737b4ba96f676b102b635f9b96b /Ports
parentb07b890ce41baadc1a305dd98f44bf7f25b6d818 (diff)
downloadserenity-c38f051bf7a1b8846dce9314c0105a8558175938.zip
Ports: Adds Another World VM interpreter implementation
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/Another-World/package.sh22
-rw-r--r--Ports/Another-World/patches/fix_cmakelists.patch15
-rw-r--r--Ports/AvailablePorts.md1
3 files changed, 38 insertions, 0 deletions
diff --git a/Ports/Another-World/package.sh b/Ports/Another-World/package.sh
new file mode 100755
index 0000000000..01f23b74d3
--- /dev/null
+++ b/Ports/Another-World/package.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=Another-World
+useconfigure=true
+version=git
+depends="SDL2 zlib"
+workdir=Another-World-Bytecode-Interpreter-master
+configopts="-DCMAKE_TOOLCHAIN_FILE=${SERENITY_SOURCE_DIR}/Toolchain/CMake/CMakeToolchain.txt -DSDL2_INCLUDE_DIR=${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2"
+files="https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter/archive/refs/heads/master.zip master.zip 326de7622e5f83a83fce76e6032240157a9dde83c0d65319095c7e0b312af317"
+auth_type=sha256
+launcher_name="Another World"
+launcher_category=Games
+launcher_command="/opt/Another-World/raw --datapath=/opt/Another-World"
+
+configure() {
+ run cmake $configopts
+}
+
+install() {
+ run mkdir -p "${SERENITY_INSTALL_ROOT}/opt/Another-World"
+ run cp -r raw "${SERENITY_INSTALL_ROOT}/opt/Another-World"
+ echo "INFO: Copy BANK* and MEMLIST.BIN files from MS-DOS distribution of the game to the /opt/Another_World directory"
+}
diff --git a/Ports/Another-World/patches/fix_cmakelists.patch b/Ports/Another-World/patches/fix_cmakelists.patch
new file mode 100644
index 0000000000..c1158b184b
--- /dev/null
+++ b/Ports/Another-World/patches/fix_cmakelists.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 38f6ba8..d56ca64 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,8 +24,7 @@ add_executable(raw
+ src/vm.cpp
+ )
+
+-find_package(SDL2 REQUIRED)
+-include_directories(${SDL2_INCLUDE_DIRS})
+-target_link_libraries(raw ${SDL2_LIBRARIES})
++include_directories(${SDL2_INCLUDE_DIR})
++target_link_libraries(raw SDL2)
+ target_link_libraries(raw z)
+
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 2f4062f0f0..839138fdc6 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -4,6 +4,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| Port | Name | Version | Website |
|----------------------------------------|------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------|
+| [`Another-World`](Another-World/) | Another World Bytecode Interpreter | | https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter |
| [`bash`](bash/) | GNU Bash | 5.0 | https://www.gnu.org/software/bash/ |
| [`bass`](bass/) | Beneath a Steel Sky | cd-1.2 | https://www.scummvm.org/games |
| [`bc`](bc/) | bc | 2.5.1 | https://github.com/gavinhoward/bc |