# $Id: Portfile 151464 2016-08-16 16:59:31Z ram@macports.org $ PortSystem 1.0 name lalframe version 1.4.1 revision 2 categories science platforms darwin maintainers ram aronnax license GPL-2+ description LSC Algorithm Library - Frame long_description \ LIGO Scientific Collaboration Algorithm Library - Frame, containing \ routines for reading and writing frame files. 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 009d2128e67ba8352a8f63cb2549332976d77d44 \ sha256 ec2e70357e982cdcc023a82ba9b3f6dac7c7ac0194059771e5528a50086b970f depends_build port:pkgconfig depends_lib port:lal \ port:libframe \ port:ldas-tools-framecpp # 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 {lalframe-(\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 } }