commit: 3934385bdc4610679eac9cc25f4930f224e254ec Author: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name> AuthorDate: Mon Jun 16 20:15:47 2014 +0000 Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name> CommitDate: Mon Jun 16 20:15:47 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lua.git;a=commit;h=3934385b
[dev-lua/luaunbound] fixed a bit Signed-off-by: Vadim A. Misbakh-Soloviov <mva <AT> mva.name> --- dev-lua/luaunbound/luaunbound-9999.ebuild | 43 ++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/dev-lua/luaunbound/luaunbound-9999.ebuild b/dev-lua/luaunbound/luaunbound-9999.ebuild index ddce035..c0cdf1e 100644 --- a/dev-lua/luaunbound/luaunbound-9999.ebuild +++ b/dev-lua/luaunbound/luaunbound-9999.ebuild @@ -13,23 +13,46 @@ EHG_REPO_URI="http://code.zash.se/luaunbound/" LICENSE="MIT" SLOT="0" KEYWORDS="" -IUSE="prosody" +IUSE="prosody luajit" RDEPEND=" - dev-lang/luajit:2 + !luajit? ( >=dev-lang/lua-5.1 ) + luajit? ( dev-lang/luajit:2 ) net-dns/unbound - prosody? ( - net-im/prosody - ) + prosody? ( net-im/prosody ) " -DEPEND="${RDEPEND} - dev-util/pkgconfig" +DEPEND=" + ${RDEPEND} + dev-util/pkgconfig +" + +REQUIRED_USE=" prosody? ( luajit )" + +# Actually, it is not required to work, just not-FFI way assumes replacing prosody-owned files, +# so it will be two ways: patch prosody ebuild or patch ./squis.sh DOCS=( "README.markdown" ) +src_compile() { + # If we have LuaJIT in the system — we'd prefer FFI version + use luajit || emake +} + src_install() { - insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD luajit)" - doins "lib.unbound.lua" + local lua=lua; + use luajit && lua=luajit; + if use luajit; then + insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${lua})/util/" + newins util.lunbound.lua lunbound.lua + newins util.dns.lua dns.lua +# something else to be useful outside prosody?.. + else + insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${lua})/util/" + doins "lunbound.so" + insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${lua})/util/" + newins util.dns.lua dns.lua + fi +# Actually, it is possible to patch prosody ebuild to remove dns utils if using it with lubound, just I'm not sure it is a best way. if use prosody; then ./squish.sh > use_unbound.lua insinto "/etc/jabber" @@ -48,4 +71,4 @@ pkg_postinst() { echo '' einfo "Alternatively, you can customize resolv.conf and hosts files locations" fi -} \ No newline at end of file +}
