summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2020-11-27 15:10:46 -0500
committerAaron Bauman <bman@gentoo.org>2020-11-27 15:11:18 -0500
commit0344dd9fa5e6e7c9d59bf3ab65c3c2e5592406c6 (patch)
treeb45e874d7d13a56358da4464352619eaffdbaab9
parentacct-group/cgit: initial commit (diff)
downloadgentoo-0344dd9fa5e6e7c9d59bf3ab65c3c2e5592406c6.tar.gz
gentoo-0344dd9fa5e6e7c9d59bf3ab65c3c2e5592406c6.tar.bz2
gentoo-0344dd9fa5e6e7c9d59bf3ab65c3c2e5592406c6.zip
www-apps/cgit: port EAPI. bump. other stuff
* port to EAPI=7 * port to GLEP 81 * reorder deps * drop unused inherits * fix CC calls during tests Closes: https://bugs.gentoo.org/726074 Signed-off-by: Aaron Bauman <bman@gentoo.org>
-rw-r--r--www-apps/cgit/cgit-1.2.3-r1.ebuild103
-rw-r--r--www-apps/cgit/cgit-9999.ebuild25
-rw-r--r--www-apps/cgit/metadata.xml4
3 files changed, 118 insertions, 14 deletions
diff --git a/www-apps/cgit/cgit-1.2.3-r1.ebuild b/www-apps/cgit/cgit-1.2.3-r1.ebuild
new file mode 100644
index 000000000000..6c5ff88b4c93
--- /dev/null
+++ b/www-apps/cgit/cgit-1.2.3-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WEBAPP_MANUAL_SLOT="yes"
+
+inherit toolchain-funcs webapp
+
+[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/"
+
+GIT_V="2.25.1"
+
+DESCRIPTION="a fast web-interface for git repositories"
+HOMEPAGE="https://git.zx2c4.com/cgit/about"
+SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz
+ https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +highlight libressl +lua +luajit test"
+
+RDEPEND="
+ acct-group/cgit
+ acct-user/cgit
+ dev-vcs/git
+ highlight? ( || ( dev-python/pygments app-text/highlight ) )
+ lua? (
+ luajit? ( dev-lang/luajit )
+ !luajit? ( dev-lang/lua:0 )
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-libs/zlib
+ virtual/httpd-cgi
+"
+# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xsl-stylesheets
+ >=app-text/asciidoc-8.5.1 )
+"
+
+pkg_setup() {
+ webapp_pkg_setup
+}
+
+src_prepare() {
+ rmdir git || die
+ mv "${WORKDIR}"/git-"${GIT_V}" git || die
+
+ echo "prefix = ${EPREFIX}/usr" >> cgit.conf
+ echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf
+ echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf
+ echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf
+ echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf
+ echo "DESTDIR = ${D}" >> cgit.conf
+ if use lua; then
+ if use luajit; then
+ echo "LUA_PKGCONFIG = luajit" >> cgit.conf
+ else
+ echo "LUA_PKGCONFIG = lua" >> cgit.conf
+ fi
+ else
+ echo "NO_LUA = 1" >> cgit.conf
+ fi
+
+ eapply_user
+}
+
+src_compile() {
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+ use doc && emake V=1 doc-man
+}
+
+src_install() {
+ webapp_src_preinst
+
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" install
+
+ insinto /etc
+ doins "${FILESDIR}"/cgitrc
+
+ dodoc README
+ use doc && doman cgitrc.5
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ webapp_src_install
+
+ keepdir "${CGIT_CACHEDIR}"
+ fowners ${PN}:${PN} "${CGIT_CACHEDIR}"
+ fperms 700 "${CGIT_CACHEDIR}"
+}
+
+src_test() {
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ ewarn "If you intend to run cgit using web server's user"
+ ewarn "you should change ${CGIT_CACHEDIR} permissions."
+}
diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-9999.ebuild
index 6c5cb1217c44..c6c843a12c67 100644
--- a/www-apps/cgit/cgit-9999.ebuild
+++ b/www-apps/cgit/cgit-9999.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
WEBAPP_MANUAL_SLOT="yes"
-inherit webapp eutils multilib user toolchain-funcs git-r3
+inherit git-r3 toolchain-funcs webapp
[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/"
@@ -17,18 +17,21 @@ EGIT_REPO_URI="https://git.zx2c4.com/cgit"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="doc +highlight +lua +luajit"
+IUSE="doc +highlight libressl +lua +luajit"
RDEPEND="
+ acct-group/cgit
+ acct-user/cgit
dev-vcs/git
- sys-libs/zlib
- dev-libs/openssl:0
- virtual/httpd-cgi
highlight? ( || ( dev-python/pygments app-text/highlight ) )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
lua? (
luajit? ( dev-lang/luajit )
!luajit? ( dev-lang/lua:0 )
)
+ sys-libs/zlib
+ virtual/httpd-cgi
"
# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken
DEPEND="${RDEPEND}
@@ -38,8 +41,6 @@ DEPEND="${RDEPEND}
pkg_setup() {
webapp_pkg_setup
- enewgroup ${PN}
- enewuser ${PN} -1 -1 -1 ${PN}
}
src_prepare() {
@@ -59,7 +60,7 @@ src_prepare() {
echo "NO_LUA = 1" >> cgit.conf
fi
- epatch_user
+ eapply_user
}
src_compile() {
@@ -86,6 +87,10 @@ src_install() {
fperms 700 "${CGIT_CACHEDIR}"
}
+src_test() {
+ emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test
+}
+
pkg_postinst() {
webapp_pkg_postinst
ewarn "If you intend to run cgit using web server's user"
diff --git a/www-apps/cgit/metadata.xml b/www-apps/cgit/metadata.xml
index 7c228e381512..647683a8f62d 100644
--- a/www-apps/cgit/metadata.xml
+++ b/www-apps/cgit/metadata.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>zx2c4@gentoo.org</email>
- <name>Jason A. Donenfeld</name>
- </maintainer>
<maintainer type="project">
<email>web-apps@gentoo.org</email>
<name>Gentoo Webapps</name>