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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/poLCA_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/poLCA/poLCA_{{ version }}.tar.gz
  sha256: ed8c60a42bff0402c9ba2f9ce1422dd171e711c1a64498c4d96010ddb29f6b16

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-mass
    - r-scatterplot3d
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-scatterplot3d

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

about:
  home: http://dlinzer.github.com/poLCA
  license: GPL-2.0-or-later
  summary: Latent class analysis and latent class regression models for polytomous outcome variables.  Also known as latent structure analysis.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: poLCA
# Type: Package
# Title: Polytomous variable Latent Class Analysis
# Version: 1.4.1
# Date: 2014-01-09
# Author: Drew Linzer <drew@votamatic.org>, Jeffrey Lewis <jblewis@ucla.edu>.
# Maintainer: Drew Linzer <drew@votamatic.org>
# Depends: scatterplot3d, MASS
# Description: Latent class analysis and latent class regression models for polytomous outcome variables.  Also known as latent structure analysis.
# License: GPL (>= 2)
# URL: http://dlinzer.github.com/poLCA
# LazyLoad: yes
# Packaged: 2014-01-09 23:26:54 UTC; Drew
# NeedsCompilation: yes
# Repository: CRAN
# Date/Publication: 2014-01-10 07:33:05
