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>
This commit is contained in:
Yousong Zhou
2020-07-29 17:30:38 +08:00
parent f69f4f3fae
commit 52e074411b
7 changed files with 115 additions and 22 deletions
+7 -4
View File
@@ -10,7 +10,7 @@ include ../openvswitch/openvswitch.mk
PKG_NAME:=ovn
PKG_VERSION:=20.06.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ovn-org/ovn.git
@@ -33,18 +33,19 @@ PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-host.mk
ovs__common_depends:= +libatomic +libunbound
ovs__common_depends:=+libatomic +librt
ovs_libovn_title:=Open vSwitch (libovn.so)
ovs_libovn_hidden:=1
ovs_libovn_depends:=+librt
ovs_libovn_depends+=$(ovs__common_depends)
ovs_libovn_files:=usr/lib/libovn*.so*
$(eval $(call OvsPackageTemplate,libovn))
ovs_ovn-common_title:=Open Virtual Network (common files)
ovs_ovn-common_hidden:=1
ovs_ovn-common_depends:=+librt +openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
ovs_ovn-common_depends:=+openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
ovs_ovn-common_depends+=$(ovs__common_depends)
ovs_ovn-common_files:= \
usr/share/ovn/scripts/ovn-ctl \
usr/share/ovn/scripts/ovn-lib \
@@ -58,6 +59,7 @@ $(eval $(call OvsPackageTemplate,ovn-common))
ovs_ovn-north_title:=Open Virtual Network (north package)
ovs_ovn-north_hidden:=
ovs_ovn-north_depends:=+openvswitch-ovsdb +openvswitch-ovn-common
ovs_ovn-north_depends+=$(ovs__common_depends)
ovs_ovn-north_files:=\
usr/share/ovn/ovn-nb.ovsschema \
usr/share/ovn/ovn-sb.ovsschema \
@@ -68,6 +70,7 @@ $(eval $(call OvsPackageTemplate,ovn-north))
ovs_ovn-host_title:=Open Virtual Network (chassis package)
ovs_ovn-host_hidden:=
ovs_ovn-host_depends:=+openvswitch +openvswitch-ovn-common
ovs_ovn-host_depends+=$(ovs__common_depends)
ovs_ovn-host_files:=usr/bin/ovn-controller
$(eval $(call OvsPackageTemplate,ovn-host))