Ticket #66670: android-platform-tools.diff

File android-platform-tools.diff, 1.6 KB (added by aprovera, 13 months ago)

Proposed workaround for machines with no SSE4 support

  • Portfile

    old new  
    33PortSystem          1.0
    44
    55name                android-platform-tools
    6 version             34.0.4
     6
     7# detect SSE4 support
     8if {[catch {sysctl hw.optional.sse4_1} result] || $result == 0} {
     9    version         31.0.3
     10    set no_sse4 true
     11} else {
     12    version         34.0.4
     13    set no_sse4 false
     14}
     15
    716categories          java devel
    817installs_libs       no
    918maintainers         {judaew @judaew} openmaintainer
     
    2130distname            platform-tools_r${version}-darwin
    2231use_zip             yes
    2332
    24 checksums           rmd160  d3fa505c1df870918aec9e7aee5f668abc957668 \
     33# serve newest version if SSE4 is supported, 31.0.3 if not supported
     34if {${no_sse4}} {
     35    # 31.0.3
     36    set ver_hash    e8b2b4cbe47c728c1e54c5f524440b52d4e1a33c
     37    distname        ${ver_hash}.platform-tools_r${version}-darwin
     38    checksums       rmd160  26a2d4602ddd7537798bacd3adf6d5c376dc3e77 \
     39                    sha256  773c08cfa31cec1bb4568ce5b374366e6310a5ffc21875024604a0f65bc831b1 \
     40                    size    13227985
     41    notes-append    "The current version of android-platform-tools requires SSE4.1, which is not supported by your CPU. The last version compatible with your CPU ($version) has been installed instead."
     42} else {
     43    # 34.0.4
     44    checksums       rmd160  d3fa505c1df870918aec9e7aee5f668abc957668 \
    2545                    sha256  bd09b834c150181a383deba63e157e9a53a6eb5a9cf4849b2b79dd89d0a2ddf1 \
    2646                    size    11208053
     47}
    2748
    2849use_configure       no
    2950