48 lines
1021 B
Bash
48 lines
1021 B
Bash
# Copyright 2019 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
DESCRIPTION="Visual Studio Code https://code.visualstudio.com"
|
|
HOMEPAGE="https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run"
|
|
SRC_URI="https://github.com/Microsoft/${PN}/archive/${PV}.tar.gz"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
IUSE=""
|
|
|
|
DEPEND="=net-libs/nodejs-10.15.3[npm]
|
|
=dev-lang/python-2.7.16"
|
|
RDEPEND="${DEPEND}"
|
|
BDEPEND=">=sys-apps/yarn-1.15.2"
|
|
|
|
PATCHES=(
|
|
"files/gentoo-vscode.patch"
|
|
)
|
|
|
|
src_unpack() {
|
|
unpack ${A}
|
|
cd "${S}"
|
|
epatch "files/gentoo-vscode.patch"
|
|
}
|
|
|
|
src_compile() {
|
|
yarn
|
|
yarn watch
|
|
}
|
|
|
|
src_install() {
|
|
insinto /usr/share/code
|
|
doins -r .
|
|
insinto /usr/share/applications
|
|
#sed -i "s|/usr/share/@@NAME@@/@@NAME@@|@@NAME@@|g
|
|
# s|@@NAME_SHORT@@|Code|g
|
|
# s|@@NAME_LONG@@|Code|g
|
|
# s|@@NAME@@|code|g
|
|
# s|@@ICON@@|code|g
|
|
# s|@@LICENSE@@|MIT|g
|
|
# s|inode/directory;||" resources/linux/code.{appdata.xml,desktop}
|
|
doins resources/linux/code.desktop
|
|
}
|