commit:     cc94c41489790dde45313e0f4d890e1b39b0c43e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 25 16:24:06 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 25 16:45:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc94c414

games-rpg/openglad: switch to premake:5 to handle race condition

5 works even with old premake4.lua and generates different rules that
doesn't seem like can race to create objects before the object dir
(not that 100% sure that fixes it).

Given nothing else in the tree depends on premake:4, also little
reason to hold on to that version if this works.

Closes: https://bugs.gentoo.org/804154
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-rpg/openglad/openglad-0.98_p20200907.ebuild | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/games-rpg/openglad/openglad-0.98_p20200907.ebuild 
b/games-rpg/openglad/openglad-0.98_p20200907.ebuild
index 132a5ea3979..33e42ea2dce 100644
--- a/games-rpg/openglad/openglad-0.98_p20200907.ebuild
+++ b/games-rpg/openglad/openglad-0.98_p20200907.ebuild
@@ -26,7 +26,7 @@ RDEPEND="
        media-libs/sdl2-mixer"
 DEPEND="${RDEPEND}"
 BDEPEND="
-       dev-util/premake:4
+       dev-util/premake:5
        virtual/pkgconfig"
 
 src_prepare() {
@@ -51,15 +51,25 @@ src_configure() {
        append-cppflags $($(tc-getPKG_CONFIG) --cflags "${pkgs[@]}" || die)
        append-libs $($(tc-getPKG_CONFIG) --libs "${pkgs[@]}" || die)
 
-       premake4 gmake || die
+       premake5 gmake || die
 }
 
 src_compile() {
-       emake verbose=y ARCH= CC="$(tc-getCC)" CXX="$(tc-getCXX)" LIBS="${LIBS}"
+       local emakeargs=(
+               config=release
+               verbose=y
+               ARCH= # build assumes this is -m64 and tries to pass it to the 
compiler
+               CC="$(tc-getCC)"
+               CXX="$(tc-getCXX)"
+               LIBS="${LIBS}"
+               ALL_LDFLAGS="${LDFLAGS}" # only used to override -s
+       )
+
+       emake "${emakeargs[@]}"
 }
 
 src_install() {
-       dobin ${PN}
+       dobin bin/Release/${PN}
 
        insinto /usr/share/${PN}
        doins -r builtin cfg extra_campaigns pix sound
@@ -69,5 +79,5 @@ src_install() {
        einstalldocs
 
        doicon "${DISTDIR}"/${PN}.png
-       make_desktop_entry openglad Openglad
+       make_desktop_entry ${PN} ${PN^}
 }

Reply via email to