2022-01-07 07:42:56 +01:00
|
|
|
# Copyright 2020-2022 Gentoo Authors
|
2021-12-29 23:41:27 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit cmake git-r3 optfeature xdg
|
|
|
|
|
|
|
|
DESCRIPTION="Native desktop client for Matrix using Qt"
|
|
|
|
HOMEPAGE="https://github.com/Nheko-Reborn/nheko"
|
2021-12-31 03:26:37 +01:00
|
|
|
EGIT_REPO_URI="https://github.com/Nheko-Reborn/nheko.git"
|
|
|
|
MY_DEP_URIS=(
|
2021-12-29 23:41:27 +01:00
|
|
|
"https://github.com/Nheko-Reborn/mtxclient.git"
|
|
|
|
"https://nheko.im/nheko-reborn/coeurl.git"
|
|
|
|
)
|
|
|
|
|
|
|
|
LICENSE="GPL-3 MIT"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS=""
|
2022-07-01 19:34:01 +02:00
|
|
|
IUSE="X video voip"
|
2021-12-29 23:41:27 +01:00
|
|
|
REQUIRED_USE="video? ( voip )"
|
|
|
|
|
|
|
|
MY_GST_V="1.18"
|
|
|
|
RDEPEND="
|
2022-07-23 18:15:20 +02:00
|
|
|
app-text/cmark:=
|
2021-12-29 23:41:27 +01:00
|
|
|
dev-cpp/qt-jdenticon
|
|
|
|
>=dev-db/lmdb++-1.0.0
|
2022-07-08 12:33:18 +02:00
|
|
|
dev-libs/libfmt:=
|
2022-01-07 07:42:56 +01:00
|
|
|
dev-libs/olm
|
|
|
|
>=dev-libs/openssl-1.1.0
|
2022-07-23 18:15:20 +02:00
|
|
|
>=dev-libs/qtkeychain-0.12.0:=
|
|
|
|
dev-libs/spdlog:=
|
2021-12-29 23:41:27 +01:00
|
|
|
dev-qt/qtconcurrent:5
|
2022-01-18 15:09:36 +01:00
|
|
|
dev-qt/qtdeclarative:5[widgets]
|
2021-12-29 23:41:27 +01:00
|
|
|
dev-qt/qtgraphicaleffects:5
|
2022-07-01 19:34:01 +02:00
|
|
|
dev-qt/qtgui:5[dbus,gif,jpeg,png]
|
2021-12-29 23:41:27 +01:00
|
|
|
dev-qt/qtimageformats
|
2022-01-18 15:09:36 +01:00
|
|
|
dev-qt/qtmultimedia:5[gstreamer,qml,widgets]
|
|
|
|
dev-qt/qtquickcontrols2:5[widgets]
|
2021-12-29 23:41:27 +01:00
|
|
|
dev-qt/qtsvg:5
|
2022-01-07 07:42:56 +01:00
|
|
|
net-misc/curl
|
2022-07-01 19:34:01 +02:00
|
|
|
virtual/notification-daemon
|
2021-12-29 23:41:27 +01:00
|
|
|
voip? (
|
|
|
|
>=media-plugins/gst-plugins-dtls-${MY_GST_V}
|
|
|
|
media-plugins/gst-plugins-libnice
|
|
|
|
>=media-plugins/gst-plugins-meta-${MY_GST_V}[opus]
|
|
|
|
>=media-plugins/gst-plugins-srtp-${MY_GST_V}
|
|
|
|
>=media-plugins/gst-plugins-webrtc-${MY_GST_V}
|
|
|
|
video? (
|
|
|
|
>=media-libs/gst-plugins-base-${MY_GST_V}[opengl]
|
|
|
|
>=media-plugins/gst-plugins-meta-${MY_GST_V}[v4l,vpx]
|
|
|
|
>=media-plugins/gst-plugins-qt5-${MY_GST_V}
|
|
|
|
X? (
|
|
|
|
>=media-plugins/gst-plugins-ximagesrc-${MY_GST_V}
|
|
|
|
x11-libs/xcb-util-wm
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
"
|
|
|
|
DEPEND="
|
|
|
|
dev-cpp/nlohmann_json
|
|
|
|
${RDEPEND}
|
|
|
|
"
|
2022-03-29 01:50:31 +02:00
|
|
|
BDEPEND="
|
|
|
|
dev-qt/linguist-tools:5
|
|
|
|
|| (
|
|
|
|
app-text/asciidoc
|
|
|
|
dev-ruby/asciidoctor
|
|
|
|
)
|
|
|
|
"
|
2021-12-29 23:41:27 +01:00
|
|
|
|
|
|
|
src_unpack() {
|
2021-12-31 03:26:37 +01:00
|
|
|
# Unpack dependencies first. The commit ID of the repo used in the last call
|
|
|
|
# to git-r3_src_unpack is stored.
|
|
|
|
for repo_uri in ${MY_DEP_URIS[@]}; do
|
2021-12-30 02:27:53 +01:00
|
|
|
EGIT_REPO_URI="${repo_uri}" EGIT_CHECKOUT_DIR="${WORKDIR}/${repo_uri##*/}" git-r3_src_unpack
|
2021-12-29 23:41:27 +01:00
|
|
|
done
|
2021-12-31 03:26:37 +01:00
|
|
|
|
|
|
|
git-r3_src_unpack
|
2021-12-29 23:41:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# Don't try to download mtxclient and coeurl.
|
|
|
|
sed -Ei '/GIT_(REPOSITORY|TAG)/d' CMakeLists.txt || die
|
|
|
|
sed -Ei '/GIT_(REPOSITORY|TAG)/d' ../mtxclient.git/CMakeLists.txt || die
|
|
|
|
|
|
|
|
mkdir -p "${WORKDIR}/${P}_build/_deps" || die
|
|
|
|
mv ../mtxclient.git "${WORKDIR}/${P}_build/_deps/matrixclient-src" || die
|
|
|
|
mv ../coeurl.git "${WORKDIR}/${P}_build/_deps/coeurl-src" || die
|
|
|
|
|
2021-12-30 00:09:09 +01:00
|
|
|
cmake_src_prepare
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
2021-12-29 23:41:27 +01:00
|
|
|
local -a mycmakeargs=(
|
|
|
|
"-DUSE_BUNDLED_MTXCLIENT=ON"
|
|
|
|
"-DUSE_BUNDLED_COEURL=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=OFF"
|
|
|
|
"-DVOIP=$(usex voip)"
|
|
|
|
)
|
|
|
|
if use video && use X; then
|
|
|
|
mycmakeargs+=("-DSCREENSHARE_X11=yes")
|
|
|
|
else
|
|
|
|
mycmakeargs+=("-DSCREENSHARE_X11=no")
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
cmake_src_install
|
|
|
|
|
|
|
|
# Remove stuff from bundled libs.
|
2021-12-30 00:24:09 +01:00
|
|
|
rm -r "${D}/usr/$(get_libdir)" || die
|
2021-12-29 23:41:27 +01:00
|
|
|
rm -r "${D}/usr/include" || die
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
optfeature "audio & video file playback support" \
|
2022-05-07 23:06:28 +02:00
|
|
|
"media-plugins/gst-plugins-meta[ffmpeg]"
|
2021-12-29 23:41:27 +01:00
|
|
|
optfeature "secrets storage support other than kwallet (gnome-keyring or keepassxc)" \
|
2022-05-07 23:06:28 +02:00
|
|
|
"dev-libs/qtkeychain[gnome-keyring]"
|
|
|
|
optfeature "additional, less common, image format support" \
|
|
|
|
"kde-frameworks/kimageformats"
|
2021-12-29 23:41:27 +01:00
|
|
|
|
|
|
|
xdg_pkg_postinst
|
|
|
|
}
|