summaryrefslogtreecommitdiff
path: root/games-action/openclonk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-action/openclonk
reinit the tree, so we can have metadata
Diffstat (limited to 'games-action/openclonk')
-rw-r--r--games-action/openclonk/Manifest8
-rw-r--r--games-action/openclonk/files/openclonk-7.0-paths.patch68
-rw-r--r--games-action/openclonk/files/openclonk-7.0-postinst.patch14
-rw-r--r--games-action/openclonk/files/openclonk-wrapper-script.sh9
-rw-r--r--games-action/openclonk/metadata.xml23
-rw-r--r--games-action/openclonk/openclonk-7.0.ebuild122
6 files changed, 244 insertions, 0 deletions
diff --git a/games-action/openclonk/Manifest b/games-action/openclonk/Manifest
new file mode 100644
index 000000000000..2c520ff84433
--- /dev/null
+++ b/games-action/openclonk/Manifest
@@ -0,0 +1,8 @@
+AUX openclonk-7.0-paths.patch 2792 SHA256 6f49b7d0a9b4cf10113615cb3aed42c40fc98b0a317f87e7c15c6994a177f8a2 SHA512 3079ce128cba9b822bdb2df404a51a28df4152041d86bc55f10f6ddd057e29127b57da71471dd256fe48de9e30c1a33c760d99868c6611806e7468a2164d886c WHIRLPOOL 1d984daba7263f4f36237a9c78e2fcef42ca684b308c858713f1509c7c16eacfdcb7822254b5fe5de45d06a110e8fc209004663861b0f081b7c44ec47caeac33
+AUX openclonk-7.0-postinst.patch 668 SHA256 4e3561cfcecacc25eb3252255ac672a2e92d01703dc01cc1a2b8cd064b425d66 SHA512 77258633e8a4601f53666520561c40a533699d8de3429463d66a2b9659105c7838a099371648a92d91d1b1226abd6dd277717645e7409aed7ee40439bfab3634 WHIRLPOOL 8b357d32cbed73d1231bea57ef9480526a37dab3d86ebe0c3b3af4ee506f23df8ed1e5e9f5fac62448b71ce252d002fcf7a7e1b3596aa6240262a980565b6623
+AUX openclonk-wrapper-script.sh 229 SHA256 96fbef61769c0b4950dfde6d35648f9f5b2d9261c4b99687cfc02c24635ed939 SHA512 d31a2ffa6dbb014cfe3761d5a8b52b33f6b658cda317d0f7fc91ad8cc869fd93c486f9808da9ebe03e75255b7b2fedc2ef6c4f6372f1dce0575771ae9471a8a3 WHIRLPOOL 5395e432dab01140abcedcbf49573094bf13269b15fc7a1758a6c00258e1246560c1f50ae658fe27ef2cf579633debb4ed8efcd64d028bc9be2e2fb9603112d0
+DIST openclonk-7.0-src.tar.bz2 102143348 SHA256 bc1a231d72774a7aa8819e54e1f79be27a21b579fb057609398f2aa5700b0732 SHA512 b7ea557b5441986c0527abcb9c074c462f73bf45dd7ac4835329169d63ace5cc02e122d0dee7241da8621a7727ce9b09a2ad17e06dfc5610fcb529d350a51577 WHIRLPOOL 62619fa9b9071cdeff4b37dea703e822580a029d1a9193477117fc7426f47a999e4a1827775c5a215e1f7e7d786467fb9f4c6bea81e4ad9740f32df989d533b0
+EBUILD openclonk-7.0.ebuild 2571 SHA256 d1ef71d18f16bcd1c8ee2fdf393c00db5e8f1bd21172be50d9c3967f19e55f4c SHA512 5d36775588a1265869f5b2d787d81869fdbee9f69d168715954c8aa9743b73ac8ab1ed515f78d19e70f2c9b2a28134afe79f6f60bf7458a919744eedd28676b5 WHIRLPOOL 31a29de7e2699e9f952341544626c2bc3e320b051485c931a28f1d9b10d384991707d266e065daac9f0f7705f161066351608a78632ba7116c368bd16acce4c0
+MISC ChangeLog 5425 SHA256 d0f5d74207303fb18bd0e11a5096a9c06da5219e3943b34dbaa3938e8e2232e1 SHA512 6866ae68226a64b4aff49a0e5089c4c3d2238feec06467038cc00fb34049763894ec3a9bddda2c4c18018e9b72360399e832a3b7b1ab42065055d3f617ca8cbd WHIRLPOOL 6a556b8488a8ac00affb89ff0add2ee50285418cfa0baee2243ecf1b3b623d82a28829ac6cb6c2ec462f133c65a2a976f4a84973d16d81110d1277c81bef3c0d
+MISC ChangeLog-2015 3463 SHA256 6a3d0ee640a830dba39782df41c337055e9144d817e474efbf1e8db2065882c5 SHA512 64d15ef0d98d8ac91992f65a28b71ec60f540c5b05053c4f1aa8872b28e3452ee2f00a06dd3222d87ac7ea60516f5dc6ec8a67c23112fd3ec300f823858c2976 WHIRLPOOL c0b4f9592d7d4b7d9a4ae12cda925c9977d207f87c2a970e0a99fc2fa98d6ff6c22b676db4ed8548f26d8eaca5eed216a3a8635bf0d913f6205770a85a633503
+MISC metadata.xml 1027 SHA256 abda2b51bec434bbb7b6d64fb669c75b0d0a3e1e6d8eb9f5a70d13e730b8251c SHA512 566eb22d22644a7a16f94246b0f461ac7cac26702e2a21c443790f735155b8d30507862728847ab93f4e9c036561580363ef29de2173499e4b802a828ab1616f WHIRLPOOL 66da231d7780bfd2aced29a0bcafa3aa855791146973b01d8d7270465b57e772c05904a5c23ffa42eec297015d4ff1b2c42fb6899aa67d8e8a2551226a280150
diff --git a/games-action/openclonk/files/openclonk-7.0-paths.patch b/games-action/openclonk/files/openclonk-7.0-paths.patch
new file mode 100644
index 000000000000..4ebd6034a59b
--- /dev/null
+++ b/games-action/openclonk/files/openclonk-7.0-paths.patch
@@ -0,0 +1,68 @@
+Updated for openclonk-6.0, based on this patch:
+ From: Julian Ospald <hasufell@gentoo.org>
+ Date: Thu Feb 6 19:58:45 UTC 2014
+ Subject: make paths modifiable
+
+--- openclonk-release-6.0-src.orig/CMakeLists.txt
++++ openclonk-release-6.0-src/CMakeLists.txt
+@@ -42,6 +42,16 @@
+ set(${_var} "${_string}" PARENT_SCOPE)
+ endfunction()
+
++
++############################################################################
++# User selectable paths
++############################################################################
++set(INSTALL_BINDIR "bin/" CACHE PATH "Binary install destination")
++set(INSTALL_GAMES_BINDIR "games/bin" CACHE PATH "Games binary install destination")
++set(INSTALL_DATAROOTDIR "share/" CACHE PATH "Data root install destination")
++set(INSTALL_DATADIR "${INSTALL_DATAROOTDIR}" CACHE PATH "Data install destination")
++
++
+ ############################################################################
+ # User selectable options
+ ############################################################################
+@@ -1212,10 +1222,16 @@
+ # Assemble compiler flags
+ ############################################################################
+ if(UNIX)
++ if(NOT IS_ABSOLUTE "${INSTALL_DATADIR}")
++ set(ABSOLUTE_INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_DATADIR}")
++ else()
++ set(ABSOLUTE_INSTALL_DATADIR "${INSTALL_DATADIR}")
++ endif()
++
+ # Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached,
+ # and when the path is changed both the old and new definition appears
+ # in the list of flags.
+- add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/games/openclonk\"")
++ add_definitions("-DOC_SYSTEM_DATA_DIR=\"${ABSOLUTE_INSTALL_DATADIR}/openclonk\"")
+ endif()
+ if(OC_CXX_FLAGS)
+ list(REMOVE_DUPLICATES OC_CXX_FLAGS)
+@@ -1537,7 +1553,7 @@
+ DEPENDS "${native_c4group}"
+ VERBATIM
+ )
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk)
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION "${INSTALL_DATADIR}/openclonk")
+ endif()
+ endforeach()
+
+@@ -1546,13 +1562,13 @@
+ add_dependencies(data groups)
+
+ # Install new files
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION share/applications)
++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION "${INSTALL_DATAROOTDIR}/applications")
+ # Update the MIME cache -- this makes the clonk:// protocol handler actually work
+ install(CODE "execute_process(COMMAND update-desktop-database)")
+
+ # Install binaries
+- install(TARGETS openclonk DESTINATION games)
+- install(TARGETS c4group DESTINATION bin)
++ install(TARGETS openclonk DESTINATION "${INSTALL_GAMES_BINDIR}")
++ install(TARGETS c4group DESTINATION "${INSTALL_BINDIR}")
+ else()
+ install(TARGETS openclonk
+ BUNDLE DESTINATION .
diff --git a/games-action/openclonk/files/openclonk-7.0-postinst.patch b/games-action/openclonk/files/openclonk-7.0-postinst.patch
new file mode 100644
index 000000000000..26ad61ec6784
--- /dev/null
+++ b/games-action/openclonk/files/openclonk-7.0-postinst.patch
@@ -0,0 +1,14 @@
+update-desktop-database is called from the pkg_postinst stage instead.
+
+--- openclonk-release-6.0-src.orig/CMakeLists.txt
++++ openclonk-release-6.0-src/CMakeLists.txt
+@@ -1564,7 +1564,8 @@
+ # Install new files
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION "${INSTALL_DATAROOTDIR}/applications")
+ # Update the MIME cache -- this makes the clonk:// protocol handler actually work
+- install(CODE "execute_process(COMMAND update-desktop-database)")
++ # --> ebuild, pkg_postinst stage
++ #install(CODE "execute_process(COMMAND update-desktop-database)")
+
+ # Install binaries
+ install(TARGETS openclonk DESTINATION "${INSTALL_GAMES_BINDIR}")
diff --git a/games-action/openclonk/files/openclonk-wrapper-script.sh b/games-action/openclonk/files/openclonk-wrapper-script.sh
new file mode 100644
index 000000000000..9f7e64442887
--- /dev/null
+++ b/games-action/openclonk/files/openclonk-wrapper-script.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# wrapper prevents the game to look for .ocp files in the current dir
+# which can lead to weird behavior and game freeze
+
+[ -d ~/.clonk/openclonk ] || mkdir -p ~/.clonk/openclonk
+
+cd ~/.clonk/openclonk
+
+exec clonk "$@"
diff --git a/games-action/openclonk/metadata.xml b/games-action/openclonk/metadata.xml
new file mode 100644
index 000000000000..8d041fd7d412
--- /dev/null
+++ b/games-action/openclonk/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://hg.openclonk.org/openclonk/</changelog>
+ <doc lang="en">http://wiki.openclonk.org/w/C4Script_Documentation</doc>
+ <bugs-to>http://bugs.openclonk.org/</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ OpenClonk is the Open source successor of the Clonk gaming series.
+ OpenClonk is a project dedicated to the further development of the
+ Clonk game series. Our goal is to improve and make the real strengths
+ of Clonk more fun to play: Bustling mining, production lines and
+ economy, fast and fiddly melees. Another focus lies on the further
+ enchancement of the game engine and the extensibility/modability of
+ the game content with C4Script which has always been one of the most
+ important features of Clonk.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-action/openclonk/openclonk-7.0.ebuild b/games-action/openclonk/openclonk-7.0.ebuild
new file mode 100644
index 000000000000..da2e07fe3693
--- /dev/null
+++ b/games-action/openclonk/openclonk-7.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils eutils gnome2-utils python-any-r1 fdo-mime toolchain-funcs games
+
+MY_P=${PN}-release-${PV}-src
+
+DESCRIPTION="A free multiplayer action game where you control clonks"
+HOMEPAGE="http://openclonk.org/"
+SRC_URI="http://www.openclonk.org/builds/release/${PV}/openclonk-${PV}-src.tar.bz2"
+
+LICENSE="BSD ISC CLONK-trademark LGPL-2.1 POSTGRESQL"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dedicated doc"
+
+RDEPEND="
+ >=dev-libs/boost-1.40:=
+ dev-libs/tinyxml
+ net-libs/libupnp
+ media-libs/libpng:0=
+ sys-libs/zlib
+ !dedicated? (
+ dev-libs/glib:2
+ media-libs/freealut
+ media-libs/freetype:2
+ media-libs/glew
+ media-libs/libsdl[X,opengl,sound,video]
+ media-libs/libvorbis
+ media-libs/openal
+ media-libs/sdl-mixer[mp3,vorbis,wav]
+ virtual/jpeg:0=
+ virtual/opengl
+ virtual/glu
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/libXrandr
+ x11-libs/libX11
+ )
+ dedicated? ( sys-libs/readline:0= )"
+DEPEND="${RDEPEND}
+ || ( >=sys-devel/gcc-4.9 >=sys-devel/clang-3.3 )
+ virtual/pkgconfig
+ doc? (
+ ${PYTHON_DEPS}
+ dev-libs/libxml2[python]
+ sys-devel/gettext
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-paths.patch
+ "${FILESDIR}"/${P}-postinst.patch
+)
+S=${WORKDIR}/${P}-src
+
+pkg_pretend() {
+ if [[ $(tc-getCXX) == *g++* && $(gcc-version) < 4.9 ]] ; then
+ die 'The active compiler needs to be gcc 4.9 (or newer) or clang'
+ else
+ einfo 'The active compiler should be ok'
+ fi
+}
+
+pkg_setup() {
+ games_pkg_setup
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(usex dedicated \
+ "-DUSE_CONSOLE=ON -DUSE_X11=OFF -DUSE_GTK=OFF -DUSE_GTK3=OFF" \
+ "-DUSE_CONSOLE=OFF -DUSE_X11=ON -DUSE_GTK=ON -DUSE_GTK3=ON")
+ -DWITH_AUTOMATIC_UPDATE=OFF
+ -DINSTALL_GAMES_BINDIR="${GAMES_BINDIR}"
+ -DINSTALL_DATADIR="${GAMES_DATADIR}"
+ -DUSE_STATIC_BOOST=OFF
+ -DUSE_SYSTEM_TINYXML=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && emake -C docs
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use dedicated; then
+ mv "${ED%/}${GAMES_BINDIR}/"{openclonk,clonk} || die
+ newgamesbin "${FILESDIR}"/${PN}-wrapper-script.sh ${PN}
+ fi
+ use doc && dohtml -r docs/online/*
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}