#
-# Copyright (C) 2010-2016 OpenWrt.org
+# Copyright (C) 2010-2025 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=grep
-PKG_VERSION:=3.11
-PKG_RELEASE:=2
+PKG_VERSION:=3.12
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grep
-PKG_HASH:=1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab
+PKG_HASH:=2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9
PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
PKG_LICENSE:=GPL-3.0-or-later
include $(INCLUDE_DIR)/package.mk
MAKE_FLAGS += SHELL="/bin/sh"
+TARGET_CFLAGS += -std=c17
define Package/grep
SECTION:=utils
--- /dev/null
+https://github.com/void-linux/void-packages/commit/0d9556b8593d6e67027fb1c83d176b7f899547e5
+--- a/lib/sigsegv.c
++++ b/lib/sigsegv.c
+@@ -246,8 +246,10 @@ int libsigsegv_version = LIBSIGSEGV_VERS
+ /* Because of the union, both definitions should be equivalent. */
+ # if 0
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
+-# else
++# elif defined(__GLIBC__)
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
++# else
++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
+ # endif
+ # endif
+ # endif
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -2399,7 +2399,7 @@ top_srcdir = @top_srcdir@
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
+ #
+ AUTOMAKE_OPTIONS = gnu 1.12
+-SUBDIRS = po lib doc src tests gnulib-tests
++SUBDIRS = po lib src
+ EXTRA_DIST = \
+ .mailmap \
+ ChangeLog-2009 \
+++ /dev/null
-https://github.com/void-linux/void-packages/commit/0d9556b8593d6e67027fb1c83d176b7f899547e5
---- a/lib/sigsegv.c
-+++ b/lib/sigsegv.c
-@@ -246,8 +246,10 @@ int libsigsegv_version = LIBSIGSEGV_VERS
- /* Because of the union, both definitions should be equivalent. */
- # if 0
- # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
--# else
-+# elif defined(__GLIBC__)
- # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
-+# else
-+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
- # endif
- # endif
- # endif