lua.guncellendi
This commit is contained in:
		
							parent
							
								
									ad3a32ae7c
								
							
						
					
					
						commit
						3f366abf54
					
				
					 4 changed files with 125 additions and 16 deletions
				
			
		
							
								
								
									
										30
									
								
								talimatname/genel/lua/LICENSE
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								talimatname/genel/lua/LICENSE
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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.  
 | 
			
		||||
							
								
								
									
										60
									
								
								talimatname/genel/lua/liblua.so.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								talimatname/genel/lua/liblua.so.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,60 @@
 | 
			
		|||
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 @@ MYOBJS=
 | 
			
		||||
 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
 | 
			
		||||
@@ -43,7 +44,7 @@ LUAC_T=	luac
 | 
			
		||||
 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.
 | 
			
		||||
@@ -59,6 +60,12 @@ $(LUA_A): $(BASE_O)
 | 
			
		||||
 	$(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  \
 | 
			
		||||
| 
						 | 
				
			
			@ -4,23 +4,42 @@
 | 
			
		|||
# Depends on:
 | 
			
		||||
 | 
			
		||||
name=lua
 | 
			
		||||
version=5.3.2
 | 
			
		||||
release=2
 | 
			
		||||
version=5.3.4
 | 
			
		||||
_majorver=${version%.*}
 | 
			
		||||
release=1
 | 
			
		||||
 | 
			
		||||
source=(https://www.lua.org/ftp/lua-$version.tar.gz
 | 
			
		||||
        liblua.so.patch
 | 
			
		||||
        lua.pc
 | 
			
		||||
        LICENSE)
 | 
			
		||||
        
 | 
			
		||||
source=(http://www.lua.org/ftp/$name-$version.tar.gz lua.pc
 | 
			
		||||
	http://www.linuxfromscratch.org/patches/blfs/svn/$name-$version-shared_library-1.patch)
 | 
			
		||||
build() {
 | 
			
		||||
	cd $name-$version
 | 
			
		||||
	patch -Np1 -i ../$name-$version-shared_library-1.patch
 | 
			
		||||
	sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h
 | 
			
		||||
 | 
			
		||||
    	make linux
 | 
			
		||||
	make INSTALL_TOP=$PKG/usr  TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.2" \
 | 
			
		||||
	INSTALL_DATA="cp -d" INSTALL_MAN=$PKG/usr/share/man/man1 install
 | 
			
		||||
	mkdir -pv $PKG/usr/share/doc/$name-$version
 | 
			
		||||
	cp -v doc/*.{html,css,gif,png} $PKG/usr/share/doc/$name-$version
 | 
			
		||||
	mkdir -p $PKG/usr/lib/pkgconfig
 | 
			
		||||
	sed "s/%VER%/$_majorver/g;s/%REL%/$pkgver/g" ../lua.pc \
 | 
			
		||||
> $PKG/usr/lib/pkgconfig/lua.pc
 | 
			
		||||
	cd $SRC/lua-$version
 | 
			
		||||
	patch -p1 -i ../liblua.so.patch
 | 
			
		||||
 | 
			
		||||
	sed "s/%VER%/$_majorver/g;s/%REL%/$version/g" ../lua.pc > lua.pc
 | 
			
		||||
 | 
			
		||||
	# 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
 | 
			
		||||
	
 | 
			
		||||
	make \
 | 
			
		||||
	TO_LIB="liblua.a liblua.so liblua.so.$_majorver liblua.so.$version" \
 | 
			
		||||
	INSTALL_DATA='cp -d' \
 | 
			
		||||
	INSTALL_TOP="$PKG"/usr \
 | 
			
		||||
	INSTALL_MAN="$PKG"/usr/share/man/man1 \
 | 
			
		||||
	install
 | 
			
		||||
 | 
			
		||||
	ln -sf /usr/bin/lua "$PKG"/usr/bin/lua$_majorver
 | 
			
		||||
	ln -sf /usr/bin/luac "$PKG"/usr/bin/luac$_majorver
 | 
			
		||||
	ln -sf /usr/lib/liblua.so.$version "$PKG"/usr/lib/liblua$_majorver.so
 | 
			
		||||
 | 
			
		||||
	install -Dm644 lua.pc "$PKG"/usr/lib/pkgconfig/${name}53.pc
 | 
			
		||||
	ln -sf /usr/lib/pkgconfig/${name}53.pc "$PKG"/usr/lib/pkgconfig/$name.pc
 | 
			
		||||
 | 
			
		||||
	install -d "$PKG"/usr/share/doc/$name
 | 
			
		||||
	install -m644 doc/*.{gif,png,css,html} "$PKG"/usr/share/doc/$name
 | 
			
		||||
	install -Dm644 ../LICENSE "$PKG"/usr/share/licenses/$name/LICENSE
 | 
			
		||||
	rm -r $PKG/usr/share/doc
 | 
			
		||||
	rm -r $PKG/usr/share/man
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue