* [gentoo-commits] proj/lua:master commit in: dev-lang/luajit/files/, dev-lang/luajit/
@ 2013-03-17 17:44 Vadim A. Misbakh-Soloviov
0 siblings, 0 replies; 2+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2013-03-17 17:44 UTC (permalink / raw
To: gentoo-commits
commit: d2ccc7f21c510f4cee0059376655d5dd4798e719
Author: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
AuthorDate: Fri Mar 15 08:52:50 2013 +0000
Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Fri Mar 15 08:53:05 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lua.git;a=commit;h=d2ccc7f2
[dev-lang/luajit] bump
Signed-off-by: Vadim A. Misbakh-Soloviov <mva <AT> mva.name>
---
dev-lang/luajit/Manifest | 4 +-
dev-lang/luajit/files/v2.0.1_hotfix1.patch | 103 ++++++++++++++++++++
dev-lang/luajit/luajit-1.1.8.ebuild | 66 -------------
...-2.0.0_beta10.ebuild => luajit-2.0.1_p1.ebuild} | 23 +++--
dev-lang/luajit/luajit-9999.ebuild | 30 +++---
5 files changed, 137 insertions(+), 89 deletions(-)
diff --git a/dev-lang/luajit/Manifest b/dev-lang/luajit/Manifest
index 9607ec9..aa8cbe1 100644
--- a/dev-lang/luajit/Manifest
+++ b/dev-lang/luajit/Manifest
@@ -1,2 +1,2 @@
-DIST LuaJIT-1.1.8.tar.gz 370928 SHA256 42f095d0215d76c29b7b040ad52dddc1783ffc6e3021b8a831627973a8a32862 SHA512 2644a1d1ceffc2a74c2235fcbffb985248d0c2a896de674408594ebb5115f292dd5b2a1a2b73afb866acb8f0782de809ec45876229f9e6cfd13b8448a0d2114a WHIRLPOOL 3e2611d149b8692948fd225f202cbdbd620c3c46ab11281e86d59aa30a6d60e48545d5514154c3798fe5e1eae3360e514a466a226420861bff31293b7d309a50
-DIST LuaJIT-2.0.0-beta10.tar.gz 890830 SHA256 750e9317ca2c61fa17e739abc582c55c1fe69749ba65442dfd7f04ce20cf9ff6 SHA512 f3d4449b8b197247db9b5ec93a28a2db7a50f7b368afe0db40252f7db6504c51ce1c16e893eb7edcd91332a017419d06efcc2941c72c211af61d9e6bc3978ac5 WHIRLPOOL f3cad09cb86294a1dc70c4647eed51c26be8124ad0e913c070f59b1ff14cc16b7203c36c91311b165d683473e06c3148d1cfdaf21031dfb81cc41053777bd5d0
+DIST LuaJIT-2.0.0-beta9.tar.gz 814960 SHA256 da3793b4364a17c3700d39d13eae799b82ff23da1f61631d735de05333f46240 SHA512 14f100ea0ff243b070abedc30f029afdba1792ef41b7add86623b6ba3a0e733949fc7450c531f54e2f908e32cc013106b16031bcd99754a0342636c5b41bfbb6 WHIRLPOOL 8f86e3f209d1832d02327148b7dbb248599756fa1929f03435d03db080f8659518d920ec17b5f32f55431a605e0a4615bd07bf80138fd26ed7de0f70b2a9b0db
+DIST LuaJIT-2.0.1.tar.gz 841399 SHA256 2371cceb53453d8a7b36451e6a0ccdb66236924545d6042ddd4c34e9668990c0 SHA512 a5af5772d00dfedcf1c3449b1d74d45af25d111c91931735ad80f2c7a3b7837b51807eb3a0ce12688e38352ad32cdd70bea35b53906c945ddf86dfd706118518 WHIRLPOOL 42781f3d4efa9d515f7f1c879ffc45a13ab231c951a995eb0f1e89ff27c1dd6d0cee7795fd45dd169effc067c1bae5add36b290fd8f306f99a6ed0a99f4929ad
diff --git a/dev-lang/luajit/files/v2.0.1_hotfix1.patch b/dev-lang/luajit/files/v2.0.1_hotfix1.patch
new file mode 100644
index 0000000..0601cd9
--- /dev/null
+++ b/dev-lang/luajit/files/v2.0.1_hotfix1.patch
@@ -0,0 +1,103 @@
+Add missing GC steps for io.* functions.
+MIPS: Fix cache flush/sync for JIT-compiled code jump area.
+ARM: Fix cache flush/sync for exit stubs of JIT-compiled code.
+Fix MSVC intrinsics for older versions.
+Fix memory access check for fast string interning.
+
+--- a/src/lib_io.c
++++ b/src/lib_io.c
+@@ -17,6 +17,7 @@
+ #include "lualib.h"
+
+ #include "lj_obj.h"
++#include "lj_gc.h"
+ #include "lj_err.h"
+ #include "lj_str.h"
+ #include "lj_state.h"
+@@ -152,6 +153,7 @@ static int io_file_readline(lua_State *L, FILE *fp, MSize chop)
+ if (n >= m - 64) m += m;
+ }
+ setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++ lj_gc_check(L);
+ return (int)ok;
+ }
+
+@@ -163,6 +165,7 @@ static void io_file_readall(lua_State *L, FILE *fp)
+ n += (MSize)fread(buf+n, 1, m-n, fp);
+ if (n != m) {
+ setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++ lj_gc_check(L);
+ return;
+ }
+ }
+@@ -174,6 +177,7 @@ static int io_file_readlen(lua_State *L, FILE *fp, MSize m)
+ char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, m);
+ MSize n = (MSize)fread(buf, 1, m, fp);
+ setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++ lj_gc_check(L);
+ return (n > 0 || m == 0);
+ } else {
+ int c = getc(fp);
+--- a/src/lj_asm_arm.h
++++ b/src/lj_asm_arm.h
+@@ -91,6 +91,7 @@ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group)
+ *mxp++ = group*EXITSTUBS_PER_GROUP;
+ for (i = 0; i < EXITSTUBS_PER_GROUP; i++)
+ *mxp++ = ARMI_B|((-6-i)&0x00ffffffu);
++ lj_mcode_sync(as->mcbot, mxp);
+ lj_mcode_commitbot(as->J, mxp);
+ as->mcbot = mxp;
+ as->mclim = as->mcbot + MCLIM_REDZONE;
+--- a/src/lj_asm_mips.h
++++ b/src/lj_asm_mips.h
+@@ -71,6 +71,7 @@ static void asm_sparejump_setup(ASMState *as)
+ memset(mxp+2, 0, MIPS_SPAREJUMP*8);
+ mxp += MIPS_SPAREJUMP*2;
+ lua_assert(mxp < as->mctop);
++ lj_mcode_sync(as->mcbot, mxp);
+ lj_mcode_commitbot(as->J, mxp);
+ as->mcbot = mxp;
+ as->mclim = as->mcbot + MCLIM_REDZONE;
+--- a/src/lj_def.h
++++ b/src/lj_def.h
+@@ -243,17 +243,17 @@ static LJ_AINLINE uint32_t lj_getu32(const void *p)
+ #endif
+
+ #ifdef _M_PPC
+-#pragma intrinsic(_CountLeadingZeros)
+ unsigned int _CountLeadingZeros(long);
++#pragma intrinsic(_CountLeadingZeros)
+ static LJ_AINLINE uint32_t lj_fls(uint32_t x)
+ {
+ return _CountLeadingZeros(x) ^ 31;
+ }
+ #else
+-#pragma intrinsic(_BitScanForward)
+-#pragma intrinsic(_BitScanReverse)
+ unsigned char _BitScanForward(uint32_t *, unsigned long);
+ unsigned char _BitScanReverse(uint32_t *, unsigned long);
++#pragma intrinsic(_BitScanForward)
++#pragma intrinsic(_BitScanReverse)
+
+ static LJ_AINLINE uint32_t lj_ffs(uint32_t x)
+ {
+--- a/src/lj_str.c
++++ b/src/lj_str.c
+@@ -48,7 +48,7 @@ static LJ_AINLINE int str_fastcmp(const char *a, const char *b, MSize len)
+ {
+ MSize i = 0;
+ lua_assert(len > 0);
+- lua_assert((((uintptr_t)a + len) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4);
++ lua_assert((((uintptr_t)a+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4);
+ do { /* Note: innocuous access up to end of string + 3. */
+ uint32_t v = lj_getu32(a+i) ^ *(const uint32_t *)(b+i);
+ if (v) {
+@@ -121,7 +121,7 @@ GCstr *lj_str_new(lua_State *L, const char *str, size_t lenx)
+ h ^= b; h -= lj_rol(b, 16);
+ /* Check if the string has already been interned. */
+ o = gcref(g->strhash[h & g->strmask]);
+- if (LJ_LIKELY((((uintptr_t)str + len) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4)) {
++ if (LJ_LIKELY((((uintptr_t)str+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4)) {
+ while (o != NULL) {
+ GCstr *sx = gco2str(o);
+ if (sx->len == len && str_fastcmp(str, strdata(sx), len) == 0) {
diff --git a/dev-lang/luajit/luajit-1.1.8.ebuild b/dev-lang/luajit/luajit-1.1.8.ebuild
deleted file mode 100644
index 1c36b87..0000000
--- a/dev-lang/luajit/luajit-1.1.8.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: This ebuild is from Lua overlay; Bumped by mva; $
-
-EAPI="4"
-
-inherit pax-utils
-
-MY_P="LuaJIT-${PV}"
-
-DESCRIPTION="A Just-In-Time Compiler for the Lua programming language."
-HOMEPAGE="http://luajit.org/"
-SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="1"
-KEYWORDS="~amd64 ~x86"
-IUSE="readline"
-
-CDEPEND="dev-lang/lua"
-DEPEND="${CDEPEND}
- readline? ( sys-libs/readline )
- app-admin/eselect-luajit"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare(){
- # fixing prefix
- sed -i -e "s#/usr/local#${D}/usr#" Makefile \
- || die "failed to fix prefix in Makefile"
- sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h \
- || die "failed to fix prefix in luaconf.h"
-
- # forcing the use of our CFLAGS
- sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile \
- || die "failed to force the use of the CFLAGS from the user"
-}
-
-src_compile(){
- if use readline; then
- emake linux_rl || die "emake failed."
- else
- emake linux || die "emake failed."
- fi
-}
-
-src_install(){
- einstall
-
- # removing empty dir that was supposed to have the man pages.
- # dev-lang/luajit:1 doesn't install man pages.
- rm -rf "${D}usr/man"
-
- mv "${D}usr/bin/luajit" "${D}usr/bin/luajit-${PV}" || die "mv failed!"
- pax-mark m "${D}usr/bin/luajit-${PV}"
- dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}"
-}
-
-pkg_postinst() {
- einfo "!!!! This is old bugfix-only branch of LuaJIT. If you want more powerfull and !!!!"
- einfo "!!!! performance-improved LuaJIT version - please install dev-lang/luajit:2 !!!!"
- ewarn "Now you should select LuaJIT version to use as system default LuaJIT interpreter."
- ewarn "Use 'eselect luajit list' to look for installed versions and"
- ewarn "Use 'eselect luajit set <NUMBER_or_NAME>' to set version you chose."
-}
diff --git a/dev-lang/luajit/luajit-2.0.0_beta10.ebuild b/dev-lang/luajit/luajit-2.0.1_p1.ebuild
similarity index 87%
rename from dev-lang/luajit/luajit-2.0.0_beta10.ebuild
rename to dev-lang/luajit/luajit-2.0.1_p1.ebuild
index ff75757..a661b71 100644
--- a/dev-lang/luajit/luajit-2.0.0_beta10.ebuild
+++ b/dev-lang/luajit/luajit-2.0.1_p1.ebuild
@@ -2,11 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: This ebuild is from Lua overlay; Bumped by mva; $
-EAPI="4"
+EAPI="5"
inherit eutils multilib check-reqs pax-utils
-MY_P="LuaJIT-${PV/_/-}"
+MY_P="LuaJIT-${PV//_p*}"
DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
HOMEPAGE="http://luajit.org/"
SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
@@ -15,13 +15,20 @@ KEYWORDS="~amd64 ~x86"
LICENSE="MIT"
SLOT="2"
-IUSE="emacs +optimization symlink"
+IUSE="emacs +optimization symlink +interactive"
-CDEPEND=" symlink? ( =dev-lang/lua-headers-5.1* !dev-lang/lua )
- !symlink? ( =dev-lang/lua-5.1* )"
-DEPEND="${CDEPEND}
+CDEPEND="
+ symlink? ( =dev-lang/lua-headers-5.1* !dev-lang/lua )
+ !symlink? ( =dev-lang/lua-5.1* )
+"
+DEPEND="
+ ${CDEPEND}
emacs? ( app-emacs/lua-mode )
- app-admin/eselect-luajit"
+"
+PDEPEND="
+ interactive? ( dev-lua/iluajit )
+ virtual/lua
+"
S="${WORKDIR}/${MY_P}"
@@ -56,6 +63,8 @@ src_prepare(){
sed -r \
-e 's#(INSTALL_CMOD=.*)#\1\nINSTALL_INC=${includedir}#' \
-i etc/luajit.pc || die "failed to fix pkg-config file"
+
+ epatch "${FILESDIR}/v${PV/_p/_hotfix}.patch"
}
src_compile() {
diff --git a/dev-lang/luajit/luajit-9999.ebuild b/dev-lang/luajit/luajit-9999.ebuild
index c515305..8e5bf51 100644
--- a/dev-lang/luajit/luajit-9999.ebuild
+++ b/dev-lang/luajit/luajit-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: This ebuild is from Lua overlay; Bumped by mva; $
-EAPI="4"
+EAPI="5"
inherit eutils multilib check-reqs pax-utils git-2
@@ -14,13 +14,20 @@ EGIT_REPO_URI="http://luajit.org/git/luajit-2.0.git"
LICENSE="MIT"
SLOT="2"
KEYWORDS=""
-IUSE="emacs +optimization symlink"
+IUSE="emacs +optimization symlink +interactive"
-CDEPEND=" symlink? ( =dev-lang/lua-headers-5.1* !dev-lang/lua )
- !symlink? ( =dev-lang/lua-5.1* )"
-DEPEND="${CDEPEND}
+CDEPEND="
+ symlink? ( =dev-lang/lua-headers-5.1* !dev-lang/lua )
+ !symlink? ( =dev-lang/lua-5.1* )
+"
+DEPEND="
+ ${CDEPEND}
emacs? ( app-emacs/lua-mode )
- app-admin/eselect-luajit"
+"
+PDEPEND="
+ interactive? ( dev-lua/iluajit )
+ virtual/lua
+"
# Workaround for CHECKREQS_MEMORY
pkg_setup() { :; }
@@ -66,8 +73,9 @@ src_compile() {
src_install() {
einstall DESTDIR="${D}"
pax-mark m "${D}usr/bin/luajit-${PV}"
- dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}"
+ dosym "luajit-${PV}" "/usr/bin/luajit"
use symlink && {
+ # Spikes
dosym "luajit-${SLOT}" "/usr/bin/lua"
exeinto /usr/bin
newexe "${FILESDIR}/luac.jit" "luac"
@@ -77,10 +85,4 @@ src_install() {
dosym libluajit-5.1.a /usr/$(get_libdir)/liblua.a
dosym luajit.pc /usr/$(get_libdir)/pkgconfig/lua.pc
}
-}
-
-pkg_postinst() {
- ewarn "Now you should select LuaJIT version to use as system default LuaJIT interpreter."
- ewarn "Use 'eselect luajit list' to look for installed versions and"
- ewarn "Use 'eselect luajit set <NUMBER_or_NAME>' to set version you chose."
-}
+}
\ No newline at end of file
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/lua:master commit in: dev-lang/luajit/files/, dev-lang/luajit/
@ 2013-06-04 7:10 Vadim A. Misbakh-Soloviov
0 siblings, 0 replies; 2+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2013-06-04 7:10 UTC (permalink / raw
To: gentoo-commits
commit: 3d5955237d11589421ba48f5958e271b9ff3def1
Author: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
AuthorDate: Tue Jun 4 07:09:57 2013 +0000
Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Tue Jun 4 07:09:57 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lua.git;a=commit;h=3d595523
[dev-lang/luajit] 2.0.2 release
Signed-off-by: Vadim A. Misbakh-Soloviov <mva <AT> mva.name>
---
dev-lang/luajit/Manifest | 3 +-
dev-lang/luajit/files/v2.0.1_hotfix1.patch | 103 ---------------------
.../{luajit-2.0.1.ebuild => luajit-2.0.2.ebuild} | 86 ++++++++---------
.../{luajit-9999.ebuild => luajit-2.0.9999.ebuild} | 63 ++++++-------
.../{luajit-9999.ebuild => luajit-2.1.9999.ebuild} | 65 ++++++-------
5 files changed, 99 insertions(+), 221 deletions(-)
diff --git a/dev-lang/luajit/Manifest b/dev-lang/luajit/Manifest
index aa8cbe1..b425ae6 100644
--- a/dev-lang/luajit/Manifest
+++ b/dev-lang/luajit/Manifest
@@ -1,2 +1 @@
-DIST LuaJIT-2.0.0-beta9.tar.gz 814960 SHA256 da3793b4364a17c3700d39d13eae799b82ff23da1f61631d735de05333f46240 SHA512 14f100ea0ff243b070abedc30f029afdba1792ef41b7add86623b6ba3a0e733949fc7450c531f54e2f908e32cc013106b16031bcd99754a0342636c5b41bfbb6 WHIRLPOOL 8f86e3f209d1832d02327148b7dbb248599756fa1929f03435d03db080f8659518d920ec17b5f32f55431a605e0a4615bd07bf80138fd26ed7de0f70b2a9b0db
-DIST LuaJIT-2.0.1.tar.gz 841399 SHA256 2371cceb53453d8a7b36451e6a0ccdb66236924545d6042ddd4c34e9668990c0 SHA512 a5af5772d00dfedcf1c3449b1d74d45af25d111c91931735ad80f2c7a3b7837b51807eb3a0ce12688e38352ad32cdd70bea35b53906c945ddf86dfd706118518 WHIRLPOOL 42781f3d4efa9d515f7f1c879ffc45a13ab231c951a995eb0f1e89ff27c1dd6d0cee7795fd45dd169effc067c1bae5add36b290fd8f306f99a6ed0a99f4929ad
+DIST LuaJIT-2.0.2.tar.gz 843031 SHA256 c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38 SHA512 c1afea13ec61a59f37d1f61fc50bcac47208d9d4f0a80689b74e901ad2b34294b6c89a0b4eef54b43f3d2db411660da61b191b0bbfba4ba2f97743a9ee4484e3 WHIRLPOOL cb6e8ee6c5ac2293ca5d5452cda34769d3229e2d4681c0ce3c164659c2d2d781f8474e243747b197c10b3abc116e4145df6f5293317f1db871865f38ecd2b6cd
diff --git a/dev-lang/luajit/files/v2.0.1_hotfix1.patch b/dev-lang/luajit/files/v2.0.1_hotfix1.patch
deleted file mode 100644
index 0601cd9..0000000
--- a/dev-lang/luajit/files/v2.0.1_hotfix1.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-Add missing GC steps for io.* functions.
-MIPS: Fix cache flush/sync for JIT-compiled code jump area.
-ARM: Fix cache flush/sync for exit stubs of JIT-compiled code.
-Fix MSVC intrinsics for older versions.
-Fix memory access check for fast string interning.
-
---- a/src/lib_io.c
-+++ b/src/lib_io.c
-@@ -17,6 +17,7 @@
- #include "lualib.h"
-
- #include "lj_obj.h"
-+#include "lj_gc.h"
- #include "lj_err.h"
- #include "lj_str.h"
- #include "lj_state.h"
-@@ -152,6 +153,7 @@ static int io_file_readline(lua_State *L, FILE *fp, MSize chop)
- if (n >= m - 64) m += m;
- }
- setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
-+ lj_gc_check(L);
- return (int)ok;
- }
-
-@@ -163,6 +165,7 @@ static void io_file_readall(lua_State *L, FILE *fp)
- n += (MSize)fread(buf+n, 1, m-n, fp);
- if (n != m) {
- setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
-+ lj_gc_check(L);
- return;
- }
- }
-@@ -174,6 +177,7 @@ static int io_file_readlen(lua_State *L, FILE *fp, MSize m)
- char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, m);
- MSize n = (MSize)fread(buf, 1, m, fp);
- setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
-+ lj_gc_check(L);
- return (n > 0 || m == 0);
- } else {
- int c = getc(fp);
---- a/src/lj_asm_arm.h
-+++ b/src/lj_asm_arm.h
-@@ -91,6 +91,7 @@ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group)
- *mxp++ = group*EXITSTUBS_PER_GROUP;
- for (i = 0; i < EXITSTUBS_PER_GROUP; i++)
- *mxp++ = ARMI_B|((-6-i)&0x00ffffffu);
-+ lj_mcode_sync(as->mcbot, mxp);
- lj_mcode_commitbot(as->J, mxp);
- as->mcbot = mxp;
- as->mclim = as->mcbot + MCLIM_REDZONE;
---- a/src/lj_asm_mips.h
-+++ b/src/lj_asm_mips.h
-@@ -71,6 +71,7 @@ static void asm_sparejump_setup(ASMState *as)
- memset(mxp+2, 0, MIPS_SPAREJUMP*8);
- mxp += MIPS_SPAREJUMP*2;
- lua_assert(mxp < as->mctop);
-+ lj_mcode_sync(as->mcbot, mxp);
- lj_mcode_commitbot(as->J, mxp);
- as->mcbot = mxp;
- as->mclim = as->mcbot + MCLIM_REDZONE;
---- a/src/lj_def.h
-+++ b/src/lj_def.h
-@@ -243,17 +243,17 @@ static LJ_AINLINE uint32_t lj_getu32(const void *p)
- #endif
-
- #ifdef _M_PPC
--#pragma intrinsic(_CountLeadingZeros)
- unsigned int _CountLeadingZeros(long);
-+#pragma intrinsic(_CountLeadingZeros)
- static LJ_AINLINE uint32_t lj_fls(uint32_t x)
- {
- return _CountLeadingZeros(x) ^ 31;
- }
- #else
--#pragma intrinsic(_BitScanForward)
--#pragma intrinsic(_BitScanReverse)
- unsigned char _BitScanForward(uint32_t *, unsigned long);
- unsigned char _BitScanReverse(uint32_t *, unsigned long);
-+#pragma intrinsic(_BitScanForward)
-+#pragma intrinsic(_BitScanReverse)
-
- static LJ_AINLINE uint32_t lj_ffs(uint32_t x)
- {
---- a/src/lj_str.c
-+++ b/src/lj_str.c
-@@ -48,7 +48,7 @@ static LJ_AINLINE int str_fastcmp(const char *a, const char *b, MSize len)
- {
- MSize i = 0;
- lua_assert(len > 0);
-- lua_assert((((uintptr_t)a + len) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4);
-+ lua_assert((((uintptr_t)a+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4);
- do { /* Note: innocuous access up to end of string + 3. */
- uint32_t v = lj_getu32(a+i) ^ *(const uint32_t *)(b+i);
- if (v) {
-@@ -121,7 +121,7 @@ GCstr *lj_str_new(lua_State *L, const char *str, size_t lenx)
- h ^= b; h -= lj_rol(b, 16);
- /* Check if the string has already been interned. */
- o = gcref(g->strhash[h & g->strmask]);
-- if (LJ_LIKELY((((uintptr_t)str + len) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4)) {
-+ if (LJ_LIKELY((((uintptr_t)str+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4)) {
- while (o != NULL) {
- GCstr *sx = gco2str(o);
- if (sx->len == len && str_fastcmp(str, strdata(sx), len) == 0) {
diff --git a/dev-lang/luajit/luajit-2.0.1.ebuild b/dev-lang/luajit/luajit-2.0.2.ebuild
similarity index 64%
rename from dev-lang/luajit/luajit-2.0.1.ebuild
rename to dev-lang/luajit/luajit-2.0.2.ebuild
index 0b14d62..01f4f12 100644
--- a/dev-lang/luajit/luajit-2.0.1.ebuild
+++ b/dev-lang/luajit/luajit-2.0.2.ebuild
@@ -4,17 +4,26 @@
EAPI="5"
-inherit eutils multilib flag-o-matic check-reqs pax-utils
+inherit base multilib pax-utils versionator toolchain-funcs flag-o-matic check-reqs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ $(get_version_component_range 4) != "" ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
-MY_P="LuaJIT-${PV/_/-}"
DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
HOMEPAGE="http://luajit.org/"
-SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
+SRC_URI="
+ http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}
+"
LICENSE="MIT"
SLOT="2"
-KEYWORDS="~amd64 ~x86"
-IUSE="+optimization lua52compat"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat +optimization"
DEPEND=""
PDEPEND="
@@ -23,12 +32,14 @@ PDEPEND="
S="${WORKDIR}/${MY_P}"
+HTML_DOCS=( "doc/" )
+
check_req() {
if use optimization; then
CHECKREQS_MEMORY="200M"
ewarn "Optimized (amalgamated) build wants at least 200MB of RAM"
ewarn "If you have no such RAM - try to disable 'optimization' flag"
- check-reqs_pkg_${1}
+ check-reqs_pkg_${1}
fi
}
@@ -40,34 +51,21 @@ pkg_setup() {
check_req setup
}
-src_prepare(){
+src_prepare() {
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+
# fixing prefix and version
- sed -e "s|/usr/local|/usr|" \
+ sed \
+ -e "s|/usr/local|/usr|" \
-e "s|/lib|/$(get_libdir)|" \
- -e "s|VERSION=.*|VERSION= ${PV}|" \
-i Makefile || die "failed to fix prefix in Makefile"
- sed -e "s|\(share/luajit\)-[^\"]*|\1-${PV}/|g" \
+ sed \
-e "s|/usr/local|/usr|" \
-e "s|lib/|$(get_libdir)/|" \
-i src/luaconf.h || die "failed to fix prefix in luaconf.h"
-
- if use lua52compat; then
- sed \
- -e "/LUAJIT_ENABLE_LUA52COMPAT/s|#||" \
- -i src/Makefile || die "Lua-5.2 compat fix failed"
- fi
-
- # removing strip
- sed -e '/$(Q)$(TARGET_STRIP)/d' -i src/Makefile \
- || die "failed to remove forced strip"
-
- # fixing pkg-config file (Lua-replacing compatibility)
- sed -r \
- -e 's#(INSTALL_CMOD=.*)#\1\nINSTALL_INC=${includedir}#' \
- -i etc/luajit.pc || die "failed to fix pkgconfig file"
-
- epatch "${FILESDIR}/v${PV}_hotfix1.patch"
}
src_compile() {
@@ -88,9 +86,11 @@ src_compile() {
# ebuild, I choose method "a"
# (since it is more secure on hardened systems, imho) +
# + ewarn user, that he really should disable ccache.
+ # append-ldflags -nopie
-# append-ldflags -nopie
+# append-ldflags -nopie
append-cflags -fPIC
+
ewarn "As we detected, that you're using gcc-4.7.3+pie+ccache,"
ewarn "we need to either:"
ewarn " a) add -fPIC to CFLAGS, or"
@@ -108,23 +108,23 @@ src_compile() {
ewarn "to disable ccache instead."
fi
- emake "${opt}"
+ emake \
+ Q= \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")" \
+ "${opt}"
}
src_install() {
default
- host-is-pax && pax-mark m "${D}usr/bin/${P}"
- dosym "luajit-${PV}" "/usr/bin/${PN}"
- newbin "${FILESDIR}/luac.jit" "luac-${P}"
-}
+ base_src_install_docs
-pkg_postinst() {
- if ! has_version dev-lua/iluajit; then
- einfo "You'd probably want to install dev-lua/iluajit to";
- ewarn "get fully functional interactive shell for LuaJIT";
- fi
- if has_version app-editors/emacs || has_version app-editors/xemacs; then
- einfo "You'd probably want to install app-emacs/lua-mode to";
- ewarn "get Lua completion in emacs.";
- fi
-}
\ No newline at end of file
+ host-is-pax && pax-mark m "${ED}usr/bin/${PN}-${MY_PV}"
+ dosym "${PN}-${MY_PV}" "/usr/bin/${PN}"
+ newbin "${FILESDIR}/luac.jit" "luac-${MY_PV}"
+}
diff --git a/dev-lang/luajit/luajit-9999.ebuild b/dev-lang/luajit/luajit-2.0.9999.ebuild
similarity index 68%
copy from dev-lang/luajit/luajit-9999.ebuild
copy to dev-lang/luajit/luajit-2.0.9999.ebuild
index 08f52e0..5086ac9 100644
--- a/dev-lang/luajit/luajit-9999.ebuild
+++ b/dev-lang/luajit/luajit-2.0.9999.ebuild
@@ -4,7 +4,9 @@
EAPI="5"
-inherit eutils multilib flag-o-matic check-reqs pax-utils git-2
+inherit base multilib pax-utils versionator toolchain-funcs flag-o-matic check-reqs git-2
+
+MY_PV="2.0.1"
DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
HOMEPAGE="http://luajit.org/"
@@ -14,13 +16,15 @@ EGIT_REPO_URI="http://luajit.org/git/luajit-2.0.git"
LICENSE="MIT"
SLOT="2"
KEYWORDS=""
-IUSE="+optimization lua52compat"
+IUSE="lua52compat +optimization"
DEPEND=""
PDEPEND="
virtual/lua[luajit]
"
+HTML_DOCS=( "doc/" )
+
check_req() {
if use optimization; then
CHECKREQS_MEMORY="200M"
@@ -40,30 +44,15 @@ pkg_setup() {
src_prepare(){
# fixing prefix and version
- sed -e "s|/usr/local|/usr|" \
+ sed \
+ -e "s|/usr/local|/usr|" \
-e "s|/lib|/$(get_libdir)|" \
- -e "s|VERSION=.*|VERSION= ${PV}|" \
-i Makefile || die "failed to fix prefix in Makefile"
- sed -e "s|\(share/luajit\)-[^\"]*|\1-${PV}/|g" \
+ sed \
-e "s|/usr/local|/usr|" \
-e "s|lib/|$(get_libdir)/|" \
-i src/luaconf.h || die "failed to fix prefix in luaconf.h"
-
- if use lua52compat; then
- sed \
- -e "/LUAJIT_ENABLE_LUA52COMPAT/s|#||" \
- -i src/Makefile || die "Lua-5.2 compat fix failed"
- fi
-
- # removing strip
- sed -e '/$(Q)$(TARGET_STRIP)/d' -i src/Makefile \
- || die "failed to remove forced strip"
-
- # fixing pkg-config file (Lua-replacing compatibility)
- sed -r \
- -e 's#(INSTALL_CMOD=.*)#\1\nINSTALL_INC=${includedir}#' \
- -i etc/luajit.pc || die "failed to fix pkgconfig file"
}
src_compile() {
@@ -84,9 +73,11 @@ src_compile() {
# ebuild, I choose method "a"
# (since it is more secure on hardened systems, imho) +
# + ewarn user, that he really should disable ccache.
+ # append-ldflags -nopie
-# append-ldflags -nopie
+# append-ldflags -nopie
append-cflags -fPIC
+
ewarn "As we detected, that you're using gcc-4.7.3+pie+ccache,"
ewarn "we need to either:"
ewarn " a) add -fPIC to CFLAGS, or"
@@ -104,23 +95,23 @@ src_compile() {
ewarn "to disable ccache instead."
fi
- emake "${opt}"
+ emake \
+ Q= \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")" \
+ "${opt}"
}
src_install() {
default
- host-is-pax && pax-mark m "${D}usr/bin/${P}"
- dosym "luajit-${PV}" "/usr/bin/${PN}"
- newbin "${FILESDIR}/luac.jit" "luac-${P}"
-}
+ base_src_install_docs
-pkg_postinst() {
- if ! has_version dev-lua/iluajit; then
- einfo "You'd probably want to install dev-lua/iluajit to";
- ewarn "get fully functional interactive shell for LuaJIT";
- fi
- if has_version app-editors/emacs || has_version app-editors/xemacs; then
- einfo "You'd probably want to install app-emacs/lua-mode to";
- ewarn "get Lua completion in emacs.";
- fi
-}
+ host-is-pax && pax-mark m "${ED}usr/bin/${PN}-${MY_PV}"
+ dosym "${PN}-${MY_PV}" "/usr/bin/${PN}"
+ newbin "${FILESDIR}/luac.jit" "luac-${MY_PV}"
+}
\ No newline at end of file
diff --git a/dev-lang/luajit/luajit-9999.ebuild b/dev-lang/luajit/luajit-2.1.9999.ebuild
similarity index 67%
rename from dev-lang/luajit/luajit-9999.ebuild
rename to dev-lang/luajit/luajit-2.1.9999.ebuild
index 08f52e0..0b39743 100644
--- a/dev-lang/luajit/luajit-9999.ebuild
+++ b/dev-lang/luajit/luajit-2.1.9999.ebuild
@@ -4,23 +4,27 @@
EAPI="5"
-inherit eutils multilib flag-o-matic check-reqs pax-utils git-2
+inherit base multilib pax-utils versionator toolchain-funcs flag-o-matic check-reqs git-2
+
+MY_PV="2.1.0-alpha"
DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
HOMEPAGE="http://luajit.org/"
SRC_URI=""
EGIT_REPO_URI="http://luajit.org/git/luajit-2.0.git"
+EGIT_BRANCH="v2.1"
LICENSE="MIT"
SLOT="2"
KEYWORDS=""
-IUSE="+optimization lua52compat"
+IUSE="lua52compat +optimization"
-DEPEND=""
PDEPEND="
virtual/lua[luajit]
"
+HTML_DOCS=( "doc/" )
+
check_req() {
if use optimization; then
CHECKREQS_MEMORY="200M"
@@ -40,30 +44,15 @@ pkg_setup() {
src_prepare(){
# fixing prefix and version
- sed -e "s|/usr/local|/usr|" \
+ sed \
+ -e "s|/usr/local|/usr|" \
-e "s|/lib|/$(get_libdir)|" \
- -e "s|VERSION=.*|VERSION= ${PV}|" \
-i Makefile || die "failed to fix prefix in Makefile"
- sed -e "s|\(share/luajit\)-[^\"]*|\1-${PV}/|g" \
+ sed \
-e "s|/usr/local|/usr|" \
-e "s|lib/|$(get_libdir)/|" \
-i src/luaconf.h || die "failed to fix prefix in luaconf.h"
-
- if use lua52compat; then
- sed \
- -e "/LUAJIT_ENABLE_LUA52COMPAT/s|#||" \
- -i src/Makefile || die "Lua-5.2 compat fix failed"
- fi
-
- # removing strip
- sed -e '/$(Q)$(TARGET_STRIP)/d' -i src/Makefile \
- || die "failed to remove forced strip"
-
- # fixing pkg-config file (Lua-replacing compatibility)
- sed -r \
- -e 's#(INSTALL_CMOD=.*)#\1\nINSTALL_INC=${includedir}#' \
- -i etc/luajit.pc || die "failed to fix pkgconfig file"
}
src_compile() {
@@ -84,9 +73,11 @@ src_compile() {
# ebuild, I choose method "a"
# (since it is more secure on hardened systems, imho) +
# + ewarn user, that he really should disable ccache.
+ # append-ldflags -nopie
-# append-ldflags -nopie
+# append-ldflags -nopie
append-cflags -fPIC
+
ewarn "As we detected, that you're using gcc-4.7.3+pie+ccache,"
ewarn "we need to either:"
ewarn " a) add -fPIC to CFLAGS, or"
@@ -104,23 +95,23 @@ src_compile() {
ewarn "to disable ccache instead."
fi
- emake "${opt}"
+ emake \
+ Q= \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")" \
+ "${opt}"
}
src_install() {
default
- host-is-pax && pax-mark m "${D}usr/bin/${P}"
- dosym "luajit-${PV}" "/usr/bin/${PN}"
- newbin "${FILESDIR}/luac.jit" "luac-${P}"
-}
+ base_src_install_docs
-pkg_postinst() {
- if ! has_version dev-lua/iluajit; then
- einfo "You'd probably want to install dev-lua/iluajit to";
- ewarn "get fully functional interactive shell for LuaJIT";
- fi
- if has_version app-editors/emacs || has_version app-editors/xemacs; then
- einfo "You'd probably want to install app-emacs/lua-mode to";
- ewarn "get Lua completion in emacs.";
- fi
-}
+ host-is-pax && pax-mark m "${ED}usr/bin/${PN}-${MY_PV}"
+ dosym "${PN}-${MY_PV}" "/usr/bin/${PN}"
+ newbin "${FILESDIR}/luac.jit" "luac-${MY_PV}"
+}
\ No newline at end of file
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-04 7:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 7:10 [gentoo-commits] proj/lua:master commit in: dev-lang/luajit/files/, dev-lang/luajit/ Vadim A. Misbakh-Soloviov
-- strict thread matches above, loose matches on Subject: below --
2013-03-17 17:44 Vadim A. Misbakh-Soloviov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox