Patchwork [v2] openssl: enforce libdir=lib

login
register
mail settings
Submitter Enrico Scholz
Date April 26, 2011, 12:35 p.m.
Message ID <1303821303-447-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/2885/
State New, archived
Headers show

Comments

Enrico Scholz - April 26, 2011, 12:35 p.m.
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>

openssl tries to detect multlib environments and assigns libdir=lib64
e.g. for x86_64 targets.  This breaks OE assumptions about the location
of pkgconfig files and causes build failures.

Patch gives the directory name to openssl which is used as libdir by
OE.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 recipes/openssl/openssl.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Koen Kooi - April 26, 2011, 1:50 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26-04-11 14:35, Enrico Scholz wrote:
> From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
> 
> openssl tries to detect multlib environments and assigns libdir=lib64
> e.g. for x86_64 targets.  This breaks OE assumptions about the location
> of pkgconfig files and causes build failures.
> 
> Patch gives the directory name to openssl which is used as libdir by
> OE.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  recipes/openssl/openssl.inc |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/recipes/openssl/openssl.inc b/recipes/openssl/openssl.inc
> index 24b517d..b029f3b 100644
> --- a/recipes/openssl/openssl.inc
> +++ b/recipes/openssl/openssl.inc
> @@ -97,7 +97,7 @@ do_configure () {
>          if [ "x$useprefix" = "x" ]; then
>                  useprefix=/
>          fi        
> -	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl $target
> +	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --libdir=`basename ${libdir}`

Why not plain ${base_libdir}?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNts26MkyGM64RGpERAq5EAJ9BRkrtdasB0pmyg0ej5Kdz6Er2nQCfd8dm
vQ53lFJ3MAmGWl9RI+m/Ayo=
=65EV
-----END PGP SIGNATURE-----
Enrico Scholz - April 26, 2011, 2:15 p.m.
Koen Kooi <koen@dominion.thruhere.net> writes:

>> +	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --libdir=`basename ${libdir}`
>
> Why not plain ${base_libdir}?

openssl's '--libdir' option expects a relative name. E.g. there is done

| $libdir="lib$multilib" if $libdir eq "";
| ...
| 	s/^LIBDIR=.*$/LIBDIR=$libdir/;
| ...
|		my $foo = "$prefix/$libdir/engines";

in Configure and

|	    echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \

in Makefile.


Using absolute paths (as in ${base_libdir}) would create paths with
double '/'.  Perhaps, this would be a cosmetical issue only but using
plain 'lib' (or 'lib64') is better imo.


Enrico

Patch

diff --git a/recipes/openssl/openssl.inc b/recipes/openssl/openssl.inc
index 24b517d..b029f3b 100644
--- a/recipes/openssl/openssl.inc
+++ b/recipes/openssl/openssl.inc
@@ -97,7 +97,7 @@  do_configure () {
         if [ "x$useprefix" = "x" ]; then
                 useprefix=/
         fi        
-	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl $target
+	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --libdir=`basename ${libdir}` --openssldir=${libdir}/ssl $target
 
 	eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "/_FILE_OFFSET_BITS/,/#endif/d" ${S}/crypto/bio/bss_file.c', d)}"
 	eval "${@base_contains('DISTRO_FEATURES', 'ipv6', '', 'sed -i -e "/AF_INET6/,/break/d" ${S}/crypto/bio/bss_dgram.c', d)}"