cruxports/libdispatch/Pkgfile

27 lines
943 B
Plaintext

# Description: grand central dispatch, from swift corelibs
# URL: https://github.com/apple/swift-corelibs-libdispatch/releases
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: clang
name=libdispatch
version=5.5.3
release=1
source=(https://github.com/apple/swift-corelibs-$name/archive/refs/tags/swift-$version-RELEASE.zip)
build() {
find swift-corelibs-* -name DispatchCompilerWarnings.cmake \
-exec sed -i "/-Werror/d" '{}' \;
mkdir build && cd build
cmake -G Ninja -DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBlocksRuntime_INCLUDE_DIR=/usr/include \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=on \
../swift-corelibs-$name-*
ninja -j ${JOBS:-1}
DESTDIR=$PKG ninja install
}