games-fps/assaultcube: configure bundled libenet in src_configure

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
This commit is contained in:
Duje Mihanović
2023-01-05 15:45:47 +01:00
parent c0387e14ef
commit 1c93ee9db8
2 changed files with 50 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ PATCHES=(
# a script which checks for required libs and certain parts of the game
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch"
"${FILESDIR}/0001-Fix-unnecessary-rebuild-on-make-install.patch"
"${FILESDIR}/0002-Don-t-configure-libenet-in-Makefile.patch"
)
src_prepare() {
@@ -40,12 +41,16 @@ src_prepare() {
src_configure() {
filter-lto
cd source/enet && ./configure \
--enable-shared=no \
--enable-static=yes
}
src_compile() {
if use debug; then
local -x DEBUGBUILD=1
fi
emake -C source/enet
emake -C source/src
}

View File

@@ -0,0 +1,45 @@
From ab7618606b8358245b13dc5a7291fa3b0211fd10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Duje=20Mihanovi=C4=87?= <duje.mihanovic@skole.hr>
Date: Thu, 5 Jan 2023 15:14:48 +0100
Subject: [PATCH 2/2] Don't configure libenet in Makefile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This shall be done in the ebuild's src_configure instead.
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
source/src/Makefile | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/source/src/Makefile b/source/src/Makefile
index 9ecf691..6607f91 100644
--- a/source/src/Makefile
+++ b/source/src/Makefile
@@ -155,19 +155,16 @@ default: all
all: client server
-../enet/Makefile:
- cd ../enet; ./configure --enable-shared=no --enable-static=yes
-
-../enet/.libs/libenet.la: ../enet/Makefile
+../enet/.libs/libenet.la:
-$(MAKE) -C ../enet all
-clean-enet: ../enet/Makefile
+clean-enet:
$(MAKE) -C ../enet/ clean
clean:
-$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) ac_client ac_server ac_master
-mrproper: clean ../enet/Makefile
+mrproper: clean
$(MAKE) -C ../enet/ distclean
-$(RM) ../enet/Makefile
--
2.38.2