summaryrefslogtreecommitdiff
path: root/dev-lua/lpeg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
commitfab849d1daed0ba7f2ac497d07985c3dbb692543 (patch)
tree10baa743a5340b42ad538dd19d48669ccac209b1 /dev-lua/lpeg
parent73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff)
gentoo resync : 16.06.2019
Diffstat (limited to 'dev-lua/lpeg')
-rw-r--r--dev-lua/lpeg/Manifest3
-rw-r--r--dev-lua/lpeg/files/lpeg-1.0.2-makefile.patch31
-rw-r--r--dev-lua/lpeg/lpeg-1.0.2.ebuild53
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-lua/lpeg/Manifest b/dev-lua/lpeg/Manifest
index 0fee4f5eaec3..c7c242bd369c 100644
--- a/dev-lua/lpeg/Manifest
+++ b/dev-lua/lpeg/Manifest
@@ -1,4 +1,7 @@
AUX lpeg-0.12.1-makefile.patch 820 BLAKE2B 8706c3ee0588efc0c3d072d713cf1a8b0ca7653c6701eafe9ec9b3e5284a2ff8b7f989fb65425840da0513e719fe5fa820deb4814d3e838dd5b33651eb4e3c4e SHA512 8f49c6c3b1575cc77d0d9d6c8b75098889af1f8fda58fee1f58150669909e6c4ecbd953738e9c917adcbb1bddc16debe5564b70694d6983295439e06e26782d6
+AUX lpeg-1.0.2-makefile.patch 671 BLAKE2B 4ed03dc08e737fe6cc45f4fe9c53657a71341cac69a3ec6fa52d124dbf5c3b58bcf1077d255598f98952eb2329905a25b45e4c031ab9fb82700d919d7f264452 SHA512 0d17351cda382ddb5574f7d14bc6479439cc703ac0c360b2b0f043288427beda9aea1f229fd2e0ea8b604bd935bce2fc959a2410804bfd82bb2c2e128ab501ac
DIST lpeg-1.0.1.tar.gz 71527 BLAKE2B 5f19d308572f2d7a5ff11d7aa33f437ec682994d0a396a322764cf12a4cb659c66ce6ffaf0c76f6a250a7d767b6545478dd3bb760150b9f88be41fac9dafde0d SHA512 7b43fbee7eff443000986684bc56bba6d2796a31cf860740746c70e155bdea1b62a46b93f97e2747e3ef0f63e965148778ac2985d0f2d83e1e37ec4ebbabf4aa
+DIST lpeg-1.0.2.tar.gz 71840 BLAKE2B e0d8fb4e9d17c9018f0b206cd3f7c9c0e21398c119600b5b0705c8df19e0956347bea795c7c3ded8e62e0c09802dd8eab931a5e3769fcacf44c35aa2b17fa8d6 SHA512 110527ddf9f8e5e8a80ef0ae8847c8ba8cd2597dba3bfe2865cba9af60daafbb885f21e74231952f5ab793d021e050b482066a821c6954d52090a5eae77e9814
EBUILD lpeg-1.0.1.ebuild 1246 BLAKE2B 3bd53964f81605c56758395984aaaf815a50bef2e03346a5dc658ac46d98d76c16f18df8af7a2224995206d49397cff0281b750a6b1aabc90a8e40ae2497cc06 SHA512 5a364050082fba5a1e1aa598d0892cbbe915b540981d99807b461346f98671ad8707286467243cc1f1f04014d455df747891dc23376e4ecabd13fc4408e6d0b5
+EBUILD lpeg-1.0.2.ebuild 1241 BLAKE2B 8ca6008090465d46fb8946c2d0d8d1e122014683afa756dccd4d16cbc4ea4455f3da24708598126e9bc4955274b18be200e01e4ae93ff5e98ffed15dbf30fc45 SHA512 b253d69d8ab5919e05f501194897ab4f78609bed58764953c31d32b69854445254099b00446461ba888acbe599a24a011722d1c70ce6e21b80554e9934c26b52
MISC metadata.xml 257 BLAKE2B fd30d59ebbc18529dbfe65cbec91247e5ad57a53f834d3abc85cbc18af964033e42dda00052b47281a9a85964b190a83c2c8a6eb30f4a9d38894de51d41d9de8 SHA512 06c87d68775d3b524abb426701b16341156bd54f2553b7a0f14a62ca5492c20bf9ff1719084e225ae5fc44c5b518a71258e1138e19551bfcfe828a11dffb12c4
diff --git a/dev-lua/lpeg/files/lpeg-1.0.2-makefile.patch b/dev-lua/lpeg/files/lpeg-1.0.2-makefile.patch
new file mode 100644
index 000000000000..ec8150443da4
--- /dev/null
+++ b/dev-lua/lpeg/files/lpeg-1.0.2-makefile.patch
@@ -0,0 +1,31 @@
+Respect user CFLAGS and LDFLAGS.
+
+--- lpeg-1.0.2/makefile
++++ lpeg-1.0.2/makefile
+@@ -1,7 +1,7 @@
+ LIBNAME = lpeg
+ LUADIR = ../lua/
+
+-COPT = -O2 -DNDEBUG
++COPT = -DNDEBUG
+ # COPT = -g
+
+ CWARNS = -Wall -Wextra -pedantic \
+@@ -22,7 +22,7 @@
+ # -Wunreachable-code \
+
+
+-CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
++CFLAGS += $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
+ CC = gcc
+
+ FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
+@@ -36,7 +36,7 @@
+ $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
+
+ lpeg.so: $(FILES)
+- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
++ env $(CC) $(DLLFLAGS) $(LDFLAGS) $(FILES) -o lpeg.so
+
+ $(FILES): makefile
+
diff --git a/dev-lua/lpeg/lpeg-1.0.2.ebuild b/dev-lua/lpeg/lpeg-1.0.2.ebuild
new file mode 100644
index 000000000000..5596fb03b62e
--- /dev/null
+++ b/dev-lua/lpeg/lpeg-1.0.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Parsing Expression Grammars for Lua"
+HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
+SRC_URI="http://www.inf.puc-rio.br/~roberto/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug doc luajit"
+
+RDEPEND="
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:2= )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( HISTORY )
+HTML_DOCS=( lpeg.html re.html )
+PATCHES=( "${FILESDIR}"/${PN}-1.0.2-makefile.patch )
+
+src_prepare() {
+ default
+ use debug && append-cflags -DLPEG_DEBUG
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ LUADIR="$($(tc-getPKG_CONFIG) --variable includedir $(usex luajit 'luajit' 'lua'))"
+}
+
+src_test() {
+ $(usex luajit 'luajit' 'lua') test.lua || die
+}
+
+src_install() {
+ local instdir
+ instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
+ exeinto "${instdir#${EPREFIX}}"
+ doexe lpeg.so
+ instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
+ insinto "${instdir#${EPREFIX}}"
+ doins re.lua
+
+ use doc && einstalldocs
+}