summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <steils@gentoo.org>2020-06-05 08:32:18 +0300
committerStefan Strogin <steils@gentoo.org>2020-06-05 08:35:00 +0300
commit05fa8e7395ed3aa78b2f79d0464b2686912f2a7a (patch)
tree27d48a384c0a8fa98056e29992d73656373affe0 /games-rpg
parentnet-analyzer/tcpreplay: Version 4.3.3_beta1 (diff)
downloadgentoo-05fa8e7395ed3aa78b2f79d0464b2686912f2a7a.tar.gz
gentoo-05fa8e7395ed3aa78b2f79d0464b2686912f2a7a.tar.bz2
gentoo-05fa8e7395ed3aa78b2f79d0464b2686912f2a7a.zip
games-rpg/eternal-lands: version bump to 1.9.5.8
- SDL -> SDL2. - Update the launcher to download game data from release 1.9.5.7. Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Stefan Strogin <steils@gentoo.org>
Diffstat (limited to 'games-rpg')
-rw-r--r--games-rpg/eternal-lands/Manifest1
-rw-r--r--games-rpg/eternal-lands/eternal-lands-1.9.5.8.ebuild75
-rw-r--r--games-rpg/eternal-lands/files/el-wrapper-1.9.5.853
-rw-r--r--games-rpg/eternal-lands/files/eternal-lands-1.9.5.8-build.patch70
4 files changed, 199 insertions, 0 deletions
diff --git a/games-rpg/eternal-lands/Manifest b/games-rpg/eternal-lands/Manifest
index 7594d8dd2e0c..9431423a1e2c 100644
--- a/games-rpg/eternal-lands/Manifest
+++ b/games-rpg/eternal-lands/Manifest
@@ -1 +1,2 @@
DIST eternal-lands-1.9.5.3.tar.gz 2814562 BLAKE2B ccb3dd78d12817912293f8babbd5f5dde6f0e3ea0cb34526edd7a3f0371f5313f94ff2d6b22cf472442869dfcf9893c19ec72d7ccf879b0e6a3dbfa05249c38f SHA512 bf0da70080377a76c66d6201da6032aae2967051e23f8aa433d450ec845bcd91145b965632fa63f66feebc15eaa9a65ff8f33884cc1b7c3605125f1536d91563
+DIST eternal-lands-1.9.5.8.tar.gz 2863932 BLAKE2B f8c4e88b96b4ee73773a2675e7cf2746e5efe6bf029f046a2ce63496b22c217a93eeea9464977710b95c4fe2d928edefd6aa11a712a8fb82d911ee7d1fd993d3 SHA512 e5e89ec6e7df2b1ac80722b6daf5bbb350d2f1bc4c70c819992b528f25c2ac11434d053ff844ff5873deea16c5bbe305834ffeae7b5ecb6daea5638625851ce0
diff --git a/games-rpg/eternal-lands/eternal-lands-1.9.5.8.ebuild b/games-rpg/eternal-lands/eternal-lands-1.9.5.8.ebuild
new file mode 100644
index 000000000000..aae74143d659
--- /dev/null
+++ b/games-rpg/eternal-lands/eternal-lands-1.9.5.8.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit desktop toolchain-funcs xdg
+
+DESCRIPTION="A 3D fantasy MMORPG written in C and SDL"
+HOMEPAGE="http://www.eternal-lands.com"
+SRC_URI="https://github.com/raduprv/Eternal-Lands/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="eternal_lands"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="app-arch/unzip
+ dev-libs/libxml2
+ media-libs/cal3d[-16bit-indices]
+ media-libs/freealut
+ media-libs/libpng:0=
+ media-libs/libsdl2[X,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ media-libs/sdl2-image
+ media-libs/sdl2-net
+ sys-libs/zlib[minizip]
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext"
+DEPEND="${RDEPEND}
+ media-libs/glew"
+BDEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )"
+
+S="${WORKDIR}/Eternal-Lands-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.9.5.8-build.patch"
+ "${FILESDIR}/${PN}-1.9.5.3-minizip.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -i "s/FEATURES/EL_FEATURES/g" make.defaults || die
+ sed -i "s/FEATURES/EL_FEATURES/g" Makefile.linux || die
+
+ # Remove bundled minizip
+ rm io/{crypt,ioapi,unzip,zip}.h || die
+ rm io/{ioapi,unzip,zip}.c || die
+
+ cp Makefile.linux Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ use doc && emake docs
+}
+
+src_install() {
+ dobin el.linux.bin
+ newbin "${FILESDIR}"/el-wrapper-1.9.5.8 el
+ newicon -s 48 elc.png ${PN}.png
+ make_desktop_entry el "Eternal Lands"
+
+ dodoc CHANGES TODO
+ use doc && dodoc -r docs/html/
+}
diff --git a/games-rpg/eternal-lands/files/el-wrapper-1.9.5.8 b/games-rpg/eternal-lands/files/el-wrapper-1.9.5.8
new file mode 100644
index 000000000000..3439c2a11625
--- /dev/null
+++ b/games-rpg/eternal-lands/files/el-wrapper-1.9.5.8
@@ -0,0 +1,53 @@
+#!/bin/bash -e
+
+elc=~/.elc
+datadir=$elc/el_data
+browser=xdg-open
+
+if [[ ! -e $elc ]] || [[ ! -e $datadir ]] || [[ ! -e $elc/servers.lst ]] ||
+ [[ ! -e $elc/el.ini ]]; then
+
+ [[ -e $elc ]] || mkdir -p $elc
+
+ if [[ ! -e $datadir ]]; then
+ echo
+ echo "The \"Eternal Lands\" launcher is downloading the game data..."
+ echo "It is only needed before the first start."
+ echo "The default data location is ~/.elc/el_data"
+ echo
+
+ tmpdir="`mktemp -d /tmp/eternal-lands.XXXXXXXXXX`"
+ trap "rm -r $tmpdir" EXIT
+ wget https://github.com/raduprv/Eternal-Lands/releases/download/1.9.5.7/el_195_p7_data_files.zip -P $tmpdir
+ unzip $tmpdir/el_195_p7_data_files.zip -d $elc
+
+ echo
+ echo "The game sound and music are optional, you can download \
+them now or any time later from the official website and unpack into \
+~/.elc/el_data/sound and ~/.elc/el_data/music"
+ while true; do
+ read -r -n 1 -p "Download the game sound and music now? (y/n) " yn
+ case $yn in
+ [Yy]) break;;
+ [Nn]) break;;
+ *) echo -e "\nPlease answer Yes or No.";;
+ esac
+ done
+ echo
+
+ if [[ $yn == [Yy] ]]; then
+ wget https://github.com/raduprv/Eternal-Lands/releases/download/1.9.5.2/eternallands-sound_1.9.4.zip -P $tmpdir
+ wget https://github.com/raduprv/Eternal-Lands/releases/download/1.9.5.2/music_full.zip -P $tmpdir
+ unzip $tmpdir/eternallands-sound_1.9.4.zip -d $datadir
+ mkdir $datadir/music
+ unzip $tmpdir/music_full.zip -d $datadir/music
+ fi
+
+ rm -r $tmpdir
+ fi
+
+ [[ -e $elc/servers.lst ]] || cp $datadir/servers.lst $elc/
+ [[ -e $elc/el.ini ]] || cp $datadir/el.ini $elc/
+fi
+
+exec /usr/bin/el.linux.bin -dir="$datadir" -b="$browser" "$@"
diff --git a/games-rpg/eternal-lands/files/eternal-lands-1.9.5.8-build.patch b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.8-build.patch
new file mode 100644
index 000000000000..d4aaa2bd415f
--- /dev/null
+++ b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.8-build.patch
@@ -0,0 +1,70 @@
+From 0f93097a58d78e0ba9d51d48f56b470047b27210 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Fri, 5 Jun 2020 07:19:47 +0300
+Subject: [PATCH] Respect {C,CXX,LD}FLAGS
+
+Upstream-Status: Inappropriate [Gentoo-specific]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ Makefile.linux | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.linux b/Makefile.linux
+index eb57e0e..c9bbc73 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -17,11 +17,11 @@ OPTIONS = -DLINUX -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE)) -D_7ZIP_ST
+ $(shell pkg-config vorbisfile --cflags) \
+ $(shell pkg-config zlib --cflags)
+
+-CFLAGS=$(PLATFORM) $(CWARN) -O0 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
++CFLAGS += -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
+
+-CXXFLAGS=$(PLATFORM) $(CXXWARN) -O0 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
++CXXFLAGS += $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
+
+-LDFLAGS=$(shell pkg-config sdl2 --libs) \
++LDFLAGS += $(shell pkg-config sdl2 --libs) \
+ $(shell pkg-config libxml-2.0 --libs) \
+ $(shell pkg-config SDL2_net --libs) \
+ $(shell pkg-config SDL2_image --libs) \
+@@ -112,7 +112,7 @@ HEADER_DIRS = . books eye_candy io pawn fsaa engine xz
+ DEP_FILES=$(foreach OBJ, $(COBJS), .deps/$(OBJ).P) $(foreach OBJ, $(CXXOBJS), .deps/$(OBJ).P)
+ #(shell echo $OBJ |sed s/\.o/\.P/))
+
+-EXE=el.x86.linux.bin
++EXE=el.linux.bin
+
+ ifndef CC
+ CC=gcc
+@@ -128,8 +128,8 @@ all: $(EXE)
+
+ # the compile targets
+ $(EXE): $(OBJS)
+- @echo " LINK $(EXE)"
+- @$(LINK) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)
++ @echo "$(CC) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)"
++ @$(CC) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)
+
+ #recompile on Makefile or conf change
+ #.depend $(OBJS): Makefile.linux make.conf
+@@ -137,14 +137,14 @@ $(EXE): $(OBJS)
+ DEPS_MAGIC := $(shell mkdir .deps .deps/io .deps/shader .deps/eye_candy .deps/exceptions .deps/xz .deps/xml .deps/fsaa .deps/engine > /dev/null 2>&1 || :)
+
+ $(COBJS): %.o: %.c Makefile.linux make.conf
+- @echo " CC $@"
++ @echo "$(CC) $(CFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@"
+ @if $(CC) $(CFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@; then \
+ mv ".deps/$@.pp" ".deps/$@.P"; \
+ else rm -f ".deps/$@.pp"; exit 1; \
+ fi
+
+ $(CXXOBJS): %.o: %.cpp Makefile.linux make.conf
+- @echo " CXX $@"
++ @echo "$(CXX) $(CXXFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@"
+ @if $(CXX) $(CXXFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@; then \
+ mv ".deps/$@.pp" ".deps/$@.P"; \
+ else rm -f ".deps/$@.pp"; exit 1; \
+--
+2.27.0
+