From 1cf2ba55857515702f7c2649019d79b673149b2d Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 6 Jul 2019 04:14:18 -0300 Subject: testing/libsigsegv: move from unmaintained --- .../0001-Avoid-use-of-glibc-internal-macros.patch | 109 +++++++++++++++++++++ testing/libsigsegv/APKBUILD | 35 +++++++ .../0001-Avoid-use-of-glibc-internal-macros.patch | 109 --------------------- unmaintained/libsigsegv/APKBUILD | 35 ------- 4 files changed, 144 insertions(+), 144 deletions(-) create mode 100644 testing/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch create mode 100644 testing/libsigsegv/APKBUILD delete mode 100644 unmaintained/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch delete mode 100644 unmaintained/libsigsegv/APKBUILD diff --git a/testing/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch b/testing/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch new file mode 100644 index 0000000000..9de94c7f72 --- /dev/null +++ b/testing/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch @@ -0,0 +1,109 @@ +From 7d365628d84b1698a68d968b00544f8b6630e3ce Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sat, 4 Mar 2017 16:36:30 +0100 +Subject: [PATCH] Avoid use of glibc-internal macros. + +--- + ChangeLog | 10 ++++++++++ + src/fault-linux-arm.h | 4 ++-- + src/fault-linux-powerpc.h | 8 ++++---- + src/fault-linux-sparc-old.h | 6 +++--- + src/fault-linux-sparc.h | 4 ++-- + 5 files changed, 21 insertions(+), 11 deletions(-) + +diff --git a/src/fault-linux-arm.h b/src/fault-linux-arm.h +index a3da5f8..efd9d5b 100644 +--- a/src/fault-linux-arm.h ++++ b/src/fault-linux-arm.h +@@ -17,7 +17,7 @@ + + #include "fault-posix-ucontext.h" + +-#if __WORDSIZE == 64 ++#if defined(__aarch64__) || defined(__ARM_64BIT_STATE) || defined(__ARM_PCS_AAPCS64) /* 64-bit */ + + /* See glibc/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h. + Note that the 'mcontext_t' defined in +@@ -27,7 +27,7 @@ + + #define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.sp + +-#else ++#else /* 32-bit */ + + /* See glibc/sysdeps/unix/sysv/linux/arm/sys/ucontext.h + and the definition of GET_STACK in +diff --git a/src/fault-linux-powerpc.h b/src/fault-linux-powerpc.h +index 97fd0ab..36a3468 100644 +--- a/src/fault-linux-powerpc.h ++++ b/src/fault-linux-powerpc.h +@@ -1,5 +1,5 @@ + /* Fault handler information. Linux/PowerPC version when it supports POSIX. +- Copyright (C) 2002, 2009 Bruno Haible ++ Copyright (C) 2002, 2009, 2017 Bruno Haible + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -26,13 +26,13 @@ + and the 'struct pt_regs' defined in + are quite different types. */ + +-#if __WORDSIZE == 32 ++#if defined(__powerpc64__) || defined(_ARCH_PPC64) /* 64-bit */ ++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] ++#else /* 32-bit */ + /* both should be equivalent */ + # if 0 + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] + # else + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] + # endif +-#else +-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] + #endif +diff --git a/src/fault-linux-sparc-old.h b/src/fault-linux-sparc-old.h +index 2acaeb3..3212fbd 100644 +--- a/src/fault-linux-sparc-old.h ++++ b/src/fault-linux-sparc-old.h +@@ -1,5 +1,5 @@ + /* Fault handler information. Linux/SPARC version. +- Copyright (C) 2002, 2009 Bruno Haible ++ Copyright (C) 2002, 2009, 2017 Bruno Haible + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -23,9 +23,9 @@ + #if 1 /* Old? FIXME */ + # define SIGSEGV_FAULT_STACKPOINTER scp->sigc_sp + #else +-# if __WORDSIZE == 64 ++# if defined(__sparcv9) || defined(__arch64__) /* 64-bit */ + # define SIGSEGV_FAULT_STACKPOINTER scp->sigc_regs.u_regs[14] +-# else ++# else /* 32-bit */ + # define SIGSEGV_FAULT_STACKPOINTER scp->si_regs.u_regs[14] + # endif + #endif +diff --git a/src/fault-linux-sparc.h b/src/fault-linux-sparc.h +index 8b37874..9c1c285 100644 +--- a/src/fault-linux-sparc.h ++++ b/src/fault-linux-sparc.h +@@ -27,13 +27,13 @@ + (see also ) + are quite different types. */ + +-#if __WORDSIZE == 64 ++#if defined(__sparcv9) || defined(__arch64__) /* 64-bit */ + /* From linux-4.8.1/arch/sparc/kernel/signal_64.c, function setup_rt_frame, we + see that ucp is not an 'ucontext_t *' but rather a 'struct sigcontext *' + that happens to have the same value as sip (which is possible because a + 'struct sigcontext' starts with 128 bytes room for the siginfo_t). */ + #define SIGSEGV_FAULT_STACKPOINTER (((struct sigcontext *) ucp)->sigc_regs.u_regs[14] + 2047) +-#else ++#else /* 32-bit */ + /* From linux-4.8.1/arch/sparc/kernel/signal_32.c, function setup_rt_frame, + and linux-4.8.1/arch/sparc/kernel/signal32.c, function setup_rt_frame32, we + see that ucp is a 'struct pt_regs *' or 'struct pt_regs32 *', respectively. +-- +2.14.2 + diff --git a/testing/libsigsegv/APKBUILD b/testing/libsigsegv/APKBUILD new file mode 100644 index 0000000000..ad3ed838d4 --- /dev/null +++ b/testing/libsigsegv/APKBUILD @@ -0,0 +1,35 @@ +# Contributor: Carlo Landmeter +# Maintainer: +pkgname=libsigsegv +pkgver=2.12 +pkgrel=0 +pkgdesc="Page fault detection library" +url="https://www.gnu.org/software/libsigsegv/" +arch="all" +license="GPL-2.0-or-later" +subpackages="$pkgname-dev" +source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-static \ + --enable-shared + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="27986e8aaf4357ed131032aa7c281a5a28c5759530c62bb76f034aea33959547dcaae805e06347a1f532f0488b72fbbbdac4400f74e8d3f2128511526e8a5913 libsigsegv-2.12.tar.gz" diff --git a/unmaintained/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch b/unmaintained/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch deleted file mode 100644 index 9de94c7f72..0000000000 --- a/unmaintained/libsigsegv/0001-Avoid-use-of-glibc-internal-macros.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 7d365628d84b1698a68d968b00544f8b6630e3ce Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Sat, 4 Mar 2017 16:36:30 +0100 -Subject: [PATCH] Avoid use of glibc-internal macros. - ---- - ChangeLog | 10 ++++++++++ - src/fault-linux-arm.h | 4 ++-- - src/fault-linux-powerpc.h | 8 ++++---- - src/fault-linux-sparc-old.h | 6 +++--- - src/fault-linux-sparc.h | 4 ++-- - 5 files changed, 21 insertions(+), 11 deletions(-) - -diff --git a/src/fault-linux-arm.h b/src/fault-linux-arm.h -index a3da5f8..efd9d5b 100644 ---- a/src/fault-linux-arm.h -+++ b/src/fault-linux-arm.h -@@ -17,7 +17,7 @@ - - #include "fault-posix-ucontext.h" - --#if __WORDSIZE == 64 -+#if defined(__aarch64__) || defined(__ARM_64BIT_STATE) || defined(__ARM_PCS_AAPCS64) /* 64-bit */ - - /* See glibc/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h. - Note that the 'mcontext_t' defined in -@@ -27,7 +27,7 @@ - - #define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.sp - --#else -+#else /* 32-bit */ - - /* See glibc/sysdeps/unix/sysv/linux/arm/sys/ucontext.h - and the definition of GET_STACK in -diff --git a/src/fault-linux-powerpc.h b/src/fault-linux-powerpc.h -index 97fd0ab..36a3468 100644 ---- a/src/fault-linux-powerpc.h -+++ b/src/fault-linux-powerpc.h -@@ -1,5 +1,5 @@ - /* Fault handler information. Linux/PowerPC version when it supports POSIX. -- Copyright (C) 2002, 2009 Bruno Haible -+ Copyright (C) 2002, 2009, 2017 Bruno Haible - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -26,13 +26,13 @@ - and the 'struct pt_regs' defined in - are quite different types. */ - --#if __WORDSIZE == 32 -+#if defined(__powerpc64__) || defined(_ARCH_PPC64) /* 64-bit */ -+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] -+#else /* 32-bit */ - /* both should be equivalent */ - # if 0 - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] - # else - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] - # endif --#else --# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] - #endif -diff --git a/src/fault-linux-sparc-old.h b/src/fault-linux-sparc-old.h -index 2acaeb3..3212fbd 100644 ---- a/src/fault-linux-sparc-old.h -+++ b/src/fault-linux-sparc-old.h -@@ -1,5 +1,5 @@ - /* Fault handler information. Linux/SPARC version. -- Copyright (C) 2002, 2009 Bruno Haible -+ Copyright (C) 2002, 2009, 2017 Bruno Haible - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -23,9 +23,9 @@ - #if 1 /* Old? FIXME */ - # define SIGSEGV_FAULT_STACKPOINTER scp->sigc_sp - #else --# if __WORDSIZE == 64 -+# if defined(__sparcv9) || defined(__arch64__) /* 64-bit */ - # define SIGSEGV_FAULT_STACKPOINTER scp->sigc_regs.u_regs[14] --# else -+# else /* 32-bit */ - # define SIGSEGV_FAULT_STACKPOINTER scp->si_regs.u_regs[14] - # endif - #endif -diff --git a/src/fault-linux-sparc.h b/src/fault-linux-sparc.h -index 8b37874..9c1c285 100644 ---- a/src/fault-linux-sparc.h -+++ b/src/fault-linux-sparc.h -@@ -27,13 +27,13 @@ - (see also ) - are quite different types. */ - --#if __WORDSIZE == 64 -+#if defined(__sparcv9) || defined(__arch64__) /* 64-bit */ - /* From linux-4.8.1/arch/sparc/kernel/signal_64.c, function setup_rt_frame, we - see that ucp is not an 'ucontext_t *' but rather a 'struct sigcontext *' - that happens to have the same value as sip (which is possible because a - 'struct sigcontext' starts with 128 bytes room for the siginfo_t). */ - #define SIGSEGV_FAULT_STACKPOINTER (((struct sigcontext *) ucp)->sigc_regs.u_regs[14] + 2047) --#else -+#else /* 32-bit */ - /* From linux-4.8.1/arch/sparc/kernel/signal_32.c, function setup_rt_frame, - and linux-4.8.1/arch/sparc/kernel/signal32.c, function setup_rt_frame32, we - see that ucp is a 'struct pt_regs *' or 'struct pt_regs32 *', respectively. --- -2.14.2 - diff --git a/unmaintained/libsigsegv/APKBUILD b/unmaintained/libsigsegv/APKBUILD deleted file mode 100644 index ad3ed838d4..0000000000 --- a/unmaintained/libsigsegv/APKBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Contributor: Carlo Landmeter -# Maintainer: -pkgname=libsigsegv -pkgver=2.12 -pkgrel=0 -pkgdesc="Page fault detection library" -url="https://www.gnu.org/software/libsigsegv/" -arch="all" -license="GPL-2.0-or-later" -subpackages="$pkgname-dev" -source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz" - -build() { - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - --disable-static \ - --enable-shared - make -} - -check() { - make check -} - -package() { - make DESTDIR="$pkgdir" install -} - -sha512sums="27986e8aaf4357ed131032aa7c281a5a28c5759530c62bb76f034aea33959547dcaae805e06347a1f532f0488b72fbbbdac4400f74e8d3f2128511526e8a5913 libsigsegv-2.12.tar.gz" -- cgit v1.2.3