commit: 2ba6f5eb87e285bd0c73360e9d9f560036f26503 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> AuthorDate: Sat Dec 5 01:25:35 2020 +0000 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> CommitDate: Sat Dec 5 01:25:48 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ba6f5eb
net-im/prosody: migrate to single-lua eclass Closes: https://bugs.gentoo.org/752966 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> net-im/prosody/prosody-0.11.7-r100.ebuild | 102 ++++++++++++++++++++++++++++++ profiles/package.mask | 2 + 2 files changed, 104 insertions(+) diff --git a/net-im/prosody/prosody-0.11.7-r100.ebuild b/net-im/prosody/prosody-0.11.7-r100.ebuild new file mode 100644 index 00000000000..11e70d9924b --- /dev/null +++ b/net-im/prosody/prosody-0.11.7-r100.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..2} ) + +inherit lua-single systemd tmpfiles toolchain-funcs + +DESCRIPTION="Prosody is a modern XMPP communication server" +HOMEPAGE="https://prosody.im/" +SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="icu +idn +libevent libressl mysql postgres +sqlite +ssl test +zlib" +REQUIRED_USE=" + ^^ ( icu idn ) + ${LUA_REQUIRED_USE} +" +RESTRICT="!test? ( test )" + +RDEPEND=" + $(lua_gen_cond_dep 'dev-lua/luaexpat[${LUA_USEDEP}]') + $(lua_gen_cond_dep 'dev-lua/luafilesystem[${LUA_USEDEP}]') + $(lua_gen_cond_dep 'dev-lua/luasocket[${LUA_USEDEP}]') + net-im/jabber-base + icu? ( dev-libs/icu:= ) + idn? ( net-dns/libidn:= ) + libevent? ( $(lua_gen_cond_dep 'dev-lua/luaevent[${LUA_USEDEP}]') ) + libressl? ( dev-libs/libressl:= ) + !libressl? ( dev-libs/openssl:0= ) + lua_single_target_lua5-1? ( $(lua_gen_cond_dep 'dev-lua/lua-bit32[lua_targets_lua5-1(-)]') ) + mysql? ( $(lua_gen_cond_dep 'dev-lua/luadbi[mysql,${LUA_USEDEP}]') ) + postgres? ( $(lua_gen_cond_dep 'dev-lua/luadbi[postgres,${LUA_USEDEP}]') ) + sqlite? ( $(lua_gen_cond_dep 'dev-lua/luadbi[sqlite,${LUA_USEDEP}]') ) + ssl? ( $(lua_gen_cond_dep 'dev-lua/luasec[${LUA_USEDEP}]') ) + zlib? ( $(lua_gen_cond_dep 'dev-lua/lua-zlib[${LUA_USEDEP}]') ) + ${LUA_DEPS} +" + +DEPEND="${RDEPEND}" + +BDEPEND=" + virtual/pkgconfig + test? ( $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]') ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.11.7-bit32.patch" + "${FILESDIR}/${PN}-0.11.7-gentoo.patch" +) + +src_prepare() { + default + + # Set correct plugin path for optional net-im/prosody-modules package + sed -e "s/GENTOO_LIBDIR/$(get_libdir)/g" -i prosody.cfg.lua.dist || die +} + +src_configure() { + local myeconfargs=( + --add-cflags="${CFLAGS}" + --add-ldflags="${LDFLAGS}" + --c-compiler="$(tc-getCC)" + --datadir="${EPREFIX}/var/spool/jabber" + --idn-library="$(usex idn 'idn' 'icu')" + --libdir="${EPREFIX}/usr/$(get_libdir)" + --linker="$(tc-getCC)" + --lua-version="$(ver_cut 1-2 $(lua_get_version))" + --no-example-certs + --ostype="linux" + --prefix="${EPREFIX}/usr" + --runwith="${ELUA}" + --sysconfdir="${EPREFIX}/etc/jabber" + --with-lua-include="${EPREFIX}/$(lua_get_include_dir)" + --with-lua-lib="${EPREFIX}/$(lua_get_cmod_dir)" + ) + + # Since the configure script is handcrafted, + # and yells at unknown options, do not use 'econf'. + ./configure "${myeconfargs[@]}" || die + + rm makefile || die + mv GNUmakefile Makefile || die +} + +src_install() { + default + + keepdir /var/spool/jabber + + newinitd "${FILESDIR}"/prosody.initd-r4 prosody + systemd_newunit "${FILESDIR}"/prosody.service-r2 prosody.service + + newtmpfiles "${FILESDIR}"/prosody.tmpfilesd-r1 prosody.conf +} + +pkg_postinst() { + tmpfiles_process prosody.conf +} diff --git a/profiles/package.mask b/profiles/package.mask index b8d8f70bdbd..e6e53ffe7a9 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -497,6 +497,7 @@ gnome-base/orbit # Marek Szuba <[email protected]> (2020-10-13) # Ulrich Müller <[email protected]> (2020-11-06) # Robin H. Johnson <[email protected]> (2020-11-28) +# Conrad Kostecki <[email protected]> (2020-12-05) # ...and others who have not added their names here # All these ebuilds require slotted Lua, which is still masked. >=app-admin/conky-1.11.4 @@ -573,6 +574,7 @@ gnome-base/orbit >=media-gfx/geeqie-1.5.1-r1 >=media-sound/aqualung-1.1-r100 >=net-analyzer/suricata-6.0.0-r100 +>=net-im/prosody-0.11.7-r100 >=net-im/swift-4.0.2-r100 >=net-p2p/eiskaltdcpp-2.2.10-r100 >=sci-astronomy/celestia-1.7.0_pre20200316-r100
