distribution/packages/games/emulators/ecwolf/package.mk

57 lines
1.7 KiB
Makefile
Raw Normal View History

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-04-11 23:52:00 +00:00
PKG_VERSION="777265eccd1b6436ed4381b4b25e22f6c4365136"
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"
pre_patch() {
find $(echo "${PKG_BUILD}" | cut -f1 -d\ ) -type f -exec dos2unix -q {} \;
}
pre_build_host() {
HOST_CMAKE_OPTS=""
}
make_host() {
cmake . -DNO_GTK=ON
make
}
makeinstall_host() {
: #no
}
pre_configure_target() {
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
}
makeinstall_target() {
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
}