SF.net SVN: gar:[22497] csw/mgar/pkg
guengel at users.sourceforge.net
guengel at users.sourceforge.net
Thu Nov 14 12:07:43 CET 2013
Revision: 22497
http://gar.svn.sourceforge.net/gar/?rev=22497&view=rev
Author: guengel
Date: 2013-11-14 11:07:41 +0000 (Thu, 14 Nov 2013)
Log Message:
-----------
fish/trunk: Compilation seems fine. Link throws error, though.
Added Paths:
-----------
csw/mgar/pkg/fish/
csw/mgar/pkg/fish/Makefile
csw/mgar/pkg/fish/branches/
csw/mgar/pkg/fish/tags/
csw/mgar/pkg/fish/trunk/
csw/mgar/pkg/fish/trunk/Makefile
csw/mgar/pkg/fish/trunk/checksums
csw/mgar/pkg/fish/trunk/files/
csw/mgar/pkg/fish/trunk/files/0002-Patch-for-dirfd-on-Solaris-10.patch
csw/mgar/pkg/fish/trunk/files/0003-LinuxSoft-patch-1.patch
csw/mgar/pkg/fish/trunk/files/0004-LinuxSoft-patch-2.patch
csw/mgar/pkg/fish/trunk/files/0005-Include-strings.h-to-make-bzero-available.patch
csw/mgar/pkg/fish/trunk/files/0006-Include-strings.h-to-make-bzero-available-2.patch
Added: csw/mgar/pkg/fish/Makefile
===================================================================
--- csw/mgar/pkg/fish/Makefile (rev 0)
+++ csw/mgar/pkg/fish/Makefile 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,2 @@
+%:
+ $(MAKE) -C trunk $*
Property changes on: csw/mgar/pkg/fish/trunk
___________________________________________________________________
Added: svn:ignore
+ work
Added: csw/mgar/pkg/fish/trunk/Makefile
===================================================================
--- csw/mgar/pkg/fish/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/fish/trunk/Makefile 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,41 @@
+# $Id$
+# TODO (release-critical prefixed with !, non release-critical with *)
+#
+NAME = fish
+VERSION = 2.1.0
+GARTYPE = v2
+
+GARCOMPILER = GNU
+
+DESCRIPTION = Brief description
+define BLURB
+ Long description
+endef
+
+MASTER_SITES = http://fishshell.com/files/$(VERSION)/
+DISTFILES = $(DISTNAME).tar.gz
+
+PATCHFILES += 0002-Patch-for-dirfd-on-Solaris-10.patch
+PATCHFILES += 0003-LinuxSoft-patch-1.patch
+PATCHFILES += 0004-LinuxSoft-patch-2.patch
+PATCHFILES += 0005-Include-strings.h-to-make-bzero-available.patch
+PATCHFILES += 0006-Include-strings.h-to-make-bzero-available-2.patch
+
+EXTRA_CPPFLAGS = -I$(includedir)/ncurses
+
+EXTRA_CONFIGURE_EXPORTS += MAKE
+CONFIGURE_ENV_MAKE = gmake
+
+CONFIGURE_ARGS = $(DIRPATHS)
+
+REINPLACE_MATCH = \#!/bin/sh
+REINPLACE_WITH = \#!/bin/bash
+REINPLACE_FILES = build_tools/git_version_gen.sh
+
+include gar/category.mk
+
+PATH := $(prefix)/gnu:$(PATH)
+
+pre-configure:
+ cd $(WORKSRC) && autoreconf -fi
+ @$(MAKECOOKIE)
Property changes on: csw/mgar/pkg/fish/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: csw/mgar/pkg/fish/trunk/checksums
===================================================================
--- csw/mgar/pkg/fish/trunk/checksums (rev 0)
+++ csw/mgar/pkg/fish/trunk/checksums 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1 @@
+3a29aebde522b8f52d9975d7423db99e fish-2.1.0.tar.gz
Added: csw/mgar/pkg/fish/trunk/files/0002-Patch-for-dirfd-on-Solaris-10.patch
===================================================================
--- csw/mgar/pkg/fish/trunk/files/0002-Patch-for-dirfd-on-Solaris-10.patch (rev 0)
+++ csw/mgar/pkg/fish/trunk/files/0002-Patch-for-dirfd-on-Solaris-10.patch 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,54 @@
+From 8f1c8fda824f925f166294407a98ad19564a7bdd Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Thu, 14 Nov 2013 10:58:14 +0100
+Subject: [PATCH] Patch for dirfd() on Solaris 10
+
+---
+ configure.ac | 1 +
+ highlight.cpp | 11 +++++++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index ea7c592..ebaf2d2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -699,6 +699,7 @@ AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp fwprintf )
+ AC_CHECK_FUNCS( futimes wcwidth wcswidth wcstok fputwc fgetwc )
+ AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg )
+ AC_CHECK_FUNCS( backtrace backtrace_symbols sysconf getifaddrs )
++AC_CHECK_FUNCS( dirfd )
+
+ if test x$local_gettext != xno; then
+ AC_CHECK_FUNCS( gettext dcgettext )
+diff --git a/highlight.cpp b/highlight.cpp
+index fd5ffb7..962023a 100644
+--- a/highlight.cpp
++++ b/highlight.cpp
+@@ -12,6 +12,8 @@
+ #include <wctype.h>
+ #include <termios.h>
+ #include <signal.h>
++// dirfd() defined in dirent.h on Solaris 11
++#include <dirent.h>
+
+ #include "fallback.h"
+ #include "util.h"
+@@ -35,6 +37,15 @@
+ #include "path.h"
+ #include "history.h"
+
++#if !defined(HAVE_DIRFD)
++# if defined(sun)
++# if !defined(__XOPEN_OR_POSIX)
++# define dirfd(d) (d->dd_fd)
++# else // !defined(__XOPEN_OR_POSIX)
++# define dirfd(d) (d->d_fd)
++# endif // !defined(__XOPEN_OR_POSIX)
++# endif // defined(sun)
++#endif // !defined(HAVE_DIRFD)
+ /**
+ Number of elements in the highlight_var array
+ */
+--
+1.8.4.1
+
Added: csw/mgar/pkg/fish/trunk/files/0003-LinuxSoft-patch-1.patch
===================================================================
--- csw/mgar/pkg/fish/trunk/files/0003-LinuxSoft-patch-1.patch (rev 0)
+++ csw/mgar/pkg/fish/trunk/files/0003-LinuxSoft-patch-1.patch 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,62 @@
+From 3f6f10d210d2c7826f74a95d4c6ea4403bfa957a Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Thu, 14 Nov 2013 11:31:29 +0100
+Subject: [PATCH] LinuxSoft patch #1
+
+---
+ configure.ac | 1 +
+ wutil.cpp | 21 +++++++++++++++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index ebaf2d2..4e206ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -716,6 +716,7 @@ fi
+ # features that Autoconf doesn't tell us about
+ #
+
++AC_CHECK_MEMBERS(struct dirent.d_type)
+
+ #
+ # Check if realpath accepts null for its second argument
+diff --git a/wutil.cpp b/wutil.cpp
+index 3f70368..99da36d 100644
+--- a/wutil.cpp
++++ b/wutil.cpp
+@@ -76,11 +76,32 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou
+ {
+ /* The caller cares if this is a directory, so check */
+ bool is_dir;
++#if !defined(HAVE_STRUCT_DIRENT_D_TYPE)
++ // Construct full path in order to use lstat() on it
++ cstring tmp_fullpath = wcs2string(dir_path);
++ tmp_fullpath.push_back('/');
++ tmp_fullpath.append(d->d_name);
++
++ struct stat tmp_buf;
++ // I use lstat() to blend in existing code
++ if (lstat(tmp_fullpath.c_str(), &tmp_buf) != 0)
++ {
++ *out_is_dir = false;
++ return true;
++ }
++ if (S_ISDIR(tmp_buf.st_mode))
++#else // !defined(HAVE_DIRENT_D_TYPE)
+ if (d->d_type == DT_DIR)
++#endif
+ {
+ is_dir = true;
+ }
++#if !defined(HAVE_STRUCT_DIRENT_D_TYPE)
++ // Don't know how to emulate DT_UNKNOWN
++ else if (S_ISLNK(tmp_buf.st_mode))
++#else // !defined(HAVE_DIRENT_D_TYPE)
+ else if (d->d_type == DT_LNK || d->d_type == DT_UNKNOWN)
++#endif
+ {
+ /* We want to treat symlinks to directories as directories. Use stat to resolve it. */
+ cstring fullpath = wcs2string(dir_path);
+--
+1.8.4.1
+
Added: csw/mgar/pkg/fish/trunk/files/0004-LinuxSoft-patch-2.patch
===================================================================
--- csw/mgar/pkg/fish/trunk/files/0004-LinuxSoft-patch-2.patch (rev 0)
+++ csw/mgar/pkg/fish/trunk/files/0004-LinuxSoft-patch-2.patch 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,29 @@
+From 82f51a55df0f746c899c5410ef9575dc6cfe4699 Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Thu, 14 Nov 2013 11:51:32 +0100
+Subject: [PATCH] LinuxSoft patch #2
+
+---
+ wutil.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/wutil.cpp b/wutil.cpp
+index 042a7c5..28f9fc4 100644
+--- a/wutil.cpp
++++ b/wutil.cpp
+@@ -340,9 +340,11 @@ static inline void safe_append(char *buffer, const char *s, size_t buffsize)
+
+ const char *safe_strerror(int err)
+ {
+-#if defined(__UCLIBC__)
++#if defined(__UCLIBC__) || defined(sun)
+ // uClibc does not have sys_errlist, however, its strerror is believed to be async-safe
+ // See #808
++ //
++ // As for the Solaris strerror(): man page neither confirms nor denies async-safeness.
+ return strerror(err);
+ #else
+ if (err >= 0 && err < sys_nerr && sys_errlist[err] != NULL)
+--
+1.8.4.1
+
Added: csw/mgar/pkg/fish/trunk/files/0005-Include-strings.h-to-make-bzero-available.patch
===================================================================
--- csw/mgar/pkg/fish/trunk/files/0005-Include-strings.h-to-make-bzero-available.patch (rev 0)
+++ csw/mgar/pkg/fish/trunk/files/0005-Include-strings.h-to-make-bzero-available.patch 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,27 @@
+From 79db4046ad5135b305bb476c182ddf6dfda35be0 Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Thu, 14 Nov 2013 11:57:17 +0100
+Subject: [PATCH] Include strings.h to make bzero() available
+
+---
+ common.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/common.cpp b/common.cpp
+index 7a9f7a5..a95aad8 100644
+--- a/common.cpp
++++ b/common.cpp
+@@ -17,6 +17,10 @@ parts of fish.
+ #include <siginfo.h>
+ #endif
+
++#if defined(sun)
++// Required for bzero()
++#include <strings.h>
++#endif
+ #include <stdlib.h>
+ #include <termios.h>
+ #include <wchar.h>
+--
+1.8.4.1
+
Added: csw/mgar/pkg/fish/trunk/files/0006-Include-strings.h-to-make-bzero-available-2.patch
===================================================================
--- csw/mgar/pkg/fish/trunk/files/0006-Include-strings.h-to-make-bzero-available-2.patch (rev 0)
+++ csw/mgar/pkg/fish/trunk/files/0006-Include-strings.h-to-make-bzero-available-2.patch 2013-11-14 11:07:41 UTC (rev 22497)
@@ -0,0 +1,28 @@
+From 2a15a294b34a2f2f2fcb78dc9ac2d6b389268b21 Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Thu, 14 Nov 2013 12:03:09 +0100
+Subject: [PATCH] Include strings.h to make bzero() available #2
+
+---
+ color.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/color.cpp b/color.cpp
+index 884410d..3ecc242 100644
+--- a/color.cpp
++++ b/color.cpp
+@@ -4,6 +4,11 @@
+ #include "color.h"
+ #include "fallback.h"
+
++#if defined(sun)
++// Required for bzero()
++#include <strings.h>
++#endif
++
+ bool rgb_color_t::try_parse_special(const wcstring &special)
+ {
+ bzero(&data, sizeof data);
+--
+1.8.4.1
+
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