{% set version = "1.0-10" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/proj4_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/proj4/proj4_{{ version }}.tar.gz
  sha256: 5f396f172a17cfa9821a390f11ff7d3bff3c92ccf585572116dec459c621d1d0
  patches:
    - win.patch  # [win]

build:
  merge_build_host: true  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - proj
  run:
    - r-base
    - proj
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://www.rforge.net/proj4/
  license: GPL-2
  summary: A simple interface to lat/long projection and datum transformation of the PROJ.4 cartographic projections library. It allows transformation of geographic
    coordinates from one projection and/or datum to another.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - nawendt
    - ocefpaf
    - xylar

# Package: proj4
# Version: 1.0-8.1
# Title: A simple interface to the PROJ.4 cartographic projections library
# Depends: R (>= 2.0.0)
# Author: Simon Urbanek <simon.urbanek@r-project.org>
# Maintainer: Simon Urbanek <simon.urbanek@r-project.org>
# Description: A simple interface to lat/long projection and datum transformation of the PROJ.4 cartographic projections library. It allows transformation of geographic coordinates from one projection and/or datum to another.
# SystemRequirements: proj 4.4.6 or higher (http://proj.maptools.org/)
# License: GPL-2
# URL: http://www.rforge.net/proj4/
# Packaged: 2019-09-05 17:05:50 UTC; hornik
# Repository: CRAN
# Date/Publication: 2019-09-07 17:32:41 UTC
# NeedsCompilation: yes
