From d823ffc6c0b74802f00717a79ea0c7e8b95c51e6 Mon Sep 17 00:00:00 2001 From: Tom Jones Date: Mon, 5 Feb 2024 09:50:00 +0000 Subject: [PATCH] build: Add FreeBSD install-dep support Type: improvement Change-Id: I265ea61844bebdf086442fb334de20c1909a6683 Signed-off-by: Tom Jones --- Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 72d2ba5a1bc..3144905f3f3 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,8 @@ ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID)) PKG=deb else ifeq ($(filter rhel centos fedora opensuse-leap rocky almalinux,$(OS_ID)),$(OS_ID)) PKG=rpm +else ifeq ($(filter freebsd,$(OS_ID)),$(OS_ID)) +PKG=pkg endif # +libganglia1-dev if building the gmond plugin @@ -221,6 +223,18 @@ endif RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS) +# FreeBSD build and test dependancies + +FBSD_PY_PRE=py311 + +FBSD_TEST_DEPS = setsid rust $(FBSD_PY_PRE)-pyshark +FBSD_PYTHON_DEPS = python3 $(FBSD_PY_PRE)-pyelftools $(FBSD_PY_PRE)-ply +FBSD_DEVEL_DEPS = cscope gdb +FBSD_BUILD_DEPS = bash gmake sudo +FBSD_BUILD_DEPS += git sudo autoconf automake curl gsed +FBSD_BUILD_DEPS += pkgconf ninja cmake libepoll-shim jansson +FBSD_DEPS = $(FBSD_BUILD_DEPS) $(FBSD_PYTHON_DEPS) $(FBSD_TEST_DEPS) $(FBSD_DEVEL_DEPS) + ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),) STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf endif @@ -391,8 +405,10 @@ endif else ifeq ($(filter opensuse-leap-15.3 opensuse-leap-15.4 ,$(OS_ID)-$(OS_VERSION_ID)),$(OS_ID)-$(OS_VERSION_ID)) @sudo -E zypper refresh @sudo -E zypper install -y $(RPM_SUSE_DEPENDS) +else ifeq ($(OS_ID), freebsd) + @sudo pkg install -y $(FBSD_DEPS) else - $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE-leap systems") + $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS, openSUSE-leap or FreeBSD systems") endif git config commit.template .git_commit_template.txt