commit:     1c93ee9db87756a95609a4b6a99fcb4909f532d4
Author:     Duje Mihanović <duje.mihanovic <AT> skole <DOT> hr>
AuthorDate: Thu Jan  5 14:45:47 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 14:45:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1c93ee9d

games-fps/assaultcube: configure bundled libenet in src_configure

Signed-off-by: Duje Mihanović <duje.mihanovic <AT> skole.hr>

 games-fps/assaultcube/assaultcube-1.3.0.2.ebuild   |  5 +++
 .../0002-Don-t-configure-libenet-in-Makefile.patch | 45 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild 
b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
index 8db59ebc9..1ea47bda7 100644
--- a/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
+++ b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
@@ -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
 }
 

diff --git 
a/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch 
b/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch
new file mode 100644
index 000000000..7a2f32abf
--- /dev/null
+++ b/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch
@@ -0,0 +1,45 @@
+From ab7618606b8358245b13dc5a7291fa3b0211fd10 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Duje=20Mihanovi=C4=87?= <[email protected]>
+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ć <[email protected]>
+---
+ 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
+

Reply via email to