From 3836ece3dc89e80ab4c64447c6a8bf8414467e66 Mon Sep 17 00:00:00 2001
From: Andreas Wacknitz <A.Wacknitz@gmx.de>
Date: Tue, 26 Dec 2023 17:08:09 +0100
Subject: [PATCH] libedit: update to 3.1.20230828

---
 components/library/libedit/libedit.p5m                   |   12 ++++++------
 components/library/libedit/patches/01-termcap.patch      |   18 ++++++++++++++++++
 components/library/libedit/pkg5                          |    2 --
 components/library/libedit/Makefile                      |    8 +++++---
 components/library/libedit/manifests/sample-manifest.p5m |   14 +++++++-------
 5 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/components/library/libedit/Makefile b/components/library/libedit/Makefile
index 9ce6487..b52f00b 100644
--- a/components/library/libedit/Makefile
+++ b/components/library/libedit/Makefile
@@ -28,13 +28,13 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		libedit
-COMPONENT_VERSION_DATE=	20221030
+COMPONENT_VERSION_DATE=	20230828
 COMPONENT_VERSION=	3.1.$(COMPONENT_VERSION_DATE)
 COMPONENT_SUMMARY=	Libedit - Command line editor library
 COMPONENT_PROJECT_URL=	https://www.thrysoee.dk/editline/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION_DATE)-3.1
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH=	sha256:f0925a5adf4b1bf116ee19766b7daa766917aec198747943b1c4edf67a4be2bb
+COMPONENT_ARCHIVE_HASH=	sha256:4ee8182b6e569290e7d1f44f0f78dac8716b35f656b76528f699c69c98814dad
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)/$(COMPONENT_ARCHIVE)
 COMPONENT_FMRI=		library/libedit
 COMPONENT_CLASSIFICATION=	System/Libraries
@@ -45,10 +45,12 @@
 include $(WS_MAKE_RULES)/common.mk
 
 # Uses GNU awk
-PATH=$(PATH.gnu)
+PATH= $(PATH.gnu)
 
 COMPONENT_PREP_ACTION = (cd $(@D) && autoreconf -f)
 
+CFLAGS += $(XPG6MODE)
+
 CONFIGURE_OPTIONS += --disable-static
 
 # Build dependencies
diff --git a/components/library/libedit/libedit.p5m b/components/library/libedit/libedit.p5m
index d6e6c38..7f22061 100644
--- a/components/library/libedit/libedit.p5m
+++ b/components/library/libedit/libedit.p5m
@@ -25,13 +25,13 @@
 
 file path=usr/include/editline/readline.h
 file path=usr/include/histedit.h
-link path=usr/lib/$(MACH64)/libedit.so target=libedit.so.0.0.70
-link path=usr/lib/$(MACH64)/libedit.so.0 target=libedit.so.0.0.70
-file path=usr/lib/$(MACH64)/libedit.so.0.0.70
+link path=usr/lib/$(MACH64)/libedit.so target=libedit.so.0.0.72
+link path=usr/lib/$(MACH64)/libedit.so.0 target=libedit.so.0.0.72
+file path=usr/lib/$(MACH64)/libedit.so.0.0.72
 file path=usr/lib/$(MACH64)/pkgconfig/libedit.pc
-link path=usr/lib/libedit.so target=libedit.so.0.0.70
-link path=usr/lib/libedit.so.0 target=libedit.so.0.0.70
-file path=usr/lib/libedit.so.0.0.70
+link path=usr/lib/libedit.so target=libedit.so.0.0.72
+link path=usr/lib/libedit.so.0 target=libedit.so.0.0.72
+file path=usr/lib/libedit.so.0.0.72
 file path=usr/lib/pkgconfig/libedit.pc
 file path=usr/share/man/man3/editline.3
 link path=usr/share/man/man3/el_deletestr.3 target=editline.3
diff --git a/components/library/libedit/manifests/sample-manifest.p5m b/components/library/libedit/manifests/sample-manifest.p5m
index 6df0e6b..aba681c 100644
--- a/components/library/libedit/manifests/sample-manifest.p5m
+++ b/components/library/libedit/manifests/sample-manifest.p5m
@@ -10,7 +10,7 @@
 #
 
 #
-# Copyright 2022 <contributor>
+# Copyright 2023 <contributor>
 #
 
 set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
@@ -25,13 +25,13 @@
 
 file path=usr/include/editline/readline.h
 file path=usr/include/histedit.h
-link path=usr/lib/$(MACH64)/libedit.so target=libedit.so.0.0.70
-link path=usr/lib/$(MACH64)/libedit.so.0 target=libedit.so.0.0.70
-file path=usr/lib/$(MACH64)/libedit.so.0.0.70
+link path=usr/lib/$(MACH64)/libedit.so target=libedit.so.0.0.72
+link path=usr/lib/$(MACH64)/libedit.so.0 target=libedit.so.0.0.72
+file path=usr/lib/$(MACH64)/libedit.so.0.0.72
 file path=usr/lib/$(MACH64)/pkgconfig/libedit.pc
-link path=usr/lib/libedit.so target=libedit.so.0.0.70
-link path=usr/lib/libedit.so.0 target=libedit.so.0.0.70
-file path=usr/lib/libedit.so.0.0.70
+link path=usr/lib/libedit.so target=libedit.so.0.0.72
+link path=usr/lib/libedit.so.0 target=libedit.so.0.0.72
+file path=usr/lib/libedit.so.0.0.72
 file path=usr/lib/pkgconfig/libedit.pc
 file path=usr/share/man/man3/editline.3
 link path=usr/share/man/man3/el_deletestr.3 target=editline.3
diff --git a/components/library/libedit/patches/01-termcap.patch b/components/library/libedit/patches/01-termcap.patch
index db72d25..a7f4466 100644
--- a/components/library/libedit/patches/01-termcap.patch
+++ b/components/library/libedit/patches/01-termcap.patch
@@ -32,3 +32,21 @@
  libedit_private void	terminal_move_to_line(EditLine *, int);
  libedit_private void	terminal_move_to_char(EditLine *, int);
  libedit_private void	terminal_clear_EOL(EditLine *, int);
+--- libedit-20230828-3.1/src/terminal.c.orig	2023-08-27 09:25:53.000000000 +0200
++++ libedit-20230828-3.1/src/terminal.c	2023-12-26 13:55:12.635521590 +0100
+@@ -68,15 +68,6 @@
+ #include <term.h>
+ #endif
+ 
+-#if defined(__sun)
+-extern int tgetent(char *, const char *);
+-extern int tgetflag(char *);
+-extern int tgetnum(char *);
+-extern int tputs(const char *, int, int (*)(int));
+-extern char* tgoto(const char*, int, int);
+-extern char* tgetstr(char*, char**);
+-#endif
+-
+ #ifdef _REENTRANT
+ #include <pthread.h>
+ #endif
diff --git a/components/library/libedit/pkg5 b/components/library/libedit/pkg5
index 424ff52..0dc96c5 100644
--- a/components/library/libedit/pkg5
+++ b/components/library/libedit/pkg5
@@ -1,8 +1,6 @@
 {
     "dependencies": [
-        "SUNWcs",
         "library/ncurses",
-        "shell/ksh93",
         "system/library",
         "text/gawk"
     ],

--
Gitblit v1.9.3