void-packages/srcpkgs/xava/patches/broken-cmake.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

22 lines
682 B
Diff

--- a/CMakeLists.txt 2020-08-27 15:31:42.000000000 +0700
+++ b/CMakeLists.txt 2021-01-14 21:44:51.704505119 +0700
@@ -10,19 +10,6 @@
option(SNDIO "SNDIO" ON)
option(PORTAUDIO "PORTAUDIO" ON)
-# Fix pkg-config for cross-builds (such as MinGW on ArchLinux)
-if(CMAKE_FIND_ROOT_PATH)
- set(CMAKE_SYSROOT "${CMAKE_FIND_ROOT_PATH}")
-
- set(ENV{PKG_CONFIG_DIR} "")
- set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/lib/pkgconfig:${CMAKE_SYSROOT}/share/pkgconfig")
- set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
-endif()
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug)
-endif()
-
set(CMAKE_C_STANDARD 11)
set(xava_VERSION_MAJOR 0)
set(xava_VERSION_MINOR 6)