Lucas Raab wrote (2023-09-02 18:16 IST): > On Sat, Sep 02, 2023 at 05:06:31PM +0000, Lucas Raab wrote: > > On Sat, Sep 02, 2023 at 03:42:22PM +0000, Lucas Raab wrote: > > > On Sat, Sep 02, 2023 at 12:35:01PM +0000, Lucas Raab wrote: > > > > Hello, > > > > > > > > With the recent additions of libmpq, sdl2-audiolib, simpleini, and > > > > libsmackerdec, this devilutionx update should work. I've only tested on > > > > amd64 > > > > and only with single player. > > > > > > > > Using plain `devilutionx` will crash attempting to play the intro > > > > video, but > > > > for now, that can be skipped with `devilutionx -n`. Other tests and > > > > feedback? > > > > > > > > Much thanks to bcallah@ for getting the diff to this point! > > > > > > > > Thanks, > > > > Lucas > > > > > > 1.5.1 was released just yesterday so here's an updated diff taking that > > > into > > > account along with sthen's feedback > > > > > > (also cc MAINTAINER since I forgot to last time :/) > > > > Updated diff after feedback from sdk@ and thfr@ > > And one last update with feedback from tb@, thanks!
I have a few more things: Changes: * -DBINARY_RELEASE=ON is not checked anymore.It's now called -DCMAKE_BUILD_TYPE=Release * Added -DDEVILUTIONX_SYSTEM_LIBSODIUM=ON * Added a patch to disable sound in movie sequences (avoids startup crash without -n) * Added a sentence about the movie sound to README I tried fixing the crash/sound in movies, but couldn't. So I disabled it. Index: games/devilutionx/Makefile =================================================================== RCS file: /cvs/ports/games/devilutionx/Makefile,v retrieving revision 1.11 diff -u -p -u -p -r1.11 Makefile --- games/devilutionx/Makefile 18 Oct 2022 00:46:43 -0000 1.11 +++ games/devilutionx/Makefile 3 Sep 2023 08:23:01 -0000 @@ -4,38 +4,73 @@ CATEGORIES = games x11 GH_ACCOUNT = diasurgical GH_PROJECT = devilutionX -GH_TAGNAME = 1.1.0 -REVISION = 0 +GH_TAGNAME = 1.5.1 MAINTAINER = Brian Callahan <bcal...@openbsd.org> -# Unlicense +MASTER_SITES0 = ${MASTER_SITES_GITHUB} +MASTER_SITES1 = https://github.com/diasurgical/devilutionX/releases/download/${GH_TAGNAME}/ + +DISTFILES = ${GH_DISTFILE}:0 \ + devilutionx-src-${GH_TAGNAME}{devilutionx-src}.tar.xz:1 + +# Sustainable Use License 1.0 PERMIT_PACKAGE = Yes -WANTLIB += ${COMPILER_LIBCXX} SDL2 SDL2_mixer SDL2_ttf c m pthread +WANTLIB += ${COMPILER_LIBCXX} SDL2 SDL2_image SDL_audiolib c fmt +WANTLIB += m mpq smackerdec sodium -# C++14 +# C++20 COMPILER = base-clang ports-gcc MODULES = devel/cmake -BUILD_DEPENDS = security/libsodium - -LIB_DEPENDS = devel/sdl2-mixer \ - devel/sdl2-ttf - -CONFIGURE_ARGS = -DBINARY_RELEASE=ON \ +BUILD_DEPENDS = devel/asio \ + devel/gettext,-tools \ + textproc/simpleini + +LIB_DEPENDS = archivers/libmpq \ + audio/libsmackerdec \ + audio/sdl2-audiolib \ + devel/fmt \ + devel/sdl2-image \ + security/libsodium + +CONFIGURE_ARGS = -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -L${LOCALBASE}/lib -lSDL2_image -lsmackerdec -lmpq" \ -DDEBUG=OFF \ + -DDEVILUTIONX_SYSTEM_BZIP2=ON \ + -DDEVILUTIONX_SYSTEM_LIBFMT=ON \ + -DDEVILUTIONX_SYSTEM_LIBPNG=ON \ + -DDEVILUTIONX_SYSTEM_SDL_AUDIOLIB=ON \ + -DDEVILUTIONX_SYSTEM_SDL_IMAGE=ON \ + -DDEVILUTIONX_SYSTEM_SIMPLEINI=ON \ + -DDEVILUTIONX_SYSTEM_LIBSODIUM=ON \ + -DDEVILUTIONX_SYSTEM_ZLIB=ON \ -DDISABLE_LTO=ON \ - -DVERSION_NUM="${GH_TAGNAME}" \ - -DSDL2_INCLUDE_DIR=${LOCALBASE}/include/SDL2 + -DDISABLE_ZERO_TIER=ON \ + -DSDL2_INCLUDE_DIR=${LOCALBASE}/include/SDL2 \ + -DVERSION_NUM="${GH_TAGNAME}" NO_TEST = Yes -FIX_CRLF_FILES = CMakeLists.txt SourceS/miniwin.h +FIX_CRLF_FILES = 3rdParty/libsmackerdec/CMakeLists.txt \ + 3rdParty/simpleini/CMakeLists.txt \ + CMake/Dependencies.cmake \ + Source/CMakeLists.txt \ + Source/storm/storm_svid.cpp # No install target do-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/diasurgical + ${INSTALL_DATA_DIR} ${PREFIX}/share/diasurgical/devilutionx + cp -R ${WRKDIR}/devilutionx-src-${GH_TAGNAME}/Packaging/resources/assets \ + ${PREFIX}/share/diasurgical/devilutionx + ${INSTALL_DATA} ${WRKDIR}/devilutionx-src-${GH_TAGNAME}/dist/devilutionx.mpq \ + ${PREFIX}/share/diasurgical/devilutionx + ${INSTALL_DATA} ${WRKDIST}/LICENSE.md ${PREFIX}/share/diasurgical/devilutionx + ${INSTALL_PROGRAM} ${WRKBUILD}/devilutionx ${PREFIX}/bin .include <bsd.port.mk> Index: games/devilutionx/distinfo =================================================================== RCS file: /cvs/ports/games/devilutionx/distinfo,v retrieving revision 1.6 diff -u -p -u -p -r1.6 distinfo --- games/devilutionx/distinfo 28 Oct 2020 16:16:17 -0000 1.6 +++ games/devilutionx/distinfo 3 Sep 2023 08:23:01 -0000 @@ -1,2 +1,4 @@ -SHA256 (devilutionX-1.1.0.tar.gz) = OV7CmN9Tg6vmBVDUWtul5YEZhFicyx5QSJGyZ7PEZ8E= -SIZE (devilutionX-1.1.0.tar.gz) = 2271614 +SHA256 (devilutionX-1.5.1.tar.gz) = nYjexN9Y45GUC3ftuG81azTiwIXF4xkSYvpidtdF0cs= +SHA256 (devilutionx-src-1.5.1.tar.xz) = 49R4qn2pU4XWfW43AWRB35aZZfVlP4PGTgAZ7oJOvU8= +SIZE (devilutionX-1.5.1.tar.gz) = 9445335 +SIZE (devilutionx-src-1.5.1.tar.xz) = 21971268 Index: games/devilutionx/patches/patch-CMake_Dependencies_cmake =================================================================== RCS file: games/devilutionx/patches/patch-CMake_Dependencies_cmake diff -N games/devilutionx/patches/patch-CMake_Dependencies_cmake --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ games/devilutionx/patches/patch-CMake_Dependencies_cmake 3 Sep 2023 08:23:01 -0000 @@ -0,0 +1,77 @@ +Support using libraries which have been moved into ports, not bundled +-lSDL2_image is in CMAKE_EXE_LINKER_FLAGS (see port Makefile). + +Index: CMake/Dependencies.cmake +--- CMake/Dependencies.cmake.orig ++++ CMake/Dependencies.cmake +@@ -85,40 +85,6 @@ else() + endif() + endif() + +-macro(_find_SDL_image QUIET_OR_REQUIRED) +- # vcpkg uses sdl2-image as the package name +- find_package(sdl2-image QUIET) +- set(SDL_image_FOUND ${sdl2-image_FOUND}) +- +- if(NOT SDL_image_FOUND) +- # Fall back on PkgConfig via FindSDL2_image.cmake +- find_package(SDL2_image ${QUIET_OR_REQUIRED}) +- set(SDL_image_FOUND ${SDL2_image_FOUND}) +- endif() +-endmacro() +- +-if(NOT USE_SDL1) +- if(EMSCRIPTEN) +- emscripten_system_library("SDL_image" SDL2::SDL2_image USE_SDL_IMAGE=2 "SDL2_IMAGE_FORMATS='[\"png\"]'") +- else() +- if(NOT DEFINED DEVILUTIONX_SYSTEM_SDL_IMAGE) +- _find_SDL_image(QUIET) +- if(SDL_image_FOUND) +- message("-- Found SDL_image") +- else() +- message("-- Suitable system SDL_image package not found, will use SDL_image from source") +- set(DEVILUTIONX_SYSTEM_SDL_IMAGE OFF) +- endif() +- endif() +- dependency_options("SDL_image" DEVILUTIONX_SYSTEM_SDL_IMAGE ON DEVILUTIONX_STATIC_SDL_IMAGE) +- if(DEVILUTIONX_SYSTEM_SDL_IMAGE) +- _find_SDL_image(REQUIRED) +- else() +- add_subdirectory(3rdParty/SDL_image) +- endif() +- endif() +-endif() +- + if(NOT DEFINED DEVILUTIONX_SYSTEM_LIBFMT) + find_package(fmt 8.0.0 QUIET) + if(fmt_FOUND) +@@ -163,7 +129,7 @@ if(PACKET_ENCRYPTION) + endif() + endif() + +-add_subdirectory(3rdParty/libsmackerdec) ++#add_subdirectory(3rdParty/libsmackerdec) + + if(WIN32 AND NOT UWP_LIB) + add_subdirectory(3rdParty/find_steam_game) +@@ -185,20 +151,12 @@ else() + add_subdirectory(3rdParty/simpleini) + endif() + +-if(SUPPORTS_MPQ) +- add_subdirectory(3rdParty/libmpq) +-endif() +- + add_subdirectory(3rdParty/tl) + + add_subdirectory(3rdParty/hoehrmann_utf8) + + if(SUPPORTS_MPQ OR NOT NONET) + add_subdirectory(3rdParty/PKWare) +-endif() +- +-if(NOT NONET AND NOT DISABLE_TCP) +- add_subdirectory(3rdParty/asio) + endif() + + if(NOT NONET AND NOT DISABLE_ZERO_TIER) Index: games/devilutionx/patches/patch-Source_CMakeLists_txt =================================================================== RCS file: games/devilutionx/patches/patch-Source_CMakeLists_txt diff -N games/devilutionx/patches/patch-Source_CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ games/devilutionx/patches/patch-Source_CMakeLists_txt 3 Sep 2023 08:23:01 -0000 @@ -0,0 +1,37 @@ +Build system is broken around SDL2_image. +Same with libsmackerdec and libmpq. +asio is a header-only library... + +Index: Source/CMakeLists.txt +--- Source/CMakeLists.txt.orig ++++ Source/CMakeLists.txt +@@ -166,7 +166,6 @@ set(libdevilutionx_SRCS + utils/utf8.cpp) + + if(SUPPORTS_MPQ) +- list(APPEND libdevilutionx_DEPS libmpq) + list(APPEND libdevilutionx_SRCS + mpq/mpq_reader.cpp + mpq/mpq_sdl_rwops.cpp +@@ -260,21 +259,13 @@ target_link_libraries(libdevilutionx PUBLIC + Threads::Threads + DevilutionX::SDL + fmt::fmt +- libsmackerdec + simpleini::simpleini + tl + hoehrmann_utf8 + ${libdevilutionx_DEPS} + ) + +-if(NOT USE_SDL1) +- target_link_libraries(libdevilutionx PUBLIC SDL2::SDL2_image) +-endif() +- + if(NOT NONET) +- if(NOT DISABLE_TCP) +- target_link_libraries(libdevilutionx PUBLIC asio) +- endif() + if(PACKET_ENCRYPTION) + target_link_libraries(libdevilutionx PUBLIC sodium) + endif() Index: games/devilutionx/patches/patch-Source_storm_storm_svid_cpp =================================================================== RCS file: games/devilutionx/patches/patch-Source_storm_storm_svid_cpp diff -N games/devilutionx/patches/patch-Source_storm_storm_svid_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ games/devilutionx/patches/patch-Source_storm_storm_svid_cpp 3 Sep 2023 08:23:01 -0000 @@ -0,0 +1,13 @@ +Audio on video sequences leads to a crash. +Index: Source/storm/storm_svid.cpp +--- Source/storm/storm_svid.cpp.orig ++++ Source/storm/storm_svid.cpp +@@ -248,7 +248,7 @@ bool SVidPlayBegin(const char *filename, int flags) + } + + #ifndef NOSOUND +- const bool enableAudio = (flags & 0x1000000) == 0; ++ const bool enableAudio = false; + + auto audioInfo = Smacker_GetAudioTrackDetails(SVidHandle, 0); + LogVerbose(LogCategory::Audio, "SVid audio depth={} channels={} rate={}", audioInfo.bitsPerSample, audioInfo.nChannels, audioInfo.sampleRate); Index: games/devilutionx/pkg/PLIST =================================================================== RCS file: /cvs/ports/games/devilutionx/pkg/PLIST,v retrieving revision 1.2 diff -u -p -u -p -r1.2 PLIST --- games/devilutionx/pkg/PLIST 11 Mar 2022 19:04:16 -0000 1.2 +++ games/devilutionx/pkg/PLIST 3 Sep 2023 08:23:01 -0000 @@ -1,2 +1,137 @@ @bin bin/devilutionx +share/diasurgical/ +share/diasurgical/devilutionx/ +share/diasurgical/devilutionx/LICENSE.md +share/diasurgical/devilutionx/assets/ +share/diasurgical/devilutionx/assets/arena/ +share/diasurgical/devilutionx/assets/arena/church.dun +share/diasurgical/devilutionx/assets/arena/circle_of_death.dun +share/diasurgical/devilutionx/assets/arena/hell.dun +share/diasurgical/devilutionx/assets/data/ +share/diasurgical/devilutionx/assets/data/boxleftend.clx +share/diasurgical/devilutionx/assets/data/boxmiddle.clx +share/diasurgical/devilutionx/assets/data/boxrightend.clx +share/diasurgical/devilutionx/assets/data/charbg.clx +share/diasurgical/devilutionx/assets/data/dirtybuc.clx +share/diasurgical/devilutionx/assets/data/dirtybucp.clx +share/diasurgical/devilutionx/assets/data/health.clx +share/diasurgical/devilutionx/assets/data/healthbox.clx +share/diasurgical/devilutionx/assets/data/hintbox.clx +share/diasurgical/devilutionx/assets/data/hintboxbackground.clx +share/diasurgical/devilutionx/assets/data/hinticons.clx +share/diasurgical/devilutionx/assets/data/monstertags.clx +share/diasurgical/devilutionx/assets/data/panel8buc.clx +share/diasurgical/devilutionx/assets/data/panel8bucp.clx +share/diasurgical/devilutionx/assets/data/resistance.clx +share/diasurgical/devilutionx/assets/data/stash.clx +share/diasurgical/devilutionx/assets/data/stashnavbtns.clx +share/diasurgical/devilutionx/assets/data/talkbutton.clx +share/diasurgical/devilutionx/assets/data/xpbar.clx +share/diasurgical/devilutionx/assets/fonts/ +share/diasurgical/devilutionx/assets/fonts/12-00.clx +share/diasurgical/devilutionx/assets/fonts/12-01.clx +share/diasurgical/devilutionx/assets/fonts/12-02.clx +share/diasurgical/devilutionx/assets/fonts/12-03.clx +share/diasurgical/devilutionx/assets/fonts/12-04.clx +share/diasurgical/devilutionx/assets/fonts/12-1f1.clx +share/diasurgical/devilutionx/assets/fonts/12-1f3.clx +share/diasurgical/devilutionx/assets/fonts/12-1f4.clx +share/diasurgical/devilutionx/assets/fonts/12-1f5.clx +share/diasurgical/devilutionx/assets/fonts/12-1f6.clx +share/diasurgical/devilutionx/assets/fonts/12-1f9.clx +share/diasurgical/devilutionx/assets/fonts/12-20.clx +share/diasurgical/devilutionx/assets/fonts/12-26.clx +share/diasurgical/devilutionx/assets/fonts/12-e0.clx +share/diasurgical/devilutionx/assets/fonts/22-00.clx +share/diasurgical/devilutionx/assets/fonts/22-01.clx +share/diasurgical/devilutionx/assets/fonts/22-02.clx +share/diasurgical/devilutionx/assets/fonts/22-03.clx +share/diasurgical/devilutionx/assets/fonts/22-04.clx +share/diasurgical/devilutionx/assets/fonts/22-05.clx +share/diasurgical/devilutionx/assets/fonts/22-20.clx +share/diasurgical/devilutionx/assets/fonts/24-00.clx +share/diasurgical/devilutionx/assets/fonts/24-01.clx +share/diasurgical/devilutionx/assets/fonts/24-02.clx +share/diasurgical/devilutionx/assets/fonts/24-03.clx +share/diasurgical/devilutionx/assets/fonts/24-04.clx +share/diasurgical/devilutionx/assets/fonts/24-1f1.clx +share/diasurgical/devilutionx/assets/fonts/24-1f3.clx +share/diasurgical/devilutionx/assets/fonts/24-1f4.clx +share/diasurgical/devilutionx/assets/fonts/24-1f5.clx +share/diasurgical/devilutionx/assets/fonts/24-1f6.clx +share/diasurgical/devilutionx/assets/fonts/24-1f9.clx +share/diasurgical/devilutionx/assets/fonts/24-20.clx +share/diasurgical/devilutionx/assets/fonts/24-26.clx +share/diasurgical/devilutionx/assets/fonts/24-e0.clx +share/diasurgical/devilutionx/assets/fonts/30-00.clx +share/diasurgical/devilutionx/assets/fonts/30-01.clx +share/diasurgical/devilutionx/assets/fonts/30-02.clx +share/diasurgical/devilutionx/assets/fonts/30-03.clx +share/diasurgical/devilutionx/assets/fonts/30-04.clx +share/diasurgical/devilutionx/assets/fonts/30-20.clx +share/diasurgical/devilutionx/assets/fonts/42-00.clx +share/diasurgical/devilutionx/assets/fonts/42-01.clx +share/diasurgical/devilutionx/assets/fonts/42-02.clx +share/diasurgical/devilutionx/assets/fonts/42-03.clx +share/diasurgical/devilutionx/assets/fonts/42-04.clx +share/diasurgical/devilutionx/assets/fonts/42-20.clx +share/diasurgical/devilutionx/assets/fonts/46-00.clx +share/diasurgical/devilutionx/assets/fonts/46-01.clx +share/diasurgical/devilutionx/assets/fonts/46-02.clx +share/diasurgical/devilutionx/assets/fonts/46-03.clx +share/diasurgical/devilutionx/assets/fonts/46-04.clx +share/diasurgical/devilutionx/assets/fonts/46-20.clx +share/diasurgical/devilutionx/assets/fonts/black.trn +share/diasurgical/devilutionx/assets/fonts/blue.trn +share/diasurgical/devilutionx/assets/fonts/buttonface.trn +share/diasurgical/devilutionx/assets/fonts/buttonpushed.trn +share/diasurgical/devilutionx/assets/fonts/goldui.trn +share/diasurgical/devilutionx/assets/fonts/golduis.trn +share/diasurgical/devilutionx/assets/fonts/grayui.trn +share/diasurgical/devilutionx/assets/fonts/grayuis.trn +share/diasurgical/devilutionx/assets/fonts/orange.trn +share/diasurgical/devilutionx/assets/fonts/red.trn +share/diasurgical/devilutionx/assets/fonts/white.trn +share/diasurgical/devilutionx/assets/fonts/whitegold.trn +share/diasurgical/devilutionx/assets/fonts/yellow.trn +share/diasurgical/devilutionx/assets/gendata/ +share/diasurgical/devilutionx/assets/gendata/cut2w.clx +share/diasurgical/devilutionx/assets/gendata/cut3w.clx +share/diasurgical/devilutionx/assets/gendata/cut4w.clx +share/diasurgical/devilutionx/assets/gendata/cutgatew.clx +share/diasurgical/devilutionx/assets/gendata/cutl1dw.clx +share/diasurgical/devilutionx/assets/gendata/cutportlw.clx +share/diasurgical/devilutionx/assets/gendata/cutportrw.clx +share/diasurgical/devilutionx/assets/gendata/cutstartw.clx +share/diasurgical/devilutionx/assets/gendata/cutttw.clx +share/diasurgical/devilutionx/assets/gendata/pause.trn +share/diasurgical/devilutionx/assets/levels/ +share/diasurgical/devilutionx/assets/levels/l1data/ +share/diasurgical/devilutionx/assets/levels/l1data/sklkngt.dun +share/diasurgical/devilutionx/assets/levels/l2data/ +share/diasurgical/devilutionx/assets/levels/l2data/bonechat.dun +share/diasurgical/devilutionx/assets/levels/towndata/ +share/diasurgical/devilutionx/assets/levels/towndata/automap.amp +share/diasurgical/devilutionx/assets/levels/towndata/automap.dun +share/diasurgical/devilutionx/assets/nlevels/ +share/diasurgical/devilutionx/assets/nlevels/cutl5w.clx +share/diasurgical/devilutionx/assets/nlevels/cutl6w.clx +share/diasurgical/devilutionx/assets/nlevels/l5data/ +share/diasurgical/devilutionx/assets/nlevels/l5data/cornerstone.dun +share/diasurgical/devilutionx/assets/nlevels/l5data/uberroom.dun +share/diasurgical/devilutionx/assets/ui_art/ +share/diasurgical/devilutionx/assets/ui_art/button.png +share/diasurgical/devilutionx/assets/ui_art/creditsw.clx +share/diasurgical/devilutionx/assets/ui_art/diablo.pal +share/diasurgical/devilutionx/assets/ui_art/directions.png +share/diasurgical/devilutionx/assets/ui_art/directions2.png +share/diasurgical/devilutionx/assets/ui_art/dvl_but_sml.clx +share/diasurgical/devilutionx/assets/ui_art/dvl_lrpopup.clx +share/diasurgical/devilutionx/assets/ui_art/hellfire.pal +share/diasurgical/devilutionx/assets/ui_art/hf_titlew.clx +share/diasurgical/devilutionx/assets/ui_art/mainmenuw.clx +share/diasurgical/devilutionx/assets/ui_art/menu-levelup.png +share/diasurgical/devilutionx/assets/ui_art/menu.png +share/diasurgical/devilutionx/assets/ui_art/supportw.clx +share/diasurgical/devilutionx/devilutionx.mpq share/doc/pkg-readmes/${PKGSTEM} Index: games/devilutionx/pkg/README =================================================================== RCS file: /cvs/ports/games/devilutionx/pkg/README,v retrieving revision 1.2 diff -u -p -u -p -r1.2 README --- games/devilutionx/pkg/README 11 Mar 2022 19:04:16 -0000 1.2 +++ games/devilutionx/pkg/README 3 Sep 2023 08:23:01 -0000 @@ -9,11 +9,14 @@ properly. These can come from an origin You must place the file diabdat.mpq in ~/.local/share/diasurgical/devilution/ -If the file is uppercase (i.e. DIABDAT.MPQ), you must rename it to -all lowercase. While this package and the game engine are open source, one still needs to provide the original game assets from Diablo I, which is not open source. You will need to purchase the original game to use this package. Multiplayer may not work on 64-bit platforms. This is known upstream. + +The source has been modified to run on OpenBSD. + +To avoid crashes, the movie sounds in the game have been disabled. +In-game sounds work.