# +-------------------------------------------------------------------+
# | Package parameters                                                |
# +-------------------------------------------------------------------+

OASISFormat: 0.4
OCamlVersion: >= 3.12
Name: lambda-term
Version: 1.10
LicenseFile: LICENSE
License: BSD-3-CLAUSE
Authors: Jeremie Dimino
Maintainers: Jeremie Dimino <jeremie@dimino.org>
Homepage: http://lambda-term.forge.ocamlcore.org/
BuildTools: ocamlbuild
Plugins: DevFiles (0.4), META (0.4)
XDevFilesEnableMakefile: false
Synopsis: Terminal manipulation library for OCaml
Description:
  Lambda-term is a cross-platform library for manipulating the
  terminal. It provides an abstraction for keys, mouse events, colors,
  as well as a set of widgets to write curses-like applications.
  .
  The main objective of lambda-term is to provide a higher level
  functional interface to terminal manipulation than, for example,
  ncurses, by providing a native OCaml interface instead of bindings to
  a C library.
  .
  Lambda-term integrates with zed to provide text edition facilities in
  console applications.

FilesAB: src/lTerm_config.h.ab

# +-------------------------------------------------------------------+
# | The library                                                       |
# +-------------------------------------------------------------------+

Library "lambda-term"
  FindlibName: lambda-term
  BuildDepends:
    lwt (>= 2.4.0),
    lwt.unix,
    lwt.react,
    zed (>= 1.2)
  XMETADescription: Cross-platform library for terminal manipulation
  Path: src
  Install: true
  Modules:
    LTerm,
    LTerm_key,
    LTerm_event,
    LTerm_unix,
    LTerm_windows,
    LTerm_style,
    LTerm_geom,
    LTerm_draw,
    LTerm_mouse,
    LTerm_widget,
    LTerm_widget_callbacks,
    LTerm_edit,
    LTerm_read_line,
    LTerm_text,
    LTerm_ui,
    LTerm_resources,
    LTerm_inputrc,
    LTerm_history
  InternalModules:
    LTerm_color_mappings,
    LTerm_resource_lexer,
    widget_impl/LTerm_widget_base_impl,
    widget_impl/LTerm_buttons_impl,
    widget_impl/LTerm_containers_impl,
    widget_impl/LTerm_running_impl,
    widget_impl/LTerm_toplevel_impl
  CSources:
    lTerm_config.h,
    lTerm_term_stubs.c,
    lTerm_unix_stubs.c,
    lTerm_windows_stubs.c
  CCOpt: -I$pkg_lwt
  if system(openbsd)
    CCOpt+: -I/usr/local/include
    CCLib: -L/usr/local/lib -lcharset

# +-------------------------------------------------------------------+
# | Examples                                                          |
# +-------------------------------------------------------------------+

Executable events
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: events.ml
  BuildDepends: lambda-term

Executable colors
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: colors.ml
  BuildDepends: lambda-term

Executable colors_256
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: colors_256.ml
  BuildDepends: lambda-term

Executable rgb
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: rgb.ml
  BuildDepends: lambda-term

Executable move
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: move.ml
  BuildDepends: lambda-term

Executable hello
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: hello.ml
  BuildDepends: lambda-term

Executable clock
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: clock.ml
  BuildDepends: lambda-term

Executable buttons
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: buttons.ml
  BuildDepends: lambda-term

Executable focus
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: focus.ml
  BuildDepends: lambda-term

Executable checkbuttons
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: checkbuttons.ml
  BuildDepends: lambda-term

Executable radiobuttons
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: radiobuttons.ml
  BuildDepends: lambda-term

Executable shell
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: shell.ml
  BuildDepends: lambda-term, str

Executable repl
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: repl.ml
  BuildDepends: lambda-term

Executable modal
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: modal.ml
  BuildDepends: lambda-term

Executable "read-password"
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: read_password.ml
  BuildDepends: lambda-term

Executable "read-yes-no"
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: read_yes_no.ml
  BuildDepends: lambda-term

Executable "editor"
  Path: examples
  Install: false
  CompiledObject: best
  MainIs: editor.ml
  BuildDepends: lambda-term

# +-------------------------------------------------------------------+
# | Utils                                                             |
# +-------------------------------------------------------------------+

Executable "lambda-term-actions"
  Path: tools
  Install: true
  CompiledObject: best
  MainIs: lambda_term_actions.ml
  BuildDepends: lambda-term

# +-------------------------------------------------------------------+
# | Tests                                                             |
# +-------------------------------------------------------------------+

Executable "history-stress-test"
  Path: tests
  Install: false
  CompiledObject: best
  MainIs: history_stress_test.ml
  BuildDepends: lambda-term

# +-------------------------------------------------------------------+
# | Doc                                                               |
# +-------------------------------------------------------------------+

Document "lambda-term-api"
  Title: API reference for Lambda-Term
  Type: ocamlbuild (0.4)
  Install: true
  InstallDir: $htmldir/api
  DataFiles: style.css
  BuildTools: ocamldoc
  XOCamlbuildPath: ./
  XOCamlbuildLibraries: lambda-term

# +-------------------------------------------------------------------+
# | Manual pages                                                      |
# +-------------------------------------------------------------------+

Document "lambda-term-actions-man"
  Type: custom (0.4)
  Title: Man page for lambda-term-actions
  Install: true
  BuildTools: gzip
  XCustom: $gzip -c man/lambda-term-actions.1 > man/lambda-term-actions.1.gz
  XCustomClean: $rm man/lambda-term-actions.1.gz
  DataFiles: man/lambda-term-actions.1.gz
  InstallDir: $mandir/man1

Document "lambda-term-inputrc-man"
  Type: custom (0.4)
  Title: Man page for ~/.lambda-term-inputrc
  Install: true
  BuildTools: gzip
  XCustom: $gzip -c man/lambda-term-inputrc.5 > man/lambda-term-inputrc.5.gz
  XCustomClean: $rm man/lambda-term-inputrc.5.gz
  DataFiles: man/lambda-term-inputrc.5.gz
  InstallDir: $mandir/man5

# +-------------------------------------------------------------------+
# | Configuration examples                                            |
# +-------------------------------------------------------------------+

Document "lamda-term-inputrc"
  Type: custom (0.4)
  Title: lambda-term-inputrc example
  XCustom: true
  Install: true
  DataFiles: lambda-term-inputrc

Document "lambda-termrc"
  Type: custom (0.4)
  Title: lambda-term resource file example
  XCustom: true
  Install: true
  DataFiles: lambda-termrc

# +-------------------------------------------------------------------+
# | Misc                                                              |
# +-------------------------------------------------------------------+

SourceRepository head
  Type: git
  Location: https://github.com/diml/lambda-term.git
  Browser: https://github.com/diml/lambda-term
