31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
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.10
|
|
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" '{}' \;
|
|
sed -e "s/HAVE_DECL_PROGRAM.*/defined(_GNU_SOURCE)/" \
|
|
-i swift-corelibs-${name}-*/src/shims/getprogname.h
|
|
|
|
cmake -S swift-corelibs-$name-* -B build \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -D_GNU_SOURCE" \
|
|
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -D_GNU_SOURCE" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBlocksRuntime_INCLUDE_DIR=/usr/include \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH=on \
|
|
-G Ninja
|
|
ninja -C build -j ${JOBS:-1}
|
|
DESTDIR=$PKG ninja -C build install
|
|
}
|