BB25A-A877-4f68-BB5E-DE4E854F935E}:1337.209460.e56ed98608316959d5ba357bcf74c2cdc16b1c5c.0 MSG:aBORTM8h5so+f1g+NcQz+IZrH/P8u6ni2nxRe/f3OEfnJTClkrX1kZkvfiAzEzoeriSXxLUI/v7IoZvxlbfINJfjZPSzff82A4McdkG0RnzOR3po=
[IDP] ERROR 2017-10-21 16:39:01,764 PCKAS1 PID:3832 THID:3160 ID:{A312CB7C-1B34-42ec-9357-D8D11E1963D8}:742.209460.e56ed98608316959d5ba357bcf74c2cdc16b1c5c.0 MSG:aBtfKZVsoBiOHDwG1MPKbGlymyj/UGDXRy54e2XqGQhs7O/t/1aHVIi8bNjYVQE4yR3bYUoI/g/48cjbdAKSEiITqpHpMNXEw9B8TrlD7kRlOvso4xgoq2tOCELl/nkdqUlKRd9ywsElDH2BgXRUYZxAp4QSAU+aLQREPzg==
[IDP] WARN 2017-10-21 16:39:01,764 PCKAS1 PID:3832 THID:3160 ID:{A312CB7C-1B34-42ec-9357-D8D11E1963D8}:1240.209460.e56ed98608316959d5ba357bcf74c2cdc16b1c5c.0 MSG:aCYTZ21LLxik69EdMQGZsRhltShlvahFnvn1PyR9IlD4EbHhf8dD2ynwMgd8bgGjLOz0+iyHEFMk97nT7sKva/uC5t8RF1rE6SeRVVyBvZkULdUoefXgObKZhQakaUJFPbQUSV/jBk6EQCNeJU9U+nmxiB90jqHG8QI1N6A==
[IDP] WARN 2017-10-21 16:39:01,764 PCKAS1 PID:3832 THID:3160 ID:{A312CB7C-1B34-42ec-9357-D8D11E1963D8}:798.209460.e56ed98608316959d5ba357bcf74c2cdc16{% set version = "8.6.7" %}
{% set maj_min = ".".join(version.split(".")[:2]) %}

package:
  name: tk
  version: {{ version }}

source:
  - url: https://downloads.sourceforge.net/tcl/tcl{{ version }}-src.tar.gz
    folder: tcl{{ version }}
    sha256: 7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5
  - url: https://downloads.sourceforge.net/tcl/tk{{ version }}-src.tar.gz
    folder: tk{{ version }}
    sha256: 061de2a354f9b7c7d04de3984c90c9bc6dd3a1b8377bb45509f1ad8a8d6337aa

build:
  number: 3
  detect_binary_files_with_prefix: true
  run_exports:
    # pin to major.minor because library names have that info in them
    - {{ pin_subpackage('tk', max_pin='x.x') }}

requirements:
  build:
    - {{ compiler('c') }}
    - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
    - {{ cdt('libx11-devel') }}          # [linux]
    - {{ cdt('libxcb') }}                # [linux]
    - {{ cdt('libxau') }}                # [linux]

test:

  files:
    - hello.tcl

  commands:
    # Check for binaries.
    {% for ver_suffix in ["", maj_min] %}
    - test -f "${PREFIX}/bin/tclsh{{ ver_suffix }}"                                            # [unix]
    - test -f "${PREFIX}/bin/wish{{ ver_suffix }}"                                             # [unix]
    - if not exist %LIBRARY_PREFIX%\\bin\\wish{{ ver_suffix.replace(".", "") }}.exe exit 1     # [win]
    - if not exist %LIBRARY_PREFIX%\\bin\\tclsh{{ ver_suffix.replace(".", "") }}.exe exit 1    # [win]
    {% endfor %}

    # Check for includes.
    {% set tcl_tk_includes = [
            "tcl",
            "tclDecls",
            "tclPlatDecls",
            "tclPlatDecls",
            "tclTomMathDecls",
            "tclTomMath",
            "tk",
            "tkDecls",
            "tkPlatDecls"
    ] %}
    {% for each_tcl_tk_include in tcl_tk_includes %}
    - test -f "${PREFIX}/include/{{ each_tcl_tk_include }}.h"                        # [unix]
    - if not exist %LIBRARY_PREFIX%\\include\\{{ each_tcl_tk_include }}.h exit 1     # [win]
    {% endfor %}

    # Check for libraries.
    # Library naming note: t means "full thread support" in Windows
    #    https://sourceforge.net/p/tcl/mailman/tcl-bugs/thread/From_noreply@sourceforge.net_Mon_Jul_23_11:46:16_2012/
    {% set tcl_tk_libs = [
            "tcl",
            "tk"
    ] %}
    {% for each_tcl_tk_lib in tcl_tk_libs %}
    - test -f "${PREFIX}/lib/lib{{ each_tcl_tk_lib }}{{ maj_min }}.dylib"                                        # [osx]
    - test -f "${PREFIX}/lib/lib{{ each_tcl_tk_lib }}{{ maj_min }}.so"                                           # [linux]
    - test -f "${PREFIX}/lib/lib{{ each_tcl_tk_lib }}stub{{ maj_min }}.a"                                        # [unix]
    - if not exist %LIBRARY_PREFIX%\\lib\\{{ each_tcl_tk_lib }}{{ maj_min.replace(".", "") }}t.lib exit 1         # [win]
    - if not exist %LIBRARY_PREFIX%\\bin\\{{ each_tcl_tk_lib }}{{ maj_min.replace(".", "") }}t.dll exit 1         # [win]
    - if not exist %LIBRARY_PREFIX%\\lib\\{{ each_tcl_tk_lib }}stub{{ maj_min.replace(".", "") }}.lib exit 1     # [win]
    {% endfor %}

    # Check commands work and run a simple program.
    - tclsh hello.tcl
    - tclsh{{ maj_min }} hello.tcl                       # [unix]
    - tclsh{{ maj_min.replace(".", "") }} hello.tcl      # [win]
    # wish requires X11:
    # wish: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
    # The time has come to figure out how to handle missing system dependencies. cc @msarahan
    # - wish hello.tcl
    # - wish{{ maj_min }} hello.tcl                      # [unix]
    - wish{{ maj_min.replace(".", "") }}t hello.tcl      # [win]

about:
  home: http://www.tcl.tk/
  license: Tcl/Tk
  license_family: BSD
  summary: A dynamic programming language with GUI support.  Bundles Tcl and Tk.

extra:
  recipe-maintainers:
    - jakirkham
    - jjhelmus
    - msarahan
    - pelson
    - mingwandroid
