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,26 @@
From a64e52f9b58519aa2b8a1073fa6c04da04933428 Mon Sep 17 00:00:00 2001
From: Jonathan Richardson <jonathan.richardson@broadcom.com>
Date: Wed, 26 Feb 2020 12:16:38 -0800
Subject: [PATCH] Fix musl libc build issue
clif.h should include sys/types.h for the definition of pid_t. It fails
to compile when using musl libc.
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
---
include/clif.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/clif.h b/include/clif.h
index 648eedf..92f4fd8 100644
--- a/include/clif.h
+++ b/include/clif.h
@@ -32,6 +32,7 @@
#ifndef CLIF_H
#define CLIF_H
+#include <sys/types.h>
#include <sys/un.h>
#include "clif_sock.h"

View File

@@ -0,0 +1,29 @@
From eb14aa66dc0384071af401cced8c02993b55502e Mon Sep 17 00:00:00 2001
From: Jonathan Richardson <jonathan.richardson@broadcom.com>
Date: Wed, 26 Feb 2020 15:54:51 -0800
Subject: [PATCH] autotools: Add include path to generated version.h
When the build dir isn't the same as source dir it fails to compile
because the generated version.h from AC_CONFIG_FILES is always in build
dir. Include the path to it in AM_CPPFLAGS.
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
---
Makefile.am | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 0fb9bb0..2952019 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,9 @@ endif
AM_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR="\"${sysconfdir}\"" \
-D_FORTIFY_SOURCE=2
+# Required for the generated version.h when build dir is not the same as srcdir.
+AM_CPPFLAGS += -I${top_builddir}/include
+
ACLOCAL_AMFLAGS = -I m4
parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error

View File

@@ -0,0 +1,57 @@
From dc3f2250908587710f109c80ddf8a94f0bc40b82 Mon Sep 17 00:00:00 2001
From: Jonathan Richardson <jonathan.richardson@broadcom.com>
Date: Fri, 6 Apr 2018 10:49:04 -0700
Subject: [PATCH] autotools: Add option to disable installation of systemd conf
files
Add option to configure.ac to enable or disable install of systemd conf
files. If --with-systemdsystemunitdir is passed to configure then the
files will be installed to the provided directory. If the option isn't
provided then the value is determined from the systemd pkgconfig file,
if found in PKG_CONFIG_PATH.
This change is required because Makefile.am always installed the files
to a hard coded path that couldn't be changed.
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
---
Makefile.am | 3 ++-
configure.ac | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 292c0fd..0fb9bb0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -138,8 +138,9 @@ install-data-hook: installdirs-local
pkgconfigdir = ${libdir}/pkgconfig
pkgconfig_DATA = lldpad.pc liblldp_clif.pc
-systemdsystemunitdir = $(prefix)/lib/systemd/system
+if HAVE_SYSTEMD
dist_systemdsystemunit_DATA = lldpad.service lldpad.socket
+endif
bashcompletiondir = $(sysconfdir)/bash_completion.d
dist_bashcompletion_DATA = contrib/bash_completion/lldpad contrib/bash_completion/lldptool
diff --git a/configure.ac b/configure.ac
index 0667446..f75f433 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,15 @@ AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
+# Support for systemd unit files.
+AC_ARG_WITH([systemdsystemunitdir],
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+if test "x$with_systemdsystemunitdir" != xno; then
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
AC_CONFIG_FILES([Makefile include/version.h lldpad.spec lldpad.pc liblldp_clif.pc])
AC_CONFIG_MACRO_DIR([m4])
AC_OUTPUT

View File

@@ -0,0 +1,23 @@
From d88aae2230683517b6d5b62cced51da81317a722 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Aug 2022 22:37:14 -0700
Subject: [PATCH] clif: Include string.h for mem* function prototypes
Upstream-Status: Submitted [https://github.com/intel/openlldp/pull/86]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
clif.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clif.c b/clif.c
index cad6f75..0758a7e 100644
--- a/clif.c
+++ b/clif.c
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@@ -0,0 +1,32 @@
SUMMARY = "Open-LLDP"
DESCRIPTION = "Link Layer Discovery Protocol for Linux that includes support for DCBX"
HOMEPAGE = "http://open-lldp.org/start"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"
S = "${WORKDIR}/git"
inherit pkgconfig autotools
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}
DEPENDS = "libnl libconfig readline"
SRCREV = "85e55837a81d710e5baa7da47f7ed0d205c8ede5"
PV .= "+git${SRCPV}"
SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=branch-1.1 \
file://0001-Fix-musl-libc-build-issue.patch \
file://0001-autotools-Add-include-path-to-generated-version.h.patch \
file://0001-autotools-Add-option-to-disable-installation-of-syst.patch \
file://0004-clif-Include-string.h-for-mem-function-prototypes.patch \
"
# Enable install of systemd conf files.
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_system_unitdir}', '', d)}"
SYSTEMD_SERVICE:${PN} = "lldpad.service lldpad.socket"
# To enable service at boot set to enable in local.conf.
SYSTEMD_AUTO_ENABLE ?= "disable"
RRECOMMENDS:${PN} = "iproute2-tc"