From patchwork Sun Jun 30 14:05:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1124901 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45cC2q3nG5z9s3C for ; Mon, 1 Jul 2019 00:05:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E946E86322; Sun, 30 Jun 2019 14:05:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QIjZEpG2CoM1; Sun, 30 Jun 2019 14:05:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6FE048633E; Sun, 30 Jun 2019 14:05:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1F96D1BF336 for ; Sun, 30 Jun 2019 14:05:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0E029854E5 for ; Sun, 30 Jun 2019 14:05:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 51_SvBu7BJt5 for ; Sun, 30 Jun 2019 14:05:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout06.t-online.de (mailout06.t-online.de [194.25.134.19]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E8862855A1 for ; Sun, 30 Jun 2019 14:05:43 +0000 (UTC) Received: from fwd24.aul.t-online.de (fwd24.aul.t-online.de [172.20.26.129]) by mailout06.t-online.de (Postfix) with SMTP id 2F60141D958E for ; Sun, 30 Jun 2019 16:05:42 +0200 (CEST) Received: from fli4l.lan.fli4l (b7hBZEZHYhByq0goqzmx8wW9QAu35NZxCFZNvS0mTFaXO016phwKeRTybUxuVrXZnj@[91.58.12.45]) by fwd24.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1hhaSR-1jQtgO0; Sun, 30 Jun 2019 16:05:31 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:48398) by fli4l.lan.fli4l with esmtp (Exim 4.92) (envelope-from ) id 1hhaSQ-0001eG-Fi for buildroot@buildroot.org; Sun, 30 Jun 2019 16:05:31 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 30 Jun 2019 16:05:04 +0200 Message-Id: <20190630140525.6537-11-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190630140525.6537-1-bernd.kuhls@t-online.de> References: <20190630140525.6537-1-bernd.kuhls@t-online.de> MIME-Version: 1.0 X-ID: b7hBZEZHYhByq0goqzmx8wW9QAu35NZxCFZNvS0mTFaXO016phwKeRTybUxuVrXZnj X-TOI-MSGID: ebbd732c-3796-4984-8b0e-e346f80fda9d Subject: [Buildroot] [PATCH 10/31] package/kodi: add Kconfig options to remove default skins X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The skins estuary and estouchy are new in Kodi 17-Krypton and replace the skin confluence, used until Kodi 16-Jarvis. This patch allows to disable one or both of the new skins, it also takes care that at least one skin needs to be enabled. With this patch Kodi can be used only with skin confluence. Signed-off-by: Bernd Kuhls --- package/kodi-skin-confluence/Config.in | 1 + package/kodi/Config.in | 35 ++++++++++++++++ package/kodi/kodi.mk | 58 ++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) diff --git a/package/kodi-skin-confluence/Config.in b/package/kodi-skin-confluence/Config.in index 08b6568083..a623b03dab 100644 --- a/package/kodi-skin-confluence/Config.in +++ b/package/kodi-skin-confluence/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_KODI_SKIN_CONFLUENCE bool "kodi-skin-confluence" + select BR2_PACKAGE_KODI_SKIN_ENABLED help Kodi confluence skin diff --git a/package/kodi/Config.in b/package/kodi/Config.in index edda795dd8..4178f67596 100644 --- a/package/kodi/Config.in +++ b/package/kodi/Config.in @@ -64,6 +64,7 @@ menuconfig BR2_PACKAGE_KODI select BR2_PACKAGE_FONTCONFIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_KODI_SKIN_ESTUARY if !BR2_PACKAGE_KODI_SKIN_ENABLED select BR2_PACKAGE_LIBASS select BR2_PACKAGE_LIBCDIO select BR2_PACKAGE_LIBCROSSGUID @@ -360,6 +361,40 @@ menu "Screensavers" endmenu menu "Skins" + +config BR2_PACKAGE_KODI_SKIN_ENABLED + bool + +choice + prompt "Default skin" + +config BR2_PACKAGE_KODI_SKIN_DEFAULT_ESTUARY + bool "kodi-skin-estuary" + depends on BR2_PACKAGE_KODI_SKIN_ESTUARY + +config BR2_PACKAGE_KODI_SKIN_DEFAULT_ESTOUCHY + bool "kodi-skin-estouchy" + depends on BR2_PACKAGE_KODI_SKIN_ESTOUCHY + +config BR2_PACKAGE_KODI_SKIN_DEFAULT_CONFLUENCE + bool "kodi-skin-confluence" + depends on BR2_PACKAGE_KODI_SKIN_CONFLUENCE + +endchoice + +config BR2_PACKAGE_KODI_SKIN_ESTUARY + bool "kodi-skin-estuary" + default y + help + Default skin Estuary + +config BR2_PACKAGE_KODI_SKIN_ESTOUCHY + bool "kodi-skin-estouchy" + default y + select BR2_PACKAGE_KODI_SKIN_ENABLED + help + Default skin Estouchy + source "package/kodi-skin-confluence/Config.in" endmenu diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk index 590af15b7c..a123671333 100644 --- a/package/kodi/kodi.mk +++ b/package/kodi/kodi.mk @@ -381,6 +381,64 @@ define KODI_CLEAN_UNUSED_ADDONS endef KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_UNUSED_ADDONS +# Skins estuary and estouchy are installed by default and need to be +# removed if they are disabled in buildroot +ifeq ($(BR2_PACKAGE_KODI_SKIN_ESTUARY),y) +define KODI_CLEAN_SKIN_ESTUARY + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estuary/media -name *.gif -delete + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estuary/media -name *.jpg -delete + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estuary/media -name *.png -delete +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_SKIN_ESTUARY +else +define KODI_REMOVE_SKIN_ESTUARY + rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/skin.estuary + $(HOST_DIR)/usr/bin/xml ed -L \ + -d "/addons/addon[text()='skin.estuary']" \ + $(KODI_ADDON_MANIFEST) +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_REMOVE_SKIN_ESTUARY +endif + +ifeq ($(BR2_PACKAGE_KODI_SKIN_ESTOUCHY),y) +define KODI_CLEAN_SKIN_ESTOUCHY + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estouchy/media -name *.gif -delete + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estouchy/media -name *.jpg -delete + find $(TARGET_DIR)/usr/share/kodi/addons/skin.estouchy/media -name *.png -delete +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_SKIN_ESTOUCHY +else +define KODI_REMOVE_SKIN_ESTOUCHY + rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/skin.estouchy + $(HOST_DIR)/usr/bin/xml ed -L \ + -d "/addons/addon[text()='skin.estouchy']" \ + $(KODI_ADDON_MANIFEST) +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_REMOVE_SKIN_ESTOUCHY +endif + +# The default value 'skin.estuary' is stored in +# xbmc/system/settings/settings.xml. +# If skin estuary is disabled this value needs to be changed to avoid +# https://github.com/xbmc/xbmc/blob/32a6916059a0b14ab5fc65cedb17b2615c039918/xbmc/Application.cpp#L1124 + +define KODI_SET_DEFAULT_SKIN_ESTOUCHY + $(SED) 's/skin.estuary/skin.estouchy/#g' $(TARGET_DIR)/usr/share/kodi/system/settings/settings.xml +endef + +define KODI_SET_DEFAULT_SKIN_CONFLUENCE + $(SED) 's/skin.estuary/skin.confluence/#g' $(TARGET_DIR)/usr/share/kodi/system/settings/settings.xml + $(HOST_DIR)/usr/bin/xml ed -L -O --subnode "/addons" \ + -t elem -n "addon" -v "skin.confluence" \ + $(KODI_ADDON_MANIFEST) +endef + +ifeq ($(BR2_PACKAGE_KODI_SKIN_DEFAULT_ESTOUCHY),y) +KODI_POST_INSTALL_TARGET_HOOKS += KODI_SET_DEFAULT_SKIN_ESTOUCHY +else ifeq ($(BR2_PACKAGE_KODI_SKIN_DEFAULT_CONFLUENCE),y) +KODI_POST_INSTALL_TARGET_HOOKS += KODI_SET_DEFAULT_SKIN_CONFLUENCE +endif + define KODI_INSTALL_BR_WRAPPER $(INSTALL) -D -m 0755 package/kodi/br-kodi \ $(TARGET_DIR)/usr/bin/br-kodi