Ticket #52782: Portfile-ldas-tools-ldasgen.diff

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

git format-patch style patch

  • science/ldas-tools-ldasgen/Portfile

    From 7df883f4f3e3d1987f426c348acce8de88487a4a Mon Sep 17 00:00:00 2001
    From: "ed.maros" <ed.maros@ligo.org>
    Date: Tue, 1 Nov 2016 17:09:41 -0700
    Subject: [PATCH] Updated to source distribution 2.5.4
    
    ---
     science/ldas-tools-ldasgen/Portfile | 94 ++++++++++++++++++++-----------------
     1 file changed, 52 insertions(+), 42 deletions(-)
    
    diff --git a/science/ldas-tools-ldasgen/Portfile b/science/ldas-tools-ldasgen/Portfile
    index 2031691..f2050a3 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-ldasgen
    7 version       2.5.0
     7version       2.5.4
    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 96d30566e32cb0db1f0a2d2f7b88060533950793 \
    19               sha256 2eedeea1be81c4fec29c501da3c18db52bb930663bd923b5735c5e64c720eb1d
     18checksums     rmd160 b8f7600b992f599b183146732967582a942b4ad8 \
     19              sha256 48b410aeb1b9718c5185c74fc9cba11c79da08f8bdc78a140db72b07a8ba099f
    2020
    2121depends_lib    port:ldas-tools-al
    2222
    23 configure.args --disable-silent-rules \
     23configure.args --disable-warnings-as-errors \
     24               --disable-silent-rules \
    2425               --with-optimization=high \
    2526               --disable-tcl \
    2627               --disable-python \
    configure.args --disable-silent-rules \ 
    2829               --without-dot \
    2930               --disable-latex
    3031
    31 if {${os.major} < 13} {
     32if {${configure.cxx_stdlib} eq "libstdc++" } {
    3233    configure.args-append --disable-cxx11
    3334}
    3435
    compiler.blacklist-append {clang < 500.2.75} llvm-gcc-4.2 gcc-4.2 
    3738
    3839use_parallel_build yes
    3940
    40 #variant docs description {build documentation} {
    41 #  configure.args-delete --disable-latex \
    42 #                        --disable-dot \
    43 #                        --disable-ldas-documentation \
    44 #  configure.args-append --docdir=${prefix}/share/doc/ldas-tools
    45 #}
    46 
    47 #------------------------------------------------------------------------
    48 # Python variants
    49 #------------------------------------------------------------------------
    50 set pythons_suffixes {27 34}
    51 
    52 set pythons_ports {}
    53 foreach s ${pythons_suffixes} {
    54     lappend pythons_ports python${s}
    55 }
    56 
    57 foreach s ${pythons_suffixes} {
    58     set p python${s}
    59     set v [string index ${s} 0].[string index ${s} 1]
    60     set i [lsearch -exact ${pythons_ports} ${p}]
    61     set c [lreplace ${pythons_ports} ${i} ${i}]
    62     set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
    63     eval [subst {
    64         variant ${p} description "Enable SWIG Python interface for Python ${v}" conflicts ${c} {
    65 
    66             depends_build-append    port:swig-python
    67             depends_lib-append      port:${p} port:py${s}-numpy
    68             configure.args-strsed   s/--disable-python/--enable-python/
    69             destroot.args-append    pythondir="${d}" pyexecdir="${d}"
    70 
    71         }
    72     }]
    73 }
    74 
    7541livecheck.type   regex
    7642livecheck.url    ${master_sites}
    77 livecheck.regex  {ldas-tools-filters-(\d+(?:\.\d+)*).tar.gz}
     43livecheck.regex  {ldas-tools-ldasgen-(\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}