public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luaexpat/files/, dev-lua/luaexpat/
Date: Mon,  5 Oct 2020 21:34:55 +0000 (UTC)	[thread overview]
Message-ID: <1601933439.e446a4d2f404914db7caaeb99c9b8f6879ad9e4c.conikost@gentoo> (raw)

commit:     e446a4d2f404914db7caaeb99c9b8f6879ad9e4c
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sun Oct  4 20:14:52 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Oct  5 21:30:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e446a4d2

dev-lua/luaexpat: add getcurrentbytecount() func

Restore missed getcurrentbytecount() from upstream, required by net-im/prosody.
See:
* https://github.com/tomasguisasola/luaexpat/issues/3
* https://issues.prosody.im/1375

Closes: https://github.com/gentoo/gentoo/pull/17770
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/luaexpat-1.3.3_getcurrentbytecount.patch | 33 +++++++++++++++
 dev-lua/luaexpat/luaexpat-1.3.3-r1.ebuild          | 48 ++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/dev-lua/luaexpat/files/luaexpat-1.3.3_getcurrentbytecount.patch b/dev-lua/luaexpat/files/luaexpat-1.3.3_getcurrentbytecount.patch
new file mode 100644
index 00000000000..7366163d9d8
--- /dev/null
+++ b/dev-lua/luaexpat/files/luaexpat-1.3.3_getcurrentbytecount.patch
@@ -0,0 +1,33 @@
+From 0926f2d705109b7d35b721344264b39c1169e0de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Perrad?= <francois.perrad@gadz.org>
+Date: Sat, 16 Feb 2019 16:08:25 +0100
+Subject: [PATCH] restore method getcurrentbytecount
+
+fix #3
+---
+ src/lxplib.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/lxplib.c b/src/lxplib.c
+index 7726913..35bec3c 100644
+--- a/src/lxplib.c
++++ b/src/lxplib.c
+@@ -538,11 +538,18 @@ static int lxp_stop (lua_State *L) {
+   return 1;
+ }
+ 
++static int lxp_getcurrentbytecount (lua_State* L) {
++  lxp_userdata *xpu = checkparser(L, 1);
++  lua_pushinteger(L, XML_GetCurrentByteCount(xpu->parser));
++  return 1;
++}
++
+ static const luaL_Reg lxp_meths[] = {
+   {"parse", lxp_parse},
+   {"close", lxp_close},
+   {"__gc", parser_gc},
+   {"pos", lxp_pos},
++  {"getcurrentbytecount", lxp_getcurrentbytecount},
+   {"setencoding", lxp_setencoding},
+   {"getcallbacks", getcallbacks},
+   {"getbase", getbase},

diff --git a/dev-lua/luaexpat/luaexpat-1.3.3-r1.ebuild b/dev-lua/luaexpat/luaexpat-1.3.3-r1.ebuild
new file mode 100644
index 00000000000..72168a4d532
--- /dev/null
+++ b/dev-lua/luaexpat/luaexpat-1.3.3-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal toolchain-funcs
+
+DESCRIPTION="LuaExpat is a SAX XML parser based on the Expat library"
+HOMEPAGE="https://matthewwild.co.uk/projects/luaexpat/ https://github.com/tomasguisasola/luaexpat"
+SRC_URI="https://github.com/tomasguisasola/luaexpat/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND=">=dev-lang/lua-5.1.5-r2:0[${MULTILIB_USEDEP}]
+	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/${P}_makefile.patch"
+	"${FILESDIR}/${P}_getcurrentbytecount.patch"
+)
+
+src_prepare() {
+	default
+	multilib_copy_sources
+}
+
+multilib_src_compile() {
+	emake \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		CC="$(tc-getCC)" \
+		LUA_INC="$($(tc-getPKG_CONFIG) --variable INSTALL_INC lua)"
+}
+
+multilib_src_install() {
+	emake \
+		LUA_DIR="${D}/$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD lua)" \
+		LUA_LIBDIR="${D}/$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)" \
+		install
+}
+
+multilib_src_install_all() {
+	dodoc -r README.md doc/*
+}


             reply	other threads:[~2020-10-05 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 21:34 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-08 19:14 [gentoo-commits] repo/gentoo:master commit in: dev-lua/luaexpat/files/, dev-lua/luaexpat/ Conrad Kostecki
2020-08-24 14:39 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1601933439.e446a4d2f404914db7caaeb99c9b8f6879ad9e4c.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox