Merge updates from master

This commit is contained in:
Repository mirror & CI
2023-01-26 09:01:55 +00:00
23 changed files with 303 additions and 907 deletions

View File

@@ -0,0 +1,15 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
DESCRIPTION="User for Mautrix Discord Bridge"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( mautrix )
ACCT_USER_HOME=/var/lib/mautrix/discord
ACCT_USER_HOME_PERMS=0750
acct-user_add_deps

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>julien@jroy.ca</email>
<name>Julien Roy</name>
</maintainer>
</pkgmetadata>

View File

@@ -0,0 +1,15 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
DESCRIPTION="User for Mautrix Slack Bridge"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( mautrix )
ACCT_USER_HOME=/var/lib/mautrix/slack
ACCT_USER_HOME_PERMS=0750
acct-user_add_deps

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>julien@jroy.ca</email>
<name>Julien Roy</name>
</maintainer>
</pkgmetadata>

View File

@@ -15,15 +15,18 @@ SRC_URI="https://github.com/click-contrib/${PN}/archive/v${PV}.tar.gz -> ${P}.gh
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test"
RDEPEND="dev-python/click[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND="
test? (
dev-python/pytest-cov[${PYTHON_USEDEP}]
<dev-python/coverage-7[${PYTHON_USEDEP}]
dev-python/coveralls[${PYTHON_USEDEP}]
)
"
# dev-python/coveralls currently masked in ::guru due to
# https://github.com/TheKevJames/coveralls-python/issues/377
# test? (
# dev-python/pytest-cov[${PYTHON_USEDEP}]
# <dev-python/coverage-7[${PYTHON_USEDEP}]
# dev-python/coveralls[${PYTHON_USEDEP}]
# )
distutils_enable_tests pytest

View File

@@ -1,2 +1 @@
DIST blueprint-compiler-v0.4.0.tar.bz2 50396 BLAKE2B eb51af35030fbaa583b809de0449e7e54143a7b5e582b9be24a0345ca704fb1b1d2778d96ebfb02cc66e4c4acdc97a0356e03624f33be1ea28316ed815c0e334 SHA512 9eb3b17e8b44ecd400c1ec683bf1edee54877a0f16e545ba2f9f9cb683163983fd096ff9403ab36658f92678036f4b6b43e1343cf2bc4793332ef4b2972408ac
DIST blueprint-compiler-v0.6.0.tar.bz2 56896 BLAKE2B 318ffa52b2fbf3b07058e5b4d2f9bb0ef1f6614586b79968889921964b454e5c26d44e58a18185263797f7569135662d14471bafd8e501d7c6386e88972193d0 SHA512 458016f4eabef15026cb3ee675111984b19af8a9139bc412dfb48dfef56b0d0ff028316001d0ce04a90b50d6785c92d799f17ed42ca53fc7582345729ae02207

View File

@@ -1,92 +0,0 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit meson python-r1
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git"
else
SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/v${PV}/blueprint-compiler-v${PV}.tar.bz2"
S="${WORKDIR}/${PN}-v${PV}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces"
HOMEPAGE="https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/"
LICENSE="LGPL-3+"
SLOT="0"
IUSE="doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
BDEPEND="
${PYTHON_DEPS}
doc? (
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/furo[${PYTHON_USEDEP}]
)
"
DEPEND="
test? (
gui-libs/gtk:4[introspection]
)
"
RDEPEND="
${PYTHON_DEPS}
"
src_configure() {
local emesonargs=(
$(meson_use doc docs)
)
python_foreach_impl meson_src_configure
}
src_compile() {
python_foreach_impl meson_src_compile
}
src_test() {
python_foreach_impl meson_src_test
}
src_install() {
my_src_install() {
local exe="${ED}/usr/bin/${PN}"
# Meson installs a Python script at ${ED}/usr/bin/${PN}; on
# Gentoo, the script should go into ${ED}/usr/lib/python-exec,
# and ${ED}/usr/bin/${PN} should be a symbolic link to
# ${ED}/usr/lib/python-exec/python-exec2.
#
# When multiple PYTHON_TARGETS are enabled, then after the
# package has been installed for one Python implementation,
# Meson will follow the ${ED}/usr/bin/${PN} symbolic link and
# install the script at ${ED}/usr/lib/python-exec/python-exec2
# for the remaining implementations, leading to file collision.
if [[ -L "${exe}" ]]; then
rm -v "${exe}" || die "Failed to remove symbolic link ${exe}"
fi
meson_src_install
python_doscript "${exe}"
python_optimize
# Install Sphinx-generated documentation only once
# since the documentation is supposed to be identical
# between different Python implementations
use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* )
}
python_foreach_impl my_src_install
einstalldocs
}

View File

@@ -1,4 +1,4 @@
# Copyright 2022 Gentoo Authors
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

View File

@@ -1,3 +1 @@
DIST dosbox-x-2022.09.1_pre20221210.tar.gz 67879960 BLAKE2B f6a6dc0bea3a56577088ee632b17b74489ede8b9cbcd51328c709a6f9bf301a301dff853acab5cb3786aff4c94a2f180e98bfe828cc2d1255a7f7edad29b9f41 SHA512 b5d996611e28e86f7ad45d09bbdcbaf161faec572f3192f034e5acead8014ba2f7f3c3a12e6fc9a5e49742cc08b3f3c4272568491322e7d400a511ce65dbd042
DIST dosbox-x-v2022.12.26.tar.gz 67886370 BLAKE2B a748c18bd51833f8532ee76cf30c1bed994458acf56f36be3207c9714678f8e1b4c4fb130aeaa54d5cac39f60484b6aa12a4d59fcd8ce1a7ddbb5d98cede9df7 SHA512 18895a3cd9b46a226490f4eda160b92f80e6a9022d22cc192cbf8ddea93803d72b658e9d88ebc3163b93d214389e74f67193e8aac37bf58f7068a1daf68dd550
DIST dosbox-x-windows-v2022.08.0.tar.gz 67809452 BLAKE2B d0d8c6b6b328b363ea939de93e920ce33b260f4f986be50028c4a2e188c292be38c256bed7b0d6e052bf2b74600ece662f05b16943e90fbd44e48e2c6b4bc3cc SHA512 d11b907ff99e8599b454dc5979055dd85a64215913cb905c66d534930ce31afaab14d04169450eef5cb286c65933159f44be6cecad6adf6c7adad1a249758d7b

View File

@@ -1,226 +0,0 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools toolchain-funcs xdg
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git"
else
SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/dosbox-x-windows-v${PV}.tar.gz"
S="${WORKDIR}/${PN}-${PN}-windows-v${PV}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Complete, accurate DOS emulator forked from DOSBox"
HOMEPAGE="https://dosbox-x.com/"
# Stay consistent with games-emulation/dosbox::gentoo even though source file
# headers specify the GPL version to be "either version 2 of the License, or
# (at your option) any later version." The same header is used in both the
# DOSBox source tree and the DOSBox-X source tree.
LICENSE="GPL-2"
SLOT="0"
IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp"
# Unit tests are only available in debug builds
RESTRICT="!debug? ( test )"
BDEPEND="
dev-lang/nasm
sys-libs/libcap
"
# Unconditionally pulling in automagically-enabled optional dependencies:
# - media-libs/alsa-lib
# - media-libs/sdl2-net
# - net-libs/libpcap
#
# With media-libs/libsdl2[-X,wayland], this package does work on a Wayland
# desktop, but (at least on GNOME) the program does not launch in a movable
# and resizable window; whereas with media-libs/libsdl2[X], it does. Thus,
# unconditionally require media-libs/libsdl2[X] for better user experience.
RDEPEND="
media-libs/alsa-lib
media-libs/libsdl2[X,opengl?,sound,threads,video]
media-libs/sdl2-net
net-libs/libpcap
sys-libs/zlib
X? (
x11-libs/libX11
x11-libs/libXrandr
x11-libs/libxkbfile
)
debug? ( sys-libs/ncurses:= )
ffmpeg? ( media-video/ffmpeg:= )
fluidsynth? ( media-sound/fluidsynth:= )
freetype? ( media-libs/freetype )
opengl? ( media-libs/libglvnd[X] )
png? ( media-libs/libpng:= )
slirp? ( net-libs/libslirp )
"
DEPEND="
${RDEPEND}
"
PATCHES=(
# https://bugs.gentoo.org/859973
# https://github.com/joncampbell123/dosbox-x/issues/3663
# https://github.com/joncampbell123/dosbox-x/pull/3710
"${FILESDIR}/${P}-fix-lto-odr.patch"
)
pkg_pretend() {
if use ffmpeg && use !png; then
ewarn "Setting the 'ffmpeg' USE flag when the 'png' USE flag is"
ewarn "unset does not have any effect. Unsetting the 'png' USE"
ewarn "flag disables the video capture feature, so additional"
ewarn "video capture formats enabled by the 'ffmpeg' USE flag"
ewarn "will end up being unused."
fi
}
src_prepare() {
default
# https://bugs.gentoo.org/887669
# Mask lines touching '-O*', and avoid creating an empty command
# list as a result to not break 'if', 'for', or functions
sed -i -E -e 's/((C|CXX)FLAGS=.*-O)/: \1/' configure.ac ||
die "Failed to stop configure.ac from touching '-O*' compiler flags"
# Patch command lines like the following in Makefile.am:
# -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x
#
# The purpose of these commands is, if the 'setcap' program exists and is
# executable, then invoke it to set capabilities required by the PCAP
# networking back-end for better out-of-box user experience; otherwise,
# ignore unsatisfied preconditions or 'setcap' errors since they are not
# critical, which is achieved by having a '-' in front of each line.
#
# Unfortunately, 'test -x /usr/sbin/setcap' does not always work as
# expected on Gentoo because it ignores the fact that some distributions,
# including Gentoo, may still have split /sbin and /usr/sbin and install
# 'setcap' to /sbin.
#
# As long as sys-libs/libcap is declared in BDEPEND of this ebuild, the
# availability of 'setcap' can be assumed, rendering the test redundant.
# However, successfully setting capabilities via 'setcap' usually requires
# the root account (which is not guaranteed on Prefix) and xattr support
# for the file system being used, so the '-' in front of each line is
# preserved to tolerate the expected 'setcap' failures.
sed -i -e 's|test -x /usr/sbin/setcap && ||' Makefile.am ||
die "Failed to remove check for setcap in Makefile.am"
eautoreconf
}
src_configure() {
local myconf=(
# --disable-core-inline could cause compiler errors
# as of v2022.08.0, so enable it unconditionally
--enable-core-inline
# Always use SDL 2, even though the package provides the option to
# build with SDL 1.x, because this package is expected to be built
# with the bundled, heavily-modified version of SDL 1.x if that
# branch is used. Compiler errors are likely to occur if the
# bundled version of SDL 1.x is not used. Bundled dependencies
# should be avoided on Gentoo, so SDL 2 is more preferable.
--enable-sdl2
# Explicitly enable ALSA MIDI support, same as default. As of
# v2022.08.0, even when it is disabled, media-libs/alsa-lib will
# still be automagically linked if it is present in the build
# environment (presumably for other components of this package),
# so the dependency cannot be made optional by disabling this
# option. Plus, disabling this option has no observable effect
# on build time, build size, or the program's functionality, as
# 'mididevice=alsa' still works with '--disable-alsa-midi'.
--enable-alsa-midi
$(use_enable debug '' heavy)
$(use_enable X x11)
$(use_enable ffmpeg avcodec)
$(use_enable fluidsynth libfluidsynth)
$(use_enable freetype)
$(use_enable opengl)
$(use_enable png screenshots)
$(use_enable slirp libslirp)
)
econf "${myconf[@]}"
}
src_compile() {
# https://bugs.gentoo.org/856352
emake AR="$(tc-getAR)"
}
src_test() {
set -- src/dosbox-x -tests
echo "${@}" >&2
"${@}" || die "Unit tests failed"
}
pkg_preinst() {
xdg_pkg_preinst
# Returns whether or not the USE flag specified with the first positional
# argument is newly enabled for this installation of the package.
newuse() {
local flag="${1}"
# The 'has_version' call tests if any USE flags are newly enabled.
# It is to extract information about any existing copy of this
# package installed on the system, which is why it should be made
# before the new copy of this package just built is merged.
use "${flag}" && ! has_version "${CATEGORY}/${PN}[${flag}]"
}
newuse debug && PRINT_NOTES_FOR_DEBUGGER=1
newuse fluidsynth && PRINT_NOTES_FOR_FLUIDSYNTH=1
}
pkg_postinst() {
xdg_pkg_postinst
if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then
elog
elog "Note on the Debugger"
elog
elog "The debugger can only be started when DOSBox-X is launched"
elog "from a terminal. Otherwise, the \"Start DOSBox-X Debugger\""
elog "option in the \"Debug\" drop-down menu would be unavailable."
elog
elog "For more information about the debugger, please consult:"
elog " ${EPREFIX}/usr/share/doc/${PF}/README.debugger*"
fi
if [[ "${PRINT_NOTES_FOR_FLUIDSYNTH}" ]]; then
elog
elog "Note on FluidSynth"
elog
elog "To use FluidSynth as the MIDI device for DOSBox-X, a soundfont"
elog "is required. If no existing soundfont is available, a new one"
elog "can be installed and configured for DOSBox-X very easily:"
elog
elog "1. Install the following package:"
elog " media-sound/fluid-soundfont"
elog "2. Add the following lines to DOSBox-X's configuration file:"
elog " [midi]"
elog " mididevice=fluidsynth"
elog
elog "Usually, there is no need to explicitly specify the soundfont"
elog "file's path because the package mentioned in step 1 installs"
elog "soundfont files to a standard location, allowing them to be"
elog "detected and selected automatically."
elog
elog "For advanced FluidSynth configuration, please consult:"
elog " https://dosbox-x.com/wiki/Guide%3ASetting-up-MIDI-in-DOSBox%E2%80%90X#_fluidsynth"
fi
}

View File

@@ -1,211 +0,0 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools readme.gentoo-r1 toolchain-funcs xdg
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git"
else
# https://github.com/joncampbell123/dosbox-x/discussions/3862
GIT_COMMIT="982c44176e7619ae2a40b5c5d8df31f2911384da"
DOC_CONTENTS="
This package has installed a copy of DOSBox-X built from an upstream
repository snapshot at the following Git commit:\n
\n
${GIT_COMMIT}
"
SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${GIT_COMMIT}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Complete, accurate DOS emulator forked from DOSBox"
HOMEPAGE="https://dosbox-x.com/"
# Stay consistent with games-emulation/dosbox::gentoo even though source file
# headers specify the GPL version to be "either version 2 of the License, or
# (at your option) any later version." The same header is used in both the
# DOSBox source tree and the DOSBox-X source tree.
LICENSE="GPL-2"
SLOT="0"
IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp"
# Unit tests are only available in debug builds
RESTRICT="!debug? ( test )"
BDEPEND="
dev-lang/nasm
sys-libs/libcap
"
# Unconditionally pulling in automagically-enabled optional dependencies:
# - media-libs/alsa-lib
# - media-libs/sdl2-net
# - net-libs/libpcap
#
# With media-libs/libsdl2[-X,wayland], this package does work on a Wayland
# desktop, but (at least on GNOME) the program does not launch in a movable
# and resizable window; whereas with media-libs/libsdl2[X], it does. Thus,
# unconditionally require media-libs/libsdl2[X] for better user experience.
RDEPEND="
media-libs/alsa-lib
media-libs/libsdl2[X,opengl?,sound,threads,video]
media-libs/sdl2-net
net-libs/libpcap
sys-libs/zlib
X? (
x11-libs/libX11
x11-libs/libXrandr
x11-libs/libxkbfile
)
debug? ( sys-libs/ncurses:= )
ffmpeg? ( media-video/ffmpeg:= )
fluidsynth? ( media-sound/fluidsynth:= )
freetype? ( media-libs/freetype )
opengl? ( media-libs/libglvnd[X] )
png? ( media-libs/libpng:= )
slirp? ( net-libs/libslirp )
"
DEPEND="
${RDEPEND}
"
pkg_pretend() {
if use ffmpeg && use !png; then
ewarn "Setting the 'ffmpeg' USE flag when the 'png' USE flag is"
ewarn "unset does not have any effect. Unsetting the 'png' USE"
ewarn "flag disables the video capture feature, so additional"
ewarn "video capture formats enabled by the 'ffmpeg' USE flag"
ewarn "will end up being unused."
fi
}
src_prepare() {
default
# https://bugs.gentoo.org/887669
# Mask lines touching '-O*', and avoid creating an empty command
# list as a result to not break 'if', 'for', or functions
sed -i -E -e 's/((C|CXX)FLAGS=.*-O)/: \1/' configure.ac ||
die "Failed to stop configure.ac from touching '-O*' compiler flags"
eautoreconf
}
src_configure() {
local myconf=(
# Always use SDL 2, even though the package provides the option to
# build with SDL 1.x, because this package is expected to be built
# with the bundled, heavily-modified version of SDL 1.x if that
# branch is used. Compiler errors are likely to occur if the
# bundled version of SDL 1.x is not used. Bundled dependencies
# should be avoided on Gentoo, so SDL 2 is more preferable.
--enable-sdl2
# Explicitly enable ALSA MIDI support, same as default. As of
# v2022.08.0, even when it is disabled, media-libs/alsa-lib will
# still be automagically linked if it is present in the build
# environment (presumably for other components of this package),
# so the dependency cannot be made optional by disabling this
# option. Plus, disabling this option has no observable effect
# on build time, build size, or the program's functionality, as
# 'mididevice=alsa' still works with '--disable-alsa-midi'.
--enable-alsa-midi
$(use_enable debug '' heavy)
$(use_enable X x11)
$(use_enable ffmpeg avcodec)
$(use_enable fluidsynth libfluidsynth)
$(use_enable freetype)
$(use_enable opengl)
$(use_enable png screenshots)
$(use_enable slirp libslirp)
)
econf "${myconf[@]}"
}
src_compile() {
# https://bugs.gentoo.org/856352
emake AR="$(tc-getAR)"
}
src_test() {
set -- src/dosbox-x -tests
echo "${@}" >&2
"${@}" || die "Unit tests failed"
}
src_install() {
default
[[ -n "${DOC_CONTENTS}" ]] && readme.gentoo_create_doc
}
pkg_preinst() {
xdg_pkg_preinst
# Returns whether or not the USE flag specified with the first positional
# argument is newly enabled for this installation of the package.
newuse() {
local flag="${1}"
# The 'has_version' call tests if any USE flags are newly enabled.
# It is to extract information about any existing copy of this
# package installed on the system, which is why it should be made
# before the new copy of this package just built is merged.
use "${flag}" && ! has_version "${CATEGORY}/${PN}[${flag}]"
}
newuse debug && PRINT_NOTES_FOR_DEBUGGER=1
newuse fluidsynth && PRINT_NOTES_FOR_FLUIDSYNTH=1
}
pkg_postinst() {
xdg_pkg_postinst
if ! has "${PVR}" ${REPLACING_VERSIONS} && [[ -n "${DOC_CONTENTS}" ]]; then
FORCE_PRINT_ELOG=1
readme.gentoo_print_elog
fi
if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then
elog
elog "Note on the Debugger"
elog
elog "The debugger can only be started when DOSBox-X is launched"
elog "from a terminal. Otherwise, the \"Start DOSBox-X Debugger\""
elog "option in the \"Debug\" drop-down menu would be unavailable."
elog
elog "For more information about the debugger, please consult:"
elog " ${EPREFIX}/usr/share/doc/${PF}/README.debugger*"
fi
if [[ "${PRINT_NOTES_FOR_FLUIDSYNTH}" ]]; then
elog
elog "Note on FluidSynth"
elog
elog "To use FluidSynth as the MIDI device for DOSBox-X, a soundfont"
elog "is required. If no existing soundfont is available, a new one"
elog "can be installed and configured for DOSBox-X very easily:"
elog
elog "1. Install the following package:"
elog " media-sound/fluid-soundfont"
elog "2. Add the following lines to DOSBox-X's configuration file:"
elog " [midi]"
elog " mididevice=fluidsynth"
elog
elog "Usually, there is no need to explicitly specify the soundfont"
elog "file's path because the package mentioned in step 1 installs"
elog "soundfont files to a standard location, allowing them to be"
elog "detected and selected automatically."
elog
elog "For advanced FluidSynth configuration, please consult:"
elog " https://dosbox-x.com/wiki/Guide%3ASetting-up-MIDI-in-DOSBox%E2%80%90X#_fluidsynth"
fi
}

View File

@@ -1,368 +0,0 @@
From 7573870bb856ade326033824d7a2ba6fb4fcdfaf Mon Sep 17 00:00:00 2001
From: Jookia <contact@jookia.org>
Date: Wed, 7 Sep 2022 10:44:48 +1000
Subject: [PATCH 1/2] libs: Namespace PhysFS lzmasdk
---
src/libs/physfs/physfs_archiver_7z.c | 1 +
src/libs/physfs/physfs_lzmasdk.h | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/libs/physfs/physfs_archiver_7z.c b/src/libs/physfs/physfs_archiver_7z.c
index 604fd13981a..4095f031710 100644
--- a/src/libs/physfs/physfs_archiver_7z.c
+++ b/src/libs/physfs/physfs_archiver_7z.c
@@ -12,6 +12,7 @@
#if PHYSFS_SUPPORTS_7Z
#include "physfs_lzmasdk.h"
+using namespace physfs_lzmasdk;
typedef struct
{
diff --git a/src/libs/physfs/physfs_lzmasdk.h b/src/libs/physfs/physfs_lzmasdk.h
index 239f8f0d1a2..f0abaa136a8 100644
--- a/src/libs/physfs/physfs_lzmasdk.h
+++ b/src/libs/physfs/physfs_lzmasdk.h
@@ -7,13 +7,15 @@ Igor Pavlov. http://www.7-zip.org/sdk.html
--ryan. */
-
/* 7zTypes.h -- Basic types
2013-11-12 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H
+// Jookia: Added to avoid conflict with other LZMA libraries
+namespace physfs_lzmasdk {
+
#ifdef _WIN32
/* #include <windows.h> */
#endif
@@ -6030,6 +6032,8 @@ static SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
return SZ_OK;
}
+}
+
#endif /* _INCLUDE_PHYSFS_LZMASDK_H_ */
/* end of physfs_lzmasdk.h ... */
From 7fb29da0ec0aff0c35c3dce2e8da14205103d5b5 Mon Sep 17 00:00:00 2001
From: Jookia <contact@jookia.org>
Date: Wed, 7 Sep 2022 10:56:40 +1000
Subject: [PATCH 2/2] cpu: Rename data types that conflict under ODR
---
src/cpu/core_dyn_x86.cpp | 4 ++--
src/cpu/core_dyn_x86/cache.h | 2 +-
src/cpu/core_dyn_x86/decoder.h | 10 +++++-----
src/cpu/core_dyn_x86/risc_x64.h | 12 ++++++------
src/cpu/core_dyn_x86/risc_x86.h | 8 ++++----
src/cpu/core_dyn_x86/string.h | 4 ++--
src/cpu/core_dynrec.cpp | 10 +++++-----
src/cpu/core_dynrec/cache.h | 2 +-
src/cpu/core_dynrec/decoder_basic.h | 10 +++++-----
src/cpu/core_normal/string.h | 4 ++--
10 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/cpu/core_dyn_x86.cpp b/src/cpu/core_dyn_x86.cpp
index 27c3dab5a6c..63beea5d495 100644
--- a/src/cpu/core_dyn_x86.cpp
+++ b/src/cpu/core_dyn_x86.cpp
@@ -98,7 +98,7 @@ enum BranchTypes {
};
-enum BlockReturn {
+enum BlockReturnDynX86 {
BR_Normal=0,
BR_Cycles,
BR_Link1,BR_Link2,
@@ -363,7 +363,7 @@ Bits CPU_Core_Dyn_X86_Run(void) {
run_block:
cache.block.running=0;
core_dyn.pagefault = false;
- BlockReturn ret=gen_runcode((uint8_t*)cache_rwtox(block->cache.start));
+ BlockReturnDynX86 ret=gen_runcode((uint8_t*)cache_rwtox(block->cache.start));
if (sizeof(CPU_Cycles) > 4) {
// HACK: All dynrec cores for each processor assume CPU_Cycles is 32-bit wide.
diff --git a/src/cpu/core_dyn_x86/cache.h b/src/cpu/core_dyn_x86/cache.h
index c3d71212a8b..bf7d557306b 100644
--- a/src/cpu/core_dyn_x86/cache.h
+++ b/src/cpu/core_dyn_x86/cache.h
@@ -495,7 +495,7 @@ static INLINE void cache_addq(uint64_t val) {
cache.pos=pos;
}
-static void gen_return(BlockReturn retcode);
+static void gen_return(BlockReturnDynX86 retcode);
static uint8_t * cache_code_start_ptr=NULL;
static uint8_t * cache_code=NULL;
diff --git a/src/cpu/core_dyn_x86/decoder.h b/src/cpu/core_dyn_x86/decoder.h
index 61dadd9083e..5f0691fa125 100644
--- a/src/cpu/core_dyn_x86/decoder.h
+++ b/src/cpu/core_dyn_x86/decoder.h
@@ -42,7 +42,7 @@ union pagefault_restore {
uint32_t dword;
};
-static struct DynDecode {
+static struct DynDecodeDynX86 {
PhysPt code;
PhysPt code_start;
PhysPt eip_location;
@@ -360,11 +360,11 @@ static INLINE void dyn_set_eip_last(void) {
}
-enum save_info_type {db_exception, cycle_check, normal, fpu_restore, trap, page_fault};
+enum save_info_type_dynx86 {db_exception, cycle_check, normal, fpu_restore, trap, page_fault};
static struct {
- save_info_type type;
+ save_info_type_dynx86 type;
DynState state;
uint8_t * branch_pos;
uint32_t eip_change;
@@ -379,7 +379,7 @@ static struct {
Bitu used_save_info=0;
-static BlockReturn DynRunException(uint32_t eip_add,uint32_t cycle_sub,uint32_t dflags) {
+static BlockReturnDynX86 DynRunException(uint32_t eip_add,uint32_t cycle_sub,uint32_t dflags) {
reg_flags=(dflags&FMASK_TEST) | (reg_flags&(~FMASK_TEST));
reg_eip+=eip_add;
CPU_Cycles-=cycle_sub;
@@ -392,7 +392,7 @@ static BlockReturn DynRunException(uint32_t eip_add,uint32_t cycle_sub,uint32_t
return BR_Normal;
}
-static BlockReturn DynRunPageFault(uint32_t eip_add,uint32_t cycle_sub,uint32_t pf_restore,uint32_t dflags) {
+static BlockReturnDynX86 DynRunPageFault(uint32_t eip_add,uint32_t cycle_sub,uint32_t pf_restore,uint32_t dflags) {
pagefault_restore pf_restore_struct;
pf_restore_struct.dword = pf_restore;
reg_flags=(dflags&FMASK_TEST) | (reg_flags&(~FMASK_TEST));
diff --git a/src/cpu/core_dyn_x86/risc_x64.h b/src/cpu/core_dyn_x86/risc_x64.h
index b1f660ca0f8..0c7d21ff270 100644
--- a/src/cpu/core_dyn_x86/risc_x64.h
+++ b/src/cpu/core_dyn_x86/risc_x64.h
@@ -269,13 +269,13 @@ class GenReg {
}
};
-static BlockReturn gen_runcodeInit(uint8_t *code);
-static BlockReturn (*gen_runcode)(uint8_t *code) = gen_runcodeInit;
+static BlockReturnDynX86 gen_runcodeInit(uint8_t *code);
+static BlockReturnDynX86 (*gen_runcode)(uint8_t *code) = gen_runcodeInit;
-static BlockReturn gen_runcodeInit(uint8_t *code) {
+static BlockReturnDynX86 gen_runcodeInit(uint8_t *code) {
uint8_t* oldpos = cache.pos;
cache.pos = &cache_code_link_blocks[128];
- gen_runcode = (BlockReturn(*)(uint8_t*))cache_rwtox(cache.pos);
+ gen_runcode = (BlockReturnDynX86(*)(uint8_t*))cache_rwtox(cache.pos);
opcode(5).Emit8Reg(0x50); // push rbp
opcode(15).Emit8Reg(0x50); // push r15
@@ -1235,7 +1235,7 @@ static void gen_test_host_byte(void * data, uint8_t imm) {
opcode(0).setimm(imm,1).setabsaddr(data).Emit8(0xF6); // test byte[], uint8_t
}
-static void gen_return(BlockReturn retcode) {
+static void gen_return(BlockReturnDynX86 retcode) {
gen_protectflags();
opcode(1).setea(4,-1,0,CALLSTACK).Emit8(0x8B); // mov ecx, [rsp+8/40]
opcode(0).set64().setrm(4).setimm(CALLSTACK+8,1).Emit8(0x83); // add rsp,16/48
@@ -1247,7 +1247,7 @@ static void gen_return(BlockReturn retcode) {
opcode(4).setea(4,-1,0,CALLSTACK-8).Emit8(0xFF); // jmp [rsp+CALLSTACK-8]
}
-static void gen_return_fast(BlockReturn retcode,bool ret_exception=false) {
+static void gen_return_fast(BlockReturnDynX86 retcode,bool ret_exception=false) {
if (GCC_UNLIKELY(x64gen.flagsactive)) IllegalOption("gen_return_fast");
opcode(1).setabsaddr(&reg_flags).Emit8(0x8B); // mov ECX, [cpu_regs.flags]
if (!ret_exception) {
diff --git a/src/cpu/core_dyn_x86/risc_x86.h b/src/cpu/core_dyn_x86/risc_x86.h
index 8d0b2174712..29e62678577 100644
--- a/src/cpu/core_dyn_x86/risc_x86.h
+++ b/src/cpu/core_dyn_x86/risc_x86.h
@@ -84,8 +84,8 @@ class GenReg {
}
};
-static BlockReturn gen_runcode(uint8_t * code) {
- BlockReturn retval;
+static BlockReturnDynX86 gen_runcode(uint8_t * code) {
+ BlockReturnDynX86 retval;
#if defined (_MSC_VER)
__asm {
/* Prepare the flags */
@@ -1072,7 +1072,7 @@ static void gen_test_host_byte(void * data, uint8_t imm) {
cache_addb(imm);
}
-static void gen_return(BlockReturn retcode) {
+static void gen_return(BlockReturnDynX86 retcode) {
gen_protectflags();
cache_addb(0x59); //POP ECX, the flags
if (retcode==0) cache_addw(0xc033); //MOV EAX, 0
@@ -1083,7 +1083,7 @@ static void gen_return(BlockReturn retcode) {
cache_addb(0xc3); //RET
}
-static void gen_return_fast(BlockReturn retcode,bool ret_exception=false) {
+static void gen_return_fast(BlockReturnDynX86 retcode,bool ret_exception=false) {
if (GCC_UNLIKELY(x86gen.flagsactive)) IllegalOption("gen_return_fast");
cache_addw(0x0d8b); //MOV ECX, the flags
cache_addd((uintptr_t)&cpu_regs.flags);
diff --git a/src/cpu/core_dyn_x86/string.h b/src/cpu/core_dyn_x86/string.h
index 01fbef2b412..f5f7cca5c70 100644
--- a/src/cpu/core_dyn_x86/string.h
+++ b/src/cpu/core_dyn_x86/string.h
@@ -18,7 +18,7 @@
#include "inout.h"
-enum STRING_OP {
+enum STRING_OP_DYNX86 {
STR_OUTSB=0,STR_OUTSW,STR_OUTSD,
STR_INSB=4,STR_INSW,STR_INSD,
STR_MOVSB=8,STR_MOVSW,STR_MOVSD,
@@ -28,7 +28,7 @@ enum STRING_OP {
STR_CMPSB=24,STR_CMPSW,STR_CMPSD
};
-static void dyn_string(STRING_OP op) {
+static void dyn_string(STRING_OP_DYNX86 op) {
DynReg * si_base=decode.segprefix ? decode.segprefix : DREG(DS);
DynReg * di_base=DREG(ES);
DynReg * tmp_reg;bool usesi;bool usedi;bool cmp=false;
diff --git a/src/cpu/core_dynrec.cpp b/src/cpu/core_dynrec.cpp
index a0097db347f..af275cbefa9 100644
--- a/src/cpu/core_dynrec.cpp
+++ b/src/cpu/core_dynrec.cpp
@@ -97,7 +97,7 @@
#define DRCD_REG_WORD(reg,dwrd) ((dwrd)?((void*)(&cpu_regs.regs[reg].dword[DW_INDEX])):((void*)(&cpu_regs.regs[reg].word[W_INDEX])))
-enum BlockReturn {
+enum BlockReturnDynRec {
BR_Normal=0,
BR_Cycles,
BR_Link1,BR_Link2,
@@ -120,7 +120,7 @@ static void IllegalOptionDynrec(const char* msg) {
}
static struct {
- BlockReturn (*runcode)(uint8_t*); // points to code that can start a block
+ BlockReturnDynRec (*runcode)(uint8_t*); // points to code that can start a block
Bitu callback; // the occurred callback
Bitu readdata; // spare space used when reading from memory
uint32_t protected_regs[8]; // space to save/restore register values
@@ -192,7 +192,7 @@ static bool winrt_warning = true;
#endif
-CacheBlockDynRec * LinkBlocks(BlockReturn ret) {
+CacheBlockDynRec * LinkBlocks(BlockReturnDynRec ret) {
CacheBlockDynRec * block=NULL;
// the last instruction was a control flow modifying instruction
uint32_t temp_ip=SegPhys(cs)+reg_eip;
@@ -307,8 +307,8 @@ Bits CPU_Core_Dynrec_Run(void) {
run_block:
cache.block.running=0;
// now we're ready to run the dynamic code block
-// BlockReturn ret=((BlockReturn (*)(void))(block->cache.start))();
- BlockReturn ret=core_dynrec.runcode(block->cache.xstart);
+// BlockReturnDynRec ret=((BlockReturnDynRec (*)(void))(block->cache.start))();
+ BlockReturnDynRec ret=core_dynrec.runcode(block->cache.xstart);
if (sizeof(CPU_Cycles) > 4) {
// HACK: All dynrec cores for each processor assume CPU_Cycles is 32-bit wide.
diff --git a/src/cpu/core_dynrec/cache.h b/src/cpu/core_dynrec/cache.h
index 7c6fb3c0755..32598b899d8 100644
--- a/src/cpu/core_dynrec/cache.h
+++ b/src/cpu/core_dynrec/cache.h
@@ -601,7 +601,7 @@ static INLINE void cache_addq(uint64_t val) {
}
-static void dyn_return(BlockReturn retcode,bool ret_exception);
+static void dyn_return(BlockReturnDynRec retcode,bool ret_exception);
static void dyn_run_code(void);
static bool cache_initialized = false;
diff --git a/src/cpu/core_dynrec/decoder_basic.h b/src/cpu/core_dynrec/decoder_basic.h
index ca7f0c8bc2a..6b468223e25 100644
--- a/src/cpu/core_dynrec/decoder_basic.h
+++ b/src/cpu/core_dynrec/decoder_basic.h
@@ -93,7 +93,7 @@ static DualOps grp1_table[8]={
// decoding information used during translation of a code block
-static struct DynDecode {
+static struct DynDecodeDynRec {
PhysPt code; // pointer to next byte in the instruction stream
PhysPt code_start; // pointer to the start of the current code block
PhysPt op_start; // pointer to the start of the current instruction
@@ -614,11 +614,11 @@ template <typename T> static DRC_PTR_SIZE_IM INLINE gen_call_function_mm(const T
-enum save_info_type {db_exception, cycle_check, string_break, trap};
+enum save_info_type_dynrec {db_exception, cycle_check, string_break, trap};
// function that is called on exceptions
-static BlockReturn DynRunException(uint32_t eip_add,uint32_t cycle_sub) {
+static BlockReturnDynRec DynRunException(uint32_t eip_add,uint32_t cycle_sub) {
reg_eip+=eip_add;
CPU_Cycles-=cycle_sub;
if (cpu.exception.which==SMC_CURRENT_BLOCK) return BR_SMCBlock;
@@ -630,7 +630,7 @@ static BlockReturn DynRunException(uint32_t eip_add,uint32_t cycle_sub) {
// array with information about code that is generated at the
// end of a cache block because it is rarely reached (like exceptions)
static struct {
- save_info_type type;
+ save_info_type_dynrec type;
DRC_PTR_SIZE_IM branch_pos;
uint32_t eip_change;
Bitu cycles;
@@ -640,7 +640,7 @@ Bitu used_save_info_dynrec=0;
// return from current block, with returncode
-static void dyn_return(BlockReturn retcode,bool ret_exception=false) {
+static void dyn_return(BlockReturnDynRec retcode,bool ret_exception=false) {
if (!ret_exception) {
gen_mov_dword_to_reg_imm(FC_RETOP,retcode);
}
diff --git a/src/cpu/core_normal/string.h b/src/cpu/core_normal/string.h
index a796ba2fc2a..4daa8b508d8 100644
--- a/src/cpu/core_normal/string.h
+++ b/src/cpu/core_normal/string.h
@@ -19,7 +19,7 @@
#include "inout.h"
#include "logging.h"
-enum STRING_OP {
+enum STRING_OP_NORMAL {
// simple string ops
R_OUTSB,R_OUTSW,R_OUTSD,
R_INSB, R_INSW, R_INSD,
@@ -35,7 +35,7 @@ enum STRING_OP {
extern int cpu_rep_max;
-void DoString(STRING_OP type) {
+void DoString(STRING_OP_NORMAL type) {
static PhysPt si_base,di_base;
static uint32_t si_index,di_index;
static uint32_t add_mask;

View File

@@ -0,0 +1,2 @@
DIST mautrix-discord-0_pre20230124.gh.tar.gz 78169 BLAKE2B e914f39d4eac89f305f0b161dc77da8dd30c84de83bbecb8578ddf210f82a0db5a7b83436bd819235fa9aa4b3efdb7f5ba41c289f2d0032e362ef2203574735b SHA512 5ef25078aa202215dc24429736afe4b5ca6408ecb4e35b7d5df72c14374e6714827bd273fcfc4897836599bbfc62fbe73cfa25a1a1c5bd342370e6fb9f43b0c1
DIST mautrix-discord-0_pre20230124.tar.xz 14405308 BLAKE2B 1c691ed99c5d18de004bdf50fbf8962c94598f0b49c9e137dec08243645ee9b42d9c654c9d573b26781e2e98647ad03f1acb4fc711df0590449600cc6812fd2e SHA512 d492d26c436f00129a0e37d2ece013f6b8a57a537b04d5bb26c4d0881cc70050d9a36241ef265591e1b051e055ef44518cb12223bd3f8d2fce826b776bedd1bf

View File

@@ -0,0 +1,25 @@
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="mautrix-discord daemon"
description="A Matrix-Discord puppeting bridge"
module="mautrix_discord"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/mautrix-discord"
command_args="-c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/discord/registration.yaml"
command_background=true
command_user="mautrix-discord:mautrix"
output_log="/var/log/mautrix/discord/daemon.log"
error_log="/var/log/mautrix/discord/daemon.log"
depend() {
need net
}
start_pre() {
checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/discord
checkpath -f -m 0644 -o "$command_user" "$output_log"
}

View File

@@ -0,0 +1,12 @@
[Unit]
Description=A Matrix-Discord puppeting bridge
After=network.target
[Service]
User=mautrix-discord
Group=mautrix
Restart=always
ExecStart=/usr/bin/mautrix-discord -c /etc/mautrix/mautrix_discord.yaml -r /var/lib/mautrix/discord/registration.yaml
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,64 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
COMMIT="587cf8a17ed20285d0be23e7838e8cd6d53ec483"
DESCRIPTION="A Matrix-Discord puppeting bridge"
HOMEPAGE="https://github.com/mautrix/discord"
SRC_URI="https://github.com/mautrix/discord/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz
https://jroy.ca/dist/${P}.tar.xz
"
S="${WORKDIR}/discord-${COMMIT}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/${PN}
dev-libs/olm
"
DEPEND="${RDEPEND}"
src_compile() {
ego build
}
src_install() {
dobin mautrix-discord
keepdir /var/log/mautrix/discord
fowners -R root:mautrix /var/log/mautrix
fperms -R 770 /var/log/mautrix
sed -i -e "s/\.\/logs/\/var\/log\/${PN/-/\\\/}/" "example-config.yaml" || die
insinto "/etc/mautrix"
newins "example-config.yaml" "${PN/-/_}.yaml"
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
fowners -R root:mautrix /etc/mautrix
fperms -R 770 /etc/mautrix
}
pkg_postinst() {
einfo
elog ""
elog "Before you can use ${PN}, you must configure it correctly"
elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\""
elog "When done, run the following command: emerge --config ${CATEGORY}/${PN}"
elog "Then, you must register the bridge with your homeserver"
elog "Refer your homeserver's documentation for instructions"
elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml"
elog "Finally, you may start the ${PN} daemon"
einfo
}
pkg_config() {
su - "${PN}" -s /bin/sh -c \
"/usr/bin/${PN} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>julien@jroy.ca</email>
<description>Julien Roy</description>
</maintainer>
<upstream>
<maintainer>
<name>Tulir Asokan</name>
<email>tulir@maunium.net</email>
</maintainer>
<changelog>https://github.com/mautrix/slack/releases</changelog>
<doc>https://docs.mau.fi/bridges/go/slack/index.html</doc>
<bugs-to>https://github.com/mautrix/slack/issues</bugs-to>
<remote-id type="github">mautrix/slack</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,2 @@
DIST mautrix-slack-0_pre20230124.gh.tar.gz 92932 BLAKE2B 502f633e649e5ce38136593df8ad347de1d7e524c4165f801641951a887412d3b9fd071ef6e19e14684f69f1d17f11689d310021bc0bd850bbef5b607640a597 SHA512 f548673e91a520236f6ec6201758eec28790a2862eeeb8ecec1060ca150203f2a4940563c802eba245066d8e33539fd09fd88fc862f80a0d303b63bf1e0c31fe
DIST mautrix-slack-0_pre20230124.tar.xz 14514900 BLAKE2B 9c8e114606f3656cf6a3996608a1d750f655b8d395787093ad87cbe65f0a3ca6d20b5597dd791af87eeab5813fd83c8f35f7377b2ddb150fe93396f9cb5eb800 SHA512 8e7557ddb6c5479707d14a52410859b56f7068f9932b4f546d0d4d8feda5ba9514c8f5175976b8eb0837f9deb3f761d737268cb3582aa466335bc3cf41a6a12b

View File

@@ -0,0 +1,25 @@
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="mautrix-slack daemon"
description="A Matrix-Slack puppeting bridge"
module="mautrix_slack"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/mautrix-slack"
command_args="-c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/slack/registration.yaml"
command_background=true
command_user="mautrix-slack:mautrix"
output_log="/var/log/mautrix/slack/daemon.log"
error_log="/var/log/mautrix/slack/daemon.log"
depend() {
need net
}
start_pre() {
checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/slack
checkpath -f -m 0644 -o "$command_user" "$output_log"
}

View File

@@ -0,0 +1,12 @@
[Unit]
Description=A Matrix-Slack puppeting bridge
After=network.target
[Service]
User=mautrix-slack
Group=mautrix
Restart=always
ExecStart=/usr/bin/mautrix-slack -c /etc/mautrix/mautrix_slack.yaml -r /var/lib/mautrix/slack/registration.yaml
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,64 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
COMMIT="67b1e7b1ff9a01d82f46187f2b9bdbadea69b63b"
DESCRIPTION="A Matrix-Slack puppeting bridge based on slack-go"
HOMEPAGE="https://github.com/mautrix/slack"
SRC_URI="https://github.com/mautrix/slack/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz
https://jroy.ca/dist/${P}.tar.xz
"
S="${WORKDIR}/slack-${COMMIT}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/${PN}
dev-libs/olm
"
DEPEND="${RDEPEND}"
src_compile() {
ego build
}
src_install() {
dobin mautrix-slack
keepdir /var/log/mautrix/slack
fowners -R root:mautrix /var/log/mautrix
fperms -R 770 /var/log/mautrix
sed -i -e "s/\.\/logs/\/var\/log\/mautrix\/slack/" "example-config.yaml" || die
insinto "/etc/mautrix"
newins "example-config.yaml" "${PN/-/_}.yaml"
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
fowners -R root:mautrix /etc/mautrix
fperms -R 770 /etc/mautrix
}
pkg_postinst() {
einfo
elog ""
elog "Before you can use ${PN}, you must configure it correctly"
elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\""
elog "When done, run the following command: emerge --config ${CATEGORY}/${PN}"
elog "Then, you must register the bridge with your homeserver"
elog "Refer your homeserver's documentation for instructions"
elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml"
elog "Finally, you may start the ${PN} daemon"
einfo
}
pkg_config() {
su - "${PN}" -s /bin/sh -c \
"/usr/bin/${PN} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>julien@jroy.ca</email>
<description>Julien Roy</description>
</maintainer>
<upstream>
<maintainer>
<name>Tulir Asokan</name>
<email>tulir@maunium.net</email>
</maintainer>
<changelog>https://github.com/mautrix/slack/releases</changelog>
<doc>https://docs.mau.fi/bridges/go/slack/index.html</doc>
<bugs-to>https://github.com/mautrix/slack/issues</bugs-to>
<remote-id type="github">mautrix/slack</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Andrew Ammerlaan <andrewammerlaan@gentoo.org> (2021-03-29)
@@ -14,6 +14,11 @@
# New entries go on top.
# Julien Roy <julien@jroy.ca> (2023-01-25)
# Requires <dev-python/coverage-7, which is no longer available in ::gentoo.
# Upstream bug: https://github.com/TheKevJames/coveralls-python/issues/377
dev-python/coveralls
# Nicola Smaniotto <smaniotto.nicola@gmail.com> (2023-01-15)
# Requires <dev-python/cleo-1, which is no longer available in ::gentoo.
# Upstream bug: https://github.com/iamkroot/trakt-scrobbler/issues/240