Rename eselect-electron since it was masked in portage
This commit is contained in:
parent
54906a00d6
commit
3aed5bbea3
@ -12,12 +12,15 @@ SLOT="0"
|
|||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
IUSE=""
|
IUSE=""
|
||||||
|
|
||||||
DEPEND="app-admin/eselect"
|
DEPEND="
|
||||||
|
app-admin/eselect
|
||||||
|
!app-eselect/eselect-electron
|
||||||
|
"
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
S="${FILESDIR}"
|
S="${FILESDIR}"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
insinto /usr/share/eselect/modules
|
insinto /usr/share/eselect/modules
|
||||||
newins "${FILESDIR}"/electron-${PVR}.eselect electron.eselect
|
newins "${FILESDIR}"/electron-${PVR}-next.eselect electron.eselect
|
||||||
}
|
}
|
||||||
@ -1,23 +0,0 @@
|
|||||||
# Copyright 2019 rexy712
|
|
||||||
# Distributed under the terms of the GNU General Public License v3
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
DESCRIPTION="Manages versions of electron executables"
|
|
||||||
HOMEPAGE="https://www.gentoo.org/"
|
|
||||||
SRC_URI=""
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND="app-admin/eselect"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
S="${FILESDIR}"
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
insinto /usr/share/eselect/modules
|
|
||||||
newins "${FILESDIR}"/electron-${PVR}.eselect electron.eselect
|
|
||||||
}
|
|
||||||
@ -1,106 +0,0 @@
|
|||||||
inherit config multilib
|
|
||||||
|
|
||||||
DESCRIPTION="Manage electron versions"
|
|
||||||
MAINTAINER="rexerton.rexy@tutamail.com"
|
|
||||||
VERSION="2.2"
|
|
||||||
|
|
||||||
USR_PATH="${EROOT%/}/usr"
|
|
||||||
OPT_PATH="${EROOT%/}/opt"
|
|
||||||
|
|
||||||
active_slot() {
|
|
||||||
if [ -h "${USR_PATH}/bin/electron" ];then
|
|
||||||
readlink "${USR_PATH}/bin/electron" | xargs basename
|
|
||||||
else
|
|
||||||
echo "(none)"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
get_slots() {
|
|
||||||
local found_slots=()
|
|
||||||
for slot in $(find "${USR_PATH}/bin" -mindepth 1 -maxdepth 1 \( -type f -o -type l \) -regex "${USR_PATH}"'/bin/electron\(-bin\)?-[1-9][0-9.]+\(-r[1-9]+\)?$');do
|
|
||||||
[ -x "${slot}" ] && found_slots+=( "${slot##*/}" )
|
|
||||||
done
|
|
||||||
echo ${found_slots[@]}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe_list() {
|
|
||||||
echo "List available electron slots"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_list() {
|
|
||||||
write_list_start "Available electron slots"
|
|
||||||
if $(is_output_mode brief);then
|
|
||||||
echo $(get_slots)
|
|
||||||
else
|
|
||||||
i=1
|
|
||||||
for slot in $(get_slots);do
|
|
||||||
case "${slot}" in
|
|
||||||
"$(active_slot)" )
|
|
||||||
write_kv_list_entry "$i) $(highlight_marker ${slot})";;
|
|
||||||
*)
|
|
||||||
write_kv_list_entry "$i) ${slot}";;
|
|
||||||
esac
|
|
||||||
i=$((i+1))
|
|
||||||
done
|
|
||||||
[ -z "$(get_slots)" ] && write_warning_msg "No slots available."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
describe_show() {
|
|
||||||
echo "Get active slot"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_show() {
|
|
||||||
echo "$(active_slot)"
|
|
||||||
}
|
|
||||||
|
|
||||||
describe_set() {
|
|
||||||
echo "Set the symlink for the electron application"
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_symlinks() {
|
|
||||||
local version_name="$1"
|
|
||||||
local libdir="$(get_libdir)"
|
|
||||||
[ -h "${USR_PATH}/bin/electron" ] && rm "${USR_PATH}/bin/electron"
|
|
||||||
ln -sf "${USR_PATH}/bin/${version_name}" "${USR_PATH}/bin/electron" || die
|
|
||||||
if [ -d "${USR_PATH}/${libdir}/${version_name}" ];then
|
|
||||||
[ -h "${USR_PATH}/${libdir}/electron" ] && rm "${USR_PATH}/${libdir}/electron"
|
|
||||||
ln -sf "${USR_PATH}/${libdir}/${version_name}" "${USR_PATH}/${libdir}/electron" || die
|
|
||||||
elif [ -d "${OPT_PATH}/electron/${version_name}" ];then
|
|
||||||
[ -h "${USR_PATH}/${libdir}/electron" ] && rm "${USR_PATH}/${libdir}/electron"
|
|
||||||
ln -sf "${OPT_PATH}/electron/${version_name}" "${USR_PATH}/${libdir}/electron" || die
|
|
||||||
elif [ -h "${USR_PATH}/${libdir}/electron" ];then
|
|
||||||
rm "${USR_PATH}/${libdir}/electron"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "${USR_PATH}/include/${version_name}" ];then
|
|
||||||
[ -h "${USR_PATH}/include/electron" ] && rm "${USR_PATH}/include/electron"
|
|
||||||
ln -sf "${USR_PATH}/include/${version_name}" "${USR_PATH}/include/electron" || die
|
|
||||||
elif [ -h "${USR_PATH}/include/electron" ];then
|
|
||||||
rm "${USR_PATH}/include/electron"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
do_set() {
|
|
||||||
local selected="$1"
|
|
||||||
if [ -e "${USR_PATH}/bin/${selected}" ] && [[ "${selected}" =~ ^electron(-bin)?-[1-9][0-9.]+(-r[1-9]+)? ]];then
|
|
||||||
_create_symlinks "${selected}"
|
|
||||||
return
|
|
||||||
elif [[ "${selected}" =~ ^[1-9][0-9]*$ ]];then
|
|
||||||
slots=( $(get_slots) )
|
|
||||||
if [ "${selected}" -le ${#slots[@]} ];then
|
|
||||||
_create_symlinks "${slots[$((selected-1))]}"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
die -q "Not a valid slot"
|
|
||||||
}
|
|
||||||
describe_unset() {
|
|
||||||
echo "Remove electron symlinks"
|
|
||||||
}
|
|
||||||
do_unset() {
|
|
||||||
[ -h "${USR_PATH}/bin/electron" ] && rm "${USR_PATH}/bin/electron"
|
|
||||||
[ -h "${USR_PATH}/$(get_libdir)/electron" ] && rm "${USR_PATH}/$(get_libdir)/electron"
|
|
||||||
[ -h "${USR_PATH}/include/electron" ] && rm "${USR_PATH}/include/electron"
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -51,10 +51,11 @@ RDEPEND="
|
|||||||
x11-libs/libXScrnSaver
|
x11-libs/libXScrnSaver
|
||||||
x11-libs/libXtst
|
x11-libs/libXtst
|
||||||
x11-libs/pango
|
x11-libs/pango
|
||||||
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}"
|
S="${WORKDIR}"
|
||||||
|
|||||||
@ -51,10 +51,11 @@ RDEPEND="
|
|||||||
x11-libs/libXScrnSaver
|
x11-libs/libXScrnSaver
|
||||||
x11-libs/libXtst
|
x11-libs/libXtst
|
||||||
x11-libs/pango
|
x11-libs/pango
|
||||||
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}"
|
S="${WORKDIR}"
|
||||||
|
|||||||
@ -51,10 +51,11 @@ RDEPEND="
|
|||||||
x11-libs/libXScrnSaver
|
x11-libs/libXScrnSaver
|
||||||
x11-libs/libXtst
|
x11-libs/libXtst
|
||||||
x11-libs/pango
|
x11-libs/pango
|
||||||
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}"
|
S="${WORKDIR}"
|
||||||
|
|||||||
@ -51,10 +51,11 @@ RDEPEND="
|
|||||||
x11-libs/libXScrnSaver
|
x11-libs/libXScrnSaver
|
||||||
x11-libs/libXtst
|
x11-libs/libXtst
|
||||||
x11-libs/pango
|
x11-libs/pango
|
||||||
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}"
|
S="${WORKDIR}"
|
||||||
|
|||||||
@ -51,10 +51,11 @@ RDEPEND="
|
|||||||
x11-libs/libXScrnSaver
|
x11-libs/libXScrnSaver
|
||||||
x11-libs/libXtst
|
x11-libs/libXtst
|
||||||
x11-libs/pango
|
x11-libs/pango
|
||||||
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}"
|
S="${WORKDIR}"
|
||||||
|
|||||||
@ -33,7 +33,7 @@ RESTRICT="
|
|||||||
|
|
||||||
#DEPS
|
#DEPS
|
||||||
COMMON_DEPEND="
|
COMMON_DEPEND="
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-|eselect/eselect-electron-next-2.2
|
||||||
cups? ( >=net-print/cups-2.2:= )
|
cups? ( >=net-print/cups-2.2:= )
|
||||||
dev-libs/expat:=
|
dev-libs/expat:=
|
||||||
dev-libs/glib:2
|
dev-libs/glib:2
|
||||||
|
|||||||
@ -33,7 +33,7 @@ RESTRICT="
|
|||||||
|
|
||||||
#DEPS
|
#DEPS
|
||||||
COMMON_DEPEND="
|
COMMON_DEPEND="
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
cups? ( >=net-print/cups-2.2:= )
|
cups? ( >=net-print/cups-2.2:= )
|
||||||
dev-libs/expat:=
|
dev-libs/expat:=
|
||||||
dev-libs/glib:2
|
dev-libs/glib:2
|
||||||
|
|||||||
@ -33,7 +33,7 @@ RESTRICT="
|
|||||||
|
|
||||||
#DEPS
|
#DEPS
|
||||||
COMMON_DEPEND="
|
COMMON_DEPEND="
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
cups? ( >=net-print/cups-2.2:= )
|
cups? ( >=net-print/cups-2.2:= )
|
||||||
dev-libs/expat:=
|
dev-libs/expat:=
|
||||||
dev-libs/glib:2
|
dev-libs/glib:2
|
||||||
|
|||||||
@ -33,7 +33,7 @@ RESTRICT="
|
|||||||
|
|
||||||
#DEPS
|
#DEPS
|
||||||
COMMON_DEPEND="
|
COMMON_DEPEND="
|
||||||
>=app-eselect/eselect-electron-2.2
|
>=app-eselect/eselect-electron-next-2.2
|
||||||
cups? ( >=net-print/cups-2.2:= )
|
cups? ( >=net-print/cups-2.2:= )
|
||||||
dev-libs/expat:=
|
dev-libs/expat:=
|
||||||
dev-libs/glib:2
|
dev-libs/glib:2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user