void-packages/srcpkgs/lmms/patches/cross.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

28 lines
1.1 KiB
Diff

--- a/CMakeLists.txt 2017-12-19 18:24:15.000000000 +0100
+++ b/CMakeLists.txt 2017-12-19 18:24:15.000000000 +0100
@@ -498,12 +498,12 @@
LIST(SORT LMMS_INCLUDES)
# embedded resources stuff
-IF(WIN32 OR WIN64)
+IF(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
# compile buildtools native
SET(BIN2RES_CPP "${CMAKE_SOURCE_DIR}/buildtools/bin2res.cpp")
SET(BIN2RES "${CMAKE_BINARY_DIR}/bin2res")
ADD_CUSTOM_TARGET(bin2res COMMAND g++ "\"${BIN2RES_CPP}\"" -o "\"${BIN2RES}\"" DEPENDS "${BIN2RES_CPP}")
-ELSE(WIN32 OR WIN64)
+ELSE(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(bin2res buildtools/bin2res.cpp)
GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION)
ENDIF(WIN32 OR WIN64)
--- a/CMakeLists.txt 2018-03-26 13:35:11.477353707 +0200
+++ b/CMakeLists.txt 2018-03-26 13:35:11.477353707 +0200
@@ -506,7 +506,7 @@
ELSE(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(bin2res buildtools/bin2res.cpp)
GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION)
-ENDIF(WIN32 OR WIN64)
+ENDIF(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
# we somehow have to make LMMS-binary depend on MOC-files
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")