mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
124 lines
4.6 KiB
Tcl
124 lines
4.6 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup perl5 1.0
|
|
PortGroup github 1.0
|
|
PortGroup compilers 1.0
|
|
|
|
github.setup tschoonj xraylib 4.1.2 xraylib-
|
|
# Change github.tarball_from to 'releases' or 'archive' next update
|
|
github.tarball_from tarball
|
|
revision 0
|
|
checksums rmd160 1a4e41a8b0003d5cf15fb525e38a7ac795d7fe75 \
|
|
sha256 e1d5bfe894e20464cb884acfc884281ce8e020dcae36e6bc02079618fbf228c3 \
|
|
size 13511570
|
|
|
|
categories science
|
|
license BSD
|
|
maintainers nomaintainer
|
|
|
|
description A library for X-ray matter interaction cross sections
|
|
long_description ${name} provides an API with over 50 functions designed \
|
|
to provide convenient access to databases with cross \
|
|
sections (photoelectric, Compton, Rayleigh, XRF etc.), \
|
|
line energies, edge energies, fluorescence yields, \
|
|
scattering factors, refractive indices, Compton profiles \
|
|
etc. Bindings exist for Perl, Python, Java, Fortran, IDL, \
|
|
Lua, Ruby, PHP and .NET.
|
|
|
|
compilers.choose fc
|
|
compilers.setup
|
|
|
|
# Upstream no longer provides a pre-generated configure script.
|
|
use_autoreconf yes
|
|
|
|
configure.args --disable-idl \
|
|
--disable-fortran2003 \
|
|
--disable-perl \
|
|
--disable-python \
|
|
--disable-java \
|
|
--disable-lua \
|
|
--disable-ruby \
|
|
--disable-python-numpy \
|
|
--disable-php
|
|
|
|
compiler.cxx_standard 2011
|
|
configure.cxxflags-append -std=gnu++11
|
|
if {[string match *clang* ${configure.compiler}] && ${configure.cxx_stdlib} ne ""} {
|
|
configure.cxxflags-append -stdlib=${configure.cxx_stdlib}
|
|
}
|
|
|
|
# to be fixed in later versions of xraylib...
|
|
use_parallel_build no
|
|
configure.ccache no
|
|
|
|
perl5.require_variant yes
|
|
perl5.conflict_variants yes
|
|
perl5.branches 5.28 5.30 5.32 5.34
|
|
perl5.default_branch 5.34
|
|
perl5.create_variants ${perl5.branches}
|
|
|
|
if {[variant_isset perl5_28] || [variant_isset perl5_30] || [variant_isset perl5_32] || [variant_isset perl5_34]} {
|
|
configure.perl ${perl5.bin}
|
|
configure.args-delete --disable-perl
|
|
configure.args-append --enable-perl --enable-perl-integration
|
|
depends_build-append port:swig-perl
|
|
}
|
|
|
|
variant python27 description {Python 2.7 bindings} conflictspython310 {
|
|
configure.args-append --enable-python --enable-python-integration --enable-python-numpy PYTHON=${prefix}/bin/python2.7
|
|
configure.args-delete --disable-python --disable-python-numpy
|
|
depends_build-append port:swig-python port:py27-cython
|
|
depends_lib-append port:python27 port:py27-numpy
|
|
}
|
|
|
|
variant python310 description {Python 3.10 bindings} conflicts python27 {
|
|
configure.args-append --enable-python --enable-python-integration --enable-python-numpy PYTHON=${prefix}/bin/python3.10
|
|
configure.args-delete --disable-python --disable-python-numpy
|
|
depends_build-append port:swig-python port:py310-cython
|
|
depends_lib-append port:python310 port:py310-numpy
|
|
}
|
|
|
|
variant ruby24 description {Ruby 2.4 bindings} conflicts ruby25 ruby26 {
|
|
configure.args-append --enable-ruby --enable-ruby-integration RUBY=${prefix}/bin/ruby2.4
|
|
configure.args-delete --disable-ruby
|
|
depends_build-append port:swig-ruby
|
|
depends_lib-append port:ruby24
|
|
}
|
|
|
|
variant ruby25 description {Ruby 2.5 bindings} conflicts ruby24 ruby26 {
|
|
configure.args-append --enable-ruby --enable-ruby-integration RUBY=${prefix}/bin/ruby2.5
|
|
configure.args-delete --disable-ruby
|
|
depends_build-append port:swig-ruby
|
|
depends_lib-append port:ruby25
|
|
}
|
|
|
|
variant ruby26 description {Ruby 2.6 bindings} conflicts ruby24 ruby25 {
|
|
configure.args-append --enable-ruby --enable-ruby-integration RUBY=${prefix}/bin/ruby2.6
|
|
configure.args-delete --disable-ruby
|
|
depends_build-append port:swig-ruby
|
|
depends_lib-append port:ruby26
|
|
}
|
|
|
|
variant java description {Java bindings} {
|
|
configure.args-replace --disable-java --enable-java
|
|
depends_build-append port:swig-java
|
|
}
|
|
|
|
variant lua description {Lua bindings} {
|
|
configure.args-replace --disable-lua --enable-lua
|
|
depends_build-append port:swig-lua
|
|
depends_lib-append port:lua
|
|
}
|
|
|
|
if {[fortran_variant_isset]} {
|
|
configure.args-replace --disable-fortran2003 --enable-fortran2003
|
|
}
|
|
|
|
if {![variant_isset python27]} {
|
|
default_variants +python310
|
|
}
|
|
|
|
test.run yes
|
|
test.target check
|