From 6196a89ec2cf975251afe763b3bb8c9848dab07c Mon Sep 17 00:00:00 2001 From: rexy712 Date: Fri, 25 Oct 2019 15:13:25 -0700 Subject: [PATCH] Add use flags to riot-web --- net-im/riot-web/metadata.xml | 3 +++ net-im/riot-web/riot-web-1.4.0-r2.ebuild | 12 +++++++++--- net-im/riot-web/riot-web-1.4.2.ebuild | 12 +++++++++--- net-im/riot-web/riot-web-1.5.0.ebuild | 12 +++++++++--- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/net-im/riot-web/metadata.xml b/net-im/riot-web/metadata.xml index bf1b2db..9134b46 100644 --- a/net-im/riot-web/metadata.xml +++ b/net-im/riot-web/metadata.xml @@ -14,6 +14,9 @@ Include support for rendering emoji Use http_proxy environment variable with `yarn install` + Use riot.im's dark mode by default + Enable use of riot.im's labs settings + Copy the config.json file from a previous install instead of the default one diff --git a/net-im/riot-web/riot-web-1.4.0-r2.ebuild b/net-im/riot-web/riot-web-1.4.0-r2.ebuild index 65df876..834c4bf 100644 --- a/net-im/riot-web/riot-web-1.4.0-r2.ebuild +++ b/net-im/riot-web/riot-web-1.4.0-r2.ebuild @@ -21,7 +21,7 @@ KEYWORDS="~amd64" LICENSE="Apache-2.0" SLOT="0" -IUSE="+emoji proxy" +IUSE="+emoji proxy +darkmode +labs +savedconfig" REQUIRED_USE="" RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work @@ -75,13 +75,19 @@ src_prepare() { fi if [[ "${PV}" == "9999" ]]; then - "${S}"/scripts/fetch-develop.deps.sh + if use "proxy";then + "${S}"/scripts/fetch-develop.deps.sh + else + http_proxy="" "${S}"/scripts/fetch-develop.deps.sh + fi fi - if [ -e "${DESTINATION}/config.json" ];then + if [ -e "${DESTINATION}/config.json" ] && use savedconfig;then cp "${DESTINATION}/config.json" "${S}"/config.json else cp "${S}"/config.sample.json "${S}"/config.json + use "darkmode" && sed -e 's/^\([[:space:]]*"default_theme":[[:space:]]*\)"light"/\1"dark"/' "${S}"/config.json -i + use "labs" && sed -e 's/^\([[:space:]]*"showLabsSettings":[[:space:]]*\)false/\1true/' "${S}"/config.json -i fi } diff --git a/net-im/riot-web/riot-web-1.4.2.ebuild b/net-im/riot-web/riot-web-1.4.2.ebuild index 65df876..834c4bf 100644 --- a/net-im/riot-web/riot-web-1.4.2.ebuild +++ b/net-im/riot-web/riot-web-1.4.2.ebuild @@ -21,7 +21,7 @@ KEYWORDS="~amd64" LICENSE="Apache-2.0" SLOT="0" -IUSE="+emoji proxy" +IUSE="+emoji proxy +darkmode +labs +savedconfig" REQUIRED_USE="" RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work @@ -75,13 +75,19 @@ src_prepare() { fi if [[ "${PV}" == "9999" ]]; then - "${S}"/scripts/fetch-develop.deps.sh + if use "proxy";then + "${S}"/scripts/fetch-develop.deps.sh + else + http_proxy="" "${S}"/scripts/fetch-develop.deps.sh + fi fi - if [ -e "${DESTINATION}/config.json" ];then + if [ -e "${DESTINATION}/config.json" ] && use savedconfig;then cp "${DESTINATION}/config.json" "${S}"/config.json else cp "${S}"/config.sample.json "${S}"/config.json + use "darkmode" && sed -e 's/^\([[:space:]]*"default_theme":[[:space:]]*\)"light"/\1"dark"/' "${S}"/config.json -i + use "labs" && sed -e 's/^\([[:space:]]*"showLabsSettings":[[:space:]]*\)false/\1true/' "${S}"/config.json -i fi } diff --git a/net-im/riot-web/riot-web-1.5.0.ebuild b/net-im/riot-web/riot-web-1.5.0.ebuild index 65df876..834c4bf 100644 --- a/net-im/riot-web/riot-web-1.5.0.ebuild +++ b/net-im/riot-web/riot-web-1.5.0.ebuild @@ -21,7 +21,7 @@ KEYWORDS="~amd64" LICENSE="Apache-2.0" SLOT="0" -IUSE="+emoji proxy" +IUSE="+emoji proxy +darkmode +labs +savedconfig" REQUIRED_USE="" RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work @@ -75,13 +75,19 @@ src_prepare() { fi if [[ "${PV}" == "9999" ]]; then - "${S}"/scripts/fetch-develop.deps.sh + if use "proxy";then + "${S}"/scripts/fetch-develop.deps.sh + else + http_proxy="" "${S}"/scripts/fetch-develop.deps.sh + fi fi - if [ -e "${DESTINATION}/config.json" ];then + if [ -e "${DESTINATION}/config.json" ] && use savedconfig;then cp "${DESTINATION}/config.json" "${S}"/config.json else cp "${S}"/config.sample.json "${S}"/config.json + use "darkmode" && sed -e 's/^\([[:space:]]*"default_theme":[[:space:]]*\)"light"/\1"dark"/' "${S}"/config.json -i + use "labs" && sed -e 's/^\([[:space:]]*"showLabsSettings":[[:space:]]*\)false/\1true/' "${S}"/config.json -i fi }