From 7b1f053e57289943ba5a26a2bd51968d39144e33 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 16 Feb 2015 11:00:40 +0100 Subject: [PATCH] libfetch: create a versioned soname (#871). --- common/shlibs | 2 +- srcpkgs/libfetch/patches/soname.patch | 42 +++++++++++++++++++++++++++ srcpkgs/libfetch/template | 9 +++--- 3 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/libfetch/patches/soname.patch diff --git a/common/shlibs b/common/shlibs index 8b9778d4ed2..6fb687e9794 100644 --- a/common/shlibs +++ b/common/shlibs @@ -684,7 +684,7 @@ libvala-0.24.so.0 libvala-0.24.0_1 libvala-0.26.so.0 libvala-0.26.2_1 libSDL_net-1.2.so.0 SDL_net-1.2.7_1 libmodplug.so.1 libmodplug-0.8.8_1 -libfetch.so libfetch-2.33_1 +libfetch.so.2 libfetch-2.34_8 libneon.so.27 neon-0.29.5_1 libsvn_subr-1.so.0 libsvn-1.7.5_1 libsvn_diff-1.so.0 libsvn-1.7.5_1 diff --git a/srcpkgs/libfetch/patches/soname.patch b/srcpkgs/libfetch/patches/soname.patch new file mode 100644 index 00000000000..68e8008099e --- /dev/null +++ b/srcpkgs/libfetch/patches/soname.patch @@ -0,0 +1,42 @@ +--- Makefile.orig 2015-02-16 10:55:42.669519299 +0100 ++++ Makefile 2015-02-16 10:58:21.278068828 +0100 +@@ -1,5 +1,7 @@ + prefix = /usr + DESTDIR = ++MAJOR = 2 ++MINOR = 34 + FETCH_WITH_INET6 = true + FETCH_WITH_OPENSSL = true + +@@ -41,25 +43,27 @@ httperr.h: http.errors Makefile errlist. + + libfetch.so: $(GEN) $(INCS) $(OBJS) + rm -f $@ +- $(CC) $(LDFLAGS) $(OBJS) $(LDADD) -shared -fPIC -o $@ ++ $(CC) $(LDFLAGS) $(OBJS) $(LDADD) -shared -fPIC -Wl,-soname=$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) + + libfetch.a: $(GEN) $(INCS) $(OBJS) + rm -f $@ + $(AR) rcs $@ $(OBJS) + + clean: +- rm -f libfetch.so libfetch.a *.o $(GEN) ++ rm -f libfetch.so* libfetch.a *.o $(GEN) + .PHONY: clean + + install: all +- $(INSTALL) -m 755 libfetch.so $(DESTDIR)$(prefix)/lib/libfetch.so ++ $(INSTALL) -m 755 libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so.$(MAJOR).$(MINOR) ++ ln -s libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so.$(MAJOR) ++ ln -s libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so + $(INSTALL) -m 644 libfetch.a $(DESTDIR)$(prefix)/lib/libfetch.a + $(INSTALL) -m 644 fetch.h $(DESTDIR)$(prefix)/include/fetch.h + $(INSTALL) -m 644 fetch.3 $(DESTDIR)$(prefix)/share/man/man3/fetch.3 + .PHONY: install + + uninstall: +- rm -f $(DESTDIR)$(prefix)/lib/libfetch.so ++ rm -f $(DESTDIR)$(prefix)/lib/libfetch.so* + rm -f $(DESTDIR)$(prefix)/lib/libfetch.a + rm -f $(DESTDIR)$(prefix)/include/fetch.h + rm -f $(DESTDIR)$(prefix)/share/man/man3/fetch.3 diff --git a/srcpkgs/libfetch/template b/srcpkgs/libfetch/template index 1c2db72e278..eeb5bd51315 100644 --- a/srcpkgs/libfetch/template +++ b/srcpkgs/libfetch/template @@ -1,24 +1,23 @@ # Template file for 'libfetch' pkgname=libfetch version=2.34 -revision=7 +revision=8 build_style=gnu-makefile makedepends="libressl-devel>=2.1.3" short_desc="File Transfer Library for URLs" maintainer="Juan RP " -homepage="http://www.FreeBSD.org" +homepage="http://www.NetBSD.org" license="Modified BSD" distfiles="http://repo.voidlinux.eu/distfiles/${pkgname}-${version}.tar.xz" checksum=4e6d4541f213c9ab42ea94d49c2573f0a6f54b04f14668530960f1424b04f722 -shlib_provides="libfetch.so" - libfetch-devel_package() { depends="${makedepends} ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/share - vmove "usr/lib/*.a" + vmove usr/lib/*.a + vmove usr/lib/*.so } }