aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-eselect/eselect-luajit/files/luajit.eselect-114
-rw-r--r--dev-lang/luajit/files/luajit-nosymlinks.patch11
2 files changed, 14 insertions, 11 deletions
diff --git a/app-eselect/eselect-luajit/files/luajit.eselect-1 b/app-eselect/eselect-luajit/files/luajit.eselect-1
index 89d789a..bc7e404 100644
--- a/app-eselect/eselect-luajit/files/luajit.eselect-1
+++ b/app-eselect/eselect-luajit/files/luajit.eselect-1
@@ -8,6 +8,7 @@ DESCRIPTION="Manage luajit symlinks"
MAINTAINER="ilmostro7@gmail.com"
HEADER_FILES="luajit.h"
+LVER=$(readlink -e "${EROOT}"/usr/bin/luajit | sed -ne "s:.*/usr/bin/luajit\([\d.-]*\):\1:p")
remove_symlinks() {
unlink "${EROOT}"/usr/bin/luajit &>/dev/null
@@ -18,21 +19,22 @@ remove_symlinks() {
for f in $HEADER_FILES ; do
unlink "${EROOT}"/usr/include/$f
done
- unlink "${EROOT}"/usr/share/man/man1/{luajit}.1{,.gz,.bz2,.lzma} &>/dev/null
+ unlink "${EROOT}"/usr/share/man/man1/luajit.1{,.gz,.bz2,.lzma} &>/dev/null
}
set_symlinks() {
local ver=$1
- ln -s "${EROOT}"/usr/bin/luajit{$ver,}
+ ln -s "${EROOT}"/usr/bin/luajit-$ver "${EROOT}"/usr/bin/luajit
for dir in $(get_libdirs) ; do
- ln -s "${dir}"/lua/${do_show}/luajit-{$ver}/libluajit{$ver}.so "${dir}"/libluajit{$ver,}.so
- ln -s "${dir}"/pkgconfig/luajit{$ver,}.pc
+ ln -s "${dir}"/luajit-{$ver}/libluajit-$(LVER).so "${dir}"/libluajit.so
+ ln -s "${dir}"/luajit-{$ver}/libluajit-$(LVER).a "${dir}"/libluajit.a
+ ln -s "${dir}"/pkgconfig/luajit{-$ver,}.pc
done
for orig in "${EROOT}"/usr/share/man/man1/luajit-$ver.1* ; do
ln -s "${orig}" "${orig//$ver}"
done
for f in $HEADER_FILES ; do
- ln -s "${EROOT}"/usr/include/luajit$ver/$f "${EROOT}"/usr/include
+ ln -s "${EROOT}"/usr/include/luajit-$ver/$f "${EROOT}"/usr/include
done
}
@@ -50,7 +52,7 @@ get_libdirs() {
find_targets() {
local dirs
local prefix="${EROOT}/usr/bin/luajit"
- for f in ${prefix}2* ; do
+ for f in ${prefix}-2* ; do
dirs="${dirs} ${f##$prefix}"
done
echo $dirs
diff --git a/dev-lang/luajit/files/luajit-nosymlinks.patch b/dev-lang/luajit/files/luajit-nosymlinks.patch
index 2a6f494..5d893b2 100644
--- a/dev-lang/luajit/files/luajit-nosymlinks.patch
+++ b/dev-lang/luajit/files/luajit-nosymlinks.patch
@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
-index 85678ee..1399d81 100644
+index 85678ee..a2e8910 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ DPREFIX= $(DESTDIR)$(PREFIX)
@@ -15,14 +15,15 @@ index 85678ee..1399d81 100644
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
INSTALL_CMODD= $(INSTALL_LIB)/lua
INSTALL_CMOD= $(INSTALL_CMODD)/$(ABIVER)
-+INSTALL_CMODL= $(INSTALL_CMOD)/luajit-$(VERSION)
++INSTALL_CMODL= $(INSTALL_LIB)/luajit-$(VERSION)
INSTALL_MAN= $(INSTALL_SHARE)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
INSTALL_TNAME= luajit-$(VERSION)
-INSTALL_TSYMNAME= luajit
INSTALL_ANAME= libluajit-$(ABIVER).a
- INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER)
+-INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER)
++INSTALL_SONAME= libluajit-$(ABIVER).so
INSTALL_SOSHORT= libluajit-$(ABIVER).so
INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
@@ -69,7 +70,7 @@ index 85678ee..1399d81 100644
- $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
- cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)
+ $(LDCONFIG) $(INSTALL_LIB) || :
-+ cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)/luajit-$(VERSION).1
++ cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)/luajit-$(VERSION)
cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
$(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \
$(RM) $(FILE_PC).tmp
@@ -81,7 +82,7 @@ index 85678ee..1399d81 100644
uninstall:
@echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
- $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
-+ $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN)/luajit-$(VERSION).1 $(INSTALL_PC)
++ $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/luajit-$(VERSION) $(INSTALL_PC)
for file in $(FILES_JITLIB); do \
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
done