void-packages/srcpkgs/synergy/patches/cmake.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

22 lines
883 B
Diff

--- a/CMakeLists.txt 2020-12-29 14:53:13.000000000 +0100
+++ b/CMakeLists.txt 2020-12-29 14:53:13.000000000 +0100
@@ -87,6 +87,7 @@
include (CheckIncludeFileCXX)
include (CheckSymbolExists)
include (CheckCSourceCompiles)
+ include (FindPkgConfig)
check_include_file_cxx (istream HAVE_ISTREAM)
check_include_file_cxx (ostream HAVE_OSTREAM)
@@ -247,6 +248,11 @@
if (HAVE_Xi)
list (APPEND libs Xi)
endif()
+ if (${PKG_CONFIG_FOUND})
+ pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd)
+ include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS})
+ set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${AVAHI_COMPAT_INCLUDE_DIRS}")
+ endif ()
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_BUILD_LEGACY_GUI)
set (DnsSdlib "dns_sd.h")