botan.mk 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ################################################################################
  2. #
  3. # botan
  4. #
  5. ################################################################################
  6. BOTAN_VERSION = 3.5.0
  7. BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tar.xz
  8. BOTAN_SITE = http://botan.randombit.net/releases
  9. BOTAN_LICENSE = BSD-2-Clause
  10. BOTAN_LICENSE_FILES = license.txt
  11. BOTAN_CPE_ID_VALID = YES
  12. BOTAN_INSTALL_STAGING = YES
  13. BOTAN_DEPENDENCIES = host-python3
  14. BOTAN_CONF_OPTS = \
  15. --cpu=$(BR2_ARCH) \
  16. --disable-cc-tests \
  17. --os=linux \
  18. --cc=gcc \
  19. --cc-bin="$(TARGET_CXX)" \
  20. --prefix=/usr \
  21. --without-documentation
  22. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  23. BOTAN_CONF_OPTS += --extra-libs=atomic
  24. endif
  25. ifeq ($(BR2_SHARED_LIBS),y)
  26. BOTAN_CONF_OPTS += \
  27. --disable-static-library \
  28. --enable-shared-library
  29. else ifeq ($(BR2_STATIC_LIBS),y)
  30. BOTAN_CONF_OPTS += \
  31. --disable-shared-library \
  32. --enable-static-library \
  33. --no-autoload
  34. else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
  35. BOTAN_CONF_OPTS += \
  36. --enable-shared-library \
  37. --enable-static-library
  38. endif
  39. ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
  40. BOTAN_CONF_OPTS += --with-stack-protector
  41. else
  42. BOTAN_CONF_OPTS += --without-stack-protector
  43. endif
  44. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
  45. BOTAN_CONF_OPTS += --with-os-feature=threads
  46. else
  47. BOTAN_CONF_OPTS += --without-os-feature=threads
  48. endif
  49. ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
  50. BOTAN_CONF_OPTS += --without-os-feature=explicit_bzero,getauxval,getentropy
  51. endif
  52. ifeq ($(BR2_PACKAGE_BOOST_FILESYSTEM)$(BR2_PACKAGE_BOOST_SYSTEM),yy)
  53. BOTAN_DEPENDENCIES += boost
  54. BOTAN_CONF_OPTS += --with-boost
  55. endif
  56. ifeq ($(BR2_PACKAGE_BZIP2),y)
  57. BOTAN_DEPENDENCIES += bzip2
  58. BOTAN_CONF_OPTS += --with-bzip2
  59. endif
  60. ifeq ($(BR2_PACKAGE_SQLITE),y)
  61. BOTAN_DEPENDENCIES += sqlite
  62. BOTAN_CONF_OPTS += --with-sqlite
  63. endif
  64. ifeq ($(BR2_PACKAGE_TROUSERS),y)
  65. BOTAN_DEPENDENCIES += trousers
  66. BOTAN_CONF_OPTS += --with-tpm
  67. endif
  68. ifeq ($(BR2_PACKAGE_XZ),y)
  69. BOTAN_DEPENDENCIES += xz
  70. BOTAN_CONF_OPTS += --with-lzma
  71. endif
  72. ifeq ($(BR2_PACKAGE_ZLIB),y)
  73. BOTAN_DEPENDENCIES += zlib
  74. BOTAN_CONF_OPTS += --with-zlib
  75. endif
  76. ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
  77. BOTAN_CONF_OPTS += --disable-altivec
  78. endif
  79. ifeq ($(BR2_ARM_CPU_HAS_NEON),)
  80. BOTAN_CONF_OPTS += --disable-neon
  81. endif
  82. ifeq ($(BR2_SOFT_FLOAT),y)
  83. BOTAN_CONF_OPTS += --disable-neon
  84. endif
  85. define BOTAN_CONFIGURE_CMDS
  86. (cd $(@D); $(TARGET_MAKE_ENV) ./configure.py $(BOTAN_CONF_OPTS))
  87. endef
  88. define BOTAN_BUILD_CMDS
  89. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) AR="$(TARGET_AR)"
  90. endef
  91. define BOTAN_INSTALL_STAGING_CMDS
  92. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
  93. endef
  94. define BOTAN_INSTALL_TARGET_CMDS
  95. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
  96. endef
  97. $(eval $(generic-package))