From e12816955732fd097c28e5336069107aaa04c2d2 Mon Sep 17 00:00:00 2001 From: Denis Revin Date: Fri, 30 Sep 2016 09:47:34 +0400 Subject: [PATCH] lmdb: fix soname generation (#4856) lmdb: fix soname generation --- common/shlibs | 1 + srcpkgs/lmdb/patches/soname.patch | 38 +++++++++++++++++++++++++++++++ srcpkgs/lmdb/template | 5 ++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/lmdb/patches/soname.patch diff --git a/common/shlibs b/common/shlibs index 1fdc0056657..ff257781e18 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2596,3 +2596,4 @@ libskk.so.0 libskk-1.0.2_1 libKF5WaylandServer.so.5 kwayland-5.26.0_1 libKF5WaylandClient.so.5 kwayland-5.26.0_1 libKF5IdleTime.so.5 kidletime-5.26.0_1 +liblmdb.so.0 lmdb-0.9.18_2 diff --git a/srcpkgs/lmdb/patches/soname.patch b/srcpkgs/lmdb/patches/soname.patch new file mode 100644 index 00000000000..d6543c0cb48 --- /dev/null +++ b/srcpkgs/lmdb/patches/soname.patch @@ -0,0 +1,38 @@ +--- libraries/liblmdb/Makefile.orig 2016-09-11 13:49:25.425232271 +0400 ++++ libraries/liblmdb/Makefile 2016-09-11 14:15:01.040383128 +0400 +@@ -26,6 +26,8 @@ + CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) + LDLIBS = + SOLIBS = ++MAJOR = 0 ++MINOR = 9 + prefix = /usr/local + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin +@@ -49,12 +51,15 @@ + 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 ++ cp liblmdb.a $(DESTDIR)$(libdir) ++ cp liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) ++ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so.$(MAJOR) ++ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so + for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done + for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done + + clean: +- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb ++ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb + + test: all + rm -rf testdb && mkdir testdb +@@ -65,7 +70,7 @@ + + liblmdb.so: 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=$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) mdb.lo midl.lo $(SOLIBS) + + mdb_stat: mdb_stat.o liblmdb.a + mdb_copy: mdb_copy.o liblmdb.a diff --git a/srcpkgs/lmdb/template b/srcpkgs/lmdb/template index bf0c2ad32eb..74bcdbb911d 100644 --- a/srcpkgs/lmdb/template +++ b/srcpkgs/lmdb/template @@ -1,7 +1,7 @@ # Template file for 'lmdb' pkgname=lmdb version=0.9.18 -revision=1 +revision=2 wrksrc="lmdb-LMDB_${version}" hostmakedepends="git" short_desc="Lightning Memory-Mapped Database Manager" @@ -20,7 +20,7 @@ do_build() { } do_install() { cd libraries/liblmdb - make DESTDIR=${DESTDIR} prefix=/usr mandir=/usr/share/man install + make DESTDIR=${DESTDIR} CC="$CC" prefix=/usr install vlicense LICENSE vlicense COPYRIGHT @@ -32,5 +32,6 @@ lmdb-devel_package() { pkg_install() { vmove usr/include vmove "usr/lib/*.a" + vmove "usr/lib/*.so" } }