summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorraingloom2017-05-02 15:27:57 +0200
committerraingloom2017-05-02 15:27:57 +0200
commit56435ee07e001e263e4ff4ae42699709824ac7d9 (patch)
treec269e9a834e5ae12dd42967391e1790cb7ca803e
downloadaur-56435ee07e001e263e4ff4ae42699709824ac7d9.tar.gz
init
-rw-r--r--.SRCINFO20
-rw-r--r--LICENSE30
-rw-r--r--PKGBUILD58
-rw-r--r--liblua.so.patch67
-rw-r--r--lua.pc20
5 files changed, 195 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..815478b49e2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = eris
+ pkgdesc = Heavy Duty Persistence for Lua 5.3
+ pkgver = 1.1.2
+ pkgrel = 1
+ url = https://github.com/fnuecke/eris
+ arch = any
+ license = MIT
+ depends = readline
+ options = !emptydirs
+ source = https://github.com/fnuecke/eris/archive/v1.1.2-lua5.3.tar.gz
+ source = liblua.so.patch
+ source = lua.pc
+ source = LICENSE
+ sha1sums = 77e2f1a5d5bfcdd8d829efdbe29f82680a8d3463
+ sha1sums = 9ff75085e476fa91bf5b528c9962908de80ba25a
+ sha1sums = 1aee8d1a219639d0efc534e483ffa1ee236fb393
+ sha1sums = 05f5f3b7bef0258bd617c505b8992de639af4551
+
+pkgname = eris
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000000..40ec0416810
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+License
+
+Lua is free software distributed under the terms of the MIT license
+reproduced below; it may be used for any purpose, including commercial
+purposes, at absolutely no cost without having to ask us. The only
+requirement is that if you do use Lua, then you should give us credit
+by including the appropriate copyright notice somewhere in your
+product or its documentation.
+
+ Copyright © 1994–2015 Lua.org, PUC-Rio.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use, copy,
+ modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..20653ec198d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 288140 2017-02-06 17:03:06Z anatolik $
+# Maintainer: raingloom <raingloom42@gmail.com>
+
+# based on the official Lua PKGBUILD
+
+pkgname=eris
+pkgver=1.1.2
+_luaname=lua
+_luaver='5.3.4'
+_majorver=${_luaver%.*}
+pkgrel=1
+pkgdesc='Heavy Duty Persistence for Lua 5.3'
+arch=('any')
+url='https://github.com/fnuecke/eris'
+depends=('readline')
+license=('MIT')
+options=('!emptydirs')
+source=("https://github.com/fnuecke/eris/archive/v${pkgver}-lua5.3.tar.gz"
+ liblua.so.patch
+ lua.pc
+ LICENSE)
+sha1sums=('77e2f1a5d5bfcdd8d829efdbe29f82680a8d3463'
+ '9ff75085e476fa91bf5b528c9962908de80ba25a'
+ '1aee8d1a219639d0efc534e483ffa1ee236fb393'
+ '05f5f3b7bef0258bd617c505b8992de639af4551')
+
+prepare() {
+ cd "$pkgname-$pkgver-lua5.3"
+ patch -p1 -i ../liblua.so.patch
+
+ sed "s/%VER%/$_majorver/g;s/%REL%/$_luaver/g" ../lua.pc > lua.pc
+}
+
+build() {
+ cd "$pkgname-$pkgver-lua5.3"
+
+ # quite a lot of packages still use lua 5.1 API, enable 5.1 compat mode
+ make MYCFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" MYLDFLAGS="$LDFLAGS" linux
+}
+
+package() {
+ cd "$pkgname-$pkgver-lua5.3"
+
+ make \
+ TO_LIB="liblua.a liblua.so liblua.so.$_majorver liblua.so.$_luaver" \
+ INSTALL_DATA='cp -d' \
+ INSTALL_TOP="$pkgdir"/usr \
+ INSTALL_MAN="$pkgdir"/usr/share/man/man1 \
+ install
+ ln -sf /usr/bin/lua "$pkgdir"/usr/bin/lua$_majorver
+ ln -sf /usr/bin/luac "$pkgdir"/usr/bin/luac$_majorver
+
+ install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/${pkgname}53.pc
+ ln -sf /usr/lib/pkgconfig/${pkgname}53.pc "$pkgdir"/usr/lib/pkgconfig/$pkgname.pc
+
+ install -d "$pkgdir"/usr/share/doc/$pkgname
+ install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/liblua.so.patch b/liblua.so.patch
new file mode 100644
index 00000000000..b292083054a
--- /dev/null
+++ b/liblua.so.patch
@@ -0,0 +1,67 @@
+diff --git a/Makefile b/Makefile
+index ae9c8b7..d93b921 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,7 +52,7 @@ R= $V.4
+ all: $(PLAT)
+
+ $(PLATS) clean:
+- cd src && $(MAKE) $@
++ cd src && $(MAKE) $@ V=$(V) R=$(R)
+
+ test: dummy
+ src/lua -v
+@@ -63,7 +63,6 @@ install: dummy
+ cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
+ cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+ cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
+
+ uninstall:
+ cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
+diff --git a/src/Makefile b/src/Makefile
+index 0770231..e7fe6df 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -29,6 +29,7 @@ MYOBJS=eris.o
+ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
+
+ LUA_A= liblua.a
++LUA_SO= liblua.so
+ CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
+ lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
+ ltm.o lundump.o lvm.o lzio.o
+@@ -49,7 +50,7 @@ TESTUP_T= ../test/unpersist
+ TESTUP_O= ../test/unpersist.o
+
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) $(TESTP_O) $(TESTUP_O)
+-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(TESTP_T) $(TESTUP_T)
++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(TESTP_T) $(TESTUP_T) $(LUA_SO)
+ ALL_A= $(LUA_A)
+
+ # Targets start here.
+@@ -65,6 +66,11 @@ $(LUA_A): $(BASE_O)
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
+
++$(LUA_SO):
++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
++ ln -sf $(LUA_SO).$(R) $(LUA_SO)
++
+ $(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+diff --git a/src/luaconf.h b/src/luaconf.h
+index f37bea0..e963d48 100644
+--- a/src/luaconf.h
++++ b/src/luaconf.h
+@@ -200,7 +200,7 @@
+
+ #else /* }{ */
+
+-#define LUA_ROOT "/usr/local/"
++#define LUA_ROOT "/usr/"
+ #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
+ #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
+ #define LUA_PATH_DEFAULT \
diff --git a/lua.pc b/lua.pc
new file mode 100644
index 00000000000..bf7977bcd7c
--- /dev/null
+++ b/lua.pc
@@ -0,0 +1,20 @@
+V=%VER%
+R=%REL%
+
+prefix=/usr
+INSTALL_BIN=${prefix}/bin
+INSTALL_INC=${prefix}/include
+INSTALL_LIB=${prefix}/lib
+INSTALL_MAN=${prefix}/man/man1
+INSTALL_LMOD=${prefix}/share/lua/${V}
+INSTALL_CMOD=${prefix}/lib/lua/${V}
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: ${R}
+Requires:
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}