{% set version = '3.6' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-tsdist
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/TSdist_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/TSdist/TSdist_{{ version }}.tar.gz
  sha256: 14d48a3092d25c967ba4eb3183820054547cb8ba4286ffa2f31f5c33d55b5a8d

build:
  merge_build_host: True  # [win]
  skip: True  # [osx]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
    - {{ cdt('mesa-libgl-devel') }}  # [linux]
    - {{ cdt('mesa-dri-drivers') }}  # [linux]
    - {{ cdt('libselinux') }}  # [linux]
    - {{ cdt('libxdamage') }}  # [linux]
    - {{ cdt('libxxf86vm') }}  # [linux]
    - xorg-libxfixes  # [linux]
  host:
    - r-base
    - r-kernsmooth
    - r-tsclust
    - r-cluster
    - r-dtw
    - r-locpol
    - r-longitudinaldata
    - r-pdc
    - r-proxy
    - r-xts
    - r-zoo
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-kernsmooth
    - r-tsclust
    - r-cluster
    - r-dtw
    - r-locpol
    - r-longitudinaldata
    - r-pdc
    - r-proxy
    - r-xts
    - r-zoo

test:
  requires:
    - xorg-libxfixes  # [linux]
  commands:
    - LD_LIBRARY_PATH=${BUILD_PREFIX}/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib64 $R -e "library('TSdist')"           # [not win]
    - "\"%R%\" -e \"library('TSdist')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=TSdist
  license: GPL (>= 2)
  summary: A set of commonly used distance measures and some additional functions which, although
    initially not designed for this purpose, can be used to measure the dissimilarity
    between time series. These measures can be used to perform clustering, classification
    or other data mining tasks which require the definition of a distance measure between
    time series.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: TSdist
# Type: Package
# Title: Distance Measures for Time Series Data
# Version: 3.6
# Encoding: UTF-8
# Date: 2019-07-17
# Depends: R (>= 3.0.3), proxy
# Imports: zoo, xts, dtw, TSclust, KernSmooth, locpol, pdc, longitudinalData, cluster, methods, graphics, stats
# Suggests: testthat
# Authors@R: c(person("Usue", "Mori", email = "usue.mori@ehu.eus",role = c("aut", "cre")),person("Alexander", "Mendiburu", role = c("aut")),person("Jose A.", "Lozano", role = c("aut")),person("Duarte", "Folgado", role = c("ctb")))
# Description: A set of commonly used distance measures and some additional functions which, although initially not designed for this purpose, can be used to measure the dissimilarity between time series. These measures can be used to perform clustering, classification or other data mining tasks which require the definition of a distance measure between time series.
# License: GPL (>= 2)
# Packaged: 2019-07-16 06:40:51 UTC; sgpmocau
# NeedsCompilation: yes
# Repository: CRAN
# Author: Usue Mori [aut, cre], Alexander Mendiburu [aut], Jose A. Lozano [aut], Duarte Folgado [ctb]
# Maintainer: Usue Mori <usue.mori@ehu.eus>
# Date/Publication: 2019-07-18 11:18:36 UTC
