__init__.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from devtools.yamaker.modules import GLOBAL
  2. from devtools.yamaker.project import GNUMakeNixProject
  3. def post_install(self):
  4. with self.yamakes["."] as lzma:
  5. lzma.CFLAGS += [GLOBAL("-DLZMA_API_STATIC")]
  6. lzma = GNUMakeNixProject(
  7. arcdir="contrib/libs/lzma",
  8. nixattr="xz",
  9. flags=["--localedir=/var/empty"],
  10. disable_includes=[
  11. "crc32_arm64.h",
  12. "crc32_table_be.h",
  13. "crc64_table_be.h",
  14. "dpmi.h",
  15. "invent.h",
  16. "lz_encoder_hash_table.h",
  17. "machine/hal_sysinfo.h",
  18. "proto/",
  19. "os2.h",
  20. "sha2.h",
  21. "sha256.h",
  22. "sys/capsicum.h",
  23. "sys/syspage.h",
  24. # if defined(__VMS)
  25. "lib$routines.h",
  26. "ssdef.h",
  27. "syidef.h",
  28. # if defined(__sun)
  29. "sys/byteorder.h",
  30. ],
  31. install_targets=["lzma"],
  32. install_subdir="src",
  33. addincl_global={
  34. ".": {"./liblzma/api"},
  35. },
  36. platform_dispatchers=[
  37. "common/config.h",
  38. ],
  39. post_install=post_install,
  40. )
  41. # ChangeLog file is just a git log, it is not intended for humans, yet increases diff size dramatically
  42. lzma.copy_top_sources_except.add("ChangeLog")