commit:     0344dd9fa5e6e7c9d59bf3ab65c3c2e5592406c6
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 27 20:10:46 2020 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Fri Nov 27 20:11:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0344dd9f

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 <AT> gentoo.org>

 .../{cgit-9999.ebuild => cgit-1.2.3-r1.ebuild}     | 36 ++++++++++++++--------
 www-apps/cgit/cgit-9999.ebuild                     | 25 +++++++++------
 www-apps/cgit/metadata.xml                         |  4 ---
 3 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-1.2.3-r1.ebuild
similarity index 76%
copy from www-apps/cgit/cgit-9999.ebuild
copy to www-apps/cgit/cgit-1.2.3-r1.ebuild
index 6c5cb1217c4..6c5ff88b4c9 100644
--- a/www-apps/cgit/cgit-9999.ebuild
+++ b/www-apps/cgit/cgit-1.2.3-r1.ebuild
@@ -1,34 +1,39 @@
-# 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 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=""
-EGIT_REPO_URI="https://git.zx2c4.com/cgit";
+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=""
-IUSE="doc +highlight +lua +luajit"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +highlight libressl +lua +luajit test"
 
 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 ) )
        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}
@@ -38,11 +43,12 @@ DEPEND="${RDEPEND}
 
 pkg_setup() {
        webapp_pkg_setup
-       enewgroup ${PN}
-       enewuser ${PN} -1 -1 -1 ${PN}
 }
 
 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
@@ -59,7 +65,7 @@ src_prepare() {
                echo "NO_LUA = 1" >> cgit.conf
        fi
 
-       epatch_user
+       eapply_user
 }
 
 src_compile() {
@@ -86,6 +92,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/cgit-9999.ebuild b/www-apps/cgit/cgit-9999.ebuild
index 6c5cb1217c4..c6c843a12c6 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 7c228e38151..647683a8f62 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>[email protected]</email>
-               <name>Jason A. Donenfeld</name>
-       </maintainer>
        <maintainer type="project">
                <email>[email protected]</email>
                <name>Gentoo Webapps</name>

Reply via email to