- avoid build failure caused by mistakenly excluded <locale.h>

This commit is contained in:
Kamil Dudka 2010-04-07 12:50:17 +00:00
parent f9a1ceed52
commit 880b841b09
2 changed files with 74 additions and 37 deletions

13
lynx-2.8.7-locale.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/LYMain.c b/src/LYMain.c
index b3a00cc..126a30f 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -57,7 +57,7 @@
#include <io.h>
#endif
-#if defined(LOCALE) && !defined(HAVE_LIBINTL_H)
+#if defined(LOCALE)
#undef gettext /* Solaris locale.h prototypes gettext() */
#include <locale.h>
#ifndef HAVE_GETTEXT

View File

@ -1,16 +1,35 @@
Summary: A text-based Web browser
Name: lynx
Version: 2.8.7
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2
Group: Applications/Internet
Source: http://lynx.isc.org/lynx%{version}/lynx%{version}.tar.bz2
URL: http://lynx.isc.org/
# RH specific tweaks - directory layout, utf-8 by default, misc. configuration
# and home page
Patch0: lynx-2.8.6-redhat.patch
# tweaks colors
Patch1: lynx-2.8.6-backgrcolor.patch
# patch preparing upstream sources for rpmbuild, in particular for parallel make
Patch2: lynx-build-fixes.patch
# prompt user before executing command via a lynxcgi link even in advanced mode,
# as the actual URL may not be shown but hidden behind an HTTP redirect and set
# TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
# [CVE-2008-4690]
Patch3: lynx-CVE-2008-4690.patch
# make it possible to delete a bookmark when ~/lynx_bookmarks.html is writable
# by group (#486070)
Patch4: lynx-2.8.7-bm-del.patch
# avoid build failure caused by mistakenly excluded <locale.h>
Patch5: lynx-2.8.7-locale.patch
Provides: webclient
Provides: text-www-browser
BuildRequires: gettext
@ -33,25 +52,12 @@ exits quickly and swiftly displays web pages.
%prep
%setup -q -n lynx2-8-7
# RH specific tweaks - directory layout, utf-8 by default, misc. configuration
# and home page
%patch0 -p1
# tweaks colors
%patch1 -p1
# patch preparing upstream sources for rpmbuild, in particular for parallel make
%patch2 -p1
# prompt user before executing command via a lynxcgi link even in advanced mode,
# as the actual URL may not be shown but hidden behind an HTTP redirect and set
# TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
# [CVE-2008-4690]
%patch3 -p1
# make it possible to delete a bookmark when ~/lynx_bookmarks.html is writable
# by group (#486070)
%patch4 -p1
%patch5 -p1
perl -pi -e "s,^HELPFILE:.*,HELPFILE:file://localhost/usr/share/doc/lynx-%{version}/lynx_help/lynx_help_main.html,g" lynx.cfg
perl -pi -e "s,^DEFAULT_INDEX_FILE:.*,DEFAULT_INDEX_FILE:http://www.google.com/,g" lynx.cfg
@ -63,10 +69,10 @@ cat >gcc <<EOF
#!/bin/sh
ARGS=""
while [ \$# != 0 ]; do
if [ \$1 != "-I/usr/include" -a \$1 != "-I/usr/include/" ]; then
ARGS="\$ARGS \$1"
fi
shift
if [ \$1 != "-I/usr/include" -a \$1 != "-I/usr/include/" ]; then
ARGS="\$ARGS \$1"
fi
shift
done
exec /usr/bin/gcc \$ARGS
EOF
@ -74,25 +80,40 @@ chmod 0755 gcc
CFLAGS="-ggdb $RPM_OPT_FLAGS -DNCURSES -DNCURSES_MOUSE_VERSION" ; export CFLAGS
CXXFLAGS="-ggdb $RPM_OPT_FLAGS -DNCURSES -DNCURSES_MOUSE_VERSION" ; export CXXFLAGS
if pkg-config openssl ; then
CPPFLAGS=`pkg-config --cflags openssl` ; export CPPFLAGS
LDFLAGS=`pkg-config --libs-only-L openssl` ; export LDFLAGS
CPPFLAGS=`pkg-config --cflags openssl` ; export CPPFLAGS
LDFLAGS=`pkg-config --libs-only-L openssl` ; export LDFLAGS
fi
%configure --libdir=/etc \
--with-screen=ncursesw --enable-warnings \
--enable-default-colors --enable-externs \
--enable-internal-links --enable-nsl-fork \
--enable-persistent-cookies --enable-prettysrc \
--disable-font-switch --enable-source-cache \
--enable-kbd-layout --with-zlib \
--enable-charset-choice --enable-file-upload \
--enable-cgi-links --enable-read-eta \
--enable-addrlist-page --enable-cjk \
--enable-justify-elts --enable-scrollbar \
--enable-libjs --enable-cgi-links --enable-nls \
--enable-ipv6 \
--enable-locale-charset \
--enable-japanese-utf8 \
--with-ssl=%{_libdir}
%configure --libdir=/etc \
--disable-font-switch \
--enable-addrlist-page \
--enable-charset-choice \
--enable-cgi-links \
--enable-cjk \
--enable-default-colors \
--enable-externs \
--enable-file-upload \
--enable-internal-links \
--enable-ipv6 \
--enable-japanese-utf8 \
--enable-justify-elts \
--enable-locale-charset \
--enable-kbd-layout \
--enable-libjs \
--enable-nls \
--enable-nsl-fork \
--enable-persistent-cookies \
--enable-prettysrc \
--enable-read-eta \
--enable-scrollbar \
--enable-source-cache \
--enable-warnings \
--with-screen=ncursesw \
--with-ssl=%{_libdir} \
--with-zlib
# uncomment to turn off optimizations
#find -name makefile | xargs sed -i 's/-O2/-O0/'
make %{?_smp_mflags}
%install
@ -124,6 +145,9 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg
%changelog
* Wed Apr 07 2010 Kamil Dudka <kdudka@redhat.com> - 2.8.7-3
- avoid build failure caused by mistakenly excluded <locale.h>
* Wed Jan 13 2010 Kamil Dudka <kdudka@redhat.com> - 2.8.7-2
- make it possible to delete a bookmark when ~/lynx_bookmarks.html is writable
by group (#486070)