From 9672d23ad2a3dad82ca4130a5effad2bc059ea8d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Aug 10 2019 11:31:35 +0000 Subject: add patch to fix define of memrchr --- diff --git a/asymptote-2.52-const-memrchr.patch b/asymptote-2.52-const-memrchr.patch new file mode 100644 index 0000000..144b46d --- /dev/null +++ b/asymptote-2.52-const-memrchr.patch @@ -0,0 +1,12 @@ +diff -up asymptote-2.52/prc/PRCdouble.h.s390x asymptote-2.52/prc/PRCdouble.h +--- asymptote-2.52/prc/PRCdouble.h.s390x 2019-08-10 07:22:59.805272041 -0400 ++++ asymptote-2.52/prc/PRCdouble.h 2019-08-10 07:27:18.130760904 -0400 +@@ -133,7 +133,7 @@ int stCOFDOECompare(const void*,const vo + + #ifdef WORDS_BIGENDIAN + #ifndef HAVE_MEMRCHR +-void *memrchr(const void *,int,size_t); ++const void *memrchr(const void *,int,size_t); + #endif + #endif + diff --git a/asymptote.spec b/asymptote.spec index 8df0bd0..5fe56c4 100644 --- a/asymptote.spec +++ b/asymptote.spec @@ -15,6 +15,9 @@ Patch0: asymptote-2.52-settings.patch Patch3: asymptote-2.08-info-path-fix.patch # Use libtirpc if found Patch4: asymptote-2.43-libtirpc.patch +# memrchr value does not match hardcoded one in /usr/include/string.h +# only conflicts on s390x +Patch5: asymptote-2.52-const-memrchr.patch BuildRequires: gcc-c++ BuildRequires: ncurses-devel BuildRequires: readline-devel @@ -76,6 +79,7 @@ that LaTeX does for scientific text. %patch0 -p1 -b .settings %patch3 -p1 -b .path-fix %patch4 -p1 -b .libtirpc +%patch5 -p1 -b .const-memrchr %{__sed} -i 's/\r//' doc/CAD1.asy # convert to UTF-8