# Use `conda-build-prepare` before building for a better version string.
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG|replace('v','') or '0.X.X', GIT_DESCRIBE_NUMBER|int,   GIT_DESCRIBE_HASH or 'gUNKNOWN') %}
{% set python_version = PYTHON_VERSION | default('3.7') %}
{% set py_suffix = 'py%s'|format(python_version|replace('.', '')) %}

package:
  name: yosys-uhdm
  version: {{ version }}

source:
  git_rev: uhdm-yosys
  git_url: https://github.com/antmicro/yosys.git
  patches:
    - yosys.patch

build:
  number: {{ environ.get('DATE_NUM') }}
  string: {{ environ.get('DATE_STR') }}_{{ py_suffix }}
  script_env:
    - CI

requirements:
  build:
    # These version restrictions make the dependencies resolvable with
    # packages from the `defaults` channel (libgcc-ng/libstdcxx-ng).
    - {{ compiler('c') }} <9
    - {{ compiler('cxx') }} <9
    - python {{ python_version }}
    - cmake
    - pkg-config
    - libuuid
    - gperftools
    - flex
    - libunwind
    - swig
    - ncurses
    - bison
    - openjdk
  run:
    - python {{python_version}}
    - ncurses
    - readline
    - libffi

test:
    commands:
        - uhdm-yosys --version

# Use `conda-build-prepare` before building for a better version string.
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG|replace('v','') or '0.X.X', GIT_DESCRIBE_NUMBER|int,   GIT_DESCRIBE_HASH or 'gUNKNOWN') %}
{% set python_version = PYTHON_VERSION | default('3.7') %}
{% set py_suffix = 'py%s'|format(python_version|replace('.', '')) %}

package:
  name: yosys-uhdm
  version: {{ version }}

source:
  git_rev: uhdm-yosys
  git_url: https://github.com/antmicro/yosys.git
  patches:
    - yosys.patch

build:
  number: {{ environ.get('DATE_NUM') }}
  string: {{ environ.get('DATE_STR') }}_{{ py_suffix }}
  script_env:
    - CI

requirements:
  build:
    # These version restrictions make the dependencies resolvable with
    # packages from the `defaults` channel (libgcc-ng/libstdcxx-ng).
    - {{ compiler('c') }} <9
    - {{ compiler('cxx') }} <9
    - bison
    - cmake
    - flex
    - libuuid
    - pkg-config
  host:
    - python {{ python_version }}
    - gperftools
    - libunwind
    - swig
    - ncurses
    - openjdk
  run:
    - python {{python_version}}
    - ncurses
    - readline
    - libffi

test:
    commands:
        - uhdm-yosys --version

Use some build requirements as the host ones instead
yosys-uhdm: Use some build requirements as the host ones instead

Not only it solves build conflicts, which roots I'm unable to pinpoint,
but it's also more appropriate than the previous requirements
arrangement.
