cabal-version:       2.2
name:                lzma-clib
version:             5.2.5
license-file:        LICENSE
author:              Lasse Collin
maintainer:          hvr@gnu.org
bug-reports:         https://github.com/hvr/lzma/issues
category:            Codec
build-type:          Simple
synopsis:            liblzma C library and headers for use by LZMA bindings

description:
   This package contains the @liblzma@ C library with headers for use
   by LZMA\/XZ bindings such as </package/lzma lzma>.
   .
   The @liblzma@ code contained in this package version has been
   extracted from the <http://tukaani.org/xz/ XZ Utils> 5.2.5 release.
   .
   NOTE: This package is only buildable on Windows.

extra-source-files:
  autoconf-darwin/config.h
  autoconf-linux/config.h
  autoconf-win32/config.h
  src/common/*.c
  src/common/*.h
  src/liblzma/api/lzma.h
  src/liblzma/api/lzma/*.h
  src/liblzma/check/*.c
  src/liblzma/check/*.h
  src/liblzma/common/*.c
  src/liblzma/common/*.h
  src/liblzma/delta/*.c
  src/liblzma/delta/*.h
  src/liblzma/lz/*.c
  src/liblzma/lz/*.h
  src/liblzma/lzma/*.c
  src/liblzma/lzma/*.h
  src/liblzma/rangecoder/*.c
  src/liblzma/rangecoder/*.h
  src/liblzma/simple/*.c
  src/liblzma/simple/*.h

source-repository head
  type:     git
  location: https://github.com/hvr/lzma-clib.git

library
  default-language:    Haskell2010

  c-sources:
    src/common/tuklib_cpucores.c
    src/common/tuklib_physmem.c
    src/liblzma/check/check.c
    src/liblzma/check/crc32_fast.c
    src/liblzma/check/crc32_table.c
    src/liblzma/check/crc64_fast.c
    src/liblzma/check/crc64_table.c
    src/liblzma/check/sha256.c
    src/liblzma/common/alone_decoder.c
    src/liblzma/common/alone_encoder.c
    src/liblzma/common/auto_decoder.c
    src/liblzma/common/block_buffer_decoder.c
    src/liblzma/common/block_buffer_encoder.c
    src/liblzma/common/block_decoder.c
    src/liblzma/common/block_encoder.c
    src/liblzma/common/block_header_decoder.c
    src/liblzma/common/block_header_encoder.c
    src/liblzma/common/block_util.c
    src/liblzma/common/common.c
    src/liblzma/common/easy_buffer_encoder.c
    src/liblzma/common/easy_decoder_memusage.c
    src/liblzma/common/easy_encoder.c
    src/liblzma/common/easy_encoder_memusage.c
    src/liblzma/common/easy_preset.c
    src/liblzma/common/filter_buffer_decoder.c
    src/liblzma/common/filter_buffer_encoder.c
    src/liblzma/common/filter_common.c
    src/liblzma/common/filter_decoder.c
    src/liblzma/common/filter_encoder.c
    src/liblzma/common/filter_flags_decoder.c
    src/liblzma/common/filter_flags_encoder.c
    src/liblzma/common/hardware_cputhreads.c
    src/liblzma/common/hardware_physmem.c
    src/liblzma/common/index.c
    src/liblzma/common/index_decoder.c
    src/liblzma/common/index_encoder.c
    src/liblzma/common/index_hash.c
    src/liblzma/common/outqueue.c
    src/liblzma/common/stream_buffer_decoder.c
    src/liblzma/common/stream_buffer_encoder.c
    src/liblzma/common/stream_decoder.c
    src/liblzma/common/stream_encoder.c
    src/liblzma/common/stream_encoder_mt.c
    src/liblzma/common/stream_flags_common.c
    src/liblzma/common/stream_flags_decoder.c
    src/liblzma/common/stream_flags_encoder.c
    src/liblzma/common/vli_decoder.c
    src/liblzma/common/vli_encoder.c
    src/liblzma/common/vli_size.c
    src/liblzma/delta/delta_common.c
    src/liblzma/delta/delta_decoder.c
    src/liblzma/delta/delta_encoder.c
    src/liblzma/lz/lz_decoder.c
    src/liblzma/lz/lz_encoder.c
    src/liblzma/lz/lz_encoder_mf.c
    src/liblzma/lzma/fastpos_table.c
    src/liblzma/lzma/lzma2_decoder.c
    src/liblzma/lzma/lzma2_encoder.c
    src/liblzma/lzma/lzma_decoder.c
    src/liblzma/lzma/lzma_encoder.c
    src/liblzma/lzma/lzma_encoder_optimum_fast.c
    src/liblzma/lzma/lzma_encoder_optimum_normal.c
    src/liblzma/lzma/lzma_encoder_presets.c
    src/liblzma/rangecoder/price_table.c
    src/liblzma/simple/arm.c
    src/liblzma/simple/armthumb.c
    src/liblzma/simple/ia64.c
    src/liblzma/simple/powerpc.c
    src/liblzma/simple/simple_coder.c
    src/liblzma/simple/simple_decoder.c
    src/liblzma/simple/simple_encoder.c
    src/liblzma/simple/sparc.c
    src/liblzma/simple/x86.c

  if os(windows)
    include-dirs: autoconf-win32
  elif os(darwin)
    include-dirs: autoconf-darwin
  elif os(linux)
    include-dirs: autoconf-linux
  else
    build-depends: unbuildable<0
    buildable: False

  include-dirs:
    src/liblzma/api
    src/liblzma/common
    src/liblzma/check
    src/liblzma/delta
    src/liblzma/lz
    src/liblzma/lzma
    src/liblzma/rangecoder
    src/liblzma/simple
    src/common

  install-includes:
    lzma.h
    lzma/base.h
    lzma/bcj.h
    lzma/block.h
    lzma/check.h
    lzma/container.h
    lzma/delta.h
    lzma/filter.h
    lzma/hardware.h
    lzma/index.h
    lzma/index_hash.h
    lzma/lzma12.h
    lzma/stream_flags.h
    lzma/version.h
    lzma/vli.h

  cc-options: -std=gnu99 -DHAVE_CONFIG_H -DTUKLIB_SYMBOL_PREFIX=lzma_
