Add a recipe for Lynx

The patchset overwrites configure, because lynx wants to use
its own version of autoconf, which would be too much trouble.
This commit is contained in:
François Revol
2014-07-23 01:09:11 +02:00
parent 3d17251dcd
commit 4ff99792ec
2 changed files with 229 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
SUMMARY="Lynx web browser"
DESCRIPTION="
An excellent console-based web browser with ssl support.
"
HOMEPAGE="http://lynx.isc.org/"
SRC_URI="http://lynx.isc.org/current/lynx2.8.9dev.1.tar.bz2"
CHECKSUM_SHA256="e9278002e34175240e986db92a60f6214f35999f51287056149cdc08578c2bff"
REVISION="1"
#XXX:Also check COPYHEADER?
LICENSE="GNU GPL v2"
COPYRIGHT="1997-2013,2014 Thomas E. Dickey"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
lynx$secondaryArchSuffix = $portVersion
cmd:lynx$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libz$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libz$secondaryArchSuffix >= 1.2.8
devel:libiconv$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
#cmd:autoconf
cmd:ar
cmd:bison
cmd:bzip2
cmd:ctags
cmd:gzip
cmd:make
cmd:tar
cmd:ranlib
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
"
SOURCE_DIR="lynx2-8-9"
PATCHES="lynx-2.8.9dev.1.patchset"
GLOBAL_WRITABLE_FILES="
settings/lynx.lss
settings/lynx.cfg
"
BUILD()
{
# autoconf
runConfigure --omit-dirs "docDir" ./configure --with-ssl
make
}
INSTALL()
{
make install install-help install-doc
}

View File

@@ -0,0 +1,158 @@
From 2e6fb7b833c90ddd940683ca1a5ab5c22f20923f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Tue, 22 Jul 2014 23:57:16 +0200
Subject: [PATCH 1/3] Fix SIGWINCH test to include <signal.h>
Instead of <sys/signal.h> which is not part of POSIX.
---
aclocal.m4 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 6d9d274..909cacb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -4826,7 +4826,7 @@ AC_DEFUN([CF_SIGWINCH],
AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
AC_TRY_COMPILE([
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
],[int x = SIGWINCH],
[cf_cv_define_sigwinch=yes],
[AC_TRY_COMPILE([
@@ -4834,7 +4834,7 @@ AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
],[int x = SIGWINCH],
[cf_cv_define_sigwinch=maybe],
[cf_cv_define_sigwinch=no])
@@ -4852,7 +4852,7 @@ do
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
],[
#if SIGWINCH != $cf_sigwinch
make an error
--
1.8.3.4
From 728ce504b6deb51caa3ef36ea384f5803c7c350a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 23 Jul 2014 00:15:05 +0200
Subject: [PATCH 2/3] Fix calling getpwdnam without including the header
pwd.h is only included on HAVE_UTMP,
but Haiku has pwd.h but no utmp.
---
config.hin | 1 +
configure.in | 1 +
src/LYUtils.c | 5 ++++-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/config.hin b/config.hin
index 2644f5b..96930d7 100644
--- a/config.hin
+++ b/config.hin
@@ -119,6 +119,7 @@
#undef HAVE_READDIR
#undef HAVE_RESIZETERM
#undef HAVE_RESOLV_H
+#undef HAVE_PWD_H
#undef HAVE_SETENV /* AM_GNU_GETTEXT */
#undef HAVE_SETLOCALE
#undef HAVE_SETUID
diff --git a/configure.in b/configure.in
index 6eee4d1..d2bb819 100644
--- a/configure.in
+++ b/configure.in
@@ -752,6 +752,7 @@ AC_CHECK_HEADERS( \
arpa/inet.h \
fcntl.h \
limits.h \
+ pwd.h \
stdlib.h \
string.h \
sys/fcntl.h \
diff --git a/src/LYUtils.c b/src/LYUtils.c
index f4f97b7..e7ddc7c 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -99,8 +99,11 @@ extern int kbhit(void); /* FIXME: use conio.h */
#include <lib$routines.h>
#endif /* VMS */
-#ifdef HAVE_UTMP
+#ifdef HAVE_PWD_H
#include <pwd.h>
+#endif
+
+#ifdef HAVE_UTMP
#ifdef UTMPX_FOR_UTMP
#include <utmpx.h>
#define utmp utmpx
--
1.8.3.4
From 7325373c7c9bd8bf88bd6dbe3b59d87e72b3dd72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 23 Jul 2014 00:18:13 +0200
Subject: [PATCH 3/3] Force patching configure itself
It seems lynx requires its own flavor of autoconf,
with things like AC_DIVERT_HELP.
We try to avoid having to patch autoconf just for this.
---
configure | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 3efcee3..aba5f06 100755
--- a/configure
+++ b/configure
@@ -10226,7 +10226,7 @@ else
#include "confdefs.h"
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
int
main ()
@@ -10260,7 +10260,7 @@ cat >conftest.$ac_ext <<_ACEOF
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
int
main ()
@@ -10316,7 +10316,7 @@ do
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
-#include <sys/signal.h>
+#include <signal.h>
int
main ()
@@ -26246,6 +26246,7 @@ for ac_header in \
arpa/inet.h \
fcntl.h \
limits.h \
+ pwd.h \
stdlib.h \
string.h \
sys/fcntl.h \
--
1.8.3.4