Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654440 - games-strategy/wesnoth-1.14.1 version bump
Summary: games-strategy/wesnoth-1.14.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-30 19:52 UTC by Pavel Kozlov
Modified: 2018-06-11 09:57 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wesnoth-1.14.0.ebuild (wesnoth-1.14.0.ebuild,2.97 KB, text/plain)
2018-05-03 14:31 UTC, brho
Details
wesnoth-1.14.0.ebuild (wesnoth-1.14.0.ebuild,2.84 KB, text/plain)
2018-05-06 13:08 UTC, brho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Kozlov 2018-04-30 19:52:28 UTC
New version is released https://github.com/wesnoth/wesnoth/releases/tag/1.14.0
Comment 1 brho 2018-05-03 14:30:58 UTC
I attempted to put together an ebuild, based on the old one.  It compiles and runs.  I started a game, though I didn't play it much.

Here's the ebuild diff.

--- /usr/portage/games-strategy/wesnoth/wesnoth-1.12.6.ebuild	2017-11-18 15:27:08.000000000 -0500
+++ /usr/portage/games-strategy/wesnoth/wesnoth-1.14.0.ebuild	2018-05-03 10:20:32.206419220 -0400
@@ -13,20 +13,22 @@
 KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
 IUSE="dbus dedicated doc fribidi nls server"
 
-RDEPEND=">=media-libs/libsdl-1.2.7:0[joystick,video,X]
-	media-libs/sdl-net
+RDEPEND=">=media-libs/libsdl2-2.0.4:0[joystick,video,X]
+	media-libs/sdl2-net
 	!dedicated? (
-		>=media-libs/sdl-ttf-2.0.8
-		>=media-libs/sdl-mixer-1.2[vorbis]
-		>=media-libs/sdl-image-1.2[jpeg,png]
+		>=media-libs/sdl2-ttf-2.0.12
+		>=media-libs/sdl2-mixer-2.0.0[vorbis]
+		>=media-libs/sdl2-image-2.0.0[jpeg,png]
 		fribidi? ( dev-libs/fribidi )
 		dbus? ( sys-apps/dbus )
 		sys-libs/zlib
-		x11-libs/pango
+		media-libs/libvorbis
+		>=x11-libs/pango-1.22.0
+		>=x11-libs/cairo-1.10.0
+		>=media-libs/fontconfig-2.4.1
 		dev-lang/lua:0
-		media-libs/fontconfig
 	)
-	>=dev-libs/boost-1.48:=[nls,threads]
+	>=dev-libs/boost-1.50:=[nls,threads]
 	virtual/libintl"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
@@ -48,9 +50,6 @@
 			-e '/manual/d' \
 			doc/CMakeLists.txt || die
 	fi
-	# bug #472994
-	mv icons/wesnoth-icon-Mac.png icons/wesnoth-icon.png || die
-	mv icons/map-editor-icon-Mac.png icons/wesnoth_editor-icon.png || die
 
 	# respect LINGUAS (bug #483316)
 	if [[ ${LINGUAS+set} ]] ; then
@@ -110,7 +109,7 @@
 }
 
 src_install() {
-	DOCS="README.md changelog players_changelog" cmake-utils_src_install
+	DOCS="README.md changelog.md players_changelog.md" cmake-utils_src_install
 	if use dedicated || use server; then
 		keepdir "${GAMES_STATEDIR}/run/wesnothd"
 		doinitd "${T}"/wesnothd
Comment 2 brho 2018-05-03 14:31:51 UTC
Created attachment 529588 [details]
wesnoth-1.14.0.ebuild
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-04 11:28:42 UTC
The games eclass is deprecated and should no longer be used. Also please use EAPI-6 in the ebuild.
Comment 4 Nils Kneuper 2018-05-04 21:16:07 UTC
At least for 1.14.0 please make sure to include boost with icu use flag active. Without the game will crash when trying to enter the preferences or the multiplayer lobby.

This might be fixed in a later release, but for the moment it is required.
Comment 5 Peter Fox 2018-05-05 23:51:14 UTC
Appears to work for me (amd64) when launched from command line, but no wesnoth entry (or wesnoth map editor) in mate desktop menu.
Comment 6 Peter Fox 2018-05-06 00:01:29 UTC
Would <https://github.com/hasufell/games-overlay/blob/master/games-strategy/wesnoth/wesnoth-1.13.6-r1.ebuild> be a better starting point? I haven't tried it.
Comment 7 brho 2018-05-06 13:08:32 UTC
Created attachment 530186 [details]
wesnoth-1.14.0.ebuild

This version is based off the 13.6.1-r1 ebuild.  It uses EAPI 6, has icu for boost, doesn't crash when you go to 'preferences', and has an icon in the start menu (at least for xfce).

Here's the diff from the in-tree ebuild.

--- wesnoth-1.12.6.ebuild	2017-11-18 15:27:08.000000000 -0500
+++ wesnoth-1.14.0.ebuild 	2018-05-06 08:28:40.407545573 -0400
@@ -1,56 +1,65 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit cmake-utils eutils multilib toolchain-funcs flag-o-matic games
+EAPI=6
+inherit user cmake-utils
 
 DESCRIPTION="Battle for Wesnoth - A fantasy turn-based strategy game"
-HOMEPAGE="http://www.wesnoth.org/"
-SRC_URI="mirror://sourceforge/wesnoth/${P}.tar.bz2"
+HOMEPAGE="http://www.wesnoth.org
+	https://github.com/wesnoth/wesnoth"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
-IUSE="dbus dedicated doc fribidi nls server"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE="dbus dedicated doc fribidi nls openmp server tools"
 
-RDEPEND=">=media-libs/libsdl-1.2.7:0[joystick,video,X]
-	media-libs/sdl-net
+RDEPEND="
+	>=dev-libs/boost-1.50:=[nls,threads,icu]
+	>=media-libs/libsdl2-2.0.4:0[joystick,video,X]
+	media-libs/sdl2-net
+	virtual/libintl
 	!dedicated? (
-		>=media-libs/sdl-ttf-2.0.8
-		>=media-libs/sdl-mixer-1.2[vorbis]
-		>=media-libs/sdl-image-1.2[jpeg,png]
-		fribidi? ( dev-libs/fribidi )
-		dbus? ( sys-apps/dbus )
-		sys-libs/zlib
-		x11-libs/pango
 		dev-lang/lua:0
-		media-libs/fontconfig
-	)
-	>=dev-libs/boost-1.48:=[nls,threads]
-	virtual/libintl"
+		dev-libs/glib:2
+		>=media-libs/fontconfig-2.4.1
+		>=media-libs/sdl2-ttf-2.0.12
+		>=media-libs/sdl2-mixer-2.0.0[vorbis]
+		>=media-libs/sdl2-image-2.0.0[jpeg,png]
+		media-libs/libvorbis
+		x11-libs/libX11
+		>=x11-libs/pango-1.22.0
+		>=x11-libs/cairo-1.10.0
+		sys-libs/readline:0
+		sys-libs/zlib
+		dbus? ( sys-apps/dbus )
+		fribidi? ( dev-libs/fribidi )
+		tools? (
+			media-libs/libpng:0
+			sys-libs/zlib
+		)
+	)"
 DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	sys-devel/gettext"
+	sys-devel/gettext
+	virtual/pkgconfig"
+
+pkg_setup() {
+	if use openmp; then
+		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+	fi
+
+	enewgroup ${PN}
+	enewuser ${PN} -1 /bin/bash -1 ${PN}
+}
 
 src_prepare() {
 	cmake-utils_src_prepare
 
-	if use dedicated || use server ; then
-		sed \
-			-e "s:GAMES_BINDIR:${GAMES_BINDIR}:" \
-			-e "s:GAMES_STATEDIR:${GAMES_STATEDIR}:" \
-			-e "s/GAMES_USER_DED/${GAMES_USER_DED}/" \
-			-e "s/GAMES_GROUP/${GAMES_GROUP}/" "${FILESDIR}"/wesnothd.rc \
-			> "${T}"/wesnothd || die
-	fi
 	if ! use doc ; then
 		sed -i \
 			-e '/manual/d' \
 			doc/CMakeLists.txt || die
 	fi
-	# bug #472994
-	mv icons/wesnoth-icon-Mac.png icons/wesnoth-icon.png || die
-	mv icons/map-editor-icon-Mac.png icons/wesnoth_editor-icon.png || die
 
 	# respect LINGUAS (bug #483316)
 	if [[ ${LINGUAS+set} ]] ; then
@@ -69,51 +78,49 @@
 		filter-flags -fstack-protector
 		append-flags -fno-stack-protector
 	fi
+
 	# Work around eclass
 	append-flags -UNDEBUG
+
 	if use dedicated || use server ; then
 		mycmakeargs=(
-			"-DENABLE_CAMPAIGN_SERVER=TRUE"
-			"-DENABLE_SERVER=TRUE"
-			"-DSERVER_UID=${GAMES_USER_DED}"
-			"-DSERVER_GID=${GAMES_GROUP}"
-			"-DFIFO_DIR=${GAMES_STATEDIR}/run/wesnothd"
+			-DENABLE_CAMPAIGN_SERVER="ON"
+			-DENABLE_SERVER="ON"
+			-DSERVER_UID="${PN}"
+			-DSERVER_GID="${PN}"
+			-DFIFO_DIR="/run/wesnothd"
 			)
 	else
 		mycmakeargs=(
-			$(cmake-utils_use_enable fribidi FRIBIDI)
-			"-DENABLE_CAMPAIGN_SERVER=FALSE"
-			"-DENABLE_SERVER=FALSE"
+			-DENABLE_CAMPAIGN_SERVER="OFF"
+			-DENABLE_SERVER="OFF"
 			)
 	fi
 	mycmakeargs+=(
-		$(cmake-utils_use_enable !dedicated GAME)
-		$(cmake-utils_use_enable !dedicated ENABLE_DESKTOP_ENTRY)
-		$(cmake-utils_use_enable nls NLS)
-		$(cmake-utils_use_enable dbus NOTIFICATIONS)
-		"-DCMAKE_VERBOSE_MAKEFILE=TRUE"
-		"-DENABLE_STRICT_COMPILATION=FALSE"
-		"-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}"
-		"-DDATAROOTDIR=${GAMES_DATADIR}"
-		"-DBINDIR=${GAMES_BINDIR}"
-		"-DICONDIR=/usr/share/pixmaps"
-		"-DDESKTOPDIR=/usr/share/applications"
-		"-DLOCALEDIR=/usr/share/locale"
-		"-DMANDIR=/usr/share/man"
-		"-DDOCDIR=/usr/share/doc/${PF}"
+		-Wno-dev
+		-DENABLE_GAME="$(usex !dedicated)"
+		-DENABLE_DESKTOP_ENTRY="$(usex !dedicated)"
+		-DENABLE_NLS="$(usex !nls)"
+		-DENABLE_NOTIFICATIONS="$(usex dbus)"
+		-DENABLE_FRIBIDI="$(usex fribidi)"
+		-DENABLE_TOOLS="$(usex tools)"
+		-DENABLE_OMP="$(usex openmp)"
+		-DENABLE_STRICT_COMPILATION="OFF"
+		-DCMAKE_INSTALL_PREFIX="/usr"
+		-DDATAROOTDIR="/usr/share"
+		-DBINDIR="/usr/bin"
+		-DICONDIR="/usr/share/pixmaps"
+		-DDESKTOPDIR="/usr/share/applications"
+		-DMANDIR="/usr/share/man"
+		-DDOCDIR="/usr/share/doc/${PF}"
 		)
 	cmake-utils_src_configure
 }
 
-src_compile() {
-	cmake-utils_src_compile
-}
-
 src_install() {
-	DOCS="README.md changelog players_changelog" cmake-utils_src_install
+	DOCS="README.md changelog.md players_changelog.md" cmake-utils_src_install
 	if use dedicated || use server; then
-		keepdir "${GAMES_STATEDIR}/run/wesnothd"
-		doinitd "${T}"/wesnothd
+		keepdir "/run/wesnothd"
+		newinitd "${FILESDIR}"/wesnothd.rc wesnothd
 	fi
-	prepgamesdirs
 }
Comment 8 i.Dark_Templar 2018-05-10 18:10:13 UTC
With wesnoth-1.14.1[server], wesnothd doesn't start, init script contains placeholder values:

# /etc/init.d/wesnothd start
 * Caching service dependencies ...                                                                                                                                          [ ok ]
 * Starting wesnothd ...
 * start-stop-daemon: user `GAMES_USER_DED' not found                                                                                                                        [ !! ]
 * ERROR: wesnothd failed to start

=================================================================
                        Package Settings
=================================================================

games-strategy/wesnoth-1.14.1::gentoo was built with the following:
USE="dbus doc fribidi nls openmp server -dedicated" ABI_X86="(64)"
CFLAGS="-march=native -O2 -pipe -UNDEBUG"
CXXFLAGS="-march=native -O2 -pipe -UNDEBUG"
Comment 9 Larry the Git Cow gentoo-dev 2018-05-31 11:15:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e4ea8746ff0c79b77dc4326dcd67db3db7eed64

commit 4e4ea8746ff0c79b77dc4326dcd67db3db7eed64
Author:     Matija Skala <mskala@gmx.com>
AuthorDate: 2018-05-17 06:02:28 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-05-31 11:15:29 +0000

    games-strategy/wesnoth: new wesnothd.rc file for 1.14
    
    Bug: https://bugs.gentoo.org/654440
    Closes: https://github.com/gentoo/gentoo/pull/8440

 games-strategy/wesnoth/files/wesnothd.rc-r1        | 23 ++++++++++++++++++++++
 ...noth-1.14.1.ebuild => wesnoth-1.14.1-r1.ebuild} |  4 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)