summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-editors/atom/Manifest3
-rw-r--r--app-editors/atom/atom-1.5.4.ebuild87
-rw-r--r--app-editors/atom/files/atom-python.patch10
3 files changed, 100 insertions, 0 deletions
diff --git a/app-editors/atom/Manifest b/app-editors/atom/Manifest
new file mode 100644
index 0000000..9c2590d
--- /dev/null
+++ b/app-editors/atom/Manifest
@@ -0,0 +1,3 @@
+AUX atom-python.patch 235 SHA256 03a096473b16d457dd68c5259ca8f17a3f6986deade587241c50094ad3e957a5 SHA512 8470214969a1f299c637dfc96391c58eb5af77ba539a9c21e0fc133316284be6f04f7af6f5f40093106310e5140ba98f564459bc9b3b087040f7a2909e3abf4a WHIRLPOOL c359da8b5002e966894f3d736583a0676f75be8008d68931fcacc81c96bed8ddb5b4bc5b20aba6fca253b6ba6088b8b5d13280424ed8a188064375a6c02a05c1
+DIST 1.5.4.tar.gz 7899988 SHA256 7fc9bff949f2e02a4b71be1a9e15cc41b050cc3d3d2a19494f76d87e197725a7 SHA512 a32e390fbb952cb240072489d2c642667b923b9a652e3933acbe262ff393f9e9ce2f043513b48341a1ed50dc51366f1c48c2a2c47bb091deab9594be15739203 WHIRLPOOL b1c252874ac8929c8dae7345b0b497bd2e8ab23dcd21d221ddc2159b3c1d8c5fd41d8b3574e1c656b30852bfd6ad898b63019fe56a08d3c19970052e274228de
+EBUILD atom-1.5.4.ebuild 3072 SHA256 6c2435de93c7387aac531ccc373d579986af04258f9609712222eeb15696bd07 SHA512 7bd802456c7f57a5a48ca8b4f0c35fbe8b341d4e9ddea0d9f76f7a072edd2bb608b455d79a3c632fe2382edece1c01fa3f1252672c06ad96d3d8c65c95d42c8a WHIRLPOOL 94e677d6326a58249cd5d274ce40ccf9f57d09dcb3d83b6bfbf3799a313aa1bb747ccd16ca401245c02f2040f5605eda349afefce816cc84f622cd018af466a3
diff --git a/app-editors/atom/atom-1.5.4.ebuild b/app-editors/atom/atom-1.5.4.ebuild
new file mode 100644
index 0000000..65a5af6
--- /dev/null
+++ b/app-editors/atom/atom-1.5.4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic python-any-r1 eutils
+
+DESCRIPTION="A hackable text editor for the 21st Century"
+HOMEPAGE="https://atom.io"
+SRC_URI="https://github.com/atom/atom/archive/v${PV}.tar.gz -> ${PV}.tar.gz"
+RESTRICT="mirror"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ ${PYTHON_DEPS}
+ || ( net-libs/nodejs[npm] net-libs/iojs[npm] )
+ media-fonts/inconsolata
+ gnome-base/gconf
+ x11-libs/gtk+:2
+ gnome-base/libgnome-keyring
+ x11-libs/libnotify
+ x11-libs/libXtst
+ dev-libs/nss
+ media-libs/alsa-lib
+ net-print/cups
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+
+ npm config set python $PYTHON
+}
+
+src_prepare(){
+ epatch "${FILESDIR}/${PN}-python.patch"
+ sed -i -e "/exception-reporting/d" \
+ -e "/metrics/d" package.json
+ sed -e "s/<%= description %>/$pkgdesc/" \
+ -e "s|<%= installDir %>/share/<%= appFileName %>/atom|/usr/bin/atom|"\
+ -e "s|<%= iconPath %>|atom|"\
+ -e "s|<%= appName %>|Atom|" \
+ resources/linux/atom.desktop.in > resources/linux/Atom.desktop
+
+ # Fix atom location guessing
+ sed -i -e 's/ATOM_PATH="$USR_DIRECTORY\/share\/atom/ATOM_PATH="$USR_DIRECTORY\/../g' \
+ ./atom.sh \
+ || die "Fail fixing atom-shell directory"
+
+ # Make bootstrap process more verbose
+ sed -i -e 's@node script/bootstrap@node script/bootstrap --no-quiet@g' \
+ ./script/build \
+ || die "Fail fixing verbosity of script/build"
+}
+
+src_compile(){
+ if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then if ! ./script/build --verbose --build-dir "${T}"; then die "Build failed"; fi; fi; fi; fi; fi; fi; fi
+ "${T}/Atom/resources/app/apm/bin/apm" rebuild || die "Failed to rebuild native module"
+ echo "python = $PYTHON" >> "${T}/Atom/resources/app/apm/.apmrc"
+}
+
+src_install(){
+ insinto ${EPREFIX}/usr/share/${PN}
+ doins -r ${T}/Atom/*
+ insinto ${EPREFIX}/usr/share/applications
+ newins resources/linux/Atom.desktop atom.desktop
+ insinto ${EPREFIX}/usr/share/pixmaps
+ newins resources/app-icons/stable/png/128.png atom.png
+ insinto ${EPREFIX}/usr/share/licenses/${PN}
+ doins LICENSE.md
+ # Fixes permissions
+ fperms +x ${EPREFIX}/usr/share/${PN}/${PN}
+ fperms +x ${EPREFIX}/usr/share/${PN}/libgcrypt.so.11
+ fperms +x ${EPREFIX}/usr/share/${PN}/libnotify.so.4
+ fperms +x ${EPREFIX}/usr/share/${PN}/resources/app/atom.sh
+ fperms +x ${EPREFIX}/usr/share/${PN}/resources/app/apm/bin/apm
+ fperms +x ${EPREFIX}/usr/share/${PN}/resources/app/apm/bin/node
+ fperms +x ${EPREFIX}/usr/share/${PN}/resources/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp
+ # Symlinking to /usr/bin
+ dosym ${EPREFIX}/usr/share/${PN}/resources/app/atom.sh /usr/bin/atom
+ dosym ${EPREFIX}/usr/share/${PN}/resources/app/apm/bin/apm /usr/bin/apm
+}
diff --git a/app-editors/atom/files/atom-python.patch b/app-editors/atom/files/atom-python.patch
new file mode 100644
index 0000000..fc8c001
--- /dev/null
+++ b/app-editors/atom/files/atom-python.patch
@@ -0,0 +1,10 @@
+--- ~atom.sh 2015-10-30 11:41:20.090417736 +0100
++++ atom.sh 2015-10-30 11:42:19.707553644 +0100
+@@ -92,6 +92,7 @@
+ fi
+
+ ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
++ export PYTHON=python2
+ mkdir -p "$ATOM_HOME"
+
+ : ${TMPDIR:=/tmp}