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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/lpSolveAPI_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lpSolveAPI/lpSolveAPI_{{ version }}.tar.gz
  sha256: 9ebc8e45ad73eb51e0b25049598a5bc758370cf89508e2328cf4bd93d68d55bb

build:
  merge_build_host: true  # [win]
  number: 1
  rpaths:
    - lib/R/library/lpSolveAPI/libs
    - 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]
  host:
    - libblas
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=lpSolveAPI
  license: LGPL-2.1-only
  summary: The lpSolveAPI package provides an R interface to 'lp_solve', a Mixed Integer Linear Programming (MILP) solver with support for pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models.
  license_family: LGPL
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-2

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

# Package: lpSolveAPI
# Version: 5.5.2.0-17.4
# Date: 2016-01-11
# Title: R Interface to 'lp_solve' Version 5.5.2.0
# Author: lp_solve <http://lpsolve.sourceforge.net/>, Kjell Konis <kjell.konis@me.com>.
# Maintainer: ORPHANED
# Description: The lpSolveAPI package provides an R interface to 'lp_solve', a Mixed Integer Linear Programming (MILP) solver with support for pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models.
# License: LGPL-2
# Repository: CRAN
# Repository/R-Forge/Project: lpsolve
# Repository/R-Forge/Revision: 151
# Repository/R-Forge/DateTimeStamp: 2016-01-11 22:09:07
# Date/Publication: 2019-08-08 07:17:31 UTC
# NeedsCompilation: yes
# Packaged: 2019-08-08 06:41:55 UTC; ripley
# X-CRAN-Original-Maintainer: Kjell Konis <kjell.konis@me.com>
# X-CRAN-Comment: Orphaned and corrected on 2019-05-28 as check issues were not addressed despite reminder. . gcc 9 warnings
