diff options
author | Eduardo Bart | 2019-06-21 10:41:07 -0300 |
---|---|---|
committer | Eduardo Bart | 2019-06-21 10:41:07 -0300 |
commit | 43015adac89d45d9bd981522bed3f6be1be5d338 (patch) | |
tree | 3b92e3751ed071779ea0b9a22e246d8592b272ab | |
download | aur-43015adac89d45d9bd981522bed3f6be1be5d338.tar.gz |
First commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | LICENSE | 30 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | liblua.so.patch | 59 | ||||
-rw-r--r-- | lua.pc | 20 |
5 files changed, 190 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..71b355fe4525 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = lua54 + pkgdesc = Powerful lightweight programming language designed for extending applications + pkgver = 5.4.0_alpha_rc2 + pkgrel = 1 + url = https://www.lua.org/ + arch = x86_64 + license = MIT + depends = readline + options = !emptydirs + source = https://www.lua.org/work/lua-5.4.0-alpha-rc2.tar.gz + source = liblua.so.patch + source = lua.pc + source = LICENSE + sha512sums = 410df708b89a53f73d4165014ed9353275404e0ae40704d7bd883724cfbeb9800022442de4e842998b4db18d6ee6bbd3ae7d35391a7d23fb1ea1edd9b94a01b2 + sha512sums = 09f5e567ea18e6bcd7d99384e136ffb091f8bfd6fac08a9ed97c549f9ba210214e1da363e07e9836e3610fb2a343ef572f159defbb12b3477412e2d92c6225dc + sha512sums = a3ae5f5c63a27956a2c69464cf966512be7404aef72d49b0b3b17e35999ceed04ec7be12ef19269f4cac908141b98dd5d16df9c238823fe0c1e068212914657a + sha512sums = bef221ae96e72d11785ec608ce96fa688ce4e12fecaaadc8c3e38d7d153922f4fdd2cf06a47e9f8840a165d42d9aa31f44c322f5c6c8402e8e31475de4e5893b + +pkgname = lua54 + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..3ef29409a1e7 --- /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–2012 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 000000000000..c19e2b474855 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +pkgname=lua54 +_pkgver=5.4.0 +_pkgaver=$_pkgver-alpha +_pkgrver=$_pkgaver-rc2 +pkgver=${_pkgrver//\-/_} +pkgrel=1 +pkgdesc='Powerful lightweight programming language designed for extending applications' +arch=('x86_64') +url='https://www.lua.org/' +depends=('readline') +license=('MIT') +options=('!emptydirs') +source=(https://www.lua.org/work/lua-$_pkgrver.tar.gz + liblua.so.patch + lua.pc + LICENSE) +sha512sums=('410df708b89a53f73d4165014ed9353275404e0ae40704d7bd883724cfbeb9800022442de4e842998b4db18d6ee6bbd3ae7d35391a7d23fb1ea1edd9b94a01b2' + '09f5e567ea18e6bcd7d99384e136ffb091f8bfd6fac08a9ed97c549f9ba210214e1da363e07e9836e3610fb2a343ef572f159defbb12b3477412e2d92c6225dc' + 'a3ae5f5c63a27956a2c69464cf966512be7404aef72d49b0b3b17e35999ceed04ec7be12ef19269f4cac908141b98dd5d16df9c238823fe0c1e068212914657a' + 'bef221ae96e72d11785ec608ce96fa688ce4e12fecaaadc8c3e38d7d153922f4fdd2cf06a47e9f8840a165d42d9aa31f44c322f5c6c8402e8e31475de4e5893b') + +prepare() { + cd lua-$_pkgaver + patch -p1 -i ../liblua.so.patch + + sed "s/%VER%/${_pkgver%.*}/g;s/%REL%/$_pkgver/g" ../lua.pc > lua.pc + sed -e 's:llua:llua5.4:' -e 's:/include:/include/lua5.4:' -i lua.pc + sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.4/' -e '/^LUAC_T=/ s/luac/luac5.4/' -i src/Makefile +} + +build() { + cd lua-$_pkgaver + + make MYCFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2" MYLDFLAGS="$LDFLAGS" linux +} + +package() { + cd lua-$_pkgaver + + make \ + TO_BIN='lua5.4 luac5.4' \ + TO_LIB="liblua5.4.a liblua5.4.so liblua5.4.so.5.4 liblua5.4.so.$_pkgver" \ + INSTALL_DATA='cp -d' \ + INSTALL_TOP="$pkgdir"/usr \ + INSTALL_INC="$pkgdir"/usr/include/lua5.4 \ + INSTALL_MAN="$pkgdir"/usr/share/man/man1 \ + install + + install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/$pkgname.pc + + install -d "$pkgdir"/usr/share/doc/$pkgname + install -m644 doc/*.{gif,png,css,html} "$pkgdir"/usr/share/doc/$pkgname + install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + ln -s liblua5.4.so "$pkgdir"/usr/lib/liblua.so.5.4 + ln -s liblua5.4.so "$pkgdir"/usr/lib/liblua.so.$_pkgver + + cd "$pkgdir"/usr/share/man/man1 + mv lua.1 lua5.4.1 + mv luac.1 luac5.4.1 +} diff --git a/liblua.so.patch b/liblua.so.patch new file mode 100644 index 000000000000..9217e34d6083 --- /dev/null +++ b/liblua.so.patch @@ -0,0 +1,59 @@ +diff --git a/Makefile b/Makefile +index 7fa91c8..dccf485 100644 +--- a/Makefile ++++ b/Makefile +@@ -52,7 +52,7 @@ R= $V.0 + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=$(V) R=$(R) + + test: dummy + src/lua -v +diff --git a/src/Makefile b/src/Makefile +index 2e7a412..fa5769f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,6 +29,7 @@ + PLATS= aix bsd c89 freebsd generic guess linux linux-readline 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 + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -40,7 +41,7 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -56,6 +57,11 @@ + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(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 fd28d21..e2662cc 100644 +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -175,7 +175,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 \
\ No newline at end of file diff --git a/lua.pc b/lua.pc new file mode 100644 index 000000000000..bf7977bcd7ca --- /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} |