{% set name = "mysql" %}
{% set major_minor_version = "5.7" %}
{% set micro_version = "24" %}
{% set sha256 = "b980dced9c9eb3385cca44870facc220504ca011196c5a19c2bfe43d3f5d6212" %}

package:
  name: {{ name|lower }}
  version: {{ major_minor_version }}.{{ micro_version }}

source:
  - url: https://cdn.mysql.com//archives/mysql-{{ major_minor_version }}/mysql-boost-{{ major_minor_version }}.{{ micro_version }}.tar.gz
    sha256: {{ sha256 }}
    patches:
      - 0001-Split-ENV_CPPFLAGS-into-separate-arguments.patch
      - fix_osx11sdk.patch
      - openssl3.patch
      - find-boost.patch
build:
  number: 2
  # linux-s390x is skipped because cyrus-sasl isn't available on s390x
  skip: True  # [win or (linux and s390x)]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - cmake
    - ninja
    - make
    - perl
    - patchelf  # [not osx]
    - patch       # [not win]
    - m2-patch    # [win]
  host:
    - libedit 3.1.20221030
    - openssl {{ openssl }}
    - cyrus-sasl 2.1.28  # [not win]
  run:
    - openssl  # exact pin handled through openssl run_exports
test:
  commands:
    - mysql_config --version
    - my_print_defaults --version
    - mysqld --help --verbose
    - command -v mysql.server

about:
  home: https://www.mysql.com/
  license: GPL-2.0
  license_family: GPL
  license_file: COPYING
  summary: 'Open source relational database management system.'
  description: |
    The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
    and robust SQL (Structured Query Language) database server. MySQL Server
    is intended for mission-critical, heavy-load production systems as well
    as for embedding into mass-deployed software.
  documentation: https://dev.mysql.com/doc/
  doc_url: https://dev.mysql.com/doc/refman/5.7/en/
  dev_url: https://dev.mysql.com/doc/refman/5.7/en/

extra:
  recipe-maintainers:
    - beckermr
    - mingwandroid
