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)
PKG_NAME = "ecwolf"
PKG_VERSION = "3ce6e4d064b54eec72386fe949ec7be20746c16c"
PKG_LICENSE = "GPLv2"
PKG_SITE = "https://bitbucket.org/ecwolf/ecwolf"
PKG_URL = " $PKG_SITE .git "
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 \
-DIMPORT_EXECUTABLES= $PKG_BUILD /.$HOST_NAME /ImportExecutables.cmake
-DCMAKE_BUILD_TYPE= Release"
cd $PKG_BUILD /deps/gdtoa
$HOST_CC -o rithchk arithchk.c -Wall -Wextra
./rithchk > $PKG_BUILD /deps/gdtoa/arith.h
$HOST_CC -o qnan qnan.c -Wall -Wextra
./qnan > $PKG_BUILD /deps/gdtoa/gd_qnan.h
cd $PKG_BUILD
}
m a k e i n s t a l l _ t a r g e t ( ) {
mkdir -p $INSTALL /usr/bin
cp $PKG_BUILD /ecwolf $INSTALL /usr/bin/
cp $PKG_DIR /ecwolf.sh $INSTALL /usr/bin/
2022-02-27 02:40:30 +00:00
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
}