void-packages/srcpkgs/libdbus-c++/patches/cross-tools.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

21 lines
532 B
Diff

--- a/tools/Makefile.am 2018-03-18 17:20:02.221259868 +0100
+++ b/tools/Makefile.am 2018-03-18 17:19:53.192259402 +0100
@@ -1,6 +1,9 @@
# hacky, but ...
CXX = $(CXX_FOR_BUILD)
+CFLAGS=$(CFLAGS_FOR_BUILD)
+CXXFLAGS=$(CXXFLAGS_FOR_BUILD)
+LDFLAGS=$(LDFLAGS_FOR_BUILD)
AM_CPPFLAGS = \
$(dbus_CFLAGS) \
@@ -13,7 +13,7 @@
-Wall
if CROSS_COMPILING
-libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la
+libdbus_cxx_la = /usr/lib/libdbus-c++-1.so
else
libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la
endif