From nobody Mon Oct 23 17:31:09 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDj0F6yXJz4yJNY; Mon, 23 Oct 2023 17:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SDj0F69Xvz4ctX; Mon, 23 Oct 2023 17:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698082269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KnZHG1XhPhVjIctpqNWkWUDD7KUrvg/aY//gLQ/8NWM=; b=euANa60ZQiXD+64yzWkXjfPZcRuhyoE8g3V3PJfEBhWIX/XIkUzWEG63EcxFIGgS2MoIsr ms9ZrKkpi+6zXU3Cr2NgzxkQDtN3/h60SEk6+NDbCDekEr6zJslz1NSOyTRUk6F1YHyVQI 6V844IMmJoo0xhG1yrKl0jeJRP0YdqlvcwrA5dAG3oj2wsLvko8mlWv8jq1rFubNnO/eHS 2fzzP4urhw3WSJ2/BKJ8RqIiwxE5P+5bb3LC9XAejKcvVhH7v8vF4t87Fo8gN4/OwOGzYa N15EY8lVn8MA8sJJkxMd3tujy81IwU60JhMZXUt+0TtnCQOcLGxZH8IYKz2SHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698082269; a=rsa-sha256; cv=none; b=l1BslMlxHlUSzMuybHtlkqF5c/brpHY9bxOTPHRmqrf7Nc43zkI/BbP2g19qLpL7Dc+BWA RIhqksHAOvW/h0Sa5lKbaDDkNHXxgpqOmaLiAiTabfpO7iS2ytm5QjRzckJ8JbSeUR/FlZ 3Jnp+zJWGa4g/3olQ3lZ32YXVIVVznv6gGDu3L9wiVv7ncWqRLPzr/dYllIwRyz9fxrvBG xLnI857VFCOWncsRk4/k2LwFMqF2Qyt16L0fWTvidrRG8TplzIhPZjjDMQLQucIR92wSsy W+uWDny6Ydb+kCk8ulDKQJRxcNINiZVyty08gQrd1OwD1xcsUW9NoksYRh3zSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698082269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KnZHG1XhPhVjIctpqNWkWUDD7KUrvg/aY//gLQ/8NWM=; b=lQmf0EBRyjWs4rUTurCbGAsHorYxPY8mnIkYgg86Bol0ZySI8uU486bj9OEnfgKAY5IqVt 6QhebN2ULgvUiGm6jWuYjQx5BTdEqpG5cA37IB1twSProh072Qm/P+RhYdc2BYIX7XiCbB 2xgwtLtdUbP9sEOJIOk0HznJHndHgKAxQ8k5wmtt+q2gx22Ns3oVMX7oGHcmK4PKMoZT49 roZlnBIpeXCDzw52XeOnKGgob+KcZV3wSHjBijwpBCK8xQAZkFeJl+5/+6Bx1eojR1cY4S dprTtymSR5KEuhLEDIcGpUFMOSe+65FghYIdCLTlEN1ozbC6hsd72CXQ9HwrNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDj0F5GnPzpl9; Mon, 23 Oct 2023 17:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NHV9Ot074787; Mon, 23 Oct 2023 17:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NHV9GO074784; Mon, 23 Oct 2023 17:31:09 GMT (envelope-from git) Date: Mon, 23 Oct 2023 17:31:09 GMT Message-Id: <202310231731.39NHV9GO074784@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 462adef145ea - main - games/moonlight-qt: Open source PC client for NVIDIA GameStream and Sunshine List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 462adef145ea60bb0201aa23f4c3c14c453a97f9 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=462adef145ea60bb0201aa23f4c3c14c453a97f9 commit 462adef145ea60bb0201aa23f4c3c14c453a97f9 Author: Gleb Popov AuthorDate: 2023-10-23 14:53:05 +0000 Commit: Gleb Popov CommitDate: 2023-10-23 17:30:56 +0000 games/moonlight-qt: Open source PC client for NVIDIA GameStream and Sunshine Differential Revision: https://reviews.freebsd.org/D42323 --- games/moonlight-qt/Makefile | 45 ++++++++++++++++++++++ games/moonlight-qt/distinfo | 3 ++ ...ch-app_streaming_video_ffmpeg-renderers_drm.cpp | 27 +++++++++++++ games/moonlight-qt/pkg-descr | 3 ++ 4 files changed, 78 insertions(+) diff --git a/games/moonlight-qt/Makefile b/games/moonlight-qt/Makefile new file mode 100644 index 000000000000..3bc21934a1c1 --- /dev/null +++ b/games/moonlight-qt/Makefile @@ -0,0 +1,45 @@ +PORTNAME= moonlight +DISTVERSION= 5.0.0 +CATEGORIES= games +MASTER_SITES= https://github.com/moonlight-stream/moonlight-qt/releases/download/v${DISTVERSION}/ +PKGNAMESUFFIX= -qt +DISTNAME= MoonlightSrc-${DISTVERSIONFULL} + +MAINTAINER= lisp_25689@163.com +COMMENT= Gamestream client +WWW= https://github.com/moonlight-stream/moonlight-qt + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ + libopus.so:audio/opus \ + libva.so:multimedia/libva \ + libdrm.so:graphics/libdrm \ + libvdpau.so:multimedia/libvdpau \ + libwayland-client.so:graphics/wayland + +USES= desktop-file-utils gl localbase:ldflags pkgconfig \ + qmake:outsource qt:5 sdl ssl xorg +USE_QT= core declarative gui network quickcontrols2 svg widgets buildtools:build +USE_GL= egl +USE_SDL= sdl2 ttf2 +USE_XORG= x11 + +NO_WRKSUBDIR= yes + +PLIST_FILES= bin/moonlight-qt \ + share/applications/com.moonlight_stream.Moonlight.desktop \ + share/metainfo/com.moonlight_stream.Moonlight.appdata.xml \ + share/icons/hicolor/scalable/apps/moonlight.svg \ + +post-patch: + @${REINPLACE_CMD} -e 's@^ TARGET = moonlight.*@ TARGET = ${PORTNAME}${PKGNAMESUFFIX}@' \ + ${WRKSRC}/app/app.pro + @${REINPLACE_CMD} -e 's@Exec=moonlight.*@Exec=${PORTNAME}${PKGNAMESUFFIX}@' \ + ${WRKSRC}/app/deploy/linux/com.moonlight_stream.Moonlight.desktop + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX} + +.include diff --git a/games/moonlight-qt/distinfo b/games/moonlight-qt/distinfo new file mode 100644 index 000000000000..f7fb7de29906 --- /dev/null +++ b/games/moonlight-qt/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1697634805 +SHA256 (MoonlightSrc-5.0.0.tar.gz) = bb376640421cd5386a64102cbb9d78f5be87e8f796b78bf517dca2c8c37acfd4 +SIZE (MoonlightSrc-5.0.0.tar.gz) = 79821343 diff --git a/games/moonlight-qt/files/patch-app_streaming_video_ffmpeg-renderers_drm.cpp b/games/moonlight-qt/files/patch-app_streaming_video_ffmpeg-renderers_drm.cpp new file mode 100644 index 000000000000..4068c7278a21 --- /dev/null +++ b/games/moonlight-qt/files/patch-app_streaming_video_ffmpeg-renderers_drm.cpp @@ -0,0 +1,27 @@ +--- app/streaming/video/ffmpeg-renderers/drm.cpp.orig 2023-10-18 05:45:10 UTC ++++ app/streaming/video/ffmpeg-renderers/drm.cpp +@@ -10,7 +10,24 @@ extern "C" { + } + + #include ++#ifdef __linux__ + #include ++#else //bundle on BSDs ++typedef uint64_t __u64; ++// From https://github.com/evadot/drm-subtree or https://reviews.freebsd.org/D23085 ++struct dma_buf_sync { ++ __u64 flags; ++}; ++#define DMA_BUF_SYNC_READ (1 << 0) ++#define DMA_BUF_SYNC_WRITE (2 << 0) ++#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE) ++#define DMA_BUF_SYNC_START (0 << 2) ++#define DMA_BUF_SYNC_END (1 << 2) ++#define DMA_BUF_SYNC_VALID_FLAGS_MASK \ ++ (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END) ++#define DMA_BUF_BASE 'b' ++#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) ++#endif + #include + + // Special Rockchip type diff --git a/games/moonlight-qt/pkg-descr b/games/moonlight-qt/pkg-descr new file mode 100644 index 000000000000..45af489a358a --- /dev/null +++ b/games/moonlight-qt/pkg-descr @@ -0,0 +1,3 @@ +Moonlight PC is an open source PC client for NVIDIA GameStream and Sunshine. It +allows you to stream your full collection of games from your Windows/Linux +desktop to your FreeBSD system.