copied ebuilds from aegypus, and fixed broken sed call for atom-shell
This commit is contained in:
parent
ff7406c2c2
commit
29af9cccbd
105
app-editors/atom/atom-0.189.0.ebuild
Normal file
105
app-editors/atom/atom-0.189.0.ebuild
Normal file
@ -0,0 +1,105 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit git-r3 flag-o-matic python-any-r1 eutils
|
||||
|
||||
DESCRIPTION="A hackable text editor for the 21st Century"
|
||||
HOMEPAGE="https://atom.io"
|
||||
SRC_URI=""
|
||||
|
||||
EGIT_REPO_URI="git://github.com/atom/atom"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
if [[ ${PV} == *9999 ]];then
|
||||
KEYWORDS=""
|
||||
else
|
||||
KEYWORDS="~amd64"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
fi
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
dev-util/atom-shell:0/22
|
||||
|| ( net-libs/nodejs[npm] net-libs/iojs[npm] )
|
||||
media-fonts/inconsolata
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
/usr/share/atom/resources/app/node_modules/symbols-view/vendor/ctags-linux
|
||||
"
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
|
||||
npm config set python $PYTHON
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Skip atom-shell & atom-shell-chromedriver download
|
||||
sed -i -e "s/defaultTasks = \['download-atom-shell', 'download-atom-shell-chromedriver', /defaultTasks = [/g" \
|
||||
./build/Gruntfile.coffee \
|
||||
|| die "Failed to fix Gruntfile"
|
||||
|
||||
# Skip atom-shell copy
|
||||
epatch "${FILESDIR}/0002-skip-atom-shell-copy.patch"
|
||||
|
||||
# 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() {
|
||||
./script/build --verbose --build-dir "${T}" || die "Failed to compile"
|
||||
|
||||
"${T}/Atom/resources/app/apm/bin/apm" rebuild || die "Failed to rebuild native module"
|
||||
|
||||
# Setup python path to builtin npm
|
||||
echo "python = $PYTHON" >> "${T}/Atom/resources/app/apm/.apmrc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
|
||||
into /usr
|
||||
|
||||
insinto /usr/share/applications
|
||||
|
||||
insinto /usr/share/${PN}/resources/app
|
||||
exeinto /usr/bin
|
||||
|
||||
cd "${T}/Atom/resources/app"
|
||||
doicon resources/atom.png
|
||||
dodoc LICENSE.md
|
||||
|
||||
# Installs everything in Atom/resources/app
|
||||
doins -r .
|
||||
|
||||
# Fixes permissions
|
||||
fperms +x /usr/share/${PN}/resources/app/atom.sh
|
||||
fperms +x /usr/share/${PN}/resources/app/apm/bin/apm
|
||||
fperms +x /usr/share/${PN}/resources/app/apm/bin/node
|
||||
fperms +x /usr/share/${PN}/resources/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp
|
||||
|
||||
# Symlinking to /usr/bin
|
||||
dosym ../share/${PN}/resources/app/atom.sh /usr/bin/atom
|
||||
dosym ../share/${PN}/resources/app/apm/bin/apm /usr/bin/apm
|
||||
|
||||
make_desktop_entry "/usr/bin/atom %U" "Atom" "atom" "GNOME;GTK;Utility;TextEditor;Development;" "MimeType=text/plain;\nStartupNotify=true\nStartupWMClass=Atom"
|
||||
}
|
116
dev-util/atom-shell/atom-shell-0.22.3.ebuild
Normal file
116
dev-util/atom-shell/atom-shell-0.22.3.ebuild
Normal file
@ -0,0 +1,116 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit git-r3 flag-o-matic python-any-r1
|
||||
|
||||
DESCRIPTION="Cross-platform desktop application shell"
|
||||
HOMEPAGE="https://github.com/atom/atom-shell"
|
||||
SRC_URI=""
|
||||
|
||||
EGIT_REPO_URI="git://github.com/atom/atom-shell"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/22"
|
||||
|
||||
if [[ ${PV} == *9999 ]];then
|
||||
KEYWORDS=""
|
||||
else
|
||||
KEYWORDS="~amd64"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
fi
|
||||
|
||||
IUSE="debug"
|
||||
|
||||
DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
sys-devel/llvm:0/3.5[clang]
|
||||
dev-lang/python:2.7
|
||||
=net-libs/nodejs-0.10*[npm]
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libnotify
|
||||
gnome-base/libgnome-keyring
|
||||
dev-libs/nss
|
||||
dev-libs/nspr
|
||||
gnome-base/gconf
|
||||
media-libs/alsa-lib
|
||||
net-print/cups
|
||||
sys-libs/libcap
|
||||
x11-libs/libXtst
|
||||
x11-libs/pango
|
||||
dev-util/ninja
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
!<app-editors/atom-0.120.0
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
/usr/share/atom/libffmpegsumo.so
|
||||
/usr/share/atom/libchromiumcontent.so
|
||||
"
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
|
||||
# Update npm config to use python 2
|
||||
npm config set python $PYTHON
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
einfo "Bootstrap atom-shell source"
|
||||
|
||||
# Fix util.execute function to be more verbose
|
||||
sed -i -e 's/def execute(argv):/def execute(argv):\n print " - bootstrap: " + " ".join(argv)/g' \
|
||||
./script/lib/util.py \
|
||||
|| die "Failed to sed lib/util.py"
|
||||
|
||||
# Bootstrap
|
||||
./script/bootstrap.py || die "bootstrap failed"
|
||||
|
||||
# Fix libudev.so.0 link
|
||||
sed -i -e 's/libudev.so.0/libudev.so.1/g' \
|
||||
./vendor/brightray/vendor/download/libchromiumcontent/Release/libchromiumcontent.so \
|
||||
|| die "libudev fix failed"
|
||||
|
||||
# Make every subprocess calls fatal
|
||||
sed -i -e 's/subprocess.call(/subprocess.check_call(/g' \
|
||||
./script/build.py \
|
||||
|| die "build fix failed"
|
||||
|
||||
# Update ninja files
|
||||
./script/update.py || die "update failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
OUT=out/$(usex debug Debug Release)
|
||||
./script/build.py --configuration $(usex debug Debug Release) || die "Compilation failed"
|
||||
echo "v$PV" > "${OUT}/version"
|
||||
cp LICENSE "$OUT"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
|
||||
into /usr/share/atom
|
||||
insinto /usr/share/atom
|
||||
exeinto /usr/share/atom
|
||||
|
||||
cd "${OUT}"
|
||||
|
||||
doexe atom libchromiumcontent.so libffmpegsumo.so
|
||||
|
||||
doins -r resources
|
||||
doins -r locales
|
||||
doins version
|
||||
doins LICENSE
|
||||
doins icudtl.dat
|
||||
doins content_shell.pak
|
||||
doins natives_blob.bin
|
||||
doins snapshot_blob.bin
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user