On Fri, May 03, 2024 at 06:44:56PM +0200, Solene Rapenne wrote:
> On Thu, May 02, 2024 at 01:07:08PM GMT, Thomas Frohwein wrote:
> > On Fri, Apr 19, 2024 at 10:27:49PM +0200, Solene Rapenne wrote:
> > > our hyperrogue version is quite old of a dozen releases
> > > 
> > > latest release adds a lot of changes
> > > https://github.com/zenorogue/hyperrogue/releases
> > > 
> > > the Makefile patch had to be reworked a bit because the original
> > > Makefile differed from the patch, but it applies the same changes
> > > as before.
> > > 
> > > update-plist removed some honeycomb files, I don't know if it's
> > > expected... the game plays fine
> > 
> > Built it and it works as expected.
> > 
> > Noticed that it save hyperrogue.log in $PWD which I find annoying, not
> > sure if that's how upstream designed it. It would make more sense to
> > have a location in the home directory for that. Might be worth checking
> > on, but either way this update is ok thfr@, provided Brian is okay with
> > it or timeout...
>  
> 
> it also saves settings in $PWD...This can be solved by compiling
> with -DFHS to have the files saved in $HOME/
> 
> Not sure if the place I've put it into CXXFLAGS variable is ok?
> 
> you can try quickly in game: open settings menu and choose "save"

Making this part of CXXFLAGS looks correct to me. With this, I can now
hear music (I don't think that was there before). The save/log file is
now at ~/.hyperrogue.log. I don't know where the settings
(hyperrogue.ini) are supposed to be; I can't find the file. And after
closing the game, it seems that my settings are set back to the
default.

I've looked if there is more documentation for -DFHS, but it's quite
obscure. It seems to be set by many of the linux build pathways. It's
also in sound.cpp and util.cpp, where it seems to make it look for
files in /usr/share/hyperrogue which of course doesn't exist in our
port and should be /usr/local/share/hyperrogue/...

> 
> diff --git a/games/hyperrogue/Makefile b/games/hyperrogue/Makefile
> index 4c1a7417f10..3b211a563a9 100644
> --- a/games/hyperrogue/Makefile
> +++ b/games/hyperrogue/Makefile
> @@ -1,4 +1,4 @@
> -V =          12.0f
> +V =          13.0d
>  COMMENT =    roguelike game in a non-Euclidean world
>  CATEGORIES = games x11
>  
> @@ -24,7 +24,7 @@ LIB_DEPENDS =       devel/sdl-gfx \
>               graphics/glew \
>               graphics/png
>  
> -CXXFLAGS +=  -I${LOCALBASE}/include -I${X11BASE}/include \
> +CXXFLAGS +=  -I${LOCALBASE}/include -I${X11BASE}/include -DFHS\
>                       -DHYPERPATH="\\\"${LOCALBASE}/share/hyperrogue/\\\""
>  LDFLAGS +=   -L${LOCALBASE}/lib -L${X11BASE}/lib
>  
> diff --git a/games/hyperrogue/distinfo b/games/hyperrogue/distinfo
> index 835425d2f49..fe08e61d88c 100644
> --- a/games/hyperrogue/distinfo
> +++ b/games/hyperrogue/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (hyperrogue-12.0f.tar.gz) = 
> ROeOk+0dMZg9680EeR1//Pz73EBpfnCaD2yi04wwID4=
> -SIZE (hyperrogue-12.0f.tar.gz) = 79946099
> +SHA256 (hyperrogue-13.0d.tar.gz) = 
> 4ApHLRReh9u3dzH+FXCHyB2N5b0rBfogkbyQGFMIDoo=
> +SIZE (hyperrogue-13.0d.tar.gz) = 87765129
> diff --git a/games/hyperrogue/patches/patch-Makefile 
> b/games/hyperrogue/patches/patch-Makefile
> index 1567a49854b..6d4afc867d8 100644
> --- a/games/hyperrogue/patches/patch-Makefile
> +++ b/games/hyperrogue/patches/patch-Makefile
> @@ -26,9 +26,9 @@ Index: Makefile
>   
>  -ifeq (${TOOLCHAIN},clang)
>  -  CXXFLAGS_STD = -std=c++11
> --  CXXFLAGS_EARLY += -march=native -fPIC
> --  CXXFLAGS_EARLY += -W -Wall -Wextra -Wsuggest-override -Werror -pedantic
> --  CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough 
> -Wno-maybe-uninitialized -Wno-unknown-warning-option
> +-  CXXFLAGS_EARLY += -fPIC
> +-  CXXFLAGS_EARLY += -W -Wall -Wextra -Wsuggest-override -pedantic
> +-  CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough 
> -Wno-maybe-uninitialized -Wno-char-subscripts -Wno-unknown-warning-option
>  -  CXXFLAGS_EARLY += -Wno-invalid-offsetof
>  -endif
>  +CXXFLAGS_STD = -std=c++11
> @@ -39,23 +39,23 @@ Index: Makefile
>   
>  -ifeq (${TOOLCHAIN},gcc)
>  -  CXXFLAGS_STD = -std=c++11
> --  CXXFLAGS_EARLY += -march=native -fPIC
> --  CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic
> +-  CXXFLAGS_EARLY += -fPIC
> +-  CXXFLAGS_EARLY += -W -Wall -Wextra -pedantic
>  -  CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough 
> -Wno-maybe-uninitialized
> +-  CXXFLAGS_EARLY += -Wno-invalid-offsetof
>  -endif
>  -
>  -ifeq (${TOOLCHAIN},mingw)
>  -  CXXFLAGS_STD = -std=c++11
> --  CXXFLAGS_EARLY += -march=native
> --  CXXFLAGS_EARLY += -W -Wall -Wextra -Werror
> +-  CXXFLAGS_EARLY += -W -Wall -Wextra
>  -  CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough 
> -Wno-maybe-uninitialized
> +-  CXXFLAGS_EARLY += -Wno-invalid-offsetof
>  -endif
>  -
> --
> - ## We have now finished OS-specific and TOOLCHAIN-specific computations.
> - ## Begin customization points for user-specifiable HYPERROGUE_USE_XXX 
> macros.
> - 
> -@@ -139,19 +120,19 @@ override CXXFLAGS := $(CXXFLAGS_STD) $(CXXFLAGS_EARLY)
> + ifeq (${FONTCONFIG},1)
> +   CXXFLAGS_EARLY += -DFONTCONFIG `pkg-config --cflags fontconfig`
> +   LDFLAGS_EARLY += `pkg-config --libs fontconfig`
> +@@ -144,19 +125,19 @@ override CXXFLAGS := $(CXXFLAGS_STD) $(CXXFLAGS_EARLY)
>   override LDFLAGS := $(LDFLAGS_EARLY) $(LDFLAGS) ${EXTRA_LDFLAGS}
>   
>   hyperrogue$(EXE_EXTENSION): $(hyper_OBJS) $(hyper_RES)
> @@ -78,8 +78,8 @@ Index: Makefile
>  +    $(CXX) $(CXXFLAGS) makeh.cpp $(LDFLAGS) -o $@
>   
>   autohdr.h: makeh$(EXE_EXTENSION) language-data.cpp *.cpp
> -     ./makeh classes.cpp locations.cpp colors.cpp hyperpoint.cpp 
> geometry.cpp goldberg.cpp init.cpp floorshapes.cpp cell.cpp multi.cpp 
> shmup.cpp pattern2.cpp mapeditor.cpp graph.cpp textures.cpp hprint.cpp 
> language.cpp util.cpp complex.cpp *.cpp > autohdr.h
> -@@ -160,10 +141,10 @@ language-data.cpp: langen$(EXE_EXTENSION)
> +     ./makeh classes.cpp locations.cpp colors.cpp hyperpoint.cpp 
> geometry.cpp embeddings.cpp goldberg.cpp init.cpp floorshapes.cpp cell.cpp 
> multi.cpp shmup.cpp pattern2.cpp mapeditor.cpp graph.cpp textures.cpp 
> hprint.cpp language.cpp util.cpp complex.cpp multigame.cpp arbitrile.cpp 
> rulegen.cpp *.cpp > autohdr.h
> +@@ -165,10 +146,10 @@ language-data.cpp: langen$(EXE_EXTENSION)
>       ./langen > language-data.cpp
>   
>   savepng$(OBJ_EXTENSION): savepng.cpp
> diff --git a/games/hyperrogue/pkg/PLIST b/games/hyperrogue/pkg/PLIST
> index 3095c30894e..9d6cb6288c1 100644
> --- a/games/hyperrogue/pkg/PLIST
> +++ b/games/hyperrogue/pkg/PLIST
> @@ -3,15 +3,6 @@ share/doc/hyperrogue/
>  share/doc/hyperrogue/README.md
>  share/hyperrogue/
>  share/hyperrogue/DejaVuSans-Bold.ttf
> -share/hyperrogue/honeycomb-rules-344.dat
> -share/hyperrogue/honeycomb-rules-353.dat
> -share/hyperrogue/honeycomb-rules-354.dat
> -share/hyperrogue/honeycomb-rules-355.dat
> -share/hyperrogue/honeycomb-rules-435.dat
> -share/hyperrogue/honeycomb-rules-436.dat
> -share/hyperrogue/honeycomb-rules-534.dat
> -share/hyperrogue/honeycomb-rules-535.dat
> -share/hyperrogue/honeycomb-rules-536.dat
>  share/hyperrogue/hyperrogue-music.txt
>  share/hyperrogue/music/
>  share/hyperrogue/music/hr-domina-hunting.ogg
> 

Reply via email to