{% set version = '1.0.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gower_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gower/gower_{{ version }}.tar.gz
  sha256: 296a9d8e5efa8c3a8cc6b92cf38880915753afdef30281629af9dc8eae8315fc

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: tinytest (>= 0.9.3),
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('gower')"           # [not win]
    - "\"%R%\" -e \"library('gower')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://github.com/markvanderloo/gower
  license: GPL-3
  summary: Compute Gower's distance (or similarity) coefficient between records. Compute the
    top-n matches between records. Core algorithms are executed in parallel on systems
    supporting OpenMP.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: gower
# Maintainer: Mark van der Loo <mark.vanderloo@gmail.com>
# License: GPL-3
# Title: Gower's Distance
# Type: Package
# LazyLoad: yes
# Authors@R: c( person("Mark", "van der Loo", role=c("aut","cre"),email="mark.vanderloo@gmail.com") , person("David", "Turner", role="ctb"))
# Description: Compute Gower's distance (or similarity) coefficient between records. Compute the top-n matches between records. Core algorithms are executed in parallel on systems supporting OpenMP.
# Version: 1.0.1
# URL: https://github.com/markvanderloo/gower
# BugReports: https://github.com/markvanderloo/gower/issues
# Suggests: tinytest (>= 0.9.3),
# RoxygenNote: 7.2.1
# NeedsCompilation: yes
# Packaged: 2022-12-22 08:37:04 UTC; mark
# Author: Mark van der Loo [aut, cre], David Turner [ctb]
# Repository: CRAN
# Date/Publication: 2022-12-22 09:40:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
