summaryrefslogtreecommitdiff
path: root/libraries/compface/compface-sharedlib.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/compface/compface-sharedlib.patch')
-rw-r--r--libraries/compface/compface-sharedlib.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/libraries/compface/compface-sharedlib.patch b/libraries/compface/compface-sharedlib.patch
new file mode 100644
index 0000000000..856303f8dc
--- /dev/null
+++ b/libraries/compface/compface-sharedlib.patch
@@ -0,0 +1,46 @@
+--- compface-1.5.2.orig/Makefile.in 2005-10-04 14:59:49.000000000 +0200
++++ compface-1.5.2/Makefile.in 2013-02-28 00:12:27.888027519 +0100
+@@ -24,6 +24,7 @@
+ EXECUTABLE = $(BINDIR)/$(NAMEEXE)
+ UNEXECUTABLE = $(BINDIR)/$(UNNAMEEXE)
+ LIBNAME = lib$(NAME).a
++SOLIBNAME = lib$(NAME).so
+ LIBRARY = $(LIBDIR)/$(LIBNAME)
+ MAN1DIR = $(MANDIR)/man1
+ MAN3DIR = $(MANDIR)/man3
+@@ -41,15 +42,16 @@
+ CFLAGS = @CFLAGS@
+ DEFS = @DEFS@ -DHAVE_CONFIG_H
+ LDFLAGS = @LDFLAGS@
++SHLDFLAGS = -L. -lcompface
+ LIBS = @LIBS@
+
+-all: $(NAMEEXE) $(UNNAMEEXE)
++all: shared $(NAMEEXE) $(UNNAMEEXE)
+
+-$(NAMEEXE) : cmain.o compface.o $(LIBNAME)
+- $(CC) $(LDFLAGS) -o $@ cmain.o compface.o $(LIBNAME)
++$(NAMEEXE) : cmain.o compface.o
++ $(CC) $(LDFLAGS) $(SHLDFLAGS) -o $@ cmain.o compface.o
+
+ $(UNNAMEEXE) : uncmain.o $(LIBNAME)
+- $(CC) $(LDFLAGS) -o $@ uncmain.o $(LIBNAME)
++ $(CC) $(LDFLAGS) $(SHLDFLAGS) -o $@ uncmain.o
+
+ $(LIBNAME) : $(OBJECTS)
+ ar rc $(LIBNAME) $(OBJECTS)
+@@ -92,6 +94,14 @@
+ shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
+ compress $(NAME).sh
+
++static: $(OBJECTS)
++ ar rc $(LIBNAME) $(OBJECTS)
++ -ranlib $(LIBNAME)
++
++shared: $(OBJECTS)
++ $(CC) -shared -Wl,-soname,$(SOLIBNAME).1 $(LDFLAGS) -o $(SOLIBNAME).1.5.2 $(OBJECTS)
++ ln -sf $(SOLIBNAME).1.5.2 $(SOLIBNAME)
++
+ .c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+