lmdb: update 0.9.16 -> 0.9.21

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2017-08-24 00:16:48 +02:00
parent cef7e566d5
commit 63f9ec8c69
2 changed files with 30 additions and 29 deletions

View File

@@ -7,44 +7,43 @@ Content-Transfer-Encoding: 8bit
Taken from [1]
[1] http://pkgs.fedoraproject.org/cgit/lmdb.git/plain/lmdb-make.patch
[1] https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch
Upstream-Status: Inappropriate [embedded specific]
Upstream-Status: Pending
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -24,25 +24,30 @@ OPT = -O2 -g
@@ -26,6 +26,7 @@ OPT = -O2 -g
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
LDLIBS =
SOLIBS =
+SOVERSION = 0.0.0
+SOVERSION = 0.0.0
SOEXT = .so
prefix = /usr/local
+binprefix = $(prefix)/bin
+libprefix = $(prefix)/lib
+includeprefix = $(prefix)/include
+manprefix = $(prefix)/man
exec_prefix = $(prefix)
@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
########################################################################
IHDRS = lmdb.h
-ILIBS = liblmdb.a liblmdb.so
+ILIBS = liblmdb.so liblmdb.so.$(SOVERSION)
-ILIBS = liblmdb.a liblmdb$(SOEXT)
+ILIBS = liblmdb$(SOEXT) liblmdb$(SOEXT).$(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
@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
mkdir -p $(DESTDIR)$(libdir)
mkdir -p $(DESTDIR)$(includedir)
mkdir -p $(DESTDIR)$(mandir)/man1
- for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
- for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
- for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
+ for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
+ for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
+ for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
+ for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
clean:
- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
@@ -52,16 +51,16 @@ diff --git a/Makefile b/Makefile
test: all
rm -rf testdb && mkdir testdb
@@ -51,20 +56,24 @@ test: all
@@ -64,20 +65,24 @@ test: all
liblmdb.a: mdb.o midl.o
ar rs $@ mdb.o midl.o
$(AR) rs $@ mdb.o midl.o
-liblmdb.so: mdb.lo midl.lo
+liblmdb.so: liblmdb.so.$(SOVERSION)
-liblmdb$(SOEXT): mdb.lo midl.lo
+liblmdb$(SOEXT): liblmdb$(SOEXT).$(SOVERSION)
+ rm -f $@
+ ln -s $< $@
+
+liblmdb.so.$(SOVERSION): mdb.lo midl.lo
+liblmdb$(SOEXT).$(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)

View File

@@ -7,8 +7,8 @@ SRC_URI = " \
https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz \
file://0001-Patch-the-main-Makefile.patch \
"
SRC_URI[md5sum] = "0de89730b8f3f5711c2b3a4ba517b648"
SRC_URI[sha256sum] = "49d7b40949f2ced9bc8b23ea6a89e75471a1c9126537a8b268c318a00b84322b"
SRC_URI[md5sum] = "41a4f7b63212a00e53fabd8159008201"
SRC_URI[sha256sum] = "1187b635a4cc415bb6972bba346121f81edd996e99b8f0816151d4090f90b559"
inherit autotools-brokensep
@@ -25,4 +25,6 @@ do_install() {
install -d ${D}${mandir}
sed -i 's:\$(prefix)/man:${mandir}:' Makefile
oe_runmake DESTDIR=${D} prefix=${prefix} libprefix=${libdir} manprefix=${mandir} install
chown -R root:root ${D}${bindir}
chown -R root:root ${D}${libdir}
}