diff --git a/app-shells/fish/fish-2.2.0.recipe b/app-shells/fish/fish-2.2.0.recipe new file mode 100644 index 000000000..6c37d3132 --- /dev/null +++ b/app-shells/fish/fish-2.2.0.recipe @@ -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-20009 Axel Liljencrantz" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/fish-shell/fish-shell/releases/download/2.2.0/fish-2.2.0.tar.gz" +CHECKSUM_SHA256="a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a" +PATCHES="fish-2.2.0.patch" + +ARCHITECTURES="!x86_gcc2 x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + fish$secondaryArchSuffix = $portVersion + cmd:fish$secondaryArchSuffix = $portVersion + cmd:fish_indent$secondaryArchSuffix = $portVersion + cmd:fish_pager$secondaryArchSuffix = $portVersion + cmd:fishd$secondaryArchSuffix = $portVersion + cmd:mimedb$secondaryArchSuffix = $portVersion + cmd:set_color$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libncurses$secondaryArchSuffix + lib:libgettextlib_0.18.1$secondaryArchSuffix >= 0.18.1.1 + lib:libintl$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libiconv$secondaryArchSuffix + devel:libncurses$secondaryArchSuffix >= 5.9 + devel:libgettextlib$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:libtoolize + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:which + cmd:sed + #cmd:doxygen >= 1.6.3 + " + +GLOBAL_WRITABLE_FILES=" + settings/fish/config.fish keep-old +" + +BUILD() +{ + libtoolize --force --copy --install + autoconf + runConfigure ./configure + #FIXME! The hack in configure.ac doesn’t work. + sed -i -e '/-rdynamic/d' Makefile + #FIXME! The hack in configure.ac doesn’t work. + make +} + +INSTALL() +{ + make install +} + +TEST() +{ + make test +} \ No newline at end of file diff --git a/app-shells/fish/patches/fish-2.2.0.patch b/app-shells/fish/patches/fish-2.2.0.patch new file mode 100644 index 000000000..0ad28de38 --- /dev/null +++ b/app-shells/fish/patches/fish-2.2.0.patch @@ -0,0 +1,103 @@ +diff -ur a/configure.ac b/configure.ac +--- a/configure.ac 2015-07-03 19:46:59.002359296 +0000 ++++ b/configure.ac 2015-08-29 17:09:39.068157440 +0000 +@@ -211,7 +211,13 @@ + # + + if test `uname` != "Darwin"; then +- LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic" ++ case $target_os in ++ haiku*) ++ ;; ++ *) ++ LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic" ++ ;; ++ esac + fi + + # +@@ -349,7 +355,7 @@ + # + + # 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, network socket, , [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 -ur a/env_universal_common.cpp b/env_universal_common.cpp +--- a/env_universal_common.cpp 2015-07-03 19:46:59.011534336 +0000 ++++ b/env_universal_common.cpp 2015-08-29 16:48:54.951844864 +0000 +@@ -36,6 +36,10 @@ + #include + #endif + ++#ifdef __HAIKU__ ++#include ++#endif ++ + // NAME_MAX is not defined on Solaris and suggests the use of pathconf() + // There is no obvious sensible pathconf() for shared memory and _XPG_NAME_MAX + // seems a reasonable choice. +@@ -982,7 +986,7 @@ + /* Thanks to Jan Brittenson + http://lists.apple.com/archives/xcode-users/2009/May/msg00062.html + */ +-#ifdef SIOCGIFHWADDR ++#if defined (SIOCGIFHWADDR) && ! defined (__HAIKU__) + + /* Linux */ + #include +@@ -1005,7 +1009,7 @@ + return result; + } + +-#elif defined(HAVE_GETIFADDRS) ++#elif defined(HAVE_GETIFADDRS) && ! defined (__HAIKU__) + + /* OS X and BSD */ + #include +@@ -1102,6 +1106,10 @@ + #define SHMEM_MAGIC_NUMBER 0xF154 + #define SHMEM_VERSION_CURRENT 1000 + ++#ifndef MAP_FILE ++#define MAP_FILE 0 ++#endif ++ + private: + long long last_change_time; + uint32_t last_seed; + +diff -ur a/intern.cpp b/intern.cpp +--- a/intern.cpp 2015-07-03 19:46:59.016777216 +0000 ++++ b/intern.cpp 2015-08-29 16:54:24.978321408 +0000 +@@ -20,6 +20,10 @@ + #include "common.h" + #include "intern.h" + ++#ifdef __HAIKU__ ++#include ++#endif ++ + /** Comparison function for intern'd strings */ + class string_table_compare_t + { + +diff -ur a/iothread.cpp b/iothread.cpp +--- a/iothread.cpp 2015-07-03 19:46:59.017039360 +0000 ++++ b/iothread.cpp 2015-08-29 16:58:04.486801408 +0000 +@@ -12,6 +12,12 @@ + #include + #include + ++#ifdef __HAIKU__ ++#include ++#include ++#include ++#endif ++ + #ifdef _POSIX_THREAD_THREADS_MAX + #if _POSIX_THREAD_THREADS_MAX < 64 + #define IO_MAX_THREADS _POSIX_THREAD_THREADS_MAX \ No newline at end of file