void-packages/srcpkgs/passwordsafe/patches/use-gtest-from-package.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

37 lines
1.5 KiB
Diff

--- a/CMakeLists.txt 2021-02-25 23:45:37.917034534 +0100
+++ b/CMakeLists.txt 2021-02-26 00:05:34.138397928 +0100
@@ -255,34 +255,6 @@
endif (USE_ASAN)
endif (MSVC)
-if (NOT NO_GTEST)
- # Download and unpack googletest at configure time
- # See https://crascit.com/2015/07/25/cmake-gtest/
- configure_file(Misc/CMakeLists.gtest.txt.in googletest-download/CMakeLists.txt)
- execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download" )
- execute_process(COMMAND "${CMAKE_COMMAND}" --build .
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download" )
-
- # Prevent GoogleTest from overriding our compiler/linker options
- # when building with Visual Studio
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- # Set some other gtest configurations:
- set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
- set(BUILD_GTEST ON CACHE BOOL "" FORCE)
- set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
-
- # Add googletest directly to our build. This adds
- # the following targets: gtest, gtest_main, gmock
- # and gmock_main
- add_subdirectory("${CMAKE_BINARY_DIR}/googletest-src"
- "${CMAKE_BINARY_DIR}/googletest-build")
-
- include_directories("${gtest_SOURCE_DIR}/include"
-# "${gmock_SOURCE_DIR}/include"
- )
-endif(NOT NO_GTEST)
-
if (WIN32 AND NOT WX_WINDOWS)
set(VERSION_IN "${PROJECT_SOURCE_DIR}/src/ui/Windows/version.in")
else (WIN32 AND NOT WX_WINDOWS)