aboutsummaryrefslogtreecommitdiffstats
path: root/community/unibilium/build-static-lib.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/unibilium/build-static-lib.patch')
-rw-r--r--community/unibilium/build-static-lib.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/community/unibilium/build-static-lib.patch b/community/unibilium/build-static-lib.patch
new file mode 100644
index 0000000000..643421f98d
--- /dev/null
+++ b/community/unibilium/build-static-lib.patch
@@ -0,0 +1,37 @@
+--- a/Makefile
++++ b/Makefile
+@@ -45,6 +45,7 @@
+
+ OBJECTS=unibilium.lo uninames.lo uniutil.lo
+ LIBRARY=libunibilium.la
++LIBSTATIC=libunibilium.a
+
+ PODS=$(wildcard doc/*.pod)
+ MANPAGES=$(addprefix man/,$(notdir $(PODS:.pod=.3.gz)))
+@@ -54,7 +55,7 @@
+ TESTS=$(wildcard t/*.c)
+
+ .PHONY: all
+-all: $(LIBRARY) build-man build-tools build-test
++all: $(LIBRARY) $(LIBSTATIC) build-man build-tools build-test
+
+ %.lo: %.c unibilium.h
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -I. -Wall -std=c99 $(CFLAGS) $(CFLAGS_DEBUG) -o $@ -c $<
+@@ -65,6 +66,9 @@
+ $(LIBRARY): $(OBJECTS)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -rpath '$(LIBDIR)' -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -o $@ $^
+
++$(LIBSTATIC): $(OBJECTS)
++ $(LIBTOOL) --mode=link $(CC) -o $@ $^
++
+ tools/%: $(LIBRARY) tools/%.lo
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $^
+
+@@ -102,6 +106,7 @@
+ install-lib:
+ mkdir -p '$(DESTDIR)$(LIBDIR)'
+ $(LIBTOOL) --mode=install cp $(LIBRARY) '$(DESTDIR)$(LIBDIR)/$(LIBRARY)'
++ $(LIBTOOL) --mode=install install $(LIBSTATIC) $(DESTDIR)$(LIBDIR)/$(LIBSTATIC)
+
+ .PHONY: install-man
+ install-man: build-man