diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-10 22:38:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-10 22:38:53 +0000 |
commit | 1455b5b89af9fecaf957393aa33878e85d2826a9 (patch) | |
tree | e4e75ebec51d948a813b5b8e809e2e15ee725c8d /package/network/services/dropbear/Makefile | |
parent | 8c138d4ae85fd772a34f6d140ffb204813631260 (diff) | |
download | mtk-20170518-1455b5b89af9fecaf957393aa33878e85d2826a9.zip mtk-20170518-1455b5b89af9fecaf957393aa33878e85d2826a9.tar.gz mtk-20170518-1455b5b89af9fecaf957393aa33878e85d2826a9.tar.bz2 |
dropbear: split out curve25519 support into a separate config option
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48195
Diffstat (limited to 'package/network/services/dropbear/Makefile')
-rw-r--r-- | package/network/services/dropbear/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 4515165..ca67ed3 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -23,7 +23,7 @@ PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -PKG_CONFIG_DEPENDS:=CONFIG_DROPBEAR_ECC +PKG_CONFIG_DEPENDS:=CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519 include $(INCLUDE_DIR)/package.mk @@ -80,9 +80,16 @@ TARGET_LDFLAGS += -Wl,--gc-sections define Build/Configure $(Build/Configure/Default) + awk 'BEGIN { rc = 1 } \ + /'DROPBEAR_CURVE25519'/ { $$$$0 = "$(if $(CONFIG_DROPBEAR_CURVE25519),,// )#define 'DROPBEAR_CURVE25519'"; rc = 0 } \ + { print } \ + END { exit(rc) }' $(PKG_BUILD_DIR)/options.h \ + >$(PKG_BUILD_DIR)/options.h.new && \ + mv $(PKG_BUILD_DIR)/options.h.new $(PKG_BUILD_DIR)/options.h + # Enforce that all replacements are made, otherwise options.h has changed # format and this logic is broken. - for OPTION in DROPBEAR_ECDSA DROPBEAR_ECDH DROPBEAR_CURVE25519; do \ + for OPTION in DROPBEAR_ECDSA DROPBEAR_ECDH; do \ awk 'BEGIN { rc = 1 } \ /'$$$$OPTION'/ { $$$$0 = "$(if $(CONFIG_DROPBEAR_ECC),,// )#define '$$$$OPTION'"; rc = 0 } \ { print } \ |