From 7b1b6a81794b270f4770cd3b6c7d21d68263879a Mon Sep 17 00:00:00 2001 From: John McQuah Date: Fri, 7 Jun 2024 11:43:17 +0000 Subject: [PATCH] libdispatch: fix build on CRUX musl --- libdispatch/.signature | 4 ++-- libdispatch/Pkgfile | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/libdispatch/.signature b/libdispatch/.signature index 632fcf4..1580123 100644 --- a/libdispatch/.signature +++ b/libdispatch/.signature @@ -1,5 +1,5 @@ untrusted comment: verify with /etc/ports/jmq.pub -RWTTPlFarK9CxB8o2MO5+jZrq6U61ClvC1W/4EU9H3s3A5w2lS4BLzxmsjYeHoPH9jdaHlKOZXkRvui6vxdML0B0G/GpshI7RAk= -SHA256 (Pkgfile) = c9692ea9d861977fc47855bde2ec69ded97b7fa2ad804952a6e9cf2b49171cc6 +RWTTPlFarK9CxMazw2Wg+GAU5BYEbEFlxUs3AvDmMMsZSWrVaHLT9nAvOo8tmDyn8g0ODhtqbKp5+DJArge1P54yD4gpBHQOfgE= +SHA256 (Pkgfile) = 38f030362ed16964db7ca663dc710e09ac5badee71c804848eaf19debdcc41d0 SHA256 (.footprint) = 434fdf7c780c53773601779638fdd9582f322134ab7a7a039381c6a8c6e12583 SHA256 (swift-5.10-RELEASE.zip) = c70831a43bb712e4abffc1868c59e47b4a0937e8b70e16739bc398be27dcb76c diff --git a/libdispatch/Pkgfile b/libdispatch/Pkgfile index 7b2de8a..18e4e61 100644 --- a/libdispatch/Pkgfile +++ b/libdispatch/Pkgfile @@ -11,16 +11,20 @@ source=(https://github.com/apple/swift-corelibs-$name/archive/refs/tags/swift-$v build() { find swift-corelibs-* -name DispatchCompilerWarnings.cmake \ -exec sed -i "/-Werror/d" '{}' \; - mkdir build && cd build + sed -e "s/HAVE_DECL_PROGRAM.*/defined(_GNU_SOURCE)/" \ + -i swift-corelibs-${name}-*/src/shims/getprogname.h - 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 + 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 }