summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2016-06-16 20:04:57 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2016-09-02 13:56:52 +0200
commitc71072003bc0a0d8bf89d89ee54b4c7659624d93 (patch)
treefd529f1d4c90dbb3b50948f173ed0ba93e9140fa
parent5dad8c9958405e0f54528ffcd40ddac182e160e9 (diff)
downloadgames-c71072003bc0a0d8bf89d89ee54b4c7659624d93.tar.gz
games-c71072003bc0a0d8bf89d89ee54b4c7659624d93.tar.xz
CorsixTH: initial exheres
Change-Id: Ia80e14f13156c01b1d346d719f0bff4fd72e024b Reviewed-on: https://galileo.mailstation.de/gerrit/6456 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Timo Gurr <tgurr@exherbo.org>
-rw-r--r--packages/games-simulation/CorsixTH/CorsixTH-0.60.exheres-093
1 files changed, 93 insertions, 0 deletions
diff --git a/packages/games-simulation/CorsixTH/CorsixTH-0.60.exheres-0 b/packages/games-simulation/CorsixTH/CorsixTH-0.60.exheres-0
new file mode 100644
index 0000000..2cb4971
--- /dev/null
+++ b/packages/games-simulation/CorsixTH/CorsixTH-0.60.exheres-0
@@ -0,0 +1,93 @@
+# Copyright 2016 Timo Gurr <tgurr@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ tag=v${PV} ] cmake [ api=2 ] lua [ whitelist="5.1 5.2 5.3" ] freedesktop-desktop
+
+SUMMARY="Open source clone of Theme Hospital"
+HOMEPAGE+=" http://corsixth.com"
+
+LICENCES="MIT"
+SLOT="0"
+PLATFORMS="~amd64"
+MYOPTIONS="
+ ( providers: ffmpeg libav ) [[ number-selected = exactly-one ]]
+"
+
+DEPENDENCIES="
+ build+run:
+ dev-lua/lpeg[lua_abis:*(-)?]
+ dev-lua/luafilesystem[lua_abis:*(-)?]
+ media-libs/SDL:2[X]
+ media-libs/SDL_mixer:2
+ media-libs/freetype:2
+ providers:ffmpeg? ( media/ffmpeg )
+ providers:libav? ( media/libav )
+"
+
+CMAKE_SRC_CONFIGURE_PARAMS=(
+ -DCMAKE_INSTALL_PREFIX=/opt
+ -DBUILD_ANIMVIEWER:BOOL=FALSE
+ -DWITH_AUDIO:BOOL=TRUE
+ -DWITH_FREETYPE2:BOOL=TRUE
+ -DWITH_LUAJIT:BOOL=FALSE
+ -DWITH_MOVIES:BOOL=TRUE
+ -DWITH_SDL:BOOL=TRUE
+)
+
+# FIXME: CorsixTH installs shared data and binaries into the same directory
+pkg_setup() {
+ exdirectory --allow /opt
+}
+
+src_configure() {
+ if option providers:ffmpeg ; then
+ cmakeargs+=( -DWITH_LIBAV:BOOL=FALSE )
+ else
+ cmakeargs+=( -DWITH_LIBAV:BOOL=TRUE )
+ fi
+
+ ecmake \
+ "${CMAKE_SRC_CONFIGURE_PARAMS[@]}" \
+ "${cmakeargs[@]}"
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+src_test() {
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ herebin ${PN} <<EOF
+#!/bin/sh
+exec /opt/CorsixTH/CorsixTH
+EOF
+
+ insinto /usr/share/icons/hicolor/scalable/apps
+ newins "${CMAKE_SOURCE}"/${PN}/Original_Logo.svg ${PN}.svg
+
+ insinto /usr/share/applications
+ hereins ${PN}.desktop <<EOF
+[Desktop Entry]
+Name=CorsixTH
+Version=0.60
+Exec=/opt/CorsixTH/CorsixTH
+Comment=A Theme Hospital Clone
+Icon=CorsixTH.svg
+Type=Application
+Terminal=false
+StartupNotify=true
+Encoding=UTF-8
+Categories=Game;StrategyGame;
+EOF
+}
+
+pkg_postinst() {
+ elog "${PN} requires a copy of the original Theme Hospital resources."
+ elog "See /usr/share/doc/${PNVR}/README.txt for more info."
+}
+