public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Sterrett" <mr_bones_@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/openclonk/, games-action/openclonk/files/
Date: Tue, 19 Jan 2016 21:37:36 +0000 (UTC)	[thread overview]
Message-ID: <1453239018.e76e94f1fa9c98ec5cf08fda8331b5a11c57c01b.mr_bones_@gentoo> (raw)

commit:     e76e94f1fa9c98ec5cf08fda8331b5a11c57c01b
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 19 21:29:48 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Tue Jan 19 21:30:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e76e94f1

games-action/openclonk: version bump

Package-Manager: portage-2.2.26

 games-action/openclonk/Manifest                    |   1 +
 .../openclonk/files/openclonk-7.0-paths.patch      |  68 ++++++++++++
 .../openclonk/files/openclonk-7.0-postinst.patch   |  14 +++
 games-action/openclonk/openclonk-7.0.ebuild        | 114 +++++++++++++++++++++
 4 files changed, 197 insertions(+)

diff --git a/games-action/openclonk/Manifest b/games-action/openclonk/Manifest
index 18d7ff8..12525dd 100644
--- a/games-action/openclonk/Manifest
+++ b/games-action/openclonk/Manifest
@@ -1 +1,2 @@
 DIST openclonk-6.1-src.tar.bz2 68861317 SHA256 5c3903f82c9d7e8c466ab1ff594d553911a6e5fa0be2a326684d823ef1c24905 SHA512 2705a34e797e8352c2f480c57f1c8131a4e2c71bec3ac353d1cdbca6976e7b9e4722ed171b67c03f958eecedbe43b2751be843d7fcc460c2ee65fd035bc6bb4a WHIRLPOOL 3cb05e758c91ec963f198dbe2fbdb117641628ccd139ad787e55a1b57a93719e2d4b655758cbcbf8f42a5391b09282488133febd7f9400e51587291f72126136
+DIST openclonk-7.0-src.tar.bz2 102143348 SHA256 bc1a231d72774a7aa8819e54e1f79be27a21b579fb057609398f2aa5700b0732 SHA512 b7ea557b5441986c0527abcb9c074c462f73bf45dd7ac4835329169d63ace5cc02e122d0dee7241da8621a7727ce9b09a2ad17e06dfc5610fcb529d350a51577 WHIRLPOOL 62619fa9b9071cdeff4b37dea703e822580a029d1a9193477117fc7426f47a999e4a1827775c5a215e1f7e7d786467fb9f4c6bea81e4ad9740f32df989d533b0

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 0000000..4ebd603
--- /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 0000000..26ad61e
--- /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/openclonk-7.0.ebuild b/games-action/openclonk/openclonk-7.0.ebuild
new file mode 100644
index 0000000..5fcb67a
--- /dev/null
+++ b/games-action/openclonk/openclonk-7.0.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils eutils gnome2-utils python-any-r1 fdo-mime 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}
+	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_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
+}


             reply	other threads:[~2016-01-19 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 21:37 Michael Sterrett [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-03-20 20:51 [gentoo-commits] repo/gentoo:master commit in: games-action/openclonk/, games-action/openclonk/files/ Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453239018.e76e94f1fa9c98ec5cf08fda8331b5a11c57c01b.mr_bones_@gentoo \
    --to=mr_bones_@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox