Skip to content

Commit

Permalink
gui-apps/waypipe: fix emesonargs and move to CPU_FLAGS_ARM
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/782745

Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Aisha Tammy <[email protected]>
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
epsilon-0 authored and juippis committed Jun 3, 2021
1 parent e5a03a7 commit f2d80ef
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 30 deletions.
12 changes: 6 additions & 6 deletions gui-apps/waypipe/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<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.
Waypipe is a proxy for all Wayland clients to allow streaming
sessions over tcp. It forwards Wayland messages and serializes
changes to shared memory buffers over a single socket, to allow
application forwarding similar to ssh -X.
</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="dmabuf">Use DMABUFs for data exchange and hardware decoding</flag>
<flag name="ffmpeg">Link with ffmpeg to allow buffer displays using video streams</flag>
<flag name="systemtap">Enable SystemTAP/DTrace tracing</flag>
</use>
</pkgmetadata>
27 changes: 16 additions & 11 deletions gui-apps/waypipe/waypipe-0.7.2.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 Gentoo Authors
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
Expand All @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{7..9} )

inherit meson python-any-r1

DESCRIPTION="network transparency with Wayland"
DESCRIPTION="Transparent network proxy for Wayland compositors"
HOMEPAGE="https://gitlab.freedesktop.org/mstoeckl/waypipe"

if [[ ${PV} == 9999 ]]; then
Expand All @@ -16,14 +16,20 @@ if [[ ${PV} == 9999 ]]; then
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"
KEYWORDS="~amd64 ~arm ~arm64 ~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_}"
WAYPIPE_FLAG_MAP_X86=( avx2:with_avx2 avx512f:with_avx512f sse3:with_sse3 )
WAYPIPE_FLAG_MAP_ARM=( neon:with_neon_opts )
WAYPIPE_FLAG_MAP=(
"${WAYPIPE_FLAG_MAP_X86[@]/#/cpu_flags_x86_}"
"${WAYPIPE_FLAG_MAP_ARM[@]/#/cpu_flags_arm_}"
)

IUSE="dmabuf ffmpeg lz4 man neon systemtap test vaapi zstd ${WAYPIPE_FLAG_MAP[@]%:*}"
REQUIRED_USE="vaapi? ( ffmpeg )"
RESTRICT="!test? ( test )"

Expand All @@ -45,18 +51,17 @@ BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
man? ( app-text/scdoc )
test? ( dev-libs/weston[wayland-compositor,screen-sharing] )
test? ( dev-libs/weston[examples,headless,remoting,screen-sharing,wayland-compositor] )
"

PATCHES=(
"${FILESDIR}"/waypipe-0.7.2-werror.patch
"${FILESDIR}"/waypipe-0.7.2-no-simd.patch
)

src_configure() {
local mymesonargs=(
local emesonargs=(
-Dwerror=false
$(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)
Expand All @@ -65,8 +70,8 @@ src_configure() {
$(meson_feature zstd with_zstd)
)
local fl
for fl in "${CPU_FLAGS_X86[@]}"; do
mymesonargs+=( $(meson_use cpu_flags_x86_$fl with_$fl ) )
for fl in "${WAYPIPE_FLAG_MAP[@]}"; do
emesonargs+=( $(meson_use "${fl%:*}" "${fl#*:}") )
done
meson_src_configure
}
28 changes: 15 additions & 13 deletions gui-apps/waypipe/waypipe-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{7..9} )

inherit meson python-any-r1

DESCRIPTION="transparent network proxy for Wayland compositors"
DESCRIPTION="Transparent network proxy for Wayland compositors"
HOMEPAGE="https://gitlab.freedesktop.org/mstoeckl/waypipe"

if [[ ${PV} == 9999 ]]; then
Expand All @@ -16,14 +16,20 @@ if [[ ${PV} == 9999 ]]; then
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"
KEYWORDS="~amd64 ~arm ~arm64 ~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_}"
WAYPIPE_FLAG_MAP_X86=( avx2:with_avx2 avx512f:with_avx512f sse3:with_sse3 )
WAYPIPE_FLAG_MAP_ARM=( neon:with_neon_opts )
WAYPIPE_FLAG_MAP=(
"${WAYPIPE_FLAG_MAP_X86[@]/#/cpu_flags_x86_}"
"${WAYPIPE_FLAG_MAP_ARM[@]/#/cpu_flags_arm_}"
)

IUSE="dmabuf ffmpeg lz4 man neon systemtap test vaapi zstd ${WAYPIPE_FLAG_MAP[@]%:*}"
REQUIRED_USE="vaapi? ( ffmpeg )"
RESTRICT="!test? ( test )"

Expand All @@ -45,17 +51,13 @@ BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
man? ( app-text/scdoc )
test? ( dev-libs/weston[wayland-compositor,screen-sharing] )
test? ( dev-libs/weston[examples,headless,remoting,screen-sharing,wayland-compositor] )
"

PATCHES=(
"${FILESDIR}"/waypipe-0.7.2-werror.patch
)

src_configure() {
local mymesonargs=(
local emesonargs=(
-Dwerror=false
$(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)
Expand All @@ -64,8 +66,8 @@ src_configure() {
$(meson_feature zstd with_zstd)
)
local fl
for fl in "${CPU_FLAGS_X86[@]}"; do
mymesonargs+=( $(meson_use cpu_flags_x86_$fl with_$fl ) )
for fl in "${WAYPIPE_FLAG_MAP[@]}"; do
emesonargs+=( $(meson_use "${fl%:*}" "${fl#*:}") )
done
meson_src_configure
}

0 comments on commit f2d80ef

Please sign in to comment.