void-packages/srcpkgs/libvidstab/patches/fix-cflags.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

39 lines
1.5 KiB
Diff

Index: CMakeLists.txt
===================================================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ else()
set(LIBSUFFIX "")
endif()
-add_definitions( -Wall -O3 -g -Wno-pointer-sign -fPIC -std=gnu99)
+add_definitions( -Wall -Wno-pointer-sign -fPIC -std=gnu99)
# add_definitions( -Wall -O0 -g -Wno-pointer-sign )
### ORC is not used in any active code at the moment ###
Index: tests/CMakeLists.txt
===================================================================
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
option(USE_OMP "use parallelization use OMP" ON)
#add_definitions( -Wall -O3 -Wno-pointer-sign -DTESTING -std=gnu99)
-add_definitions( -Wall -O0 -g -Wno-pointer-sign -DTESTING -std=gnu99)
+add_definitions( -Wall -Wno-pointer-sign -DTESTING -std=gnu99)
find_package(Orc)
if(ORC_FOUND)
add_definitions( -DUSE_ORC ${ORC_DEFINITIONS})
Index: transcode/CMakeLists.txt
===================================================================
--- a/transcode/CMakeLists.txt
+++ b/transcode/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
set(TRANSCODE_ROOT ../../transcode)
-add_definitions( -Wall -O3 -Wno-pointer-sign -DTRANSCODE -std=gnu99)
+add_definitions( -Wall -Wno-pointer-sign -DTRANSCODE -std=gnu99)
#add_definitions( -Wall -O0 -g -Wno-pointer-sign )
# I tried it with 0.4.14
# 0.4.10 did not work (not all opcode implemented)