Date: Friday, April 14, 2023 @ 09:09:03
  Author: dvzrv
Revision: 1446014

archrelease: copy trunk to community-staging-x86_64

Added:
  ispc/repos/community-staging-x86_64/
  ispc/repos/community-staging-x86_64/PKGBUILD
    (from rev 1446013, ispc/trunk/PKGBUILD)

----------+
 PKGBUILD |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)

Copied: ispc/repos/community-staging-x86_64/PKGBUILD (from rev 1446013, 
ispc/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-14 09:09:03 UTC (rev 1446014)
@@ -0,0 +1,74 @@
+# Maintainer: Lukas Jirkovsky <[email protected]>
+# Maintainer: Bruno Pagani <[email protected]>
+
+pkgname=ispc
+_commit=41549e2786f056c69a5a9d09f44ccc958bba2660  # refs/tags/v1.19.0
+pkgver=1.19.0
+pkgrel=1
+pkgdesc="Compiler for high-performance SIMD programming on the CPU"
+arch=(x86_64)
+url="https://ispc.github.io/";
+license=(BSD)
+depends=(clang gcc-libs glibc llvm-libs spirv-llvm-translator)
+makedepends=(cmake git level-zero-headers level-zero-loader lib32-glibc llvm 
openmp python vc-intrinsics)
+checkdepends=(intel-compute-runtime)
+optdepends=(
+    'intel-compute-runtime: GPU support'
+    'level-zero-loader: GPU support'
+    'openmp: GPU support'
+)
+options=(!staticlibs)
+source=(
+  git+https://github.com/$pkgname/$pkgname#tag=$_commit
+  $pkgname-benchmark::git+https://github.com/google/benchmark.git
+  $pkgname-googletest::git+https://github.com/google/googletest.git
+)
+sha256sums=('SKIP'
+            'SKIP'
+            'SKIP')
+
+pkgver() {
+  cd $pkgname
+  git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+  cd $pkgname
+  git submodule init
+  git config submodule.benchmarks/vendor/google/benchmark.url 
"$srcdir/$pkgname-benchmark"
+  git config submodule.ispcrt/tests/vendor/google/googletest.url 
"$srcdir/$pkgname-googletest"
+  git -c protocol.file.allow=always submodule update
+}
+
+build() {
+  local cmake_options=(
+    -B build
+    -D CMAKE_BUILD_TYPE=Release  # None not allowed :(
+    -D CMAKE_INSTALL_PREFIX=/usr
+    -D ISPC_INCLUDE_EXAMPLES=OFF
+    -D ISPC_OPAQUE_PTR_MODE=OFF  # suggested in 
https://github.com/ispc/ispc/issues/2427
+    -D ISPC_STATIC_LINK=OFF
+    -D XE_ENABLED=ON
+    -D XE_DEPS_DIR=/usr
+    -S $pkgname
+    -W no-dev
+  )
+
+  cmake "${cmake_options[@]}"
+  cmake --build build --verbose
+}
+
+check() {
+  # https://github.com/ispc/ispc/issues/2427
+  # https://github.com/ispc/ispc/issues/2428
+  # https://github.com/ispc/ispc/issues/2429
+  make -C build check-all || echo "Tests failed"
+}
+
+package() {
+  DESTDIR="$pkgdir" cmake --install build
+  install -Dm644 $pkgname/LICENSE.txt -t 
"${pkgdir}"/usr/share/licenses/${pkgname}
+  # Remove uneeded files: https://github.com/ispc/ispc/issues/2482
+  rm -rv "${pkgdir}"/build
+  rm -v "${pkgdir}"/usr/lib/libispcrt_static.a
+}

Reply via email to