Updated recipe (#776)

Fix

Fixes
This commit is contained in:
miqlas
2016-08-21 21:53:15 +02:00
committed by waddlesplash
parent a195721b7c
commit 52a1ef5d76
2 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
SUMMARY="The friendly interactive shell"
DESCRIPTION="Fish is a shell geared towards interactive use. Its features are \
focused on user friendliness and discoverability. The language syntax \
is simple but incompatible with other shell languages."
HOMEPAGE="http://ridiculousfish.com/shell/"
COPYRIGHT="2005-2016 Axel Liljencrantz"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/fish-shell/fish-shell/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="459ab0cec5b936a3db28b437c649c3606baa12362c399a86fa2e07df2920818d"
SOURCE_DIR="fish-shell-$portVersion"
PATCHES="fish-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
fish$secondaryArchSuffix = $portVersion
cmd:fish$secondaryArchSuffix = $portVersion
cmd:fish_indent$secondaryArchSuffix = $portVersion
cmd:fish_key_reader$secondaryArchSuffix = $portVersion
#cmd:mimedb$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libexecinfo$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
#lib:libpcre2_32$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libexecinfo$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libgettextlib$secondaryArchSuffix
#devel:libpcre2_32$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:which
cmd:sed
#cmd:doxygen >= 1.6.3
"
GLOBAL_WRITABLE_FILES="
settings/fish/config.fish keep-old
"
BUILD()
{
autoreconf -vfi
CFLAGS=-D_BSD_SOURCE runConfigure ./configure
make
}
INSTALL()
{
make install
}
TEST()
{
make test
}

View File

@@ -0,0 +1,74 @@
From 26e77664981aeb65b1327dc8fbc9f0a621bff84a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 18 Aug 2016 20:50:04 +0200
Subject: [PATCH] Haiku fix
---
configure.ac | 2 +-
share/tools/web_config/webconfig.py | 5 ++++-
src/env_universal_common.cpp | 13 +++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2d60a9a..feb43ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -355,7 +355,7 @@ AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict w
#
# Check for os dependant libraries for all binaries.
-AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
+AC_SEARCH_LIBS( connect, socket network, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( shm_open, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
index ee51744..4418bcb 100755
--- a/share/tools/web_config/webconfig.py
+++ b/share/tools/web_config/webconfig.py
@@ -20,7 +20,10 @@ else:
from urllib.parse import parse_qs
# Check to see if IPv6 is enabled in the kernel
-HAS_IPV6 = True
+# Not working in Haiku. FIXME!
+#HAS_IPV6 = True
+HAS_IPV6 = False
+# FIXME!
try:
s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s.close()
diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp
index 290975c..bcbb65a 100644
--- a/src/env_universal_common.cpp
+++ b/src/env_universal_common.cpp
@@ -9,6 +9,15 @@
#include "env_universal_common.h"
+#ifdef __HAIKU__
+#define _BSD_SOURCE
+
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
+#endif //Haiku
+
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
@@ -1072,7 +1081,11 @@ static bool get_mac_address(unsigned char macaddr[MAC_ADDRESS_MAX_LEN], const ch
{
for (const ifaddrs *p = ifap; p; p = p->ifa_next)
{
+ #ifndef __HAIKU__
if (p->ifa_addr->sa_family == AF_LINK)
+ #else
+ if (p->ifa_addr && p->ifa_addr->sa_family == AF_LINK)
+ #endif
{
if (p->ifa_name && p->ifa_name[0] &&
! strcmp((const char*)p->ifa_name, interface))
--
2.7.0