Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/lua/, dev-lang/lua/files/
Date: Thu, 03 Mar 2022 15:42:07
Message-Id: 1646322102.e75caee08ab5c8d0bf72f1cf3d7bfc12361ec0ce.williamh@gentoo
1 commit: e75caee08ab5c8d0bf72f1cf3d7bfc12361ec0ce
2 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
3 AuthorDate: Sat Feb 26 12:42:16 2022 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 3 15:41:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e75caee0
7
8 dev-lang/lua: fix 5.4 build on prefix
9
10 Similar to how it was fixed for lua 5.3
11
12 Closes: https://bugs.gentoo.org/739764
13 Closes: https://github.com/gentoo/gentoo/pull/24359
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
16 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
17
18 dev-lang/lua/files/lua-5.4.2-r2-make.patch | 99 ++++++++++++++++++++++
19 .../lua/{lua-5.4.4.ebuild => lua-5.4.2-r2.ebuild} | 4 +-
20 dev-lang/lua/lua-5.4.4.ebuild | 2 +-
21 3 files changed, 102 insertions(+), 3 deletions(-)
22
23 diff --git a/dev-lang/lua/files/lua-5.4.2-r2-make.patch b/dev-lang/lua/files/lua-5.4.2-r2-make.patch
24 new file mode 100644
25 index 000000000000..d14aa40df0a0
26 --- /dev/null
27 +++ b/dev-lang/lua/files/lua-5.4.2-r2-make.patch
28 @@ -0,0 +1,99 @@
29 +diff --git a/Makefile b/Makefile
30 +index 1797df9..90284d8 100644
31 +--- a/Makefile
32 ++++ b/Makefile
33 +@@ -10,11 +10,11 @@ PLAT= guess
34 + # so take care if INSTALL_TOP is not an absolute path. See the local target.
35 + # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
36 + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
37 +-INSTALL_TOP= /usr/local
38 ++INSTALL_TOP= /usr
39 + INSTALL_BIN= $(INSTALL_TOP)/bin
40 +-INSTALL_INC= $(INSTALL_TOP)/include
41 ++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
42 + INSTALL_LIB= $(INSTALL_TOP)/lib
43 +-INSTALL_MAN= $(INSTALL_TOP)/man/man1
44 ++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
45 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
46 + INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
47 +
48 +@@ -104,3 +104,18 @@ pc:
49 + .PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc
50 +
51 + # (end of Makefile)
52 ++
53 ++# Use libtool for binary installs, etc.
54 ++
55 ++export V
56 ++export LIBTOOL = libtool --quiet --tag=CC
57 ++# See libtool manual about how to set this
58 ++
59 ++gentoo_clean:
60 ++ cd src; $(MAKE) $@
61 ++
62 ++gentoo_install:
63 ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
64 ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
65 ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
66 ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
67 +diff --git a/src/Makefile b/src/Makefile
68 +index 514593d..8af8f99 100644
69 +--- a/src/Makefile
70 ++++ b/src/Makefile
71 +@@ -37,10 +37,10 @@ CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem
72 + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
73 + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
74 +
75 +-LUA_T= lua
76 ++LUA_T= lua$V
77 + LUA_O= lua.o
78 +
79 +-LUAC_T= luac
80 ++LUAC_T= luac$V
81 + LUAC_O= luac.o
82 +
83 + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
84 +@@ -60,10 +60,10 @@ $(LUA_A): $(BASE_O)
85 + $(AR) $@ $(BASE_O)
86 + $(RANLIB) $@
87 +
88 +-$(LUA_T): $(LUA_O) $(LUA_A)
89 ++origin$(LUA_T): $(LUA_O) $(LUA_A)
90 + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
91 +
92 +-$(LUAC_T): $(LUAC_O) $(LUA_A)
93 ++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
94 + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
95 +
96 + test:
97 +@@ -218,3 +218,30 @@ lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \
98 + lobject.h ltm.h lzio.h
99 +
100 + # (end of Makefile)
101 ++
102 ++export LIBTOOL = libtool --quiet --tag=CC
103 ++export LIB_VERSION = 6:1:1
104 ++
105 ++# The following rules use libtool for compiling and linking in order to
106 ++# provide shared library support.
107 ++
108 ++LIB_NAME = liblua$V.la
109 ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
110 ++
111 ++%.lo %.o: %.c
112 ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
113 ++
114 ++$(LIB_NAME): $(LIB_OBJS)
115 ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
116 ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
117 ++
118 ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
119 ++ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
120 ++
121 ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
122 ++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
123 ++
124 ++gentoo_clean:
125 ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
126 ++
127 ++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
128
129 diff --git a/dev-lang/lua/lua-5.4.4.ebuild b/dev-lang/lua/lua-5.4.2-r2.ebuild
130 similarity index 99%
131 copy from dev-lang/lua/lua-5.4.4.ebuild
132 copy to dev-lang/lua/lua-5.4.2-r2.ebuild
133 index b87dce6f5938..d3ea0294a6c4 100644
134 --- a/dev-lang/lua/lua-5.4.4.ebuild
135 +++ b/dev-lang/lua/lua-5.4.2-r2.ebuild
136 @@ -6,7 +6,7 @@ inherit autotools multilib multilib-minimal portability toolchain-funcs
137
138 DESCRIPTION="A powerful light-weight programming language designed for extending applications"
139 HOMEPAGE="https://www.lua.org/"
140 -TEST_PV="5.4.4"
141 +TEST_PV="5.4.2"
142 TEST_P="${PN}-${TEST_PV}-tests"
143 SRC_URI="
144 https://www.lua.org/ftp/${P}.tar.gz
145 @@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
146 )
147
148 PATCHES=(
149 - "${FILESDIR}"/lua-5.4.2-make.patch
150 + "${FILESDIR}"/lua-5.4.2-r2-make.patch
151 )
152
153 src_prepare() {
154
155 diff --git a/dev-lang/lua/lua-5.4.4.ebuild b/dev-lang/lua/lua-5.4.4.ebuild
156 index b87dce6f5938..99d90a97ccd8 100644
157 --- a/dev-lang/lua/lua-5.4.4.ebuild
158 +++ b/dev-lang/lua/lua-5.4.4.ebuild
159 @@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
160 )
161
162 PATCHES=(
163 - "${FILESDIR}"/lua-5.4.2-make.patch
164 + "${FILESDIR}"/lua-5.4.2-r2-make.patch
165 )
166
167 src_prepare() {