diff --git a/games/veloren-weekly/Makefile b/games/veloren-weekly/Makefile index b0c02ae3391f..576eaffb3bd0 100644 --- a/games/veloren-weekly/Makefile +++ b/games/veloren-weekly/Makefile @@ -1,82 +1,84 @@ PORTNAME= veloren PORTVERSION= s20240509 +PORTREVISION= 1 CATEGORIES= games wayland PKGNAMESUFFIX= -weekly MAINTAINER= jbeich@FreeBSD.org COMMENT= Multiplayer voxel RPG written in Rust (weekly snapshot) WWW= https://veloren.net/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_aarch64= https://github.com/rust-lang/libc/issues/3217 BROKEN_i386= https://github.com/bytecodealliance/wasmtime/issues/7924 ONLY_FOR_ARCHS= aarch64 amd64 i386 ONLY_FOR_ARCHS_REASON= unsupported platform by https://github.com/wasmerio/wasmer LIB_DEPENDS= libzstd.so:archivers/zstd \ libasound.so:audio/alsa-lib \ libudev.so:devel/libudev-devd \ - libshaderc_shared.so:graphics/shaderc + libshaderc_shared.so:graphics/shaderc \ + libxkbcommon-x11.so:x11/libxkbcommon RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ ${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader USES= cargo xorg USE_XORG= xcb USE_GITLAB= yes GL_TAGNAME= v0.16.0-147-gb47aa6aea # git describe --match='v[0-9]*' weekly CARGO_ENV= VELOREN_USERDATA_STRATEGY=system SHADERC_LIB_DIR="${LOCALBASE}/lib" PLIST_FILES= bin/${PORTNAME}-server-cli \ bin/${PORTNAME}-voxygen \ share/applications/net.veloren.veloren.desktop \ share/metainfo/net.veloren.veloren.metainfo.xml \ share/pixmaps/net.veloren.veloren.png PORTDATA= * CONFLICTS_INSTALL= ${PORTNAME} .if ${MACHINE_ARCH} == i386 # https://github.com/rust-lang/rust/issues/85598 CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO=false .endif # Fixes error "Instruction does not dominate all uses!" WITHOUT_LTO= yes # XXX bug 277333 # https://gitlab.com/veloren/veloren/issues/264 CARGO_ENV+= RUSTC_BOOTSTRAP=1 # XXX https://github.com/rust-lang/cargo/issues/4101 CARGO_INSTALL_PATH= server-cli voxygen post-patch: # .git/ directory is missing, so don't abort if git binary is also missing @${REINPLACE_CMD} -e 's/"git"/"${TRUE}"/' \ ${WRKSRC}/common/build.rs # Extract (snapshot) version from the port instead of empty file @${REINPLACE_CMD} -e '/GIT_HASH/s/=.*/= "${GL_TAGNAME:C/.*-g(.{8}).*/\1/}";/' \ -e "/GIT_DATE.*static/s/=.*/= \"$$(date -ur $$(${AWK} '/TIMESTAMP/ { print $$3 }' \ ${DISTINFO_FILE}) +'%Y-%m-%d-%H:%M')\";/" \ ${WRKSRC}/common/src/util/mod.rs # Respect PREFIX != /usr/local for system assets @${REINPLACE_CMD} -e 's,/usr/share,${DATADIR:H},' \ ${WRKSRC}/common/assets/src/lib.rs do-install: # XXX [workspace.dependencies] breaks rebuild in subdirs .for f in ${CARGO_INSTALL_PATH} ${INSTALL_PROGRAM} ${CARGO_TARGET_DIR}/*/*/${PORTNAME}-$f \ ${STAGEDIR}${PREFIX}/bin .endfor post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* (cd ${WRKSRC} && ${COPYTREE_SHARE} assets ${STAGEDIR}${DATADIR}) ${RLN} ${STAGEDIR}${DATADIR}/assets/voxygen/*.desktop \ ${STAGEDIR}${PREFIX}/share/applications ${RLN} ${STAGEDIR}${DATADIR}/assets/voxygen/*.png \ ${STAGEDIR}${PREFIX}/share/pixmaps ${MKDIR} ${STAGEDIR}${PREFIX}/share/metainfo ${RLN} ${STAGEDIR}${DATADIR}/assets/voxygen/*.metainfo.xml \ ${STAGEDIR}${PREFIX}/share/metainfo .include diff --git a/games/veloren-weekly/files/patch-keyboard-keynames b/games/veloren-weekly/files/patch-keyboard-keynames new file mode 100644 index 000000000000..10f126ce6f72 --- /dev/null +++ b/games/veloren-weekly/files/patch-keyboard-keynames @@ -0,0 +1,41 @@ +Assume X11/Wayland key names on every Unix-like system + +--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/Cargo.toml.orig 2023-08-23 04:01:46 UTC ++++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/Cargo.toml +@@ -18,7 +18,7 @@ winapi = { version = "0.3.9", features = ["winuser"] } + [target.'cfg(windows)'.dependencies] + winapi = { version = "0.3.9", features = ["winuser"] } + +-[target.'cfg(target_os = "linux")'.dependencies] ++[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] + xkbcommon = { version = "0.5", features = ["x11", "wayland"] } + xcb = { version = "1", features = ["as-raw-xcb-connection"] } + wayland-client = "0.29" +--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/mod.rs.orig 2023-08-23 04:01:46 UTC ++++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/mod.rs +@@ -1,5 +1,5 @@ + //! The KeyLayout struct and supporting elements +-#[cfg(target_os = "linux")] ++#[cfg(all(unix, not(target_os = "macos")))] + #[path = "unix/mod.rs"] + mod platform; + +@@ -7,7 +7,7 @@ mod platform; + #[path = "windows/mod.rs"] + mod platform; + +-#[cfg(not(any(target_os = "windows", target_os = "linux")))] ++#[cfg(target_os = "macos")] + #[path = "other/mod.rs"] + mod platform; + +--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/unix/key_layout.rs.orig 2023-08-23 04:01:46 UTC ++++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/unix/key_layout.rs +@@ -220,7 +220,6 @@ impl KeyLayout { + } + + /// Methods for KeyLayout specific to Unix-based systems +-#[cfg(target_os = "linux")] + pub trait KeyLayoutExtUnix { + /// Construct a KeyLayout explicitly using the Wayland protocol + fn new_wayland() -> Result;