forked from such-gitea/wownero-lws
Update .gitea/workflows/build.yaml
All checks were successful
Build Wowlet / build-macos (push) Successful in 1m33s
All checks were successful
Build Wowlet / build-macos (push) Successful in 1m33s
This commit is contained in:
@@ -39,11 +39,20 @@ jobs:
|
||||
|
||||
- name: Patch for macOS (Remove librt)
|
||||
run: |
|
||||
echo "Patching src/CMakeLists.txt to remove Linux-only 'rt' library..."
|
||||
# Use sed to find " rt " and replace it with a space.
|
||||
# The -i '' is required for macOS sed to edit in-place.
|
||||
sed -i '' 's/ rt / /g' src/CMakeLists.txt
|
||||
sed -i '' 's/ rt)/ )/g' src/CMakeLists.txt
|
||||
echo "Patching CMakeLists to remove Linux-only 'rt' library..."
|
||||
|
||||
# 1. Use Perl to replace 'rt' with nothing, respecting word boundaries (\b).
|
||||
# This catches " rt ", " rt)", " rt", etc., regardless of whitespace.
|
||||
perl -i -pe 's/\brt\b//g' src/CMakeLists.txt
|
||||
|
||||
# 2. Just in case it's in the root file too (some forks do this)
|
||||
if [ -f "CMakeLists.txt" ]; then
|
||||
perl -i -pe 's/\brt\b//g' CMakeLists.txt
|
||||
fi
|
||||
|
||||
# 3. Print the file to the log so we can verify the patch worked (Debugging)
|
||||
echo "--- DEBUG: src/CMakeLists.txt content after patch ---"
|
||||
grep -C 5 "target_link_libraries" src/CMakeLists.txt || true
|
||||
|
||||
- name: Build macOS
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user