git: c0b0bf919c9e - main - devel/popt: Update to 1.19

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 02:24:41 UTC
The branch main has been updated by sunpoet:

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

commit c0b0bf919c9ecfd8ca0cc5bc8d5a48bebfd38e5b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-03 02:14:06 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-03 02:14:06 +0000

    devel/popt: Update to 1.19
    
    - Update MASTER_SITES
    - Update WWW
    
    Changes:        https://github.com/rpm-software-management/popt/releases
                    https://github.com/rpm-software-management/popt/commits/master
---
 devel/popt/Makefile                    | 19 ++++++------
 devel/popt/distinfo                    |  6 ++--
 devel/popt/files/patch-src_popt.c      | 55 ----------------------------------
 devel/popt/files/patch-src_poptint.h   | 10 -------
 devel/popt/files/patch-tests_testit.sh | 18 +++++------
 devel/popt/pkg-plist                   |  6 +++-
 6 files changed, 26 insertions(+), 88 deletions(-)

diff --git a/devel/popt/Makefile b/devel/popt/Makefile
index 4d1b479f69b9..1ee511498980 100644
--- a/devel/popt/Makefile
+++ b/devel/popt/Makefile
@@ -1,28 +1,27 @@
 PORTNAME=	popt
-PORTVERSION=	1.18
-PORTREVISION=	1
+PORTVERSION=	1.19
 CATEGORIES=	devel
-MASTER_SITES=	http://ftp.rpm.org/popt/releases/popt-1.x/
+MASTER_SITES=	https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/ \
+		http://ftp.rpm.org/popt/releases/popt-1.x/
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Getopt(3) like library with a number of enhancements, from Redhat
-WWW=		http://freshmeat.net/projects/popt/
+WWW=		https://github.com/rpm-software-management/popt
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		cpe iconv libtool pathfix
 
-CPE_VENDOR=	popt_project
-
-TEST_TARGET=	check
-
-OPTIONS_DEFINE=	NLS
-
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
+TEST_TARGET=	check
 USE_LDCONFIG=	yes
 
+CPE_VENDOR=	popt_project
+
+OPTIONS_DEFINE=	NLS
+
 NLS_CONFIGURE_ENABLE=	nls
 NLS_USES=	gettext-runtime localbase
 OPTIONS_SUB=	yes
diff --git a/devel/popt/distinfo b/devel/popt/distinfo
index 6b9418a6d295..9b877153827f 100644
--- a/devel/popt/distinfo
+++ b/devel/popt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1593027760
-SHA256 (popt-1.18.tar.gz) = 5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1
-SIZE (popt-1.18.tar.gz) = 580569
+TIMESTAMP = 1663672744
+SHA256 (popt-1.19.tar.gz) = c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9
+SIZE (popt-1.19.tar.gz) = 596676
diff --git a/devel/popt/files/patch-src_popt.c b/devel/popt/files/patch-src_popt.c
deleted file mode 100644
index 2b679be9a987..000000000000
--- a/devel/popt/files/patch-src_popt.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- src/popt.c.orig	2020-05-18 07:43:13 UTC
-+++ src/popt.c
-@@ -168,6 +168,7 @@ poptContext poptGetContext(const char * name, int argc
- 	con->os->next = 1;		/* skip argv[0] */
- 
-     con->leftovers = calloc( (size_t)(argc + 1), sizeof(*con->leftovers) );
-+    con->allocLeftovers = argc + 1;
-     con->options = options;
-     con->aliases = NULL;
-     con->numAliases = 0;
-@@ -1269,8 +1270,21 @@ int poptGetNextOpt(poptContext con)
- 		    con->os->nextArg = xstrdup(origOptString);
- 		    return 0;
- 		}
--		if (con->leftovers != NULL)	/* XXX can't happen */
--		    con->leftovers[con->numLeftovers++] = origOptString;
-+		if (con->leftovers != NULL) {	/* XXX can't happen */
-+		    /* One might think we can never overflow the leftovers
-+		       array.  Actually, that's true, as long as you don't
-+		       use poptStuffArgs()... */
-+		    if ((con->numLeftovers + 1) >= (con->allocLeftovers)) {
-+			con->allocLeftovers += 10;
-+			con->leftovers =
-+			    realloc(con->leftovers,
-+				    sizeof(*con->leftovers) * con->allocLeftovers);
-+		    }
-+		    con->leftovers[con->numLeftovers++]
-+			= xstrdup(origOptString); /* so a free of a stuffed
-+						     argv doesn't give us a
-+						     dangling pointer */
-+		}
- 		continue;
- 	    }
- 
-@@ -1519,6 +1533,8 @@ poptItem poptFreeItems(poptItem items, int nitems)
- 
- poptContext poptFreeContext(poptContext con)
- {
-+    int i;
-+
-     if (con == NULL) return con;
-     poptResetContext(con);
- 
-@@ -1528,7 +1544,11 @@ poptContext poptFreeContext(poptContext con)
-     con->execs = poptFreeItems(con->execs, con->numExecs);
-     con->numExecs = 0;
- 
-+    for (i = 0; i < con->numLeftovers; i++) {
-+        con->leftovers[i] = _free(&con->leftovers[i]);
-+    }
-     con->leftovers = _free(con->leftovers);
-+
-     con->finalArgv = _free(con->finalArgv);
-     con->appName = _free(con->appName);
-     con->otherHelp = _free(con->otherHelp);
diff --git a/devel/popt/files/patch-src_poptint.h b/devel/popt/files/patch-src_poptint.h
deleted file mode 100644
index 5d3cd38c8159..000000000000
--- a/devel/popt/files/patch-src_poptint.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/poptint.h.orig	2020-05-18 07:43:13 UTC
-+++ src/poptint.h
-@@ -94,6 +94,7 @@ struct poptContext_s {
-     struct optionStackEntry * os;
-     poptArgv leftovers;
-     int numLeftovers;
-+    int allocLeftovers;
-     int nextLeftover;
-     const struct poptOption * options;
-     int restLeftover;
diff --git a/devel/popt/files/patch-tests_testit.sh b/devel/popt/files/patch-tests_testit.sh
index 05fa72b9fcf3..241892876c1e 100644
--- a/devel/popt/files/patch-tests_testit.sh
+++ b/devel/popt/files/patch-tests_testit.sh
@@ -1,20 +1,20 @@
---- tests/testit.sh.orig	2020-06-24 22:53:32 UTC
+--- tests/testit.sh.orig	2022-08-24 06:30:21 UTC
 +++ tests/testit.sh
-@@ -114,63 +114,6 @@ run test1 "test1 - 56" "arg1: 0 arg2: (none) aFlag: 0x
+@@ -110,63 +110,6 @@ run test1 "test1 - 56" "arg1: 0 arg2: (none) aFlag: 0x
  
  run test1 "test1 - 57" "arg1: 0 arg2: (none) aBits: foo,baz" --bits foo,bar,baz,!bar
  
 -run test1 "test1 - 58" "\
--Usage: lt-test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
+-Usage: test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
 -        [-3|--arg3=ANARG] [-onedash] [--optional=STRING] [--val]
 -        [-i|--int=INT] [-s|--short=SHORT] [-l|--long=LONG]
 -        [-L|--longlong=LONGLONG] [-f|--float=FLOAT] [-d|--double=DOUBLE]
 -        [--randint=INT] [--randshort=SHORT] [--randlong=LONG]
 -        [--randlonglong=LONGLONG] [--argv=STRING] [--bitset] [--bitclr]
--        [--bitxor] [--nstr=STRING] [--lstr=STRING] [-I|--inc]
+-        [-x|--bitxor] [--nstr=STRING] [--lstr=STRING] [-I|--inc]
 -        [-c|--cb=STRING] [--longopt] [-?|--help] [--usage] [--simple=ARG]" --usage
 -run test1 "test1 - 59" "\
--Usage: lt-test1 [OPTION...]
+-Usage: test1 [OPTION...]
 -      --arg1                      First argument with a really long
 -                                  description. After all, we have to test
 -                                  argument help wrapping somehow, right?
@@ -39,7 +39,7 @@
 -                                  (can be used multiple times)
 -      --[no]bitset                POPT_BIT_SET: |= 0x7777
 -      --[no]bitclr                POPT_BIT_CLR: &= ~0xf842
--      --bitxor                    POPT_ARGFLAG_XOR: ^= (0x8ace^0xfeed)
+-  -x, --bitxor                    POPT_ARGFLAG_XOR: ^= (0x8ace^0xfeed)
 -      --nstr=STRING               POPT_ARG_STRING: (null) (default: null)
 -      --lstr=STRING               POPT_ARG_STRING: \"123456789...\" (default:
 -                                  \"This tests default strings and exceeds the
@@ -61,6 +61,6 @@
 -  -?, --help                      Show this help message
 -      --usage                     Display brief usage message" --help
 -
- #run_diff test3 "test3 - 51" test3-data/01.input test3-data/01.answer
- #run_diff test3 "test3 - 52" test3-data/02.input test3-data/02.answer
- #run_diff test3 "test3 - 53" test3-data/03.input test3-data/03.answer
+ run test1 "test1 - 60" "" --val=foo
+ run test1 "test1 - 61" "" -x=f1
+ 
diff --git a/devel/popt/pkg-plist b/devel/popt/pkg-plist
index 481724e16dfb..eff18fe8a6f4 100644
--- a/devel/popt/pkg-plist
+++ b/devel/popt/pkg-plist
@@ -2,9 +2,10 @@ include/popt.h
 lib/libpopt.a
 lib/libpopt.so
 lib/libpopt.so.0
-lib/libpopt.so.0.0.1
+lib/libpopt.so.0.0.2
 libdata/pkgconfig/popt.pc
 man/man3/popt.3.gz
+%%NLS%%share/locale/ca/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/cs/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/da/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/de/LC_MESSAGES/popt.mo
@@ -19,14 +20,17 @@ man/man3/popt.3.gz
 %%NLS%%share/locale/is/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/it/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/ja/LC_MESSAGES/popt.mo
+%%NLS%%share/locale/ka/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/ko/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/lv/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/nb/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/nl/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/pl/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/pt/LC_MESSAGES/popt.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/ro/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/ru/LC_MESSAGES/popt.mo
+%%NLS%%share/locale/si/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/sk/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/sl/LC_MESSAGES/popt.mo
 %%NLS%%share/locale/sv/LC_MESSAGES/popt.mo