nixpkgs-suyu/pkgs/tools/networking/ppp/nix-purity.patch
2021-07-21 15:20:44 +02:00

33 lines
991 B
Diff

diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 22837c5..6f6fff5 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -111,8 +111,8 @@ endif
# EAP SRP-SHA1
ifdef USE_SRP
-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
-LIBS += -lsrp -L/usr/local/ssl/lib
+CFLAGS += -DUSE_SRP -DOPENSSL -I@openssl_dev@/include/openssl
+LIBS += -lsrp -L@openssl_out@/lib
NEEDCRYPTOLIB = y
TARGETS += srp-entry
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
@@ -143,7 +143,7 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS)
endif
-ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
+ifneq ($(wildcard @glibc@/include/crypt.h),)
CFLAGS += -DHAVE_CRYPT_H=1
LIBS += -lcrypt
endif
@@ -155,7 +155,7 @@ endif
ifdef NEEDDES
ifndef USE_CRYPT
-CFLAGS += -I$(shell $(CC) --print-sysroot)/usr/include/openssl
+CFLAGS += -I@openssl_dev@/include/openssl
NEEDCRYPTOLIB = y
else
CFLAGS += -DUSE_CRYPT=1