diff options
author | Fabian Brosda | 2020-07-10 08:04:01 +0200 |
---|---|---|
committer | Fabian Brosda | 2020-07-10 08:10:16 +0200 |
commit | 325445c299521ffe60868d02b4cbb92028ae645c (patch) | |
tree | a85bb69b3011724e839837eb44f7a02cc48916e8 | |
parent | 96a4374c88b7be83776724465a37698cf92a58a7 (diff) | |
download | aur-325445c299521ffe60868d02b4cbb92028ae645c.tar.gz |
include patch for _float128 in math.h
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | 12_float128.patch | 83 | ||||
-rw-r--r-- | PKGBUILD | 7 |
3 files changed, 90 insertions, 2 deletions
@@ -18,6 +18,7 @@ pkgbase = gauche-c-wrapper source = 09-cpp-c-ldflags.patch source = 10-fix-closure-alloc.patch source = 11_fix_jp_encoding.patch + source = 12_float128.patch sha1sums = 3b52496fa8151a409538d361e08b05ad9de16ac2 sha1sums = 99878b6fc5c306223e7119861b5af92362f90fd9 sha1sums = 11f45d119f2fc660ac32de724b01d47aaaf84675 @@ -28,6 +29,7 @@ pkgbase = gauche-c-wrapper sha1sums = fc6aff7e1d30b177565654702b7eff67b953745d sha1sums = ec1582da5e299adc76fa21d0397e7ad1d323ee50 sha1sums = 341697ca27ee06fa80357f80807b11b5593cf6c3 + sha1sums = 6c575ab04c1e47d2fdcea204d27b4a59520285f1 pkgname = gauche-c-wrapper diff --git a/12_float128.patch b/12_float128.patch new file mode 100644 index 000000000000..1097d6d5db1b --- /dev/null +++ b/12_float128.patch @@ -0,0 +1,83 @@ +Description: Workaround for usage of math.h including type _Float128 +Author: Fabian Brosda <fabi3141@gmx.de> +Last-Update: 2020-07-10 + +diff --unified --recursive --text --new-file c-wrapper-0.6.1/src/c-lex.c c-wrapper-0.6.1-new/src/c-lex.c +--- c-wrapper-0.6.1/src/c-lex.c 2009-08-08 16:44:50.000000000 +0200 ++++ c-wrapper-0.6.1-new/src/c-lex.c 2020-07-10 07:40:13.027501542 +0200 +@@ -360,6 +360,7 @@ + "double", + "void", + "_Bool", ++ "_Float128", + NULL, + }; + int i; +diff --unified --recursive --text --new-file c-wrapper-0.6.1/src/c-parser.c c-wrapper-0.6.1-new/src/c-parser.c +--- c-wrapper-0.6.1/src/c-parser.c 2020-07-10 07:38:23.707643847 +0200 ++++ c-wrapper-0.6.1-new/src/c-parser.c 2020-07-10 07:40:13.030834872 +0200 +@@ -103,6 +103,7 @@ + DEFINE_SYM(double); + DEFINE_SYM(void); + DEFINE_SYM(_Bool); ++DEFINE_SYM(_Float128); + DEFINE_SYM(__builtin_va_list); + DEFINE_SYM(U_struct); + DEFINE_SYM(U_union); +@@ -470,6 +471,8 @@ + SCM_RETURN(SYM(c_void)); + } else if (SCM_EQ(car, SYM(_Bool))) { + SCM_RETURN(SYM(c_int)); ++ } else if (SCM_EQ(car, SYM(_Float128))) { ++ SCM_RETURN(SYM(c_longdouble)); + } else if (SCM_EQ(car, SYM(__builtin_va_list))) { + SCM_RETURN(SCM_LIST2(SCM_LIST3(SYM(with_module), SYM(c_wrapper_c_ffi), SYM(ptr)), SYM(c_void))); + } else if (SCM_PAIRP(car) && SCM_EQ(SCM_CAR(car), SYM(U_struct))) { +@@ -1859,6 +1862,7 @@ + INIT_SYM(double, "double"); + INIT_SYM(void, "void"); + INIT_SYM(_Bool, "_Bool"); ++ INIT_SYM(_Float128, "_Float128"); + INIT_SYM(__builtin_va_list, "__builtin_va_list"); + INIT_SYM(U_struct, "STRUCT"); + INIT_SYM(U_union, "UNION"); +diff --unified --recursive --text --new-file c-wrapper-0.6.1/testsuite/Makefile.in c-wrapper-0.6.1-new/testsuite/Makefile.in +--- c-wrapper-0.6.1/testsuite/Makefile.in 2020-07-10 07:38:23.710977175 +0200 ++++ c-wrapper-0.6.1-new/testsuite/Makefile.in 2020-07-10 07:49:39.653986008 +0200 +@@ -73,6 +73,7 @@ + $(GOSH) -I../src -I../lib cwrappertest.scm >> test.log + $(GOSH) -I../src -I../lib struct_in_union-test.scm >> test.log + $(GOSH) -I../src -I../lib stdio-test.scm >> test.log ++ $(GOSH) -I../src -I../lib math-test.scm >> test.log + $(GOSH) -I../src -I../lib inline-test.scm >> test.log + $(GOSH) -I../src -I../lib fptr_array-test.scm >> test.log + $(GOSH) -I../src -I../lib array_qualifier-test.scm >> test.log +diff --unified --recursive --text --new-file c-wrapper-0.6.1/testsuite/math-test.scm c-wrapper-0.6.1-new/testsuite/math-test.scm +--- c-wrapper-0.6.1/testsuite/math-test.scm 1970-01-01 01:00:00.000000000 +0100 ++++ c-wrapper-0.6.1-new/testsuite/math-test.scm 2020-07-10 07:55:35.235796596 +0200 +@@ -0,0 +1,25 @@ ++;;; ++;;; Test include math.h ++;;; ++ ++(use gauche.test) ++ ++(test-start "c-wrapper (include math.h)") ++(use c-wrapper) ++ ++(c-include "math.h") ++ ++(test "trunc" ++ 1.0 ++ (lambda () ++ (trunc 1.9))) ++ ++(test "pow" ++ 625.0 ++ (lambda () ++ (pow 5 4))) ++ ++;; epilogue ++(test-end) ++ ++ @@ -23,7 +23,9 @@ source=('http://www.koguro.net/prog/c-wrapper/c-wrapper-0.6.1.tgz' '08-gen-gpd-fix.patch' '09-cpp-c-ldflags.patch' '10-fix-closure-alloc.patch' - '11_fix_jp_encoding.patch') + '11_fix_jp_encoding.patch' + '12_float128.patch') + sha1sums=('3b52496fa8151a409538d361e08b05ad9de16ac2' '99878b6fc5c306223e7119861b5af92362f90fd9' '11f45d119f2fc660ac32de724b01d47aaaf84675' @@ -33,7 +35,8 @@ sha1sums=('3b52496fa8151a409538d361e08b05ad9de16ac2' 'faae81fcb833f5571ba151f319ed6d948d679935' 'fc6aff7e1d30b177565654702b7eff67b953745d' 'ec1582da5e299adc76fa21d0397e7ad1d323ee50' - '341697ca27ee06fa80357f80807b11b5593cf6c3') + '341697ca27ee06fa80357f80807b11b5593cf6c3' + '6c575ab04c1e47d2fdcea204d27b4a59520285f1') prepare() { cd "${_pkgname}-${pkgver}" |