void-packages/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```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

18 lines
708 B
Diff

--- a/src/avtk/CMakeLists.txt 2016-12-24 19:36:45.000000000 +0000
+++ b/src/avtk/CMakeLists.txt 2019-03-09 11:20:24.063980037 +0000
@@ -55,8 +55,13 @@
link_directories ( ${X11_LIBRARY_DIRS} )
-SET(CMAKE_C_FLAGS "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
-SET(CMAKE_CXX_FLAGS "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # -fsanitize=address
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # -fsanitize=address
+
+IF(BUILD_SSE)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -mfpmath=sse")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -mfpmath=sse")
+ENDIF()
FILE(GLOB src libs/pffft.cxx avtk/*.cxx )