~ubuntu-branches/ubuntu/edgy/freeradius/edgy-updates

« back to all changes in this revision

Viewing changes to debian/patches/06_libtool14_vs_rlm_eap_tls.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Jeremie Corbier
  • Date: 2006-07-08 19:41:05 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708194105-2dabtaxd16o7p90g
Tags: 1.1.2-2ubuntu1
* Merge from debian unstable.
* Remove previous patches merged upstream:
  - 14_freeradius-dictionary-fix.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 06_libtool14_vs_rlm_eap_tls.dpatch by Paul Hampson <Paul.Hampson@anu.edu.au>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: libtool 1.4 is the libtool for the FreeRADIUS 1.0 series,
6
 
## DP: but it can't link against a library that's not lib*.so as
7
 
## DP: it unconditionally changes references to libraries into
8
 
## DP: "-Ldir -lblah" on the command line.
9
 
## DP: This patch works around that by hardlinking rlm_eap_* to
10
 
## DP: librlm_eap_* so that libtool can find it in the build
11
 
## DP: directory. The right soname gets extracted, so at runtime
12
 
## DP: the correct rlm_eap_* is used.
13
 
## DP: From FreeRADIUS bugzilla #75 http://bugs.freeradius.org/show_bug.cgi?id=75
14
 
## DP: Patch ID #77 by Luca Landi
15
 
## DP: Modified to match a patch by Petr Salinger in Debian BTS 288547
16
 
## DP: to access needed modules by directly referencing the .la instead
17
 
## DP: of -L-l-ing them. This however requires libeap to be installed
18
 
## DP: before rlm_eap_sim, so there's a little Makefile hackery here to
19
 
## DP: add RLM_PREINSTALL to the Rules.mak file and use it to install
20
 
## DP: libeap before rlm_eap, or rlm_eap fails to link.
21
 
 
22
 
@DPATCH@
23
 
diff -ruN freeradius-1.1.0.orig/src/modules/rlm_eap/Makefile.in freeradius-1.1.0/src/modules/rlm_eap/Makefile.in
24
 
--- freeradius-1.1.0.orig/src/modules/rlm_eap/Makefile.in       2006-01-01 18:28:15.656525768 +0100
25
 
+++ freeradius-1.1.0/src/modules/rlm_eap/Makefile.in    2006-01-01 18:54:16.318269120 +0100
26
 
@@ -2,14 +2,15 @@
27
 
 SRCS        = rlm_eap.c eap.c mem.c state.c
28
 
 HEADERS     = eap.h rlm_eap.h
29
 
 RLM_CFLAGS  = $(INCLTDL) -I@srcdir@/libeap
30
 
-CLIENTLIBS  = -Llibeap -leap -L../../lib -lradius
31
 
-RLM_LIBS    = -Llibeap -leap
32
 
+RLM_LIBS    = @srcdir@/libeap/libeap.la
33
 
+CLIENTLIBS  = $(RLM_LIBS) -L../../lib -lradius
34
 
 #RLM_LIBS    = $(shell for x in types/rlm_eap*/rlm_eap*.la;do echo -dlpreopen $$x;done)
35
 
+RLM_PREINSTALL = install-libeap
36
 
 RLM_INSTALL = install-types
37
 
 RLM_SUBDIRS = libeap @eaptypes@ 
38
 
 RLM_UTILS   = radeapclient
39
 
 
40
 
-.PHONY: all install-types common
41
 
+.PHONY: all install-types install-libeap common
42
 
 
43
 
 $(STATIC_OBJS): $(HEADERS)
44
 
 
45
 
@@ -32,8 +33,15 @@
46
 
 radeapclient.o: radeapclient.c $(INCLUDES)
47
 
        $(CC) $(CFLAGS) ${RLM_CFLAGS} -c radeapclient.c
48
 
 
49
 
+install-libeap: 
50
 
+       @echo "Making install in libeap..."
51
 
+       @(cd libeap && $(MAKE) $(MFLAGS) install)
52
 
+
53
 
 install-types: 
54
 
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
55
 
+       @for dir in @eaptypes@; do  \
56
 
+               echo "Making install in $$dir..."; \
57
 
+               (cd $$dir && $(MAKE) $(MFLAGS) install) || exit $?;\
58
 
+       done
59
 
        $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radeapclient$(EXEEXT)       $(R)$(bindir)
60
 
 
61
 
 common:
62
 
diff -ruN freeradius-1.1.0.orig/src/modules/rlm_eap/types/Makefile freeradius-1.1.0/src/modules/rlm_eap/types/Makefile
63
 
--- freeradius-1.1.0.orig/src/modules/rlm_eap/types/Makefile    2006-01-01 18:28:15.663524704 +0100
64
 
+++ freeradius-1.1.0/src/modules/rlm_eap/types/Makefile 2006-01-01 18:54:16.320268816 +0100
65
 
@@ -16,7 +16,7 @@
66
 
        $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
67
 
 
68
 
 common: 
69
 
-       @for mod in rlm_eap*; do \
70
 
+       @for mod in rlm_eap_tls rlm_eap*; do \
71
 
                what=$(WHAT_TO_MAKE); \
72
 
                [ "$$what" = "all" ] && what="$(TARGET_LIBS)"; \
73
 
                if [ -d $$mod ] && [ -f $$mod/Makefile ]; then \
74
 
diff -ruN freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_peap/Makefile.in freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_peap/Makefile.in
75
 
--- freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_peap/Makefile.in    2006-01-01 18:28:15.672523336 +0100
76
 
+++ freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_peap/Makefile.in 2006-01-01 18:54:16.321268664 +0100
77
 
@@ -3,7 +3,7 @@
78
 
 RLM_CFLAGS  = $(INCLTDL) -I../.. @eap_peap_cflags@ -I../rlm_eap_tls -DOPENSSL_NO_KRB5 -I@srcdir@/../../libeap
79
 
 HEADERS     = ../rlm_eap_tls/rlm_eap_tls.h eap_peap.h ../../eap.h ../../rlm_eap.h
80
 
 RLM_INSTALL = 
81
 
-RLM_LIBS    = -L@srcdir@/../../libeap -leap @eap_peap_ldflags@
82
 
+RLM_LIBS    = @srcdir@/../../libeap/libeap.la @srcdir@/../rlm_eap_tls/librlm_eap_tls.la @eap_peap_ldflags@
83
 
 
84
 
 $(STATIC_OBJS): $(HEADERS)
85
 
 
86
 
diff -ruN freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_sim/Makefile.in freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_sim/Makefile.in
87
 
--- freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_sim/Makefile.in     2006-01-01 18:28:15.684521512 +0100
88
 
+++ freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_sim/Makefile.in  2006-01-01 18:54:16.322268512 +0100
89
 
@@ -2,7 +2,7 @@
90
 
 SRCS        = rlm_eap_sim.c 
91
 
 RLM_CFLAGS  = $(INCLTDL) -I@srcdir@/../.. -I@srcdir@/../../libeap
92
 
 HEADERS     = eap_sim.h
93
 
-RLM_LIBS    = -L@srcdir@/../../libeap -leap
94
 
+RLM_LIBS    = @srcdir@/../../libeap/libeap.la
95
 
 RLM_INSTALL = 
96
 
 
97
 
 $(STATIC_OBJS): $(HEADERS)
98
 
diff -ruN freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_ttls/Makefile.in freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_ttls/Makefile.in
99
 
--- freeradius-1.1.0.orig/src/modules/rlm_eap/types/rlm_eap_ttls/Makefile.in    2006-01-01 18:28:15.694519992 +0100
100
 
+++ freeradius-1.1.0/src/modules/rlm_eap/types/rlm_eap_ttls/Makefile.in 2006-01-01 18:54:16.324268208 +0100
101
 
@@ -3,7 +3,7 @@
102
 
 RLM_CFLAGS  = $(INCLTDL) -I@srcdir@/../.. -I@srcdir@/../../libeap @eap_ttls_cflags@ -I../rlm_eap_tls -DOPENSSL_NO_KRB5
103
 
 HEADERS     = ../rlm_eap_tls/rlm_eap_tls.h eap_ttls.h ../../eap.h ../../rlm_eap.h
104
 
 RLM_INSTALL = 
105
 
-RLM_LIBS    = -L@srcdir@/../../libeap -leap @eap_ttls_ldflags@
106
 
+RLM_LIBS    = @srcdir@/../../libeap/libeap.la @srcdir@/../rlm_eap_tls/librlm_eap_tls.la @eap_ttls_ldflags@
107
 
 
108
 
 $(STATIC_OBJS): $(HEADERS)
109
 
 
110
 
diff -ruN freeradius-1.1.0.orig/src/modules/rules.mak freeradius-1.1.0/src/modules/rules.mak
111
 
--- freeradius-1.1.0.orig/src/modules/rules.mak 2006-01-01 18:28:15.628530024 +0100
112
 
+++ freeradius-1.1.0/src/modules/rules.mak      2006-01-01 18:54:16.326267904 +0100
113
 
@@ -98,6 +98,13 @@
114
 
        $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
115
 
        -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) \
116
 
        -o $@ -rpath $(libdir) $^ $(RLM_LIBS) $(LIBS)
117
 
+       for file in .libs/rlm_eap_*.so ; do \
118
 
+               [ -f $$file ] || continue; \
119
 
+               name=$${file#.libs/}; \
120
 
+               name=$${name%.so}; \
121
 
+               ln -s .libs/$${name}.so lib$${name}.so; \
122
 
+               ln -s .libs/$${name}.la lib$${name}.la; \
123
 
+       done
124
 
 
125
 
 #######################################################################
126
 
 #
127
 
@@ -138,6 +145,7 @@
128
 
        @rm -f *.a *.o *.lo *.la *~
129
 
        @rm -rf .libs _libs
130
 
        @rm -f config.cache config.log config.status $(RLM_UTILS)
131
 
+       @rm -f librlm_eap_*.la librlm_eap_*.so
132
 
        @[ "x$(RLM_SUBDIRS)" = "x" ] || $(MAKE) $(MFLAGS) WHAT_TO_MAKE=clean common
133
 
 
134
 
 distclean: clean
135
 
@@ -155,6 +163,7 @@
136
 
 #  Otherwise, install the libraries into $(libdir)
137
 
 #
138
 
 install:
139
 
+       @[ "x$(RLM_PREINSTALL)" = "x" ] || $(MAKE) $(MFLAGS) $(RLM_PREINSTALL)
140
 
        if [ "x$(TARGET)" != "x" ]; then \
141
 
            $(LIBTOOL) --mode=install $(INSTALL) -c \
142
 
                $(TARGET).la $(R)$(libdir)/$(TARGET).la; \