Ticket #52376: usbutils.4.patch

File usbutils.4.patch, 3.3 KB (added by lbschenkel (Leonardo Brondani Schenkel), 8 years ago)
  • new file usbids/Portfile

    diff --git a/usbids/Portfile b/usbids/Portfile
    new file mode 100644
    - +  
     1# -*- 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
     2# $Id$
     3
     4PortSystem          1.0
     5
     6name                usbids
     7version             2016.09.07
     8categories          sysutils
     9platforms           darwin
     10maintainers         schenkel.net:leonardo openmaintainer
     11license             GPL-2+ BSD-3-Clause
     12description         The USB ID Repository
     13long_description    This is a public repository of all known ID's used in USB \
     14                    devices: ID's of vendors, devices, subsystems and device \
     15                    classes. It is used in various programs (e.g., The USB \
     16                    Utilities) to display full human-readable names instead \
     17                    of cryptic numeric codes.
     18homepage            http://www.linux-usb.org/usb-ids.html
     19
     20master_sites        http://www.linux-usb.org/
     21distname            usb.ids
     22extract.suffix      .gz
     23checksums           rmd160  9a9b3f751611a859f3b8ead57c1402b253a2ada9 \
     24                    sha256  fb5565473730a024f76e97ebcb64643cf59510196591400c41035b376c6e48f8
     25dist_subdir         ${name}/${version}
     26
     27extract.mkdir       yes
     28extract.post_args   > ${worksrcpath}/usb.ids
     29patchfiles          patch-20160907.diff
     30use_configure       no
     31
     32build {}
     33destroot {
     34    system "/usr/bin/gzip -9 ${worksrcpath}/usb.ids"
     35    xinstall ${worksrcpath}/usb.ids.gz ${destroot}${prefix}/share/
     36}
     37pre-activate {
     38    if {![catch {set installed [lindex [registry_active usbutils] 0]}]} {
     39        set _version [lindex $installed 1]
     40        set _revision [lindex $installed 2]
     41        if {[vercmp $_version 007] < 0 || ([vercmp $_version 007] == 0 && $_revision == 0)} {
     42            registry_deactivate_composite usbutils "" [list ports_nodepcheck 1]
     43        }
     44    }
     45}
     46
     47livecheck.type      regex
     48livecheck.url       http://www.linux-usb.org/usb.ids
     49livecheck.regex     "Version: (\\d{4}\.\\d{2}\.\\d{2})"
  • new file usbids/files/patch-20160907.diff

    diff --git a/usbids/files/patch-20160907.diff b/usbids/files/patch-20160907.diff
    new file mode 100644
    - +  
     1--- usb.ids.orig
     2+++ usb.ids
     3@@ -13602,7 +13602,6 @@
     4 0e8c  Well Force Electronic Co., Ltd
     5 0e8d  MediaTek Inc.
     6        0003  MT6227 phone
     7-               0e8d 0003  M26 - BT Smart Watch for Android Phones
     8        0004  MT6227 phone
     9        0023  S103
     10        00a5  GSM modem [Medion Surfstick Model:S4222]
  • usbutils/Portfile

    diff --git a/usbutils/Portfile b/usbutils/Portfile
    a b  
    55
    66name                usbutils
    77version             007
     8revision            1
    89categories          net
    910platforms           darwin
    1011maintainers         bwalle.de:bernhard
     
    2122depends_build       port:pkgconfig
    2223
    2324depends_lib         port:libusb \
     25                    port:usbids \
    2426                    port:zlib
    2527
    2628# Darwin linker has no "--as-needed"
     
    3032# ("lsusb" and the hardware database) manually
    3133destroot {
    3234    xinstall -m 0755 ${worksrcpath}/lsusb ${destroot}${prefix}/bin/lsusb
    33     xinstall -m 0644 ${worksrcpath}/usb.ids.gz ${destroot}${prefix}/share
    3435    xinstall -d ${destroot}${prefix}/share/man/man8
    3536    xinstall -m 0644 ${worksrcpath}/lsusb.8 ${destroot}${prefix}/share/man/man8
    3637