Florian Weimer 2022-12-02 19:07:56 +01:00
parent d2cdd52cea
commit f04f3a89b1
2 changed files with 64 additions and 1 deletions

57
lynx-configure-c99.patch Normal file
View File

@ -0,0 +1,57 @@
The HAVE_UNISTD_H change only shows up in configure because it's a fix
for shell code generated by an old autoconf release.
Submitted upstream:
<https://lists.nongnu.org/archive/html/lynx-dev/2022-12/msg00000.html>
diff --git a/aclocal.m4 b/aclocal.m4
index 70cde243d2129cc0..bf2cbff661de2fe1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -6435,6 +6435,7 @@ AC_CACHE_CHECK(if we can include termio.h with curses,cf_cv_termio_and_curses,[
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir:-.} -I${srcdir:-.}/src -I${srcdir:-.}/WWW/Library/Implementation"
touch lynx_cfg.h
AC_TRY_COMPILE([
+#include <stdio.h>
#include <$1>
#include <termio.h>],
[putchar(0x0a)],
@@ -6455,6 +6456,7 @@ AC_DEFUN([CF_TERMIO_AND_TERMIOS],
AC_MSG_CHECKING([termio.h and termios.h])
AC_CACHE_VAL(cf_cv_termio_and_termios,[
AC_TRY_COMPILE([
+#include <stdio.h>
#if HAVE_TERMIO_H
#include <termio.h>
#endif
diff --git a/configure b/configure
index 97f6d1d5646d05c5..6db52b514b3b9a3c 100755
--- a/configure
+++ b/configure
@@ -31122,6 +31122,7 @@ else
#line 31122 "configure"
#include "confdefs.h"
+#include <stdio.h>
#if HAVE_TERMIO_H
#include <termio.h>
#endif
@@ -31629,6 +31630,9 @@ else
#line 31629 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <sys/types.h>
#define NGID 256
#undef MAX
@@ -47492,6 +47496,7 @@ else
#line 47492 "configure"
#include "confdefs.h"
+#include <stdio.h>
#include <LYCurses.h>
#include <termio.h>
int

View File

@ -3,7 +3,7 @@
Summary: A text-based Web browser
Name: lynx
Version: 2.9.0
Release: %{devrel}.2%{?dist}.1
Release: %{devrel}.2%{?dist}.2
License: GPLv2
Source: https://invisible-mirror.net/archives/lynx/tarballs/lynx%{version}%{devrel}.tar.bz2
URL: https://lynx.invisible-island.net/
@ -23,6 +23,8 @@ Patch2: lynx-CVE-2008-4690.patch
# add presentation type for xhtml
Patch3: lynx-2.9.0dev.10-xhtml.patch
Patch4: lynx-configure-c99.patch
Provides: webclient
Provides: text-www-browser
BuildRequires: dos2unix
@ -55,6 +57,7 @@ exits quickly and swiftly displays web pages.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
sed -e "s,^HELPFILE:.*,HELPFILE:file://localhost%{_pkgdocdir}/lynx_help/lynx_help_main.html,g" -i lynx.cfg
@ -132,6 +135,9 @@ EOF
%config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg
%changelog
* Fri Dec 2 2022 Florian Weimer <fweimer@redhat.com> - 2.9.0-dev.10.2.2
- Port the configure script to C99
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-dev.10.2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild