From patchwork Fri Feb 3 16:20:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 723793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vFMd7658Fz9s76 for ; Sat, 4 Feb 2017 03:24:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EE395A4DBF; Fri, 3 Feb 2017 16:24:02 +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 nvO_gBcm-ecq; Fri, 3 Feb 2017 16:23:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6FEA9A4DDA; Fri, 3 Feb 2017 16:22:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7576B1C0328 for ; Fri, 3 Feb 2017 16:21:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 72FC622DBF for ; Fri, 3 Feb 2017 16:21:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sNr8StbqVM7e for ; Fri, 3 Feb 2017 16:21:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout11.t-online.de (mailout11.t-online.de [194.25.134.85]) by silver.osuosl.org (Postfix) with ESMTPS id C42E322DB2 for ; Fri, 3 Feb 2017 16:21:52 +0000 (UTC) Received: from fwd02.aul.t-online.de (fwd02.aul.t-online.de [172.20.26.148]) by mailout11.t-online.de (Postfix) with SMTP id 5A3794274C93 for ; Fri, 3 Feb 2017 17:21:51 +0100 (CET) Received: from fli4l.lan.fli4l (SPW-Q8ZJZhYqSiM3C0VxfxsTjY9zU9Zzh3Za0HrxHxU02+tnMmw2n9pL0pqpb4OwcN@[84.178.251.221]) by fwd02.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1cZgcL-2sCn680; Fri, 3 Feb 2017 17:21:45 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:33064 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.88) (envelope-from ) id 1cZgbc-0000dh-EP for buildroot@buildroot.org; Fri, 03 Feb 2017 17:21:01 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Fri, 3 Feb 2017 17:20:30 +0100 Message-Id: <20170203162032.2923-37-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170203162032.2923-1-bernd.kuhls@t-online.de> References: <20170203162032.2923-1-bernd.kuhls@t-online.de> X-ID: SPW-Q8ZJZhYqSiM3C0VxfxsTjY9zU9Zzh3Za0HrxHxU02+tnMmw2n9pL0pqpb4OwcN X-TOI-MSGID: deeb7392-a568-4322-83ab-cfac64e41441 Subject: [Buildroot] [PATCH v2 36/38] package/kodi: add Kconfig options to remove default skins X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 08b656808..a623b03da 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 6a9348ac1..40b9cfb36 100644 --- a/package/kodi/Config.in +++ b/package/kodi/Config.in @@ -63,6 +63,7 @@ menuconfig BR2_PACKAGE_KODI select BR2_PACKAGE_FFMPEG_SWSCALE select BR2_PACKAGE_FONTCONFIG select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_KODI_SKIN_ESTUARY if !BR2_PACKAGE_KODI_SKIN_ENABLED select BR2_PACKAGE_LIBASS select BR2_PACKAGE_LIBCDIO select BR2_PACKAGE_LIBCROSSGUID @@ -323,6 +324,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 ccf6c3a3e..d86ac6d36 100644 --- a/package/kodi/kodi.mk +++ b/package/kodi/kodi.mk @@ -303,6 +303,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