package/sysrepo: bump to version 1.3.21

This sysrepo version is a complete rewrite of the older versions.

Thus several changes are made in the package to support this new version.

- several cmake config options dropped
- no systemd service scripts availble in upstream version
- no sysrepod daemon available
- drop patches that are no longer needed
- add new patch

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index f693ff7..5f87ac3 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SYSREPO_VERSION = 0.7.8
+SYSREPO_VERSION = 1.3.21
 SYSREPO_SITE = $(call github,sysrepo,sysrepo,v$(SYSREPO_VERSION))
 SYSREPO_INSTALL_STAGING = YES
 SYSREPO_LICENSE = Apache-2.0
@@ -13,45 +13,22 @@
 HOST_SYSREPO_DEPENDENCIES = host-libev host-libavl host-libyang host-pcre host-protobuf-c
 
 SYSREPO_CONF_OPTS = \
-	-DIS_DEVELOPER_CONFIGURATION=OFF \
-	-DGEN_PYTHON2_TESTS=OFF \
-	-DENABLE_TESTS=OFF \
-	-DGEN_CPP_BINDINGS=OFF \
-	-DGEN_LANGUAGE_BINDINGS=OFF \
-	-DGEN_PYTHON_BINDINGS=OFF \
-	-DBUILD_CPP_EXAMPLES=OFF \
-	-DCALL_SYSREPOCTL_BIN=$(HOST_DIR)/bin/sysrepoctl \
-	-DCALL_SYSREPOCFG_BIN=$(HOST_DIR)/bin/sysrepocfg \
-	-DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF) \
-	$(if $(BR2_INIT_SYSTEMD),-DWITH_SYSTEMD=ON) \
-	$(if $(BR2_INIT_SYSTEMD),-DSYSTEMD_UNIT_DIR=/usr/lib/systemd/system)
-
-# On ARM, this is needed to prevent unaligned memory access with an optimized
-# build .. https://github.com/sysrepo/sysrepo/issues/947
-SYSREPO_CONF_OPTS += -DUSE_SR_MEM_MGMT=OFF
+	-DCMAKE_BUILD_TYPE=Release \
+	-DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF)
 
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 SYSREPO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
 endif
 
 define SYSREPO_INSTALL_INIT_SYSV
-	$(INSTALL) -m 755 -D package/sysrepo/S50sysrepod \
-		$(TARGET_DIR)/etc/init.d/S50sysrepod
 	$(INSTALL) -m 755 -D package/sysrepo/S51sysrepo-plugind \
 		$(TARGET_DIR)/etc/init.d/S51sysrepo-plugind
 endef
 
 HOST_SYSREPO_CONF_OPTS = \
-	-DGEN_PYTHON2_TESTS=OFF \
-	-DENABLE_TESTS=OFF \
-	-DGEN_CPP_BINDINGS=OFF \
-	-DGEN_LANGUAGE_BINDINGS=OFF \
-	-DGEN_PYTHON_BINDINGS=OFF \
-	-DCALL_TARGET_BINS_DIRECTLY=OFF \
+	-DCMAKE_BUILD_TYPE=Release \
 	-DBUILD_EXAMPLES=OFF \
-	-DBUILD_CPP_EXAMPLES=OFF \
-	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
-	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-subscriptions
+	-DREPO_PATH=$(TARGET_DIR)/etc/sysrepo
 
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))