From ad719a938c4b11ed15a0d05a8ff270a975b08862 Mon Sep 17 00:00:00 2001 From: Arda Demir Date: Mon, 13 Dec 2021 03:43:56 +0300 Subject: [PATCH] stlink: update to 1.7.0. --- .../01-install-pkgconfig-files-again.patch | 22 ------- .../stlink/patches/02-enable-cross-gtk.patch | 11 ---- .../patches/03-dont-link-ssp-as-static.patch | 11 ---- srcpkgs/stlink/patches/04-fix-paths.patch | 58 ------------------- srcpkgs/stlink/patches/enable-cross-gtk.patch | 11 ++++ .../patches/{05-musl.patch => musl.patch} | 0 srcpkgs/stlink/template | 18 +++--- 7 files changed, 20 insertions(+), 111 deletions(-) delete mode 100644 srcpkgs/stlink/patches/01-install-pkgconfig-files-again.patch delete mode 100644 srcpkgs/stlink/patches/02-enable-cross-gtk.patch delete mode 100644 srcpkgs/stlink/patches/03-dont-link-ssp-as-static.patch delete mode 100644 srcpkgs/stlink/patches/04-fix-paths.patch create mode 100644 srcpkgs/stlink/patches/enable-cross-gtk.patch rename srcpkgs/stlink/patches/{05-musl.patch => musl.patch} (100%) diff --git a/srcpkgs/stlink/patches/01-install-pkgconfig-files-again.patch b/srcpkgs/stlink/patches/01-install-pkgconfig-files-again.patch deleted file mode 100644 index 238387c6e902..000000000000 --- a/srcpkgs/stlink/patches/01-install-pkgconfig-files-again.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e0a029f305f199ad46f35d001931e9b531e1abcd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= -Date: Mon, 1 Jun 2020 00:27:18 +0200 -Subject: [PATCH] CMakeLists.txt: Install pkgconfig files again - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 86282775..60f9087d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -49,7 +49,7 @@ find_package(libusb REQUIRED) - - ## Package configuration (pkg-config) on unix-based systems - if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING) -- #add_subdirectory(cmake/pkgconfig) -+ add_subdirectory(cmake/pkgconfig) - find_package(PkgConfig) - pkg_check_modules(GTK3 gtk+-3.0) - endif () diff --git a/srcpkgs/stlink/patches/02-enable-cross-gtk.patch b/srcpkgs/stlink/patches/02-enable-cross-gtk.patch deleted file mode 100644 index b4f461ee5234..000000000000 --- a/srcpkgs/stlink/patches/02-enable-cross-gtk.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -48,7 +48,7 @@ - find_package(libusb REQUIRED) - - ## Package configuration (pkg-config) on unix-based systems --if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING) -+if (NOT WIN32) - add_subdirectory(cmake/pkgconfig) - find_package(PkgConfig) - pkg_check_modules(GTK3 gtk+-3.0) diff --git a/srcpkgs/stlink/patches/03-dont-link-ssp-as-static.patch b/srcpkgs/stlink/patches/03-dont-link-ssp-as-static.patch deleted file mode 100644 index a5c79c2abd31..000000000000 --- a/srcpkgs/stlink/patches/03-dont-link-ssp-as-static.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -71,7 +71,7 @@ - - CHECK_LIBRARY_EXISTS(ssp __stack_chk_fail "" _stack_chk_fail_exists) - if (_stack_chk_fail_exists) -- set(SSP_LIB -static ssp) -+ set(SSP_LIB ssp) - else () - set(SSP_LIB "") - endif () diff --git a/srcpkgs/stlink/patches/04-fix-paths.patch b/srcpkgs/stlink/patches/04-fix-paths.patch deleted file mode 100644 index c6fb69b89089..000000000000 --- a/srcpkgs/stlink/patches/04-fix-paths.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2016590502558caa98c21abad2ce83c5f4804a98 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= -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 -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) - diff --git a/srcpkgs/stlink/patches/enable-cross-gtk.patch b/srcpkgs/stlink/patches/enable-cross-gtk.patch new file mode 100644 index 000000000000..d55e9f9d2724 --- /dev/null +++ b/srcpkgs/stlink/patches/enable-cross-gtk.patch @@ -0,0 +1,11 @@ +--- a/src/stlink-gui/CMakeLists.txt ++++ b/src/stlink-gui/CMakeLists.txt +@@ -2,7 +2,7 @@ + # Build GUI + ### + +-if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING) ++if (NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(GTK3 gtk+-3.0) + diff --git a/srcpkgs/stlink/patches/05-musl.patch b/srcpkgs/stlink/patches/musl.patch similarity index 100% rename from srcpkgs/stlink/patches/05-musl.patch rename to srcpkgs/stlink/patches/musl.patch diff --git a/srcpkgs/stlink/template b/srcpkgs/stlink/template index 06f39a7cf256..44788bd15f25 100644 --- a/srcpkgs/stlink/template +++ b/srcpkgs/stlink/template @@ -1,19 +1,19 @@ # Template file for 'stlink' pkgname=stlink -version=1.6.1 +version=1.7.0 revision=1 build_style=cmake -configure_args="-DSTLINK_UDEV_RULES_DIR=/usr/lib/udev/rules.d -DSTLINK_MODPROBED_DIR=/usr/lib/modprobe.d - -DSTLINK_LIBRARY_PATH=/usr/lib" +configure_args="-DSTLINK_UDEV_RULES_DIR=/usr/lib/udev/rules.d + -DSTLINK_MODPROBED_DIR=/usr/lib/modprobe.d -DSTLINK_LIBRARY_PATH=/usr/lib" hostmakedepends="pkg-config" makedepends="libusb-devel gtk+3-devel" -short_desc="STM32 discovery line Linux programmer" +short_desc="Firmware programmer for STM32 STLINK v1/v2/v3 protocol" maintainer="bra1nwave " license="BSD-3-Clause" -homepage="https://github.com/texane/stlink" -changelog="https://raw.githubusercontent.com/texane/stlink/master/CHANGELOG.md" +homepage="https://github.com/stlink-org/stlink" +changelog="https://raw.githubusercontent.com/stlink-org/stlink/master/CHANGELOG.md" distfiles="${homepage}/archive/v${version}.tar.gz" -checksum=ca9a640f84c3e2c9873bd51759594bc05c00cdf6e1f21b434ae2c0e7985433d8 +checksum=57ec1214905aedf59bee7f70ddff02316f64fa9ba5a9b6a3a64952edc5b65855 post_install() { vlicense LICENSE.md LICENSE @@ -27,7 +27,6 @@ stlink-devel_package() { vmove usr/include vmove "usr/lib/*.so" vmove "usr/lib/*.a" - vmove usr/lib/pkgconfig } } @@ -35,8 +34,9 @@ stlink-gtk_package() { short_desc+=" - GTK+3 frontend" depends="${sourcepkg}>=${version}_${revision} hicolor-icon-theme desktop-file-utils" pkg_install() { + vmove usr/bin/stlink-gui vmove usr/share/applications/stlink-gui.desktop vmove usr/share/icons/hicolor/scalable/apps/stlink-gui.svg - vmove "usr/bin/stlink-gui*" + vmove usr/share/stlink/stlink-gui.ui } }