Add use flags to riot-web
This commit is contained in:
parent
c046d3054c
commit
6196a89ec2
@ -14,6 +14,9 @@
|
||||
<use>
|
||||
<flag name="emoji">Include support for rendering emoji</flag>
|
||||
<flag name="proxy">Use http_proxy environment variable with `yarn install`</flag>
|
||||
<flag name="darkmode">Use riot.im's dark mode by default</flag>
|
||||
<flag name="labs">Enable use of riot.im's labs settings</flag>
|
||||
<flag name="savedconfig">Copy the config.json file from a previous install instead of the default one</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user