| 
									
										
										
										
											2018-09-16 07:17:47 +00:00
										 |  |  | # Copyright 2017-2018 Julian Ospald <hasufell@posteo.de> | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | # Distributed under the terms of the GNU General Public License v2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CMAKE_SOURCE=${WORKBASE}/src-tarball | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-16 07:17:47 +00:00
										 |  |  | require github [ user=${PN} release=v${PV} pnv=FreeOrion_v${PV}_2018-08-23.26f16b0_Source suffix=tar.gz ] | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | require cmake [ api=2 ] | 
					
						
							|  |  |  | require gtk-icon-cache | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SUMMARY="A free turn-based space empire and galactic conquest game" | 
					
						
							|  |  |  | DESCRIPTION="
 | 
					
						
							|  |  |  | FreeOrion is a free, open source, turn-based space empire and galactic conquest | 
					
						
							|  |  |  | (4X) computer game being designed and built by the FreeOrion project. FreeOrion | 
					
						
							|  |  |  | is inspired by the tradition of the Master of Orion games, but is not a clone or | 
					
						
							|  |  |  | remake of that series or any other game. | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | HOMEPAGE+=" http://www.freeorion.org" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LICENCES="GPL-2 LGPL-2.1 CCPL-Attribution-ShareAlike-3.0" | 
					
						
							|  |  |  | SLOT="0" | 
					
						
							|  |  |  | PLATFORMS="~amd64" | 
					
						
							|  |  |  | MYOPTIONS="
 | 
					
						
							| 
									
										
										
										
											2017-04-30 20:10:54 +00:00
										 |  |  |     tiff [[ description = [ Enable TIFF texture support ] ]] | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  |     ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]] | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DEPENDENCIES="
 | 
					
						
							|  |  |  |     build: | 
					
						
							|  |  |  |         virtual/pkg-config | 
					
						
							|  |  |  |     build+run: | 
					
						
							|  |  |  |         dev-lang/python:2.7 | 
					
						
							|  |  |  |         dev-libs/boost | 
					
						
							|  |  |  |         media-libs/SDL:2[X] | 
					
						
							|  |  |  |         media-libs/freetype:2 | 
					
						
							|  |  |  |         media-libs/glew | 
					
						
							|  |  |  |         media-libs/libogg | 
					
						
							|  |  |  |         media-libs/libpng:= | 
					
						
							|  |  |  |         media-libs/libvorbis | 
					
						
							|  |  |  |         media-libs/openal | 
					
						
							|  |  |  |         x11-dri/glu | 
					
						
							|  |  |  |         x11-dri/mesa | 
					
						
							|  |  |  |         providers:ijg-jpeg? ( media-libs/jpeg:= ) | 
					
						
							|  |  |  |         providers:jpeg-turbo? ( media-libs/libjpeg-turbo ) | 
					
						
							| 
									
										
										
										
											2017-04-30 20:10:54 +00:00
										 |  |  |         tiff? ( media-libs/tiff ) | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | BUGS_TO="hasufell@posteo.de" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-02 20:10:34 +00:00
										 |  |  | DEFAULT_SRC_PREPARE_PATCHES=( | 
					
						
							|  |  |  |     "${FILES}"/${PN}-Remove-all-references-to-signals-library-from-CMakeL.patch | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | CMAKE_SRC_CONFIGURE_PARAMS=( | 
					
						
							|  |  |  |     -DRELEASE_COMPILE_FLAGS="" | 
					
						
							|  |  |  |     -DCMAKE_SKIP_RPATH=ON | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2017-04-30 20:10:54 +00:00
										 |  |  | CMAKE_SRC_CONFIGURE_OPTION_ENABLES=( 'tiff TIFF_TEXTURES' ) | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | src_prepare() { | 
					
						
							|  |  |  |     cmake_src_prepare | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # parse subdir sets -O3 | 
					
						
							|  |  |  |     edo sed -e "s:-O3::" -i "${CMAKE_SOURCE}"/parse/CMakeLists.txt | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_install() { | 
					
						
							|  |  |  |     cmake_src_install | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # we need a wrapper | 
					
						
							|  |  |  |     edo mv "${IMAGE}"/usr/$(exhost --target)/bin/${PN} \
 | 
					
						
							|  |  |  |         "${IMAGE}"/usr/$(exhost --target)/bin/${PN}.bin | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     herebin "${PN}" <<EOF | 
					
						
							|  |  |  | #!/bin/sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then | 
					
						
							|  |  |  |     export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:/usr/$(exhost --target)/lib/freeorion" | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |     export LD_LIBRARY_PATH="/usr/$(exhost --target)/lib/freeorion" | 
					
						
							|  |  |  | fi | 
					
						
							| 
									
										
										
										
											2016-09-09 19:46:41 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | cd /usr/share/freeorion | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-09 12:48:11 +00:00
										 |  |  | exec /usr/$(exhost --target)/bin/${PN}.bin --resource-dir /usr/share/freeorion/default "\$@" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 |