mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
29
package/botan/Config.in
Normal file
29
package/botan/Config.in
Normal file
@@ -0,0 +1,29 @@
|
||||
config BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_m68k || \
|
||||
BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
|
||||
BR2_powerpc || BR2_powerpc64 || BR2_sparc || BR2_sh || \
|
||||
BR2_x86_64
|
||||
|
||||
config BR2_PACKAGE_BOTAN
|
||||
bool "botan"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM if BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_SYSTEM if BR2_PACKAGE_BOOST
|
||||
help
|
||||
Botan is a crypto library for C++
|
||||
|
||||
http://botan.randombit.net
|
||||
|
||||
comment "botan needs a toolchain w/ C++, threads, gcc >= 4.8"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
|
||||
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
|
||||
|
||||
comment "botan needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
4
package/botan/botan.hash
Normal file
4
package/botan/botan.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From https://botan.randombit.net/releases/sha256sums.txt
|
||||
sha256 f7874da2aeb8c018fd77df40b2137879bf90b66f5589490c991e83fb3e8094be Botan-2.11.0.tar.xz
|
||||
# Locally computed
|
||||
sha256 161011a9be56a6e825c06257005055a148056b5c756f75a0b99dae0883fcab7a license.txt
|
||||
109
package/botan/botan.mk
Normal file
109
package/botan/botan.mk
Normal file
@@ -0,0 +1,109 @@
|
||||
################################################################################
|
||||
#
|
||||
# botan
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BOTAN_VERSION = 2.11.0
|
||||
BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tar.xz
|
||||
BOTAN_SITE = http://botan.randombit.net/releases
|
||||
BOTAN_LICENSE = BSD-2-Clause
|
||||
BOTAN_LICENSE_FILES = license.txt
|
||||
|
||||
BOTAN_INSTALL_STAGING = YES
|
||||
|
||||
BOTAN_CONF_OPTS = \
|
||||
--cpu=$(BR2_ARCH) \
|
||||
--os=linux \
|
||||
--cc=gcc \
|
||||
--cc-bin="$(TARGET_CXX)" \
|
||||
--ldflags="$(BOTAN_LDFLAGS)" \
|
||||
--prefix=/usr \
|
||||
--without-documentation
|
||||
|
||||
BOTAN_LDFLAGS = $(TARGET_LDFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
BOTAN_LDFLAGS += -latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS),y)
|
||||
BOTAN_CONF_OPTS += \
|
||||
--disable-static-library \
|
||||
--enable-shared-library
|
||||
else ifeq ($(BR2_STATIC_LIBS),y)
|
||||
BOTAN_CONF_OPTS += \
|
||||
--disable-shared-library \
|
||||
--enable-static-library \
|
||||
--no-autoload
|
||||
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
||||
BOTAN_CONF_OPTS += \
|
||||
--enable-shared-library \
|
||||
--enable-static-library
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
|
||||
BOTAN_CONF_OPTS += --with-stack-protector
|
||||
else
|
||||
BOTAN_CONF_OPTS += --without-stack-protector
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
||||
BOTAN_CONF_OPTS += --without-os-feature=getauxval
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BOOST),y)
|
||||
BOTAN_DEPENDENCIES += boost
|
||||
BOTAN_CONF_OPTS += --with-boost
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
||||
BOTAN_DEPENDENCIES += bzip2
|
||||
BOTAN_CONF_OPTS += --with-bzip2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
BOTAN_DEPENDENCIES += openssl
|
||||
BOTAN_CONF_OPTS += --with-openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQLITE),y)
|
||||
BOTAN_DEPENDENCIES += sqlite
|
||||
BOTAN_CONF_OPTS += --with-sqlite
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XZ),y)
|
||||
BOTAN_DEPENDENCIES += xz
|
||||
BOTAN_CONF_OPTS += --with-lzma
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
BOTAN_DEPENDENCIES += zlib
|
||||
BOTAN_CONF_OPTS += --with-zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
|
||||
BOTAN_CONF_OPTS += --disable-altivec
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARM_CPU_HAS_NEON),)
|
||||
BOTAN_CONF_OPTS += --disable-neon
|
||||
endif
|
||||
|
||||
define BOTAN_CONFIGURE_CMDS
|
||||
(cd $(@D); $(TARGET_MAKE_ENV) ./configure.py $(BOTAN_CONF_OPTS))
|
||||
endef
|
||||
|
||||
define BOTAN_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) AR="$(TARGET_AR)"
|
||||
endef
|
||||
|
||||
define BOTAN_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
|
||||
endef
|
||||
|
||||
define BOTAN_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user