app-crypt/rhash: Install headers, fix librhash.so symlink
authorJames Le Cuirot <chewi@gentoo.org>
Fri, 16 Sep 2016 22:03:52 +0000 (23:03 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Fri, 16 Sep 2016 22:03:52 +0000 (23:03 +0100)
Sorry, should have spotted these before the earlier commit.

Package-Manager: portage-2.3.0

app-crypt/rhash/files/librhash-symlink.patch [new file with mode: 0644]
app-crypt/rhash/rhash-1.3.3-r2.ebuild [moved from app-crypt/rhash/rhash-1.3.3-r1.ebuild with 80% similarity]

diff --git a/app-crypt/rhash/files/librhash-symlink.patch b/app-crypt/rhash/files/librhash-symlink.patch
new file mode 100644 (file)
index 0000000..faba2fb
--- /dev/null
@@ -0,0 +1,38 @@
+From 30c5897a7533b746388f44f3999ad2e23c529364 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Fri, 16 Sep 2016 22:53:51 +0100
+Subject: [PATCH] Handle librhash.so symlink in shared Makefile rules, not
+ static
+
+---
+ librhash/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/librhash/Makefile b/librhash/Makefile
+index a38073f..fc5e5c3 100644
+--- a/librhash/Makefile
++++ b/librhash/Makefile
+@@ -46,18 +46,18 @@ dist-clean: clean
+ install-lib-static: $(LIBRARY) install-headers
+       $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+       $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/
+-      ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ install-lib-shared: $(SONAME)
+       $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+       $(INSTALL_SHARED) $(SONAME) $(DESTDIR)$(LIBDIR)/
++      ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ uninstall-lib-static: uninstall-headers
+       rm -f $(DESTDIR)$(LIBDIR)/$(LIBRARY)
+-      rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ uninstall-lib-shared:
+       rm -f $(DESTDIR)$(LIBDIR)/$(SONAME)
++      rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ install-headers:
+       $(INSTALL) -d $(DESTDIR)$(INCDIR)
+-- 
+2.8.2
+
similarity index 80%
rename from app-crypt/rhash/rhash-1.3.3-r1.ebuild
rename to app-crypt/rhash/rhash-1.3.3-r2.ebuild
index 585a54a7c3e24c76a59bc1c9709c3bf0d8a0eb39..578f5811a5ff4a05ccb7cc8cc7194d81000e25ff 100644 (file)
@@ -20,6 +20,10 @@ RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
        nls? ( sys-devel/gettext )"
 
+PATCHES=(
+       "${FILESDIR}"/librhash-symlink.patch
+)
+
 src_prepare() {
        default
 
@@ -46,11 +50,20 @@ multilib_src_compile() {
                  $(use static-libs && echo lib-static)
 }
 
+myemake() {
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) "${@}"
+}
+
 multilib_src_install() {
-       emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
-                 install-lib-shared $(multilib_is_native_abi && echo install-shared) \
-                 $(use static-libs && echo install-lib-static) \
-                 $(use nls && multilib_is_native_abi && echo install-gmo)
+       myemake install-lib-shared
+       multilib_is_native_abi && myemake install-shared
+       use static-libs && myemake install-lib-static
+}
+
+multilib_src_install_all() {
+       myemake -C librhash install-headers
+       use nls && myemake install-gmo
+       einstalldocs
 }
 
 multilib_src_test() {