Skip to content

Commit

Permalink
stlink: Update to 1.3.0
Browse files Browse the repository at this point in the history
Removes gui variant.

Closes: https://trac.macports.org/ticket/53474
  • Loading branch information
ryandesign committed Feb 6, 2017
1 parent 68ab22b commit dbb63e5
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
17 changes: 6 additions & 11 deletions cross/stlink/Portfile
@@ -1,9 +1,10 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup cmake 1.1
PortGroup github 1.0

github.setup texane stlink 1.2.0
github.setup texane stlink 1.3.0
categories cross devel
license BSD
maintainers nomaintainer
Expand All @@ -13,16 +14,10 @@ description Stlink Tools Texane
long_description Open source version of the STMicroelectronics Stlink Tools. \
Provides the following tools: st-flash, st-info, st-term, st-util.

checksums rmd160 72646788e3b4d45c7676471d1d19d5fcbbe525f9 \
sha256 b43dc6569c60cf0d8b44806776bdfa3fbb3e92f2154e6fdbdfeeb4e260ea5a6f

use_autoreconf yes
checksums rmd160 1fffecc282c328e1a3b493f0ff49830f83af5afa \
sha256 2c392d3005f6b3059c4e4e11a1eaf2451d41130de2c7dac9192d3a8dd61c4eb5

depends_lib-append path:lib/libusb-1.0.dylib:libusb

#Does not default variant gui, it is crashing on Snow Leopard.
variant gui description "Provide tool: stlink-gui" {
configure.args-append --with-gtk
depends_lib-append port:gtk3
depends_lib-append port:adwaita-icon-theme
}
patchfiles patch-cmake-modules-FindLibUSB.cmake.diff \
patch-src-logging.c.diff
11 changes: 11 additions & 0 deletions cross/stlink/files/patch-cmake-modules-FindLibUSB.cmake.diff
@@ -0,0 +1,11 @@
--- cmake/modules/FindLibUSB.cmake.orig 2017-01-28 04:55:48.000000000 -0600
+++ cmake/modules/FindLibUSB.cmake 2017-02-05 20:44:46.000000000 -0600
@@ -45,7 +45,7 @@
endif()

if (APPLE)
- set(LIBUSB_NAME libusb-1.0.a)
+ set(LIBUSB_NAME libusb-1.0.dylib)
elseif(MSYS OR MINGW)
set(LIBUSB_NAME usb-1.0)
elseif(WIN32 OR CMAKE_VS_PLATFORM_NAME)
34 changes: 34 additions & 0 deletions cross/stlink/files/patch-src-logging.c.diff
@@ -0,0 +1,34 @@
--- src/logging.c.orig 2017-01-28 11:55:48.000000000 +0100
+++ src/logging.c 2017-02-03 00:12:16.000000000 +0100
@@ -30,25 +30,25 @@
fprintf(stderr, "%d-%02d-%02dT%02d:%02d:%02d ", tt->tm_year + 1900, tt->tm_mon + 1, tt->tm_mday, tt->tm_hour, tt->tm_min, tt->tm_sec);
switch (level) {
case UDEBUG:
- fprintf(stderr, "DEBUG %s: ", tag);
+ fprintf(stderr, "DEBUG: ");
break;
case UINFO:
- fprintf(stderr, "INFO %s: ", tag);
+ fprintf(stderr, "INFO: ");
break;
case UWARN:
- fprintf(stderr, "WARN %s: ", tag);
+ fprintf(stderr, "WARN: ");
break;
case UERROR:
- fprintf(stderr, "ERROR %s: ", tag);
+ fprintf(stderr, "ERROR: ");
break;
case UFATAL:
- fprintf(stderr, "FATAL %s: ", tag);
+ fprintf(stderr, "FATAL: ");
vfprintf(stderr, format, args);
exit(EXIT_FAILURE);
// NEVER GETS HERE!!!
break;
default:
- fprintf(stderr, "%d %s: ", level, tag);
+ fprintf(stderr, "%d: ", level);
break;
}
vfprintf(stderr, format, args);

0 comments on commit dbb63e5

Please sign in to comment.