1 |
commit: ddf5e438066fd35555faa2e7c867175a3206e095 |
2 |
Author: Aaron Bauman <bman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 7 22:56:56 2021 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 7 22:56:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddf5e438 |
7 |
|
8 |
www-apps/cgit: drop libressl; fix highlight deps; add python stuff |
9 |
|
10 |
* This changes the highlighter explicitly to dev-python/pygments which |
11 |
negates the need to patch bug #574056 |
12 |
* This also depends on python-single-r1 and fixes all py script shebangs |
13 |
* Fix QA issues with || dies |
14 |
* Drop libressl support |
15 |
|
16 |
Closes: https://bugs.gentoo.org/574056 |
17 |
Closes: https://bugs.gentoo.org/656866 |
18 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
19 |
|
20 |
www-apps/cgit/cgit-1.2.3-r200.ebuild | 107 +++++++++++++++++++++++++++++++++++ |
21 |
1 file changed, 107 insertions(+) |
22 |
|
23 |
diff --git a/www-apps/cgit/cgit-1.2.3-r200.ebuild b/www-apps/cgit/cgit-1.2.3-r200.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..3029f760db0 |
26 |
--- /dev/null |
27 |
+++ b/www-apps/cgit/cgit-1.2.3-r200.ebuild |
28 |
@@ -0,0 +1,107 @@ |
29 |
+# Copyright 1999-2021 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=7 |
33 |
+ |
34 |
+LUA_COMPAT=( lua5-{1..2} luajit ) |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_{7..9} ) |
37 |
+ |
38 |
+WEBAPP_MANUAL_SLOT="yes" |
39 |
+ |
40 |
+inherit lua-single python-single-r1 toolchain-funcs webapp |
41 |
+ |
42 |
+[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" |
43 |
+ |
44 |
+GIT_V="2.25.1" |
45 |
+ |
46 |
+DESCRIPTION="a fast web-interface for git repositories" |
47 |
+HOMEPAGE="https://git.zx2c4.com/cgit/about" |
48 |
+SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz |
49 |
+ https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz" |
50 |
+ |
51 |
+LICENSE="GPL-2" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64 ~arm ~x86" |
54 |
+IUSE="doc +highlight +lua test" |
55 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) ${PYTHON_REQUIRED_USE}" |
56 |
+RESTRICT="!test? ( test )" |
57 |
+ |
58 |
+RDEPEND="${PYTHON_DEPS} |
59 |
+ acct-group/cgit |
60 |
+ acct-user/cgit |
61 |
+ dev-libs/openssl:0= |
62 |
+ dev-vcs/git |
63 |
+ highlight? ( |
64 |
+ $(python_gen_cond_dep 'dev-python/pygments[${PYTHON_USEDEP}]' ) |
65 |
+ ) |
66 |
+ lua? ( ${LUA_DEPS} ) |
67 |
+ sys-libs/zlib |
68 |
+ virtual/httpd-cgi |
69 |
+" |
70 |
+# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken |
71 |
+DEPEND="${RDEPEND} |
72 |
+ doc? ( app-text/docbook-xsl-stylesheets |
73 |
+ >=app-text/asciidoc-8.5.1 ) |
74 |
+" |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ webapp_pkg_setup |
78 |
+ use lua && lua-single_pkg_setup |
79 |
+} |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ python_setup |
83 |
+ |
84 |
+ rmdir git || die |
85 |
+ mv "${WORKDIR}"/git-"${GIT_V}" git || die |
86 |
+ |
87 |
+ echo "prefix = ${EPREFIX}/usr" >> cgit.conf || die "echo prefix failed" |
88 |
+ echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf || die "echo libdir failed" |
89 |
+ echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf || die "echo CGIT_SCRIPT_PATH failed" |
90 |
+ echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf || die "echo CGIT_DATA_PATH failed" |
91 |
+ echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf || die "echo CACHE_ROOT failed" |
92 |
+ echo "DESTDIR = ${D}" >> cgit.conf || die "echo DESTDIR failed" |
93 |
+ if use lua; then |
94 |
+ echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf || die "echo LUA_PKGCONFIG failed" |
95 |
+ else |
96 |
+ echo "NO_LUA = 1" >> cgit.conf || die "echo NO_LUA failed" |
97 |
+ fi |
98 |
+ |
99 |
+ eapply_user |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" |
104 |
+ use doc && emake V=1 doc-man |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ webapp_src_preinst |
109 |
+ |
110 |
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" install |
111 |
+ |
112 |
+ insinto /etc |
113 |
+ doins "${FILESDIR}"/cgitrc |
114 |
+ |
115 |
+ dodoc README |
116 |
+ use doc && doman cgitrc.5 |
117 |
+ |
118 |
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt |
119 |
+ webapp_src_install |
120 |
+ |
121 |
+ keepdir "${CGIT_CACHEDIR}" |
122 |
+ fowners ${PN}:${PN} "${CGIT_CACHEDIR}" |
123 |
+ fperms 700 "${CGIT_CACHEDIR}" |
124 |
+ python_fix_shebang . |
125 |
+} |
126 |
+ |
127 |
+src_test() { |
128 |
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test |
129 |
+} |
130 |
+ |
131 |
+pkg_postinst() { |
132 |
+ webapp_pkg_postinst |
133 |
+ ewarn "If you intend to run cgit using web server's user" |
134 |
+ ewarn "you should change ${CGIT_CACHEDIR} permissions." |
135 |
+} |