mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
fish-shell: fix cross building
This commit is contained in:
parent
ce915a215b
commit
7da249e60f
2 changed files with 155 additions and 1 deletions
141
srcpkgs/fish-shell/files/no-glibc-check.patch
Normal file
141
srcpkgs/fish-shell/files/no-glibc-check.patch
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
Remove configure tests which fail when cross building.
|
||||||
|
|
||||||
|
--- configure.ac.orig 2015-09-09 21:49:50.021403972 +0200
|
||||||
|
+++ configure.ac 2015-09-09 21:50:04.759403929 +0200
|
||||||
|
@@ -226,49 +226,6 @@
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
-# If we are compiling against glibc, set some flags to work around
|
||||||
|
-# some rather stupid attempts to hide prototypes for *wprintf
|
||||||
|
-# functions, as well as prototypes of various gnu extensions.
|
||||||
|
-#
|
||||||
|
-
|
||||||
|
-AC_MSG_CHECKING([if we are compiling against glibc])
|
||||||
|
-AC_RUN_IFELSE(
|
||||||
|
- [
|
||||||
|
- AC_LANG_PROGRAM(
|
||||||
|
- [
|
||||||
|
- #include <stdlib.h>
|
||||||
|
- #ifdef __GLIBC__
|
||||||
|
- #define STATUS 0
|
||||||
|
- #else
|
||||||
|
- #define STATUS 1
|
||||||
|
- #endif
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- return STATUS;
|
||||||
|
- ]
|
||||||
|
- )
|
||||||
|
- ],
|
||||||
|
- [glibc=yes],
|
||||||
|
- [glibc=no]
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
-if test "$glibc" = yes; then
|
||||||
|
- AC_MSG_RESULT(yes)
|
||||||
|
-
|
||||||
|
- #
|
||||||
|
- # This gives us access to prototypes for gnu extensions and C99
|
||||||
|
- # functions if we are compiling agains glibc. All GNU extensions
|
||||||
|
- # that are used must have a fallback implementation available in
|
||||||
|
- # fallback.h, in order to keep fish working on non-gnu platforms.
|
||||||
|
- #
|
||||||
|
-
|
||||||
|
- CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE=1 -D_ISO99_SOURCE=1"
|
||||||
|
-else
|
||||||
|
- AC_MSG_RESULT(no)
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-#
|
||||||
|
# Test cpu for special handling of ppc
|
||||||
|
#
|
||||||
|
# This is used to skip use of tputs on ppc systems, since it seemed to
|
||||||
|
@@ -537,44 +494,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
-# Check if realpath accepts null for its second argument
|
||||||
|
-#
|
||||||
|
-
|
||||||
|
-AC_MSG_CHECKING([if realpath accepts null for its second argument])
|
||||||
|
-AC_RUN_IFELSE(
|
||||||
|
- [
|
||||||
|
- AC_LANG_PROGRAM(
|
||||||
|
- [
|
||||||
|
- #include <limits.h>
|
||||||
|
- #include <errno.h>
|
||||||
|
- #include <stdlib.h>
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- int status;
|
||||||
|
- char *res;
|
||||||
|
- res = realpath( "somefile", 0 );
|
||||||
|
- status = !(res != 0 || errno == ENOENT);
|
||||||
|
- exit( status );
|
||||||
|
- ]
|
||||||
|
- )
|
||||||
|
- ],
|
||||||
|
- [have_realpath_null=yes],
|
||||||
|
- [have_realpath_null=no]
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
-if test "$have_realpath_null" = yes; then
|
||||||
|
- AC_MSG_RESULT(yes)
|
||||||
|
- AC_DEFINE(
|
||||||
|
- [HAVE_REALPATH_NULL],
|
||||||
|
- [1],
|
||||||
|
- [Define to 1 if realpath accepts null for its second argument.]
|
||||||
|
- )
|
||||||
|
-else
|
||||||
|
- AC_MSG_RESULT(no)
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-#
|
||||||
|
# Check if struct winsize and TIOCGWINSZ exist
|
||||||
|
#
|
||||||
|
|
||||||
|
@@ -607,41 +526,6 @@
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
-#
|
||||||
|
-# If we have a fwprintf in libc, test that it actually works. As of
|
||||||
|
-# March 2006, it is broken under DragonFly BSD.
|
||||||
|
-#
|
||||||
|
-
|
||||||
|
-if test "$ac_cv_func_fwprintf" = yes; then
|
||||||
|
-
|
||||||
|
- AC_MSG_CHECKING([if fwprintf is broken])
|
||||||
|
- AC_RUN_IFELSE(
|
||||||
|
- [
|
||||||
|
- AC_LANG_PROGRAM(
|
||||||
|
- [
|
||||||
|
- #include <stdlib.h>
|
||||||
|
- #include <stdio.h>
|
||||||
|
- #include <locale.h>
|
||||||
|
- #include <wchar.h>
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- setlocale( LC_ALL, "" );
|
||||||
|
- fwprintf( stderr, L"%ls%ls", L"", L"fish:" );
|
||||||
|
- ]
|
||||||
|
- )
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- AC_MSG_RESULT(no)
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- AC_MSG_RESULT([yes])
|
||||||
|
- AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1], [Define to 1 one if the implemented fwprintf is broken])
|
||||||
|
- ]
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-
|
||||||
|
# Check for _nl_msg_cat_cntr symbol
|
||||||
|
AC_MSG_CHECKING([for _nl_msg_cat_cntr symbol])
|
||||||
|
AC_TRY_LINK(
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'fish-shell'
|
# Template file for 'fish-shell'
|
||||||
pkgname=fish-shell
|
pkgname=fish-shell
|
||||||
version=2.2.0
|
version=2.2.0
|
||||||
revision=2
|
revision=3
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="automake"
|
hostmakedepends="automake"
|
||||||
makedepends="ncurses-devel"
|
makedepends="ncurses-devel"
|
||||||
|
@ -15,6 +15,19 @@ short_desc="User friendly shell intended mostly for interactive use"
|
||||||
distfiles="http://fishshell.com/files/${version}/fish-${version}.tar.gz"
|
distfiles="http://fishshell.com/files/${version}/fish-${version}.tar.gz"
|
||||||
checksum=a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a
|
checksum=a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a
|
||||||
|
|
||||||
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) # Nothing to add
|
||||||
|
;;
|
||||||
|
*) # Add CXXFLAGS required for glibc
|
||||||
|
CXXFLAGS="-D_GNU_SOURCE=1 -D_ISO99_SOURCE=1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
export ac_cv_file__proc_self_stat=yes
|
||||||
|
fi
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
|
patch -p0 < ${FILESDIR}/no-glibc-check.patch
|
||||||
|
fi
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue