diff --git a/T/TetGen/build_tarballs.jl b/T/TetGen/build_tarballs.jl index 57a55cee472..688857c4e7c 100644 --- a/T/TetGen/build_tarballs.jl +++ b/T/TetGen/build_tarballs.jl @@ -35,9 +35,18 @@ cd $WORKSPACE/srcdir/tetgen # Patch tetgen.h with operators delegating new/delete to malloc/free for C/Julia compatibility # Made corresponding feature request to upstream, probably available for 1.6.1 # + mv tetgen.h tmp.h sed -e "s/class tetgenio {/class tetgenio { void * operator new(size_t n) { return malloc(n);} void operator delete(void* p) noexcept {free(p);} /g" tmp.h > tetgen.h +# +# Fix crash of README example (see TetGen.jl#26) +# There seems to be a on-off error or something like this in the routine writing the result. In 1.6.0 and also in +# the previous 1.5 version this does not happen. +# +mv tetgen.cxx tmp.cxx +sed -e "s/tetrahedrons->items \* 10/(tetrahedrons->items + 100) * 10/g" tmp.cxx > tetgen.cxx + # Compile and link together with C wrapper ${CXX} -c -fPIC -std=c++11 -O3 -c -DTETLIBRARY -I. ${WORKSPACE}/srcdir/cwrapper/cwrapper.cxx -o cwrapper.o ${CXX} -c -fPIC -std=c++11 -O3 -c -DTETLIBRARY tetgen.cxx -o tetgen.o @@ -48,6 +57,8 @@ install_license LICENSE """ platforms = supported_platforms() +# platforms=[Platform("x86_64", "linux"; libc="glibc")] + products = [ LibraryProduct("libtet", :libtet) ]