aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Scardovi <marco@scardovi.com>2021-04-09 13:47:06 +0200
committerMarco Scardovi <marco@scardovi.com>2021-04-09 13:47:06 +0200
commit6f52923f835ed363908c0137239ee914b364a393 (patch)
tree99f8e141a8e901c51930f2bc48f3cbfc424330e7 /app-editors
parentnet-p2p/lbry: version bump 0.50.2 (diff)
downloadguru-6f52923f835ed363908c0137239ee914b364a393.tar.gz
guru-6f52923f835ed363908c0137239ee914b364a393.tar.bz2
guru-6f52923f835ed363908c0137239ee914b364a393.zip
app-editors/atom-bin: add support for nodejs
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Marco Scardovi <marco@scardovi.com>
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/atom-bin/atom-bin-1.55.0-r3.ebuild82
-rw-r--r--app-editors/atom-bin/metadata.xml3
2 files changed, 85 insertions, 0 deletions
diff --git a/app-editors/atom-bin/atom-bin-1.55.0-r3.ebuild b/app-editors/atom-bin/atom-bin-1.55.0-r3.ebuild
new file mode 100644
index 000000000..597648524
--- /dev/null
+++ b/app-editors/atom-bin/atom-bin-1.55.0-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop xdg
+
+DESCRIPTION="A hackable text editor for the 21st Century"
+HOMEPAGE="https://atom.io/"
+SRC_URI="https://github.com/atom/atom/releases/download/v${PV}/atom-amd64.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="alsa cups nodejs ssl test X"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/atom-${PV}-amd64"
+
+RDEPEND="
+ app-accessibility/at-spi2-atk
+ app-accessibility/at-spi2-core
+ app-crypt/libsecret
+ dev-libs/atk
+ dev-libs/nss
+ dev-vcs/git
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ nodejs? ( net-libs/nodejs[npm] )
+ ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+
+ x11-libs/libnotify
+ x11-libs/libX11
+ x11-libs/libxcb
+ x11-libs/libXcomposite
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libxkbfile
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXScrnSaver
+ x11-libs/libXtst
+ x11-libs/pango
+ )
+"
+
+QA_PREBUILT="/opt/atom-bin/*"
+QA_PRESTRIPPED="/opt/atom-bin/resources/*" # Files are already stripped
+
+DOCS=( resources/LICENSE.md )
+src_prepare(){
+ default
+}
+
+src_install(){
+ insinto /opt/"${PN}"
+ doins -r "${S}"/*
+ dosym ../../opt/"${PN}"/atom "${EPREFIX}"/usr/bin/atom
+ fperms +x /opt/"${PN}"/atom
+ if use nodejs; then
+ rm resources/app/apm/bin/npm
+ rm resources/app/apm/BUNDLED_NODE_VERSION
+ #Fix apm to use nodejs binary
+ sed -i "s#\$binDir\/\$nodeBin#\$\(which \$nodeBin\)#" resources/app/apm/bin/apm
+ else
+ fperms +x /opt/"${PN}"/resources/app/apm/bin/npm
+ fi
+ fperms +x /opt/"${PN}"/resources/app/apm/bin/node
+ fperms +x /opt/"${PN}"/resources/app/apm/bin/apm
+ make_desktop_entry /opt/${PN}/atom Atom atom Utility
+ doicon atom.png
+
+ einstalldocs
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/app-editors/atom-bin/metadata.xml b/app-editors/atom-bin/metadata.xml
index a0b29038e..ada38d070 100644
--- a/app-editors/atom-bin/metadata.xml
+++ b/app-editors/atom-bin/metadata.xml
@@ -8,4 +8,7 @@
<upstream>
<remote-id type="github">atom/atom</remote-id>
</upstream>
+ <use>
+ <flag name="nodejs">Enable nodejs support in USE</flag>
+ </use>
</pkgmetadata>