diff options
Diffstat (limited to 'app-misc/reptyr')
-rw-r--r-- | app-misc/reptyr/Manifest | 3 | ||||
-rw-r--r-- | app-misc/reptyr/files/reptyr-0.8.0-riscv64-support.patch | 115 | ||||
-rw-r--r-- | app-misc/reptyr/reptyr-0.8.0.ebuild | 38 |
3 files changed, 0 insertions, 156 deletions
diff --git a/app-misc/reptyr/Manifest b/app-misc/reptyr/Manifest index 059fa55f2aaa..c806c55dc5a3 100644 --- a/app-misc/reptyr/Manifest +++ b/app-misc/reptyr/Manifest @@ -1,6 +1,3 @@ -AUX reptyr-0.8.0-riscv64-support.patch 4120 BLAKE2B d7bd33368e97083e2c213be23440bff3f5823a6bc9176c45047ef9db6754c94167e00669837c6060e8a4ee2a5e741b37e70fcf58481aa31f8abbe37d42fe2cb7 SHA512 c281d654bebb3d1c1450ffcca2992c0aceff04daf6d06a1c91ccb886aadb6c0091e0156b04c20139492b2a9c077e194b0f4091f685641b1c6089c2dbc2f82c11 -DIST reptyr-0.8.0.tar.gz 32239 BLAKE2B eb3d966c06df710ea27a421bceaca0c91e342cb981567eedc9125e5dd2dc937be294dc212ed9b3021d5e5d75e1011fa4a39eaf93c152c24ef7c5098f8edd9018 SHA512 880d899a2b6df3c33909dc70ce0a58f413b2e2eec2e212abc709348345d48294cf2e39f5891ab4b1fa24e69b54effe99c1b8ab03b448bfd7097e20498e7e85dc DIST reptyr-0.9.0.tar.gz 32589 BLAKE2B 2673128d90f302a5591466314446257b654f727efce24e2c1a68a2f876a7b385905acb5a4648945ce15e90e2419b4aee5a8a88377dd8229f3b130ba5ba858e46 SHA512 a59670449cb597657dbb244228fd4246142190615ce1a6369f11b8c99cb12d8e2bedb4efd7cdc301a4f7c18d29e8799eea8f14d062a8ad7b7c025034cba66ac7 -EBUILD reptyr-0.8.0.ebuild 876 BLAKE2B 67dbdb76e704f87adef46cb7d7bc5e111e34194965473e4a5bc98b463284ce28187e5fa95c8e7142e6f7958cf007476294e686091eec2d4ee10128f3387eda95 SHA512 307eafc1b4372138576c1595c3a6da6cfe618a9f522b59faa6cee482bd21b3ec02683c4227de2b50e00130adc16bcdc467b39260ca4f4c537bf05d7216336720 EBUILD reptyr-0.9.0.ebuild 785 BLAKE2B 4b333037570dc132b6ec94afd9b63e633de15d66b034b0be3af3d1290ebd45bb663ca3958e7eef8c5a8c32a817c25efe6482bc47daba8ed650d820458c0962eb SHA512 3db41ba83f56d0a55ae3180ba4b15547fe7e8592f8671604e87ecea7c342312fdc310e328661fb5fdf1222e0d22490acc00e49208087180d70c891963772bf4d MISC metadata.xml 355 BLAKE2B 67047538548ad5ef407f8c888726911621e53b66e826e5256cfec97a6b13b99f71bf7e902e9c8f83bfc20311451a3fbb921bcaed594c43736ca6a4bde59c078f SHA512 6b153c764391595c74666a82569d1fb16ab33731d258a5b73ae6e537c3c5228b29802902a2e18b5a271a0195f8e42a45df558aae6e5e548e8f6cec5efffd8b31 diff --git a/app-misc/reptyr/files/reptyr-0.8.0-riscv64-support.patch b/app-misc/reptyr/files/reptyr-0.8.0-riscv64-support.patch deleted file mode 100644 index 6cedd3a55c5d..000000000000 --- a/app-misc/reptyr/files/reptyr-0.8.0-riscv64-support.patch +++ /dev/null @@ -1,115 +0,0 @@ -Taken from https://github.com/nelhage/reptyr/commit/e26724cc1ae5fe7af0c9fb6369f6cf09d1d12900 - -From ae0b4ec014c1a01b1c3409e5404cf0fa0102c349 Mon Sep 17 00:00:00 2001 -From: Ast-x64 <Ast-x64@protonmail.com> -Date: Wed, 10 Nov 2021 09:39:45 +0800 -Subject: [PATCH] Support riscv64 on Linux. - ---- - platform/linux/arch/riscv64.h | 68 +++++++++++++++++++++++++++++++++++ - platform/linux/linux_ptrace.c | 2 ++ - ptrace.h | 3 ++ - 3 files changed, 73 insertions(+) - create mode 100644 platform/linux/arch/riscv64.h - -diff --git a/platform/linux/arch/riscv64.h b/platform/linux/arch/riscv64.h -new file mode 100644 -index 0000000..96221c3 ---- /dev/null -+++ b/platform/linux/arch/riscv64.h -@@ -0,0 +1,68 @@ -+/* -+ * Copyright (C) 2021 by Ast-x64 -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+ * THE SOFTWARE. -+ */ -+static struct ptrace_personality arch_personality[1] = { -+ { -+ offsetof(struct user_regs_struct, a0), -+ offsetof(struct user_regs_struct, a0), -+ offsetof(struct user_regs_struct, a1), -+ offsetof(struct user_regs_struct, a2), -+ offsetof(struct user_regs_struct, a3), -+ offsetof(struct user_regs_struct, a4), -+ offsetof(struct user_regs_struct, a5), -+ offsetof(struct user_regs_struct, pc), -+ } -+}; -+ -+static inline void arch_fixup_regs(struct ptrace_child *child) { -+ child->regs.pc -= 4; -+} -+ -+static inline int arch_set_syscall(struct ptrace_child *child, -+ unsigned long sysno) { -+ unsigned long x_reg[18]; -+ struct iovec reg_iovec = { -+ .iov_base = x_reg, -+ .iov_len = sizeof(x_reg) -+ }; -+ if (ptrace_command(child, PTRACE_GETREGSET, NT_PRSTATUS, ®_iovec) < 0) -+ return -1; -+ -+ x_reg[17] = sysno; -+ return ptrace_command(child, PTRACE_SETREGSET, NT_PRSTATUS, ®_iovec); -+} -+ -+static inline int arch_save_syscall(struct ptrace_child *child) { -+ unsigned long x_reg[18]; -+ struct iovec reg_iovec = { -+ .iov_base = x_reg, -+ .iov_len = sizeof(x_reg) -+ }; -+ if (ptrace_command(child, PTRACE_GETREGSET, NT_PRSTATUS, ®_iovec) < 0) -+ return -1; -+ -+ child->saved_syscall = x_reg[17]; -+ return 0; -+} -+ -+static inline int arch_restore_syscall(struct ptrace_child *child) { -+ return arch_set_syscall(child, child->saved_syscall); -+} -diff --git a/platform/linux/linux_ptrace.c b/platform/linux/linux_ptrace.c -index d065199..bcbe600 100644 ---- a/platform/linux/linux_ptrace.c -+++ b/platform/linux/linux_ptrace.c -@@ -84,6 +84,8 @@ static struct ptrace_personality *personality(struct ptrace_child *child); - #include "arch/aarch64.h" - #elif defined(__powerpc__) - #include "arch/powerpc.h" -+#elif defined(__riscv) && __riscv_xlen == 64 -+#include "arch/riscv64.h" - #else - #error Unsupported architecture. - #endif -diff --git a/ptrace.h b/ptrace.h -index ee05bd7..8e3a7f4 100644 ---- a/ptrace.h -+++ b/ptrace.h -@@ -25,6 +25,9 @@ - #ifdef __powerpc__ - #include <asm/ptrace.h> - #endif -+#ifdef __riscv -+#include <asm/ptrace.h> -+#endif - #include <sys/ptrace.h> - #include <sys/types.h> - #include <sys/user.h> diff --git a/app-misc/reptyr/reptyr-0.8.0.ebuild b/app-misc/reptyr/reptyr-0.8.0.ebuild deleted file mode 100644 index 6bfa5e3f6049..000000000000 --- a/app-misc/reptyr/reptyr-0.8.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit bash-completion-r1 toolchain-funcs flag-o-matic vcs-snapshot - -DESCRIPTION="A utility to attach a running program to a new terminal" -HOMEPAGE="https://github.com/nelhage/reptyr" -SRC_URI="https://github.com/nelhage/${PN}/archive/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux" - -RESTRICT="test" - -PATCHES=( - # drop on next version bump - "${FILESDIR}"/${PN}-0.8.0-riscv64-support.patch -) - -src_prepare() { - default - # respect CFLAGS - sed -i '/^override/d' Makefile || die -} - -src_compile() { - append-cppflags -D_GNU_SOURCE - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" -} - -src_install() { - emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install - dodoc ChangeLog NOTES README.md - newbashcomp reptyr{.bash,} -} |