native/sdk.bbclass: Handle DEPENDS and PROVIDES fields magically, remove a number of xorg sdk and native packages replacing with BBCLASSEXTEND
This commit is contained in:
parent
ade351e2f4
commit
ee0faf1346
|
@ -95,3 +95,21 @@ do_install () {
|
|||
|
||||
PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
|
||||
PKG_CONFIG_SYSROOT_DIR = ""
|
||||
|
||||
python __anonymous () {
|
||||
pn = bb.data.getVar("PN", d, True)
|
||||
depends = bb.data.getVar("DEPENDS", d, True)
|
||||
deps = bb.utils.explode_deps(depends)
|
||||
if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
|
||||
autoextend = True
|
||||
else:
|
||||
autoextend = False
|
||||
for dep in deps:
|
||||
if not dep.endswith("-native"):
|
||||
if autoextend:
|
||||
depends = depends.replace(dep, dep + "-native")
|
||||
else:
|
||||
bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep))
|
||||
bb.data.setVar("DEPENDS", depends, d)
|
||||
}
|
||||
|
||||
|
|
|
@ -71,3 +71,34 @@ python () {
|
|||
bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
|
||||
}
|
||||
|
||||
python __anonymous () {
|
||||
pn = bb.data.getVar("PN", d, True)
|
||||
depends = bb.data.getVar("DEPENDS", d, True)
|
||||
deps = bb.utils.explode_deps(depends)
|
||||
if "sdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
|
||||
autoextend = True
|
||||
else:
|
||||
autoextend = False
|
||||
for dep in deps:
|
||||
if dep.endswith("-native") or dep.endswith("-cross") or dep.startswith("virtual/"):
|
||||
continue
|
||||
if not dep.endswith("-sdk"):
|
||||
if autoextend:
|
||||
depends = depends.replace(dep, dep + "-sdk")
|
||||
else:
|
||||
bb.note("%s has depends %s which doesn't end in -sdk?" % (pn, dep))
|
||||
bb.data.setVar("DEPENDS", depends, d)
|
||||
provides = bb.data.getVar("PROVIDES", d, True)
|
||||
for prov in provides.split():
|
||||
if prov.find(pn) != -1:
|
||||
continue
|
||||
if not prov.endswith("-sdk"):
|
||||
if autoextend:
|
||||
provides = provides.replace(prov, prov + "-sdk")
|
||||
#else:
|
||||
# bb.note("%s has rouge PROVIDES of %s which doesn't end in -sdk?" % (pn, prov))
|
||||
bb.data.setVar("PROVIDES", provides, d)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
SECTION = "console/utils"
|
||||
require sed_${PV}.bb
|
||||
inherit native
|
|
@ -23,3 +23,4 @@ pkg_prerm_${PN} () {
|
|||
update-alternatives --remove sed sed.${PN}
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
require libfontenc_${PV}.bb
|
||||
|
||||
DEPENDS = "zlib-native xproto-native"
|
||||
PE = "1"
|
||||
|
||||
XORG_PN = "libfontenc"
|
||||
|
||||
inherit native
|
|
@ -5,3 +5,5 @@ LICENSE = "BSD-X"
|
|||
DEPENDS += "zlib xproto"
|
||||
PR = "r1"
|
||||
PE = "1"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
require libxau_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-native util-macros-native"
|
||||
PROVIDES = ""
|
||||
|
||||
inherit native
|
|
@ -1,6 +0,0 @@
|
|||
require libxau_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-sdk util-macros-sdk"
|
||||
PROVIDES = ""
|
||||
|
||||
inherit sdk
|
|
@ -6,3 +6,5 @@ PROVIDES = "xau"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "libXau"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
require libxdmcp_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-native util-macros-native"
|
||||
PROVIDES = ""
|
||||
|
||||
inherit native
|
|
@ -1,6 +0,0 @@
|
|||
require libxdmcp_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-sdk util-macros-sdk"
|
||||
PROVIDES = ""
|
||||
|
||||
inherit sdk
|
|
@ -7,3 +7,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "libXdmcp"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
require libxext_git.bb
|
||||
|
||||
DEPENDS = "xproto-sdk util-macros-sdk libx11-sdk libxau-sdk xextproto-sdk"
|
||||
PROVIDES = ""
|
||||
|
||||
inherit sdk
|
|
@ -10,3 +10,5 @@ XORG_PN = "libXext"
|
|||
|
||||
SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/${XORG_PN};protocol=git"
|
||||
S = "${WORKDIR}/git/"
|
||||
|
||||
BBCLASSEXTEND = "sdk"
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
require libxfont_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-native zlib-native fontcacheproto-native fontsproto-native \
|
||||
libfontenc-native xtrans-native freetype-native util-macros-native"
|
||||
PE = "1"
|
||||
|
||||
# no need for patch used in libxfont
|
||||
SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2"
|
||||
|
||||
inherit native
|
|
@ -9,3 +9,5 @@ PE = "1"
|
|||
#SRC_URI += "file://no-scalable-crash.patch;patch=1"
|
||||
|
||||
XORG_PN = "libXfont"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
require libxkbfile_${PV}.bb
|
||||
|
||||
DEPENDS = "libx11-native kbproto-native"
|
||||
PE = "1"
|
||||
|
||||
XORG_PN = "libxkbfile"
|
||||
|
||||
inherit native
|
|
@ -5,3 +5,5 @@ LICENSE= "GPL"
|
|||
DEPENDS += "virtual/libx11 kbproto"
|
||||
PR = "r1"
|
||||
PE = "1"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
require libxrandr_${PV}.bb
|
||||
|
||||
DEPENDS = "randrproto-sdk util-macros-sdk libxext-sdk libxrender-sdk"
|
||||
|
||||
inherit sdk
|
|
@ -7,3 +7,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "libXrandr"
|
||||
|
||||
BBCLASSEXTEND = "sdk"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
require libxrender_${PV}.bb
|
||||
|
||||
DEPENDS = "xproto-sdk renderproto-sdk util-macros-sdk libx11-sdk"
|
||||
|
||||
inherit sdk
|
|
@ -7,3 +7,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "libXrender"
|
||||
|
||||
BBCLASSEXTEND = "sdk"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
require xtrans_${PV}.bb
|
||||
|
||||
DEPENDS = "util-macros-native"
|
||||
|
||||
inherit native
|
|
@ -1,5 +0,0 @@
|
|||
require xtrans_${PV}.bb
|
||||
|
||||
DEPENDS = "util-macros-sdk"
|
||||
|
||||
inherit sdk
|
|
@ -8,3 +8,5 @@ PR = "r0"
|
|||
RDEPENDS_${PN}-dev = ""
|
||||
|
||||
XORG_PN = "xtrans"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require bigreqsproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require bigreqsproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "bigreqsproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
require fontcacheproto_${PV}.bb
|
||||
|
||||
XORG_PN = "fontcacheproto"
|
||||
|
||||
inherit native
|
|
@ -2,3 +2,5 @@ require xorg-proto-common.inc
|
|||
|
||||
PR = "r1"
|
||||
PE = "1"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
require fontsproto_${PV}.bb
|
||||
|
||||
PR = "r1"
|
||||
|
||||
XORG_PN = "fontsproto"
|
||||
|
||||
S = "${WORKDIR}/fontsproto-${PV}"
|
||||
|
||||
inherit native
|
|
@ -2,3 +2,5 @@ require xorg-proto-common.inc
|
|||
|
||||
PR = "r1"
|
||||
PE = "1"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require inputproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require inputproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -8,3 +8,5 @@ SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/inputproto;protocol=git"
|
|||
S = "${WORKDIR}/git"
|
||||
|
||||
XORG_PN = "inputproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require kbproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require kbproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "kbproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require xcmiscproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require xcmiscproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "xcmiscproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require xextproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require xextproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,5 @@ PR = "r2"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "xextproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require xf86bigfontproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require xf86bigfontproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,5 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "xf86bigfontproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require xproto_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require xproto_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -4,3 +4,6 @@ PR = "r1"
|
|||
PE = "1"
|
||||
|
||||
XORG_PN = "xproto"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
require xorg-util-common.inc
|
||||
inherit native
|
||||
|
||||
DESCRIPTION = "create dependencies in makefiles"
|
||||
DEPENDS = "xproto-native util-macros-native"
|
||||
PR = "r2"
|
||||
PE = "1"
|
||||
|
||||
XORG_PN = "makedepend"
|
|
@ -4,3 +4,5 @@ DESCRIPTION = "create dependencies in makefiles"
|
|||
DEPENDS = "xproto util-macros"
|
||||
PR = "r2"
|
||||
PE = "1"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
require util-macros_${PV}.bb
|
||||
|
||||
inherit native
|
|
@ -1,3 +0,0 @@
|
|||
require util-macros_${PV}.bb
|
||||
|
||||
inherit sdk
|
|
@ -11,3 +11,5 @@ XORG_PN = "util-macros"
|
|||
# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
|
||||
RDEPENDS_${PN}-dev = ""
|
||||
RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
|
||||
|
||||
BBCLASSEXTEND = "native sdk"
|
||||
|
|
Loading…
Reference in New Issue