[packages/lmdb] - add patch
arekm
arekm at pld-linux.org
Fri Sep 4 18:53:31 CEST 2015
commit 6c44fb5a7e75ec3bdce90d2ca0df95517b39c1a4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Sep 4 18:53:26 2015 +0200
- add patch
lmdb-make.patch | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
---
diff --git a/lmdb-make.patch b/lmdb-make.patch
new file mode 100644
index 0000000..d45b756
--- /dev/null
+++ b/lmdb-make.patch
@@ -0,0 +1,79 @@
+# Patch the main Makefile to allow for a build that complies to packaging guidelines.
+
+diff -up lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.upstream lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile
+--- lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.upstream 2015-08-14 10:59:31.179144608 +0200
++++ lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile 2015-08-14 11:05:57.763026045 +0200
+@@ -24,25 +24,30 @@ OPT = -O2 -g
+ CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS =
+ SOLIBS =
++SOVERSION = 0.0.0
+ prefix = /usr/local
++binprefix = $(prefix)/bin
++libprefix = $(prefix)/lib
++includeprefix = $(prefix)/include
++manprefix = $(prefix)/man
+
+ ########################################################################
+
+ IHDRS = lmdb.h
+-ILIBS = liblmdb.a liblmdb.so
++ILIBS = liblmdb.so liblmdb.so.$(SOVERSION)
+ IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
+ IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
+ PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
+ all: $(ILIBS) $(PROGS)
+
+ install: $(ILIBS) $(IPROGS) $(IHDRS)
+- for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done
+- for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done
+- for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
+- for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/man/man1; done
++ for f in $(IPROGS); do cp $$f $(DESTDIR)$(binprefix); done
++ for f in $(ILIBS); do cp -d $$f $(DESTDIR)$(libprefix); done
++ for f in $(IHDRS); do cp $$f $(DESTDIR)$(includeprefix); done
++ for f in $(IDOCS); do cp $$f $(DESTDIR)$(manprefix)/man1; done
+
+ clean:
+- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+
+ test: all
+ rm -rf testdb && mkdir testdb
+@@ -51,20 +56,24 @@ test: all
+ liblmdb.a: mdb.o midl.o
+ ar rs $@ mdb.o midl.o
+
+-liblmdb.so: mdb.lo midl.lo
++liblmdb.so: liblmdb.so.$(SOVERSION)
++ rm -f $@
++ ln -s $< $@
++
++liblmdb.so.$(SOVERSION): mdb.lo midl.lo
+ # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
+- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)
+
+-mdb_stat: mdb_stat.o liblmdb.a
+-mdb_copy: mdb_copy.o liblmdb.a
+-mdb_dump: mdb_dump.o liblmdb.a
+-mdb_load: mdb_load.o liblmdb.a
+-mtest: mtest.o liblmdb.a
+-mtest2: mtest2.o liblmdb.a
+-mtest3: mtest3.o liblmdb.a
+-mtest4: mtest4.o liblmdb.a
+-mtest5: mtest5.o liblmdb.a
+-mtest6: mtest6.o liblmdb.a
++mdb_stat: mdb_stat.o liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest: mtest.o liblmdb.so
++mtest2: mtest2.o liblmdb.so
++mtest3: mtest3.o liblmdb.so
++mtest4: mtest4.o liblmdb.so
++mtest5: mtest5.o liblmdb.so
++mtest6: mtest6.o liblmdb.so
+
+ mdb.o: mdb.c lmdb.h midl.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lmdb.git/commitdiff/6c44fb5a7e75ec3bdce90d2ca0df95517b39c1a4
More information about the pld-cvs-commit
mailing list