1 |
commit: 079d4f2b6783d80eb862d593b7aa1cd22431e74e |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 23 15:14:17 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 23 15:14:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=079d4f2b |
7 |
|
8 |
www-apps/cgit: migrate to lua-single.eclass |
9 |
|
10 |
Compatibility as per the upstream README. Implementation name is passed |
11 |
directly to the build scripts so trivial to migrate. |
12 |
|
13 |
Both the latest release and the live ebuild. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/752870 |
16 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
17 |
|
18 |
profiles/package.mask | 1 + |
19 |
.../{cgit-9999.ebuild => cgit-1.2.3-r100.ebuild} | 29 +++++++++++----------- |
20 |
www-apps/cgit/cgit-9999.ebuild | 18 ++++++-------- |
21 |
3 files changed, 23 insertions(+), 25 deletions(-) |
22 |
|
23 |
diff --git a/profiles/package.mask b/profiles/package.mask |
24 |
index e6fa10d4290..63f022693ce 100644 |
25 |
--- a/profiles/package.mask |
26 |
+++ b/profiles/package.mask |
27 |
@@ -534,6 +534,7 @@ kde-apps/kdebase-meta:5 |
28 |
>=sys-apps/roccat-tools-5.9.0-r100 |
29 |
>=sys-cluster/slurm-20.11.0.1-r100 |
30 |
>=www-apache/mod_security-2.9.3-r100 |
31 |
+>=www-apps/cgit-1.2.3-r100 |
32 |
>=www-client/elinks-0.13.5-r100 |
33 |
>=www-client/luakit-2.2.1-r100 |
34 |
>=www-servers/lighttpd-1.4.55-r100 |
35 |
|
36 |
diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-1.2.3-r100.ebuild |
37 |
similarity index 79% |
38 |
copy from www-apps/cgit/cgit-9999.ebuild |
39 |
copy to www-apps/cgit/cgit-1.2.3-r100.ebuild |
40 |
index 4b617428b6e..08c24550c1b 100644 |
41 |
--- a/www-apps/cgit/cgit-9999.ebuild |
42 |
+++ b/www-apps/cgit/cgit-1.2.3-r100.ebuild |
43 |
@@ -3,21 +3,25 @@ |
44 |
|
45 |
EAPI=7 |
46 |
|
47 |
+LUA_COMPAT=( lua5-{1..2} luajit ) |
48 |
WEBAPP_MANUAL_SLOT="yes" |
49 |
|
50 |
-inherit git-r3 toolchain-funcs webapp |
51 |
+inherit lua-single toolchain-funcs webapp |
52 |
|
53 |
[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" |
54 |
|
55 |
+GIT_V="2.25.1" |
56 |
+ |
57 |
DESCRIPTION="a fast web-interface for git repositories" |
58 |
HOMEPAGE="https://git.zx2c4.com/cgit/about" |
59 |
-SRC_URI="" |
60 |
-EGIT_REPO_URI="https://git.zx2c4.com/cgit" |
61 |
+SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz |
62 |
+ https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz" |
63 |
|
64 |
LICENSE="GPL-2" |
65 |
SLOT="0" |
66 |
-KEYWORDS="" |
67 |
-IUSE="doc +highlight libressl +lua +luajit test" |
68 |
+KEYWORDS="~amd64 ~arm ~x86" |
69 |
+IUSE="doc +highlight libressl +lua test" |
70 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
71 |
RESTRICT="!test? ( test )" |
72 |
|
73 |
RDEPEND=" |
74 |
@@ -27,10 +31,7 @@ RDEPEND=" |
75 |
highlight? ( || ( dev-python/pygments app-text/highlight ) ) |
76 |
!libressl? ( dev-libs/openssl:0= ) |
77 |
libressl? ( dev-libs/libressl:0= ) |
78 |
- lua? ( |
79 |
- luajit? ( dev-lang/luajit ) |
80 |
- !luajit? ( dev-lang/lua:0 ) |
81 |
- ) |
82 |
+ lua? ( ${LUA_DEPS} ) |
83 |
sys-libs/zlib |
84 |
virtual/httpd-cgi |
85 |
" |
86 |
@@ -42,9 +43,13 @@ DEPEND="${RDEPEND} |
87 |
|
88 |
pkg_setup() { |
89 |
webapp_pkg_setup |
90 |
+ use lua && lua-single_pkg_setup |
91 |
} |
92 |
|
93 |
src_prepare() { |
94 |
+ rmdir git || die |
95 |
+ mv "${WORKDIR}"/git-"${GIT_V}" git || die |
96 |
+ |
97 |
echo "prefix = ${EPREFIX}/usr" >> cgit.conf |
98 |
echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf |
99 |
echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf |
100 |
@@ -52,11 +57,7 @@ src_prepare() { |
101 |
echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf |
102 |
echo "DESTDIR = ${D}" >> cgit.conf |
103 |
if use lua; then |
104 |
- if use luajit; then |
105 |
- echo "LUA_PKGCONFIG = luajit" >> cgit.conf |
106 |
- else |
107 |
- echo "LUA_PKGCONFIG = lua" >> cgit.conf |
108 |
- fi |
109 |
+ echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf |
110 |
else |
111 |
echo "NO_LUA = 1" >> cgit.conf |
112 |
fi |
113 |
|
114 |
diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-9999.ebuild |
115 |
index 4b617428b6e..8975d5eebd6 100644 |
116 |
--- a/www-apps/cgit/cgit-9999.ebuild |
117 |
+++ b/www-apps/cgit/cgit-9999.ebuild |
118 |
@@ -3,9 +3,10 @@ |
119 |
|
120 |
EAPI=7 |
121 |
|
122 |
+LUA_COMPAT=( lua5-{1..2} luajit ) |
123 |
WEBAPP_MANUAL_SLOT="yes" |
124 |
|
125 |
-inherit git-r3 toolchain-funcs webapp |
126 |
+inherit git-r3 lua-single toolchain-funcs webapp |
127 |
|
128 |
[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" |
129 |
|
130 |
@@ -17,7 +18,8 @@ EGIT_REPO_URI="https://git.zx2c4.com/cgit" |
131 |
LICENSE="GPL-2" |
132 |
SLOT="0" |
133 |
KEYWORDS="" |
134 |
-IUSE="doc +highlight libressl +lua +luajit test" |
135 |
+IUSE="doc +highlight libressl +lua test" |
136 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
137 |
RESTRICT="!test? ( test )" |
138 |
|
139 |
RDEPEND=" |
140 |
@@ -27,10 +29,7 @@ RDEPEND=" |
141 |
highlight? ( || ( dev-python/pygments app-text/highlight ) ) |
142 |
!libressl? ( dev-libs/openssl:0= ) |
143 |
libressl? ( dev-libs/libressl:0= ) |
144 |
- lua? ( |
145 |
- luajit? ( dev-lang/luajit ) |
146 |
- !luajit? ( dev-lang/lua:0 ) |
147 |
- ) |
148 |
+ lua? ( ${LUA_DEPS} ) |
149 |
sys-libs/zlib |
150 |
virtual/httpd-cgi |
151 |
" |
152 |
@@ -42,6 +41,7 @@ DEPEND="${RDEPEND} |
153 |
|
154 |
pkg_setup() { |
155 |
webapp_pkg_setup |
156 |
+ use lua && lua-single_pkg_setup |
157 |
} |
158 |
|
159 |
src_prepare() { |
160 |
@@ -52,11 +52,7 @@ src_prepare() { |
161 |
echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf |
162 |
echo "DESTDIR = ${D}" >> cgit.conf |
163 |
if use lua; then |
164 |
- if use luajit; then |
165 |
- echo "LUA_PKGCONFIG = luajit" >> cgit.conf |
166 |
- else |
167 |
- echo "LUA_PKGCONFIG = lua" >> cgit.conf |
168 |
- fi |
169 |
+ echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf |
170 |
else |
171 |
echo "NO_LUA = 1" >> cgit.conf |
172 |
fi |