aboutsummaryrefslogtreecommitdiff
path: root/package/minetest/minetest.mk
blob: 96a66a3f198a026ad74976f60fbc04c2339f68bc (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
################################################################################
#
# minetest
#
################################################################################

MINETEST_VERSION = 5.0.1
MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
MINETEST_LICENSE_FILES = LICENSE.txt

MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib

MINETEST_CONF_OPTS = \
	-DDEFAULT_RUN_IN_PLACE=OFF \
	-DENABLE_GLES=OFF \
	-DENABLE_LUAJIT=ON \
	-DENABLE_CURSES=OFF \
	-DAPPLY_LOCALE_BLACKLIST=OFF \
	-DENABLE_SYSTEM_GMP=ON \
	-DENABLE_SYSTEM_JSONCPP=ON

ifeq ($(BR2_PACKAGE_MINETEST_CLIENT),y)
MINETEST_DEPENDENCIES += bzip2 jpeg libgl libpng xlib_libXxf86vm
MINETEST_CONF_OPTS += -DBUILD_CLIENT=ON
else
MINETEST_CONF_OPTS += -DBUILD_CLIENT=OFF
endif

ifeq ($(BR2_PACKAGE_MINETEST_SERVER),y)
MINETEST_CONF_OPTS += -DBUILD_SERVER=ON
else
MINETEST_CONF_OPTS += -DBUILD_SERVER=OFF
endif

ifeq ($(BR2_PACKAGE_MINETEST_SOUND),y)
MINETEST_DEPENDENCIES += libvorbis openal
MINETEST_CONF_OPTS += -DENABLE_SOUND=ON
else
MINETEST_CONF_OPTS += -DENABLE_SOUND=OFF
endif

ifeq ($(BR2_PACKAGE_FREETYPE),y)
MINETEST_DEPENDENCIES += freetype
MINETEST_CONF_OPTS += -DENABLE_FREETYPE=ON
else
MINETEST_CONF_OPTS += -DENABLE_FREETYPE=OFF
endif

ifeq ($(BR2_PACKAGE_HIREDIS),y)
MINETEST_DEPENDENCIES += hiredis
MINETEST_CONF_OPTS += -DENABLE_REDIS=ON
else
MINETEST_CONF_OPTS += -DENABLE_REDIS=OFF
endif

ifeq ($(BR2_PACKAGE_LEVELDB),y)
MINETEST_DEPENDENCIES += leveldb
MINETEST_CONF_OPTS += -DENABLE_LEVELDB=ON
else
MINETEST_CONF_OPTS += -DENABLE_LEVELDB=OFF
endif

ifeq ($(BR2_PACKAGE_LIBCURL),y)
MINETEST_DEPENDENCIES += libcurl
MINETEST_CONF_OPTS += -DENABLE_CURL=ON
else
MINETEST_CONF_OPTS += -DENABLE_CURL=OFF
endif

ifeq ($(BR2_PACKAGE_LIBSPATIALINDEX),y)
MINETEST_DEPENDENCIES += libspatialindex
MINETEST_CONF_OPTS += -DENABLE_SPATIAL=ON
else
MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
endif

ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
MINETEST_DEPENDENCIES += postgresql
MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
else
MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=OFF
endif

ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
MINETEST_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
MINETEST_CONF_OPTS += -DENABLE_GETTEXT=ON
else
MINETEST_CONF_OPTS += -DENABLE_GETTEXT=OFF
endif

$(eval $(cmake-package))