[csw-devel] SF.net SVN: gar:[20831] csw/mgar/pkg/tmux/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Sun Apr 21 10:29:07 CEST 2013
Revision: 20831
http://gar.svn.sourceforge.net/gar/?rev=20831&view=rev
Author: dmichelsen
Date: 2013-04-21 08:29:06 +0000 (Sun, 21 Apr 2013)
Log Message:
-----------
tmux/trunk: Add patches
Modified Paths:
--------------
csw/mgar/pkg/tmux/trunk/Makefile
csw/mgar/pkg/tmux/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/tmux/trunk/files/0001-Include-of-paths.h-if-its-presence-has-been-detected.patch
csw/mgar/pkg/tmux/trunk/files/0002-Use-lockf-instead-of-flock-as-it-is-POSIX-compliant.patch
csw/mgar/pkg/tmux/trunk/files/0003-Provide-replacement-for-cfmakeraw.patch
csw/mgar/pkg/tmux/trunk/files/mdoc2man.awk
Modified: csw/mgar/pkg/tmux/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tmux/trunk/Makefile 2013-04-21 08:25:14 UTC (rev 20830)
+++ csw/mgar/pkg/tmux/trunk/Makefile 2013-04-21 08:29:06 UTC (rev 20831)
@@ -1,22 +1,24 @@
NAME = tmux
-VERSION = 1.7
+VERSION = 1.8
GARTYPE = v2
DESCRIPTION = Terminal Multiplexer
MASTER_SITES = $(SF_MIRRORS)
+MASTER_SITES += http://sourceforge.net/code-snapshots/git/u/u/u/dmichelsen/tmux.git/
+DISTNAME = u-dmichelsen-tmux-2c4543b9e9bd38bcc45393dad94930bcde872e6c
DISTFILES = $(DISTNAME).tar.gz
-# From http://pkgbuild.svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/patches/
-PATCHFILES += tmux-01-include-netdb.h.diff
-#PATCHFILES += tmux-02-u-for-process-group.patch
+#PATCHFILES += 0001-Modifications-for-Solaris-to-use-fcntl-instead-of-fl.patch
-RUNTIME_DEP_PKGS = CSWlibevent2-0-5
-BUILD_DEP_PKGS = CSWlibevent-dev
+LICENSE = NOTES
-LICENSE = NOTES
VENDOR_URL = http://tmux.sourceforge.net
+BUILD_DEP_PKGS = CSWlibevent-dev
+
+RUNTIME_DEP_PKGS = CSWlibevent2-0-5
+
# EXTRA_CPPFLAGS += -I/opt/csw/include/ncursesw
#EXTRA_CPPFLAGS += -D__inline=inline
# Grabbed from Solaris 10 /usr/include/iso/math_c99.h
@@ -29,11 +31,12 @@
REINPLACE_FILES_tmuxconf += tmux.h
REINPLACE_FILES_tmuxconf += tmux.1
-# For LOCK_EX
-EXTRA_CPPFLAGS += -I/usr/ucbinclude
+# CONFIGURE_ENV_PATH = /opt/csw/gnu:$(PATH)
-CONFIGURE_ENV_PATH = /opt/csw/gnu:$(PATH)
-
PRESERVECONF += $(sysconfdir)/tmux.conf
include gar/category.mk
+
+post-extract:
+ cd $(WORKSRC) && ./autogen.sh
+ @$(MAKECOOKIE)
Modified: csw/mgar/pkg/tmux/trunk/checksums
===================================================================
--- csw/mgar/pkg/tmux/trunk/checksums 2013-04-21 08:25:14 UTC (rev 20830)
+++ csw/mgar/pkg/tmux/trunk/checksums 2013-04-21 08:29:06 UTC (rev 20831)
@@ -1 +1 @@
-2c48fb9beb22eedba7a5de3b78dd0c03 tmux-1.7.tar.gz
+21e790162540a85b45553ac3b1515c69 u-dmichelsen-tmux-2c4543b9e9bd38bcc45393dad94930bcde872e6c.tar.gz
Added: csw/mgar/pkg/tmux/trunk/files/0001-Include-of-paths.h-if-its-presence-has-been-detected.patch
===================================================================
--- csw/mgar/pkg/tmux/trunk/files/0001-Include-of-paths.h-if-its-presence-has-been-detected.patch (rev 0)
+++ csw/mgar/pkg/tmux/trunk/files/0001-Include-of-paths.h-if-its-presence-has-been-detected.patch 2013-04-21 08:29:06 UTC (rev 20831)
@@ -0,0 +1,26 @@
+From cf90a6dc2d12ebab373935cad8078ba6da87c57f Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Tue, 16 Apr 2013 13:47:14 +0200
+Subject: [PATCH 1/3] Include of paths.h if its presence has been detected
+
+---
+ tmux.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tmux.c b/tmux.c
+index e6de5cf..cb1dbb3 100644
+--- a/tmux.c
++++ b/tmux.c
+@@ -23,7 +23,9 @@
+ #include <event.h>
+ #include <fcntl.h>
+ #include <locale.h>
++#if HAVE_PATHS_H
+ #include <paths.h>
++#endif
+ #include <pwd.h>
+ #include <stdlib.h>
+ #include <string.h>
+--
+1.8.1.4
+
Added: csw/mgar/pkg/tmux/trunk/files/0002-Use-lockf-instead-of-flock-as-it-is-POSIX-compliant.patch
===================================================================
--- csw/mgar/pkg/tmux/trunk/files/0002-Use-lockf-instead-of-flock-as-it-is-POSIX-compliant.patch (rev 0)
+++ csw/mgar/pkg/tmux/trunk/files/0002-Use-lockf-instead-of-flock-as-it-is-POSIX-compliant.patch 2013-04-21 08:29:06 UTC (rev 20831)
@@ -0,0 +1,27 @@
+From 38aff72c66f79339d3878cb6f15d88847133a39a Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Tue, 16 Apr 2013 14:19:24 +0200
+Subject: [PATCH 2/3] Use lockf instead of flock as it is POSIX-compliant
+
+---
+ client.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/client.c b/client.c
+index 91f4765..691ace3 100644
+--- a/client.c
++++ b/client.c
+@@ -78,8 +78,8 @@ client_get_lock(char *lockfile)
+ if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1)
+ fatal("open failed");
+
+- if (flock(lockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK) {
+- while (flock(lockfd, LOCK_EX) == -1 && errno == EINTR)
++ if (lockf(lockfd, F_TLOCK, 0) == -1 && errno == EAGAIN) {
++ while (lockf(lockfd, F_LOCK, 0) == -1 && errno == EINTR)
+ /* nothing */;
+ close(lockfd);
+ return (-1);
+--
+1.8.1.4
+
Added: csw/mgar/pkg/tmux/trunk/files/0003-Provide-replacement-for-cfmakeraw.patch
===================================================================
--- csw/mgar/pkg/tmux/trunk/files/0003-Provide-replacement-for-cfmakeraw.patch (rev 0)
+++ csw/mgar/pkg/tmux/trunk/files/0003-Provide-replacement-for-cfmakeraw.patch 2013-04-21 08:29:06 UTC (rev 20831)
@@ -0,0 +1,110 @@
+From 841091e29096c14caa93cfeea14248652fb53e23 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 21 Apr 2013 10:27:11 +0200
+Subject: [PATCH 3/3] Provide replacement for cfmakeraw
+
+---
+ Makefile.am | 3 +++
+ compat.h | 5 +++++
+ compat/cfmakeraw.c | 32 ++++++++++++++++++++++++++++++++
+ configure.ac | 8 ++++++++
+ 4 files changed, 48 insertions(+)
+ create mode 100644 compat/cfmakeraw.c
+
+diff --git a/Makefile.am b/Makefile.am
+index 2ce54b1..475ff48 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -231,6 +231,9 @@ endif
+ if NO_B64_NTOP
+ nodist_tmux_SOURCES += compat/b64_ntop.c
+ endif
++if NO_CFMAKERAW
++nodist_tmux_SOURCES += compat/cfmakeraw.c
++endif
+
+ # Update SF web site.
+ upload-index.html: update-index.html
+diff --git a/compat.h b/compat.h
+index 622006e..d397379 100644
+--- a/compat.h
++++ b/compat.h
+@@ -236,6 +236,11 @@ int setenv(const char *, const char *, int);
+ int unsetenv(const char *);
+ #endif
+
++#ifndef HAVE_CFMAKERAW
++/* cfmakeraw.c */
++void cfmakeraw(struct termios *tio);
++#endif
++
+ #ifdef HAVE_GETOPT
+ #include <getopt.h>
+ #else
+diff --git a/compat/cfmakeraw.c b/compat/cfmakeraw.c
+new file mode 100644
+index 0000000..3f8dc7e
+--- /dev/null
++++ b/compat/cfmakeraw.c
+@@ -0,0 +1,32 @@
++/* $Id$ */
++
++/*
++ * Copyright (c) 2013 Dagobert Michelsen
++ * Copyright (c) 2013 Nicholas Marriott <nicm at users.sourceforge.net>
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
++ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include <string.h>
++
++#include "tmux.h"
++
++void
++cfmakeraw(struct termios *tio)
++{
++ tio->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
++ tio->c_oflag &= ~OPOST;
++ tio->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
++ tio->c_cflag &= ~(CSIZE|PARENB);
++ tio->c_cflag |= CS8;
++}
+diff --git a/configure.ac b/configure.ac
+index f00937f..3a2514b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -313,6 +313,13 @@ if test "x$found_strnvis" = xyes; then
+ fi
+ AM_CONDITIONAL(NO_VIS, [test "x$found_strnvis" = xno])
+
++# Look for cfmakeraw, compat/cfmakeraw.c used if missing.
++AC_CHECK_FUNC(cfmakeraw, found_cfmakeraw=yes, found_cfmakeraw=no)
++if test "x$found_cfmakeraw" = xyes; then
++ AC_DEFINE(HAVE_CFMAKERAW)
++fi
++AM_CONDITIONAL(NO_CFMAKERAW, [test "x$found_cfmakeraw" = xno])
++
+ # Look for getopt. glibc's getopt does not enforce argument order and the ways
+ # of making it do so are stupid, so just use our own instead.
+ AC_CHECK_FUNC(getopt, found_getopt=yes, found_getopt=no)
+@@ -345,6 +352,7 @@ AC_CHECK_FUNCS(
+ dirfd \
+ setproctitle \
+ sysconf \
++ cfmakeraw \
+ ]
+ )
+
+--
+1.8.1.4
+
Added: csw/mgar/pkg/tmux/trunk/files/mdoc2man.awk
===================================================================
--- csw/mgar/pkg/tmux/trunk/files/mdoc2man.awk (rev 0)
+++ csw/mgar/pkg/tmux/trunk/files/mdoc2man.awk 2013-04-21 08:29:06 UTC (rev 20831)
@@ -0,0 +1,328 @@
+#!/opt/csw/bin/gawk
+#
+# Copyright (c) 2003 Peter Stuge <stuge-mdoc2man at cdy.org>
+#
+# 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.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# Dramatically overhauled by Tim Kientzle. This version almost
+# handles library-style pages with Fn, Ft, etc commands. Still
+# a lot of problems...
+
+BEGIN {
+ displaylines = 0
+ trailer = ""
+ out = ""
+ sep = ""
+ nextsep = " "
+}
+
+# Add a word with appropriate preceding whitespace
+# Maintain a short queue of the expected upcoming word separators.
+function add(str) {
+ out=out sep str
+ sep = nextsep
+ nextsep = " "
+}
+
+# Add a word with no following whitespace
+# Use for opening punctuation such as '('
+function addopen(str) {
+ add(str)
+ sep = ""
+}
+
+# Add a word with no preceding whitespace
+# Use for closing punctuation such as ')' or '.'
+function addclose(str) {
+ sep = ""
+ add(str)
+}
+
+# Add a word with no space before or after
+# Use for separating punctuation such as '='
+function addpunct(str) {
+ sep = ""
+ add(str)
+ sep = ""
+}
+
+# Emit the current line so far
+function endline() {
+ addclose(trailer)
+ trailer = ""
+ if(length(out) > 0) {
+ print out
+ out=""
+ }
+ if(displaylines > 0) {
+ displaylines = displaylines - 1
+ if (displaylines == 0)
+ dispend()
+ }
+ # First word on next line has no preceding whitespace
+ sep = ""
+}
+
+function linecmd(cmd) {
+ endline()
+ add(cmd)
+ endline()
+}
+
+function breakline() {
+ linecmd(".br")
+}
+
+# Start an indented display
+function dispstart() {
+ linecmd(".RS")
+}
+
+# End an indented display
+function dispend() {
+ linecmd(".RE")
+}
+
+# Collect rest of input line
+function wtail() {
+ retval=""
+ while(w<nwords) {
+ if(length(retval))
+ retval=retval " "
+ retval=retval words[++w]
+ }
+ return retval
+}
+
+! /^\./ {
+ out = $0
+ endline()
+ next
+}
+
+/^\.\\"/ { next }
+
+{
+ sub("^\\.","")
+ nwords=split($0,words)
+ # TODO: Instead of iterating 'w' over the array, have a separate
+ # function that returns 'next word' and use that. This will allow
+ # proper handling of double-quoted arguments as well.
+ for(w=1;w<=nwords;w++) {
+ if(match(words[w],"^Li$")) { # Literal; rest of line is unformatted
+ dispstart()
+ displaylines = 1
+ } else if(match(words[w],"^Dl$")) { # Display literal
+ dispstart()
+ displaylines = 1
+ } else if(match(words[w],"^Bd$")) { # Begin display
+ if(match(words[w+1],"-literal")) {
+ dispstart()
+ displaylines=10000
+ w=nwords
+ }
+ } else if(match(words[w],"^Ed$")) { # End display
+ displaylines = 0
+ dispend()
+ } else if(match(words[w],"^Ns$")) { # Suppress space after next word
+ nextsep = ""
+ } else if(match(words[w],"^No$")) { # Normal text
+ add(words[++w])
+ } else if(match(words[w],"^Dq$")) { # Quote
+ addopen("``")
+ add(words[++w])
+ while(w<nwords&&!match(words[w+1],"^[\\.,]"))
+ add(words[++w])
+ addclose("''")
+ } else if(match(words[w],"^Oo$")) {
+ addopen("[")
+ } else if(match(words[w],"^Oc$")) {
+ addclose("]")
+ } else if(match(words[w],"^Ao$")) {
+ addopen("<")
+ } else if(match(words[w],"^Ac$")) {
+ addclose(">")
+ } else if(match(words[w],"^Dd$")) {
+ date=wtail()
+ next
+ } else if(match(words[w],"^Dt$")) {
+ id=wtail()
+ next
+ } else if(match(words[w],"^Ox$")) {
+ add("OpenBSD")
+ } else if(match(words[w],"^Fx$")) {
+ add("FreeBSD")
+ } else if(match(words[w],"^Nx$")) {
+ add("NetBSD")
+ } else if(match(words[w],"^St$")) {
+ if (match(words[w+1], "^-p1003.1$")) {
+ w++
+ add("IEEE Std 1003.1 (``POSIX.1'')")
+ } else if(match(words[w+1], "^-p1003.1-96$")) {
+ w++
+ add("ISO/IEC 9945-1:1996 (``POSIX.1'')")
+ } else if(match(words[w+1], "^-p1003.1-88$")) {
+ w++
+ add("IEEE Std 1003.1-1988 (``POSIX.1'')")
+ } else if(match(words[w+1], "^-p1003.1-2001$")) {
+ w++
+ add("IEEE Std 1003.1-2001 (``POSIX.1'')")
+ } else if(match(words[w+1], "^-susv2$")) {
+ w++
+ add("Version 2 of the Single UNIX Specification (``SUSv2'')")
+ }
+ } else if(match(words[w],"^Ex$")) {
+ if (match(words[w+1], "^-std$")) {
+ w++
+ add("The \\fB" name "\\fP utility exits 0 on success, and >0 if an error occurs.")
+ }
+ } else if(match(words[w],"^Os$")) {
+ add(".TH " id " \"" date "\" \"" wtail() "\"")
+ } else if(match(words[w],"^Sh$")) {
+ add(".SH")
+ section=words[w+1]
+ } else if(match(words[w],"^Xr$")) {
+ add("\\fB" words[++w] "\\fP(" words[++w] ")" words[++w])
+ } else if(match(words[w],"^Nm$")) {
+ if(match(section,"SYNOPSIS"))
+ breakline()
+ if(w>1)
+ n=name
+ else {
+ n=words[++w]
+ if(!length(name))
+ name=n
+ }
+ if(!length(n))
+ n=name
+ add("\\fB" n "\\fP")
+ } else if(match(words[w],"^Nd$")) {
+ add("\\- " wtail())
+ } else if(match(words[w],"^Fl$")) {
+ add("\\fB\\-" words[++w] "\\fP")
+ } else if(match(words[w],"^Ar$")) {
+ addopen("\\fI")
+ if(w==nwords)
+ add("file ...\\fP")
+ else {
+ add(words[++w] "\\fP")
+ while(match(words[w+1],"^\\|$"))
+ add(words[++w] " \\fI" words[++w] "\\fP")
+ }
+ } else if(match(words[w],"^Cm$")) {
+ add("\\fB" words[++w] "\\fP")
+ } else if(match(words[w],"^Op$")) {
+ addopen("[")
+ option=1
+ trailer="]" trailer
+ } else if(match(words[w],"^Pp$")) {
+ endline()
+ } else if(match(words[w],"^An$")) {
+ endline()
+ } else if(match(words[w],"^Ss$")) {
+ add(".SS")
+ } else if(match(words[w],"^Ft$")) {
+ addopen("\\fI")
+ trailer = "\\fP" trailer
+ displaylines = 1
+ } else if(match(words[w],"^Fn$")) {
+ # Using '.nh' to suppress hyphenation doesn't really work...
+ # TODO: Fix this.
+ add(".nh")
+ endline()
+ addopen("\\fB")
+ w++
+ add(words[w])
+ addclose("\\fP")
+ endline()
+ add(".hy")
+ endline()
+ addpunct("(")
+ # This is broken; Fn should peek ahead and put each double-quoted
+ # arg in .Ty and be smarter about following punct.
+ trailer = ");" trailer
+ } else if(match(words[w],"^Va$")) {
+ w++
+ add("\\fI" words[w] "\\fP")
+ } else if(match(words[w],"^In$")) {
+ w++
+ add("\\fB#include <" words[w] ">\\fP")
+ breakline()
+ } else if(match(words[w],"^Pa$")) {
+ addopen("\\fI")
+ w++
+ if(match(words[w],"^\\."))
+ add("\\&")
+ add(words[w] "\\fP")
+ } else if(match(words[w],"^Dv$")) {
+ add(".BR")
+ } else if(match(words[w],"^Em|Ev$")) {
+ add(".IR")
+ } else if(match(words[w],"^Pq$")) {
+ addopen("(")
+ trailer=")" trailer
+ } else if(match(words[w],"^Aq$")) {
+ addopen("<")
+ trailer=">" trailer
+ } else if(match(words[w],"^Brq$")) {
+ addopen("{")
+ trailer="}" trailer
+ } else if(match(words[w],"^S[xy]$")) {
+ add(".B " wtail())
+ } else if(match(words[w],"^Ic$")) {
+ add("\\fB")
+ trailer="\\fP" trailer
+ } else if(match(words[w],"^Bl$")) {
+ oldoptlist=optlist
+ if(match(words[w+1],"-bullet"))
+ optlist=1
+ else if(match(words[w+1],"-enum")) {
+ optlist=2
+ enum=0
+ } else if(match(words[w+1],"-tag"))
+ optlist=3
+ else if(match(words[w+1],"-item"))
+ optlist=4
+ else if(match(words[w+1],"-bullet"))
+ optlist=1
+ w=nwords
+ } else if(match(words[w],"^El$")) {
+ optlist=oldoptlist
+ } else if(match(words[w],"^It$")&&optlist) {
+ if(optlist==1)
+ add(".IP \\(bu")
+ else if(optlist==2)
+ add(".IP " ++enum ".")
+ else if(optlist==3) {
+ add(".TP")
+ endline()
+ if(match(words[w+1],"^Pa$|^Ev$")) {
+ add(".B")
+ w++
+ }
+ } else if(optlist==4)
+ add(".IP")
+ } else if(match(words[w],"^[=]$")) {
+ addpunct(words[w])
+ } else if(match(words[w],"^[\[{(]$")) {
+ addopen(words[w])
+ } else if(match(words[w],"^[\\\])}.,;:]$")) {
+ addclose(words[w])
+ } else {
+ add(words[w])
+ }
+ }
+ if(match(out,"^\\.[^a-zA-Z]"))
+ sub("^\\.","",out)
+ endline()
+}
Property changes on: csw/mgar/pkg/tmux/trunk/files/mdoc2man.awk
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list