• Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with gam

    From [email protected]@21:1/5 to All on Thu Feb 15 14:30:01 2024
    Am 15.02.24 um 13:59 schrieb Eli Schwartz:
    On 2/15/24 7:53 AM, Matthias Schwarzott wrote:
    When stratagus is compiled with USE=debug, its executable is called
    /usr/bin/stratatgus-dbg.

    Signed-off-by: Matthias Schwarzott <[email protected]>
    ---
    games-strategy/wargus/wargus-3.3.2.ebuild | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/games-strategy/wargus/wargus-3.3.2.ebuild b/games-strategy/wargus/wargus-3.3.2.ebuild
    index fff6023fa177..3295b2911d48 100644
    --- a/games-strategy/wargus/wargus-3.3.2.ebuild
    +++ b/games-strategy/wargus/wargus-3.3.2.ebuild
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8
    @@ -46,10 +46,12 @@ pkg_pretend() {
    }

    src_configure() {
    + local suffix=
    + has_version games-engines/stratagus[debug] && suffix=-dbg
    local mycmakeargs=(
    -DGAMEDIR="${EPREFIX}/usr/bin"
    -DBINDIR="${EPREFIX}/usr/bin"
    - -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus"
    + -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus${suffix}"
    -DSHAREDIR="${EPREFIX}/usr/share/stratagus/wargus"
    -DICONDIR=/usr/share/icons/hicolor/64x64/apps
    -DWITH_STORMLIB=$(usex bne)



    Ok so this just means the package will be broken if you change the USE
    flags for stratagus and wargus doesn't get rebuilt.

    Exactly. It would even be simpler to patch that renaming out. I will
    send a change to stratagus-ebuild.

    Why is the executable name different, anyway?

    I have no clue. My guess is to have a separate executable.

    This is from stratagus CMakeLists.txt:
    ==== cut ===
    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set_target_properties(stratagus PROPERTIES OUTPUT_NAME stratagus-dbg) endif()
    ==== cut ===

    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to [email protected] on Thu Feb 15 15:10:01 2024
    On Thu, 2024-02-15 at 14:21 +0100, [email protected] wrote:
    Am 15.02.24 um 13:59 schrieb Eli Schwartz:
    On 2/15/24 7:53 AM, Matthias Schwarzott wrote:
    When stratagus is compiled with USE=debug, its executable is called /usr/bin/stratatgus-dbg.

    Signed-off-by: Matthias Schwarzott <[email protected]>
    ---
    games-strategy/wargus/wargus-3.3.2.ebuild | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/games-strategy/wargus/wargus-3.3.2.ebuild b/games-strategy/wargus/wargus-3.3.2.ebuild
    index fff6023fa177..3295b2911d48 100644
    --- a/games-strategy/wargus/wargus-3.3.2.ebuild
    +++ b/games-strategy/wargus/wargus-3.3.2.ebuild
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8
    @@ -46,10 +46,12 @@ pkg_pretend() {
    }

    src_configure() {
    + local suffix=
    + has_version games-engines/stratagus[debug] && suffix=-dbg
    local mycmakeargs=(
    -DGAMEDIR="${EPREFIX}/usr/bin"
    -DBINDIR="${EPREFIX}/usr/bin"
    - -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus"
    + -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus${suffix}"
    -DSHAREDIR="${EPREFIX}/usr/share/stratagus/wargus"
    -DICONDIR=/usr/share/icons/hicolor/64x64/apps
    -DWITH_STORMLIB=$(usex bne)



    Ok so this just means the package will be broken if you change the USE flags for stratagus and wargus doesn't get rebuilt.

    Exactly. It would even be simpler to patch that renaming out. I will
    send a change to stratagus-ebuild.

    Why is the executable name different, anyway?

    I have no clue. My guess is to have a separate executable.

    This is from stratagus CMakeLists.txt:
    ==== cut ===
    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set_target_properties(stratagus PROPERTIES OUTPUT_NAME stratagus-dbg) endif()
    ==== cut ===


    Wait, why are we changing CMAKE_BUILD_TYPE in the first place?!

    --
    Best regards,
    Michał Górny


    -----BEGIN PGP SIGNATURE-----

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmXOGxESHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOimAIAI/NtlGJRi/2NhCbGmUVCPeUSeRYtPxj lvjchhwqZSgzsS/MVp7HJuWacjgTAPemrN3q5qVwyrDcxGcN1iAfgTSByMP5qSBf zp7x+GV7PCSgcmvzFzTGrgzagcO+4PCWLeIlhSZX81rq1HNu3ExpXGf1mBWsqYeT FQ91fZL8H/h3anb9WAsTtem9f2NyqsmyCEJg3j69lNmqWqkwagOi4CFxaUgBNXTC b9cttXneq7pp8FD4I+TLzS4zdd8okEz8mWBuCwkewsI2pj6MrgNipjLjNTP552LQ ANsJBT3krzCUn9nOF/NFjcJTvr/OVXQCZFdt+NFZoIkcle9IsF+Eu6k=
    =yWLo
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to parona on Thu Feb 15 16:10:01 2024
    On Thu, 2024-02-15 at 14:23 +0000, parona wrote:
    On Thursday, 15 February 2024 at 16:09, Michał Górny <[email protected]> wrote:

    On Thu, 2024-02-15 at 14:21 +0100, [email protected] wrote:

    Am 15.02.24 um 13:59 schrieb Eli Schwartz:

    On 2/15/24 7:53 AM, Matthias Schwarzott wrote:

    When stratagus is compiled with USE=debug, its executable is called /usr/bin/stratatgus-dbg.

    Signed-off-by: Matthias Schwarzott [email protected]
    ---
    games-strategy/wargus/wargus-3.3.2.ebuild | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/games-strategy/wargus/wargus-3.3.2.ebuild b/games-strategy/wargus/wargus-3.3.2.ebuild
    index fff6023fa177..3295b2911d48 100644
    --- a/games-strategy/wargus/wargus-3.3.2.ebuild
    +++ b/games-strategy/wargus/wargus-3.3.2.ebuild
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8
    @@ -46,10 +46,12 @@ pkg_pretend() {
    }

    src_configure() {
    + local suffix=
    + has_version games-engines/stratagus[debug] && suffix=-dbg
    local mycmakeargs=(
    -DGAMEDIR="${EPREFIX}/usr/bin"
    -DBINDIR="${EPREFIX}/usr/bin"
    - -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus"
    + -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus${suffix}" -DSHAREDIR="${EPREFIX}/usr/share/stratagus/wargus" -DICONDIR=/usr/share/icons/hicolor/64x64/apps
    -DWITH_STORMLIB=$(usex bne)

    Ok so this just means the package will be broken if you change the USE flags for stratagus and wargus doesn't get rebuilt.

    Exactly. It would even be simpler to patch that renaming out. I will
    send a change to stratagus-ebuild.

    Why is the executable name different, anyway?

    I have no clue. My guess is to have a separate executable.

    This is from stratagus CMakeLists.txt:
    ==== cut ===
    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set_target_properties(stratagus PROPERTIES OUTPUT_NAME stratagus-dbg) endif()
    ==== cut ===


    Wait, why are we changing CMAKE_BUILD_TYPE in the first place?!


    The debug use flag could be dropped altogether or at least replaced with append-cppflags -DDEBUG instead of setting CMAKE_BUILD_TYPE. The only relevant thing that setting CMAKE_BUILD_TYPE to Debug does is to add -DDEBUG to CPPFLAGS.

    https://github.com/search?q=repo%3AWargus%2Fstratagus+%2F%23ifdef+DEBUG%2F&type=code


    Oh, sorry, I've just realized that I'm maintaining stratagus these days.
    Will fix it, thanks!

    --
    Best regards,
    Michał Górny


    -----BEGIN PGP SIGNATURE-----

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmXOKHwSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOEkcH/jAWdpiN6jvCX3DIhYgegv6MVmQBh6nZ +dGyxNbrvX39HvyhG8pebTyiNxEjraL+ZAKP/2yKIzvjo1PAM76bs3r6u9R3adQw BFcPDXU7LzVO7N49HlNHUOkHzgug80mLwu6hs7Y/vPy3OuWVtWYFa5oQo+wfqVq6 Fd24Csuki248ByKMXRMMIkvAhIIA8ir7uIXYU+W71IkR9eevlKA45HDDQ7cGMIN4 95y0OKYUt+ldlwOnEOEDiA3wiTfMKLrmBJUUIRJjee12At4AyfhUrcXTTiuIau46 Tz98+39qhQEinQ2OmWpceFFYnt5+bMFqMCQkBuoauyvbKTm5V5ds160=
    =KUkk
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From parona@21:1/5 to [email protected] on Thu Feb 15 15:30:01 2024
    On Thursday, 15 February 2024 at 16:09, Michał Górny <[email protected]> wrote:

    On Thu, 2024-02-15 at 14:21 +0100, [email protected] wrote:

    Am 15.02.24 um 13:59 schrieb Eli Schwartz:

    On 2/15/24 7:53 AM, Matthias Schwarzott wrote:

    When stratagus is compiled with USE=debug, its executable is called /usr/bin/stratatgus-dbg.

    Signed-off-by: Matthias Schwarzott [email protected]
    ---
    games-strategy/wargus/wargus-3.3.2.ebuild | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/games-strategy/wargus/wargus-3.3.2.ebuild b/games-strategy/wargus/wargus-3.3.2.ebuild
    index fff6023fa177..3295b2911d48 100644
    --- a/games-strategy/wargus/wargus-3.3.2.ebuild
    +++ b/games-strategy/wargus/wargus-3.3.2.ebuild
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8
    @@ -46,10 +46,12 @@ pkg_pretend() {
    }

    src_configure() {
    + local suffix=
    + has_version games-engines/stratagus[debug] && suffix=-dbg
    local mycmakeargs=(
    -DGAMEDIR="${EPREFIX}/usr/bin"
    -DBINDIR="${EPREFIX}/usr/bin"
    - -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus"
    + -DSTRATAGUS="${EPREFIX}/usr/bin/stratagus${suffix}" -DSHAREDIR="${EPREFIX}/usr/share/stratagus/wargus" -DICONDIR=/usr/share/icons/hicolor/64x64/apps
    -DWITH_STORMLIB=$(usex bne)

    Ok so this just means the package will be broken if you change the USE flags for stratagus and wargus doesn't get rebuilt.

    Exactly. It would even be simpler to patch that renaming out. I will
    send a change to stratagus-ebuild.

    Why is the executable name different, anyway?

    I have no clue. My guess is to have a separate executable.

    This is from stratagus CMakeLists.txt:
    ==== cut ===
    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set_target_properties(stratagus PROPERTIES OUTPUT_NAME stratagus-dbg) endif()
    ==== cut ===


    Wait, why are we changing CMAKE_BUILD_TYPE in the first place?!


    The debug use flag could be dropped altogether or at least replaced with append-cppflags -DDEBUG instead of setting CMAKE_BUILD_TYPE. The only relevant thing that setting CMAKE_BUILD_TYPE to Debug does is to add -DDEBUG to CPPFLAGS.

    https://github.com/search?q=repo%3AWargus%2Fstratagus+%2F%23ifdef+DEBUG%2F&type=code

    --
    Alfred Wingate

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Thu Feb 15 20:20:01 2024
    Am 15.02.24 um 16:06 schrieb Michał Górny:

    Oh, sorry, I've just realized that I'm maintaining stratagus these days.
    Will fix it, thanks!

    Good. Your solution also fixes this issue.
    Thank you for committing it.

    I "just" wanted to debug why wargus crashes.
    This is already fruitful. I already found and fixed a couple of issues
    (without touching the crashing part yet :-) ).

    To see if it is better with the master-branch, I locally created
    live-ebuilds and started to fix some build-system issues first.

    Regards
    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)