Ticket #52376: usbutils.3.2.patch

File usbutils.3.2.patch, 2.7 KB (added by lbschenkel (Leonardo Brondani Schenkel), 8 years ago)

split the USB ID database into its own port (usbids) and make usbutils depend on it

  • 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
     27use_configure       no
     28
     29extract {}
     30build {}
     31destroot {
     32    xinstall ${distpath}/${distname}${extract.suffix} ${destroot}${prefix}/share/
     33}
     34pre-activate {
     35    if {![catch {set installed [lindex [registry_active usbutils] 0]}]} {
     36        set _version [lindex $installed 1]
     37        set _revision [lindex $installed 2]
     38        if {[vercmp $_version 007] < 0 || ([vercmp $_version 007] == 0 && $_revision == 0)} {
     39            registry_deactivate_composite usbutils "" [list ports_nodepcheck 1]
     40        }
     41    }
     42}
     43
     44livecheck.type      regex
     45livecheck.url       http://www.linux-usb.org/usb.ids
     46livecheck.regex     "Version: (\\d{4}\.\\d{2}\.\\d{2})"
  • 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