Date: Friday, April 14, 2023 @ 09:08:48 Author: dvzrv Revision: 1446013
upgpkg: ispc 1.19.0-1: Upgrade to 1.19.0. Switch to git sources to have an easier handling on vendored stuff. Add pkgver() to properly describe pkgver. Move cmake options to local bash array for easier handling (enabling/disabling). Consolidate dependencies, by adding all required and removing non-required (ncurses, zlib). Open upstream ticket about unwanted files being installed: https://github.com/ispc/ispc/issues/2482 Ping (closed) tickets about still failing tests: https://github.com/ispc/ispc/issues/2427 https://github.com/ispc/ispc/issues/2428 https://github.com/ispc/ispc/issues/2429 Modified: ispc/trunk/PKGBUILD ----------+ PKGBUILD | 73 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 30 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-14 08:32:55 UTC (rev 1446012) +++ PKGBUILD 2023-04-14 09:08:48 UTC (rev 1446013) @@ -2,14 +2,15 @@ # Maintainer: Bruno Pagani <[email protected]> pkgname=ispc -pkgver=1.18.1.r290+ge88e49e +_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=(ncurses zlib llvm-libs clang spirv-llvm-translator) -makedepends=(llvm python lib32-glibc cmake level-zero-headers level-zero-loader openmp vc-intrinsics) +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' @@ -16,33 +17,45 @@ 'level-zero-loader: GPU support' 'openmp: GPU support' ) -_gtestcommit=bf0701daa9f5b30e5882e2f8f9a5280bcba87e77 -#source=(https://github.com/ispc/ispc/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz -_ispccommit=e88e49eb161aa5e75aecc843d479d5e757f5c43e -source=(ispc-${_ispccommit}.tar.gz::https://github.com/ispc/ispc/archive/${_ispccommit}.tar.gz - googletest-${_gtestcommit}.tar.gz::https://github.com/google/googletest/archive/${_gtestcommit}.tar.gz - ispc-libclang-linking.patch::https://github.com/ispc/ispc/pull/2422.patch) -sha256sums=('e0181f0f4dc78809166a8c28a46a3cb1f24d3dbbead4f4ff7e4ebfd8d109ebbd' - 'b44b5d37b62e7e54887f07f9862e7dce537aa9922e80995007bcffe6ab9058d4' - 'bcc35d7a2017c59ce8657260b2cd9b9494bbccb556cabdd54d59e4c47b14fba9') +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() { - mv ispc-${_ispccommit} ispc-${pkgver} - cd ${pkgname}-${pkgver} - # Build with unified libclang-cpp.so - patch -p1 < ../ispc-libclang-linking.patch - # Add Google Test - rmdir ispcrt/tests/vendor/google/googletest - mv ../googletest-${_gtestcommit} ispcrt/tests/vendor/google/googletest + 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() { - cmake -B build -S ${pkgname}-${pkgver} \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DISPC_INCLUDE_EXAMPLES=OFF \ - -DXE_ENABLED=ON \ - -DXE_DEPS_DIR=/usr - make -C 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() { @@ -53,9 +66,9 @@ } package() { - make -C build DESTDIR="${pkgdir}" install - install -Dm644 ${pkgname}-${pkgver}/LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname} - # Remove uneeded files - rm -r "${pkgdir}"/build - rm "${pkgdir}"/usr/lib/libispcrt_static.a + 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 }
