commit:     92ff0b36f464520c6645157c259b4aaea28e9c5c
Author:     xdch47 <xdch47 <AT> posteo <DOT> de>
AuthorDate: Fri Nov  9 21:48:06 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Nov  9 23:36:18 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=92ff0b36

net-im/prosody: no mallinfo for musl

Package-Manager: Portage-2.3.49, Repoman-2.3.11
RepoMan-Options: --force
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 net-im/prosody/Manifest                           |  1 +
 net-im/prosody/files/prosody-0.10.0-cfg.lua.patch | 41 ++++++++++++
 net-im/prosody/files/prosody.initd-r2             | 46 +++++++++++++
 net-im/prosody/files/prosody.service              | 13 ++++
 net-im/prosody/files/prosody.tmpfilesd            |  1 +
 net-im/prosody/prosody-0.10.2-r1.ebuild           | 80 +++++++++++++++++++++++
 6 files changed, 182 insertions(+)

diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
new file mode 100644
index 0000000..cd376ef
--- /dev/null
+++ b/net-im/prosody/Manifest
@@ -0,0 +1 @@
+DIST prosody-0.10.2.tar.gz 331874 BLAKE2B 
0e0af95a9168810263e6f60b825393d1088f69dba1faabf6c0c9dda3ef6b039a92f7edb9643cb9a60a3131a64038de5c3598f7076837b58ad196ac03fa98bfc4
 SHA512 
9fc05e34b45b0c16835ba94a73532fb3b4ee335f27d56bb9260e1b3e22614f89f44eb5d04b4e90d016db0b5bee6f5c7e7d099e1defb027e6823ee7667c1fe28f

diff --git a/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch 
b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
new file mode 100644
index 0000000..d0600ac
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
@@ -0,0 +1,41 @@
+--- prosody-0.10.0/prosody.cfg.lua.dist        2017-10-05 11:27:20.852452270 
+0200
++++ prosody-0.10.0-gentoo/prosody.cfg.lua.dist 2017-10-05 11:29:07.151997654 
+0200
+@@ -1,5 +1,3 @@
+--- Prosody Example Configuration File
+---
+ -- Information on configuring Prosody can be found on our
+ -- website at https://prosody.im/doc/configure
+ --
+@@ -9,8 +7,6 @@
+ -- If there are any errors, it will let you know what and where
+ -- they are, otherwise it will keep quiet.
+ --
+--- The only thing left to do is rename this file to remove the .dist ending, 
and fill in the
+--- blanks. Good luck, and happy Jabbering!
+ 
+ 
+ ---------- Server-wide settings ----------
+@@ -80,6 +76,12 @@
+               --"proxy65"; -- Enables a file transfer proxy service which 
clients behind NAT can use
+ }
+ 
++-- Settings for Gentoo init script and net-im/jabber-base permissions system:
++daemonize = true;
++prosody_user = "jabber";
++prosody_group = "jabber";
++pidfile = "/var/run/jabber/prosody.pid";
++
+ -- These modules are auto-loaded, but should you want
+ -- to disable them then uncomment them here:
+ modules_disabled = {
+@@ -161,8 +163,8 @@
+ -- Logging configuration
+ -- For advanced logging see https://prosody.im/doc/logging
+ log = {
+-      info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
+-      error = "prosody.err";
++      info = "/var/log/jabber/prosody.log"; -- Change 'info' to 'debug' for 
verbose logging
++      error = "/var/log/jabber/prosody.err";
+       -- "*syslog"; -- Uncomment this for logging to syslog
+       -- "*console"; -- Log to the console, useful for debugging with 
daemonize=false
+ }

diff --git a/net-im/prosody/files/prosody.initd-r2 
b/net-im/prosody/files/prosody.initd-r2
new file mode 100644
index 0000000..78d056e
--- /dev/null
+++ b/net-im/prosody/files/prosody.initd-r2
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prosody is a server for Jabber/XMPP written in Lua."
+description_reload="Reload configuration and reopen log files."
+extra_started_commands="reload"
+pidfile="/var/run/jabber/prosody.pid"
+
+depend() {
+       use dns
+       need net
+       provide jabber-server
+}
+
+checkconfig() {
+       if [ ! -e /etc/jabber/prosody.cfg.lua ] ; then
+               eerror "You need a /etc/jabber/prosody.cfg.lua file to run 
prosody"
+               return 1
+       fi
+       luac -p /etc/jabber/prosody.cfg.lua
+       return $?
+}
+
+start() {
+       checkconfig || return 1
+       checkpath -q -d -m 0770 -o jabber:jabber "$(dirname ${pidfile})"
+       checkpath -q -f -m 0770 -o jabber:jabber "${pidfile}"
+       checkpath -q -d -m 0750 -o jabber:jabber /var/log/jabber
+       ebegin "Starting Prosody XMPP Server"
+       prosodyctl start
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping Prosody XMPP Server"
+       prosodyctl stop
+       eend $?
+}
+
+reload() {
+       checkconfig || return 1
+       ebegin "Reloading configuration of Prosody XMPP Server"
+       prosodyctl reload
+       eend $?
+}

diff --git a/net-im/prosody/files/prosody.service 
b/net-im/prosody/files/prosody.service
new file mode 100644
index 0000000..5c5ea87
--- /dev/null
+++ b/net-im/prosody/files/prosody.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Prosody XMPP (Jabber) server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/jabber/prosody.pid
+ExecStart=/usr/bin/prosodyctl start
+ExecReload=/usr/bin/prosodyctl reload
+ExecStop=/usr/bin/prosodyctl stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-im/prosody/files/prosody.tmpfilesd 
b/net-im/prosody/files/prosody.tmpfilesd
new file mode 100644
index 0000000..924ba43
--- /dev/null
+++ b/net-im/prosody/files/prosody.tmpfilesd
@@ -0,0 +1 @@
+d /var/run/jabber   710 jabber jabber

diff --git a/net-im/prosody/prosody-0.10.2-r1.ebuild 
b/net-im/prosody/prosody-0.10.2-r1.ebuild
new file mode 100644
index 0000000..1089355
--- /dev/null
+++ b/net-im/prosody/prosody-0.10.2-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic systemd
+
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP 
written in Lua"
+HOMEPAGE="https://prosody.im/";
+SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl"
+
+DEPEND="net-im/jabber-base
+               dev-lua/LuaBitOp
+               !jit? ( >=dev-lang/lua-5.1:0 )
+               jit? ( dev-lang/luajit:2 )
+               >=net-dns/libidn-1.1:=
+               !libressl? ( dev-libs/openssl:0 ) libressl? ( 
dev-libs/libressl:= )"
+RDEPEND="${DEPEND}
+               >=dev-lua/luaexpat-1.3.0
+               dev-lua/luafilesystem
+               ipv6? ( >=dev-lua/luasocket-3 )
+               !ipv6? ( dev-lua/luasocket )
+               libevent? ( >=dev-lua/luaevent-0.4.3 )
+               mysql? ( dev-lua/luadbi[mysql] )
+               postgres? ( dev-lua/luadbi[postgres] )
+               sqlite? ( dev-lua/luadbi[sqlite] )
+               ssl? ( dev-lua/luasec )
+               zlib? ( dev-lua/lua-zlib )"
+
+JABBER_ETC="${EPREFIX}/etc/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+
+src_prepare() {
+       eapply "${FILESDIR}/${PN}-0.10.0-cfg.lua.patch"
+       sed -i -e "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = 
\$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+               -e "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = 
\$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+               -e "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = 
\$(PREFIX)/$(get_libdir)/!"\
+               -e "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = 
\$(PREFIX)/$(get_libdir)/!"\
+               Makefile || die
+       default
+}
+
+src_configure() {
+       # the configure script is handcrafted (and yells at unknown options)
+       # hence do not use 'econf'
+       append-cflags -D_GNU_SOURCE
+       use elibc_musl && append-cflags -DWITHOUT_MALLINFO
+       ./configure \
+               --ostype=linux \
+               --prefix="${EPREFIX}/usr" \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               --sysconfdir="${JABBER_ETC}" \
+               --datadir="${JABBER_SPOOL}" \
+               --with-lua-include="${EPREFIX}/usr/include" \
+               --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua" \
+               --runwith=lua"$(usev jit)" \
+               --cflags="${CFLAGS} -Wall -fPIC" \
+               --ldflags="${LDFLAGS} -shared" \
+               --c-compiler="$(tc-getCC)" \
+               --linker="$(tc-getCC)" || die "configure failed"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       systemd_dounit "${FILESDIR}/${PN}".service
+       systemd_newtmpfilesd "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf
+       newinitd "${FILESDIR}/${PN}".initd-r2 ${PN}
+       keepdir "${JABBER_SPOOL}"
+}
+
+src_test() {
+       cd tests || die
+       ./run_tests.sh || die
+}
+

Reply via email to