package/pppd: use uclibc libcrypt instead of openssl
authorAlexander Mukhin <alexander.i.mukhin@gmail.com>
Sat, 7 Sep 2019 18:35:17 +0000 (21:35 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 7 Sep 2019 19:46:39 +0000 (21:46 +0200)
glibc since 2.28 dropped DES encryption routines setkey() and encrypt(),
but uclibc still provides them. So, if building with uclibc, we can
avoid using huge openssl library.

Signed-off-by: Alexander Mukhin <alexander.i.mukhin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pppd/Config.in
package/pppd/pppd.mk

index bf05689f5301be23336c4ef0f8958ec8378279a9..7db5674bf1b1f21c1272827d675156125859d9ba 100644 (file)
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PPPD
        depends on !BR2_STATIC_LIBS
        depends on !BR2_TOOLCHAIN_USES_MUSL # Use __P() macro all over the tree
        depends on BR2_USE_MMU
-       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_OPENSSL if BR2_TOOLCHAIN_USES_GLIBC
        help
          An implementation of the Point-to-point protocol.
 
index 4dffc17941e2048a1a1d204b95254b0e90d3380e..29e52be97840b919ee08967222f5cec7811de13b 100644 (file)
@@ -12,10 +12,14 @@ PPPD_LICENSE_FILES = \
        pppd/tdb.c pppd/plugins/pppoatm/COPYING \
        pppdump/bsd-comp.c pppd/ccp.c pppd/plugins/passprompt.c
 
-PPPD_DEPENDENCIES = openssl
-PPPD_MAKE_OPTS = \
-       HAVE_INET6=y \
-       OPENSSL_INCLUDE_DIR=$(STAGING_DIR)/usr/include/openssl
+PPPD_MAKE_OPTS = HAVE_INET6=y
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
+PPPD_DEPENDENCIES += openssl
+PPPD_MAKE_OPTS += OPENSSL_INCLUDE_DIR=$(STAGING_DIR)/usr/include/openssl
+else
+PPPD_MAKE_OPTS += USE_CRYPT=y
+endif
+
 PPPD_INSTALL_STAGING = YES
 PPPD_TARGET_BINS = chat pppd pppdump pppstats
 PPPD_RADIUS_CONF = \