{% set major_minor_version = "8.4" %}
{% set micro_version = "0" %}
{% set version = major_minor_version + "." + micro_version %}

package:
  name: mysql
  version: {{ version }}

source:
  - url: https://cdn.mysql.com/Downloads/MySQL-{{ major_minor_version }}/mysql-{{ version }}.tar.gz
    sha256: 47a5433fcdd639db836b99e1b5459c2b813cbdad23ff2b5dd4ad27f792ba918e
    patches:
      - 0001-Allow-flags-other-than-macros-in-CPPFLAGS.patch
      - 0024-Link-to-absl_spinlock_wait.patch

build:
  number: 1
  skip: True # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - patch    # [not win]
    - m2-patch # [win]
    - patchelf # [linux]
    - cmake
    - ninja
    - bison    # [unix]
    - pkg-config

  host:
    - icu {{ icu }}
    - libcurl 8.7.1
    - libedit 3.1.20230828 # [unix]
    - libprotobuf {{ libprotobuf }}
    - libabseil {{ libabseil }}
    - lz4-c 1.9.4
    - openssl {{ openssl }}
    - zlib {{ zlib }}
    - zstd {{ zstd }}
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-only
  license_family: GPL
  license_file: LICENSE
  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/{{ major_minor_version }}/en/
  dev_url: https://github.com/mysql/mysql-server
