From c9f76c79420506ebe30372e91e9ffd855bedd3e6 Mon Sep 17 00:00:00 2001 From: Yuan Liao Date: Wed, 25 Jan 2023 14:25:15 -0800 Subject: [PATCH 1/9] games-emulation/dosbox-x: Drop 2022.08.0-r1, 2022.09.1_pre20221210-r1 Signed-off-by: Yuan Liao --- games-emulation/dosbox-x/Manifest | 2 - .../dosbox-x/dosbox-x-2022.08.0-r1.ebuild | 226 ----------- .../dosbox-x-2022.09.1_pre20221210-r1.ebuild | 211 ---------- .../dosbox-x-2022.08.0-fix-lto-odr.patch | 368 ------------------ 4 files changed, 807 deletions(-) delete mode 100644 games-emulation/dosbox-x/dosbox-x-2022.08.0-r1.ebuild delete mode 100644 games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210-r1.ebuild delete mode 100644 games-emulation/dosbox-x/files/dosbox-x-2022.08.0-fix-lto-odr.patch diff --git a/games-emulation/dosbox-x/Manifest b/games-emulation/dosbox-x/Manifest index 50af68e752..787d6cf30d 100644 --- a/games-emulation/dosbox-x/Manifest +++ b/games-emulation/dosbox-x/Manifest @@ -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 diff --git a/games-emulation/dosbox-x/dosbox-x-2022.08.0-r1.ebuild b/games-emulation/dosbox-x/dosbox-x-2022.08.0-r1.ebuild deleted file mode 100644 index 5956244b0e..0000000000 --- a/games-emulation/dosbox-x/dosbox-x-2022.08.0-r1.ebuild +++ /dev/null @@ -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 -} 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; From a1d2a1419061ef902ef9546de91b1de56df49910 Mon Sep 17 00:00:00 2001 From: Yuan Liao Date: Wed, 25 Jan 2023 14:25:38 -0800 Subject: [PATCH 2/9] dev-util/blueprint-compiler: Update copyright year in live ebuild Fixes: 5a6292c157f7e0e83b2e97615affb8313ee558e6 Signed-off-by: Yuan Liao --- dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild index ae884dac1f..99c1980a43 100644 --- a/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild +++ b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild @@ -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 From 29b79fbcf1597d1f6a8d21e95e1e972885936ce3 Mon Sep 17 00:00:00 2001 From: Yuan Liao Date: Wed, 25 Jan 2023 14:26:14 -0800 Subject: [PATCH 3/9] dev-util/blueprint-compiler: Drop 0.4.0 Signed-off-by: Yuan Liao --- dev-util/blueprint-compiler/Manifest | 1 - .../blueprint-compiler-0.4.0.ebuild | 92 ------------------- 2 files changed, 93 deletions(-) delete mode 100644 dev-util/blueprint-compiler/blueprint-compiler-0.4.0.ebuild diff --git a/dev-util/blueprint-compiler/Manifest b/dev-util/blueprint-compiler/Manifest index 1e308fba2d..0abec39801 100644 --- a/dev-util/blueprint-compiler/Manifest +++ b/dev-util/blueprint-compiler/Manifest @@ -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 diff --git a/dev-util/blueprint-compiler/blueprint-compiler-0.4.0.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-0.4.0.ebuild deleted file mode 100644 index 65b53ce6a1..0000000000 --- a/dev-util/blueprint-compiler/blueprint-compiler-0.4.0.ebuild +++ /dev/null @@ -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 -} From 23babe1a9c0cfba4b0d476e9ef4f752e95fdf4bf Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 25 Jan 2023 23:11:37 -0500 Subject: [PATCH 4/9] acct-user/mautrix-slack: new package, add 0 Signed-off-by: Julien Roy --- acct-user/mautrix-slack/mautrix-slack-0.ebuild | 15 +++++++++++++++ acct-user/mautrix-slack/metadata.xml | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 acct-user/mautrix-slack/mautrix-slack-0.ebuild create mode 100644 acct-user/mautrix-slack/metadata.xml 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 + + From bdc336c22d1202574db45fc99c4d6b7ff48961e3 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 25 Jan 2023 23:13:27 -0500 Subject: [PATCH 5/9] net-im/mautrix-slack: new package, add 0_pre20230124 Signed-off-by: Julien Roy --- net-im/mautrix-slack/Manifest | 2 + .../mautrix-slack/files/mautrix-slack.initd | 25 ++++++++ .../mautrix-slack/files/mautrix-slack.service | 12 ++++ .../mautrix-slack-0_pre20230124.ebuild | 64 +++++++++++++++++++ net-im/mautrix-slack/metadata.xml | 18 ++++++ 5 files changed, 121 insertions(+) create mode 100644 net-im/mautrix-slack/Manifest create mode 100644 net-im/mautrix-slack/files/mautrix-slack.initd create mode 100644 net-im/mautrix-slack/files/mautrix-slack.service create mode 100644 net-im/mautrix-slack/mautrix-slack-0_pre20230124.ebuild create mode 100644 net-im/mautrix-slack/metadata.xml 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 + + From 108ea16d34068f1ad6f337a822f1a722dba45cfa Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 25 Jan 2023 23:34:21 -0500 Subject: [PATCH 6/9] profiles: mask dev-python/coveralls Signed-off-by: Julien Roy --- profiles/package.mask | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 Date: Wed, 25 Jan 2023 23:35:14 -0500 Subject: [PATCH 7/9] dev-python/click-option-group: restrict test Signed-off-by: Julien Roy --- .../click-option-group-0.5.5.ebuild | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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}] - Date: Thu, 26 Jan 2023 00:18:32 -0500 Subject: [PATCH 8/9] acct-user/mautrix-discord: new package, add 0 Signed-off-by: Julien Roy --- .../mautrix-discord/mautrix-discord-0.ebuild | 15 +++++++++++++++ acct-user/mautrix-discord/metadata.xml | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 acct-user/mautrix-discord/mautrix-discord-0.ebuild create mode 100644 acct-user/mautrix-discord/metadata.xml 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 + + From 0c250f9633324eb35160cb1906087e386f3e6411 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Thu, 26 Jan 2023 00:19:25 -0500 Subject: [PATCH 9/9] net-im/mautrix-discord: new package, add 0_pre20230124 Signed-off-by: Julien Roy --- net-im/mautrix-discord/Manifest | 2 + .../files/mautrix-discord.initd | 25 ++++++++ .../files/mautrix-discord.service | 12 ++++ .../mautrix-discord-0_pre20230124.ebuild | 64 +++++++++++++++++++ net-im/mautrix-discord/metadata.xml | 18 ++++++ 5 files changed, 121 insertions(+) create mode 100644 net-im/mautrix-discord/Manifest create mode 100644 net-im/mautrix-discord/files/mautrix-discord.initd create mode 100644 net-im/mautrix-discord/files/mautrix-discord.service create mode 100644 net-im/mautrix-discord/mautrix-discord-0_pre20230124.ebuild create mode 100644 net-im/mautrix-discord/metadata.xml 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 + +