diff --git a/media-libs/libfilteraudio/libfilteraudio-9999.ebuild b/media-libs/libfilteraudio/libfilteraudio-9999.ebuild new file mode 100644 index 00000000..bc84de19 --- /dev/null +++ b/media-libs/libfilteraudio/libfilteraudio-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils git-2 toolchain-funcs + +DESCRIPTION="Lightweight audio filtering library made from webrtc code." +HOMEPAGE="https://github.com/irungentoo/filter_audio" +SRC_URI="" +EGIT_REPO_URI="https://github.com/irungentoo/filter_audio" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch_user +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" LIBDIR="$(get_libdir)" install +} diff --git a/net-im/utox/utox-9999.ebuild b/net-im/utox/utox-9999.ebuild new file mode 100644 index 00000000..77c583a8 --- /dev/null +++ b/net-im/utox/utox-9999.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils fdo-mime git-2 gnome2-utils toolchain-funcs + +DESCRIPTION="Lightweight Tox client" +HOMEPAGE="https://github.com/notsecure/uTox" +EGIT_REPO_URI="git://github.com/notsecure/uTox.git + https://github.com/notsecure/uTox.git" + +LICENSE="GPL-3" +SLOT="0" +IUSE="+dbus +filter_audio" + +RDEPEND="net-libs/tox[av] + media-libs/freetype + filter_audio? ( media-libs/libfilteraudio ) + media-libs/libv4l + media-libs/libvpx + media-libs/openal + x11-libs/libX11 + x11-libs/libXext + dbus? ( sys-apps/dbus )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + epatch_user +} + +src_configure() { + if use filter_audio && [ "${PROFILE_IS_HARDENED}" = 1 ]; then + ewarn "Building µTox with support for filter_audio using hardened profile results in" + ewarn "crash upon start. For details, see https://github.com/notsecure/uTox/issues/844" + fi + # respect CFLAGS + sed -i \ + -e '/CFLAGS/s# -g ##' \ + Makefile || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + DBUS=$(usex dbus "1" "0") \ + FILTER_AUDIO=$(usex filter_audio "1" "0") +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" install +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update +} diff --git a/net-libs/tox/files/confd b/net-libs/tox/files/confd new file mode 100644 index 00000000..33f850bf --- /dev/null +++ b/net-libs/tox/files/confd @@ -0,0 +1,2 @@ +TOX_GROUP=tox +TOX_USER=tox diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd new file mode 100644 index 00000000..c500e9b4 --- /dev/null +++ b/net-libs/tox/files/initd @@ -0,0 +1,31 @@ +#!/sbin/runscript + +PIDDIR=/run/tox-bootstrapd +PIDFILE="${PIDDIR}"/tox-bootstrap.pid + +depend() { + need net +} + +start() { + ebegin "Starting tox-dht-bootstrap daemon" + + [ -d "${PIDDIR}" ] || mkdir -p "${PIDDIR}" + chown -R ${TOX_USER}:${TOX_GROUP} "${PIDDIR}" + + start-stop-daemon --start \ + --pidfile "${PIDFILE}" \ + --user=${TOX_USER} --group=${TOX_GROUP} \ + --exec /usr/bin/tox-bootstrapd -- /etc/tox-bootstrapd.conf + + eend $? +} + +stop() { + ebegin "Stopping tox-dht-bootstrap daemon" + + start-stop-daemon --stop \ + --pidfile "${PIDFILE}" + + eend $? +} diff --git a/net-libs/tox/files/tox-bootstrapd.conf b/net-libs/tox/files/tox-bootstrapd.conf new file mode 100644 index 00000000..3413f590 --- /dev/null +++ b/net-libs/tox/files/tox-bootstrapd.conf @@ -0,0 +1,65 @@ +// Tox DHT bootstrap daemon configuration file. + +// Listening port (UDP). +port = 33445 + +// A key file is like a password, so keep it where no one can read it. +// If there is no key file, a new one will be generated. +// The daemon should have permission to read/write it. +keys_file_path = "/var/lib/tox-bootstrapd/keys" + +// The PID file written to by the daemon. +// Make sure that the user that daemon runs as has permissions to write to the +// PID file. +pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid" + +// Enable IPv6. +enable_ipv6 = true + +// Fallback to IPv4 in case IPv6 fails. +enable_ipv4_fallback = true + +// Automatically bootstrap with nodes on local area network. +enable_lan_discovery = true + +enable_tcp_relay = true + +// While Tox uses 33445 port by default, 443 (https) and 3389 (rdp) ports are very +// common among nodes, so it's encouraged to keep them in place. +tcp_relay_ports = [443, 3389, 33445] + +// Reply to MOTD (Message Of The Day) requests. +enable_motd = true + +// Just a message that is sent when someone requests MOTD. +// Put anything you want, but note that it will be trimmed to fit into 255 bytes. +motd = "tox-bootstrapd" + +// Any number of nodes the daemon will bootstrap itself off. +// +// Remember to replace the provided example with your own node list. +// There is a maintained list of bootstrap nodes on Tox's wiki, if you need it +// (https://wiki.tox.chat/users/nodes). +// +// You may leave the list empty or remove "bootstrap_nodes" completely, +// in both cases this will be interpreted as if you don't want to bootstrap +// from anyone. +// +// address = any IPv4 or IPv6 address and also any US-ASCII domain name. +bootstrap_nodes = ( + { // Example Node 1 (IPv4) + address = "127.0.0.1" + port = 33445 + public_key = "728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854" + }, + { // Example Node 2 (IPv6) + address = "::1/128" + port = 33445 + public_key = "3E78BACF0F84235B30054B54898F56793E1DEF8BD46B1038B9D822E8460FAB67" + }, + { // Example Node 3 (US-ASCII domain name) + address = "example.org" + port = 33445 + public_key = "8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858" + } +) diff --git a/net-libs/tox/files/tox-bootstrapd.service b/net-libs/tox/files/tox-bootstrapd.service new file mode 100644 index 00000000..1581026c --- /dev/null +++ b/net-libs/tox/files/tox-bootstrapd.service @@ -0,0 +1,18 @@ +[Unit] +Description=Tox DHT Bootstrap Daemon +After=network.target + +[Service] +Type=forking +PermissionsStartOnly=true +ExecStartPre=-/bin/mkdir /var/run/tox-bootstrapd -p +ExecStartPre=/bin/chown tox:tox -R /var/run/tox-bootstrapd +WorkingDirectory=/var/lib/tox-bootstrapd +ExecStart=/usr/bin/tox-bootstrapd /etc/tox-bootstrapd.conf +User=tox +Group=tox +PIDFile=/var/run/tox-bootstrapd/tox-bootstrapd.pid +#CapabilityBoundingSet=CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target diff --git a/net-libs/tox/tox-9999.ebuild b/net-libs/tox/tox-9999.ebuild new file mode 100644 index 00000000..fc7d1f40 --- /dev/null +++ b/net-libs/tox/tox-9999.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit autotools eutils git-2 user systemd + +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" +HOMEPAGE="https://tox.chat" +SRC_URI="" +EGIT_REPO_URI="git://github.com/irungentoo/toxcore.git + https://github.com/irungentoo/toxcore.git" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="+av daemon log log-debug log-error log-info log-trace log-warn ntox static-libs test" + +RDEPEND=" + >=dev-libs/libsodium-0.6.1[urandom,asm] + daemon? ( dev-libs/libconfig ) + av? ( media-libs/libvpx + media-libs/opus ) + ntox? ( sys-libs/ncurses )" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( dev-libs/check )" + +pkg_setup() { + unset loglevel + + if use log-info || use log-debug || use log-warn || use log-error ; then + if use !log ; then + ewarn "Logging disabled, but log level set," + ewarn "it will have no effect." + else + use log-trace && loglevel=" TRACE" + use log-debug && loglevel="${loglevel} DEBUG" + use log-info && loglevel="${loglevel} INFO" + use log-warn && loglevel="${loglevel} WARNING" + use log-error && loglevel="${loglevel} ERROR" + + if [[ $(echo "${loglevel}" | sed 's/[A-Z]//g') =~ " " ]] ; then + ewarn "You have chosen multiple log levels," + ewarn "but only one can be applied. Picking the" + ewarn "last one: ${loglevel##* }" + fi + fi + fi + [[ -z ${loglevel} ]] && loglevel=DEBUG +} + +src_prepare() { + epatch_user + eautoreconf +} + +src_configure() { + econf \ + $(use_enable log) \ + $(usex log "--with-log-level=${loglevel##* }" "") \ + $(use_enable av) \ + $(use_enable test tests) \ + $(use_enable ntox) \ + $(use_enable daemon) \ + $(use_enable static-libs static) +} + +src_install() { + default + use daemon && { newinitd "${FILESDIR}"/initd tox-dht-daemon + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service ; } + prune_libtool_files +} + +pkg_postinst() { + use daemon && { enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + ewarn "Backwards compatability with the bootstrap daemon" + ewarn "might have been broken a while ago." + ewarn "To resolve this issue, REMOVE the following files:" + ewarn "/var/lib/tox-dht-bootstrap/key" + ewarn "/etc/tox-bootstrapd.conf" + ewarn "/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" + ewarn "Then just re-emerge net-libs/tox" ; } +}