git: 669ebf337d1b - main - converters/libiconv: Update to 1.18

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Sat, 08 Nov 2025 10:19:46 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=669ebf337d1bc0c4651b771563684f20a1d44a5c

commit 669ebf337d1bc0c4651b771563684f20a1d44a5c
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-11-01 20:48:14 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-11-08 10:19:43 +0000

    converters/libiconv: Update to 1.18
    
    PR:     290747
    Exp-run by: antoine
---
 converters/libiconv/Makefile                       |  5 +-
 converters/libiconv/distinfo                       |  6 +--
 converters/libiconv/files/patch-include-iconv.h.in | 60 +++++++++++++---------
 .../files/patch-libcharset_lib_localcharset.c      |  6 +--
 converters/libiconv/files/patch-src__Makefile.in   |  8 +--
 converters/libiconv/pkg-plist                      |  2 +-
 6 files changed, 48 insertions(+), 39 deletions(-)

diff --git a/converters/libiconv/Makefile b/converters/libiconv/Makefile
index f3941134eafc..83f8f0aaf507 100644
--- a/converters/libiconv/Makefile
+++ b/converters/libiconv/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	libiconv
-PORTVERSION=	1.17
-PORTREVISION=	1
+PORTVERSION=	1.18
 CATEGORIES=	converters devel
 MASTER_SITES=	GNU
 
@@ -12,11 +11,9 @@ LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		libtool
-USE_CSTD=	gnu89
 USE_LDCONFIG=	yes
 
 GNU_CONFIGURE=	yes
-GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
 CONFIGURE_ARGS=	--enable-static \
 		--disable-nls \
 		--docdir=${DOCSDIR} \
diff --git a/converters/libiconv/distinfo b/converters/libiconv/distinfo
index bfe16318e834..751c1f5e0b78 100644
--- a/converters/libiconv/distinfo
+++ b/converters/libiconv/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1655671090
-SHA256 (libiconv-1.17.tar.gz) = 8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
-SIZE (libiconv-1.17.tar.gz) = 5413283
+TIMESTAMP = 1762019880
+SHA256 (libiconv-1.18.tar.gz) = 3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8
+SIZE (libiconv-1.18.tar.gz) = 5822590
diff --git a/converters/libiconv/files/patch-include-iconv.h.in b/converters/libiconv/files/patch-include-iconv.h.in
index cd0e7e17567c..6fd627554add 100644
--- a/converters/libiconv/files/patch-include-iconv.h.in
+++ b/converters/libiconv/files/patch-include-iconv.h.in
@@ -1,25 +1,43 @@
---- include/iconv.h.in.orig	2019-04-26 18:48:39 UTC
+--- include/iconv.h.in.orig	2024-12-15 12:23:08 UTC
 +++ include/iconv.h.in
-@@ -20,8 +20,10 @@
- #ifndef _LIBICONV_H
- #define _LIBICONV_H
+@@ -24,8 +24,10 @@ extern "C" {
+ extern "C" {
+ #endif
  
 +#ifndef LIBICONV_PLUG
- #define _LIBICONV_VERSION 0x0111    /* version number: (major<<8) + minor */
+ #define _LIBICONV_VERSION 0x0112    /* version number: (major<<8) + minor */
  extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
 +#endif
  
- /* We would like to #include any system header file which could define
-    iconv_t, 1. in order to eliminate the risk that the user gets compilation
-@@ -93,7 +95,6 @@ extern int iconv_close (iconv_t cd);
- #endif
+ #ifdef __cplusplus
+ }
+@@ -69,7 +71,9 @@ extern "C" {
+ 
+ /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
+    encoding ‘tocode’. */
++#ifndef LIBICONV_PLUG
+ #define iconv_open libiconv_open
++#endif
+ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
  
+ /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
+@@ -77,11 +81,15 @@ extern iconv_t iconv_open (const char* tocode, const c
+    ‘*outbuf’.
+    Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
+    Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
++#ifndef LIBICONV_PLUG
+ #define iconv libiconv
++#endif
+ extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
  
--#ifndef LIBICONV_PLUG
+ /* Frees resources allocated for conversion descriptor ‘cd’. */
++#ifndef LIBICONV_PLUG
+ #define iconv_close libiconv_close
++#endif
+ extern int iconv_close (iconv_t cd);
  
- /* Nonstandard extensions. */
  
-@@ -126,12 +127,16 @@ typedef struct {
+@@ -121,12 +129,16 @@ typedef struct {
  /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
     encoding ‘tocode’ into preallocated memory. Returns an error indicator
     (0 or -1 with errno set). */
@@ -36,10 +54,10 @@
  extern int iconvctl (iconv_t cd, int request, void* argument);
  
  /* Hook performed after every successful conversion of a Unicode character. */
-@@ -209,9 +214,15 @@ struct iconv_fallbacks {
- #define ICONV_SET_DISCARD_ILSEQ   4  /* const int *argument */
- #define ICONV_SET_HOOKS           5  /* const struct iconv_hooks *argument */
- #define ICONV_SET_FALLBACKS       6  /* const struct iconv_fallbacks *argument */
+@@ -213,9 +225,15 @@ struct iconv_fallbacks {
+ #define ICONV_SET_DISCARD_INVALID        12  /* const int *argument */
+ #define ICONV_GET_DISCARD_NON_IDENTICAL  13  /* int *argument */
+ #define ICONV_SET_DISCARD_NON_IDENTICAL  14  /* const int *argument */
 +#ifdef LIBICONV_PLUG
 +#define ICONV_GET_ILSEQ_INVALID 128
 +#define ICONV_SET_ILSEQ_INVALID 129
@@ -52,7 +70,7 @@
  extern void iconvlist (int (*do_one) (unsigned int namescount,
                                        const char * const * names,
                                        void* data),
-@@ -223,6 +234,7 @@ extern const char * iconv_canonicalize (
+@@ -227,6 +245,7 @@ extern const char * iconv_canonicalize (const char * n
  
  /* Support for relocatable packages.  */
  
@@ -60,7 +78,7 @@
  /* Sets the original and the current installation prefix of the package.
     Relocation simply replaces a pathname starting with the original prefix
     by the corresponding pathname with the current prefix instead.  Both
-@@ -230,12 +242,12 @@ extern const char * iconv_canonicalize (
+@@ -234,6 +253,7 @@ extern void libiconv_set_relocation_prefix (const char
     instead of "/").  */
  extern void libiconv_set_relocation_prefix (const char *orig_prefix,
                                              const char *curr_prefix);
@@ -68,9 +86,3 @@
  
  #ifdef __cplusplus
  }
- #endif
- 
--#endif
- 
- 
- #endif /* _LIBICONV_H */
diff --git a/converters/libiconv/files/patch-libcharset_lib_localcharset.c b/converters/libiconv/files/patch-libcharset_lib_localcharset.c
index c344c51026f7..1588d2f3b031 100644
--- a/converters/libiconv/files/patch-libcharset_lib_localcharset.c
+++ b/converters/libiconv/files/patch-libcharset_lib_localcharset.c
@@ -1,6 +1,6 @@
---- libcharset/lib/localcharset.c.orig	2020-05-09 08:59:22 UTC
+--- libcharset/lib/localcharset.c.orig	2020-04-04 12:50:22 UTC
 +++ libcharset/lib/localcharset.c
-@@ -92,6 +92,7 @@ static const struct table_entry alias_table[] =
+@@ -95,6 +95,7 @@ static const struct table_entry alias_table[] =
  #  if defined __FreeBSD__                                   /* FreeBSD */
    /*{ "ARMSCII-8",  "ARMSCII-8" },*/
      { "Big5",       "BIG5" },
@@ -8,7 +8,7 @@
      { "C",          "ASCII" },
    /*{ "CP1131",     "CP1131" },*/
    /*{ "CP1251",     "CP1251" },*/
-@@ -104,6 +105,7 @@ static const struct table_entry alias_table[] =
+@@ -107,6 +108,7 @@ static const struct table_entry alias_table[] =
      { "ISO8859-13", "ISO-8859-13" },
      { "ISO8859-15", "ISO-8859-15" },
      { "ISO8859-2",  "ISO-8859-2" },
diff --git a/converters/libiconv/files/patch-src__Makefile.in b/converters/libiconv/files/patch-src__Makefile.in
index 18c7b5113cbf..95a5f2d7c38e 100644
--- a/converters/libiconv/files/patch-src__Makefile.in
+++ b/converters/libiconv/files/patch-src__Makefile.in
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig	2019-01-27 22:07:13 UTC
+--- src/Makefile.in.orig	2023-05-12 20:45:58 UTC
 +++ src/Makefile.in
-@@ -71,7 +71,6 @@ OBJECTS_RES_no =
+@@ -71,7 +71,6 @@ all : iconv_no_i18n$(EXEEXT) iconv.@OBJEXT@ $(OBJECTS_
  # without internationalization and not linked with libintl.
  
  all : iconv_no_i18n$(EXEEXT) iconv.@OBJEXT@ $(OBJECTS_RES_@WOE32@)
@@ -12,8 +12,8 @@
  	if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
  	case "@host_os@" in \
  	  hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv @LIBINTL@ $(OBJECTS_RES_@WOE32@) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
--	  *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
-+	  *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a ../lib/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
+-	  *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a @LTLIBINTL@ $(DESTDIR)$(libdir)/libiconv.la $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
++	  *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a @LTLIBINTL@ $(top_srcdir)/lib/libiconv.la $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
  	esac
  	$(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
  
diff --git a/converters/libiconv/pkg-plist b/converters/libiconv/pkg-plist
index 5ba582d734c4..2bdb363e18d7 100644
--- a/converters/libiconv/pkg-plist
+++ b/converters/libiconv/pkg-plist
@@ -9,7 +9,7 @@ lib/libcharset.so.1.0.0
 lib/libiconv.a
 lib/libiconv.so
 lib/libiconv.so.2
-lib/libiconv.so.2.6.1
+lib/libiconv.so.2.7.0
 share/man/man1/iconv.1.gz
 share/man/man3/iconv.3.gz
 share/man/man3/iconv_open.3.gz