cruxports/libdispatch/Pkgfile

31 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-02-26 14:04:55 -05:00
# 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
2022-02-26 14:04:55 -05:00
name=libdispatch
2024-05-27 18:57:18 -04:00
version=5.10
2022-02-26 14:04:55 -05:00
release=1
source=(https://github.com/apple/swift-corelibs-$name/archive/refs/tags/swift-$version-RELEASE.zip)
build() {
find swift-corelibs-* -name DispatchCompilerWarnings.cmake \
2022-12-23 08:54:37 -05:00
-exec sed -i "/-Werror/d" '{}' \;
2024-06-07 07:43:17 -04:00
sed -e "s/HAVE_DECL_PROGRAM.*/defined(_GNU_SOURCE)/" \
-i swift-corelibs-${name}-*/src/shims/getprogname.h
2022-02-26 14:04:55 -05:00
2024-06-07 07:43:17 -04:00
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
2022-02-26 14:04:55 -05:00
}