commit 00b9c33f1fe3593c2ba4ca46a66bbf3c74e9d7bc
Author: Jakub Bogusz <[email protected]>
Date:   Thu Aug 2 20:44:42 2018 +0200

    - added fallthrough,format-truncate patches (fix build with gcc 8)
    - release 2

 autogen-fallthrough.patch     | 169 ++++++++++++++++++++++++++++++++++++++++++
 autogen-format-truncate.patch |  13 ++++
 autogen.spec                  |   7 +-
 3 files changed, 187 insertions(+), 2 deletions(-)
---
diff --git a/autogen.spec b/autogen.spec
index 21d306c..0d220bd 100644
--- a/autogen.spec
+++ b/autogen.spec
@@ -2,13 +2,15 @@ Summary:      Automated program generator
 Summary(pl.UTF-8):     Zautomatyzowany generator programów
 Name:          autogen
 Version:       5.18.14
-Release:       1
+Release:       2
 License:       GPL v3+ (AutoGen), LGPL v2+ (genshell), LGPL v3+ or Modified 
BSD (AutoOpts library)
 Group:         Development/Tools
 Source0:       
http://ftp.gnu.org/gnu/autogen/rel%{version}/%{name}-%{version}.tar.xz
 # Source0-md5: c4d9a1641cb1bad4a3cc4108de6d867a
 Patch0:                %{name}-notinstalled.patch
 Patch1:                %{name}-info.patch
+Patch2:                %{name}-fallthrough.patch
+Patch3:                %{name}-format-truncate.patch
 URL:           http://autogen.sourceforge.net/
 BuildRequires: guile-devel >= 5:2.0
 BuildRequires: libltdl-devel
@@ -79,6 +81,8 @@ Statyczna biblioteka AutoOpts.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 # force regeneration
 %{__rm} doc/autogen.info*
@@ -89,7 +93,6 @@ Statyczna biblioteka AutoOpts.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
diff --git a/autogen-fallthrough.patch b/autogen-fallthrough.patch
new file mode 100644
index 0000000..f88871f
--- /dev/null
+++ b/autogen-fallthrough.patch
@@ -0,0 +1,169 @@
+--- autogen-5.18.14/autoopts/boolean.c.orig    2018-08-02 16:05:57.924092546 
+0200
++++ autogen-5.18.14/autoopts/boolean.c 2018-08-02 16:09:28.611903613 +0200
+@@ -64,7 +64,7 @@
+         long  val = strtol(od->optArg.argString, &pz, 0);
+         if ((val != 0) || (*pz != NUL))
+             break;
+-        /* FALLTHROUGH */
++        __attribute__((fallthrough));
+     }
+     case 'N':
+     case 'n':
+--- autogen-5.18.14/autoopts/numeric.c.orig    2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/autoopts/numeric.c 2018-08-02 16:04:45.363587767 +0200
+@@ -136,14 +136,14 @@
+     if ((od->fOptState & OPTST_SCALED_NUM) != 0)
+         switch (*(pz++)) {
+         case NUL:  pz--; break;
+-        case 't':  val *= 1000;
+-        case 'g':  val *= 1000;
+-        case 'm':  val *= 1000;
++        case 't':  val *= 1000; __attribute__ ((fallthrough));;
++        case 'g':  val *= 1000; __attribute__ ((fallthrough));;
++        case 'm':  val *= 1000; __attribute__ ((fallthrough));;
+         case 'k':  val *= 1000; break;
+ 
+-        case 'T':  val *= 1024;
+-        case 'G':  val *= 1024;
+-        case 'M':  val *= 1024;
++        case 'T':  val *= 1024; __attribute__ ((fallthrough));;
++        case 'G':  val *= 1024; __attribute__ ((fallthrough));;
++        case 'M':  val *= 1024; __attribute__ ((fallthrough));;
+         case 'K':  val *= 1024; break;
+ 
+         default:   goto bad_number;
+--- autogen-5.18.14/autoopts/configfile.c.orig 2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/autoopts/configfile.c      2018-08-02 16:08:58.993670281 
+0200
+@@ -464,8 +464,9 @@
+ 
+             case '/':
+                 ftext = strchr(ftext + 2, '>');
+-                if (ftext++ != NULL)
+-                    break;
++              if (ftext != NULL)
++                  ftext++;
++              break;
+ 
+             default:
+                 ftext = NULL;
+--- autogen-5.18.14/autoopts/makeshell.c.orig  2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/autoopts/makeshell.c       2018-08-02 17:26:13.915651987 
+0200
+@@ -927,7 +927,7 @@
+     switch (fork()) {
+     case 0:
+         pagerState = PAGER_STATE_CHILD;
+-        /*FALLTHROUGH*/
++        __attribute__((fallthrough));
+     case -1:
+         optionUsage(optionParseShellOptions, EXIT_FAILURE);
+ 
+--- autogen-5.18.14/autoopts/autoopts/options.h.orig   2018-07-17 
00:29:33.000000000 +0200
++++ autogen-5.18.14/autoopts/autoopts/options.h        2018-08-02 
17:26:42.980524752 +0200
+@@ -642,6 +642,7 @@
+ 
+     /// The procedure to call to print usage text
+     // coverity[+kill]
++    __attribute__((__noreturn__))
+     tpUsageProc                 pUsageProc;
+     /// The procedure to call to translate translatable option messages
+     tOptionXlateProc *          pTransProc;
+@@ -973,7 +974,7 @@
+  * @param opts         program options descriptor
+  * @param od           the descriptor for this arg
+  */
+-extern void optionPrintVersion(tOptions *, tOptDesc *);
++extern void __attribute__((__noreturn__)) optionPrintVersion(tOptions *, 
tOptDesc *);
+ 
+ 
+ /**
+@@ -1196,7 +1197,7 @@
+ 
+ extern unsigned int ao_string_cook_escape_char(char const *, char *, unsigned 
int);
+ 
+-extern void genshelloptUsage(tOptions *, int);
++extern __attribute__((__noreturn__)) void genshelloptUsage(tOptions *, int);
+ 
+ extern int optionAlias(tOptions *, tOptDesc *, unsigned int);
+ 
+@@ -1240,7 +1241,7 @@
+ 
+ extern void optionUnstackArg(tOptions *, tOptDesc *);
+ 
+-extern void optionUsage(tOptions *, int);
++extern __attribute__((__noreturn__)) void optionUsage(tOptions *, int);
+ 
+ extern void optionVendorOption(tOptions *, tOptDesc *);
+ 
+--- autogen-5.18.14/autoopts/version.c.orig    2018-08-02 17:33:54.543383823 
+0200
++++ autogen-5.18.14/autoopts/version.c 2018-08-02 17:33:58.580264327 +0200
+@@ -191,6 +191,7 @@
+ optionPrintVersion(tOptions * opts, tOptDesc * od)
+ {
+     print_ver(opts, od, print_exit ? stderr : stdout, true);
++    __builtin_unreachable();
+ }
+ 
+ /*=export_func  optionPrintVersionAndReturn
+--- autogen-5.18.14/getdefs/gdemit.c.orig      2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/getdefs/gdemit.c   2018-08-02 17:54:18.308213299 +0200
+@@ -129,6 +129,7 @@
+             case '\n':
+                 if (*pzSrc != NUL)
+                     goto lineDone;
++              __attribute__((fallthrough));
+ 
+             case NUL:
+                 pzDest--;
+@@ -362,6 +363,7 @@
+         case '\\':
+             if ((*pzOut++ = *pzText++) != NUL)
+                 break;
++          __attribute__((fallthrough));
+ 
+         case NUL:
+             pzText--;
+@@ -391,6 +393,7 @@
+     for (;;) {
+         switch (*++p) {
+         case ' ': p++; /* FALLTHROUGH */
++          __attribute__((fallthrough));
+         case NUL:
+             *def_pp = p;
+             return;
+@@ -413,6 +416,7 @@
+         *out++ = *def++;
+         switch (*def) {
+         case ' ': def++; /* FALLTHROUGH */
++          __attribute__((fallthrough));
+         case NUL:
+             goto leave_emit_attribute;
+         }
+@@ -577,6 +581,7 @@
+             switch (ch) {
+             case '\'':
+                 *pzOut++ = '\\';
++              __attribute__((fallthrough));
+             default:
+                 *pzOut++ = ch;
+                 break;
+--- autogen-5.18.14/getdefs/proto.h.orig       2018-07-17 00:29:53.000000000 
+0200
++++ autogen-5.18.14/getdefs/proto.h    2018-08-02 18:16:15.067952229 +0200
+@@ -18,7 +18,7 @@
+ static void
+ die(char const * fmt, ...);
+ 
+-static void
++static __attribute__((__noreturn__)) void
+ fserr_die(char const * fmt, ...);
+ 
+ static void
+--- autogen-5.18.14/xml2ag/xml2ag.c.orig       2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/xml2ag/xml2ag.c    2018-08-02 19:01:59.720124425 +0200
+@@ -110,6 +110,7 @@
+                 pzFile = *argv;
+                 break;
+             }
++          __attribute__((fallthrough));
+         case 0:
+             if (   HAVE_OPT( DEFINITIONS )
+                && (strcmp( OPT_ARG( DEFINITIONS ), "-" ) != 0) )
diff --git a/autogen-format-truncate.patch b/autogen-format-truncate.patch
new file mode 100644
index 0000000..d43b074
--- /dev/null
+++ b/autogen-format-truncate.patch
@@ -0,0 +1,13 @@
+--- autogen-5.18.14/getdefs/getdefs.c.orig     2017-09-11 06:52:36.000000000 
+0200
++++ autogen-5.18.14/getdefs/getdefs.c  2018-08-02 18:46:43.118172227 +0200
+@@ -495,7 +495,10 @@
+      *       and insert the index into the output.
+      */
+     if (pzIndexText != NULL) {
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-overflow"
+         sprintf(def_str, "  %s'", name_bf);
++#pragma GCC diagnostic pop
+         pzOut = assignIndex(pzOut, def_bf);
+     }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/autogen.git/commitdiff/00b9c33f1fe3593c2ba4ca46a66bbf3c74e9d7bc

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to