{% set version = '0.1.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/geogrid_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/geogrid/geogrid_{{ version }}.tar.gz
  sha256: 07c54dac348200b5dc4c610fce643d672f1e273ebe8802bff9a6f4241f770a2d

build:
  merge_build_host: True  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-rcpp
    - r-rcpparmadillo
    - r-rgeos
    - r-sf
    - r-sp

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo
    - r-rgeos
    - r-sf
    - r-sp

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

about:
  home: https://github.com/jbaileyh/geogrid
  license: MIT
  summary: Turn irregular polygons (such as geographical regions) into regular or hexagonal grids.
    This package enables the generation of regular (square) and hexagonal grids through
    the package 'sp' and then assigns the content of the existing polygons to the new
    grid using the Hungarian algorithm, Kuhn (1955) (<doi:10.1007/978-3-540-68279-0_2>).
    This prevents the need for manual generation of hexagonal grids or regular grids
    that are supposed to reflect existing geography.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - mxr-conda
    - rluria14
    - ndmaxar
    - RyanHackney
    - conda-forge/r
    - oblute

# The original CRAN metadata for this package was:

# Package: geogrid
# Title: Turn Geospatial Polygons into Regular or Hexagonal Grids
# Version: 0.1.1
# Authors@R: c( person("Joseph", "Bailey", email = "jbailey@futurecities.catapult.org.uk", role = c("aut", "cre")), person("Ryan", "Hafen", email = "rhafen@gmail.com", role = "ctb"), person("Jakub", "Nowosad", email = "nowosad.jakub@gmail.com", role = "ctb", comment = c(ORCID = "0000-0002-1057-3721")), person("Lars Simon Zehnder", role = "ctb", comment = "RcppArmadillo implmentation of Munkres' Assignment Algorithm" ))
# Description: Turn irregular polygons (such as geographical regions) into regular or hexagonal grids. This package enables the generation of regular (square) and hexagonal grids through the package 'sp' and then assigns the content of the existing polygons to the new grid using the Hungarian algorithm, Kuhn (1955) (<doi:10.1007/978-3-540-68279-0_2>). This prevents the need for manual generation of hexagonal grids or regular grids that are supposed to reflect existing geography.
# Imports: methods, sp, sf, rgeos, Rcpp
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: testthat, lintr, covr
# RoxygenNote: 6.1.1
# URL: https://github.com/jbaileyh/geogrid
# BugReports: https://github.com/jbaileyh/geogrid/issues
# NeedsCompilation: yes
# Packaged: 2018-12-10 15:54:48 UTC; Joe
# Author: Joseph Bailey [aut, cre], Ryan Hafen [ctb], Jakub Nowosad [ctb] (<https://orcid.org/0000-0002-1057-3721>), Lars Simon Zehnder [ctb] (RcppArmadillo implmentation of Munkres' Assignment Algorithm)
# Maintainer: Joseph Bailey <jbailey@futurecities.catapult.org.uk>
# Repository: CRAN
# Date/Publication: 2018-12-11 09:20:13 UTC

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