2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
2022-04-01 00:53:19 +00:00
# Copyright (C) 2021-present Fewtarius
2022-02-05 14:23:32 +00:00
PKG_NAME = "ecwolf"
2022-07-28 15:07:14 +00:00
PKG_VERSION = "e66f5564b9b382bd8a796b4b21384ac6c1356833"
2022-02-05 14:23:32 +00:00
PKG_LICENSE = "GPLv2"
PKG_SITE = "https://bitbucket.org/ecwolf/ecwolf"
2022-04-01 00:53:19 +00:00
PKG_URL = " ${ PKG_SITE } .git "
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET = "toolchain SDL2 SDL2_mixer SDL2_net ecwolf:host"
PKG_LONGDESC = "ECWolf is a port of the Wolfenstein 3D engine based of Wolf4SDL. It combines the original Wolfenstein 3D engine with the user experience of ZDoom to create the most user and mod author friendly Wolf3D source port."
PKG_TOOLCHAIN = "cmake-make"
GET_HANDLER_SUPPORT = "git"
p r e _ p a t c h ( ) {
find $( echo " ${ PKG_BUILD } " | cut -f1 -d\ ) -type f -exec dos2unix -q { } \;
}
p r e _ b u i l d _ h o s t ( ) {
HOST_CMAKE_OPTS = ""
}
m a k e _ h o s t ( ) {
cmake . -DNO_GTK= ON
make
}
m a k e i n s t a l l _ h o s t ( ) {
: #no
}
p r e _ c o n f i g u r e _ t a r g e t ( ) {
PKG_CMAKE_OPTS_TARGET = " -DNO_GTK=ON \
-DFORCE_CROSSCOMPILE= ON \
2022-04-01 00:53:19 +00:00
-DIMPORT_EXECUTABLES= ${ PKG_BUILD } /.${ HOST_NAME } /ImportExecutables.cmake
2022-02-05 14:23:32 +00:00
-DCMAKE_BUILD_TYPE= Release"
2022-04-01 00:53:19 +00:00
cd ${ PKG_BUILD } /deps/gdtoa
2022-02-05 14:23:32 +00:00
$HOST_CC -o rithchk arithchk.c -Wall -Wextra
2022-04-01 00:53:19 +00:00
./rithchk > ${ PKG_BUILD } /deps/gdtoa/arith.h
2022-02-05 14:23:32 +00:00
$HOST_CC -o qnan qnan.c -Wall -Wextra
2022-04-01 00:53:19 +00:00
./qnan > ${ PKG_BUILD } /deps/gdtoa/gd_qnan.h
cd ${ PKG_BUILD }
2022-02-05 14:23:32 +00:00
}
m a k e i n s t a l l _ t a r g e t ( ) {
2022-04-01 00:53:19 +00:00
mkdir -p ${ INSTALL } /usr/bin
cp ${ PKG_BUILD } /ecwolf ${ INSTALL } /usr/bin/
2022-04-01 01:29:37 +00:00
cp ${ PKG_DIR } /sources/start_ecwolf.sh ${ INSTALL } /usr/bin/
2022-04-01 00:53:19 +00:00
chmod 0755 ${ INSTALL } /usr/bin/*
mkdir -p ${ INSTALL } /usr/config/game/ecwolf
cp ${ PKG_BUILD } /ecwolf.pk3 ${ INSTALL } /usr/config/game/ecwolf/
cp ${ PKG_DIR } /config/* ${ INSTALL } /usr/config/game/ecwolf/
2022-02-05 14:23:32 +00:00
}