OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 13-Feb-2004 21:42:59
Branch: HEAD Handle: 2004021320425900
Added files:
openpkg-src/putty putty.patch putty.spec
Log:
new package: putty 0.54 (Graphical Telnet/SSH/Rlogin Client)
Summary:
Revision Changes Path
1.1 +200 -0 openpkg-src/putty/putty.patch
1.1 +89 -0 openpkg-src/putty/putty.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/putty/putty.patch
============================================================================
$ cvs diff -u -r0 -r1.1 putty.patch
--- /dev/null 2004-02-13 21:42:59.000000000 +0100
+++ putty.patch 2004-02-13 21:42:59.000000000 +0100
@@ -0,0 +1,200 @@
+Index: unix/Makefile.gtk
+--- unix/Makefile.gtk.orig 2004-02-12 19:43:43.000000000 +0100
++++ unix/Makefile.gtk 2004-02-13 21:41:06.000000000 +0100
+@@ -78,9 +78,9 @@
+
+ # You can define this path to point at your tools if you need to
+ # TOOLPATH = /opt/gcc/bin
+-CC = $(TOOLPATH)cc
++CC = gcc
+
+-CFLAGS = -O2 -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`
++CFLAGS = -O2 -Wall -g -I. -I.. -I../charset `gtk-config --cflags`
+ XLDFLAGS = `gtk-config --libs`
+ ULDFLAGS =#
+ INSTALL=install
+@@ -149,13 +149,13 @@
+ settings.o signal.o slookup.o terminal.o toucs.o tree234.o \
+ utf8.o uxcfg.o uxmisc.o uxprint.o uxsel.o uxstore.o uxucs.o \
+ version.o wcwidth.o xenc.o xkeysym.o
+- $(CC) $(XLDFLAGS) -o $@ be_none.o cmdline.o config.o dialog.o \
++ $(CC) -o $@ be_none.o cmdline.o config.o dialog.o \
+ fromucs.o gtkcols.o gtkdlg.o gtkpanel.o ldisc.o ldiscucs.o \
+ localenc.o logging.o macenc.o mimeenc.o misc.o pterm.o \
+ ptermm.o pty.o sbcs.o sbcsdat.o settings.o signal.o \
+ slookup.o terminal.o toucs.o tree234.o utf8.o uxcfg.o \
+ uxmisc.o uxprint.o uxsel.o uxstore.o uxucs.o version.o \
+- wcwidth.o xenc.o xkeysym.o
++ wcwidth.o xenc.o xkeysym.o $(XLDFLAGS)
+
+ putty: be_all.o cmdline.o config.o dialog.o fromucs.o gtkcols.o gtkdlg.o \
+ gtkpanel.o ldisc.o ldiscucs.o localenc.o logging.o macenc.o \
+@@ -168,7 +168,7 @@
+ uxmisc.o uxnet.o uxnoise.o uxprint.o uxproxy.o uxputty.o \
+ uxsel.o uxstore.o uxucs.o version.o wcwidth.o wildcard.o \
+ x11fwd.o xenc.o xkeysym.o
+- $(CC) $(XLDFLAGS) -o $@ be_all.o cmdline.o config.o dialog.o \
++ $(CC) -o $@ be_all.o cmdline.o config.o dialog.o \
+ fromucs.o gtkcols.o gtkdlg.o gtkpanel.o ldisc.o ldiscucs.o \
+ localenc.o logging.o macenc.o mimeenc.o misc.o portfwd.o \
+ proxy.o pterm.o pty.o raw.o rlogin.o sbcs.o sbcsdat.o \
+@@ -178,7 +178,7 @@
+ sshzlib.o telnet.o terminal.o toucs.o tree234.o utf8.o \
+ ux_x11.o uxagentc.o uxcfg.o uxmisc.o uxnet.o uxnoise.o \
+ uxprint.o uxproxy.o uxputty.o uxsel.o uxstore.o uxucs.o \
+- version.o wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o
++ version.o wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o $(XLDFLAGS)
+
+ puttygen: cmdgen.o import.o misc.o sshaes.o sshbn.o sshdes.o sshdss.o \
+ sshdssg.o sshmd5.o sshprime.o sshpubk.o sshrand.o sshrsa.o \
+@@ -196,14 +196,14 @@
+ telnet.o terminal.o toucs.o tree234.o utf8.o uxcfg.o \
+ uxmisc.o uxnet.o uxprint.o uxproxy.o uxputty.o uxsel.o \
+ uxstore.o uxucs.o version.o wcwidth.o xenc.o xkeysym.o
+- $(CC) $(XLDFLAGS) -o $@ be_nossh.o cmdline.o config.o dialog.o \
++ $(CC) -o $@ be_nossh.o cmdline.o config.o dialog.o \
+ fromucs.o gtkcols.o gtkdlg.o gtkpanel.o ldisc.o ldiscucs.o \
+ localenc.o logging.o macenc.o mimeenc.o misc.o proxy.o \
+ pterm.o pty.o raw.o rlogin.o sbcs.o sbcsdat.o settings.o \
+ signal.o slookup.o telnet.o terminal.o toucs.o tree234.o \
+ utf8.o uxcfg.o uxmisc.o uxnet.o uxprint.o uxproxy.o \
+ uxputty.o uxsel.o uxstore.o uxucs.o version.o wcwidth.o \
+- xenc.o xkeysym.o
++ xenc.o xkeysym.o $(XLDFLAGS)
+
+ be_all.o: ../be_all.c ../putty.h ../puttyps.h ../network.h ../misc.h \
+ ../winstuff.h ../mac/macstuff.h ../unix/unix.h ../puttymem.h \
+@@ -560,7 +560,7 @@
+ version.o: FORCE;
+ # Hack to force version.o to be rebuilt always
+ FORCE:
+- if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
++ if test -z "$(VER)"; then \
+ $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c
../version.c; \
+ else \
+ $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
+@@ -577,8 +577,6 @@
+ $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
+ $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
+ $(INSTALL_DATA) -m 644 plink.1 $(DESTDIR)$(man1dir)/plink.1
+- $(INSTALL_DATA) -m 644 pscp.1 $(DESTDIR)$(man1dir)/pscp.1
+- $(INSTALL_DATA) -m 644 psftp.1 $(DESTDIR)$(man1dir)/psftp.1
+ $(INSTALL_DATA) -m 644 pterm.1 $(DESTDIR)$(man1dir)/pterm.1
+ $(INSTALL_DATA) -m 644 putty.1 $(DESTDIR)$(man1dir)/putty.1
+ $(INSTALL_DATA) -m 644 puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
+Index: unix/pty.c
+--- unix/pty.c.orig 2003-05-11 14:28:53.000000000 +0200
++++ unix/pty.c 2004-02-13 21:38:36.000000000 +0100
+@@ -14,7 +14,12 @@
+ #define _XOPEN_SOURCE
+ #define _XOPEN_SOURCE_EXTENDED
+ #define _GNU_SOURCE
++#ifndef __FreeBSD__
+ #include <features.h>
++#else
++#define OMIT_UTMP
++#define BSD_PTYS
++#endif
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -32,6 +37,10 @@
+ #include <sys/ioctl.h>
+ #include <errno.h>
+
++#ifdef __FreeBSD__
++#include <sys/stat.h>
++#endif
++
+ #include "putty.h"
+
+ #ifndef FALSE
+@@ -567,9 +576,17 @@
+ ioctl(slavefd, TIOCSCTTY, 1);
+ pgrp = getpid();
+ tcsetpgrp(slavefd, pgrp);
++#ifdef __FreeBSD__
++ setpgrp( pgrp, -1 );
++#else
+ setpgrp();
++#endif
+ close(open(pty_name, O_WRONLY, 0));
++#ifdef __FreeBSD__
++ setpgrp( pgrp, -1 );
++#else
+ setpgrp();
++#endif
+ /* Close everything _else_, for tidiness. */
+ for (i = 3; i < 1024; i++)
+ close(i);
+Index: unix/uxucs.c
+--- unix/uxucs.c.orig 2003-04-26 16:22:42.000000000 +0200
++++ unix/uxucs.c 2004-02-13 21:38:36.000000000 +0100
+@@ -12,6 +12,67 @@
+ #include "terminal.h"
+ #include "misc.h"
+
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#if __FreeBSD_version <= 500000
++
++#include <errno.h>
++#include <rune.h>
++#include <limits.h>
++
++/*
++ * Emulate the ISO C mbrtowc() function in terms of the deprecated
++ * 4.4BSD sgetrune() function.
++ */
++size_t
++mbrtowc(wchar_t * __restrict pwc, const char * __restrict s,
++ size_t n, mbstate_t * __restrict ps __unused)
++{
++ const char *e;
++ rune_t r;
++
++ if (s == NULL) {
++ pwc = NULL;
++ s = "";
++ n = 1;
++ }
++ if ((r = sgetrune(s, n, &e)) == _INVALID_RUNE) {
++ if (n >= (size_t)MB_CUR_MAX) {
++ errno = EILSEQ;
++ return ((size_t)-1);
++ }
++ return ((size_t)-2);
++ }
++ if (pwc != NULL)
++ *pwc = (wchar_t)r;
++ return (r != 0 ? (size_t)(e - s) : 0);
++}
++
++/*
++ * Emulate the ISO C wcrtomb() function in terms of the deprecated
++ * 4.4BSD sputrune() function.
++ */
++size_t
++wcrtomb(char * __restrict s, wchar_t wc,
++ mbstate_t * __restrict ps __unused)
++{
++ char *e;
++ char buf[MB_LEN_MAX];
++
++ if (s == NULL) {
++ s = buf;
++ wc = L'\0';
++ }
++ sputrune(wc, s, MB_CUR_MAX, &e);
++ if (e == NULL) {
++ errno = EILSEQ;
++ return ((size_t)-1);
++ }
++ return ((size_t)(e - s));
++}
++#endif
++#endif
++
+ /*
+ * Unix Unicode-handling routines.
+ */
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/putty/putty.spec
============================================================================
$ cvs diff -u -r0 -r1.1 putty.spec
--- /dev/null 2004-02-13 21:42:59.000000000 +0100
+++ putty.spec 2004-02-13 21:42:59.000000000 +0100
@@ -0,0 +1,89 @@
+##
+## putty.spec -- OpenPKG RPM Specification
+## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
+## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: putty
+Summary: Graphical Telnet/SSH/Rlogin Client
+URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/
+Vendor: Simon Tatham et al.
+Packager: The OpenPKG Project
+Distribution: OpenPKG
+Class: EVAL
+Group: Security
+License: MIT-style
+Version: 0.54
+Release: 20040213
+
+# list of sources
+Source0: http://the.earth.li/~sgtatham/putty/%{version}/putty-%{version}.tar.gz
+Patch0: putty.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gtk, gcc
+PreReq: OpenPKG, openpkg >= 20040130, X11, gtk
+AutoReq: no
+AutoReqProv: no
+
+%description
+ PuTTY is a free implementation of Telnet and SSH for Win32 and Unix
+ platforms, along with a X11/Gtk based XTerm terminal emulator.
+
+%track
+ prog putty = {
+ version = %{version}
+ url = http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
+ regex = putty-(__VER__)\.tar\.gz
+ }
+
+%prep
+ %setup -q
+ %patch -p0
+
+%build
+ ( cd unix
+ %{l_make} %{l_mflags -O} -f Makefile.gtk
+ ) || exit $?
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 775 \
+ $RPM_BUILD_ROOT%{l_prefix}/bin \
+ $RPM_BUILD_ROOT%{l_prefix}/man/man1
+ ( cd unix
+ %{l_make} %{l_mflags} -f Makefile.gtk \
+ DESTDIR=$RPM_BUILD_ROOT prefix=%{l_prefix} \
+ INSTALL="%{l_shtool} install -c" \
+ install
+ ) || exit $?
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]