| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | # Copyright 2016 Julian Ospald <hasufell@posteo.de> | 
					
						
							|  |  |  | # Distributed under the terms of the GNU General Public License v2 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  | require cmake [ api=2 ] | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | require github [ user=ja2-stracciatella tag=v${PV} ] | 
					
						
							|  |  |  | require desktop-utils gtk-icon-cache | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SUMMARY="A port of Jagged Alliance 2 to SDL" | 
					
						
							|  |  |  | HOMEPAGE+=" http://tron.homeunix.org/ja2/" | 
					
						
							|  |  |  | DOWNLOADS+=" mirror://gentoo/editor.slf.gz" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LICENCES="
 | 
					
						
							|  |  |  |     SFI-SCLA [[ note = [ Original Jagged Alliance source codes ] ]] | 
					
						
							|  |  |  |     public-domain [[ note = [ all changes since commit 8287b98 ] ]] | 
					
						
							|  |  |  |     ZLIB [[ note = [ _build/lib-MicroIni ] ]] | 
					
						
							|  |  |  |     LGPL-2.1 [[ note = [ _build/lib-SDL-* ] ]] | 
					
						
							|  |  |  |     Boost-1.0 [[ note = [ _build/lib-boost, _build/lib-utf8cpp ] ]] | 
					
						
							|  |  |  |     BSD-3 [[ note = [ _build/lib-gtest ] ]] | 
					
						
							|  |  |  |     MIT [[ note = [ _build/lib-rapidjson, _build/lib-slog ] ]] | 
					
						
							|  |  |  |     CCPL-Attribution-NonCommercial-2.0 [[ note = [ _build/lib-smacker ] ]] | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | SLOT="0" | 
					
						
							|  |  |  | PLATFORMS="~amd64 ~x86" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DEPENDENCIES="
 | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  |     build: | 
					
						
							|  |  |  |         dev-lang/rust | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  |     build+run: | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  |         dev-libs/boost | 
					
						
							|  |  |  |         media-libs/SDL:2[>=2.0.4][X] | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  |     suggestion: | 
					
						
							|  |  |  |         games-strategy/ja2-stracciatella-data [[ description = [ GOG data files | 
					
						
							|  |  |  |                                                                  of ja2 ] ]] | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  | DEFAULT_SRC_PREPARE_PATCHES=( | 
					
						
							|  |  |  |     "${FILES}"/0001-BUILD-fix-install-paths-by-utilizing-GNUInstallDirs.patch | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  | src_prepare() { | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  |     edo sed -i \
 | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  |         -e 's#/some/place/where/the/data/is#/usr/share/ja2#' \
 | 
					
						
							|  |  |  |         "${CMAKE_SOURCE}"/rust/src/stracciatella.rs | 
					
						
							|  |  |  |     default | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_compile() { | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  |     # cargo fetching during build time | 
					
						
							|  |  |  |     esandbox disable_net | 
					
						
							|  |  |  |     default | 
					
						
							|  |  |  |     esandbox enable_net | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_install() { | 
					
						
							| 
									
										
										
										
											2018-02-02 13:50:02 +00:00
										 |  |  |     cmake_src_install | 
					
						
							| 
									
										
										
										
											2016-05-26 01:20:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     insinto /usr/share/ja2/data | 
					
						
							|  |  |  |     doins "${WORKBASE}"/editor.slf | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     install_desktop_entry 'Exec=ja2' | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_postinst() { | 
					
						
							|  |  |  |     elog "If you don't use games-strategy/ja2-stracciatella-data, then" | 
					
						
							|  |  |  |     elog "you need to copy all files from the Data directory of" | 
					
						
							|  |  |  |     elog "Jagged Alliance 2 installation to some directory and set it in" | 
					
						
							|  |  |  |     elog "  ~/.ja2/ja2.ini" | 
					
						
							|  |  |  |     elog "possibly utilizing app-arch/innoextract for windows .exe files." | 
					
						
							|  |  |  |     elog | 
					
						
							|  |  |  |     elog "Make sure the filenames are all lowercase." | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 |