From 02f8d6e831c649e7ce9b132aef74b528f10a1ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 9 Nov 2024 15:02:55 +0200 Subject: [PATCH] more adhoc patching of CMakeLists.txt This happens often, and it's structure is known well enough to be processed with sed. --- ...60e7f6a-CMakeLists.txt-remove-stage3.patch | 39 ------------------- run | 4 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch diff --git a/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch b/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch deleted file mode 100644 index ac81257..0000000 --- a/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch +++ /dev/null @@ -1,39 +0,0 @@ -From fb173ca3a0cd07789dbd7c71a8e9350eef630352 Mon Sep 17 00:00:00 2001 -From: motiejus -Date: Wed, 6 Nov 2024 20:42:27 +0000 -Subject: [PATCH] 0.10.0-961-g54160e7f6a: CMakeLists.txt: remove stage3 - ---- - CMakeLists.txt | 19 ------------------- - 1 file changed, 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 997bfd51f6..4ea143bce7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -862,22 +862,3 @@ set(ZIG_BUILD_ARGS - "-Dcpu=${ZIG_TARGET_MCPU}" - "-Dversion-string=${RESOLVED_ZIG_VERSION}" - ) -- --add_custom_target(stage3 ALL -- COMMAND zig2 build compile ${ZIG_BUILD_ARGS} -- DEPENDS zig2 -- COMMENT STATUS "Building stage3" -- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" --) -- --if(WIN32) -- set(ZIG_EXECUTABLE "${CMAKE_BINARY_DIR}/zig2.exe") --else() -- set(ZIG_EXECUTABLE "${CMAKE_BINARY_DIR}/zig2") --endif() -- --install(CODE "set(ZIG_EXECUTABLE \"${ZIG_EXECUTABLE}\")") --install(CODE "set(ZIG_BUILD_ARGS \"${ZIG_BUILD_ARGS}\")") --install(CODE "set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")") --install(CODE "set(CMAKE_SOURCE_DIR \"${CMAKE_SOURCE_DIR}\")") --install(SCRIPT "${CMAKE_SOURCE_DIR}/cmake/install.cmake") --- -2.39.5 - diff --git a/run b/run index 460623b..55241d7 100755 --- a/run +++ b/run @@ -13,6 +13,7 @@ fullbuild() { # zig2 halfbuild() { + sed -i '/^add_custom_target(stage3/,/^)$/d' CMakeLists.txt rm -fr build mkdir build pushd build @@ -220,7 +221,6 @@ step07() { git archive --prefix=zig-$STEP07_/ $STEP07 | tar -C .. -x { pushd "../zig-$STEP07_" - patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch" cp ../zig-$STEP06_/stage1/zig1.wasm stage1/zig1.wasm halfbuild popd @@ -362,7 +362,6 @@ step14() { git archive --prefix=zig-$STEP14_/ $STEP14 | tar -C .. -x { pushd "../zig-$STEP14_" - patch -p1 <"$HERE/0.10.0-1657-g321ccbdc52-CMakeLists.txt-remove-stage3.patch" cp ../zig-$STEP13_/stage1/zig1.wasm stage1/zig1.wasm halfbuild popd @@ -402,7 +401,6 @@ step16() { { pushd "../zig-$STEP16_" cp ../zig-$STEP15_/stage1/zig1.wasm stage1/zig1.wasm - patch -p1 <"$HERE/0.10.0-1657-g321ccbdc52-CMakeLists.txt-remove-stage3.patch" halfbuild popd }