]> git.pld-linux.org Git - packages/libtar.git/blob - libtar-shared.patch
- updated build hacks for new libtool
[packages/libtar.git] / libtar-shared.patch
1 diff -urN libtar-1.2.11/configure.ac libtar-1.2.11.new/configure.ac
2 --- libtar-1.2.11/configure.ac  2003-03-03 01:13:37.000000000 +0100
3 +++ libtar-1.2.11.new/configure.ac      2008-08-18 17:34:37.000000000 +0200
4 @@ -27,7 +27,7 @@
5  
6  dnl ### Check for compiler et al. ###################################
7  AC_PROG_CC
8 -AC_PROG_RANLIB
9 +AC_PROG_LIBTOOL
10  AC_PROG_INSTALL
11  AC_PROG_LN_S
12  AC_PROG_MAKE_SET
13 diff -urN libtar-1.2.11/lib/Makefile.in libtar-1.2.11.new/lib/Makefile.in
14 --- libtar-1.2.11/lib/Makefile.in       2002-12-15 19:02:30.000000000 +0100
15 +++ libtar-1.2.11.new/lib/Makefile.in   2008-08-18 18:06:10.000000000 +0200
16 @@ -3,6 +3,7 @@
17  ### Path settings
18  srcdir         = @srcdir@
19  top_srcdir     = @top_srcdir@
20 +top_builddir   = @top_builddir@
21  prefix         = @prefix@
22  exec_prefix    = @exec_prefix@
23  bindir         = @bindir@
24 @@ -23,6 +24,7 @@
25  
26  ### Compiler and link options
27  CC             = @CC@
28 +LIBTOOL                = @LIBTOOL@
29  CPPFLAGS       = -I. \
30                   -I.. \
31                   -I${srcdir} \
32 @@ -32,7 +34,7 @@
33  CFLAGS         = @CFLAGS@
34  LDFLAGS                = @LDFLAGS@
35  LIBS           = @LIBS@
36 -LIBOBJS                = @LIBOBJS@
37 +LTLIBOBJS      = @LTLIBOBJS@
38  RANLIB         = @RANLIB@
39  @SET_MAKE@
40  VPATH          = @srcdir@:@top_srcdir@/compat:../listhash
41 @@ -40,24 +42,26 @@
42  
43  ### Makefile rules - no user-servicable parts below
44  
45 -LIBTAR_OBJS    = append.o \
46 -                 block.o \
47 -                 decode.o \
48 -                 encode.o \
49 -                 extract.o \
50 -                 handle.o \
51 -                 libtar_hash.o \
52 -                 libtar_list.o \
53 -                 output.o \
54 -                 util.o \
55 -                 wrapper.o
56 +LIBTAR_OBJS    = append.lo \
57 +                 block.lo \
58 +                 decode.lo \
59 +                 encode.lo \
60 +                 extract.lo \
61 +                 handle.lo \
62 +                 libtar_hash.lo \
63 +                 libtar_list.lo \
64 +                 output.lo \
65 +                 util.lo \
66 +                 wrapper.lo
67  LIBTAR_HDRS    = ../config.h \
68                   ${top_srcdir}/compat/compat.h \
69                   ${srcdir}/libtar.h \
70                   ${srcdir}/internal.h \
71                   ../listhash/libtar_listhash.h
72 -LIBTAR_LIBS    = ./libtar.a
73 -ALL            = libtar.a
74 +LIBTAR_LIBS    = ./libtar.la
75 +ALL            = libtar.la
76 +LDFLAGS                = @LDFLAGS@
77 +CFLAGS         = @CFLAGS@
78  
79  DISTCLEANFILES = ../listhash/libtar_listhash.h \
80                   ../listhash/libtar_list.c \
81 @@ -68,24 +72,31 @@
82  
83  .PHONY: clean distclean install
84  
85 -libtar.a: ${LIBTAR_OBJS} ${LIBOBJS}
86 -       ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
87 -       ${RANLIB} libtar.a
88 +libtar.la: ${LIBTAR_OBJS} ${LTLIBOBJS}
89 +       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o libtar.la $(LIBTAR_OBJS) $(LTLIBOBJS) -rpath $(libdir)
90 +#      ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
91 +#      ${RANLIB} libtar.a
92  
93  ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
94  
95 -.c.o:
96 -       ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
97 +%.lo: $(srcdir)/%.c
98 +       $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
99 +
100 +%.lo: listhash/%.c
101 +       $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
102 +
103 +%.lo: compat/%.c
104 +       $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
105  
106  clean:
107 -       rm -f *~ *.o ${ALL} core
108 +       rm -rf *~ *.o $(LIBTAR_OBJS) ${ALL} core .libs $(LTLIBOBJS)
109  
110  distclean: clean
111         rm -f Makefile ${DISTCLEANFILES}
112  
113  install: ${ALL}
114         ${MKDIR} ${DESTDIR}${libdir}
115 -       ${INSTALL_DATA} libtar.a ${DESTDIR}${libdir}
116 +       $(LIBTOOL) --mode=install ${INSTALL_DATA} libtar.la ${DESTDIR}${libdir}
117         ${MKDIR} ${DESTDIR}${includedir}
118         ${INSTALL_DATA} ${srcdir}/libtar.h ${DESTDIR}${includedir}
119         ${INSTALL_DATA} ../listhash/libtar_listhash.h ${DESTDIR}${includedir}
120 diff -urN libtar-1.2.11/libtar/Makefile.in libtar-1.2.11.new/libtar/Makefile.in
121 --- libtar-1.2.11/libtar/Makefile.in    2002-12-15 19:02:30.000000000 +0100
122 +++ libtar-1.2.11.new/libtar/Makefile.in        2008-08-18 18:04:36.000000000 +0200
123 @@ -3,6 +3,7 @@
124  ### Path settings
125  srcdir         = @srcdir@
126  top_srcdir     = @top_srcdir@
127 +top_builddir   = @top_builddir@
128  prefix         = @prefix@
129  exec_prefix    = @exec_prefix@
130  bindir         = @bindir@
131 @@ -23,6 +24,7 @@
132  
133  ### Compiler and link options
134  CC             = @CC@
135 +LIBTOOL                = @LIBTOOL@
136  CPPFLAGS       = -I.. \
137                   -I../lib \
138                   -I../listhash \
139 @@ -31,7 +33,7 @@
140                   @CPPFLAGS@
141  CFLAGS         = @CFLAGS@
142  LDFLAGS                = @LDFLAGS@
143 -LIBS           = @LIBS@
144 +LIBS           = @LIBS@ -ltar
145  LIBOBJS                = @LIBOBJS@
146  RANLIB         = @RANLIB@
147  @SET_MAKE@
148 @@ -40,12 +42,12 @@
149  
150  ### Makefile rules - no user-servicable parts below
151  
152 -LIBTAR_OBJS    = libtar.o
153 +LIBTAR_OBJS    = libtar.lo
154  LIBTAR_HDRS    = ../config.h \
155                   ${top_srcdir}/compat/compat.h \
156                   ${top_srcdir}/lib/libtar.h \
157                   ../listhash/libtar_listhash.h
158 -LIBTAR_LIBS    = ../lib/libtar.a
159 +LIBTAR_LIBS    = $(top_builddir)/lib
160  ALL            = libtar
161  
162  
163 @@ -54,20 +56,20 @@
164  .PHONY: clean distclean install
165  
166  libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS}
167 -       ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS}
168 +       $(LIBTOOL) --mode=link ${CC} ${CFLAGS} ${LDFLAGS} -o libtar $(LIBTAR_OBJS) -L${LIBTAR_LIBS} ${LIBS}
169  
170  ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
171  
172 -.c.o:
173 -       ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
174 +%.lo: %.c
175 +       $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
176  
177  clean:
178 -       rm -f *~ *.o ${ALL} core
179 +       rm -rf *~ *.o ${ALL} $(LIBTAR_OBJS) core .libs
180  
181  distclean: clean
182         rm -f Makefile
183  
184  install: ${ALL}
185         ${MKDIR} ${DESTDIR}${bindir}
186 -       ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
187 +       $(LIBTOOL) --mode=install ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
188  
This page took 0.065849 seconds and 3 git commands to generate.