From 3d8e23dc0e88c5c9d38a99da8c1fe53e0449a117 Mon Sep 17 00:00:00 2001 From: Peter Fordham Date: Dec 19 2022 04:35:59 +0000 Subject: Fix non C99 compliant check and add autoreconf to build. Upstream issue tracked here: https://sourceforge.net/p/coan2/bugs/95/ --- diff --git a/coan-autoconf-c99.patch b/coan-autoconf-c99.patch new file mode 100644 index 0000000..0d36305 --- /dev/null +++ b/coan-autoconf-c99.patch @@ -0,0 +1,25 @@ +Fix non C99 compliant check. +https://sourceforge.net/p/coan2/bugs/95/ + +diff --git a/configure.ac b/configure.ac +index 23ba6f0..13e6647 100644 +--- configure.ac ++++ configure.ac +@@ -4,7 +4,7 @@ AC_PREREQ(2.59) + AM_INIT_AUTOMAKE(1.13 no-define) + AC_CHECK_HEADERS(strings.h) + AC_MSG_CHECKING(for big-endian host) +-AC_TRY_RUN([main () { ++AC_TRY_RUN([int main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { +@@ -12,7 +12,7 @@ AC_TRY_RUN([main () { + char c[sizeof (long)]; + } u; + u.l = 1; +- exit (u.c[sizeof (long) - 1] == 1); ++ return u.c[sizeof (long) - 1] == 1; + }], BIG_ENDIAN=no, BIG_ENDIAN=yes) + AC_MSG_RESULT([$BIG_ENDIAN]) + AM_CONDITIONAL([IS_BIG_ENDIAN],[test "$BIG_ENDIAN" = "yes"]) diff --git a/coan.spec b/coan.spec index 3cd9fad..cc2cf0d 100644 --- a/coan.spec +++ b/coan.spec @@ -1,17 +1,20 @@ Name: coan Version: 6.0.1 -Release: 28%{?dist} +Release: 29%{?dist} Summary: A command line tool for simplifying the pre-processor conditionals in source code License: BSD URL: http://coan2.sourceforge.net/ Source0: http://downloads.sourceforge.net/coan2/%{name}-%{version}.tar.gz # https://sourceforge.net/p/coan2/bugs/92/ Patch0: expression_parser.patch +# https://sourceforge.net/p/coan2/bugs/95/ +Patch1: coan-autoconf-c99.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-podlators BuildRequires: perl-Pod-Html +BuildRequires: autoconf automake # removed python2 dependencies and asked upstream to port tests to python3 # https://sourceforge.net/p/coan2/bugs/93/ @@ -48,6 +51,7 @@ done %build export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" +autoreconf -vi %configure %make_build @@ -74,6 +78,9 @@ export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" %{_mandir}/man1/%{name}.1.* %changelog +* Sun Dec 18 2022 Peter Fordham - 6.0.1-29 +- Fix c99 complaince isses in configure.ac and add autoreconf to build. + * Wed Jul 20 2022 Fedora Release Engineering - 6.0.1-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild