void-packages/srcpkgs/stlink/patches/04-fix-paths.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

58 lines
2.1 KiB
Diff

From 2016590502558caa98c21abad2ce83c5f4804a98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Mon, 1 Jun 2020 00:20:26 +0200
Subject: [PATCH] doc/man: Fix installation directory
On Unix-like operating systems man pages are commonly installed to
`/usr/share/man` not `/usr/share/stlink/man`.
---
doc/man/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt
index 23da9e15..9b3c5076 100644
--- a/doc/man/CMakeLists.txt
+++ b/doc/man/CMakeLists.txt
@@ -30,7 +30,7 @@ foreach (manpage ${MANPAGES})
endif ()
if (f AND NOT WIN32)
- install(FILES ${f} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/man/man1)
+ install(FILES ${f} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man1)
unset(f)
endif ()
endforeach ()
From e95b5ffcfe38c917a1f421c2257e58a3d9b2e8cc Mon Sep 17 00:00:00 2001
From: Vasiliy Glazov <vascom2@gmail.com>
Date: Mon, 1 Jun 2020 08:44:11 +0300
Subject: [PATCH] Fix installation path for desktop-file and icons.
This change fixes installation path for desktop-file and icons.
They should be installed directly to
```
/usr/share/applications/
/usr/share/icons/hicolor/scalable/apps/
```
---
src/stlink-gui/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/stlink-gui/CMakeLists.txt b/src/stlink-gui/CMakeLists.txt
index 8c36e5a1..cc68509f 100644
--- a/src/stlink-gui/CMakeLists.txt
+++ b/src/stlink-gui/CMakeLists.txt
@@ -13,11 +13,11 @@ if (NOT WIN32)
# Install desktop application entry
install(FILES stlink-gui.desktop
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/applications)
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
# Install icons
install(FILES icons/stlink-gui.svg
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/icons/hicolor/scalable/apps)
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
set(GUI_SOURCES gui.c gui.h)