# $Id: Portfile 151366 2016-08-13 15:36:28Z ram@macports.org $ PortSystem 1.0 name laldetchar version 0.3.3 categories science platforms darwin maintainers ram aronnax license GPL-2+ description LSC Algorithm Library - DetChar long_description \ LIGO Scientific Collaboration Algorithm Library - DetChar, containing \ routines for detectory characterisation. homepage https://www.lsc-group.phys.uwm.edu/daswg/projects/lalsuite.html master_sites http://software.ligo.org/lscsoft/source/lalsuite use_xz yes checksums rmd160 a56bc7509952a9b24545acb1657811851ddd0c10 \ sha256 bc39ffb69d702a36b543f20b0764845f023ac471543cea7464fa40978f23c67a # See https://bugs.ligo.org/redmine/issues/4508 patchfiles 0001-Make-laldetchar-idq-append-file-to-cache-a-Python-on.patch use_autoreconf yes depends_build port:pkgconfig depends_lib port:lal \ port:lalframe \ port:lalmetaio \ port:lalsimulation \ port:lalburst \ port:gsl \ port:libframe \ port:metaio \ path:lib/pkgconfig/glib-2.0.pc:glib2 # Choose a compiler that supports OpenMP. compiler.whitelist macports-clang-3.8 macports-clang-3.7 macports-clang-3.9 compiler.fallback macports-clang-3.8 configure.args --mandir=${prefix}/share/man \ --disable-silent-rules \ --disable-gcc-flags \ --disable-debug \ PYTHON=false use_parallel_build yes livecheck.type regex livecheck.url ${master_sites} livecheck.regex {laldetchar-(\d+(?:\.\d+)*).tar.xz} # Create subports for each supported Python version foreach v {27 34 35} { subport py${v}-${name} { set pythonversion [string range ${v} 0 end-1].[string index ${v} end] set pythonhome \ "${frameworks_dir}/Python.framework/Versions/${pythonversion}" set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages" categories-prepend python description Python ${pythonversion} bindings for ${description} long_description ${long_description} This package provides Python \ ${pythonversion} bindings, modules, and scripts. depends_build-append port:swig-python depends_lib-strsed g/port:lal/port:py${v}-lal/ depends_lib-append port:${name} depends_lib-prepend port:python${v} port:py${v}-numpy configure.args-delete PYTHON=false configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} --enable-swig-python configure.args-append SWIG_CPPFLAGS="-I${pythonhome}/include" destroot.args-append pythondir="${pythondir}" \ pyexecdir="${pythondir}" \ pkgpythondir="${pythondir}/${name}" \ pkgpyexecdir="${pythondir}/${name}" \ prefix="${pythonhome}" # Only install SWIG bindings, Python libraries, and Python scripts destroot { command_exec destroot "" "-C swig" command_exec destroot "" "-C python" } post-destroot { if {${subport} eq "py27-${name}"} { foreach script [glob -tails -nocomplain -directory ${destroot}${pythonhome}/bin *] { file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${pythonversion}/bin/${script} } } } livecheck.type none } }