Resolve compile failure due to -Werror on openSUSE_12.2
OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/putty?expand=0&rev=4
This commit is contained in:
parent
3b315f8d8d
commit
45d04bb411
91
putty-01-werror.diff
Normal file
91
putty-01-werror.diff
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
macosx/Makefile | 2 +-
|
||||||
|
mkfiles.pl | 6 +++---
|
||||||
|
unix/Makefile.gtk | 2 +-
|
||||||
|
unix/Makefile.ux | 2 +-
|
||||||
|
unix/configure.ac | 2 +-
|
||||||
|
5 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
Index: putty-0.62/macosx/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/macosx/Makefile
|
||||||
|
+++ putty-0.62/macosx/Makefile
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
#
|
||||||
|
CC = $(TOOLPATH)gcc
|
||||||
|
|
||||||
|
-CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
+CFLAGS = -O2 -Wall -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
-I../macosx/
|
||||||
|
MLDFLAGS = -framework Cocoa
|
||||||
|
ULDFLAGS =
|
||||||
|
Index: putty-0.62/mkfiles.pl
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/mkfiles.pl
|
||||||
|
+++ putty-0.62/mkfiles.pl
|
||||||
|
@@ -960,7 +960,7 @@ if (defined $makefiles{'gtk'}) {
|
||||||
|
"\n".
|
||||||
|
"unexport CFLAGS # work around a weird issue with krb5-config\n".
|
||||||
|
"\n".
|
||||||
|
- &splitline("CFLAGS = -O2 -Wall -Werror -g " .
|
||||||
|
+ &splitline("CFLAGS = -O2 -Wall -g " .
|
||||||
|
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
|
||||||
|
" \$(shell \$(GTK_CONFIG) --cflags)").
|
||||||
|
" -D _FILE_OFFSET_BITS=64\n".
|
||||||
|
@@ -1039,7 +1039,7 @@ if (defined $makefiles{'unix'}) {
|
||||||
|
"\n".
|
||||||
|
"unexport CFLAGS # work around a weird issue with krb5-config\n".
|
||||||
|
"\n".
|
||||||
|
- &splitline("CFLAGS = -O2 -Wall -Werror -g " .
|
||||||
|
+ &splitline("CFLAGS = -O2 -Wall -g " .
|
||||||
|
(join " ", map {"-I$dirpfx$_"} @srcdirs)).
|
||||||
|
" -D _FILE_OFFSET_BITS=64\n".
|
||||||
|
"ULDFLAGS = \$(LDFLAGS)\n".
|
||||||
|
@@ -1236,7 +1236,7 @@ if (defined $makefiles{'osx'}) {
|
||||||
|
print
|
||||||
|
"CC = \$(TOOLPATH)gcc\n".
|
||||||
|
"\n".
|
||||||
|
- &splitline("CFLAGS = -O2 -Wall -Werror -g " .
|
||||||
|
+ &splitline("CFLAGS = -O2 -Wall -g " .
|
||||||
|
(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
|
||||||
|
"MLDFLAGS = -framework Cocoa\n".
|
||||||
|
"ULDFLAGS =\n".
|
||||||
|
Index: putty-0.62/unix/Makefile.gtk
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/unix/Makefile.gtk
|
||||||
|
+++ putty-0.62/unix/Makefile.gtk
|
||||||
|
@@ -119,7 +119,7 @@ GTK_CONFIG = sh -c 'pkg-config gtk+-2.0
|
||||||
|
|
||||||
|
unexport CFLAGS # work around a weird issue with krb5-config
|
||||||
|
|
||||||
|
-CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
+CFLAGS = -O2 -Wall -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
-I../macosx/ $(shell $(GTK_CONFIG) --cflags) -D _FILE_OFFSET_BITS=64
|
||||||
|
XLDFLAGS = $(LDFLAGS) $(shell $(GTK_CONFIG) --libs)
|
||||||
|
ULDFLAGS = $(LDFLAGS)
|
||||||
|
Index: putty-0.62/unix/Makefile.ux
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/unix/Makefile.ux
|
||||||
|
+++ putty-0.62/unix/Makefile.ux
|
||||||
|
@@ -111,7 +111,7 @@ CC = $(TOOLPATH)cc
|
||||||
|
|
||||||
|
unexport CFLAGS # work around a weird issue with krb5-config
|
||||||
|
|
||||||
|
-CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
+CFLAGS = -O2 -Wall -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
|
||||||
|
-I../macosx/ -D _FILE_OFFSET_BITS=64
|
||||||
|
ULDFLAGS = $(LDFLAGS)
|
||||||
|
INSTALL=install
|
||||||
|
Index: putty-0.62/unix/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/unix/configure.ac
|
||||||
|
+++ putty-0.62/unix/configure.ac
|
||||||
|
@@ -11,7 +11,7 @@ AC_CONFIG_HEADERS([uxconfig.h:uxconfig.i
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_CC
|
||||||
|
if test "X$GCC" = Xyes; then
|
||||||
|
- PUTTYCFLAGS="-Wall -Werror"
|
||||||
|
+ PUTTYCFLAGS="-Wall"
|
||||||
|
else
|
||||||
|
PUTTYCFLAGS=""
|
||||||
|
fi
|
17
putty-02-remove-gtk1.diff
Normal file
17
putty-02-remove-gtk1.diff
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
unix/configure.ac | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: putty-0.62/unix/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- putty-0.62.orig/unix/configure.ac
|
||||||
|
+++ putty-0.62/unix/configure.ac
|
||||||
|
@@ -32,7 +32,7 @@ AC_CHECK_HEADERS([utmpx.h sys/select.h],
|
||||||
|
#include <utmp.h>])
|
||||||
|
|
||||||
|
# Look for both GTK 1 and GTK 2.
|
||||||
|
-AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none])
|
||||||
|
+gtk=none
|
||||||
|
AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
|
||||||
|
if test "$gtk" = "none"; then
|
||||||
|
all_targets="all-cli"
|
@ -7,8 +7,10 @@ License: MIT
|
|||||||
URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||||
|
|
||||||
Source: %name-%version.tar.bz2
|
Source: %name-%version.tar.bz2
|
||||||
|
Patch1: putty-01-werror.diff
|
||||||
|
Patch2: putty-02-remove-gtk1.diff
|
||||||
BuildRoot: %_tmppath/%name-%version-build
|
BuildRoot: %_tmppath/%name-%version-build
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: autoconf, automake, krb5-devel, gtk2-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PuTTY is a terminal emulator application which can act as a client
|
PuTTY is a terminal emulator application which can act as a client
|
||||||
@ -16,10 +18,12 @@ for the SSH, Telnet, rlogin, and raw TCP computing protocols and as a
|
|||||||
serial console client.
|
serial console client.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -q
|
||||||
|
%patch -P 1 -P 2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
pushd unix/;
|
pushd unix/;
|
||||||
|
autoreconf -fi;
|
||||||
%configure
|
%configure
|
||||||
make %{?_smp_mflags};
|
make %{?_smp_mflags};
|
||||||
popd;
|
popd;
|
||||||
|
Loading…
Reference in New Issue
Block a user