openvswitch: only libopenvswitch depends on libunbound, libunwind
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 29 Jul 2020 09:30:38 +0000 (17:30 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Thu, 30 Jul 2020 02:02:13 +0000 (10:02 +0800)
commit52e074411b937cd91d34ebeedc429de5dadce9a4
treed69e57f9592929b293808ddd4e4ae4d01b9ed0a3
parentf69f4f3fae71a142e8133f4bd05cd1c78b429a95
openvswitch: only libopenvswitch depends on libunbound, libunwind

This is to make explicit the conditional select of libunwind is only
needed for libopenvswitch.  If we spill it over other packages, the
generated kconfig will have recursive dependency issue.  2 new patches
were made for this goal

The other thing is that "+libunwind" will cause it to be built if any of the
packages defined in this Makefile is enabled (y or m).  This is at the moment
by-design of the build system.

Libunwind does not support architectures like arc.  Use conditional select To
avoid (libunwind) build failures like the following,

  checking for ELF helper width... configure: error: Unknown ELF target: arc
  make[3]: *** [Makefile:65: /data/openwrt/build_dir/target-arc_arc700_uClibc/
  libunwind-1.3.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

Things like "+PACKAGE_openvswitch-libopenvswitch:libunwind" will also result in
recursive deps error for chains of 3 nodes.  Kconfig construct like the
following will be made

config A
tristate
select B
depends on !(C) || (x)

config B
tristate
select C

config C
tristate

config x
bool

Other changes include

 - Shared use of variable ovs__common_depends was removed
 - Ovn doc build was patched out

Link: https://github.com/openwrt/packages/pull/12959#issuecomment-665021413
Reported-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/openvswitch/Makefile
net/openvswitch/openvswitch.mk
net/openvswitch/patches/0009-build-only-link-libopenvswitch-with-libunwind-libunb.patch [new file with mode: 0644]
net/ovn/Makefile
net/ovn/patches/0001-build-skip-building-tests.patch [deleted file]
net/ovn/patches/0001-build-skip-check-and-use-of-libunbound.patch [new file with mode: 0644]
net/ovn/patches/0002-build-skip-tests-and-docs.patch [new file with mode: 0644]
net/ovn/patches/0002-ovn-lib-fix-install_dir.patch [deleted file]
net/ovn/patches/0003-ovn-lib-fix-install_dir.patch [new file with mode: 0644]