diff --git a/acct-user/mautrix-discord/mautrix-discord-0.ebuild b/acct-user/mautrix-discord/mautrix-discord-0.ebuild
new file mode 100644
index 0000000000..050b929494
--- /dev/null
+++ b/acct-user/mautrix-discord/mautrix-discord-0.ebuild
@@ -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
diff --git a/acct-user/mautrix-discord/metadata.xml b/acct-user/mautrix-discord/metadata.xml
new file mode 100644
index 0000000000..97ba7c28bb
--- /dev/null
+++ b/acct-user/mautrix-discord/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ julien@jroy.ca
+ Julien Roy
+
+
diff --git a/acct-user/mautrix-slack/mautrix-slack-0.ebuild b/acct-user/mautrix-slack/mautrix-slack-0.ebuild
new file mode 100644
index 0000000000..75cbaf8e86
--- /dev/null
+++ b/acct-user/mautrix-slack/mautrix-slack-0.ebuild
@@ -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
diff --git a/acct-user/mautrix-slack/metadata.xml b/acct-user/mautrix-slack/metadata.xml
new file mode 100644
index 0000000000..97ba7c28bb
--- /dev/null
+++ b/acct-user/mautrix-slack/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ julien@jroy.ca
+ Julien Roy
+
+
diff --git a/dev-python/click-option-group/click-option-group-0.5.5.ebuild b/dev-python/click-option-group/click-option-group-0.5.5.ebuild
index d4ac04a236..38e42ccaea 100644
--- a/dev-python/click-option-group/click-option-group-0.5.5.ebuild
+++ b/dev-python/click-option-group/click-option-group-0.5.5.ebuild
@@ -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}]
- &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
-}
diff --git a/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210-r1.ebuild b/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210-r1.ebuild
deleted file mode 100644
index 3e9516b1fb..0000000000
--- a/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210-r1.ebuild
+++ /dev/null
@@ -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
-}
diff --git a/games-emulation/dosbox-x/files/dosbox-x-2022.08.0-fix-lto-odr.patch b/games-emulation/dosbox-x/files/dosbox-x-2022.08.0-fix-lto-odr.patch
deleted file mode 100644
index daf0ae2f2b..0000000000
--- a/games-emulation/dosbox-x/files/dosbox-x-2022.08.0-fix-lto-odr.patch
+++ /dev/null
@@ -1,368 +0,0 @@
-From 7573870bb856ade326033824d7a2ba6fb4fcdfaf Mon Sep 17 00:00:00 2001
-From: Jookia
-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 */
- #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
-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(®_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 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;
diff --git a/net-im/mautrix-discord/Manifest b/net-im/mautrix-discord/Manifest
new file mode 100644
index 0000000000..5d16a5f527
--- /dev/null
+++ b/net-im/mautrix-discord/Manifest
@@ -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
diff --git a/net-im/mautrix-discord/files/mautrix-discord.initd b/net-im/mautrix-discord/files/mautrix-discord.initd
new file mode 100644
index 0000000000..18c6b06e23
--- /dev/null
+++ b/net-im/mautrix-discord/files/mautrix-discord.initd
@@ -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"
+}
diff --git a/net-im/mautrix-discord/files/mautrix-discord.service b/net-im/mautrix-discord/files/mautrix-discord.service
new file mode 100644
index 0000000000..a9ed892182
--- /dev/null
+++ b/net-im/mautrix-discord/files/mautrix-discord.service
@@ -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
\ No newline at end of file
diff --git a/net-im/mautrix-discord/mautrix-discord-0_pre20230124.ebuild b/net-im/mautrix-discord/mautrix-discord-0_pre20230124.ebuild
new file mode 100644
index 0000000000..dbaa66d62f
--- /dev/null
+++ b/net-im/mautrix-discord/mautrix-discord-0_pre20230124.ebuild
@@ -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"
+}
diff --git a/net-im/mautrix-discord/metadata.xml b/net-im/mautrix-discord/metadata.xml
new file mode 100644
index 0000000000..88c9bccab8
--- /dev/null
+++ b/net-im/mautrix-discord/metadata.xml
@@ -0,0 +1,18 @@
+
+
+
+
+ julien@jroy.ca
+ Julien Roy
+
+
+
+ Tulir Asokan
+ tulir@maunium.net
+
+ https://github.com/mautrix/slack/releases
+ https://docs.mau.fi/bridges/go/slack/index.html
+ https://github.com/mautrix/slack/issues
+ mautrix/slack
+
+
diff --git a/net-im/mautrix-slack/Manifest b/net-im/mautrix-slack/Manifest
new file mode 100644
index 0000000000..c5148dafb0
--- /dev/null
+++ b/net-im/mautrix-slack/Manifest
@@ -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
diff --git a/net-im/mautrix-slack/files/mautrix-slack.initd b/net-im/mautrix-slack/files/mautrix-slack.initd
new file mode 100644
index 0000000000..d971fc549c
--- /dev/null
+++ b/net-im/mautrix-slack/files/mautrix-slack.initd
@@ -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"
+}
diff --git a/net-im/mautrix-slack/files/mautrix-slack.service b/net-im/mautrix-slack/files/mautrix-slack.service
new file mode 100644
index 0000000000..331d2555b8
--- /dev/null
+++ b/net-im/mautrix-slack/files/mautrix-slack.service
@@ -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
\ No newline at end of file
diff --git a/net-im/mautrix-slack/mautrix-slack-0_pre20230124.ebuild b/net-im/mautrix-slack/mautrix-slack-0_pre20230124.ebuild
new file mode 100644
index 0000000000..fca96c067d
--- /dev/null
+++ b/net-im/mautrix-slack/mautrix-slack-0_pre20230124.ebuild
@@ -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"
+}
diff --git a/net-im/mautrix-slack/metadata.xml b/net-im/mautrix-slack/metadata.xml
new file mode 100644
index 0000000000..88c9bccab8
--- /dev/null
+++ b/net-im/mautrix-slack/metadata.xml
@@ -0,0 +1,18 @@
+
+
+
+
+ julien@jroy.ca
+ Julien Roy
+
+
+
+ Tulir Asokan
+ tulir@maunium.net
+
+ https://github.com/mautrix/slack/releases
+ https://docs.mau.fi/bridges/go/slack/index.html
+ https://github.com/mautrix/slack/issues
+ mautrix/slack
+
+
diff --git a/profiles/package.mask b/profiles/package.mask
index 9ffc66c8a4..99df91873f 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -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 (2021-03-29)
@@ -14,6 +14,11 @@
# New entries go on top.
+# Julien Roy (2023-01-25)
+# Requires (2023-01-15)
# Requires