We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

changeset 132:af030a9d6541

adding old dev-vcs/kallithea ebuild (lay around since late 2014, do not use!)
author Daniel Neugebauer <dneuge@energiequant.de>
date Sat, 26 Mar 2016 17:53:07 +0100
parents 56f8a6108f7d
children fa6d2de366ac 702382d06f80
files dev-vcs/kallithea/Manifest dev-vcs/kallithea/files/production.wsgi dev-vcs/kallithea/files/start-virtualenv.sh dev-vcs/kallithea/kallithea-9999.ebuild media-video/lightworks/Manifest media-video/lightworks/lightworks-12.0.2.ebuild
diffstat 6 files changed, 396 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev-vcs/kallithea/Manifest	Sat Mar 26 17:53:07 2016 +0100
@@ -0,0 +1,4 @@
+AUX production.wsgi 448 SHA256 34aa607585b8526356d0a4e7103689a4c353e333bfd7dbd9316dea1601403af6 SHA512 f1d6310626ce5687317d856e4be2ea37d4d39dea5402846c64195d77cef1454ef96d3c6d23832a9a0c8ecdc6645582bc86b138cc7fbb7dc78226f45279d44f7a WHIRLPOOL cfee76d169facea538b00fdd9683a9ecefe58cd49f3c2f3f46e49025af459e5a8bdd236ea55252d5488ee52212f2f57423f3d8e21ddb2251e25851bffc93d243
+AUX start-virtualenv.sh 463 SHA256 2f5def6c4840b94b78055fcc3f3e37aa42dd709e4e71dfa16d1fc63966274456 SHA512 0912644b3806b9c04d301f5f2f59c9b212549e73dec848a324fb0dd8bc9410e60750a571a3438ccc4b9dd940020986b67a9f3bb29a7fd27945daa2ae4c24139d WHIRLPOOL f4cbb8e583ec907baaa0801c6c2f73a9832689422654661079d420002a6c55ff872f8af1b4a2b78e50085f90e2c8d5876e93a436c443ac75f9d589510d8f615c
+EBUILD kallithea-9999.ebuild 8413 SHA256 0455764589e04a214f885831587ab57a823994f9e57bda1b969f2ff746b59d03 SHA512 3e6b0a1ef1f2c1316f8690336a7d1516ac80cce301d8ac85f8b4adcb7b86780fd56328338c7c271dee0de505f54c324c1339b2b619ecc1a7169e67aac3cd4eae WHIRLPOOL 97827448c10e7ec8bd94ff129a5a9b3b2f94dde815d8a357c28b0e8e6f3c1a0768381133e730f0b0472750920cc55f9276aa0822bddc0581be0f3b2ec76eccfa
+MISC kallithea-test.sh 603 SHA256 4d0ab7e309ea72d79691c903ed66de0c68845244a04728d93d466ce3e243ce61 SHA512 350b5eee94f0ee5cafac0b7254c8e0b61620686694bb068d6072c85edf4f6724057294e9f95e2f00df0b0a96a1cfc1553cf0790f4a1e64342dcb574ced57783c WHIRLPOOL fa671b48d21f25367f8653a825c9bcb1b196369d0d8d1b6ba6d1d926b835e289be2554ef365954dfe2af04d4400db0a8c7bff6f5a5551c803c38fdf09357a4dc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev-vcs/kallithea/files/production.wsgi	Sat Mar 26 17:53:07 2016 +0100
@@ -0,0 +1,15 @@
+import os
+os.environ["HGENCODING"] = "UTF-8"
+os.environ['PYTHON_EGG_CACHE'] = '###DATADIR###/.egg-cache'
+
+# sometimes it's needed to set the curent dir
+os.chdir('###DATADIR###/')
+
+import site
+site.addsitedir("###BASEDIR###/lib/python2.7/site-packages")
+
+from paste.deploy import loadapp
+from paste.script.util.logging_config import fileConfig
+
+fileConfig('###CONFDIR###/production.ini')
+application = loadapp('config:###CONFDIR###/production.ini')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev-vcs/kallithea/files/start-virtualenv.sh	Sat Mar 26 17:53:07 2016 +0100
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# don't allow to host web applications as root
+if [ $EUID -eq 0 ]; then
+	echo "Denying attempt to run Kallithea as root." >&2
+	exit 1
+fi
+
+# get full + virtual environment
+source /etc/profile
+source /opt/kallithea/bin/activate
+
+# start Kallithea
+cd /var/lib/kallithea
+paster serve    --pid-file=/run/kallithea.pid \
+                --log-file=/var/log/kallithea/kallithea.log \
+                --daemon \
+                /etc/kallithea/production.ini
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev-vcs/kallithea/kallithea-9999.ebuild	Sat Mar 26 17:53:07 2016 +0100
@@ -0,0 +1,262 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit mercurial
+inherit user
+
+DESCRIPTION="a web-based frontend and middleware to Mercurial and Git repositories"
+HOMEPAGE="https://kallithea-scm.org/"
+
+#EHG_REPO_URI="https://kallithea-scm.org/repos/kallithea"
+EHG_REPO_URI="https://bitbucket.org/conservancy/kallithea"
+
+RDEPEND="dev-python/virtualenv"
+
+DEPEND="${RDEPEND}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT_PYTHON_ABIS="3.*"
+
+installDataPath="/var/lib/kallithea"
+installBasePath="/opt/kallithea"
+installConfigPath="/etc/kallithea"
+virtualenvActivationPath="bin/activate"
+
+pkg_setup() {
+	# create user and group
+	enewgroup kallithea
+	enewuser kallithea -1 -1 "${installDataPath}" kallithea 
+}
+
+src_compile() {
+	# not really compiling anything
+	
+	realWorkDir=$(pwd)
+	
+	# create new virtual environment
+	virtualenv --no-site-packages dist/v
+	
+	# activate environment
+	source "dist/v/${virtualenvActivationPath}"
+	
+	# WORKAROUND:
+	# pylonshq.com is dead, remove from config
+	sed -e 's/\(find_links\s*=\s*http:\/\/www.pylonshq.com\/\)/;\1/' -i setup.cfg
+	
+	# WORKAROUND:
+	# if we don't install anyjson via PIP we will get a sandbox violation on second run
+	# (after fixing pylonshq.com for Pylons EGG-INFO)
+	# see: https://groups.google.com/forum/#!msg/rhodecode/agjXi2JeDZQ/LzFJ6EAsk9AJ
+	pip install 'anyjson>=0.3.1'
+	
+	# perform automatic installation, includes dependencies
+	echo
+	echo "===> output by Kallithea's setup.py"
+	python setup.py install
+	retval=$?
+	echo "<=== Kallithea's setup.py is done, resuming ebuild code"
+	echo
+	
+	# WORKAROUND:
+	# pylonshq.com may still have been tried to be accessed and failed
+	# check if that's the case and retry with a patched egg info file
+	if [ ${retval} -ne 0 ]; then
+		pylonsPath="${realWorkDir}/dist/v/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg"
+		#if [ ! -e "${pylonsPath}/pylons" ] && [ -e "${pylonsPath}/EGG-INFO" ]; then
+		if [ ! -e "${realWorkDir}/dist/v/lib/python2.7/site-packages/pylons" ] && [ -e "${realWorkDir}/dist/v/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/EGG-INFO" ]; then
+			# gnoar... it really smells like pylonshq.com...
+			sed -e 's#^http://www.pylonshq.com/.*##' -i "${pylonsPath}/EGG-INFO/dependency_links.txt"
+			
+			# prepare to try again (sandbox violation if not done)
+			# TODO: check if still required
+			source /etc/profile
+			cd "${realWorkDir}"
+			source "dist/v/${virtualenvActivationPath}"
+			
+			echo "Retrying installation with removed pylonshq.com URL..."
+			echo
+			echo "===> output by Kallithea's setup.py"
+			python setup.py install || die "Automatic installation failed, please check above output. (failed after fixing Pylons dependency URL)"
+			echo "<=== Kallithea's setup.py is done, resuming ebuild code"
+		else
+			# some other error on first run
+			die "Automatic installation failed, please check above output. (failed on first try)"
+		fi
+	fi
+	echo
+	
+	# create config
+	mkdir "${realWorkDir}/etc"
+	cd "${realWorkDir}/etc"
+	paster make-config Kallithea production.ini || die "unable to create configuration file"
+	
+	# rewrite virtualenv directory to later installation directory
+	oldIFS="${IFS}"
+	IFS="
+	"
+	echo "Searching files that need to have paths replaced when leaving portage sandbox..."
+	dirtyFiles=$(grep -Ri "${realWorkDir}/dist/v" ${realWorkDir}/dist/v | grep -vE '^Binary' | cut -d':' -f1 | sort | uniq)
+	for dirtyFile in ${dirtyFiles}; do
+		echo "    patching ${dirtyFile}"
+		sed -e "s#${realWorkDir}/dist/v#${installBasePath}#" -i "${dirtyFile}"
+	done
+	IFS="${oldIFS}"
+	
+	# create WSGI file
+	cd "${realWorkDir}/etc"
+	cp "${FILESDIR}/production.wsgi" .
+	sed -e "s:###BASEDIR###:${installBasePath}:" -i production.wsgi
+	sed -e "s:###DATADIR###:${installDataPath}:" -i production.wsgi
+	sed -e "s:###CONFDIR###:${installConfigPath}:" -i production.wsgi
+}
+
+src_install() {
+	# QA: no need to have anything world-writable...
+	chmod o-w -R dist/v/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg-info
+	
+	# just copy the virtualenv directory to /opt/kallithea
+	dodir /opt
+	cp -aR "${S}/dist/v" "${D}${installBasePath}"
+	
+	# install configuration files to /etc/kallithea
+	diropts -m750 -oroot -gkallithea
+	insopts -m640 -oroot -gkallithea
+	insinto "${installConfigPath}"
+	doins "${S}/etc/production.ini"
+	doins "${S}/etc/production.wsgi"
+	
+	# create data directory
+	diropts -m2770 -okallithea -gkallithea
+	keepdir "${installDataPath}"
+}
+
+pkg_postinst() {
+	#               1         2         3         4         5         6         7         8
+	#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	einfo "You need to setup Kallithea according to the instructions at:"
+	einfo "    https://pythonhosted.org/Kallithea/setup.html"
+	einfo ""
+	einfo "When doing so, please mind that Kallithea was installed into a Python virtual"
+	einfo "environment that has to be \"activated\" before it can be used. To do so,"
+	einfo "you will have to run a dedicated shell and initialize the environment by running"
+	einfo ""
+	einfo "    source ${D}/dist/v/bin/activate"
+	einfo ""
+	einfo "We can wrap those commands for you if you run:"
+	einfo "    emerge --config =${CATEGORY}/${PF}"
+	einfo ""
+	einfo "Kallithea also provides a way to migrate your database if you"
+	einfo "are coming from RhodeCode. Instructions can be found at:"
+	einfo "https://pythonhosted.org/Kallithea/index.html#converting-from-rhodecode"
+}
+
+my_read_line() {
+	# BASH function 'read' cannot write input back to variable in correct environment
+	# when run by emerge so we have to do *this* instead... great... :/
+	# (at least this works...)
+
+	python -c 'import sys; print(sys.stdin.readline().strip())'
+}
+
+config_menu() {
+	choice=""
+	
+	oldIFS="${IFS}"
+	IFS="
+	"
+	
+	#              1         2         3         4         5         6         7         8
+	#     12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	echo
+	echo "==============================================================================="
+	echo
+	echo "Your options:"
+	echo
+	echo "  1) create production config from template (paster make-config ...)"
+	echo "  2) edit production config"
+	echo "  3) initialize Kallithea (paster setup-db)"
+	echo "     This will also ask for repository location and create an admin account."
+	echo "  0) quit"
+	echo "     Kallithea should be able to run now, check documentation for more options"
+	echo "     such as setting up a task queue or full text search if you need it."
+	echo
+	
+	echo "TERM is ${TERM}"
+	
+	while [[ ! "${choice}" =~ ^[0-3]$ ]]; do
+		echo -n "Your choice? "
+		choice=$(my_read_line)
+	done
+	
+	IFS="${oldIFS}"
+	
+	return ${choice}
+}
+
+pkg_config() {
+	#              1         2         3         4         5         6         7         8
+	#     12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	
+	echo "Kallithea setup requires following multiple steps, some of which need to be run"
+	echo "in the correct virtual Python environment. This script helps you running those"
+	echo "commands by wrapping the commands to be run inside the correct virtualenv."
+	echo "You may still want to read the setup instructions while running this script:"
+	echo
+	echo "  https://pythonhosted.org/Kallithea/setup.html"
+	
+	# activate virtualenv
+	cd ${installBasePath} || die "installation is gone? (${installBasePath})"
+	source "${virtualenvActivationPath}" || die "failed to activate virtualenv (${installBasePath}/${virtualenvActivationPath})"
+	
+	while true; do
+		config_menu
+		choice=$?
+		echo
+		
+		case "${choice}" in
+			0) 	break
+				;;
+			
+			1)	mkdir -p "${installBasePath}/etc"
+				cd "${installBasePath}/etc"
+				paster make-config Kallithea production.ini
+				;;
+			
+			2)	iniPath="${installBasePath}/etc/production.ini"
+				
+				if [ ! -e "${iniPath}" ]; then
+					echo "config not found at ${iniPath}; did you follow step 1?"
+					continue
+				fi
+				
+				# terminal and shell need a reset or editor will be screwed up
+				source /etc/profile
+				reset
+				stty sane
+				
+				# open editor
+				if [[ "${EDITOR}" != "" ]] && [ -e "${EDITOR}" ]; then
+					TERM="xterm" ${EDITOR} "${iniPath}"
+				else
+					TERM="xterm" nano -w "${iniPath}"
+				fi
+
+				# we better reset again...
+				source /etc/profile
+				reset
+				stty sane
+				;;
+			
+			*)	echo "invalid choice ${choice}"
+				;;
+		esac
+	done
+}
--- a/media-video/lightworks/Manifest	Fri Mar 04 19:54:45 2016 +0100
+++ b/media-video/lightworks/Manifest	Sat Mar 26 17:53:07 2016 +0100
@@ -1,2 +1,4 @@
 DIST lwks-11.5-amd64.deb 62011078 SHA256 e6e58f6a26346e6f841d94c850ecd89f8cd71985c0fce076c386993c44189da1 SHA512 b7705c06064ada713bc86fa6e4c29e885548106bdc981f490e8716a4351d230095ced6279d506512afbf5a114297dec17aac96aaad3a7f8ca7ccf38af5ec876c WHIRLPOOL 00120d9f8a037fbca79484988398a11f80f3db03f45d490d371fdbf7a25c2fdf3e61a8fc657e76d9f882bcc454f9fd7dcfe3eed13aa783b4e0337a4c5ce360e8
+DIST lwks-12.0.2-amd64.deb 62333952 SHA256 a6daf4ad7043d4dc9a0fcf78e572572ef85528ebe91dad72d700f466e01d37bc SHA512 7ee2c78974bbccdd35c9028e67dfa4adc77a70c50dfe079034a9094edb41c152a1dd2a85b976762398e16d22ce4fd3599fb77b5a88479fdefda58a8196ab414e WHIRLPOOL 9cb38322a7f67c6cd8264a03fe0ca0e24cefc99212fd309dbb26b887e5a5262e3b7b16cb3a056bd802c6ab746e56e9c0ee2976609fa550c67033fe3e9aa5ae26
 EBUILD lightworks-11.5.ebuild 2986 SHA256 5fd1225143c5b2d19c6c2e99f38ec30b1715cb6ffc060168e1e3b0d877840af3 SHA512 4aff12f1ef9f04440bb3d2e18de830e4d31421e49eded1fb3b381000a2cc99dc698f9708090e80d9e5c74b401269129fa6f5f2f138386a382e1ff83d7223b606 WHIRLPOOL acd2abc926c4cc1e4654beb3c7a61836ccffaf20ee4add4565a0b6cafd05eefa5ca60ae76b14915ee070b8ff141d8963b0269b7a6738753da306d668c9d1453e
+EBUILD lightworks-12.0.2.ebuild 3019 SHA256 f9dc74f311f61bc597592d0bceb90cfe43a1e03c0afa0b834df01b052f6be81e SHA512 513069be6c5938208a6a1c9dce3b9a5a385f14b119d0bd221c1060ed0d7e324b411ff38419f76149a07772be687b9af421eb89c317d4bed15b27be58c1b5b7ae WHIRLPOOL fc0253de8258b0df6579a3a82ed435b67232dd234ec01a8b260fdf0014210e87ddedcd556e1cdd4321db77898f2787549fb106e9193a63794711e6932279df1c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-video/lightworks/lightworks-12.0.2.ebuild	Sat Mar 26 17:53:07 2016 +0100
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+# ToDo list:
+#
+# - figure out runtime dependencies
+# - try to move Lightworks to /opt as it is only available as a pre-compiled binary
+#   (not sure if possible since it is intended to be installed to /usr)
+# - try to silence QA notices
+# - figure out if high load/memory usage (memleak?) of ntcardvt process are specific to Gentoo
+
+inherit font
+
+DESCRIPTION="feature-rich non-linear video editor (NLE)"
+HOMEPAGE="http://www.lwks.com/"
+SRC_URI="lwks-12.0.2-amd64.deb"
+
+LICENSE="Lightworks"
+RESTRICT="fetch"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="app-arch/dpkg sys-apps/sed"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+pkg_nofetch() {
+	einfo "Please visit ${HOMEPAGE} to download Lightworks ${PV} and place ${SRC_URI} in ${DISTDIR}."
+}
+
+src_unpack() {
+	/usr/bin/dpkg-deb -x ${DISTDIR}/${SRC_URI} ${WORKDIR}
+}
+
+src_prepare() {
+	# .desktop entry: "Version" attribute is invalid (must be specification version, not app version number)
+	# see: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
+	/bin/sed -i -e 's/^Version=/X-Version=/' usr/share/applications/lightworks.desktop || die 'failed to fix lightworks.desktop'
+}
+
+src_install() {
+	insinto /lib/udev/rules.d
+	doins lib/udev/rules.d/20-lightworks.rules
+	
+	exeinto /usr/bin
+	doexe usr/bin/lightworks
+	
+	insinto /usr/lib64/lightworks
+	doins -r usr/lib/lightworks/*
+	
+	exeinto /usr/lib64/lightworks
+	doexe usr/lib/lightworks/spawn
+	doexe usr/lib/lightworks/ntcardvt
+	
+	insinto /usr/share/applications
+	doins usr/share/applications/lightworks.desktop
+	
+	insinto /usr/share/doc/lightworks
+	doins -r usr/share/doc/lightworks/*
+	
+	insinto /usr/share/fonts/truetype
+	doins usr/share/fonts/truetype/lw2.ttf
+	doins usr/share/fonts/truetype/lw3.ttf
+	
+	insinto /usr/share/lightworks
+	doins -r usr/share/lightworks/*
+}
+
+pkg_postinst() {
+	# update font cache because we installed font files
+	font_pkg_postinst
+	
+	#               1         2         3         4         5         6         7         8
+	#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	einfo ""
+	einfo "Please ignore all QA notices printed above."
+	einfo ""
+	einfo "You will need to register an account at ${HOMEPAGE} in order to use Lightworks."
+	einfo "Some features are restricted on free accounts but can be unlocked for a fee if"
+	einfo "needed."
+	einfo ""
+	einfo "If you are running PulseAudio, you may want to use pasuspender around Lightworks"
+	einfo "if you experience high audio latency."
+	einfo ""
+	ewarn "Please monitor memory usage and CPU load during your first sessions with"
+	ewarn "Lightworks as ntcardvt *may* run wild and cause your system to fall into swap."
+	ewarn "If you can spare a few moments of your time and want to help, please contact us"
+	ewarn "at gentoo-overlay@megacoffee.net for trying to identify the cause of that"
+	ewarn "behaviour (reports about everything running fine are welcome as well). :)"
+}