diff mbox series

[1/1] package/capnproto: add openssl optional dependency

Message ID 20200727124145.1825309-1-fontaine.fabrice@gmail.com
State New
Headers show
Series [1/1] package/capnproto: add openssl optional dependency | expand

Commit Message

Fabrice Fontaine July 27, 2020, 12:41 p.m. UTC
openssl is an optional dependency that is enabled by default since
version 0.7.0 and
https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/capnproto/capnproto.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Yann E. MORIN July 27, 2020, 12:51 p.m. UTC | #1
Fabrice, All,

On 2020-07-27 14:41 +0200, Fabrice Fontaine spake thusly:
> openssl is an optional dependency that is enabled by default since
> version 0.7.0 and
> https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75

Seeing how they are testing for openssl, will that no fail for a staitc
link, because they forget to link with -lz in that case ?

      AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
        with_openssl=no
      ], [-lcrypto])

Why don't they yse pkg-config?

Additionally/alternatively, they do have a cmake-based buildsystem. Can
we switch over?

Regards,
Yann E. MORIN.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/capnproto/capnproto.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
> index 34fb885914..2afeb8ffa3 100644
> --- a/package/capnproto/capnproto.mk
> +++ b/package/capnproto/capnproto.mk
> @@ -21,5 +21,12 @@ endif
>  # The actual source to be compiled is within a 'c++' subdirectory
>  CAPNPROTO_SUBDIR = c++
>  
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +CAPNPROTO_CONF_OPTS += --with-openssl
> +CAPNPROTO_DEPENDENCIES += openssl
> +else
> +CAPNPROTO_CONF_OPTS += --without-openssl
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> -- 
> 2.27.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Koen Martens July 28, 2020, 6:41 a.m. UTC | #2
Hi,

I'm still waiting for this to be approved/merged:

https://patchwork.ozlabs.org/project/buildroot/patch/20200516075313.GB31946@coltrane/

Pending that, I'm not touching the package.

Cheers,

Koen

On Mon, Jul 27, 2020 at 02:41:45PM +0200, Fabrice Fontaine wrote:
> openssl is an optional dependency that is enabled by default since
> version 0.7.0 and
> https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/capnproto/capnproto.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
> index 34fb885914..2afeb8ffa3 100644
> --- a/package/capnproto/capnproto.mk
> +++ b/package/capnproto/capnproto.mk
> @@ -21,5 +21,12 @@ endif
>  # The actual source to be compiled is within a 'c++' subdirectory
>  CAPNPROTO_SUBDIR = c++
>  
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +CAPNPROTO_CONF_OPTS += --with-openssl
> +CAPNPROTO_DEPENDENCIES += openssl
> +else
> +CAPNPROTO_CONF_OPTS += --without-openssl
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> -- 
> 2.27.0
>
Thomas Petazzoni Aug. 8, 2020, 9:40 p.m. UTC | #3
On Mon, 27 Jul 2020 14:51:40 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> On 2020-07-27 14:41 +0200, Fabrice Fontaine spake thusly:
> > openssl is an optional dependency that is enabled by default since
> > version 0.7.0 and
> > https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75  
> 
> Seeing how they are testing for openssl, will that no fail for a staitc
> link, because they forget to link with -lz in that case ?
> 
>       AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
>         with_openssl=no
>       ], [-lcrypto])
> 
> Why don't they yse pkg-config?

It is weird, we don't have any build failures for this. I would assume
that any configuration where OpenSSL gets built before capnproto (by
chance) and is static should exhibit a build failure, but it's not the
case.

Thomas
diff mbox series

Patch

diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
index 34fb885914..2afeb8ffa3 100644
--- a/package/capnproto/capnproto.mk
+++ b/package/capnproto/capnproto.mk
@@ -21,5 +21,12 @@  endif
 # The actual source to be compiled is within a 'c++' subdirectory
 CAPNPROTO_SUBDIR = c++
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+CAPNPROTO_CONF_OPTS += --with-openssl
+CAPNPROTO_DEPENDENCIES += openssl
+else
+CAPNPROTO_CONF_OPTS += --without-openssl
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))