]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - ppp/patches/0005-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch
ppp: Update to 2.4.6.
[people/amarx/ipfire-3.x.git] / ppp / patches / 0005-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch
CommitLineData
a373e543
SS
1From 69711944745af0078da77e108d30f89fd7e06108 Mon Sep 17 00:00:00 2001
2From: Michal Sekletar <msekleta@redhat.com>
3Date: Fri, 4 Apr 2014 12:01:33 +0200
4Subject: [PATCH 05/25] build-sys: don't hardcode LIBDIR, but set it according
5 to the target platform
6
7---
8 pppd/Makefile.linux | 3 ++-
9 pppd/pathnames.h | 2 +-
10 pppd/plugins/Makefile.linux | 2 +-
11 pppd/plugins/pppoatm/Makefile.linux | 2 +-
12 pppd/plugins/pppol2tp/Makefile.linux | 4 ++--
13 pppd/plugins/radius/Makefile.linux | 2 +-
14 pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
15 7 files changed, 9 insertions(+), 8 deletions(-)
16
17diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
18index 63872eb..8ed56c1 100644
19--- a/pppd/Makefile.linux
20+++ b/pppd/Makefile.linux
21@@ -8,6 +8,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
22 BINDIR = $(DESTDIR)/sbin
23 MANDIR = $(DESTDIR)/share/man/man8
24 INCDIR = $(DESTDIR)/include
25+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
26
27 TARGETS = pppd
28
29@@ -32,7 +33,7 @@ endif
30
31 CC = gcc
32 #
33-COPTS = -Wall $(RPM_OPT_FLAGS)
34+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
35
36 # Uncomment the next 2 lines to include support for Microsoft's
37 # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
38diff --git a/pppd/pathnames.h b/pppd/pathnames.h
39index a33f046..a427cb8 100644
40--- a/pppd/pathnames.h
41+++ b/pppd/pathnames.h
42@@ -57,7 +57,7 @@
43
44 #ifdef PLUGIN
45 #ifdef __STDC__
46-#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
47+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
48 #else /* __STDC__ */
49 #define _PATH_PLUGIN "/usr/lib/pppd"
50 #endif /* __STDC__ */
51diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
52index e09a369..b474a19 100644
53--- a/pppd/plugins/Makefile.linux
54+++ b/pppd/plugins/Makefile.linux
55@@ -7,7 +7,7 @@ INSTALL = install
56 DESTDIR = $(INSTROOT)@DESTDIR@
57 BINDIR = $(DESTDIR)/sbin
58 MANDIR = $(DESTDIR)/share/man/man8
59-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
60+LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
61
62 SUBDIRS := rp-pppoe pppoatm pppol2tp
63 # Uncomment the next line to include the radius authentication plugin
64diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
65index 5a81447..769794b 100644
66--- a/pppd/plugins/pppoatm/Makefile.linux
67+++ b/pppd/plugins/pppoatm/Makefile.linux
68@@ -7,7 +7,7 @@ INSTALL = install
69 #***********************************************************************
70
71 DESTDIR = $(INSTROOT)@DESTDIR@
72-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
73+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
74
75 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
76
77diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
78index ea3538e..4339566 100644
79--- a/pppd/plugins/pppol2tp/Makefile.linux
80+++ b/pppd/plugins/pppol2tp/Makefile.linux
81@@ -6,8 +6,8 @@ INSTALL = install
82
83 #***********************************************************************
84
85-DESTDIR = @DESTDIR@
86-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
87+DESTDIR = $(INSTROOT)@DESTDIR@
88+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
89
90 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
91
92diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
93index 45b3b8d..179d0b7 100644
94--- a/pppd/plugins/radius/Makefile.linux
95+++ b/pppd/plugins/radius/Makefile.linux
96@@ -5,7 +5,7 @@
97
98 DESTDIR = $(INSTROOT)@DESTDIR@
99 MANDIR = $(DESTDIR)/share/man/man8
100-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
101+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
102
103 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
104
105diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
106index 352991a..1305ed8 100644
107--- a/pppd/plugins/rp-pppoe/Makefile.linux
108+++ b/pppd/plugins/rp-pppoe/Makefile.linux
109@@ -16,7 +16,7 @@
110
111 DESTDIR = $(INSTROOT)@DESTDIR@
112 BINDIR = $(DESTDIR)/sbin
113-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
114+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
115
116 PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
117
118--
1191.8.3.1
120