From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/s25rttr/files/, games-strategy/s25rttr/
Date: Sun, 10 Jan 2016 20:37:40 +0000 (UTC) [thread overview]
Message-ID: <1452458246.245ec6adbd16742786282dd6a06814a24d1a7567.soap@gentoo> (raw)
commit: 245ec6adbd16742786282dd6a06814a24d1a7567
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 10 19:56:32 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 20:37:26 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=245ec6ad
Revbump, include patch for miniUPnPc API breakage
Package-Manager: portage-2.2.26
.../files/s25rttr-0.8.1-miniupnpc-api-14.patch | 36 +++++++
games-strategy/s25rttr/s25rttr-0.8.1-r1.ebuild | 110 +++++++++++++++++++++
2 files changed, 146 insertions(+)
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch
new file mode 100644
index 0000000..d2ff0ee
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch
@@ -0,0 +1,36 @@
+From 3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e Mon Sep 17 00:00:00 2001
+From: Manuel Zeise <mail@manuel-zeise.de>
+Date: Sun, 3 Jan 2016 16:54:05 +0100
+Subject: [PATCH] Switch for miniUPnPc API version 14 and above
+
+API version 14 of miniUPnPc has introduced a new TTL argument to
+upnpDiscover() with a recommended default value of 2. A new preprocessor
+statement evaluates the API version and selects the correct version of
+upnpDiscover() based on the API version.
+
+--- s25rttr-0.8.1/libutil/src/UPnP.cpp
++++ s25rttr-0.8.1/libutil/src/UPnP.cpp
+@@ -210,7 +210,11 @@
+ UPNPDev* devicelist = NULL;
+ #ifdef UPNPDISCOVER_SUCCESS
+ int upnperror = 0;
++#if (MINIUPNPC_API_VERSION >= 14) /* miniUPnPc API version 14 adds TTL parameter */
++ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, 2, &upnperror);
++#else
+ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, &upnperror);
++#endif
+ #else
+ devicelist = upnpDiscover(2000, NULL, NULL, 0);
+ #endif
+@@ -276,7 +280,11 @@
+ UPNPDev* devicelist = NULL;
+ #ifdef UPNPDISCOVER_SUCCESS
+ int upnperror = 0;
++#if (MINIUPNPC_API_VERSION >= 14) /* miniUPnPc API version 14 adds TTL parameter */
++ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, 2, &upnperror);
++#else
+ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, &upnperror);
++#endif
+ #else
+ devicelist = upnpDiscover(2000, NULL, NULL, 0);
+ #endif
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1-r1.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1-r1.ebuild
new file mode 100644
index 0000000..9f39e6b
--- /dev/null
+++ b/games-strategy/s25rttr/s25rttr-0.8.1-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils gnome2-utils games
+
+DESCRIPTION="Open Source remake of The Settlers II game (needs original game files)"
+HOMEPAGE="http://www.siedler25.org/"
+# no upstream source tarball yet
+# https://bugs.launchpad.net/s25rttr/+bug/1069546
+SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug glfw"
+
+RDEPEND="app-arch/bzip2
+ media-libs/libsamplerate
+ media-libs/libsdl[X,sound,opengl,video]
+ media-libs/libsndfile
+ media-libs/sdl-mixer[vorbis]
+ net-libs/miniupnpc
+ virtual/libiconv
+ virtual/opengl
+ glfw? ( <media-libs/glfw-3 )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch \
+ "${FILESDIR}"/${P}-soundconverter.patch \
+ "${FILESDIR}"/${P}-fpic.patch \
+ "${FILESDIR}"/${P}-miniupnpc-api-14.patch
+}
+
+src_configure() {
+ local arch
+ case ${ARCH} in
+ amd64)
+ arch="x86_64" ;;
+ x86)
+ arch="i386" ;;
+ *) die "Architecture ${ARCH} not yet supported" ;;
+ esac
+
+ local mycmakeargs=(
+ -DCOMPILEFOR="linux"
+ -DCOMPILEARCH="${arch}"
+ -DCMAKE_SKIP_RPATH=YES
+ -DPREFIX="${GAMES_PREFIX}"
+ -DBINDIR="${GAMES_BINDIR}"
+ -DDATADIR="${GAMES_DATADIR}"
+ -DLIBDIR="$(games_get_libdir)/${PN}"
+ -DDRIVERDIR="$(games_get_libdir)/${PN}"
+ -DGAMEDIR="~/.${PN}/S2"
+ $(cmake-utils_use_build glfw GLFW_DRIVER)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # work around some relative paths (CMAKE_IN_SOURCE_BUILD not supported)
+ ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die
+
+ cmake-utils_src_compile
+
+ mv "${CMAKE_USE_DIR}"/RTTR/{sound-convert,s-c_resample} "${T}"/ || die
+}
+
+src_install() {
+ cd "${CMAKE_BUILD_DIR}" || die
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe "${T}"/{sound-convert,s-c_resample}
+ exeinto "$(games_get_libdir)"/${PN}/video
+ doexe driver/video/SDL/src/libvideoSDL.so
+ use glfw && doexe driver/video/GLFW/src/libvideoGLFW.so
+ exeinto "$(games_get_libdir)"/${PN}/audio
+ doexe driver/audio/SDL/src/libaudioSDL.so
+
+ insinto "${GAMES_DATADIR}"
+ doins -r "${CMAKE_USE_DIR}"/RTTR
+ dosym ./LSTS/splash.bmp "${GAMES_DATADIR}"/RTTR/splash.bmp
+
+ doicon -s 64 "${CMAKE_USE_DIR}"/debian/${PN}.png
+ dogamesbin src/s25client
+ make_desktop_entry "s25client" "Settlers RTTR" "${PN}"
+ dodoc RTTR/texte/{keyboardlayout.txt,readme.txt}
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Copy your Settlers2 game files into ~/.${PN}/S2"
+
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
next reply other threads:[~2016-01-10 20:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-10 20:37 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-23 2:40 [gentoo-commits] repo/gentoo:master commit in: games-strategy/s25rttr/files/, games-strategy/s25rttr/ Sam James
2022-08-11 7:37 Ionen Wolkens
2021-09-11 17:44 James Le Cuirot
2021-09-11 8:38 James Le Cuirot
2021-08-19 2:00 Sam James
2020-07-26 21:19 James Le Cuirot
2020-04-18 20:47 James Le Cuirot
2018-07-01 0:03 Andreas Sturmlechner
2016-02-16 6:47 Alfredo Tupone
2015-10-06 22:53 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=1452458246.245ec6adbd16742786282dd6a06814a24d1a7567.soap@gentoo \
--to=soap@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