commit:     0e6d486dfde2656ece413843ea22db5ad73fd91b
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 31 19:47:03 2017 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Thu Aug 31 19:47:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e6d486d

dev-libs/cryptlib: fixups (beta)

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild       | 25 +++----
 .../cryptlib/files/cryptlib-3.4.4_beta-build.patch | 76 ++++++++++++++++++++--
 2 files changed, 81 insertions(+), 20 deletions(-)

diff --git a/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild 
b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
index 7bca33567f3..cc10e5c17e6 100644
--- a/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
+++ b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
@@ -66,6 +66,13 @@ pkg_setup() {
        # Add our own CFLAGS/CPPFLAGS
        #
        export EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}"
+
+       #
+       # Disable internal zlib dependnecies
+       # For some reason this applied also when
+       # System zlib is being used
+       #
+       COMMON_MAKE_OPTS="ZLIBOBJS= CC=$(tc-getCC) AR=$(tc-getAR) STRIP=true"
 }
 
 src_prepare() {
@@ -98,12 +105,6 @@ src_compile() {
        use ldap && append-cppflags -DHAS_LDAP
        use odbc && append-cppflags -DHAS_ODBC
 
-       #
-       # Disable internal zlib dependnecies
-       # For some reason this applied also when
-       # System zlib is being used
-       #
-       COMMON_MAKE_OPTS="ZLIBOBJS= CC=$(tc-getCC) AR=$(tc-getAR) STRIP=true"
        emake ${COMMON_MAKE_OPTS}  shared
        use static-libs && emake ${COMMON_MAKE_OPTS} default
        use test && emake ${COMMON_MAKE_OPTS} stestlib
@@ -115,7 +116,8 @@ src_compile() {
        # 1. python will link against the static lib
        # 2. tests will not work find soname.
        #
-       # Bad upstream behavior
+       # Upstream should have created the symlinks when
+       # building and not when installing.
        #
        local libname="libcl.so.$(get_version_component_range 1-3 ${PV})"
        local solibname="libcl.so.$(get_version_component_range 1-2 ${PV})"
@@ -132,16 +134,9 @@ src_test() {
 }
 
 src_install() {
+       emake install ${COMMON_MAKE_OPTS} DESTDIR="${D}" PREFIX=/usr 
PATH_LIB="/usr/$(get_libdir)"
        einstalldocs
 
-       #
-       # Upstream does not provide
-       # a simple target for install
-       #
-       doheader cryptlib.h
-       dolib.so libcl.so*
-       use static-libs && dolib.a libcl.a
-
        wrap_python ${FUNCNAME}
 
        if use doc; then

diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch 
b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
index 1a99287c6f3..e2530b7e557 100644
--- a/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
@@ -1,7 +1,7 @@
-From 188dce32ea9c58271c8ce48ab02a3b255498bf9f Mon Sep 17 00:00:00 2001
+From 515d66d1d091b444330b225127b084a9b19fa807 Mon Sep 17 00:00:00 2001
 From: Alon Bar-Lev <[email protected]>
-Date: Sat, 4 Feb 2017 05:08:47 +0200
-Subject: [PATCH] build: allow specify additional CFLAGS
+Date: Thu, 31 Aug 2017 22:12:52 +0300
+Subject: [PATCH 1/3] build: allow specify additional CFLAGS
 
 Signed-off-by: Alon Bar-Lev <[email protected]>
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Alon Bar-Lev <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/makefile b/makefile
-index cb9884c..827a78a 100644
+index de5381f..a31bc1d 100644
 --- a/makefile
 +++ b/makefile
 @@ -90,7 +90,7 @@ DYLIBNAME = lib$(PROJ).$(MAJ).$(MIN).dylib
@@ -22,4 +22,70 @@ index cb9884c..827a78a 100644
  CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 
--coverage -fprofile-arcs -ftest-coverage
  CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
 -- 
-2.10.2
+2.13.5
+
+From cbec0a8ab9fab9acda239d3f37b7e593ac8e44e9 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <[email protected]>
+Date: Thu, 31 Aug 2017 22:14:47 +0300
+Subject: [PATCH 2/3] build: install: create correct directories + quote
+
+Signed-off-by: Alon Bar-Lev <[email protected]>
+---
+ makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/makefile b/makefile
+index a31bc1d..2a49040 100644
+--- a/makefile
++++ b/makefile
+@@ -443,13 +443,13 @@ PATH_LIB=$(PREFIX)/lib
+ PATH_INCLUDE=$(PREFIX)/include
+ 
+ install-dirs:
+-      @if [ ! -d $(PATH_LIB) ] ; then \
+-              mkdir $(PATH_LIB) ; \
+-              chmod 755 $(PATH_LIB) ; \
++      @if [ ! -d "$(DESTDIR)$(PATH_LIB)" ] ; then \
++              mkdir -p "$(DESTDIR)$(PATH_LIB)" ; \
++              chmod 755 "$(DESTDIR)$(PATH_LIB)" ; \
+       fi
+-      @if [ ! -d $(PATH_INCLUDE) ] ; then \
+-              mkdir $(PATH_INCLUDE) ; \
+-              chmod 755 $(PATH_INCLUDE) ; \
++      @if [ ! -d "$(DESTDIR)$(PATH_INCLUDE)" ] ; then \
++              mkdir -p "$(DESTDIR)$(PATH_INCLUDE)" ; \
++              chmod 755 "$(DESTDIR)$(PATH_INCLUDE)" ; \
+       fi
+ 
+ install:
+-- 
+2.13.5
+
+From 78cd16457a88e0d79a5b61d8dee29b535cd81a28 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <[email protected]>
+Date: Thu, 31 Aug 2017 22:30:25 +0300
+Subject: [PATCH 3/3] build: install: use relative symlinks
+
+Signed-off-by: Alon Bar-Lev <[email protected]>
+---
+ makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makefile b/makefile
+index 2a49040..5582252 100644
+--- a/makefile
++++ b/makefile
+@@ -461,8 +461,8 @@ install:
+       if [ -f "$(SLIBNAME)" ] ; then \
+               cp "$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)" ; \
+               chmod 755 "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" ; \
+-              ln -s "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" 
"$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so.$(MAJ)" ; \
+-              ln -s "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" 
"$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so" ; \
++              ln -s "$(SLIBNAME)" 
"$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so.$(MAJ)" ; \
++              ln -s "$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so" ; \
+       fi
+       cp cryptlib.h "$(DESTDIR)$(PATH_INCLUDE)"
+       chmod 644 "$(DESTDIR)$(PATH_INCLUDE)/cryptlib.h"
+-- 
+2.13.5
+

Reply via email to