popt: update to 1.19
Remove some patches which were added in upstream. 278402-manpage.all.patch6f091ccc29318833.all.patch7219e1ddc1356669.all.patch3533b2083a
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
Index: popt-1.16/popt.3
|
||||
===================================================================
|
||||
--- popt-1.16.orig/popt.3 2010-05-13 04:58:04.357009234 +0100
|
||||
+++ popt-1.16/popt.3 2010-05-13 04:58:09.716009057 +0100
|
||||
@@ -657,21 +657,22 @@
|
||||
.nf
|
||||
#include <popt.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
void usage(poptContext optCon, int exitcode, char *error, char *addl) {
|
||||
poptPrintUsage(optCon, stderr, 0);
|
||||
- if (error) fprintf(stderr, "%s: %s\n", error, addl);
|
||||
+ if (error) fprintf(stderr, "%s: %s\\n", error, addl);
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
- char c; /* used for argument parsing */
|
||||
+ int c; /* used for argument parsing */
|
||||
int i = 0; /* used for tracking options */
|
||||
- char *portname;
|
||||
int speed = 0; /* used in argument parsing to set speed */
|
||||
int raw = 0; /* raw mode? */
|
||||
int j;
|
||||
char buf[BUFSIZ+1];
|
||||
+ const char *portname;
|
||||
poptContext optCon; /* context for parsing command-line options */
|
||||
|
||||
struct poptOption optionsTable[] = {
|
||||
@@ -1,64 +0,0 @@
|
||||
--- popt-1.18/src/popt.c.orig 2021-05-28 20:24:35.156031300 -0700
|
||||
+++ popt-1.18/src/popt.c 2021-05-28 20:28:47.492641100 -0700
|
||||
@@ -168,6 +168,7 @@
|
||||
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;
|
||||
@@ -1290,7 +1291,19 @@
|
||||
return 0;
|
||||
}
|
||||
if (con->leftovers != NULL) /* XXX can't happen */
|
||||
- con->leftovers[con->numLeftovers++] = origOptString;
|
||||
+ /* 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;
|
||||
}
|
||||
|
||||
@@ -1539,6 +1552,8 @@
|
||||
|
||||
poptContext poptFreeContext(poptContext con)
|
||||
{
|
||||
+ int i;
|
||||
+
|
||||
if (con == NULL) return con;
|
||||
poptResetContext(con);
|
||||
|
||||
@@ -1548,7 +1563,11 @@
|
||||
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);
|
||||
Index: popt-1.16/src/poptint.h
|
||||
===================================================================
|
||||
--- popt-1.16.orig/src/poptint.h 2010-05-13 04:57:46.878010140 +0100
|
||||
+++ popt-1.16/src/poptint.h 2010-05-13 04:57:52.008009414 +0100
|
||||
@@ -119,6 +119,7 @@
|
||||
/*@owned@*/ /*@null@*/
|
||||
poptArgv leftovers;
|
||||
int numLeftovers;
|
||||
+ int allocLeftovers;
|
||||
int nextLeftover;
|
||||
/*@keep@*/
|
||||
const struct poptOption * options;
|
||||
@@ -1,126 +0,0 @@
|
||||
Index: popt-1.16/po/ca.po
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ popt-1.16/po/ca.po 2010-05-13 04:59:13.757009036 +0100
|
||||
@@ -0,0 +1,116 @@
|
||||
+# Catalan translation of popt.
|
||||
+# Copyright © Free Software Foundation, Inc.
|
||||
+# This file is distributed under the same license as the popt package.
|
||||
+# Jordi Mallach <jordi@sindominio.net>, 2006.
|
||||
+#
|
||||
+msgid ""
|
||||
+msgstr ""
|
||||
+"Project-Id-Version: popt 1.7\n"
|
||||
+"POT-Creation-Date: 2002-09-16 13:31-0400\n"
|
||||
+"PO-Revision-Date: 2006-03-13 10:22+0000\n"
|
||||
+"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
|
||||
+"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
+"MIME-Version: 1.0\n"
|
||||
+"Content-Type: text/plain; charset=UTF-8\n"
|
||||
+"Content-Transfer-Encoding: 8bit\n"
|
||||
+
|
||||
+#: popt.c:34
|
||||
+msgid "unknown errno"
|
||||
+msgstr "número d'error desconegut"
|
||||
+
|
||||
+#: popt.c:940
|
||||
+#, c-format
|
||||
+msgid "option type (%d) not implemented in popt\n"
|
||||
+msgstr "el tipus d'opció (%d) no està implementat en popt\n"
|
||||
+
|
||||
+#: popt.c:1160
|
||||
+msgid "missing argument"
|
||||
+msgstr "manca un argument"
|
||||
+
|
||||
+#: popt.c:1162
|
||||
+msgid "unknown option"
|
||||
+msgstr "opció desconeguda"
|
||||
+
|
||||
+#: popt.c:1164
|
||||
+msgid "mutually exclusive logical operations requested"
|
||||
+msgstr "s'ha demanat operacions lògiques mutuament excloents"
|
||||
+
|
||||
+#: popt.c:1166
|
||||
+msgid "opt->arg should not be NULL"
|
||||
+msgstr "opt->arg no hauria de ser NULL"
|
||||
+
|
||||
+#: popt.c:1168
|
||||
+msgid "aliases nested too deeply"
|
||||
+msgstr "la recursió d'àlias és massa profunda"
|
||||
+
|
||||
+#: popt.c:1170
|
||||
+msgid "error in parameter quoting"
|
||||
+msgstr "hi ha un error en l'entrecomillat dels paràmetres"
|
||||
+
|
||||
+#: popt.c:1172
|
||||
+msgid "invalid numeric value"
|
||||
+msgstr "el valor numèric és invàlid"
|
||||
+
|
||||
+#: popt.c:1174
|
||||
+msgid "number too large or too small"
|
||||
+msgstr "el número és massa gran o massa petit"
|
||||
+
|
||||
+#: popt.c:1176
|
||||
+msgid "memory allocation failed"
|
||||
+msgstr "l'assignació de memòria ha fallat"
|
||||
+
|
||||
+#: popt.c:1180
|
||||
+msgid "unknown error"
|
||||
+msgstr "s'ha produït un error desconegut"
|
||||
+
|
||||
+#: popthelp.c:57
|
||||
+msgid "Show this help message"
|
||||
+msgstr "Mostra aquest missatge d'ajuda"
|
||||
+
|
||||
+#: popthelp.c:58
|
||||
+msgid "Display brief usage message"
|
||||
+msgstr "Mostra un missatge breu d'ús"
|
||||
+
|
||||
+#: popthelp.c:61
|
||||
+msgid "Display option defaults in message"
|
||||
+msgstr "Mostra els valors predeterminats de les opcions al missatge"
|
||||
+
|
||||
+#: popthelp.c:103
|
||||
+msgid "NONE"
|
||||
+msgstr "CAP"
|
||||
+
|
||||
+#: popthelp.c:105
|
||||
+msgid "VAL"
|
||||
+msgstr "VAL"
|
||||
+
|
||||
+#: popthelp.c:109
|
||||
+msgid "INT"
|
||||
+msgstr "INT"
|
||||
+
|
||||
+#: popthelp.c:110
|
||||
+msgid "LONG"
|
||||
+msgstr "LONG"
|
||||
+
|
||||
+#: popthelp.c:111
|
||||
+msgid "STRING"
|
||||
+msgstr "STRING"
|
||||
+
|
||||
+#: popthelp.c:112
|
||||
+msgid "FLOAT"
|
||||
+msgstr "FLOAT"
|
||||
+
|
||||
+#: popthelp.c:113
|
||||
+msgid "DOUBLE"
|
||||
+msgstr "DOUBLE"
|
||||
+
|
||||
+#: popthelp.c:114
|
||||
+msgid "ARG"
|
||||
+msgstr "ARG"
|
||||
+
|
||||
+#: popthelp.c:486
|
||||
+msgid "Usage:"
|
||||
+msgstr "Forma d'ús:"
|
||||
+
|
||||
+#: popthelp.c:510
|
||||
+msgid "[OPTION...]"
|
||||
+msgstr "[OPCIÓ...]"
|
||||
--- popt-1.18/po/LINGUAS.orig 2021-05-28 20:41:14.490519000 -0700
|
||||
+++ popt-1.18/po/LINGUAS 2021-05-28 20:41:21.948958400 -0700
|
||||
@@ -1 +1 @@
|
||||
-cs da de eo es fi fr ga gl hu id is it ja ko lv nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN
|
||||
+ca cs da de eo es fi fr ga gl hu id is it ja ko lv nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN
|
||||
@@ -4,13 +4,13 @@
|
||||
_realname=popt
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.18
|
||||
pkgrel=2
|
||||
pkgver=1.19
|
||||
pkgrel=1
|
||||
pkgdesc="C library for parsing command line parameters (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://github.com/rpm-software-management/popt"
|
||||
license=("MIT")
|
||||
license=("spdx:MIT")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gettext-runtime")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
|
||||
@@ -19,32 +19,34 @@ source=(http://ftp.rpm.org/popt/releases/popt-1.x/${_realname}-${pkgver}.tar.gz
|
||||
"0001-nl_langinfo.mingw32.patch"
|
||||
"197416.all.patch"
|
||||
"217602.all.patch"
|
||||
"278402-manpage.all.patch"
|
||||
"318833.all.patch"
|
||||
"356669.all.patch"
|
||||
"get-w32-console-maxcols.mingw32.patch"
|
||||
"no-uid-stuff-on.mingw32.patch")
|
||||
sha256sums=('5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1'
|
||||
sha256sums=('c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9'
|
||||
'33ecd8c6b99597256954763c81d90e7e65a2ddaaab3ae17c8a7769c77be0b22b'
|
||||
'309d083fba6c7ae9b6088755cc36373481b355806142485d3c9f356dd6355bce'
|
||||
'e4f9383cb4821976f513f64fc8c64e0dfadcc7c031e5cdce2bbe89fb6d9a40c4'
|
||||
'99b9b5547edfac75eddb90083e3d19c0076d25f1d3e1ad165b49af81ecad8ce9'
|
||||
'd5616778c0233e6a010995ef9b13a780fa5d7c29cf868e0c975dd2165d41d805'
|
||||
'57f48a2f683b7a06d89e8f3973afecfc488e4ec5067ddd357028753ff5dee93e'
|
||||
'9ad9dcff285cc34abca6c5b2f1f27e050134392562cdc41706d919adeb516dd4'
|
||||
'0a202a7e53348138c4c9c22e8a6aa089fc66ea105b64ec4251c3cb2ebf11ffae')
|
||||
|
||||
_apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying ${_patch}"
|
||||
patch -p1 -i "${srcdir}/${_patch}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/${_realname}-$pkgver"
|
||||
rm -rf po/ca.po || true
|
||||
patch -p1 -i $srcdir/0001-nl_langinfo.mingw32.patch
|
||||
patch -p1 -i $srcdir/197416.all.patch
|
||||
patch -p1 -i $srcdir/217602.all.patch
|
||||
patch -p1 -i $srcdir/278402-manpage.all.patch
|
||||
patch -p1 -i $srcdir/318833.all.patch
|
||||
patch -p1 -i $srcdir/356669.all.patch
|
||||
patch -p1 -i $srcdir/get-w32-console-maxcols.mingw32.patch
|
||||
patch -p1 -i $srcdir/no-uid-stuff-on.mingw32.patch
|
||||
|
||||
_apply_patch_with_msg \
|
||||
0001-nl_langinfo.mingw32.patch \
|
||||
197416.all.patch \
|
||||
217602.all.patch \
|
||||
get-w32-console-maxcols.mingw32.patch \
|
||||
no-uid-stuff-on.mingw32.patch
|
||||
|
||||
autoreconf -fiv
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user