2014-10-06 19:34:57 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# botan
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-08-19 01:30:49 +02:00
|
|
|
BOTAN_VERSION = 2.7.0
|
2014-10-06 19:34:57 +02:00
|
|
|
BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tgz
|
2016-07-11 22:18:42 +02:00
|
|
|
BOTAN_SITE = http://botan.randombit.net/releases
|
2017-03-30 15:43:39 +02:00
|
|
|
BOTAN_LICENSE = BSD-2-Clause
|
2018-08-19 01:30:49 +02:00
|
|
|
BOTAN_LICENSE_FILES = license.txt
|
2014-10-06 19:34:57 +02:00
|
|
|
|
|
|
|
BOTAN_INSTALL_STAGING = YES
|
|
|
|
|
|
|
|
BOTAN_CONF_OPTS = \
|
|
|
|
--cpu=$(BR2_ARCH) \
|
|
|
|
--os=linux \
|
|
|
|
--cc=gcc \
|
2015-04-10 17:55:23 +02:00
|
|
|
--cc-bin="$(TARGET_CXX)" \
|
|
|
|
--prefix=/usr
|
2014-10-06 19:34:57 +02:00
|
|
|
|
2018-08-19 01:30:49 +02:00
|
|
|
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
|
2014-10-06 19:34:57 +02:00
|
|
|
endif
|
|
|
|
|
2018-09-11 20:54:36 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
BOTAN_CONF_OPTS += --without-os-feature=getauxval
|
|
|
|
endif
|
|
|
|
|
2018-08-19 01:30:50 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BOOST),y)
|
|
|
|
BOTAN_DEPENDENCIES += boost
|
|
|
|
BOTAN_CONF_OPTS += --with-boost
|
|
|
|
endif
|
|
|
|
|
2014-10-06 19:34:57 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
BOTAN_DEPENDENCIES += bzip2
|
|
|
|
BOTAN_CONF_OPTS += --with-bzip2
|
2014-10-06 19:34:57 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
BOTAN_DEPENDENCIES += openssl
|
|
|
|
BOTAN_CONF_OPTS += --with-openssl
|
2014-10-06 19:34:57 +02:00
|
|
|
endif
|
|
|
|
|
2018-08-19 01:30:51 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SQLITE),y)
|
|
|
|
BOTAN_DEPENDENCIES += sqlite
|
|
|
|
BOTAN_CONF_OPTS += --with-sqlite
|
|
|
|
endif
|
|
|
|
|
2018-08-19 01:30:52 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XZ),y)
|
|
|
|
BOTAN_DEPENDENCIES += xz
|
|
|
|
BOTAN_CONF_OPTS += --with-lzma
|
|
|
|
endif
|
|
|
|
|
2014-10-06 19:34:57 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
BOTAN_DEPENDENCIES += zlib
|
|
|
|
BOTAN_CONF_OPTS += --with-zlib
|
2014-10-06 19:34:57 +02:00
|
|
|
endif
|
|
|
|
|
2018-08-26 13:29:59 +02:00
|
|
|
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
|
2017-06-06 16:29:11 +02:00
|
|
|
BOTAN_CONF_OPTS += --disable-altivec
|
|
|
|
endif
|
|
|
|
|
2018-09-07 21:17:36 +02:00
|
|
|
ifeq ($(BR2_ARM_CPU_HAS_NEON),)
|
|
|
|
BOTAN_CONF_OPTS += --disable-neon
|
|
|
|
endif
|
|
|
|
|
2014-10-06 19:34:57 +02:00
|
|
|
define BOTAN_CONFIGURE_CMDS
|
2016-10-17 18:05:54 +02:00
|
|
|
(cd $(@D); $(TARGET_MAKE_ENV) ./configure.py $(BOTAN_CONF_OPTS))
|
2014-10-06 19:34:57 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define BOTAN_BUILD_CMDS
|
2018-09-16 11:49:55 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) AR="$(TARGET_AR)"
|
2014-10-06 19:34:57 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define BOTAN_INSTALL_STAGING_CMDS
|
2016-10-17 18:05:54 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)/usr" install
|
2014-10-06 19:34:57 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define BOTAN_INSTALL_TARGET_CMDS
|
2016-10-17 18:05:54 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)/usr" install
|
2014-10-06 19:34:57 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|