void-packages/srcpkgs/seexpr-krita/patches/cmake-build-type-none.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

32 lines
1,009 B
Diff

Index: CMakeLists.txt
===================================================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,14 +42,6 @@ endif()
## Choose build options
# Disney specific method of choosing variant
-if (${FLAVOR} STREQUAL "optimize")
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE)
-endif()
-
-if (${FLAVOR} STREQUAL "debug")
- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE)
-endif()
-
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
execute_process(
COMMAND sh -c "echo `uname -s`-`uname -r | cut -d- -f1`-`uname -m`"
@@ -212,12 +204,6 @@ else()
endif()
# Set to release if nothing else defined
-if (NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING
- "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
- FORCE)
-endif()
-
if (ENABLE_QT5)
find_package(Qt5 5.9.0 COMPONENTS Core Gui Widgets REQUIRED)
set_package_properties(Qt5 PROPERTIES