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

26 lines
1,011 B
Diff

Index: external_libraries/tcplay/CMakeLists.txt
===================================================================
--- a/external_libraries/tcplay/CMakeLists.txt
+++ b/external_libraries/tcplay/CMakeLists.txt
@@ -13,7 +13,7 @@ set (SRCS_LINUX crypto-gcrypt.c)
set (CFLAGS_LINUX "-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE")
set (CFLAGS_WARN "-w")
set (CFLAGS_DEBUG "-O0 -g3 -DDEBUG")
-set (CFLAGS_OPT "-O3")
+set (CFLAGS_OPT "")
set (CFLAGS_VER "-DMAJ_VER=${VERSION_MAJOR} -DMIN_VER=${VERSION_MINOR}")
set (CFLAGS_COMMON "-std=c99 -fPIC ${CFLAGS_LINUX} ${CFLAGS_WARN} ${CFLAGS_VER}")
if ($ENV{DEBUG})
Index: external_libraries/tcplay/Makefile.classic
===================================================================
--- a/external_libraries/tcplay/Makefile.classic
+++ b/external_libraries/tcplay/Makefile.classic
@@ -47,8 +47,6 @@ COMMON_CFLAGS= $(WARNFLAGS) -fPIC $(VER_
ifeq ($(DEBUG), yes)
COMMON_CFLAGS+= -O0 -g -DDEBUG
-else
- COMMON_CFLAGS+= -O3
endif
ifeq (${SYSTEM}, linux)