From c2bb76914bf688903a2f3aa3daa76d4730e07784 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 13 Apr 2023 12:17:12 +0200 Subject: [PATCH] C99 compatibility fixes for paps 0.6.8 Related to: --- paps-c99.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ paps.spec | 7 ++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 paps-c99.patch diff --git a/paps-c99.patch b/paps-c99.patch new file mode 100644 index 0000000..115043e --- /dev/null +++ b/paps-c99.patch @@ -0,0 +1,44 @@ +Use AC_USE_SYSTEM_EXTENSIONS and include , so that +makes a declaration of wcwidth available. Include +for a declaration of g_vasprintf. This avoids implicit function +declarations and build failures with future compilers. + +No need to upstream this because it only impacts the bundled 0.6.8 +sources, the later 0.8.0 version has already been fixed upstream. The +g_vasprintf call was introduced in the paps-0.6.6-lcnumeric.patch +downstream patch. + +diff -ur paps-0.8.0.orig/paps-0.6.8/configure.in paps-0.8.0/paps-0.6.8/configure.in +--- paps-0.8.0.orig/paps-0.6.8/configure.in 2023-04-13 11:56:29.571277839 +0200 ++++ paps-0.8.0/paps-0.6.8/configure.in 2023-04-13 12:00:03.228135149 +0200 +@@ -6,6 +6,7 @@ + AC_LANG_C + AC_PROG_CC + AM_PROG_LIBTOOL ++AC_USE_SYSTEM_EXTENSIONS + + dnl ====================================================== + dnl check for CUPS +diff -ur paps-0.8.0.orig/paps-0.6.8/src/paps.c paps-0.8.0/paps-0.6.8/src/paps.c +--- paps-0.8.0.orig/paps-0.6.8/src/paps.c 2023-04-13 11:56:29.583277719 +0200 ++++ paps-0.8.0/paps-0.6.8/src/paps.c 2023-04-13 12:02:28.958673663 +0200 +@@ -20,7 +20,7 @@ + * + */ + +- ++#include + #include + #include + #include "libpaps.h" +diff -ur paps-0.8.0.orig/paps-0.6.8/src/libpaps.c paps-0.8.0/paps-0.6.8/src/libpaps.c +--- paps-0.8.0.orig/paps-0.6.8/src/libpaps.c 2023-04-13 11:56:29.581277739 +0200 ++++ paps-0.8.0/paps-0.6.8/src/libpaps.c 2023-04-13 12:07:17.504779917 +0200 +@@ -23,6 +23,7 @@ + + #include "libpaps.h" + ++#include + #include + #include + #include diff --git a/paps.spec b/paps.spec index d92ce8a..c028639 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -43,6 +43,7 @@ Patch59: %{name}-ft-header.patch Patch60: %{name}-a3.patch ## rhbz#1214939 Patch61: %{name}-fix-paper-size-truncate.patch +Patch62: paps-c99.patch ### For paps Patch100: %{name}-fix-src-to-paps.patch Patch101: %{name}-fix-build.patch @@ -86,6 +87,7 @@ pushd %{name}-0.6.8 %patch59 -p1 -b .ft-header %patch60 -p1 -b .a3 %patch61 -p1 -b .paper-size +%patch62 -p2 -b .configure-c99 libtoolize -f -c autoreconf -f -i popd @@ -144,6 +146,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Apr 13 2023 Florian Weimer - 0.8.0-2 +- C99 compatibility fixes for paps 0.6.8 + * Wed Mar 1 2023 Akira TAGOH - 0.8.0-1 - New upstream release. Resolves: rhbz#2168726