Files
BMLFS/build-scripts/highway.build
2024-02-10 00:46:24 -06:00

44 lines
1.4 KiB
Bash

#! /bin/bash
# highway
# Source: https://github.com/google/highway/archive/refs/tags/1.0.7.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: gtest
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON
-DHWY_SYSTEM_GTEST=OFF \
-DHWY_ENABLE_EXAMPLES=OFF
read -p "Compile?" && cmake --build build &&
sudo -S DESTDIR=$BUILD cmake --install build --strip &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
highway: highway
highway:
highway: A C++ library that provides portable SIMD/vector intrinsics.
highway:
highway: https://github.com/google/highway
highway:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/highway-1.0.7-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*