SOURCES: libtar-shared.patch (NEW) - build shared library
megabajt
megabajt at pld-linux.org
Tue Aug 19 11:43:33 CEST 2008
Author: megabajt Date: Tue Aug 19 09:43:33 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- build shared library
---- Files affected:
SOURCES:
libtar-shared.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/libtar-shared.patch
diff -u /dev/null SOURCES/libtar-shared.patch:1.1
--- /dev/null Tue Aug 19 11:43:34 2008
+++ SOURCES/libtar-shared.patch Tue Aug 19 11:43:28 2008
@@ -0,0 +1,188 @@
+diff -urN libtar-1.2.11/configure.ac libtar-1.2.11.new/configure.ac
+--- libtar-1.2.11/configure.ac 2003-03-03 01:13:37.000000000 +0100
++++ libtar-1.2.11.new/configure.ac 2008-08-18 17:34:37.000000000 +0200
+@@ -27,7 +27,7 @@
+
+ dnl ### Check for compiler et al. ###################################
+ AC_PROG_CC
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+diff -urN libtar-1.2.11/lib/Makefile.in libtar-1.2.11.new/lib/Makefile.in
+--- libtar-1.2.11/lib/Makefile.in 2002-12-15 19:02:30.000000000 +0100
++++ libtar-1.2.11.new/lib/Makefile.in 2008-08-18 18:06:10.000000000 +0200
+@@ -3,6 +3,7 @@
+ ### Path settings
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
++top_builddir = @top_builddir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+@@ -23,6 +24,7 @@
+
+ ### Compiler and link options
+ CC = @CC@
++LIBTOOL = @LIBTOOL@
+ CPPFLAGS = -I. \
+ -I.. \
+ -I${srcdir} \
+@@ -32,7 +34,7 @@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+-LIBOBJS = @LIBOBJS@
++LTLIBOBJS = @LTLIBOBJS@
+ RANLIB = @RANLIB@
+ @SET_MAKE@
+ VPATH = @srcdir@:@top_srcdir@/compat:../listhash
+@@ -40,24 +42,26 @@
+
+ ### Makefile rules - no user-servicable parts below
+
+-LIBTAR_OBJS = append.o \
+- block.o \
+- decode.o \
+- encode.o \
+- extract.o \
+- handle.o \
+- libtar_hash.o \
+- libtar_list.o \
+- output.o \
+- util.o \
+- wrapper.o
++LIBTAR_OBJS = append.lo \
++ block.lo \
++ decode.lo \
++ encode.lo \
++ extract.lo \
++ handle.lo \
++ libtar_hash.lo \
++ libtar_list.lo \
++ output.lo \
++ util.lo \
++ wrapper.lo
+ LIBTAR_HDRS = ../config.h \
+ ${top_srcdir}/compat/compat.h \
+ ${srcdir}/libtar.h \
+ ${srcdir}/internal.h \
+ ../listhash/libtar_listhash.h
+-LIBTAR_LIBS = ./libtar.a
+-ALL = libtar.a
++LIBTAR_LIBS = ./libtar.la
++ALL = libtar.la
++LDFLAGS = @LDFLAGS@
++CFLAGS = @CFLAGS@
+
+ DISTCLEANFILES = ../listhash/libtar_listhash.h \
+ ../listhash/libtar_list.c \
+@@ -68,24 +72,31 @@
+
+ .PHONY: clean distclean install
+
+-libtar.a: ${LIBTAR_OBJS} ${LIBOBJS}
+- ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
+- ${RANLIB} libtar.a
++libtar.la: ${LIBTAR_OBJS} ${LTLIBOBJS}
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o libtar.la $(LIBTAR_OBJS) $(LTLIBOBJS) -rpath $(libdir)
++# ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
++# ${RANLIB} libtar.a
+
+ ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
+
+-.c.o:
+- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
++%.lo: $(srcdir)/%.c
++ $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
++
++%.lo: listhash/%.c
++ $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
++
++%.lo: compat/%.c
++ $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
+
+ clean:
+- rm -f *~ *.o ${ALL} core
++ rm -rf *~ *.o $(LIBTAR_OBJS) ${ALL} core .libs $(LTLIBOBJS)
+
+ distclean: clean
+ rm -f Makefile ${DISTCLEANFILES}
+
+ install: ${ALL}
+ ${MKDIR} ${DESTDIR}${libdir}
+- ${INSTALL_DATA} libtar.a ${DESTDIR}${libdir}
++ $(LIBTOOL) --mode=install ${INSTALL_DATA} libtar.la ${DESTDIR}${libdir}
+ ${MKDIR} ${DESTDIR}${includedir}
+ ${INSTALL_DATA} ${srcdir}/libtar.h ${DESTDIR}${includedir}
+ ${INSTALL_DATA} ../listhash/libtar_listhash.h ${DESTDIR}${includedir}
+diff -urN libtar-1.2.11/libtar/Makefile.in libtar-1.2.11.new/libtar/Makefile.in
+--- libtar-1.2.11/libtar/Makefile.in 2002-12-15 19:02:30.000000000 +0100
++++ libtar-1.2.11.new/libtar/Makefile.in 2008-08-18 18:04:36.000000000 +0200
+@@ -3,6 +3,7 @@
+ ### Path settings
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
++top_builddir = @top_builddir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+@@ -23,6 +24,7 @@
+
+ ### Compiler and link options
+ CC = @CC@
++LIBTOOL = @LIBTOOL@
+ CPPFLAGS = -I.. \
+ -I../lib \
+ -I../listhash \
+@@ -31,7 +33,7 @@
+ @CPPFLAGS@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -ltar
+ LIBOBJS = @LIBOBJS@
+ RANLIB = @RANLIB@
+ @SET_MAKE@
+@@ -40,12 +42,12 @@
+
+ ### Makefile rules - no user-servicable parts below
+
+-LIBTAR_OBJS = libtar.o
++LIBTAR_OBJS = libtar.lo
+ LIBTAR_HDRS = ../config.h \
+ ${top_srcdir}/compat/compat.h \
+ ${top_srcdir}/lib/libtar.h \
+ ../listhash/libtar_listhash.h
+-LIBTAR_LIBS = ../lib/libtar.a
++LIBTAR_LIBS = $(top_builddir)/lib
+ ALL = libtar
+
+
+@@ -54,20 +56,20 @@
+ .PHONY: clean distclean install
+
+ libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS}
+- ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS}
++ $(LIBTOOL) --mode=link ${CC} ${CFLAGS} ${LDFLAGS} -o libtar $(LIBTAR_OBJS) -L${LIBTAR_LIBS} ${LIBS}
+
+ ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
+
+-.c.o:
+- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
++%.lo: %.c
++ $(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
+
+ clean:
+- rm -f *~ *.o ${ALL} core
++ rm -rf *~ *.o ${ALL} $(LIBTAR_OBJS) core .libs
+
+ distclean: clean
+ rm -f Makefile
+
+ install: ${ALL}
+ ${MKDIR} ${DESTDIR}${bindir}
+- ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
++ $(LIBTOOL) --mode=install ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
+
================================================================
More information about the pld-cvs-commit
mailing list