Adding app-editors/atom, fixes for building on hardened
This commit is contained in:
parent
59844fc7ef
commit
263423c683
3
app-editors/atom/Manifest
Normal file
3
app-editors/atom/Manifest
Normal file
@ -0,0 +1,3 @@
|
||||
AUX atom-python.patch 235 SHA256 03a096473b16d457dd68c5259ca8f17a3f6986deade587241c50094ad3e957a5 SHA512 8470214969a1f299c637dfc96391c58eb5af77ba539a9c21e0fc133316284be6f04f7af6f5f40093106310e5140ba98f564459bc9b3b087040f7a2909e3abf4a WHIRLPOOL c359da8b5002e966894f3d736583a0676f75be8008d68931fcacc81c96bed8ddb5b4bc5b20aba6fca253b6ba6088b8b5d13280424ed8a188064375a6c02a05c1
|
||||
DIST 1.4.0.tar.gz 7899131 SHA256 01102f76c4ef22cddc91ebc8aa4fd3dac9cedad561651e0d5c2be482ec784f1b SHA512 470282433179d90b10e732a3601e5b384d3212afaa3e288e7b6019af4ca2410259139b8a63d3bb5d1c334843a7324e7abd41ee3d757795ae9e9d84429263843c WHIRLPOOL 187be12c335d50572504dcd6684e3b61ab0685ed3f5543955504b2c3b66d7f7d781cf4763f70db5839e5098b98fc892a2c0197ab032584b696eebeb654df390e
|
||||
EBUILD atom-1.4.0.ebuild 3068 SHA256 1d946518314f76901313dbb2bb219006a5fc04a0c650e5b347b848c86cd01ff1 SHA512 0b76b260df48b1a8a3a2c35f03972dab49e6ccb59a680559bfbfd26437ab16f8e64324faf1c0a8f434ba921de8a4811c268c0ca026429231969db3d4b8efa8aa WHIRLPOOL 26d5f0bfd7e6e5eb8a2fa0c74699f69d216836613c58f0d749380feee2702a6991904ae22249e51f85198f42fd5f94f6037eecb366adc8fd2f9f7c8a0ef1685c
|
101
app-editors/atom/atom-1.4.0.ebuild
Normal file
101
app-editors/atom/atom-1.4.0.ebuild
Normal file
@ -0,0 +1,101 @@
|
||||
# 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 pax-utils
|
||||
|
||||
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(){
|
||||
SUCCESS=0
|
||||
for i in {1..7}; do
|
||||
if ! ./script/build --verbose --build-dir "${T}"; then
|
||||
pax-mark m apm/node_modules/atom-package-manager/bin/node
|
||||
else
|
||||
SUCCESS=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
[ $SUCCESS -eq 0 ] && die "Build failed"
|
||||
|
||||
pax-mark m ${T}/Atom/resources/app/apm/bin/node
|
||||
"${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
|
||||
# Fix Pax
|
||||
pax-mark m ${EPREFIX}/usr/share/${PN}/resources/app/apm/bin/node
|
||||
pax-mark m ${EPREFIX}/usr/share/${PN}/${PN}
|
||||
}
|
10
app-editors/atom/files/atom-python.patch
Normal file
10
app-editors/atom/files/atom-python.patch
Normal file
@ -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}
|
Loading…
Reference in New Issue
Block a user