added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
CFLAGS:append = " -pipe -funsigned-char -DFNFLOAT -DCK_NEWTERM -DPOSIX -UNOUNICODE"
CFLAGS:append = " -UNOPUSH -UNOHELP -UNOFRILLS -UNOPUSH -DNO_OPENPTY"
CFLAGS:append = " -UNOB_115K -UNOSERVER -UNODEBUG -DDEBUG"
CFLAGS:append = " -DTCPSOCKET -DNOLISTEN -DNOLOGIN"
CFLAGS:append = " -UNOCSETS -UNONET -UNOFTP -UNODIAL -UNOPUSH -UNOIKSD -UNOHTTP -UDNOFLOAT"
CFLAGS:append = " -UNOSEXP -UNORLOGIN -UNOOLDMODEMS -UNOSSH -UNOLISTEN -UNORESEND -UNOAUTODL"
CFLAGS:append = " -UNOSTREAMING -UNOHINTS -UNOCKXYZ -UNOLEARN -UNOMKDIR -UNOPERMS -UNOCKTIMERS"
CFLAGS:append = " -UNOCKREGEX -UNOLOGDIAL -DNOLOCAL -DZLIB"

View File

@@ -0,0 +1,4 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
CXXFLAGS += "-DEIGEN_MPL2_ONLY"
CFLAGS += "-DEIGEN_MPL2_ONLY"

View File

@@ -0,0 +1,2 @@
SYSTEMD_AUTO_ENABLE = "disable"
INITSCRIPT_PARAMS = "disable"

View File

@@ -0,0 +1,11 @@
SYSTEMD_AUTO_ENABLE:ntp = "disable"
SYSTEMD_AUTO_ENABLE:ntpdate = "disable"
SYSTEMD_AUTO_ENABLE:sntp = "disable"
do_configure:prepend() {
for ns in ${NTP_SERVERS}; do
grep -q ${ns} ${WORKDIR}/ntp.conf || echo "server ${ns}" >> ${WORKDIR}/ntp.conf
done
}

View File

@@ -0,0 +1,6 @@
# Same PACKAGECONFIG than community except that GTK backend is used when DISTRO_FEATURES also contains "wayland"
PACKAGECONFIG = "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
\
${@bb.utils.contains("DISTRO_FEATURES", "wayland", "gtk", "", d)} \
"

View File

@@ -0,0 +1 @@
SUBSYSTEM=="misc", KERNEL=="hw_random", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hwrng.device"

View File

@@ -0,0 +1,35 @@
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
DefaultDependencies=no
Conflicts=shutdown.target
Before=sysinit.target shutdown.target
ConditionVirtualization=!container
Wants=dev-hwrng.device
After=dev-hwrng.device
After=systemd-udevd.service
[Service]
EnvironmentFile=-/etc/default/rng-tools
ExecStart=/usr/sbin/rngd -f $EXTRA_ARGS
CapabilityBoundingSet=CAP_SYS_ADMIN
IPAddressDeny=any
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateTmp=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectSystem=strict
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
[Install]
WantedBy=sysinit.target

View File

@@ -0,0 +1,14 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGECONFIG:remove = "libjitterentropy"
SRC_URI += " \
file://71-hwrng.rules \
file://rng-tools.service \
"
do_install:append() {
# install udev rule
install -D -p -m0644 ${WORKDIR}/71-hwrng.rules ${D}${sysconfdir}/udev/rules.d/71-hwrng.rules
}
FILES:${PN}-service += "${sysconfdir}/udev"

View File

@@ -0,0 +1,36 @@
# Copyright (C) 2019, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Tools for cleaning apt databse"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
RDEPENDS:${PN} += " apt "
SRC_URI = " file://userfs-cleanup-package.service file://userfs-cleanup-package.sh"
S = "${WORKDIR}/git"
inherit systemd update-rc.d
ST_USERFS ?= "1"
SYSTEMD_PACKAGES += "${PN}"
SYSTEMD_SERVICE:${PN} = "userfs-cleanup-package.service"
SYSTEMD_AUTO_ENABLE:${PN} = "${@bb.utils.contains('ST_USERFS', '1', 'enable', 'disable', d)}"
do_install() {
install -d ${D}${systemd_unitdir}/system ${D}${base_sbindir}
install -m 0644 ${WORKDIR}/userfs-cleanup-package.service ${D}${systemd_unitdir}/system
install -m 0755 ${WORKDIR}/userfs-cleanup-package.sh ${D}${base_sbindir}
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/userfs-cleanup-package.sh ${D}${sysconfdir}/init.d/userfs-cleanup-package.sh
sed -i -e "s:@sbindir@:${base_sbindir}:; s:@sysconfdir@:${sysconfdir}:" ${D}${sysconfdir}/init.d/userfs-cleanup-package.sh
sed -i -e "s:@sbindir@:${base_sbindir}:; s:@sysconfdir@:${sysconfdir}:" ${D}${systemd_unitdir}/system/userfs-cleanup-package.service
}
INITSCRIPT_NAME = "userfs-cleanup-package.sh"
INITSCRIPT_PARAMS = "start 22 5 3 ."

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Userfs cleanup package
After=systemd-logind.service
[Service]
Type=oneshot
ExecStart=-@sbindir@/userfs-cleanup-package.sh start
ExecStartPost=/bin/systemctl --no-reload disable userfs-cleanup-package.service
WatchdogSec=30
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,149 @@
#! /bin/sh
### BEGIN INIT INFO
# remove package which are present on the database but not present on userfs
### END INIT INFO
DESC="cleanup apt database"
get_type() {
local __resultvar=$1
ROOT_TYPE="unknown"
if [ -f /usr/bin/findmnt ];
then
ROOT_DEVICE=$(findmnt --noheadings --output=SOURCE / | cut -d'[' -f1)
case $ROOT_DEVICE in
ubi*)
ROOT_TYPE="nand"
;;
/dev/mmcblk0*)
ROOT_TYPE="sdmmc"
;;
/dev/mmcblk1*)
ROOT_TYPE="mmc"
;;
/dev/disk/by-*)
LINK=$(/usr/bin/readlink $ROOT_DEVICE | tr '/' ' ' | tr '.' ' ' | sed "s/ //g")
case $LINK in
ubi*)
ROOT_TYPE="nand"
;;
mmcblk0*)
ROOT_TYPE="sdmmc"
;;
mmcblk1*)
ROOT_TYPE="mmc"
;;
esac
;;
esac
else
if [ `cat /proc/cmdline | sed "s/.*mmcblk0.*/mmcblk0/" ` == "mmcblk0" ]; then
ROOT_TYPE="sdmmc"
elif [ `cat /proc/cmdline | sed "s/.*mmcblk1.*/mmcblk1/" ` == "mmcblk1" ]; then
ROOT_TYPE="mmc"
elif [ `cat /proc/cmdline | sed "s/.*ubi0.*/ubi0/" ` == "ubi0" ]; then
ROOT_TYPE="nand"
elif [ `cat /proc/cmdline | sed "s/.*nfsroot.*/nfs/" ` == "nfs" ]; then
ROOT_TYPE="nfs"
fi
fi
eval $__resultvar="'$ROOT_TYPE'"
}
found_devices() {
local __resultvar=$1
local __resultopt=$2
local _type=$3
local _search=$4
local _device="unknown"
local _option=" "
case $_type in
nand)
local ubi_volumes=$(ls -1 -d /sys/class/ubi/ubi0_*)
for f in $ubi_volumes;
do
if [ -r $f/name ];
then
cat $f/name | grep -sq "^${_search}"
if [ "$?" -eq 0 ];
then
_device="/dev/$(basename $f)"
_option="-t ubifs"
break;
fi
fi
done
;;
sdmmc)
local sdmmc_parts=$(ls -1 -d /sys/block/mmcblk0/mmcblk0p*)
for f in $sdmmc_parts;
do
if [ -r $f/uevent ];
then
cat $f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq "^${_search}"
if [ "$?" -eq 0 ];
then
_device="/dev/$(basename $f)"
break;
fi
fi
done
;;
mmc)
local mmc_parts=$(ls -1 -d /sys/block/mmcblk1/mmcblk1p*)
for f in $mmc_parts;
do
if [ -r $f/uevent ];
then
cat $f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq "^${_search}"
if [ "$?" -eq 0 ];
then
_device="/dev/$(basename $f)"
break;
fi
fi
done
;;
nfs)
$_device="/dev/nfs"
;;
esac
eval $__resultvar="'$_device'"
eval $__resultopt="'$_option'"
}
case $1 in
start)
echo "Starting $DESC"
get_type TYPE
found_devices DEVICE DEVICE_OPTION $TYPE userfs
if [ "$DEVICE" = "/dev/null" ];
then
# nfs file system, do nothing
exit 0
fi
case $DEVICE in
unknown)
# userfs partition are not present
# we need to cleanup apt database
grep -l "^/usr/local/" /var/lib/dpkg/info/* | sed -e "s|/var/lib/dpkg/info/\(.*\).list|\1|" | xargs apt-get purge -y
echo "USERFS NOT PRESENT: CLEAN DPKG DATABASE" > /dev/kmsg
;;
/dev/nfs)
# nfs file system, do nothing
exit 0
;;
/dev/*)
# userfs are present, do nothing
;;
esac
;;
*)
echo "Usage: @sysconfdir@/init.d/userfs-cleanup-package.sh {start}" >&2
exit 1
;;
esac
exit 0
# vim:noet

View File

@@ -0,0 +1,15 @@
SUMMARY = "Read one-dimensional barcodes and QR codes from Python 2 and 3 using the zbar library"
HOMEPAGE = "https://github.com/NaturalHistoryMuseum/pyzbar"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c27c2135d76d2d03f4842d9c133f1ed4"
SECTION = "devel/python"
DEPENDS = "python3-pillow zbar-openstlinux"
SRC_URI = "git://github.com/NaturalHistoryMuseum/pyzbar.git;protocol=https;branch=master"
SRCREV = "b6853df71aee4b38a9986af8565603a0115e81b7"
S = "${WORKDIR}/git"
BBCLASSEXTEND += "native nativesdk"
inherit setuptools3

View File

@@ -0,0 +1,36 @@
From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Dec 2016 17:38:51 -0800
Subject: [PATCH] make relies GNU extentions
We get errors like
`%'-style pattern rules are a GNU make extension
Disable this warning, since we use gmake with OE
anyway
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-error foreign subdir-objects std-options dist-bzip2])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_SRCDIR(zbar/scanner.c)
LT_PREREQ([2.2])
@@ -47,7 +47,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION
[Library revision])
AM_CPPFLAGS="-I$srcdir/include"
-AM_CFLAGS="-Wall -Wno-parentheses -Werror"
+AM_CFLAGS="-Wall -Wno-parentheses"
AM_CXXFLAGS="$AM_CFLAGS"
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])

View File

@@ -0,0 +1,45 @@
From 3d4fd19334b1d4c35ba64dff63a31e9eec01c422 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Fri, 9 Oct 2020 11:21:38 +0200
Subject: [PATCH] support of ImageMagick 7
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
---
configure.ac | 2 +-
zbarimg/zbarimg.c | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 256aedb..5d4ed23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -324,7 +324,7 @@ dnl but the latter doesn't exist in older verisons (bug #2848437)
dnl double check ImageMagick install (bug #2582232)
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS"
- AC_CHECK_HEADER([wand/MagickWand.h],
+ AC_CHECK_HEADER([MagickWand/MagickWand.h],
[have_IM="yes"],
[have_IM="broken"])
CPPFLAGS="$CPPFLAGS_save"])])
diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c
index d3cf5e8..fc7abba 100644
--- a/zbarimg/zbarimg.c
+++ b/zbarimg/zbarimg.c
@@ -39,12 +39,8 @@
#include <zbar.h>
-#ifdef HAVE_GRAPHICSMAGICK
-# include <wand/wand_api.h>
-#endif
-
#ifdef HAVE_IMAGEMAGICK
-# include <wand/MagickWand.h>
+#include <MagickWand/MagickWand.h>
/* ImageMagick frequently changes API names - just use the original
* (more stable?) names to match GraphicsMagick
--
2.17.1

View File

@@ -0,0 +1,53 @@
SUMMARY = "2D barcode scanner toolkit."
SECTION = "graphics"
LICENSE = "LGPL-2.1-only"
DEPENDS = "pkgconfig intltool-native libpng jpeg"
DEPENDS += "xmlto-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=4015840237ca7f0175cd626f78714ca8"
PV = "0.10+git${SRCPV}"
SRCREV = "67003d2a985b5f9627bee2d8e3e0b26d0c474b57"
SRC_URI = "git://github.com/ZBar/Zbar;branch=master;protocol=https \
file://0001-make-relies-GNU-extentions.patch \
file://0002-support-of-ImageMagick-7.patch \
"
S = "${WORKDIR}/git"
inherit autotools pkgconfig python3native
PACKAGECONFIG = " \
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
imagemagick video \
"
PACKAGECONFIG[x11] = "--with-x,-without-x,libxcb libx11 libsm libxau libxext libxv libice libxdmcp"
PACKAGECONFIG[imagemagick] = ",--without-imagemagick,imagemagick"
PACKAGECONFIG[video] = ",--disable-video,"
EXTRA_OECONF = " \
--without-qt \
--without-python \
--without-gtk \
"
CPPFLAGS += "-Wno-error"
do_install() {
install -d ${D}${libdir} ${D}${bindir}
# install library
install -m 0755 ${B}/zbar/.libs/libzbar.so.0.2.0 ${D}${libdir}
cd ${D}${libdir}
ln -s libzbar.so.0.2.0 libzbar.so.0
ln -s libzbar.so.0.2.0 libzbar.so
# install zbarcam
install -m 0755 ${B}/zbarcam/.libs/zbarcam ${D}${bindir}
# install zbarimg
install -m 0755 ${B}/zbarimg/.libs/zbarimg ${D}${bindir}
}