summaryrefslogtreecommitdiff
path: root/games-rpg/eternal-lands/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
commit2018227e9344edb9da15fc6a4a8298086cc2aa77 (patch)
treec18e1c09e605e94e2a1e93345ad25746cc9e14b9 /games-rpg/eternal-lands/files
parent6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff)
gentoo resync : 02.06.2019
Diffstat (limited to 'games-rpg/eternal-lands/files')
-rw-r--r--games-rpg/eternal-lands/files/el-wrapper53
-rw-r--r--games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-build.patch70
-rw-r--r--games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-minizip.patch90
3 files changed, 213 insertions, 0 deletions
diff --git a/games-rpg/eternal-lands/files/el-wrapper b/games-rpg/eternal-lands/files/el-wrapper
new file mode 100644
index 000000000000..ab392d334207
--- /dev/null
+++ b/games-rpg/eternal-lands/files/el-wrapper
@@ -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.2/el_195_1_data_files.zip -P $tmpdir
+ unzip $tmpdir/el_195_1_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.3-build.patch b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-build.patch
new file mode 100644
index 000000000000..28f4ab0da542
--- /dev/null
+++ b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-build.patch
@@ -0,0 +1,70 @@
+From ef13ae006609e51eaddbcdf0495f44cfde797e26 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Tue, 14 May 2019 20:34:47 +0300
+Subject: [PATCH 1/2] 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 c57aeeeb..a0839c5c 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 += $(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 sdl --libs) \
++LDFLAGS += $(shell pkg-config sdl --libs) \
+ $(shell pkg-config libxml-2.0 --libs) \
+ $(shell pkg-config SDL_net --libs) \
+ $(shell pkg-config SDL_image --libs) \
+@@ -111,7 +111,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
+@@ -127,8 +127,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
+@@ -136,14 +136,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.21.0
+
diff --git a/games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-minizip.patch b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-minizip.patch
new file mode 100644
index 000000000000..c1eb35fdc849
--- /dev/null
+++ b/games-rpg/eternal-lands/files/eternal-lands-1.9.5.3-minizip.patch
@@ -0,0 +1,90 @@
+From 7df2f0a47ff2d25898063dc2fb30ba3d80d63afb Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Thu, 16 May 2019 05:31:16 +0300
+Subject: [PATCH 2/2] Unbundle minizip
+
+Original patch by Julian Ospald <hasufell@gentoo.org>.
+Bug: https://bugs.gentoo.org/423327
+
+Upstream-Status: Pending
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ Makefile.linux | 4 +++-
+ io/elfilewrapper.c | 2 +-
+ io/ziputil.h | 4 ++--
+ new_update.c | 4 ++--
+ 4 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.linux b/Makefile.linux
+index a0839c5c..d29ac912 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -12,6 +12,7 @@ OPTIONS = -DLINUX -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE)) -D_7ZIP_ST
+ $(shell pkg-config cal3d --cflags) \
+ $(shell pkg-config gl --cflags) \
+ $(shell pkg-config glu --cflags) \
++ $(shell pkg-config minizip --cflags) \
+ $(shell pkg-config openal --cflags) \
+ $(shell pkg-config vorbis --cflags) \
+ $(shell pkg-config vorbisfile --cflags) \
+@@ -28,6 +29,7 @@ LDFLAGS += $(shell pkg-config sdl --libs) \
+ $(shell pkg-config cal3d --libs) \
+ $(shell pkg-config gl --libs) \
+ $(shell pkg-config glu --libs) \
++ $(shell pkg-config minizip --libs) \
+ $(shell pkg-config openal --libs) \
+ $(shell pkg-config vorbis --libs) \
+ $(shell pkg-config vorbisfile --libs) \
+@@ -64,7 +66,7 @@ COBJS=2d_objects.o 3d_objects.o \
+ hud.o hud_misc_window.o hud_quickbar_window.o hud_statsbar_window.o hud_quickspells_window.o \
+ help.o highlight.o ignore.o image_loading.o init.o interface.o items.o io/fileutil.o \
+ io/e3d_io.o io/elc_io.o io/map_io.o io/elpathwrapper.o io/xmlcallbacks.o \
+- io/half.o io/normal.o io/elfilewrapper.o io/unzip.o io/ioapi.o io/zip.o io/ziputil.o \
++ io/half.o io/normal.o io/elfilewrapper.o io/ziputil.o \
+ keys.o knowledge.o langselwin.o lights.o list.o load_gl_extensions.o loginwin.o loading_win.o \
+ main.o manufacture.o map.o mapwin.o \
+ md5.o mines.o minimap.o misc.o missiles.o multiplayer.o \
+diff --git a/io/elfilewrapper.c b/io/elfilewrapper.c
+index fad99d62..5dee9a37 100644
+--- a/io/elfilewrapper.c
++++ b/io/elfilewrapper.c
+@@ -1,5 +1,5 @@
+ #include "elfilewrapper.h"
+-#include "unzip.h"
++#include <unzip.h>
+ #include "elpathwrapper.h"
+ #include "fileutil.h"
+ #include <sys/stat.h>
+diff --git a/io/ziputil.h b/io/ziputil.h
+index 86128315..51fa232b 100644
+--- a/io/ziputil.h
++++ b/io/ziputil.h
+@@ -8,8 +8,8 @@
+
+ #include <SDL.h>
+ #include "../md5.h"
+-#include "zip.h"
+-#include "unzip.h"
++#include <zip.h>
++#include <unzip.h>
+
+ #ifdef __cplusplus
+ extern "C"
+diff --git a/new_update.c b/new_update.c
+index febd10ae..ec039f6c 100644
+--- a/new_update.c
++++ b/new_update.c
+@@ -5,8 +5,8 @@
+ #include <string.h>
+ #include "md5.h"
+ #include "elc_private.h"
+-#include "io/zip.h"
+-#include "io/unzip.h"
++#include <zip.h>
++#include <unzip.h>
+ #include "io/ziputil.h"
+ #include "io/fileutil.h"
+ #include "io/elfilewrapper.h"
+--
+2.21.0
+