mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
games-roguelike/tomenet: add 4.9.1
Signed-off-by: Stefan Strogin <steils@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST tomenet-4.7.3.tar.bz2 3355774 BLAKE2B e574434d283525793ad7b7e2c23103692c540be8727a90623b9fd52aba47d245be99cb39846046f4ba78795e168c8ef9342ff9ee16417dce3698036cbd6c50eb SHA512 25c7dedcd63306ada738078c412a45483ee6ac4c6fe116624a409cb4c9795270942cac2428c1ecafac45bbc9e3044890e308f8bd1bb1344dd156a610948addcd
|
||||
DIST tomenet-4.9.1.tar.bz2 5203112 BLAKE2B fa7ade988c94334416101d31fed0538b50a49cc46027d40eef3a85573973cee2b5c70db1815b531137104e4f51d42efc2cdf7bbc76219ee7b89b5d60dd0bea4a SHA512 20c03aea73f6d231a8e3d9bd0426baf5e96582e0df54c907565fbb4214d76eb0d42f59bb3ca1c604ec0e20604877f71b31c821140a8763b22ddcf55ba9c3f9ef
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/config.h b/config.h
|
||||
index 6280af8f0..f8c8ddebf 100644
|
||||
--- a/config.h
|
||||
+++ b/config.h
|
||||
@@ -833,7 +833,6 @@
|
||||
/*
|
||||
* Use the new meta scheme to do neater things
|
||||
*/
|
||||
-#define EXPERIMENTAL_META
|
||||
#ifdef EXPERIMENTAL_META
|
||||
/* Retrieve ping times for all servers listed on the meta server. - C. Blue
|
||||
The number indicates the max number of server names we read (raw, ie duplicates included).
|
||||
48
games-roguelike/tomenet/files/tomenet-4.9.1-makefile.patch
Normal file
48
games-roguelike/tomenet/files/tomenet-4.9.1-makefile.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
diff --git a/makefile b/makefile
|
||||
index cd79e4d4d..4d3c5e53b 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -224,7 +224,7 @@ CPP = cpp
|
||||
#thing is, that the correctly transcribed URL will actually make tolua choke.
|
||||
#So, -nostdinc will prevent the whole own comment blob of cpp to get generated
|
||||
#in the first place, as we never asked for it:
|
||||
-CPPFLAGS = -C -P -nostdinc
|
||||
+CPPFLAGS = -C -P -nostdinc $(GENTOO_CPPFLAGS)
|
||||
|
||||
# gcc variant:
|
||||
#CPP = gcc
|
||||
@@ -235,6 +235,21 @@ CPPFLAGS = -C -P -nostdinc
|
||||
# For variations with X11
|
||||
X11BASE = /usr/X11R6
|
||||
|
||||
+# Defines
|
||||
+ifdef USE_SDL
|
||||
+CFLAGS += -DSOUND_SDL -I/usr/local/include/SDL2 -I/usr/include/SDL2 $(shell sdl-config --cflags)
|
||||
+SDL_LIBS = $(shell sdl-config --libs) -lSDL2 -lSDL2_mixer
|
||||
+endif
|
||||
+
|
||||
+ifdef USE_X
|
||||
+CFLAGS += -DUSE_X11
|
||||
+LIBS += -lX11
|
||||
+endif
|
||||
+
|
||||
+CFLAGS += -Wall
|
||||
+CFLAGS += -DUSE_GCU -D_XOPEN_SOURCE -D_DEFAULT_SOURCE -DMEXP=19937 -std=c99
|
||||
+LIBS += $(shell ${PKG_CONFIG} --libs ncurses) -lcrypt -lm ${SDL_LIBS}
|
||||
+
|
||||
|
||||
# Account editor
|
||||
ACCEDIT_LIBS = -lncurses -lcrypt
|
||||
@@ -289,12 +304,10 @@ SERVER_EXTRA_LIBS = -lcrypt
|
||||
|
||||
# With SDL2
|
||||
# With sdl2-config
|
||||
-CFLAGS = -pipe -Wall -DUSE_GCU -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -D_DEFAULT_SOURCE -DACC32 -fPIE -fsigned-char -Wno-format-truncation
|
||||
# Note: -fsigned-char is important for ARM64, as there 'char' is by default unsigned, while on x86/AM64 it is by default signed!
|
||||
# With manually set prefix
|
||||
#CFLAGS = -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -DSOUND_SDL -I/usr/local/include/SDL2 -I/usr/include/SDL2 -D_REENTRANT -D_DEFAULT_SOURCE -DACC32 -fPIE -Wno-format-truncation
|
||||
# With sdl2-config
|
||||
-LIBS = -L/usr/pkg/lib -lncurses -lm
|
||||
# With manually set prefix
|
||||
#LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lncurses -lm -L/usr/local/lib -L/usr/lib -pthread -lSDL2 -lSDL2_mixer
|
||||
|
||||
98
games-roguelike/tomenet/tomenet-4.9.1.ebuild
Normal file
98
games-roguelike/tomenet/tomenet-4.9.1.ebuild
Normal file
@@ -0,0 +1,98 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit desktop toolchain-funcs xdg
|
||||
|
||||
DESCRIPTION="A MMORPG based on the works of J.R.R. Tolkien"
|
||||
HOMEPAGE="https://www.tomenet.eu"
|
||||
SRC_URI="https://www.tomenet.eu/downloads/${P}.tar.bz2"
|
||||
|
||||
LICENSE="Moria"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+client server +sound X"
|
||||
REQUIRED_USE="|| ( client server )"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:0
|
||||
client? (
|
||||
X? (
|
||||
x11-libs/libX11
|
||||
)
|
||||
sound? (
|
||||
media-libs/libsdl[sound]
|
||||
media-libs/sdl-mixer[vorbis,smpeg,mp3]
|
||||
)
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
client? ( sound? ( app-arch/p7zip ) )"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
S=${WORKDIR}/${P}/src
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-makefile.patch
|
||||
"${FILESDIR}"/${P}-disable-experimental.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if ! use server; then
|
||||
rm -r ../lib/{config,data,save} || die
|
||||
fi
|
||||
|
||||
sed \
|
||||
-e "s#@LIBDIR@#${EPREFIX}/usr/share/${PN}#" \
|
||||
"${FILESDIR}"/${PN}-wrapper > "${T}"/${PN} || die
|
||||
|
||||
if use server; then
|
||||
sed \
|
||||
-e "s#@LIBDIR@#${EPREFIX}/usr/share/${PN}#" \
|
||||
"${FILESDIR}"/${PN}-server-wrapper > "${T}"/${PN}.server || die
|
||||
fi
|
||||
|
||||
tc-export PKG_CONFIG
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local mytargets="$(usex client "tomenet" "") $(usex server "accedit tomenet.server" "")"
|
||||
emake \
|
||||
$(usex client "$(usex X "USE_X=1" "")" "") \
|
||||
$(usex client "$(usex sound "USE_SDL=1" "")" "") \
|
||||
CC="$(tc-getCC)" \
|
||||
CPP="$(tc-getCPP)" \
|
||||
GENTOO_CPPFLAGS="${CPPFLAGS}" \
|
||||
-f makefile \
|
||||
${mytargets[@]}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc ../TomeNET-Guide.txt
|
||||
|
||||
if use client ; then
|
||||
newbin ${PN} ${PN}.bin
|
||||
dobin "${T}"/${PN}
|
||||
|
||||
doicon -s 48 client/tomenet4.png
|
||||
make_desktop_entry ${PN} ${PN} ${PN}4
|
||||
fi
|
||||
|
||||
if use server ; then
|
||||
newbin tomenet.server tomenet.server.bin
|
||||
dobin "${T}"/${PN}.server accedit
|
||||
fi
|
||||
|
||||
insinto "/usr/share/${PN}"
|
||||
doins -r ../lib/*
|
||||
doins ../.tomenetrc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use sound; then
|
||||
elog "You can get soundpacks from here:"
|
||||
elog ' https://tomenet.eu/downloads.php'
|
||||
elog "They must be placed inside ~/.tomenet directory."
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user