public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lua/lua-utf8/files/, dev-lua/lua-utf8/
@ 2020-03-15 23:22 Georgy Yakovlev
  0 siblings, 0 replies; 2+ messages in thread
From: Georgy Yakovlev @ 2020-03-15 23:22 UTC (permalink / raw
  To: gentoo-commits

commit:     8708d8768b354a6dbe60a1cc796da9dd843acecb
Author:     Victor Payno <vpayno+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Jan 27 19:12:44 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 23:22:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8708d876

dev-lua/lua-utf8: UTF8 module for Lua (new package)

Signed-off-by: Victor Payno <vpayno+gentoo <AT> gmail.com>

UTF-8 support for Lua
Closes: https://github.com/gentoo/gentoo/pull/14477

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-lua/lua-utf8/Manifest                |  1 +
 dev-lua/lua-utf8/files/lua-utf8.Makefile | 41 ++++++++++++++++++++++++++++++
 dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild   | 43 ++++++++++++++++++++++++++++++++
 dev-lua/lua-utf8/metadata.xml            | 20 +++++++++++++++
 4 files changed, 105 insertions(+)

diff --git a/dev-lua/lua-utf8/Manifest b/dev-lua/lua-utf8/Manifest
new file mode 100644
index 00000000000..b2369602833
--- /dev/null
+++ b/dev-lua/lua-utf8/Manifest
@@ -0,0 +1 @@
+DIST lua-utf8-0.1.1.tar.gz 35475 BLAKE2B 99ffece901878fc966e0314886ca20255834c76b9266b1806acda7afb84d6a358c556b9a88c10497d2874d7902fac5905907ab25fefb4ba38544d46e3bae1471 SHA512 e0a8632b9391c7e7b35e371f4e95899ec58adb4988f1fe5a7101310f7c774c3a3e88073f156cf7799c57f69c0fc53aff4486beb1e7006bfaa96d86e248e38897

diff --git a/dev-lua/lua-utf8/files/lua-utf8.Makefile b/dev-lua/lua-utf8/files/lua-utf8.Makefile
new file mode 100644
index 00000000000..ebbaecefea6
--- /dev/null
+++ b/dev-lua/lua-utf8/files/lua-utf8.Makefile
@@ -0,0 +1,41 @@
+# this file builds lua-utf8
+
+MY_USE_LUA?=luajit
+PKG_CONFIG?=pkg-config
+PREFIX?=/usr/local
+DESTDIR?=/
+
+LUA_LIBDIR      := $(shell $(PKG_CONFIG) --variable INSTALL_CMOD $(MY_USE_LUA))
+LUA_INC         := $(shell $(PKG_CONFIG) --variable INSTALL_INC $(MY_USE_LUA))
+LUA_SHARE       := $(shell $(PKG_CONFIG) --variable INSTALL_LMOD $(MY_USE_LUA))
+CWARNS          := -Wall -pedantic
+CFLAGS          += -I$(LUA_INC) -fPIC $(CWARNS)
+LIB_OPTION      := -shared
+
+SONAME          := lua-utf8.so
+SONAMEV         := $(SONAME).0
+LIBRARY         := $(SONAMEV).1.1
+SRC             := lutf8lib.c
+OBJ             := $(patsubst %.c, %.o, $(SRC))
+
+FILES           := parseucd.lua
+
+all: $(LIBRARY) $(SONAMEV) $(SONAME)
+
+$(SONAMEV):
+	ln -s $(LIBRARY) $@
+
+$(SONAME):
+	ln -s $(SONAMEV) $@
+
+$(LIBRARY): $(OBJ)
+	$(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBRARY) $(OBJ) -lc
+
+install:
+	install -d $(DESTDIR)$(LUA_LIBDIR)
+	install $(SONAME) $(DESTDIR)$(LUA_LIBDIR)
+	install -d $(DESTDIR)$(LUA_SHARE)
+	install --mode=0444 $(FILES) $(DESTDIR)$(LUA_SHARE)
+
+clean:
+	rm -rf $(LIBRARY) $(SONAMEV) $(SONAME) *.o

diff --git a/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
new file mode 100644
index 00000000000..00f5147b88b
--- /dev/null
+++ b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="UTF-8 support for Lua"
+HOMEPAGE="https://github.com/starwing/luautf8"
+SRC_URI="https://github.com/starwing/luautf8/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="luajit test"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="virtual/pkgconfig"
+RDEPEND="
+	!luajit? ( >=dev-lang/lua-5.1:= )
+	luajit? ( dev-lang/luajit:2 )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN//-/}-${PV}"
+
+src_prepare() {
+	default
+
+	cp -v ${FILESDIR}/${PN}.Makefile ${S}/Makefile || die
+}
+
+src_compile() {
+	emake DESTDIR="${D}" PREFIX="${EPREFIX}" MY_USE_LUA="$(usex luajit 'luajit' 'lua')" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+	emake DESTDIR="${D}" PREFIX="${EPREFIX}" MY_USE_LUA="$(usex luajit 'luajit' 'lua')" PKG_CONFIG="$(tc-getPKG_CONFIG)" install
+	einstalldocs
+}
+
+src_test() {
+	LUA_CPATH=./src/?.so $(usex luajit 'luajit' 'lua') test.lua || die
+}

diff --git a/dev-lua/lua-utf8/metadata.xml b/dev-lua/lua-utf8/metadata.xml
new file mode 100644
index 00000000000..efc3ff44560
--- /dev/null
+++ b/dev-lua/lua-utf8/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>vpayno+gentoo@gmail.com</email>
+		<name>Victor Payno</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>gyakovlev@gentoo.org</email>
+		<name>Georgy Yakovlev</name>
+	</maintainer>
+	<longdescription lang="en">
+		This module adds UTF-8 support to Lua.
+
+		It use data extracted from Unicode Character Database, and tested on Lua 5.2.3, Lua 5.3.0 and LuaJIT.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">starwing/luautf8</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lua/lua-utf8/files/, dev-lua/lua-utf8/
@ 2020-03-15 23:22 Georgy Yakovlev
  0 siblings, 0 replies; 2+ messages in thread
From: Georgy Yakovlev @ 2020-03-15 23:22 UTC (permalink / raw
  To: gentoo-commits

commit:     52d57339a18d20c00421f235006ba65e0a4248e0
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 15 23:19:13 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 23:22:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52d57339

dev-lua/lua-utf8: QA: quoting, respect LDFLAGS and CC, fix tests

Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-lua/lua-utf8/files/lua-utf8.Makefile | 3 ++-
 dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild   | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dev-lua/lua-utf8/files/lua-utf8.Makefile b/dev-lua/lua-utf8/files/lua-utf8.Makefile
index ebbaecefea6..456c52f4aaa 100644
--- a/dev-lua/lua-utf8/files/lua-utf8.Makefile
+++ b/dev-lua/lua-utf8/files/lua-utf8.Makefile
@@ -11,6 +11,7 @@ LUA_SHARE       := $(shell $(PKG_CONFIG) --variable INSTALL_LMOD $(MY_USE_LUA))
 CWARNS          := -Wall -pedantic
 CFLAGS          += -I$(LUA_INC) -fPIC $(CWARNS)
 LIB_OPTION      := -shared
+LDFLAGS         += $(LIB_OPTION)
 
 SONAME          := lua-utf8.so
 SONAMEV         := $(SONAME).0
@@ -29,7 +30,7 @@ $(SONAME):
 	ln -s $(SONAMEV) $@
 
 $(LIBRARY): $(OBJ)
-	$(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBRARY) $(OBJ) -lc
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $(LIBRARY) $(OBJ) -lc
 
 install:
 	install -d $(DESTDIR)$(LUA_LIBDIR)

diff --git a/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
index 00f5147b88b..7daf5890116 100644
--- a/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
+++ b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
@@ -26,10 +26,11 @@ S="${WORKDIR}/${PN//-/}-${PV}"
 src_prepare() {
 	default
 
-	cp -v ${FILESDIR}/${PN}.Makefile ${S}/Makefile || die
+	cp -v "${FILESDIR}/${PN}".Makefile "${S}"/Makefile || die
 }
 
 src_compile() {
+	tc-export CC
 	emake DESTDIR="${D}" PREFIX="${EPREFIX}" MY_USE_LUA="$(usex luajit 'luajit' 'lua')" PKG_CONFIG="$(tc-getPKG_CONFIG)"
 }
 
@@ -39,5 +40,5 @@ src_install() {
 }
 
 src_test() {
-	LUA_CPATH=./src/?.so $(usex luajit 'luajit' 'lua') test.lua || die
+	LUA_CPATH=./?.so $(usex luajit 'luajit' 'lua') test.lua || die
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-15 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-15 23:22 [gentoo-commits] repo/gentoo:master commit in: dev-lua/lua-utf8/files/, dev-lua/lua-utf8/ Georgy Yakovlev
  -- strict thread matches above, loose matches on Subject: below --
2020-03-15 23:22 Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox