{% set version = '1.4.1' %}

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

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

source:
  fn: RgoogleMaps_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/RgoogleMaps_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/RgoogleMaps/RgoogleMaps_{{ version }}.tar.gz

  sha256: 5831cac4affa5e6f1ee25ebf92ccfc164a9bf8b7ca4d711291824f42a1a5553b

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

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

requirements:
  build:
    - r-base
    - r-png

  run:
    - r-base
    - r-png

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

about:
  home: https://CRAN.R-project.org/package=RgoogleMaps
  license: GPL
  summary: 'Serves two purposes: (i) Provide a comfortable R interface to query the Google server
    for static maps, and (ii) Use the map as a background image to overlay plots within
    R. This requires proper coordinate scaling. '

  license_family: GPL
extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - druvus
