| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  | # Copyright 2016 Julian Ospald <hasufell@posteo.de> | 
					
						
							|  |  |  | # Distributed under the terms of the GNU General Public License v2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require gtk-icon-cache | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MY_P=zod_linux-${PV:0:4}-${PV:4:2}-${PV:6:2} | 
					
						
							|  |  |  | DESCRIPTION="Zod engine is a remake of the 1996 classic game by Bitmap Brothers called Z" | 
					
						
							|  |  |  | HOMEPAGE="http://zod.sourceforge.net/" | 
					
						
							|  |  |  | DOWNLOADS="mirror://sourceforge/zod/linux_releases/${MY_P}.tar.gz" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LICENCES="all-rights-reserved GPL-3 LGPL-2.1" | 
					
						
							|  |  |  | SLOT="0" | 
					
						
							|  |  |  | PLATFORMS="~amd64 ~x86" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DEPENDENCIES="
 | 
					
						
							|  |  |  |     build+run: | 
					
						
							|  |  |  |         media-libs/SDL:0[X] | 
					
						
							|  |  |  |         media-libs/SDL_image:1 | 
					
						
							|  |  |  |         media-libs/SDL_ttf:0 | 
					
						
							|  |  |  |         media-libs/SDL_mixer:0[midi][ogg] | 
					
						
							|  |  |  |         virtual/mysql | 
					
						
							|  |  |  |         x11-libs/wxGTK:2.8 | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WORK=${WORKBASE}/zod_engine | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # patches are upstreamed | 
					
						
							|  |  |  | DEFAULT_SRC_PREPARE_PATCHES=( | 
					
						
							|  |  |  |     "${FILES}"/${PNV}-build.patch | 
					
						
							|  |  |  |     "${FILES}"/${PNV}-proper-linux-support.patch | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_prepare() { | 
					
						
							|  |  |  |     default | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-17 01:53:28 +00:00
										 |  |  |     # remove unused files | 
					
						
							|  |  |  |     edo find "${WORK}" -type f \( -name Thumbs.db -o -name "*.xcf" -o -name "*.ico" \) -delete | 
					
						
							|  |  |  |     edo rm assets/{splash.png,WebCamScene.icescene} | 
					
						
							| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # fix some tool invocations | 
					
						
							| 
									
										
										
										
											2016-02-17 10:42:15 +00:00
										 |  |  |     eval $(eclectic wxwidgets script 2.8-gtk2) # FIXME: this probably breaks multiarch? | 
					
						
							| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  |     edo sed -i -e "s#-lmysqlclient#\$\(shell /usr/$(exhost --target)/bin/mysql_config \-\-libs\)#" \
 | 
					
						
							|  |  |  |         zod_src/makefile | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_compile() { | 
					
						
							| 
									
										
										
										
											2016-02-17 01:53:28 +00:00
										 |  |  |     emake -C zod_src DATA_PATH="\"/usr/share/${PN}\"" main map_editor | 
					
						
							|  |  |  |     emake -C zod_launcher_src DATA_PATH="\"/usr/share/${PN}\"" | 
					
						
							| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_install() { | 
					
						
							| 
									
										
										
										
											2016-02-17 01:53:28 +00:00
										 |  |  |     dobin zod_src/zod | 
					
						
							|  |  |  |     dodoc zod_engine_help.txt | 
					
						
							| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     dobin zod_src/zod_map_editor | 
					
						
							|  |  |  |     dodoc map_editor_help.txt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     dobin zod_launcher_src/zod_launcher | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     insinto /usr/share/applications | 
					
						
							|  |  |  |     hereins ${PN}.desktop <<EOF | 
					
						
							|  |  |  | [Desktop Entry] | 
					
						
							|  |  |  | Name=Zod Engine | 
					
						
							|  |  |  | Type=Application | 
					
						
							|  |  |  | Comment=Zod engine is a remake of the 1996 classic game by Bitmap Brothers called Z | 
					
						
							|  |  |  | Exec=zod_launcher | 
					
						
							|  |  |  | TryExec=zod_launcher | 
					
						
							|  |  |  | Icon=zod-engine | 
					
						
							|  |  |  | Categories=Game;StrategyGame; | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-17 01:53:28 +00:00
										 |  |  |     insinto /usr/share/zod-engine | 
					
						
							|  |  |  |     doins -r assets blank_maps *.map default_settings.txt *map_list.txt | 
					
						
							| 
									
										
										
										
											2016-02-16 20:16:04 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 |