diff --git a/math/AlphaSparse/Portfile b/math/AlphaSparse/Portfile index 26c0b380d9a2c..f09b1e8f3d714 100644 --- a/math/AlphaSparse/Portfile +++ b/math/AlphaSparse/Portfile @@ -5,8 +5,8 @@ PortGroup compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup mpi 1.0 -github.setup AlphaSparse AlphaSparse 06bf06a57f9112c2f940741841485243d8073c7c -version 2022.03.30 +github.setup AlphaSparse AlphaSparse 57eefee000734f40d9e972cbd110fbc4c51a71d3 +version 2023.06.19 revision 0 categories math license BSD @@ -17,9 +17,9 @@ long_description AlphaSparse aims to build a common interface that provides B and expects to be extended on distributed and heterogeneous platforms. \ AlphaSparse is created using the basic C/C++ and can be deployed \ on both CPU and DCU (HIP-based many-core platform). -checksums rmd160 42732b3b193a3c54c3b8a89a8cb83a8719330bd2 \ - sha256 24b5fb8d36a4b80605c6402701d8620e07cb2bb386ea857b0d07259768713812 \ - size 9094750 +checksums rmd160 ad56116e0c4e9672bfb82415540ea459c8a7777a \ + sha256 d61b35bf14ab7e6edf12e54a8a5e1a158fa8b453409159462f21dfba3aa45c3e \ + size 9093990 patch.pre_args -p1 patchfiles-append 0001-Support-PPC-in-Makefile.patch \ @@ -43,6 +43,7 @@ post-extract { xinstall -d ${worksrcpath}/src/plain/kernel_1 xinstall -d ${worksrcpath}/src/plain/kernel_2 xinstall -d ${worksrcpath}/src/plain/kernel_3 + xinstall -d ${worksrcpath}/src/plain/kernel_4 set l1 ${worksrcpath}/src/plain/kernel/level1 set l2 ${worksrcpath}/src/plain/kernel/level2 set l3a ${worksrcpath}/src/plain/kernel/level3/add @@ -57,26 +58,32 @@ post-extract { move ${f} ${worksrcpath}/src/plain/kernel_1/ } } - fs-traverse f [list ${l3a} ${l3b}] { + fs-traverse f ${l3a} { if {[file isfile ${f}] && [file extension ${f}] == ".c"} { move ${f} ${worksrcpath}/src/plain/kernel_2/ } } - fs-traverse f [list ${l3c} ${l3d} ${l3e} ${l3f} ${l3g}] { + fs-traverse f ${l3b} { if {[file isfile ${f}] && [file extension ${f}] == ".c"} { move ${f} ${worksrcpath}/src/plain/kernel_3/ } } + fs-traverse f [list ${l3c} ${l3d} ${l3e} ${l3f} ${l3g}] { + if {[file isfile ${f}] && [file extension ${f}] == ".c"} { + move ${f} ${worksrcpath}/src/plain/kernel_4/ + } + } file copy ${worksrcpath}/src/plain/kernel/Makefile ${worksrcpath}/src/plain/kernel_1 file copy ${worksrcpath}/src/plain/kernel/Makefile ${worksrcpath}/src/plain/kernel_2 file copy ${worksrcpath}/src/plain/kernel/Makefile ${worksrcpath}/src/plain/kernel_3 + file copy ${worksrcpath}/src/plain/kernel/Makefile ${worksrcpath}/src/plain/kernel_4 file delete -force ${worksrcpath}/src/plain/kernel } post-patch { reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/Makefile - reinplace "s|kernel op op_|kernel_1 kernel_2 kernel_3 op op_|" ${worksrcpath}/src/plain/Makefile + reinplace "s|kernel op op_|kernel_1 kernel_2 kernel_3 kernel_4 op op_|" ${worksrcpath}/src/plain/Makefile } compiler.c_standard 2011 @@ -118,6 +125,11 @@ platform darwin 10 powerpc { 0011-Hack-for-Rosetta.patch } +if {[string match *clang* ${configure.compiler}]} { + patchfiles-append \ + 0012-patch-clang.diff +} + destroot { copy ${worksrcpath}/lib/libalpha_spblas.a ${destroot}/${prefix}/lib/ # copy ${worksrcpath}/lib/libalpha_spblas.dylib ${destroot}/${prefix}/lib/ diff --git a/math/AlphaSparse/files/0012-patch-clang.diff b/math/AlphaSparse/files/0012-patch-clang.diff new file mode 100644 index 0000000000000..f959ceb0394cd --- /dev/null +++ b/math/AlphaSparse/files/0012-patch-clang.diff @@ -0,0 +1,10 @@ +--- a/Makefile 2023-07-08 18:49:07.000000000 +0800 ++++ b/Makefile 2023-07-08 18:51:41.000000000 +0800 +@@ -71,6 +71,7 @@ + CFLAGS += -Wno-unused-parameter + CFLAGS += -Wno-unused-function + CFLAGS += -Wno-unused-variable ++CFLAGS += -Wno-int-conversion + CFLAGS += -fstack-protector-all + CFLAGS += -fPIC + # CFLAGS += -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,now