-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
58 lines (54 loc) · 1.81 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Template file for 'hedgewars'
pkgname=hedgewars
version=1.0.2
revision=1
build_style=cmake
configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname}
-DPHYSFS_SYSTEM=1 -DMINIMAL_FLAGS=1"
make_cmd=make
hostmakedepends="lua51 pkg-config qt5-qmake qt5-host-tools"
makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel
SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel"
depends="libfreeglut"
short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://www.hedgewars.org/"
distfiles="https://hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2"
checksum=201fe5e45bd8ca5b3d81b18ec06bd6bbc9fa7c2c63bf019005e2f80be5bcf212
nopie_files="/usr/bin/hwengine"
nocross="Needs investigation: fails to link hwengine"
replaces="hedgewars-data>=0"
export CMAKE_GENERATOR="Unix Makefiles"
case $XBPS_TARGET_MACHINE in
x86_64*|ppc64le|ppc64)
hostmakedepends+=" fpc"
;;
*)
# use C engine for architectures lacking freepascal support
# https://www.hedgewars.org/kb/pas2CTutorial
# i686 has a 32 bit freepascal bug
# https://travis-ci.org/void-linux/void-packages/jobs/596458977#L4316
_use_c_engine=1
;;
esac
if [ -n "$_use_c_engine" ]; then
hostmakedepends+=" glew-devel ghc clang"
makedepends+=" glew-devel"
configure_args+=" -DBUILD_ENGINE_C=1"
nopie_files+=" /usr/bin/hedgewars"
fi
pre_configure() {
if [ -n "$_use_c_engine" ]; then
# remove option not supported by clang
CFLAGS=${CFLAGS/-fstack-clash-protection/}
CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/}
# prevent multiple definitions
CFLAGS+=" -fcommon"
CXXFLAGS+=" -fcommon"
fi
}
post_install() {
vman man/hedgewars.6
vinstall ${DESTDIR}/usr/share/hedgewars/Data/misc/hedgewars.desktop 644 usr/share/applications
}