{% set version = '0.6-13' %}

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

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

source:
  fn: spdep_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/spdep_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/spdep/spdep_{{ version }}.tar.gz
  sha256: ed345f4c7ea7ba064b187eb6b25f0ac46f17616f3b56ab89978935cdc67df1c4

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-learnbayes
    - r-mass
    - r-matrix >=1.0.12
    - r-boot >=1.3_1
    - r-coda
    - r-deldir
    - r-expm
    - r-gmodels
    - r-nlme
    - r-sp >=1.0
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-learnbayes
    - r-mass
    - r-matrix >=1.0.12
    - r-boot >=1.3_1
    - r-coda
    - r-deldir
    - r-expm
    - r-gmodels
    - r-nlme
    - r-sp >=1.0
    - libgcc  # [not win]

test:
  commands:
    - $R -e "library('spdep')"  # [not win]
    - "\"%R%\" -e \"library('spdep')\""  # [win]

about:
  home: https://r-forge.r-project.org/projects/spdep/
  license: GPL (>= 2)
  summary: "A collection of functions to create spatial weights matrix objects from polygon contiguities,
    from point patterns by distance and tessellations, for summarizing these objects,
    and for permitting their use in spatial data analysis, including regional aggregation
    by minimum spanning tree; a collection of tests for spatial autocorrelation, including
    global Moran's I, APLE, Geary's C, Hubert/Mantel general cross product statistic,
    Empirical Bayes estimates and Assun\xE7\xE3o/Reis Index, Getis/Ord G and multicoloured
    join count statistics, local Moran's I and Getis/Ord G, saddlepoint approximations
    \ and exact tests for global and local Moran's I; and functions for estimating spatial
    simultaneous autoregressive (SAR) lag and error models, impact measures for lag
    models, weighted and unweighted SAR and CAR spatial regression models, semi-parametric
    and Moran eigenvector spatial filtering, GM SAR error models, and generalized spatial
    two stage least squares models."

  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
