Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread zzam

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




Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread Michał Górny
On Thu, 2024-02-15 at 14:23 +, parona wrote:
> On Thursday, 15 February 2024 at 16:09, Michał Górny  
> wrote:
> 
> > On Thu, 2024-02-15 at 14:21 +0100, z...@gentoo.org 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 z...@gentoo.org
> > > > > ---
> > > > > 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=code
> 

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

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread parona
On Thursday, 15 February 2024 at 16:09, Michał Górny  wrote:

> On Thu, 2024-02-15 at 14:21 +0100, z...@gentoo.org 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 z...@gentoo.org
> > > > ---
> > > > 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=code

--
Alfred Wingate



Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread Michał Górny
On Thu, 2024-02-15 at 14:21 +0100, z...@gentoo.org 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 
> > > ---
> > >   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



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH v2] games-engines/stratagus: Unbreak USE=debug case

2024-02-15 Thread Matthias Schwarzott
Avoid renaming stratagus executable if compiled with USE=debug.
It would end up as /usr/bin/stratagus-dbg instead of /usr/bin/stratagus.

Signed-off-by: Matthias Schwarzott 
---
 games-engines/stratagus/stratagus-3.3.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/games-engines/stratagus/stratagus-3.3.2.ebuild 
b/games-engines/stratagus/stratagus-3.3.2.ebuild
index 1828b8874857..f7735c5f5216 100644
--- a/games-engines/stratagus/stratagus-3.3.2.ebuild
+++ b/games-engines/stratagus/stratagus-3.3.2.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
 
 src_prepare() {
sed -i -e 's:-Werror::' CMakeLists.txt || die
+   sed -i -e '/set_target_properties(stratagus PROPERTIES 
OUTPUT_NAME.*)/d' CMakeLists.txt || die
cmake_src_prepare
 }
 
-- 
2.43.1




[gentoo-dev] [PATCH] games-engines/stratagus: Unbreak USE=debug case

2024-02-15 Thread Matthias Schwarzott
Avoid renaming stratagus executable if compiled with USE=debug.
It would end up as /usr/bin/stratatgus-dbg instead of /usr/bin/stratatgus.

Signed-off-by: Matthias Schwarzott 
---
 games-engines/stratagus/stratagus-3.3.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/games-engines/stratagus/stratagus-3.3.2.ebuild 
b/games-engines/stratagus/stratagus-3.3.2.ebuild
index 1828b8874857..6e068b63a521 100644
--- a/games-engines/stratagus/stratagus-3.3.2.ebuild
+++ b/games-engines/stratagus/stratagus-3.3.2.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
 
 src_prepare() {
sed -i -e 's:-Werror::' CMakeLists.txt || die
+   sed -i -e '/set_target_properties(stratagus .*)/d' CMakeLists.txt || die
cmake_src_prepare
 }
 
-- 
2.43.1




Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread zzam

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 
---
  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




[gentoo-dev] Re: [gentoo-dev-announce] More packages up for grabs due to developer inactivity

2024-02-15 Thread Bernard Cafarelli
On Wed, 14 Feb 2024 11:38:49 +0100,
Michał Górny  wrote :

> Hello,
> 
> The following packages are also left with no maintainer:

> dev-util/google-perftools
I had started to look into this one already, adding to my list

> x11-misc/xssstate
I use this one and should be low-maintenance


-- 
Bernard Cafarelli (Voyageur)
Gentoo developer



Re: [gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread 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 
> ---
>  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.

Why is the executable name different, anyway?


-- 
Eli Schwartz


OpenPGP_0x84818A6819AF4A9B.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


[gentoo-dev] [PATCH] games-strategy/wargus: Fix running it with games-engines/stratagus[debug]

2024-02-15 Thread Matthias Schwarzott
When stratagus is compiled with USE=debug, its executable is called
/usr/bin/stratatgus-dbg.

Signed-off-by: Matthias Schwarzott 
---
 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)
-- 
2.43.1