Ticket #52785: Portfile-ldas-tools-diskcacheAPI.diff

File Portfile-ldas-tools-diskcacheAPI.diff, 5.6 KB (added by emaros, 8 years ago)

git format-patch style patch

  • science/ldas-tools-diskcacheAPI/Portfile

    From 5b19263e625215aa714e154a8d3d5ec766a32c6e Mon Sep 17 00:00:00 2001
    From: "ed.maros" <ed.maros@ligo.org>
    Date: Tue, 1 Nov 2016 17:06:39 -0700
    Subject: [PATCH] Updated to source distribution 2.5.5
    
    ---
     science/ldas-tools-diskcacheAPI/Portfile | 97 +++++++++++++++++---------------
     1 file changed, 53 insertions(+), 44 deletions(-)
    
    diff --git a/science/ldas-tools-diskcacheAPI/Portfile b/science/ldas-tools-diskcacheAPI/Portfile
    index fe488e6..4491f79 100644
    a b  
    1 # $Id$
     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
    22
    33PortSystem    1.0
    44PortGroup     compiler_blacklist_versions 1.0
    55
    66name          ldas-tools-diskcacheAPI
    7 version       2.5.0
     7version       2.5.5
    88categories    science
    99platforms     darwin
    1010maintainers   ligo.org:ed.maros
    long_description ${description} 
    1515homepage      https://wiki.ligo.org/DASWG/LDASTools
    1616master_sites  http://software.ligo.org/lscsoft/source/
    1717
    18 checksums     rmd160 9204d916fabc30c0c07042d84e28c1e32aaf8429 \
    19               sha256 cdd51be871719fa7235f449236f89e7948a5358cbf0c888e18ad0b081c22778a
     18checksums     rmd160 580e1ffbafbd039906622a5b72c591a2ff8fcd9b \
     19              sha256 22790bbd2437c190168fe1b137bdcd3b0179ba8ef53cad3d826788f70995907f
    2020
    21 depends_lib    port:ldas-tools-al \
    22                port:ldas-tools-ldasgen
     21depends_lib    port:ldas-tools-ldasgen
    2322
    24 configure.args --disable-silent-rules \
     23configure.args --disable-warnings-as-errors \
     24               --disable-silent-rules \
    2525               --with-optimization=high \
    2626               --disable-tcl \
    2727               --disable-python \
    configure.args --disable-silent-rules \ 
    2929               --without-dot \
    3030               --disable-latex
    3131
    32 if {${os.major} < 13} {
     32if {${configure.cxx_stdlib} eq "libstdc++" } {
    3333    configure.args-append --disable-cxx11
    3434}
    3535
    compiler.blacklist-append {clang < 500.2.75} llvm-gcc-4.2 gcc-4.2 
    3838
    3939use_parallel_build yes
    4040
    41 #variant docs description {build documentation} {
    42 #  configure.args-delete --disable-latex \
    43 #                        --disable-dot \
    44 #                        --disable-ldas-documentation \
    45 #  configure.args-append --docdir=${prefix}/share/doc/ldas-tools
    46 #}
    47 
    48 #------------------------------------------------------------------------
    49 # Python variants
    50 #------------------------------------------------------------------------
    51 set pythons_suffixes {27 34}
    52 
    53 set pythons_ports {}
    54 foreach s ${pythons_suffixes} {
    55     lappend pythons_ports python${s}
    56 }
    57 
    58 foreach s ${pythons_suffixes} {
    59     set p python${s}
    60     set v [string index ${s} 0].[string index ${s} 1]
    61     set i [lsearch -exact ${pythons_ports} ${p}]
    62     set c [lreplace ${pythons_ports} ${i} ${i}]
    63     set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
    64     eval [subst {
    65         variant ${p} description "Enable SWIG Python interface for Python ${v}" conflicts ${c} {
    66 
    67             depends_build-append    port:swig-python
    68             depends_lib-append      port:${p} port:py${s}-numpy
    69             configure.args-strsed   s/--disable-python/--enable-python/
    70             destroot.args-append    pythondir="${d}" pyexecdir="${d}"
    71 
    72         }
    73     }]
    74 }
    75 
    7641livecheck.type   regex
    7742livecheck.url    ${master_sites}
    78 livecheck.regex  {ldas-tools-filters-(\d+(?:\.\d+)*).tar.gz}
     43livecheck.regex  {ldas-tools-diskcacheAPI-(\d+(?:\.\d+)*).tar.gz}
     44
     45#========================================================================
     46# Create subports for each supported Python version
     47#========================================================================
     48foreach v {27} {
     49  set python.version       ${v}
     50  set python.branch        [string range ${python.version} 0 end-1].[string index ${python.version} end]
     51  set python.bin           ${prefix}/bin/python${python.branch}
     52  set python.prefix        ${frameworks_dir}/Python.framework/Versions/${python.branch}
     53  set python.site_packages "${python.prefix}/lib/python${python.branch}/site-packages"
     54  set python.pkgname       LDAStools
     55
     56  subport py${v}-${name} {
     57    categories-prepend    python
     58    description           Python ${python.version} bindings for ${description}
     59    long_description      ${long_description} This package provides Python \
     60                          ${python.version} bindings, modules, and scripts.
     61
     62    depends_build-append      port:swig-python
     63    depends_lib-append        port:${name}
     64    depends_lib-append        port:python${python.version}
     65
     66    configure.python          ${python.bin}
     67    configure.args-replace    PYTHON=false PYTHON=${python.prefix}/bin/python${python.version}
     68    configure.args-replace    --disable-python --enable-python
     69    configure.args-append     SWIG_CPPFLAGS="-I${python.prefix}/include"
     70
     71    destroot.args-append      pythondir="${python.site_packages}" \
     72                              pyexecdir="${python.site_packages}" \
     73                              pkgpythondir="${python.site_packages}/${python.pkgname}" \
     74                              pkgpyexecdir="${python.site_packages}/${python.pkgname}" \
     75                              -C ${worksrcpath}/swig/python
     76
     77    post-destroot {
     78      if {${subport} eq "py27-${name}"} {
     79        foreach script [glob -tails -nocomplain -directory ${destroot}${python.prefix}/bin *] {
     80          file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${python.version}/bin/${script}
     81        }
     82      }
     83    }
     84
     85    livecheck.type        none
     86  }
     87}