Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 1/1] package/xerces: add disable network option
Date: Fri, 1 May 2020 23:34:54 +0200	[thread overview]
Message-ID: <20200501213454.GF15673@scaer> (raw)
In-Reply-To: <20200501154340.27763-1-jared.bents@rockwellcollins.com>

Jared, All,

On 2020-05-01 10:43 -0500, Jared Bents spake thusly:
> Update to add the option to compile xerces without network
> support.
> 
> Signed-off-by: Jared Bents <jared.bents@rockwellcollins.com>
> ---
>  package/xerces/Config.in | 9 +++++++++
>  package/xerces/xerces.mk | 4 +++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/package/xerces/Config.in b/package/xerces/Config.in
> index 2edc4346b5..bc5c725799 100644
> --- a/package/xerces/Config.in
> +++ b/package/xerces/Config.in
> @@ -6,5 +6,14 @@ config BR2_PACKAGE_XERCES
>  
>  	  http://xerces.apache.org/xerces-c/
>  
> +if BR2_PACKAGE_XERCES
> +
> +config BR2_PACKAGE_XERCES_DISABLE_NETWORK
> +	bool "Disable network support"
> +	help
> +	  Disable network support in xerces

We prefer positive logic, so:

    config BR2_PACKAGE_XERCES_NETWORK
        bool "network support"
        help
          Enable network support

> +endif
> +
>  comment "xerces-c++ needs a toolchain w/ C++, wchar"
>  	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR)
> diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk
> index c75a8b0d35..f98b1066a4 100644
> --- a/package/xerces/xerces.mk
> +++ b/package/xerces/xerces.mk
> @@ -31,7 +31,9 @@ XERCES_CONF_ENV += LIBS=-liconv
>  XERCES_DEPENDENCIES += libiconv
>  endif
>  
> -ifeq ($(BR2_PACKAGE_LIBCURL),y)
> +ifeq ($(BR2_PACKAGE_XERCES_DISABLE_NETWORK),y)
> +XERCES_CONF_OPTS += -Dnetwork:BOOL=OFF
> +else ifeq ($(BR2_PACKAGE_LIBCURL),y)
>  XERCES_CONF_OPTS += -Dnetwork-accessor=curl
>  XERCES_DEPENDENCIES += libcurl
>  else

And here you'd have something like:

    ifeq ($(BR2_PACKAGE_XERCES_NETWORK),y)
    ifeq ($(BR2_PACKAGE_LIBCURL),y)
    XERCES_CONF_OPTS += -Dnetwork-accessor=curl
    XERCES_DEPENDENCIES += libcurl
    else
    XERCES_CONF_OPTS += -Dnetwork-accessor=socket
    endif
    else
    XERCES_CONF_OPTS += -Dnetwork:BOOL=OFF
    endif

Note: why -Dnetwork:BOOL=OFF while we traditionally use -Dnetwork=OFF ?

Regards,
Yann E. MORIN.

> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2020-05-01 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 15:43 [Buildroot] [PATCH v1 1/1] package/xerces: add disable network option Jared Bents
2020-05-01 21:34 ` Yann E. MORIN [this message]
2020-05-01 21:36   ` Yann E. MORIN
2020-05-04 13:22     ` Jared Bents

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200501213454.GF15673@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox