{% set version = "2.4.6" %}

package:
  name: libtool
  version: {{ version }}

source:
  url: http://ftpmirror.gnu.org/libtool/libtool-{{ version }}.tar.gz
  sha256: e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
  patches:
    # From: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=557388;filename=link-as-needed.patch;msg=5
    # See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
    # and: https://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/
    - 0001-link-as-needed.patch
    - 0002-apple-silicon.patch
    - 0003-apple-silicon.patch
    # This patch is applied after libtool is installed to avoid needing libtool for building libtool
    # - 0004-apple-silicon.patch

build:
  number: 1007
  skip: True  # [win]
  ignore_run_exports:
    - libstdcxx-ng
    - libcxx

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - m4
    - help2man
    - autoconf
    - automake
    - make
    - patch

test:
  commands:
    - libtool --help

about:
  home: http://www.gnu.org/software/libtool/
  license: GPL-2.0-or-later
  license_file: COPYING
  summary: The GNU Portable Library Tool
  description: |
    GNU libtool is a generic library support script. Libtool hides the
    complexity of using shared libraries behind a consistent, portable
    interface.
  doc_url: http://www.gnu.org/software/libtool/manual/
  dev_url: http://git.savannah.gnu.org/cgit/libtool.git

extra:
  recipe-maintainers:
    - ocefpaf
    - msarahan
    - jakirkham
    - mingwandroid
    - isuruf
