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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/TSP_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/TSP/TSP_{{ version }}.tar.gz
  sha256: 2a7eee07197d01e3637fbb35beefbcd5211759a20974880d07abb3294e025308

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]
  host:
    - r-base
    - r-foreach
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-foreach

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

about:
  home: https://github.com/mhahsler/TSP
  license: GPL-3.0-only
  summary: Basic infrastructure and some algorithms for the traveling salesperson problem (also traveling salesman problem; TSP). The package provides some simple algorithms and an interface to the Concorde TSP solver and its implementation of the Chained-Lin-Kernighan heuristic. The code for Concorde itself is not included
    in the package and has to be obtained separately.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - conda-forge/r

# Package: TSP
# Type: Package
# Title: Traveling Salesperson Problem (TSP)
# Version: 1.1-7
# Date: 2019-05-22
# Authors@R: c( person("Michael", "Hahsler", role = c("aut", "cre", "cph"), email = "mhahsler@lyle.smu.edu"), person("Kurt", "Hornik", role = c("aut", "cph")))
# Description: Basic infrastructure and some algorithms for the traveling salesperson problem (also traveling salesman problem; TSP). The package provides some simple algorithms and an interface to the Concorde TSP solver and its implementation of the Chained-Lin-Kernighan heuristic. The code for Concorde itself is not included in the package and has to be obtained separately.
# Classification/ACM: G.1.6, G.2.1, G.4
# URL: https://github.com/mhahsler/TSP
# BugReports: https://github.com/mhahsler/TSP/issues
# Depends: R (>= 2.14.0)
# Imports: graphics, foreach, utils, methods, stats, grDevices
# Suggests: maps, sp, maptools, testthat
# License: GPL-3
# Copyright: All code is Copyright (C) Michael Hahsler and Kurt Hornik.
# NeedsCompilation: yes
# Packaged: 2019-05-22 20:17:55 UTC; hahsler
# Author: Michael Hahsler [aut, cre, cph], Kurt Hornik [aut, cph]
# Maintainer: Michael Hahsler <mhahsler@lyle.smu.edu>
# Repository: CRAN
# Date/Publication: 2019-05-22 23:10:03 UTC
