void-packages/srcpkgs/occt/patches/fix-cmake-regex.patch
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

14 lines
748 B
Diff

# fix regex for cmake Config file
# inspired by https://git.archlinux.org/svntogit/community.git/commit/trunk/cmake-fix-variable.patch?h=packages/opencascade&id=c99074d88da40ae59882aaf173de94cd0ec73ca7
--- a/adm/templates/OpenCASCADEConfig.cmake.in 2019-01-27 00:18:42.763819658 -0500
+++ b/adm/templates/OpenCASCADEConfig.cmake.in 2019-01-27 23:40:32.872489521 -0500
@@ -26,7 +26,7 @@
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
-if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
+if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib(32|64)?$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()