Files
BMLFS/build-scripts/OpenCL-SDK.build
2023-09-12 13:13:07 -05:00

58 lines
2.0 KiB
Bash

#! /bin/bash
# OpenCL SDK
# Source: https://github.com/KhronosGroup/OpenCL-SDK.git
# Commit: fc6482202e9a7484f15a4a438dd5bcb2ee56c32a
# Commit: ae7fcae82fe0b7bcc272e43fc324181b2d544eea
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: git cmake
# Recommended: glm glew Mesa
# Optional: cargs TCLAP Stb SFML
# Pull a copy of the source with git
git clone https://github.com/KhronosGroup/OpenCL-SDK.git
#git checkout fc6482202e9a7484f15a4a438dd5bcb2ee56c32a
git checkout ae7fcae82fe0b7bcc272e43fc324181b2d544eea
git submodule init && git submodule update
# If Xorg libraries are not in /usr/lib:
export XTRACONF="-DCMAKE_FIND_ROOT_PATH=/opt/Xorg "
# Configure
cmake -B OUT -DCMAKE_INSTALL_PREFIX=/opt/build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_DOCS=OFF $XTRACONF -DOPENCL_SDK_BUILD_SAMPLES=OFF -Wno-dev
read -p "Compile?" && make -j2 -C OUT &&
unset XTRACONF
sudo -S make DESTDIR=$BUILD -C OUT install &&
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------------------------------------------------------|
opencl-sdk: opencl-sdk
opencl-sdk:
opencl-sdk: The Khronos OpenCL SDK. It brings together all the components needed
opencl-sdk: to develop OpenCL applications:
opencl-sdk: o Headers
opencl-sdk: o C++ bindings
opencl-sdk: o Loader
opencl-sdk: o utility library
opencl-sdk:
opencl-sdk: https://github.com/KhronosGroup/OpenCL-SDK
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/opencl-sdk-2023.6.14-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*