aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2022-09-23 08:43:59 -0300
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-25 15:19:10 +0200
commitd08c9da43cf364712e947d5faa3ab84d995dd0ec (patch)
tree99234f464a94b294e421e931f42f44f4b7905398 /package/libs
parent50d0b41b38440fa5c6b87bebc229296667851b26 (diff)
downloadupstream-d08c9da43cf364712e947d5faa3ab84d995dd0ec.tar.gz
upstream-d08c9da43cf364712e947d5faa3ab84d995dd0ec.tar.bz2
upstream-d08c9da43cf364712e947d5faa3ab84d995dd0ec.zip
wolfssl: prefer regular libwolfssl over cpu-crypto
Rename libwolfssl-cpu-crypto to libwolfsslcpu-crypto so that the regular libwolfssl version comes first when running: opkg install libwolfssl Normally, if the package name matches the opkg parameter, that package is preferred. However, for libraries, the ABI version string is appended to the package official name, and the short name won't match. Failing a name match, the candidate packages are sorted in alphabetical order, and a dash will come before any number. So in order to prefer the original library, the dash should be removed from the alternative library. Fixes: c3e7d86d2b (wolfssl: add libwolfssl-cpu-crypto package) Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'package/libs')
-rw-r--r--package/libs/wolfssl/Config.in4
-rw-r--r--package/libs/wolfssl/Makefile22
-rw-r--r--package/libs/wolfssl/preinst.arm-ce6
3 files changed, 16 insertions, 16 deletions
diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in
index af9ba923fe..a212d1fb8a 100644
--- a/package/libs/wolfssl/Config.in
+++ b/package/libs/wolfssl/Config.in
@@ -67,8 +67,8 @@ config WOLFSSL_HAS_DEVCRYPTO
bool
if PACKAGE_libwolfssl
- if PACKAGE_libwolfssl-cpu-crypto
- comment "Hardware Acceleration does not apply to libwolfssl-cpu-crypto"
+ if PACKAGE_libwolfsslcpu-crypto
+ comment "Hardware Acceleration does not apply to libwolfsslcpu-crypto"
endif
choice
prompt "Hardware Acceleration"
diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 71379736f0..d090dd5780 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -67,7 +67,7 @@ $(call Package/libwolfssl/Default)
ABI_VERSION:=$(PKG_ABI_VERSION)
VARIANT:=regular
DEFAULT_VARIANT:=1
- CONFLICTS:=libwolfssl-cpu-crypto
+ CONFLICTS:=libwolfsslcpu-crypto
endef
define Package/libwolfssl/description
@@ -79,7 +79,7 @@ define Package/libwolfssl/config
source "$(SOURCE)/Config.in"
endef
-define Package/libwolfssl-cpu-crypto
+define Package/libwolfsslcpu-crypto
$(call Package/libwolfssl/Default)
TITLE:=wolfSSL library with AES CPU instructions
PROVIDES:=libwolfssl libcyassl
@@ -94,20 +94,20 @@ $(call Package/libwolfssl/Default)
DEPENDS:=libwolfssl
endef
-define Package/libwolfssl-cpu-crypto/description
+define Package/libwolfsslcpu-crypto/description
$(call Package/libwolfssl/description)
This variant uses AES CPU instructions (Intel AESNI or ARMv8 Crypto Extension)
endef
-define Package/libwolfssl-cpu-crypto/config
- if TARGET_armvirt && PACKAGE_libwolfssl-cpu-crypto = y
- comment "You are about to build libwolfssl-cpu-crypto into an armvirt_64 image."
+define Package/libwolfsslcpu-crypto/config
+ if TARGET_armvirt && PACKAGE_libwolfsslcpu-crypto = y
+ comment "You are about to build libwolfsslcpu-crypto into an armvirt_64 image."
comment "Ensure all of your installation targets support the Crypto Extension. "
comment "Look for the 'aes' feature in /proc/cpuinfo. This library does not do "
comment "run-time detection and will crash if the CPU does not support it. "
endif
- if TARGET_bcm27xx && PACKAGE_libwolfssl-cpu-crypto
- comment "Beware that libwolfssl-cpu-crypto will not run in a bcm27xx target. "
+ if TARGET_bcm27xx && PACKAGE_libwolfsslcpu-crypto
+ comment "Beware that libwolfsslcpu-crypto will not run in a bcm27xx target. "
endif
endef
@@ -161,7 +161,7 @@ else ifdef CONFIG_aarch64
CONFIGURE_ARGS += --enable-armasm
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
WOLFSSL_NOASM_REGEX:=^bcm27xx/.*
- Package/libwolfssl-cpu-crypto/preinst=\
+ Package/libwolfsslcpu-crypto/preinst=\
$(subst @@WOLFSSL_NOASM_REGEX@@,$(WOLFSSL_NOASM_REGEX),$(file <preinst.arm-ce))
else ifdef CONFIG_TARGET_x86_64
CONFIGURE_ARGS += --enable-intelasm
@@ -194,7 +194,7 @@ define Package/libwolfssl/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
endef
-Package/libwolfssl-cpu-crypto/install=$(Package/libwolfssl/install)
+Package/libwolfsslcpu-crypto/install=$(Package/libwolfssl/install)
define Package/libwolfssl-benchmark/install
$(INSTALL_DIR) $(1)/usr/bin
@@ -202,5 +202,5 @@ define Package/libwolfssl-benchmark/install
endef
$(eval $(call BuildPackage,libwolfssl))
-$(eval $(call BuildPackage,libwolfssl-cpu-crypto))
+$(eval $(call BuildPackage,libwolfsslcpu-crypto))
$(eval $(call BuildPackage,libwolfssl-benchmark))
diff --git a/package/libs/wolfssl/preinst.arm-ce b/package/libs/wolfssl/preinst.arm-ce
index 449e324f16..d6e2996269 100644
--- a/package/libs/wolfssl/preinst.arm-ce
+++ b/package/libs/wolfssl/preinst.arm-ce
@@ -1,6 +1,6 @@
#!/bin/sh
exec >&2
-printf "[libwolfssl-cpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
+printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
if [ -n "${IPKG_INSTROOT}" ]; then
printf "...[offline]... "
eval "$(grep '^DISTRIB_TARGET=' "${IPKG_INSTROOT}/etc/openwrt_release")"
@@ -8,14 +8,14 @@ if [ -n "${IPKG_INSTROOT}" ]; then
echo "${DISTRIB_TARGET}" | grep '@@WOLFSSL_NOASM_REGEX@@' > /dev/null && {
echo "not supported"
echo "Error: Target ${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
- echo "Install the regular libwolfssl package instead of libwolfssl-cpu-crypto."
+ echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
exit 1
}
else
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
echo "not supported"
echo "Error: Arm v8-A Cryptographic Extension not supported."
- echo "Install the regular libwolfssl package instead of libwolfssl-cpu-crypto."
+ echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
echo "Contents of /proc/cpuinfo:"
cat /proc/cpuinfo
exit 1