diff options
author | Aisha Tammy <gentoo@aisha.cc> | 2020-12-23 13:56:34 -0500 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2021-01-25 09:55:26 -0500 |
commit | dd2d142855ae7b8dd3bd29bf5f968a5f8672d51e (patch) | |
tree | 94902a8d77d2c1ad43562b6310b1e1c35dc538ce /gui-apps/waypipe | |
parent | gui-apps/wayvnc: simple and fast vnc server for wayland (diff) | |
download | gentoo-dd2d142855ae7b8dd3bd29bf5f968a5f8672d51e.tar.gz gentoo-dd2d142855ae7b8dd3bd29bf5f968a5f8672d51e.tar.bz2 gentoo-dd2d142855ae7b8dd3bd29bf5f968a5f8672d51e.zip |
gui-apps/waypipe: transparent proxy for wayland over networks
Allows for using wayland through network sockets
much like ssh -X, so that GUIs can be viewed remotely.
A much lighter protocol than VNC as there is no
need for sending frames over the tunnell.
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Closes: https://github.com/gentoo/gentoo/pull/18789
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'gui-apps/waypipe')
-rw-r--r-- | gui-apps/waypipe/Manifest | 1 | ||||
-rw-r--r-- | gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch | 38 | ||||
-rw-r--r-- | gui-apps/waypipe/files/waypipe-0.7.2-werror.patch | 12 | ||||
-rw-r--r-- | gui-apps/waypipe/metadata.xml | 24 | ||||
-rw-r--r-- | gui-apps/waypipe/waypipe-0.7.2.ebuild | 72 | ||||
-rw-r--r-- | gui-apps/waypipe/waypipe-9999.ebuild | 72 |
6 files changed, 219 insertions, 0 deletions
diff --git a/gui-apps/waypipe/Manifest b/gui-apps/waypipe/Manifest new file mode 100644 index 000000000000..50c4b956b8a0 --- /dev/null +++ b/gui-apps/waypipe/Manifest @@ -0,0 +1 @@ +DIST waypipe-0.7.2.tar.gz 202601 BLAKE2B bc8a03c8b47ee65a158ca45047f1989761c36b7b6fb5196784637f4e937fa2e5076497079f8368daf20592351e60a12fda5f4500b7220320b4c4a73ca9e5b1e0 SHA512 b126ea9d30864ecba67447793f39dbbe8bc73ab33c79879ac243023c64930e9aae887f13c0fdcc4cdf307b0ca6766b1012915dc88c596b7c250e3b35f6ba9190 diff --git a/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch b/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch new file mode 100644 index 000000000000..df464810e1b3 --- /dev/null +++ b/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch @@ -0,0 +1,38 @@ +make simd instructions optional + +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -5,3 +5,7 @@ option('with_lz4', type : 'feature', value : 'auto', description : 'Support LZ4 + option('with_zstd', type : 'feature', value : 'auto', description : 'Support ZStandard as a compression mechanism') + option('with_vaapi', type : 'feature', value : 'auto', description : 'Link with libva and use VAAPI to perform hardware video output color space conversions on GPU') + option('with_systemtap', type: 'boolean', value: true, description: 'Enable tracing using sdt and provide static tracepoints for profiling') ++option('with_avx512f', type: 'boolean', value: true, description: 'Enable avx512f SIMD instructions') ++option('with_avx2', type: 'boolean', value: true, description: 'Enable avx2 SIMD instructions') ++option('with_sse3', type: 'boolean', value: true, description: 'Enable sse3 SIMD instructions') ++option('with_neon_opts', type: 'boolean', value: true, description: 'Enable optimizations for ARM64 neon cpus') +--- a/src/meson.build ++++ b/src/meson.build +@@ -25,19 +25,19 @@ endif + # Conditionally compile SIMD-optimized code. + # (The meson simd module is a bit too limited for this) + kernel_libs = [] +-if cc.has_argument('-mavx512f') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') ++if cc.has_argument('-mavx512f') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') and get_option('with_avx512f') + kernel_libs += static_library('kernel_avx512f', 'kernel_avx512f.c', c_args:['-mavx512f', '-mlzcnt', '-mbmi']) + config_data.set('HAVE_AVX512F', 1, description: 'Compiler supports AVX-512F') + endif +-if cc.has_argument('-mavx2') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') ++if cc.has_argument('-mavx2') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') and get_option('with_avx2') + kernel_libs += static_library('kernel_avx2', 'kernel_avx2.c', c_args:['-mavx2', '-mlzcnt', '-mbmi']) + config_data.set('HAVE_AVX2', 1, description: 'Compiler supports AVX2') + endif +-if cc.has_argument('-msse3') ++if cc.has_argument('-msse3') and get_option('with_sse3') + kernel_libs += static_library('kernel_sse3', 'kernel_sse3.c', c_args:['-msse3']) + config_data.set('HAVE_SSE3', 1, description: 'Compiler supports SSE 3') + endif +-if host_machine.cpu_family() == 'aarch64' or cc.has_argument('-mfpu=neon') ++if ( host_machine.cpu_family() == 'aarch64' or cc.has_argument('-mfpu=neon') ) and get_option('with_neon_opts') + neon_args = host_machine.cpu_family() == 'aarch64' ? [] : ['-mfpu=neon'] + + # Clang additionally enforces that NEON code only be compiled diff --git a/gui-apps/waypipe/files/waypipe-0.7.2-werror.patch b/gui-apps/waypipe/files/waypipe-0.7.2-werror.patch new file mode 100644 index 000000000000..289a0c29acb5 --- /dev/null +++ b/gui-apps/waypipe/files/waypipe-0.7.2-werror.patch @@ -0,0 +1,12 @@ +diff --git a/meson.build b/meson.build +index d023f1f..372f0e3 100644 +--- a/meson.build ++++ b/meson.build +@@ -6,7 +6,6 @@ project( + default_options: [ + 'c_std=c11', + 'warning_level=3', +- 'werror=true', + ], + version: '0.7.2', + ) diff --git a/gui-apps/waypipe/metadata.xml b/gui-apps/waypipe/metadata.xml new file mode 100644 index 000000000000..c0b193b3bddb --- /dev/null +++ b/gui-apps/waypipe/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@aisha.cc</email> + <name>Aisha Tammy</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + waypipe is a proxy for wayland clients to allow streaming. + sessions over tcp. It forwards Wayland messages and + serializes changes to shared memory buffers over a single socket. + This makes application forwarding similar to ssh -X feasible. + </longdescription> + <use> + <flag name="dmabuf">Use dmabuf for data exchange and hardware decoding</flag> + <flag name="ffmpeg">Link with ffmpeg for software decoding</flag> + <flag name="man">Build and install man pages</flag> + <flag name="systemtap">Enable SystemTAP/DTrace tracing</flag> + </use> +</pkgmetadata> diff --git a/gui-apps/waypipe/waypipe-0.7.2.ebuild b/gui-apps/waypipe/waypipe-0.7.2.ebuild new file mode 100644 index 000000000000..ad21057c1731 --- /dev/null +++ b/gui-apps/waypipe/waypipe-0.7.2.ebuild @@ -0,0 +1,72 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit meson python-any-r1 + +DESCRIPTION="network transparency with Wayland" +HOMEPAGE="https://gitlab.freedesktop.org/mstoeckl/waypipe" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mstoeckl/waypipe" +else + SRC_URI="https://gitlab.freedesktop.org/mstoeckl/waypipe/-/archive/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-v${PV} + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" + +CPU_FLAGS_X86=( "avx2" "avx512f" "sse3" ) +IUSE="dmabuf ffmpeg lz4 man neon systemtap test vaapi zstd ${CPU_FLAGS_X86[@]/#/cpu_flags_x86_}" +REQUIRED_USE="vaapi? ( ffmpeg )" +RESTRICT="!test? ( test )" + +DEPEND=" + dmabuf? ( + media-libs/mesa[gbm,vaapi?,wayland] + x11-libs/libdrm + ) + lz4? ( app-arch/lz4 ) + systemtap? ( dev-util/systemtap ) + vaapi? ( x11-libs/libva[drm,wayland] ) + ffmpeg? ( + media-video/ffmpeg[x264,vaapi?] + ) + zstd? ( app-arch/zstd ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + man? ( app-text/scdoc ) + test? ( dev-libs/weston[wayland-compositor,screen-sharing] ) +" + +PATCHES=( + "${FILESDIR}"/waypipe-0.7.2-werror.patch + "${FILESDIR}"/waypipe-0.7.2-no-simd.patch +) + +src_configure() { + local mymesonargs=( + $(meson_use systemtap with_systemtap) + $(meson_use neon with_neon_opts) + $(meson_feature dmabuf with_dmabuf) + $(meson_feature ffmpeg with_video) + $(meson_feature lz4 with_lz4) + $(meson_feature man man-pages) + $(meson_feature vaapi with_vaapi) + $(meson_feature zstd with_zstd) + ) + local fl + for fl in "${CPU_FLAGS_X86[@]}"; do + mymesonargs+=( $(meson_use cpu_flags_x86_$fl with_$fl ) ) + done + meson_src_configure +} diff --git a/gui-apps/waypipe/waypipe-9999.ebuild b/gui-apps/waypipe/waypipe-9999.ebuild new file mode 100644 index 000000000000..60bffcfedb71 --- /dev/null +++ b/gui-apps/waypipe/waypipe-9999.ebuild @@ -0,0 +1,72 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit meson python-any-r1 + +DESCRIPTION="transparent network proxy for Wayland compositors" +HOMEPAGE="https://gitlab.freedesktop.org/mstoeckl/waypipe" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mstoeckl/waypipe" +else + SRC_URI="https://gitlab.freedesktop.org/mstoeckl/waypipe/-/archive/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-v${PV} + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" + +CPU_FLAGS_X86=( "avx2" "avx512f" "sse3" ) +IUSE="dmabuf ffmpeg lz4 man neon systemtap test vaapi zstd ${CPU_FLAGS_X86[@]/#/cpu_flags_x86_}" +REQUIRED_USE="vaapi? ( ffmpeg )" +RESTRICT="!test? ( test )" + +DEPEND=" + dmabuf? ( + media-libs/mesa[gbm,vaapi?,wayland] + x11-libs/libdrm + ) + lz4? ( app-arch/lz4 ) + systemtap? ( dev-util/systemtap ) + vaapi? ( x11-libs/libva[drm,wayland] ) + ffmpeg? ( + media-video/ffmpeg[x264,vaapi?] + ) + zstd? ( app-arch/zstd ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + man? ( app-text/scdoc ) + test? ( dev-libs/weston[wayland-compositor,screen-sharing] ) +" + +PATCHES=( + "${FILESDIR}"/waypipe-0.7.2-werror.patch + "${FILESDIR}"/waypipe-0.7.2-no-simd.patch +) + +src_configure() { + local mymesonargs=( + $(meson_use systemtap with_systemtap) + $(meson_use neon with_neon_opts) + $(meson_feature dmabuf with_dmabuf) + $(meson_feature ffmpeg with_video) + $(meson_feature lz4 with_lz4) + $(meson_feature man man-pages) + $(meson_feature vaapi with_vaapi) + $(meson_feature zstd with_zstd) + ) + local fl + for fl in "${CPU_FLAGS_X86[@]}"; do + mymesonargs+=( $(meson_use cpu_flags_x86_$fl with_$fl ) ) + done + meson_src_configure +} |