diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2024-08-10 11:57:38 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2024-10-10 22:22:39 +0200 |
commit | 0bc4705b4ef4e51e307aea09ad70cf21b3c18000 (patch) | |
tree | dd1506b66bec36c595674cd2ab04057450e756ed /games-rpg/eternal-lands | |
parent | games-misc/gtklife: add 5.3 (diff) | |
download | gentoo-0bc4705b4ef4e51e307aea09ad70cf21b3c18000.tar.gz gentoo-0bc4705b4ef4e51e307aea09ad70cf21b3c18000.tar.bz2 gentoo-0bc4705b4ef4e51e307aea09ad70cf21b3c18000.zip |
games-rpg/eternal-lands: add 1.9.6.1
Closes: https://bugs.gentoo.org/860759
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'games-rpg/eternal-lands')
-rw-r--r-- | games-rpg/eternal-lands/Manifest | 1 | ||||
-rw-r--r-- | games-rpg/eternal-lands/eternal-lands-1.9.6.1.ebuild | 75 | ||||
-rw-r--r-- | games-rpg/eternal-lands/files/el-wrapper-1.9.6.1 | 53 | ||||
-rw-r--r-- | games-rpg/eternal-lands/files/eternal-lands-1.9.6.1-build.patch | 45 |
4 files changed, 174 insertions, 0 deletions
diff --git a/games-rpg/eternal-lands/Manifest b/games-rpg/eternal-lands/Manifest index 848ae6b0d7f6..3aa826620ea3 100644 --- a/games-rpg/eternal-lands/Manifest +++ b/games-rpg/eternal-lands/Manifest @@ -1 +1,2 @@ DIST eternal-lands-1.9.5.8.tar.gz 2863932 BLAKE2B f8c4e88b96b4ee73773a2675e7cf2746e5efe6bf029f046a2ce63496b22c217a93eeea9464977710b95c4fe2d928edefd6aa11a712a8fb82d911ee7d1fd993d3 SHA512 e5e89ec6e7df2b1ac80722b6daf5bbb350d2f1bc4c70c819992b528f25c2ac11434d053ff844ff5873deea16c5bbe305834ffeae7b5ecb6daea5638625851ce0 +DIST eternal-lands-1.9.6.1.tar.gz 3877154 BLAKE2B 50914c96caf3a6bda4a3a853a4ab680bc9da98283e528d0d1626a38d55504321035356f60dea1a5e307e7c87e07a024627171f81cb6a85e3b63d8df3270e0bb6 SHA512 ac0704b22e8f7525f0319a454b5be695e1640fc1be9fa5c5bbb5a0e32fde634fecb5bf33c23dd58115464d3c26b945ffb1bfb323f057f1c454601a7416d95b66 diff --git a/games-rpg/eternal-lands/eternal-lands-1.9.6.1.ebuild b/games-rpg/eternal-lands/eternal-lands-1.9.6.1.ebuild new file mode 100644 index 000000000000..414835307acf --- /dev/null +++ b/games-rpg/eternal-lands/eternal-lands-1.9.6.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop toolchain-funcs xdg + +DESCRIPTION="3D fantasy MMORPG written in C and SDL" +HOMEPAGE="https://www.eternal-lands.com" +SRC_URI="https://github.com/raduprv/Eternal-Lands/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/Eternal-Lands-${PV}" + +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-text/doxygen + media-gfx/graphviz + )" + +PATCHES=( + "${FILESDIR}/${PN}-1.9.6.1-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.6.1 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.6.1 b/games-rpg/eternal-lands/files/el-wrapper-1.9.6.1 new file mode 100644 index 000000000000..f475e001accb --- /dev/null +++ b/games-rpg/eternal-lands/files/el-wrapper-1.9.6.1 @@ -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.6.1/eternallands-data_1.9.6.1.zip -P $tmpdir + unzip $tmpdir/eternallands-data_1.9.6.1.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.6.1/eternallands-sound_1.9.6.1.zip -P $tmpdir + wget https://github.com/raduprv/Eternal-Lands/releases/download/1.9.6.1/eternallands-music_1.9.5.9.zip -P $tmpdir + unzip $tmpdir/eternallands-sound_1.9.6.1.zip -d $datadir + mkdir $datadir/music + unzip $tmpdir/eternallands-music_1.9.5.9.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.6.1-build.patch b/games-rpg/eternal-lands/files/eternal-lands-1.9.6.1-build.patch new file mode 100644 index 000000000000..b818d9cb300e --- /dev/null +++ b/games-rpg/eternal-lands/files/eternal-lands-1.9.6.1-build.patch @@ -0,0 +1,45 @@ +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -29,11 +29,11 @@ + $(shell pkg-config zlib --cflags) \ + $(foreach FEATURE, $(FEATURES), $($(FEATURE)_CFLAGS)) + +-CFLAGS=$(PLATFORM) $(CWARN) -O1 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES) ++CFLAGS += -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES) + +-CXXFLAGS=$(PLATFORM) $(CXXWARN) -O1 -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) \ +@@ -140,8 +140,8 @@ + + # 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 +@@ -152,14 +152,14 @@ + DEPS_MAGIC := $(shell mkdir $(DEPS_DIRS) > /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; \ |