diff options
Diffstat (limited to 'meta/recipes-extended/slang/slang')
11 files changed, 235 insertions, 554 deletions
diff --git a/meta/recipes-extended/slang/slang/array_test.patch b/meta/recipes-extended/slang/slang/array_test.patch new file mode 100644 index 0000000000..ccd416f207 --- /dev/null +++ b/meta/recipes-extended/slang/slang/array_test.patch @@ -0,0 +1,20 @@ +slang: modify array test + +One array test tries to create an array that is far too large and anticipates an exception. +IndexError will only be thrown for 64 bit machines, so we add InvalidParmError for 32 bit ones. + +Upstream-Status: Submitted [jedsoft.org] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- a/src/test/array.sl ++++ b/src/test/array.sl +@@ -165,7 +165,7 @@ try + { + SS = Long_Type[10000,10000,10000,10000,10000,10000]; + } +-catch IndexError; ++catch IndexError,InvalidParmError; + + private define array_map2_func () + { diff --git a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch deleted file mode 100644 index 2ea1ffda57..0000000000 --- a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch +++ /dev/null @@ -1,218 +0,0 @@ -slang: change char type to signed char in macros - -C language has 3 distinct char types: - char - unsigned char - signed char -A char has the same range of values as signed char on X86, -but same as unsigned char on ARM which made Slang's typecast() -and array_sort() unable to work for char value on ARM, since -Slang is assuming "char" as "signed char". - -Now we change "char" as "signed char" explicitly in -util/mkslarith2.sl, and use it to regenerate src/slarith2.inc - -Upstream-Status: Submitted -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - src/slarith2.inc | 72 ++++++++++++++++++++++++------------------------- - src/util/mkslarith2.sl | 2 - - 2 files changed, 37 insertions(+), 37 deletions(-) - ---- a/src/util/mkslarith2.sl -+++ b/src/util/mkslarith2.sl -@@ -1,7 +1,7 @@ - #!/usr/bin/env slsh - - private variable CTypes = -- ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int", -+ ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", - "long", "unsigned long", "long long", "unsigned long long", - "float", "double", "long double"]; - private variable Is_Int_Type = ---- a/src/slarith2.inc -+++ b/src/slarith2.inc -@@ -1,43 +1,43 @@ - /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */ --/* ------------ char ---------- */ --DEFUN_1(copy_char_to_char,char,char) -+/* ------------ signed char ---------- */ -+DEFUN_1(copy_char_to_char,signed char,signed char) - #define char_to_char NULL - #define copy_char_to_uchar copy_char_to_char - #define char_to_uchar NULL --DEFUN_1(copy_char_to_short,char,short) -+DEFUN_1(copy_char_to_short,signed char,short) - #define char_to_short NULL --DEFUN_1(copy_char_to_ushort,char,unsigned short) -+DEFUN_1(copy_char_to_ushort,signed char,unsigned short) - #define char_to_ushort NULL --DEFUN_1(copy_char_to_int,char,int) --DEFUN_2(char_to_int,char,int,copy_char_to_int) --DEFUN_1(copy_char_to_uint,char,unsigned int) --DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint) --DEFUN_1(copy_char_to_long,char,long) --DEFUN_2(char_to_long,char,long,copy_char_to_long) --DEFUN_1(copy_char_to_ulong,char,unsigned long) --DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong) -+DEFUN_1(copy_char_to_int,signed char,int) -+DEFUN_2(char_to_int,signed char,int,copy_char_to_int) -+DEFUN_1(copy_char_to_uint,signed char,unsigned int) -+DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint) -+DEFUN_1(copy_char_to_long,signed char,long) -+DEFUN_2(char_to_long,signed char,long,copy_char_to_long) -+DEFUN_1(copy_char_to_ulong,signed char,unsigned long) -+DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong) - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_char_to_llong,char,long long) --DEFUN_2(char_to_llong,char,long long,copy_char_to_llong) -+DEFUN_1(copy_char_to_llong,signed char,long long) -+DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong) - #endif /* defined(HAVE_LONG_LONG) */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_char_to_ullong,char,unsigned long long) --DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong) -+DEFUN_1(copy_char_to_ullong,signed char,unsigned long long) -+DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong) - #endif /* defined(HAVE_LONG_LONG) */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_char_to_float,char,float) --DEFUN_2(char_to_float,char,float,copy_char_to_float) -+DEFUN_1(copy_char_to_float,signed char,float) -+DEFUN_2(char_to_float,signed char,float,copy_char_to_float) - #endif /* SLANG_HAS_FLOAT */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_char_to_double,char,double) --DEFUN_2(char_to_double,char,double,copy_char_to_double) -+DEFUN_1(copy_char_to_double,signed char,double) -+DEFUN_2(char_to_double,signed char,double,copy_char_to_double) - #endif /* SLANG_HAS_FLOAT */ - #if defined(HAVE_LONG_DOUBLE) --DEFUN_1(copy_char_to_ldouble,char,long double) --DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble) -+DEFUN_1(copy_char_to_ldouble,signed char,long double) -+DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble) - #endif /* defined(HAVE_LONG_DOUBLE) */ - #if SLANG_HAS_FLOAT --TO_DOUBLE_FUN(char_to_one_double,char) -+TO_DOUBLE_FUN(char_to_one_double,signed char) - #endif - - /* ------------ unsigned char ---------- */ -@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign - #endif - - /* ------------ short ---------- */ --DEFUN_1(copy_short_to_char,short,char) -+DEFUN_1(copy_short_to_char,short,signed char) - #define short_to_char NULL - DEFUN_1(copy_short_to_uchar,short,unsigned char) - #define short_to_uchar NULL -@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short) - #endif - - /* ------------ unsigned short ---------- */ --DEFUN_1(copy_ushort_to_char,unsigned short,char) -+DEFUN_1(copy_ushort_to_char,unsigned short,signed char) - #define ushort_to_char NULL - DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char) - #define ushort_to_uchar NULL -@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig - #endif - - /* ------------ int ---------- */ --DEFUN_1(copy_int_to_char,int,char) -+DEFUN_1(copy_int_to_char,int,signed char) - #define int_to_char NULL - DEFUN_1(copy_int_to_uchar,int,unsigned char) - #define int_to_uchar NULL -@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int) - #endif - - /* ------------ unsigned int ---------- */ --DEFUN_1(copy_uint_to_char,unsigned int,char) -+DEFUN_1(copy_uint_to_char,unsigned int,signed char) - #define uint_to_char NULL - DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char) - #define uint_to_uchar NULL -@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne - #endif - - /* ------------ long ---------- */ --DEFUN_1(copy_long_to_char,long,char) -+DEFUN_1(copy_long_to_char,long,signed char) - #define long_to_char NULL - DEFUN_1(copy_long_to_uchar,long,unsigned char) - #define long_to_uchar NULL -@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long) - #endif - - /* ------------ unsigned long ---------- */ --DEFUN_1(copy_ulong_to_char,unsigned long,char) -+DEFUN_1(copy_ulong_to_char,unsigned long,signed char) - #define ulong_to_char NULL - DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char) - #define ulong_to_uchar NULL -@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign - - /* ------------ long long ---------- */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_llong_to_char,long long,char) -+DEFUN_1(copy_llong_to_char,long long,signed char) - #define llong_to_char NULL - DEFUN_1(copy_llong_to_uchar,long long,unsigned char) - #define llong_to_uchar NULL -@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l - - /* ------------ unsigned long long ---------- */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_ullong_to_char,unsigned long long,char) -+DEFUN_1(copy_ullong_to_char,unsigned long long,signed char) - #define ullong_to_char NULL - DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char) - #define ullong_to_uchar NULL -@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig - - /* ------------ float ---------- */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_float_to_char,float,char) -+DEFUN_1(copy_float_to_char,float,signed char) - #define float_to_char NULL - DEFUN_1(copy_float_to_uchar,float,unsigned char) - #define float_to_uchar NULL -@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float) - - /* ------------ double ---------- */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_double_to_char,double,char) -+DEFUN_1(copy_double_to_char,double,signed char) - #define double_to_char NULL - DEFUN_1(copy_double_to_uchar,double,unsigned char) - #define double_to_uchar NULL -@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl - - /* ------------ long double ---------- */ - #if defined(HAVE_LONG_DOUBLE) --DEFUN_1(copy_ldouble_to_char,long double,char) -+DEFUN_1(copy_ldouble_to_char,long double,signed char) - #define ldouble_to_char NULL - DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char) - #define ldouble_to_uchar NULL -@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long - #if SLANG_HAS_FLOAT - static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] = - { -- {sizeof(char), char_to_one_double}, -+ {sizeof(signed char), char_to_one_double}, - {sizeof(unsigned char), uchar_to_one_double}, - {sizeof(short), short_to_one_double}, - {sizeof(unsigned short), ushort_to_one_double}, -@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl - - static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] = - { -- /* char */ -+ /* signed char */ - { - {(FVOID_STAR)copy_char_to_char, char_to_char}, - {(FVOID_STAR)copy_char_to_uchar, char_to_uchar}, diff --git a/meta/recipes-extended/slang/slang/dont-link-to-host.patch b/meta/recipes-extended/slang/slang/dont-link-to-host.patch new file mode 100644 index 0000000000..42dba0fae4 --- /dev/null +++ b/meta/recipes-extended/slang/slang/dont-link-to-host.patch @@ -0,0 +1,16 @@ +SLANG_INST_LIB is the location of where slang will end up, but when building for +packaging this doesn't have DESTDIR appended so can potentially link to the host +for cross builds and will trigger QA errors. + +As this is obviously wrong, delete it. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/slsh/Makefile.in b/slsh/Makefile.in +index cba9d81..4c1c370 100644 +--- a/slsh/Makefile.in ++++ b/slsh/Makefile.in +@@ -80 +80 @@ SHELL = /bin/sh +-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) ++INST_LIBS = $(DEST_LIB_DIR) $(RPATH) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch deleted file mode 100644 index 0c1553a661..0000000000 --- a/meta/recipes-extended/slang/slang/fix-check-pcre.patch +++ /dev/null @@ -1,108 +0,0 @@ -fix the pcre existence checking - -when check if there is pcre, the configure file always check -the host dir. now we make it work by adding correct prefix for -cross-compile environment. - -When enable pcre-module, we see a QA warning because rpaths -hardcoded into the build, rpaths are not needed, so lets turn -this off. - -Upstream-Status: Inappropriate -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - configure | 60 ++++++------------------------------------------------------ - 1 files changed, 6 insertions(+), 54 deletions(-) - -diff --git a/configure b/configure -index f1586c3..d22814f 100755 ---- a/configure -+++ b/configure -@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - /usr/include/pcre,/usr/lib \ - /usr/pcre/include,/usr/pcre/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/pcre,/opt/lib \ - /opt/pcre/include,/opt/pcre/lib \ - /opt/include,/opt/lib" -@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_pcre_include_dir="$xincdir" -- jd_pcre_library_dir="$xlibdir" -+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_pcre_library="yes" - found=1 - break -@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; } - then - PCRE_LIB="" - else -- --if test "X$jd_pcre_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_pcre_library_dir" -- fi -- else -- RPATH="$RPATH:$jd_pcre_library_dir" -- fi --fi -- -+ RPATH="" - fi - - PCRE_INC=-I$jd_pcre_include_dir --- -1.7.4.1 - diff --git a/meta/recipes-extended/slang/slang/no-x.patch b/meta/recipes-extended/slang/slang/no-x.patch new file mode 100644 index 0000000000..7dc1602fe3 --- /dev/null +++ b/meta/recipes-extended/slang/slang/no-x.patch @@ -0,0 +1,18 @@ +There's no need to check for the X libraries as the socket module doesn't use +anything from X. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/autoconf/configure.ac b/autoconf/configure.ac +index b61e974..a3e5db2 100644 +--- a/autoconf/configure.ac ++++ b/autoconf/configure.ac +@@ -72,3 +71,0 @@ AC_SUBST(LIB_READLINE) +-# For the socket module +-AC_PATH_XTRA +- +--- a/modules/Makefile.in ++++ b/modules/Makefile.in +@@ -67 +66,0 @@ ZLIB_LIB = @Z_LIB@ -lz +-SOCKET_LIBS = @X_EXTRA_LIBS@ diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch deleted file mode 100644 index 50cac9264f..0000000000 --- a/meta/recipes-extended/slang/slang/rpathfix.patch +++ /dev/null @@ -1,70 +0,0 @@ -Without this patch we see rpaths hardcoded into the build which results in QA -warnings. These rpaths are not needed so lets turn this off. - -Upstream-Status: Inappropriate -(but could be turned into a proper configure option) - -RP 2012/03/14 - -Index: slang-2.2.4/configure -=================================================================== ---- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000 -+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000 -@@ -6081,56 +6081,7 @@ - ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS" - CFLAGS="$CFLAGS $IEEE_CFLAGS" - -- --if test "X$libdir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$libdir" -- fi -- else -- RPATH="$RPATH:$libdir" -- fi --fi -- -+RPATH="" - - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects diff --git a/meta/recipes-extended/slang/slang/run-ptest b/meta/recipes-extended/slang/slang/run-ptest new file mode 100644 index 0000000000..39f474af31 --- /dev/null +++ b/meta/recipes-extended/slang/slang/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make -C test runtests diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch deleted file mode 100644 index 958fe983c5..0000000000 --- a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 -From: Zheng Junling <zhengjunling@huawei.com> -Date: Mon, 16 Jun 2014 12:51:25 +0000 -Subject: [PATCH] slang: fix the iconv existence checking - -When checking whether there is iconv, the configure file always check -the host env. - -Now we make it working properly by adding correct prefix for cross- -compiling environment. - -When enabling iconv-module, we see a QA warning because rpaths hardcoded -into the build. And rpaths are not needed, so let's turn this off. - -This patch is generated by referencing the existing "fix-check-pcre" -patch. - -Upstream-Status: Inappropriate - -Signed-off-by: Zheng Junling <zhengjunling@huawei.com> ---- - configure | 60 ++++++------------------------------------------------------ - 1 file changed, 6 insertions(+), 54 deletions(-) - -diff --git a/configure b/configure -index 7a96256..91632f3 100755 ---- a/configure -+++ b/configure -@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - /usr/include/iconv,/usr/lib \ - /usr/iconv/include,/usr/iconv/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/iconv,/opt/lib \ - /opt/iconv/include,/opt/iconv/lib \ - /opt/include,/opt/lib" -@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_iconv_include_dir="$xincdir" -- jd_iconv_library_dir="$xlibdir" -+ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_iconv_library="yes" - found=1 - break -@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } - then - ICONV_LIB="" - else -- --if test "X$jd_iconv_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_iconv_library_dir" -- fi -- else -- RPATH="$RPATH:$jd_iconv_library_dir" -- fi --fi -- -+ RPATH="" - fi - - ICONV_INC=-I$jd_iconv_include_dir --- -1.8.3.4 - diff --git a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch deleted file mode 100644 index ddf5cce5cb..0000000000 --- a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch +++ /dev/null @@ -1,42 +0,0 @@ -Upstream-Status: Backported - -From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001 -From: Manfred Hanke <Manfred.Hanke@tngtech.com> -Date: Thu, 20 Jun 2013 10:24:12 +0200 -Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8 - mode) fixed - -char *str points to SLuchar_Type utf8_buf[], which had too small scope - -src/test/strops.sl failed in the following environment: - - compiler: gcc (Debian 4.7.2-5) 4.7.2 - - CFLAGS: -g -O2 - - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13 - - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux ---- - src/slstrops.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/slstrops.c b/src/slstrops.c -index ce6acb0..cbbbb01 100644 ---- a/src/slstrops.c -+++ b/src/slstrops.c -@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ - #endif - unsigned char uch; - int use_long = 0, use_alt_format = 0; -+ SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; - - while (1) - { -@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ - #endif - { - SLwchar_Type wc; -- SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; - - if (-1 == SLang_pop_wchar (&wc)) - return out; --- -1.7.9.5 - diff --git a/meta/recipes-extended/slang/slang/terminfo_fixes.patch b/meta/recipes-extended/slang/slang/terminfo_fixes.patch new file mode 100644 index 0000000000..3e6d15aa79 --- /dev/null +++ b/meta/recipes-extended/slang/slang/terminfo_fixes.patch @@ -0,0 +1,148 @@ +Do not use the JD_TERMCAP macro since we cannot get the terminfo from +ncurses pkg-config, but fix the macro to not reference host directories. +Also add src/test/Makefile.in so that we can use -ltermcap if we want to. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/autoconf/aclocal.m4 ++++ b/autoconf/aclocal.m4 +@@ -506,14 +506,10 @@ then + else + MISC_TERMINFO_DIRS="" + fi +-JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \ +- /usr/lib/terminfo \ +- /usr/share/terminfo \ +- /usr/share/lib/terminfo \ +- /usr/local/lib/terminfo" ++ + TERMCAP=-ltermcap + +-for terminfo_dir in $JD_Terminfo_Dirs ++for terminfo_dir in $MISC_TERMINFO_DIRS + do + if test -d $terminfo_dir + then +--- a/autoconf/configure.ac ++++ b/autoconf/configure.ac +@@ -249,7 +249,14 @@ AC_CHECK_SIZEOF(size_t) + JD_CHECK_LONG_LONG + JD_LARGE_FILE_SUPPORT + +-JD_TERMCAP ++dnl Do not use JD_TERMCAP, since we cannot get terminfo from ncurses*-config anymore. ++dnl Set TERMCAP=-ltermcap and AC_DEFINE(USE_TERMCAP,1,[Define to use termcap]) ++dnl to use libtermcap. ++TERMCAP="" ++MISC_TERMINFO_DIRS="" ++AC_SUBST(TERMCAP)dnl ++AC_SUBST(MISC_TERMINFO_DIRS)dnl ++ + JD_GCC_WARNINGS + + JD_SET_OBJ_SRC_DIR(src) +@@ -364,7 +371,7 @@ AC_CONFIG_HEADER(src/sysconf.h:src/confi + dnl AC_CONFIG_SUBDIRS(demo) + + AC_OUTPUT(Makefile:autoconf/Makefile.in \ +- src/Makefile slsh/Makefile modules/Makefile demo/Makefile \ ++ src/Makefile src/test/Makefile slsh/Makefile modules/Makefile demo/Makefile \ + slang.pc:autoconf/slangpc.in \ + ) + +--- /dev/null ++++ b/src/test/Makefile.in +@@ -0,0 +1,90 @@ ++# -*- make -*- ++TEST_SCRIPTS_SLC = argv syntax scircuit eqs sscanf loops arith array strops \ ++ bstring pack stdio assoc selfload struct nspace path ifeval anytype arrmult \ ++ time utf8 except bugs list regexp method deref naninf overflow sort \ ++ longlong signal dollar req docfun debug qualif compare break multline \ ++ stack misc posixio posdir proc math ++ ++TEST_SCRIPTS_NO_SLC = autoload nspace2 prep ++ ++TEST_SCRIPTS = $(TEST_SCRIPTS_SLC) $(TEST_SCRIPTS_NO_SLC) ++ ++TEST_PGM = sltest ++MEMCHECK = valgrind --tool=memcheck --leak-check=yes --leak-resolution=med --num-callers=20 ++RUN_TEST_PGM = ./$(TEST_PGM) ++SLANGINC = .. ++SLANGLIB = ../$(ARCH)objs ++OTHER_LIBS = -lm @TERMCAP@ ++OTHER_CFLAGS = ++ ++runtests: $(TEST_PGM) cleantmp ++ @tests=""; \ ++ for test in $(TEST_SCRIPTS); \ ++ do \ ++ tests="$$tests $$test.sl"; \ ++ done; \ ++ for test in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ tests="$$tests $$test.slc"; \ ++ done; \ ++ MAKERUNNING=1 ./runtests.sh $$tests ++# @touch $(TEST_PGM).c ++ ++update: $(TEST_PGM) cleantmp ++ @tests=""; \ ++ for X in $(TEST_SCRIPTS); \ ++ do \ ++ if [ ! -e lastrun/$$X.sl ] || [ $$X.sl -nt lastrun/$$X.sl ] ; \ ++ then \ ++ tests="$$tests $$X.sl"; \ ++ fi \ ++ done; \ ++ for X in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ if [ ! -e lastrun/$$X.slc ] || [ $$X.sl -nt lastrun/$$X.slc ] ; \ ++ then \ ++ tests="$$tests $$X.slc"; \ ++ fi \ ++ done; \ ++ if test -n "$$tests"; \ ++ then \ ++ MAKERUNNING=1 ./runtests.sh $$tests; \ ++ fi ++# @touch $(TEST_PGM).c ++ ++memcheck_runtests: $(TEST_PGM) cleantmp ++ @echo "" ++ @echo "Running tests:" ++ @echo "" ++ -@for X in $(TEST_SCRIPTS); \ ++ do \ ++ $(MEMCHECK) --log-file=log.$${X} $(RUN_TEST_PGM) $$X.sl; \ ++ grep ERROR log.$${X}; grep 'lost: [^0]' log.$${X}; \ ++ $(MEMCHECK) --log-file=log.$${X}_u $(RUN_TEST_PGM) -utf8 $$X.sl; \ ++ grep ERROR log.$${X}_u; grep 'lost: [^0]' log.$${X}_u; \ ++ done ++# touch $(TEST_PGM).c ++ ++memcheck_runtests_slc: $(TEST_PGM) cleantmp ++ @echo "" ++ @echo "Running tests:" ++ @echo "" ++ -@for X in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ $(MEMCHECK) --log-file=log.$${X}_c $(RUN_TEST_PGM) $$X.slc; \ ++ $(MEMCHECK) --log-file=log.$${X}_uc $(RUN_TEST_PGM) -utf8 $$X.slc; \ ++ done ++# touch $(TEST_PGM).c ++ ++memcheck: memcheck_runtests memcheck_runtests_slc ++ ++$(TEST_PGM): $(TEST_PGM).c assoc.c list.c $(SLANGLIB)/libslang.a ++ $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(LDFLAGS) $(TEST_PGM).c -o $(TEST_PGM) -I$(SLANGINC) -L$(SLANGLIB) -lslang $(OTHER_LIBS) ++cleantmp: ++ -/bin/rm -rf tmpfile*.* tmpdir*.* ++clean: cleantmp ++ -/bin/rm -f *~ *.o *.log log.pid* *.slc log.* *.log-* ++distclean: clean ++ /bin/rm -f $(TEST_PGM) $(TEST_PGM).gcda $(TEST_PGM).gcno ++.PHONY: clean memcheck runtests memcheck_runtests_slc memcheck_runtests cleantmp ++ diff --git a/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch new file mode 100644 index 0000000000..27a9bb87ea --- /dev/null +++ b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch @@ -0,0 +1,30 @@ +From 38688ee2754415cf2a1935dafb8278861b7315e7 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <sstrogin@cisco.com> +Date: Thu, 2 Mar 2017 00:26:31 +0200 +Subject: [PATCH] test: add output in the format "result: testname" + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Stefan Strogin <sstrogin@cisco.com> +--- + src/test/runtests.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/test/runtests.sh b/src/test/runtests.sh +index a3eaad0..64f0705 100755 +--- a/src/test/runtests.sh ++++ b/src/test/runtests.sh +@@ -34,8 +34,10 @@ do + then + n_failed=`expr ${n_failed} + 1` + tests_failed="$tests_failed $testfile" ++ echo "FAIL: $testfile" + else + touch lastrun/$testfile ++ echo "PASS: $testfile" + fi + done + +-- +2.11.0 + |