diff --git a/srcpkgs/lua-devel b/srcpkgs/lua-devel new file mode 120000 index 0000000000..9ad5171cee --- /dev/null +++ b/srcpkgs/lua-devel @@ -0,0 +1 @@ +lua \ No newline at end of file diff --git a/srcpkgs/lua/depends b/srcpkgs/lua/depends new file mode 100644 index 0000000000..b2999dafcf --- /dev/null +++ b/srcpkgs/lua/depends @@ -0,0 +1,2 @@ +abi_depends=">=5.1.4" +api_depends="${abi_depends}" diff --git a/srcpkgs/lua/lua-devel.template b/srcpkgs/lua/lua-devel.template new file mode 100644 index 0000000000..2168a647c5 --- /dev/null +++ b/srcpkgs/lua/lua-devel.template @@ -0,0 +1,20 @@ +# Template file for 'lua-devel'. +# +short_desc="${short_desc} - development files" +long_desc="${long_desc} + + This package contains files for development, headers, static libs, etc." + +Add_dependency run ncurses-devel +Add_dependency run readline-devel +Add_dependency run lua + +do_install() +{ + install -d ${DESTDIR}/usr/{lib,share} + + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/lib*.*a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share/doc ${DESTDIR}/usr/share +} diff --git a/srcpkgs/lua/patches/lua-5.1-cflags.diff b/srcpkgs/lua/patches/lua-5.1-cflags.diff new file mode 100644 index 0000000000..db658aecad --- /dev/null +++ b/srcpkgs/lua/patches/lua-5.1-cflags.diff @@ -0,0 +1,13 @@ +diff -Naur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile +--- lua-5.1.orig/src/Makefile 2006-02-16 16:45:09.000000000 +0100 ++++ lua-5.1/src/Makefile 2006-03-01 14:55:29.000000000 +0100 +@@ -8,7 +8,8 @@ + PLAT= none + + CC= gcc +-CFLAGS= -O2 -Wall $(MYCFLAGS) ++CFLAGS ?= -O2 -Wall ++CFLAGS += $(MYCFLAGS) + AR= ar rcu + RANLIB= ranlib + RM= rm -f diff --git a/srcpkgs/lua/patches/lua-arch.patch b/srcpkgs/lua/patches/lua-arch.patch new file mode 100644 index 0000000000..cc1f3ce1ba --- /dev/null +++ b/srcpkgs/lua/patches/lua-arch.patch @@ -0,0 +1,55 @@ +diff -ur lua-5.1.orig/etc/lua.pc lua-5.1/etc/lua.pc +--- lua-5.1.orig/etc/lua.pc 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/etc/lua.pc 2006-03-21 11:52:05.000000000 +0100 +@@ -6,7 +6,7 @@ + V= 5.1 + + # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +-prefix= /usr/local ++prefix= /usr + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include + INSTALL_LIB= ${prefix}/lib +diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile +--- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100 +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.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 +@@ -36,7 +37,7 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) + + default: $(PLAT) +@@ -51,6 +52,10 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? -lm $(MYLDFLAGS) ++ ln -s $@.5.1 $@ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +diff -ur lua-5.1.orig/src/luaconf.h lua-5.1/src/luaconf.h +--- lua-5.1.orig/src/luaconf.h 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/src/luaconf.h 2006-03-21 11:52:05.000000000 +0100 +@@ -82,7 +82,7 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ diff --git a/srcpkgs/lua/template b/srcpkgs/lua/template new file mode 100644 index 0000000000..e52d1c37b1 --- /dev/null +++ b/srcpkgs/lua/template @@ -0,0 +1,47 @@ +# Template file for 'lua' +pkgname=lua +version=5.1.4 +patch_args="-Np1" +distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz" +build_style=custom-install +short_desc="Lua is a powerful, fast, lightweight, embeddable scripting language." +maintainer="Robert Djubek " +homepage="http://www.lua.org" +license="MIT" +checksum=b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a +long_desc=" +Lua combines simple procedural syntax with powerful data description +constructs based on associative arrays and extensible semantics. Lua +is dynamically typed, runs by interpreting bytecode for a register-based +virtual machine, and has automatic memory management with incremental +garbage collection, making it ideal for configuration, scripting, and +rapid prototyping." + +subpackages="lua-devel" + +Add_dependency run glibc +Add_dependency run ncurses-libs +Add_dependency run readline +Add_dependency build ncurses-devel +Add_dependency build readline-devel + +do_build() +{ + export CFLAGS="$XBPS_CFLAGS -fPIC" + make INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux +} + +do_install() +{ + make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \ + TO_LIB="liblua.a liblua.so liblua.so.5.1" \ + INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install + install -Dm 644 etc/lua.pc ${DESTDIR}/usr/lib/pkgconfig/lua.pc + install -Dm644 COPYRIGHT \ + ${DESTDIR}/usr/share/licenses/${pkgname}/COPYRIGHT + + # Install the documentation + mkdir -p ${DESTDIR}/usr/share/doc/lua + cp -R doc/* ${DESTDIR}/usr/share/doc/lua + cd ${DESTDIR}/usr/lib && ln -sf liblua.so.5.1 liblua.so.5 +} diff --git a/xbps-src/common/mapping_shlib_binpkg.txt b/xbps-src/common/mapping_shlib_binpkg.txt index 19c9d9d823..dfacaf33b5 100644 --- a/xbps-src/common/mapping_shlib_binpkg.txt +++ b/xbps-src/common/mapping_shlib_binpkg.txt @@ -132,6 +132,7 @@ libnl.so libnl libnl-devel libssl.so libssl openssl-devel libcrypto.so libssl openssl-devel libreadline.so readline readline-devel +libhistory.so readline readline-devel libxfcegui4.so libxfcegui4 libxfcegui4-devel libxfce4kbd-private.so libxfcegui4 libxfcegui4-devel libxfce4menu-0.1.so libxfce4menu libxfce4menu-devel