1 |
commit: a6cadd4611a2a83868f637c86ae7a45a6521cd14 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 24 01:15:32 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 24 01:21:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6cadd46 |
7 |
|
8 |
app-eselect/eselect-lua: only symlink the executables and the man pages |
9 |
|
10 |
Looks like I owe mjo an apology - the reason I hadn't noticed the lua.pc |
11 |
problem he'd described was that I had already patched my eselect-lua to |
12 |
only symlink the binaries and the man pages, which patch I ended up having |
13 |
forgotten to commit during the bump to version 3. |
14 |
|
15 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
16 |
|
17 |
.../{eselect-lua-3.ebuild => eselect-lua-4.ebuild} | 0 |
18 |
.../files/{lua.eselect-3 => lua.eselect-4} | 42 ---------------------- |
19 |
2 files changed, 42 deletions(-) |
20 |
|
21 |
diff --git a/app-eselect/eselect-lua/eselect-lua-3.ebuild b/app-eselect/eselect-lua/eselect-lua-4.ebuild |
22 |
similarity index 100% |
23 |
rename from app-eselect/eselect-lua/eselect-lua-3.ebuild |
24 |
rename to app-eselect/eselect-lua/eselect-lua-4.ebuild |
25 |
|
26 |
diff --git a/app-eselect/eselect-lua/files/lua.eselect-3 b/app-eselect/eselect-lua/files/lua.eselect-4 |
27 |
similarity index 60% |
28 |
rename from app-eselect/eselect-lua/files/lua.eselect-3 |
29 |
rename to app-eselect/eselect-lua/files/lua.eselect-4 |
30 |
index b46c226f8ee..15364c039c8 100644 |
31 |
--- a/app-eselect/eselect-lua/files/lua.eselect-3 |
32 |
+++ b/app-eselect/eselect-lua/files/lua.eselect-4 |
33 |
@@ -11,13 +11,6 @@ HEADER_FILES="lauxlib.h luaconf.h lua.h lua.hpp lualib.h" |
34 |
|
35 |
remove_symlinks() { |
36 |
rm -f "${EROOT}"/usr/bin/{lua,luac} &>/dev/null |
37 |
- for dir in $(get_libdirs) ; do |
38 |
- rm -f "${EROOT}"${dir}/liblua.so &>/dev/null && \ |
39 |
- rm -f "${EROOT}"${dir}/pkgconfig/lua.pc &>/dev/null |
40 |
- done |
41 |
- for f in $HEADER_FILES ; do |
42 |
- rm -f "${EROOT}"/usr/include/${f} |
43 |
- done |
44 |
rm -f "${EROOT}"/usr/share/man/man1/lua{,c}.1{,.*} &>/dev/null |
45 |
} |
46 |
|
47 |
@@ -32,45 +25,10 @@ set_symlinks() { |
48 |
if [[ -f "${bin_prefix}"/luac${ver} ]]; then |
49 |
ln -s luac${ver} $(_dup "${bin_prefix}"/luac) |
50 |
fi |
51 |
- for dir in $(get_libdirs) ; do |
52 |
- if has 'jit*' ${ver}; then |
53 |
- type -p lua${ver} &>/dev/null || die -q "It's something wrong with your lua${ver} installation: it's binary leads to broken symlink" |
54 |
- local abi=$(lua${ver} -e 'print(_VERSION:match("%d.%d"))') |
55 |
- local libname=libluajit-${abi}.so.${ver##jit-} |
56 |
- test -f "${EROOT}/${dir}/${libname}" || die -q "Can't find libluajit for lua${ver} (lua abi: ${abi})" |
57 |
- ln -s ${libname} $(_dup "${EROOT}/${dir}"/liblua.so) |
58 |
- else |
59 |
- ln -s liblua${ver}.so $(_dup "${EROOT}/${dir}"/liblua.so) |
60 |
- fi |
61 |
- ln -s lua${ver}.pc $(_dup "${EROOT}/${dir}"/pkgconfig/lua.pc) |
62 |
- done |
63 |
for manpage in "${EROOT}"/usr/share/man/man1/lua{,c}${ver}.1.* ; do |
64 |
test -f ${manpage} && |
65 |
ln -s $(basename "${manpage}") $(_dup "${manpage//${ver}}") |
66 |
done |
67 |
- for header in $HEADER_FILES ; do |
68 |
- local hdr; |
69 |
- if has 'jit*' ${ver}; then |
70 |
- type -p lua${ver} &>/dev/null || die -q "lua${ver} binary is missing (or leads to broken symlink)" |
71 |
- local jit_v=$(lua${ver} -e 'print(jit.version:match("%d.%d"))') |
72 |
- hdr=luajit-${jit_v}/${header}; |
73 |
- else |
74 |
- hdr=lua${ver}/${header}; |
75 |
- fi |
76 |
- test -f "${EROOT}/usr/include/${hdr}" || die -q "Missing header: ${header}" |
77 |
- ln -s "${hdr}" $(_dup "${EROOT}"/usr/include/${header}) |
78 |
- done |
79 |
-} |
80 |
- |
81 |
-get_libdirs() { |
82 |
- local dir libdirs |
83 |
- for dir in $(list_libdirs); do |
84 |
- [[ -L ${EROOT}/usr/${dir} ]] && continue |
85 |
- ls "${EROOT}"/usr/${dir}/liblua*.* > /dev/null 2>&1 || continue |
86 |
- |
87 |
- libdirs+=' '/usr/${dir} |
88 |
- done |
89 |
- echo ${libdirs:-/usr/lib} |
90 |
} |
91 |
|
92 |
find_targets() { |