ISPC: unblock 1.17-1.19 (#36346)

* ispc: attempts at getting more recent versions to work
* ispc: more attempts to get newer versions to build
* ispc: cleanup
* llvm: remove ispc_patches variant again
* ispc: unpin ncurses
* ispc: satisfy style checks
* ispc: 1.19 is only compatible with LLVM 13-15 
  otherwise it would not build against develop, as this now has LLVM 16
* ispc: relax LLVM version to what ispc requires itself
  verified that it builds against LLVM 13, 14, 15, but not 12 and 16
* ispc: use spec.satisfies instead of version comparison
  according to suggestions from review and docs, this is the canonical way to do it
* ispc: checksum 1.18.1
  just in order to include all versions, also checked that it builds

---------

Co-authored-by: Martin Aumüller <aumuell@reserv.at>
This commit is contained in:
Erik Heeren 2023-03-27 20:30:36 +02:00 committed by GitHub
parent 4c599980da
commit 3b497359b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,8 @@ class Ispc(CMakePackage):
executables = ["^ispc$"]
version("main", branch="main")
version("1.19.0", sha256="c1aeae4bdfb28004a6949394ea1b3daa3fdf12f646e17fcc0614861077dc8b6a")
version("1.18.1", sha256="fee76d42fc0129f81489b7c2b9143e22a44c281940693c1c13cf1e3dd2ab207f")
version("1.18.0", sha256="ecf1fc6ad5e39242e555b8e0ac539489939a9e475722eaa9da5caa4651cecf05")
version("1.17.0", sha256="1d47365febd2e17c84c22501aa63b1eafbc1ef826d6f5deadafe14783b8388a5")
version("1.16.1", sha256="b32dbd374eea5f1b5f535bfd79c5cc35591c0df2e7bf1f86dec96b74e4ebf661")
@ -40,14 +42,14 @@ class Ispc(CMakePackage):
depends_on("ncurses", type="link")
depends_on("zlib", type="link")
depends_on("llvm+clang")
depends_on("llvm@:13", when="@:1.18")
depends_on("llvm@:12", when="@:1.17")
depends_on("llvm@11:", when="@1.16.0:")
depends_on("llvm@13:15", when="@1.19")
depends_on("llvm@11.0:14.0", when="@1.18")
depends_on("llvm@11:14", when="@1.17")
depends_on("llvm@:12", when="@:1.16")
depends_on("llvm@11:", when="@1.16")
depends_on("llvm@10:11", when="@1.15.0:1.15")
depends_on("llvm@10.0:10", when="@1.13:1.14")
conflicts("@1.17:", msg="Link error with ncurses")
patch(
"don-t-assume-that-ncurses-zlib-are-system-libraries.patch",
when="@1.14.0:1.14",
@ -60,6 +62,11 @@ class Ispc(CMakePackage):
sha256="d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc",
)
def setup_build_environment(self, env):
if self.spec.satisfies("@1.18.0:"):
env.append_flags("LDFLAGS", "-lcurses")
env.append_flags("LDFLAGS", "-lz")
def patch(self):
with open("check-m32.c", "w") as f:
f.write("#include <sys/cdefs.h>")