Summary: | emulators/ares: update to 139.20240825 and unbundle librashader dependency | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Stefan Schlosser <bsdcode> | ||||||
Component: | Individual Port(s) | Assignee: | Vladimir Druzenko <vvd> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | vvd | ||||||
Priority: | --- | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Stefan Schlosser
2024-08-26 18:06:31 UTC
Can it work without librashader? If yes, maybe make default ON option? The relationship between ares and librashader is this: ares bundles a local copy of the complete librashader sourcecode under ${WRKSRC}/thirdparty/librashader. The only things ares really needs and uses from it are the includefiles include/librashader.h and include/librashader_ld.h. But this is mandatory, ares won't compile without them. At runtime it isn't a hard dependency, it tries to dynamically load ${LOCALBASE}/lib/librashader.so and if it succeeds then shaders work, if it doesn't succeed then shaders don't work. If it wouldn't be an unconditional build dependency then we could control everything related to librashader behind the SHADER portoption, i.e. * use SHADER_LIB_DEPENDS=devel/librashader instead of BUILD_DEPENDS + SHADER_RUN_DEPENDS * use SHADER_CFLAGS=-DLIBRA_RUNTIME_OPENGL instead of CFLAGS * use ${REINPLACE_CMD} for librashader_ld.h in post-patch-SHADER-on instead of in post-patch * use ${REINPLACE_CMD} 's|-I../thirdparty/librashader/include||g' ${WRKSRC}/desktop-ui/GNUmakefile in post-patch-SHADER-on instead of inside the desktop-ui_GNUmakefile patch itself Now, we can do exactly this, but because librashader is an unconditional build dependency we have the following situation: * SHADER on: ares build uses includefiles from devel/librashader * SHADER off: ares build uses bundled includefiles With my current updatepatch we just always use the includefiles from devel/librashader. What are you recommending? I think better have 2 options: SHADERS_SLANG and RASHADERS (you pick better names :-D). SHADERS_SLANG is current SHADER. RASHADERS is: * use RASHADER_LIB_DEPENDS=devel/librashader instead of BUILD_DEPENDS * use RASHADER_CFLAGS=-DLIBRA_RUNTIME_OPENGL instead of CFLAGS and etc. I don't think it's a good idea to split the actual shaders from the shader engine. One is useless without the other. Without the libretro shaders you don't need the librashader engine, and without the librashader engine you don't need the shaders. Or are we talking about different things? Can't it really just work with one set of shaders? Hm… I think you are a little bit off here :-D There is ONLY one set of shaders: games/libretro-shaders-slang /devel/librashader is the engine which uses these shaders. I think there's no need to overcomplicate things here ;) ares bundles librashader. Now that /devel/librashader is available in the ports tree we just unbundle this dependency. Nothing more. (In reply to Stefan Schlosser from comment #6) Ok. Option SHADER handle both engine and shaders. Created attachment 253112 [details]
update to 139.20240825 and unbundle librashader dependency
Thanks! I updated the patch as requested. Unfortunately stage-qa interfered with our plans... it complains about librashader.so not needed as LIB_DEPENDS, which is true because ares doesn't link against it explicitly. So I had to keep the split between SHADER_BUILD_DEPENDS and SHADER_RUN_DEPENDS.
Are you sure you need lang/rust-nightly for devel/librashader? lang/rust is 1.80.1. Yes. Also upstream is tracking the requirements before they can switch to the stable rust version (https://github.com/SnowflakePowered/librashader/issues/55). I also tested version 0.3.0 of /devel/librashader with lang/rust back when I first created the port and it didn't work, lang/rust-nightly was needed. For the recent version update to 0.3.3 of /devel/librashader I didn't test it because I assume it's still the case. And I just tested the build of version 0.3.3 with lang/rust. Still doesn't work, lang/rust-nightly still needed. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b772f1f7b08121988afc02f0dc70a4ce07e72e7d commit b772f1f7b08121988afc02f0dc70a4ce07e72e7d Author: Stefan Schlosser <bsdcode@disroot.org> AuthorDate: 2024-08-27 17:35:50 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-08-27 17:38:22 +0000 emulators/ares: Update 139.20240823 → 139.20240825 and unbundle librashader dependency Commit changes: https://github.com/ares-emulator/ares/compare/3cd82c8..efb7f61 PR: 281080 emulators/ares/Makefile | 21 ++++++++++++++------- emulators/ares/distinfo | 6 +++--- emulators/ares/files/patch-hiro_GNUmakefile (gone) | 11 ----------- .../ares/{files/pkg-message.in => pkg-message} | 12 ------------ 4 files changed, 17 insertions(+), 33 deletions(-) Thanks. |