ppp/ppp-2.4.2-lib64.patch
cvsdist 5efb5bf2b7 auto-import changelog data from ppp-2.4.2-2.src.rpm
Fri May 07 2004 Nils Philippsen <nphilipp@redhat.com> 2.4.2-2
- don't write to /etc (#118837)
Wed Mar 10 2004 Nalin Dahyabhai <nalin@redhat.com> 2.4.2-1
- update to 2.4.2
2004-09-09 10:43:30 +00:00

52 lines
1.7 KiB
Diff

If CC supports the "-print-multi-os-directory" option, use it to determine
where to check for the existence libcrypt. If it doesn't, then we get /usr/lib.
--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500
+++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 17:44:04.000000000 -0500
@@ -7,6 +7,7 @@
BINDIR = $(DESTDIR)/usr/sbin
MANDIR = $(DESTDIR)/usr/man
INCDIR = $(DESTDIR)/usr/include
+LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
TARGETS = pppd
@@ -31,7 +32,7 @@
CC = gcc
#
-COPTS = -Wall $(RPM_OPT_FLAGS)
+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
LIBS = -lutil
# Uncomment the next 2 lines to include support for Microsoft's
@@ -119,7 +120,7 @@
ifneq ($(wildcard /usr/include/crypt.h),)
CFLAGS += -DHAVE_CRYPT_H=1
endif
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
+ifneq ($(wildcard $(LIBDIR)/libcrypt.*),)
LIBS += -lcrypt
endif
--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:40:27.000000000 -0500
+++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500
@@ -21,7 +21,7 @@
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
-LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/usr/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
install: $(PLUGINS)
$(INSTALL) -d $(LIBDIR)
--- ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:15.000000000 -0500
+++ ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:10.000000000 -0500
@@ -55,5 +55,5 @@
#endif /* __STDC__ */
#ifdef PLUGIN
-#define _PATH_PLUGIN "/usr/lib/pppd/" VERSION
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
#endif /* PLUGIN */