Skip to content

Commit

Permalink
devel/stlink: Update to version 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
blacklion committed Jul 13, 2021
1 parent e0d4d22 commit aa65e02
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 68 deletions.
15 changes: 12 additions & 3 deletions devel/stlink/Makefile
@@ -1,5 +1,5 @@
PORTNAME= stlink
PORTVERSION= 1.6.1
PORTVERSION= 1.7.0
DISTVERSIONPREFIX= v
PORTREVISION= 0
CATEGORIES= devel
Expand All @@ -16,25 +16,34 @@ GTK3_USES= gnome
GTK3_USE= GNOME=gtk30

USE_GITHUB= yes
GH_ACCOUNT= texane
GH_ACCOUNT= stlink-org

USES= cmake pkgconfig
USE_CSTD= c99
USE_LDCONFIG= yes

PORTDOCS= README.md ${ALLDOCS}

ALLDOCS= compiling.md developer.txt devices_boards.md \
ALLDOCS= compiling.md dev/developer.txt devices_boards.md \
flashloaders.md release.md tutorial.md \
version_support.md

FLASHLOADERS= cleanroom.md linker.ld Makefile stm32f0.s stm32f4.s \
stm32f4lv.s stm32f7.s stm32f7lv.s stm32l4.s stm32lx.s \

.include <bsd.port.pre.mk>

post-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}/dev
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/README.md
.for DOC in ${ALLDOCS}
${INSTALL_DATA} ${WRKSRC}/doc/${DOC} ${STAGEDIR}${DOCSDIR}/${DOC}
.endfor
${MKDIR} ${STAGEDIR}${DATADIR}
.for F in ${FLASHLOADERS}
${INSTALL_DATA} ${WRKSRC}/flashloaders/${F} ${STAGEDIR}${DATADIR}/${F}
.endfor


.include <bsd.port.post.mk>
6 changes: 3 additions & 3 deletions devel/stlink/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1591103161
SHA256 (texane-stlink-v1.6.1_GH0.tar.gz) = ca9a640f84c3e2c9873bd51759594bc05c00cdf6e1f21b434ae2c0e7985433d8
SIZE (texane-stlink-v1.6.1_GH0.tar.gz) = 295826
TIMESTAMP = 1626176959
SHA256 (stlink-org-stlink-v1.7.0_GH0.tar.gz) = 57ec1214905aedf59bee7f70ddff02316f64fa9ba5a9b6a3a64952edc5b65855
SIZE (stlink-org-stlink-v1.7.0_GH0.tar.gz) = 334883
26 changes: 9 additions & 17 deletions devel/stlink/files/extra-pacth-turn-off-gtk
@@ -1,19 +1,11 @@
--- CMakeLists.txt.orig 2020-06-01 01:00:20.000000000 +0300
+++ CMakeLists.txt 2020-06-02 16:07:00.308748843 +0300
@@ -48,11 +48,11 @@ endif ()
find_package(libusb REQUIRED)
--- CMakeLists.txt.orig 2021-04-25 01:24:02.000000000 +0300
+++ CMakeLists.txt 2021-07-13 15:04:41.612208080 +0300
@@ -295,7 +295,7 @@
# Additional build tasks
###

## Package configuration (pkg-config) on unix-based systems
-if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
- #add_subdirectory(cmake/pkgconfig)
- find_package(PkgConfig)
- pkg_check_modules(GTK3 gtk+-3.0)
-endif ()
+#if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
+# #add_subdirectory(cmake/pkgconfig)
+# find_package(PkgConfig)
+# pkg_check_modules(GTK3 gtk+-3.0)
+#endif ()
-add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
+# add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
add_subdirectory(tests) # contains subordinate CMakeLists to build test executables
add_subdirectory(cmake/packaging) # contains subordinate CMakeLists to build packages

## Check for system-specific additional header files and libraries
include(CheckIncludeFile)
23 changes: 4 additions & 19 deletions devel/stlink/files/patch-CMakeLists.txt
@@ -1,23 +1,8 @@
--- CMakeLists.txt.orig 2020-05-31 22:00:20 UTC
+++ CMakeLists.txt
@@ -71,7 +71,11 @@ include(CheckLibraryExists)

CHECK_LIBRARY_EXISTS(ssp __stack_chk_fail "" _stack_chk_fail_exists)
if (_stack_chk_fail_exists)
- set(SSP_LIB -static ssp)
+ if(WIN32)
+ set(SSP_LIB -static ssp)
+ else()
+ set(SSP_LIB ssp)
+ endif()
else ()
set(SSP_LIB "")
endif ()
@@ -278,6 +282,7 @@ add_subdirectory(include) # contains subordinate CMake
add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
--- CMakeLists.txt.orig 2021-07-13 15:04:41.612208000 +0300
+++ CMakeLists.txt 2021-07-13 15:06:16.763751332 +0300
@@ -299,4 +299,5 @@
add_subdirectory(tests) # contains subordinate CMakeLists to build test executables
add_subdirectory(cmake/packaging) # contains subordinate CMakeLists to build packages
+add_subdirectory(cmake/pkgconfig) # contains subordinate CMakeLists to build pkgconfig file
+add_subdirectory(doc/dev/pkg-config) # contains subordinate CMakeLists to build pkg-config descriptor

option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
add_subdirectory(doc/man) # contains subordinate CMakeLists to generate manpages
10 changes: 0 additions & 10 deletions devel/stlink/files/patch-cmake_modules_c__flags.cmake

This file was deleted.

9 changes: 0 additions & 9 deletions devel/stlink/files/patch-cmake_pkgconfig_CMakeLists.txt

This file was deleted.

9 changes: 9 additions & 0 deletions devel/stlink/files/patch-doc_dev_pkg-config_CMakeLists.txt
@@ -0,0 +1,9 @@
--- doc/dev/pkg-config/CMakeLists.txt.orig 2021-04-25 01:24:02.000000000 +0300
+++ doc/dev/pkg-config/CMakeLists.txt 2021-07-13 15:09:25.486974252 +0300
@@ -11,5 +11,5 @@

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
- DESTINATION ${STLINK_LIBRARY_PATH}/pkgconfig
+ DESTINATION libdata/pkgconfig/
)
8 changes: 4 additions & 4 deletions devel/stlink/files/patch-doc_man_CMakeLists.txt
@@ -1,10 +1,10 @@
--- doc/man/CMakeLists.txt.orig 2020-05-31 22:00:20 UTC
+++ doc/man/CMakeLists.txt
@@ -30,7 +30,7 @@ foreach (manpage ${MANPAGES})
--- doc/man/CMakeLists.txt.orig 2021-07-13 15:08:26.986789558 +0300
+++ doc/man/CMakeLists.txt 2021-04-25 01:24:02.000000000 +0300
@@ -30,7 +30,7 @@
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)
+ install(FILES ${f} DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1)
unset(f)
endif ()
Expand Down
23 changes: 20 additions & 3 deletions devel/stlink/pkg-plist
@@ -1,21 +1,38 @@
bin/st-flash
bin/st-info
bin/st-trace
bin/st-util
include/stlink.h
include/stm32.h
include/stlink/backend.h
include/stlink/chipid.h
include/stlink/commands.h
include/stlink/flash_loader.h
include/stlink/helper.h
include/stlink/libusb_settings.h
include/stlink/logging.h
include/stlink/md5.h
include/stlink/reg.h
include/stlink/sg.h
include/stlink/stlink.h
include/stlink/stm32.h
include/stlink/usb.h
include/stlink/version.h
lib/libstlink.so
lib/libstlink.so.1
lib/libstlink.so.1.6.1
lib/libstlink.so.1.7.0
lib/libstlink.a
libdata/pkgconfig/stlink.pc
man/man1/st-flash.1.gz
man/man1/st-info.1.gz
man/man1/st-util.1.gz
%%DATADIR%%/Makefile
%%DATADIR%%/cleanroom.md
%%DATADIR%%/linker.ld
%%DATADIR%%/stm32f0.s
%%DATADIR%%/stm32f4.s
%%DATADIR%%/stm32f4lv.s
%%DATADIR%%/stm32f7.s
%%DATADIR%%/stm32f7lv.s
%%DATADIR%%/stm32l4.s
%%DATADIR%%/stm32lx.s
%%GTK3%%bin/stlink-gui
%%GTK3%%%%DATADIR%%/stlink-gui.ui

0 comments on commit aa65e02

Please sign in to comment.