diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-03 20:44:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-03 20:45:28 +0200 |
commit | 17503c1de144fd5afcbfa23796c3d92a5f1cfde6 (patch) | |
tree | ca4749984b9cea7d93db5b30d4032b2ded0ba08e /package/skalibs/patches/patch-configure | |
parent | 85f641f2252073f492fe356b5130e5c1fc1f8d32 (diff) |
add basic support for s6 init system
Diffstat (limited to 'package/skalibs/patches/patch-configure')
-rw-r--r-- | package/skalibs/patches/patch-configure | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/package/skalibs/patches/patch-configure b/package/skalibs/patches/patch-configure new file mode 100644 index 000000000..bfd291622 --- /dev/null +++ b/package/skalibs/patches/patch-configure @@ -0,0 +1,58 @@ +--- skalibs-2.3.10.0.orig/configure 2016-03-19 16:04:58.000000000 +0100 ++++ skalibs-2.3.10.0/configure 2016-09-03 17:23:41.494368249 +0200 +@@ -154,10 +154,28 @@ choose () { + + trytypesize() { + echo "Checking size of $3..." +- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 src/sysdeps/trysizeof$1.c +- type_size=$(./trysizeof$1) || fail "$0: unable to determine size of $3" ++ r=false ++ type_size=0 ++ while true; do ++ cat<<EOF>trysizeof$1.c ++#include <sys/types.h> ++ ++int main(void) ++{ ++ static int v = 1 / !!((sizeof($3) == $type_size)); ++ return 0; ++} ++EOF ++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 trysizeof$1.c 2>/dev/null; then ++ r=true ++ break ++ fi ++ type_size=$(expr $type_size + 1) ++ test $type_size -le 16 || break ++ done ++ test $r = true || fail "$0: unable to determine size of $3" + type_bits=$(expr 8 \* $type_size) +- rm -f trysizeof$1 ++ rm -f trysizeof$1 trysizeof$1.c + echo "sizeof$1: $type_size" >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_SIZEOF$2 $type_size" >> $sysdeps/sysdeps.h + echo "#define ${package_macro_name}_$2_BITS $type_bits" >> $sysdeps/sysdeps.h +@@ -451,12 +469,20 @@ EOF + fi + + echo "Checking system endianness..." +- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o tryendianness src/sysdeps/tryendianness.c +- endianness=$(./tryendianness) || fail "$0: unable to determine endianness" ++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trybigendian src/sysdeps/trybigendian.c 2>/dev/null; then ++ endianness=big ++ else ++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trylittleendian src/sysdeps/trylittleendian.c 2>/dev/null; then ++ endianness=little ++ else ++ fail "$0: unable to determine endianness" ++ fi ++ fi ++ + echo "endianness: $endianness" >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_ENDIANNESS \"$endianness\"" >> $sysdeps/sysdeps.h + echo " ... $endianness" +- rm -f tryendianness ++ rm -f trybigendian trylittleendian + + trytypesize ushort USHORT "unsigned short" + trytypesize uint UINT "unsigned int" |