makedepends=(cmake gtest)

description="A C++ library that provides portable SIMD/vector intrinsics"
url="https://github.com/google/highway/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="highway"
version="1.3.0"
release=1

source=(https://github.com/google/highway/archive/$version/highway-$version.tar.gz)
build() {

  cmake -B build \
        -S "${name}-${version}" \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DBUILD_SHARED_LIBS:BOOL='ON' \
        -DHWY_SYSTEM_GTEST:BOOL='ON' -Wno-dev
        
  cmake --build build

  DESTDIR="$PKG" cmake --install build

  install -D -m644 "${name}-${version}/LICENSE-BSD3" -t "${PKG}/usr/share/licenses/${name}-${version}"
}
