mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-17 12:41:58 +02:00
Newer oe-core doesn't pull many default dependencies anymore: https://lists.openembedded.org/g/openembedded-core/message/156185 add explicit dependency on pkgconfig through pkgconfig.bbclass as we're using it here. Fixes: | Checking pkg-config for dbus-1... no | Turning off dbus-export support, library not found. | Checking pkg-config for bluez... no | Turning off Bluetooth support, library not found. ... | ERROR: /usr/bin/ncurses5-config should not be used, use an alternative such as pkg-config | OSError: 'ncurses5-config --libs --cflags' exited 1: | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/gpsd-3.23/SConstruct", line 63: | SConscript('SConscript', | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 660: | return method(*args, **kw) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 597: | return _SConscript(self.fs, *files, **subst_kw) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 285: | exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/SConscript", line 1881: | cgps = env.Program('clients/cgps', ['clients/cgps.c'], | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 238: | return super().__call__(target, source, *args, **kw) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Util.py", line 748: | return self.method(*nargs, **kwargs) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Builder.py", line 653: | env = env.Override(env_kw) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 622: | env.MergeFlags(merges) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 832: | args = self.ParseFlags(args) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 815: | do_parse(arg) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 662: | for t in arg: do_parse(t) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 667: | arg = self.backtick(arg[1:]) | File "/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 579: | raise OSError("'%s' exited %d" % (command, status)) | ERROR: scons build execution failed. Or on different host it shows better error message: | Checking pkg-config for dbus-1... (cached) yes | /bin/sh: 1: pkg-config: not found | OSError: 'PKG_CONFIG_SYSROOT_DIR="/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot" pkg-config --cflags --libs dbus-1' exited 127: | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/SConstruct", line 63: | SConscript('SConscript', | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 660: | return method(*args, **kw) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 597: | return _SConscript(self.fs, *files, **subst_kw) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Script/SConscript.py", line 285: | exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/SConscript", line 1107: | config.env.MergeFlags(dbusflags) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 832: | args = self.ParseFlags(args) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 815: | do_parse(arg) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 662: | for t in arg: do_parse(t) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 667: | arg = self.backtick(arg[1:]) | File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/SCons/Environment.py", line 579: | raise OSError("'%s' exited %d" % (command, status)) | ERROR: scons build execution failed. Not sure why this one doesn't show up on CI, I guess some SCons magic. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
130 lines
4.5 KiB
BlitzBasic
130 lines
4.5 KiB
BlitzBasic
SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
|
|
SECTION = "console/network"
|
|
LICENSE = "BSD-2-Clause"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821"
|
|
DEPENDS = "dbus ncurses python3 pps-tools"
|
|
PROVIDES = "virtual/gpsd"
|
|
|
|
SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
|
|
file://gpsd.init \
|
|
"
|
|
SRC_URI[sha256sum] = "0b991ce9a46538c4ea450f7a8ee428ff44fb4f8d665fddf2ffe40fe0ae9a6c09"
|
|
|
|
inherit scons update-rc.d python3-dir python3native systemd update-alternatives pkgconfig
|
|
|
|
INITSCRIPT_PACKAGES = "gpsd-conf"
|
|
INITSCRIPT_NAME = "gpsd"
|
|
INITSCRIPT_PARAMS = "defaults 35"
|
|
|
|
SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
|
|
|
|
export STAGING_INCDIR
|
|
export STAGING_LIBDIR
|
|
|
|
CLEANBROKEN = "1"
|
|
|
|
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb"
|
|
PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5"
|
|
PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase"
|
|
PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1"
|
|
EXTRA_OESCONS = " \
|
|
sysroot=${STAGING_DIR_TARGET} \
|
|
libQgpsmm='false' \
|
|
debug='false' \
|
|
nostrip='true' \
|
|
systemd='${SYSTEMD_OESCONS}' \
|
|
libdir='${libdir}' \
|
|
udevdir='${nonarch_base_libdir}/udev' \
|
|
unitdir='${systemd_system_unitdir}' \
|
|
manbuild='false' \
|
|
LINK='${CC}' \
|
|
${PACKAGECONFIG_CONFARGS} \
|
|
"
|
|
# This cannot be used, because then chrpath is not found and only static lib is built
|
|
# target=${HOST_SYS}
|
|
|
|
do_compile:prepend() {
|
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
|
|
export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
|
|
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
|
|
export LD="${CC}"
|
|
export LINKFLAGS="${LDFLAGS}"
|
|
}
|
|
|
|
do_install() {
|
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
|
|
export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
|
|
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
|
|
export LD="${CC}"
|
|
export LINKFLAGS="${LDFLAGS}"
|
|
|
|
export DESTDIR="${D}"
|
|
# prefix is used for RPATH and DESTDIR/prefix for installation
|
|
${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \
|
|
bbfatal "scons install execution failed."
|
|
}
|
|
|
|
do_install:append() {
|
|
install -d ${D}${sysconfdir}/init.d
|
|
install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd
|
|
install -d ${D}${sysconfdir}/default
|
|
install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default
|
|
|
|
# Support for python
|
|
install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
|
|
install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps
|
|
}
|
|
|
|
PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
|
|
|
|
RPROVIDES:${PN}-dbg += "python-pygps-dbg"
|
|
|
|
FILES:${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
|
|
${libdir}/libQgpsmm.prl"
|
|
|
|
FILES:${PN}-doc += "${datadir}/${BPN}/doc"
|
|
|
|
RDEPENDS:${PN} = "gpsd-gpsctl"
|
|
RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
|
|
|
|
SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
|
|
FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
|
|
RDEPENDS:gpsd-udev += "udev gpsd-conf"
|
|
|
|
SUMMARY:libgpsd = "C service library used for communicating with gpsd"
|
|
FILES:libgpsd = "${libdir}/libgpsd.so.*"
|
|
|
|
SUMMARY:libgps = "C service library used for communicating with gpsd"
|
|
FILES:libgps = "${libdir}/libgps.so.*"
|
|
|
|
SUMMARY:gpsd-conf = "gpsd configuration files and init scripts"
|
|
FILES:gpsd-conf = "${sysconfdir}"
|
|
CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default"
|
|
|
|
SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes"
|
|
FILES:gpsd-gpsctl = "${bindir}/gpsctl"
|
|
|
|
SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS"
|
|
# Python files are required for gps/fake, required for gpsfake.
|
|
FILES:gps-utils = "${bindir}/* ${libdir}/gps/*.py ${libdir}/gps/*.so"
|
|
RDEPENDS:gps-utils = "python3-pygps"
|
|
|
|
SUMMARY:python3-pygps = "Python bindings to gpsd"
|
|
FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info"
|
|
RDEPENDS:python3-pygps = " \
|
|
python3-core \
|
|
python3-io \
|
|
python3-threading \
|
|
python3-terminal \
|
|
gpsd \
|
|
python3-json"
|
|
|
|
RPROVIDES:${PN} += "${PN}-systemd"
|
|
RREPLACES:${PN} += "${PN}-systemd"
|
|
RCONFLICTS:${PN} += "${PN}-systemd"
|
|
SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
|
|
|
|
ALTERNATIVE:${PN} = "gpsd-defaults"
|
|
ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
|
|
ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
|