void-packages/srcpkgs/wireshark/patches/cross.patch
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine 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

41 lines
1.1 KiB
Diff

Source: Johannes (@jnbr)
Upstream: no
--- a/tools/lemon/CMakeLists.txt 2019-02-28 18:56:38.000000000 +0100
+++ b/tools/lemon/CMakeLists.txt 2019-03-11 20:41:14.211616335 +0100
@@ -7,6 +7,14 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
+if(CMAKE_CROSSCOMPILING)
+ add_custom_target(
+ lemon
+ COMMAND $ENV{CC_FOR_BUILD} -o ${EXECUTABLE_OUTPUT_PATH}/lemon ${CMAKE_CURRENT_SOURCE_DIR}/lemon.c
+ COMMENT "generate lemon for host"
+ )
+else()
+
add_executable(lemon lemon.c)
# To keep lemon.c as close to upstream as possible, deliberately ignore
@@ -62,6 +70,7 @@
endif()
target_compile_options(lemon PRIVATE ${lemon_cflags})
+endif() # CMAKE_CROSSCOMPILING
#
# Editor modelines - https://www.wireshark.org/tools/modelines.html
#
--- a/cmake/modules/UseLemon.cmake 2019-02-28 18:56:38.000000000 +0100
+++ b/cmake/modules/UseLemon.cmake 2019-03-11 21:19:28.352163076 +0100
@@ -13,7 +13,7 @@
# These files are generated as side-effect
${_out}.h
${_out}.out
- COMMAND lemon
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/lemon
-T${_lemonpardir}/lempar.c
-d.
${_in}