aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/wesnoth/wesnoth.inc
blob: 14a447153de88aa3e791ed3f4b52ca65c99a9e28 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
DESCRIPTION = "The Battle for Wesnoth is a turn-based strategy game with a fantasy theme."
HOMEPAGE = "http://www.wesnoth.org/"
SECTION = "games"
LICENSE = "GPL"

DEPENDS = "freetype libsdl-image libsdl-mixer libsdl-net libsdl-ttf zlib boost imagemagick-native pango libpng lua5.1"
INC_PR = "r1"

SRC_URI = "${SOURCEFORGE_MIRROR}/wesnoth/wesnoth-${PV}.tar.bz2"
S = "${WORKDIR}/wesnoth-${PV}"

ARM_INSTRUCTION_SET = "arm"

inherit cmake

EXTRA_OECMAKE = "\
	-DENABLE_EDITOR=ON \
	-DENABLE_LOW_MEM=ON \
	-DENABLE_FRIBIDI=OFF \
	\
	-DCMAKE_BUILD_TYPE=Debug \
	"
	
PACKAGES = "${PN}-editor ${PN}-doc ${PN}-music ${PN}-sounds \
	${PN}-aoi ${PN}-did ${PN}-ei ${PN}-httt ${PN}-l \
	${PN}-nr ${PN}-sof ${PN}-sotbe ${PN}-thot ${PN}-trow \
	${PN}-tsg ${PN}-tb ${PN}-utbs ${PN}-low\
	${PN}-data \
	${PN}-all-campaigns \
	${PN}-all \
	${PN} ${PN}-dbg \
	${PN}-server \
	"

DESCRIPTION_${PN}-editor = "Map Editor for The Battle for ${PN}"
DESCRIPTION_${PN}-all = "The Battle for ${PN} with all campaigns, music and sounds"
DESCRIPTION_${PN}-all-campaigns = "The Battle for ${PN} with all campaigns."
DESCRIPTION_${PN}-sounds = "Optional sound package for The Battle for ${PN}"
DESCRIPTION_${PN}-music = "Optional music package for The Battle for ${PN}"
DESCRIPTION_${PN}-data = "Mandatory data package for The Battle for ${PN}"
DESCRIPTION_${PN}-server = "Optional Battle for Wesnoth server"

do_configure_prepend(){
	export HOST_SYS="${HOST_SYS}"
	export BUILD_SYS="${BUILD_SYS}"
	export STAGING_LIBDIR="${STAGING_LIBDIR}"
	export STAGING_INCDIR="${STAGING_INCDIR}"
	rm -f ${S}/cmake/FindBoost.cmake
}

do_install_append() {
	#ugly hack but otherwise it would have required to
	#have MANDIR:STRING=share/man that would require a 
	#second python function
	if [ -d ${D}${prefix}/man ];then
		mv ${D}${prefix}/man ${D}${mandir}
	fi
}

RDEPENDS_${PN} = "${PN}-data libpng"

RDEPENDS_${PN}-editor = "${PN}-data"

RDEPENDS_${PN}-all-campaigns = "${PN} \
	${PN}-aoi ${PN}-did ${PN}-ei ${PN}-httt ${PN}-l \
	${PN}-nr ${PN}-sof ${PN}-sotbe ${PN}-thot ${PN}-trow \
	${PN}-tsg ${PN}-tb ${PN}-utbs ${PN}-low"

# Installing wesnoth-all should pull everything in (like in Debian).
RDEPENDS_${PN}-all = "${PN} ${PN}-sounds ${PN}-music"

FILES_${PN}-music = "\
	${datadir}/wesnoth/data/core/music \
"

FILES_${PN}-sounds = "\
	${datadir}/wesnoth/data/core/sounds \
"

# Picks up remaining translations and data. Must be packaged after
# wesnoth-music, wesnoth-sounds and all campaigns.
FILES_${PN}-data = "\
  ${datadir}/wesnoth/sounds \
  ${datadir}/wesnoth/images \
  ${datadir}/wesnoth/data \
  ${datadir}/wesnoth/fonts \
  ${datadir}/wesnoth/translations \
"

FILES_${PN} = "\
  	${bindir}/wesnoth \
	${datadir}/icons \
	${datadir}/applications/wesnoth.desktop \
	${datadir}/pixmaps/wesnoth-icon.png \
"

FILES_${PN}-server = "\
	${bindir}/wesnothd \
"

FILES_${PN}-low ="\
       ${datadir}/wesnoth/data/campaigns/Legend_of_Wesmere \
       ${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-aoi.mo \
"

FILES_${PN}-editor = "\
	${bindir}/wesnoth_editor \
	${datadir}/applications/wesnoth_editor.desktop \
	${datadir}/pixmaps/wesnoth_editor-icon.png \
"

FILES_${PN}-aoi = "\
	${datadir}/wesnoth/data/campaigns/An_Orcish_Incursion \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-aoi.mo \
"

FILES_${PN}-did = "\
	${datadir}/wesnoth/data/campaigns/Descent_Into_Darkness \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-did.mo \
"

FILES_${PN}-ei = "\
	${datadir}/wesnoth/data/campaigns/Eastern_Invasion \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-ei.mo \
"

FILES_${PN}-httt = "\
	${datadir}/wesnoth/data/campaigns/Heir_To_The_Throne \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-httt.mo \
"

FILES_${PN}-l = "\
	${datadir}/wesnoth/data/campaigns/Liberty \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-l.mo \
"

FILES_${PN}-nr = "\
	${datadir}/wesnoth/data/campaigns/Northern_Rebirth \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-nr.mo \
"

FILES_${PN}-sof = "\
	${datadir}/wesnoth/data/campaigns/Sceptre_Of_Fire \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-sof.mo \
"

FILES_${PN}-sotbe = "\
	${datadir}/wesnoth/data/campaigns/Son_Of_The_Black_Eye \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-sotbe.mo \
"

FILES_${PN}-thot = "\
	${datadir}/wesnoth/data/campaigns/The_Hammer_Of_Thursagan \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-thot.mo \
"

FILES_${PN}-trow = "\
	${datadir}/wesnoth/data/campaigns/The_Rise_Of_Wesnoth \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-trow.mo \
"

FILES_${PN}-tsg = "\
	${datadir}/wesnoth/data/campaigns/The_South_Guard \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-tsg.mo \
"

FILES_${PN}-tb = "\
	${datadir}/wesnoth/data/campaigns/Two_Brothers \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-tb.mo \
"

FILES_${PN}-utbs = "\
	${datadir}/wesnoth/data/campaigns/Under_the_Burning_Suns \
	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-utbs.mo \
"