gnu: USB_ModeSwitch: Update to 2.6.0.

* gnu/packages/usb-modeswitch.scm (usb-modeswitch): Update to 2.6.0.
[source]: Remove snippet that deletes jimtcl, which is no longer bundled.
Remove patch.  Use HTTPS.
[arguments]: Adapt to changed file names.
[home-page] Use HTTPS.
[license]: Fix missing BSD-2 license.
* gnu/packages/patches/usb-modeswitch-accept-config-arg.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Florian Pelz 2020-01-15 13:50:31 +01:00
parent 317f925b7f
commit d0759f6134
No known key found for this signature in database
GPG key ID: 300888CB39C63817
3 changed files with 8 additions and 58 deletions

View file

@ -1445,7 +1445,6 @@ dist_patch_DATA = \
%D%/packages/patches/util-linux-tests.patch \
%D%/packages/patches/upower-builddir.patch \
%D%/packages/patches/upx-fix-CVE-2017-15056.patch \
%D%/packages/patches/usb-modeswitch-accept-config-arg.patch \
%D%/packages/patches/valgrind-enable-arm.patch \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \

View file

@ -1,42 +0,0 @@
--- old/usb_modeswitch.tcl 1970-01-01 01:00:00.000000000 +0100
+++ usb_modeswitch.tcl 2019-06-12 08:39:42.140000000 +0200
@@ -41,7 +41,7 @@
global scsi usb config match device flags setup devdir loginit
set flags(config) ""
-Log "[ParseGlobalConfig]"
+Log "[ParseGlobalConfig $argv]"
if {$flags(stordelay) > 0} {
SetStorageDelay $flags(stordelay)
@@ -496,9 +496,21 @@
# end of proc {MatchDevice}
-proc {ParseGlobalConfig} {} {
+proc {ParseGlobalConfig} {argv} {
global flags
+
+set configFileParam ""
+for {set i 0} {$i < [llength $argv]} {incr i} {
+ switch -glob -- [set v [lindex $argv $i]] {
+ --config-file=* {
+ set configFileParam $v
+ }
+ }
+}
+if {$configFileParam != ""} {
+ set configFile [string range $configFileParam [string length "--config-file="] end]
+} else {
set configFile ""
set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch]
foreach cfg $places {
@@ -507,6 +519,7 @@
break
}
}
+}
if {$configFile == ""} {return}
set rc [open $configFile r]

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2019, 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@ -76,23 +76,15 @@ (define-public usb-modeswitch-data
(define-public usb-modeswitch
(package
(name "usb-modeswitch")
(version "2.5.2")
(version "2.6.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://www.draisberghof.de/usb_modeswitch/"
"https://www.draisberghof.de/usb_modeswitch/"
"usb-modeswitch-" version ".tar.bz2"))
(sha256
(base32
"19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb"))
(modules '((guix build utils)))
(snippet
;; Remove bundled jimtcl.
'(begin
(delete-file-recursively "jim")
#t))
(patches
(search-patches "usb-modeswitch-accept-config-arg.patch"))))
"18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2"))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("libusb" ,libusb)
("jimtcl" ,jimtcl)
@ -145,7 +137,7 @@ (define-public usb-modeswitch
(rename-file "usb_modeswitch.sh" "usb_modeswitch")
(install-file "usb_modeswitch" udev)
(rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher")
(rename-file "usb_modeswitch_dispatcher.tcl" "usb_modeswitch_dispatcher")
(substitute* "usb_modeswitch_dispatcher"
(("/usr/bin/tclsh")
(string-append jimtcl "/bin/jimsh"))
@ -155,7 +147,7 @@ (define-public usb-modeswitch
(install-file "usb_modeswitch_dispatcher"
dispatcher-bin)
#t)))))))
(home-page "http://www.draisberghof.de/usb_modeswitch/")
(home-page "https://www.draisberghof.de/usb_modeswitch/")
(synopsis "Mode switching tool for controlling `multi-mode' USB devices")
(description "USB_ModeSwitch is a mode switching tool for controlling USB
devices with multiple @dfn{modes}. When plugged in for the first time many
@ -163,4 +155,5 @@ (define-public usb-modeswitch
containing installers for Windows drivers. USB_ModeSwitch replays the
sequence the Windows drivers would send to switch their mode from storage to
modem (or whatever the thing is supposed to do).")
(license license:gpl2+)))
(license (list license:gpl2+ ;"this program" according to home page
license:bsd-2)))) ;dispatcher.c