* [Buildroot] [PATCH] package/libwebsock: allow building without SSL
@ 2015-01-04 11:07 Yann E. MORIN
2015-01-04 20:34 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2015-01-04 11:07 UTC (permalink / raw)
To: buildroot
libwebsock can optionally use SL, and defaults to using it without
checking for its presence first.
Just disable SSL support if openssl is not enabled, and ensure it is
built before libwebsock if it is enabled.
Add a patch to fix SSL conditional build.
Fixes:
http://autobuild.buildroot.org/results/2c4/2c49e45667aaf2f2a59ace94885b9d4ed98038d7/
http://autobuild.buildroot.org/results/517/517bc814732f86dc6dd1a5c91148ce52ec9803f7/
http://autobuild.buildroot.org/results/951/95109c7e37aa21228bc71c69e9c66a6821f3174a/
...
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gregory Dymarek <gregd72002@gmail.com>
---
package/libwebsock/0002-fix-ssl.patch | 26 ++++++++++++++++++++++++++
package/libwebsock/libwebsock.mk | 7 +++++++
2 files changed, 33 insertions(+)
create mode 100644 package/libwebsock/0002-fix-ssl.patch
diff --git a/package/libwebsock/0002-fix-ssl.patch b/package/libwebsock/0002-fix-ssl.patch
new file mode 100644
index 0000000..51b9b36
--- /dev/null
+++ b/package/libwebsock/0002-fix-ssl.patch
@@ -0,0 +1,26 @@
+config: fix SSL detection
+
+The @WEBSOCK_HAVE_SSL@ is not replaced at configure time, and even if
+it was, it would be replaced by an empty string if openssl is disabled,
+thus still defining WEBSOCK_HAVE_SSL when we would not want it.
+
+Instead, rely on config.h, which is properly generated by ./configure,
+to provide the information about whether openssl is enabled or not.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN a/src/websock_config.h.in b/src/websock_config.h.in
+--- a/src/websock_config.h.in
++++ b/src/websock_config.h.in
+@@ -1,9 +1,10 @@
+ #ifndef WEBSOCK_CONFIG_H
+ #define WEBSOCK_CONFIG_H 1
+
++#include "config.h"
++
+ #define WEBSOCK_PACKAGE_STRING @WEBSOCK_PACKAGE_STRING@
+ #define WEBSOCK_PACKAGE_VERSION @WEBSOCK_PACKAGE_VERSION@
+ #define WEBSOCK_PACKAGE_NAME @WEBSOCK_PACKAGE_NAME@
+-#define WEBSOCK_HAVE_SSL @WEBSOCK_HAVE_SSL@
+
+ #endif
diff --git a/package/libwebsock/libwebsock.mk b/package/libwebsock/libwebsock.mk
index 8458883..b52293b 100644
--- a/package/libwebsock/libwebsock.mk
+++ b/package/libwebsock/libwebsock.mk
@@ -12,4 +12,11 @@ LIBWEBSOCK_INSTALL_STAGING = YES
LIBWEBSOCK_LICENSE = LGPLv3
LIBWEBSOCK_LICENSE_FILES = COPYING.lesser
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBWEBSOCK_DEPENDENCIES += openssl
+LIBWEBSOCK_CONF_OPTS += --with-ssl
+else
+LIBWEBSOCK_CONF_OPTS += --without-ssl
+endif
+
$(eval $(autotools-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/libwebsock: allow building without SSL
2015-01-04 11:07 [Buildroot] [PATCH] package/libwebsock: allow building without SSL Yann E. MORIN
@ 2015-01-04 20:34 ` Thomas Petazzoni
2015-01-04 20:36 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-04 20:34 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sun, 4 Jan 2015 12:07:42 +0100, Yann E. MORIN wrote:
> libwebsock can optionally use SL, and defaults to using it without
> checking for its presence first.
>
> Just disable SSL support if openssl is not enabled, and ensure it is
> built before libwebsock if it is enabled.
>
> Add a patch to fix SSL conditional build.
>
> Fixes:
> http://autobuild.buildroot.org/results/2c4/2c49e45667aaf2f2a59ace94885b9d4ed98038d7/
> http://autobuild.buildroot.org/results/517/517bc814732f86dc6dd1a5c91148ce52ec9803f7/
> http://autobuild.buildroot.org/results/951/95109c7e37aa21228bc71c69e9c66a6821f3174a/
> ...
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gregory Dymarek <gregd72002@gmail.com>
Thanks, applied. Can you submit your patch upstream? I have already
submitted the 0001 patch upstream, see
https://github.com/payden/libwebsock/pull/27.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/libwebsock: allow building without SSL
2015-01-04 20:34 ` Thomas Petazzoni
@ 2015-01-04 20:36 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2015-01-04 20:36 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2015-01-04 21:34 +0100, Thomas Petazzoni spake thusly:
> On Sun, 4 Jan 2015 12:07:42 +0100, Yann E. MORIN wrote:
> > libwebsock can optionally use SL, and defaults to using it without
> > checking for its presence first.
> >
> > Just disable SSL support if openssl is not enabled, and ensure it is
> > built before libwebsock if it is enabled.
> >
> > Add a patch to fix SSL conditional build.
> >
> > Fixes:
> > http://autobuild.buildroot.org/results/2c4/2c49e45667aaf2f2a59ace94885b9d4ed98038d7/
> > http://autobuild.buildroot.org/results/517/517bc814732f86dc6dd1a5c91148ce52ec9803f7/
> > http://autobuild.buildroot.org/results/951/95109c7e37aa21228bc71c69e9c66a6821f3174a/
> > ...
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Gregory Dymarek <gregd72002@gmail.com>
>
> Thanks, applied. Can you submit your patch upstream? I have already
> submitted the 0001 patch upstream, see
> https://github.com/payden/libwebsock/pull/27.
Sure, will do.
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-04 20:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-04 11:07 [Buildroot] [PATCH] package/libwebsock: allow building without SSL Yann E. MORIN
2015-01-04 20:34 ` Thomas Petazzoni
2015-01-04 20:36 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox