From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA38B13835A for ; Thu, 16 Jul 2020 14:39:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23D00E0841; Thu, 16 Jul 2020 14:39:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE542E0844 for ; Thu, 16 Jul 2020 14:39:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2372C34F031 for ; Thu, 16 Jul 2020 14:39:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BA502E3 for ; Thu, 16 Jul 2020 14:39:06 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1594910321.80f55aa072437aeeea95b359fa9982115471be99.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-apps/gitea/gitea-9999.ebuild X-VCS-Directories: www-apps/gitea/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 80f55aa072437aeeea95b359fa9982115471be99 X-VCS-Branch: master Date: Thu, 16 Jul 2020 14:39:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5b8e5b47-b1a1-4661-9fb3-b7eac454c162 X-Archives-Hash: a5164a036edee1bd4dd57f1a7bde7d28 commit: 80f55aa072437aeeea95b359fa9982115471be99 Author: Pierre-Olivier Mercier nemunai re> AuthorDate: Wed Jun 10 15:06:14 2020 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Thu Jul 16 14:38:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f55aa0 www-apps/gitea: sync -9999 ebuild Suggested-by: William Hubbs gentoo.org> Closes: https://bugs.gentoo.org/725000 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Pierre-Olivier Mercier nemunai.re> Signed-off-by: Joonas Niilola gentoo.org> www-apps/gitea/gitea-9999.ebuild | 105 ++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 63 deletions(-) diff --git a/www-apps/gitea/gitea-9999.ebuild b/www-apps/gitea/gitea-9999.ebuild index 0d1559ca4a3..672af6461ca 100644 --- a/www-apps/gitea/gitea-9999.ebuild +++ b/www-apps/gitea/gitea-9999.ebuild @@ -2,70 +2,42 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 - -if [[ ${PV} != 9999* ]] ; then - SCM="golang-vcs-snapshot" -else - SCM="git-r3" -fi - -inherit fcaps golang-base tmpfiles systemd ${SCM} -unset SCM - -EGO_PN="code.gitea.io/gitea" +inherit fcaps go-module tmpfiles systemd +MY_PV="${PV/_rc/-rc}" DESCRIPTION="A painless self-hosted Git service" HOMEPAGE="https://gitea.io" if [[ ${PV} != 9999* ]] ; then - SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz" + SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm ~arm64" + S="${WORKDIR}" else EGIT_REPO_URI="https://github.com/go-gitea/gitea" - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" - has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror" + inherit git-r3 + S="${WORKDIR}/${P}" fi LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" SLOT="0" IUSE="+acct pam sqlite" -BDEPEND="dev-lang/go - >=net-libs/nodejs-10[npm]" -DEPEND="pam? ( sys-libs/pam )" -RDEPEND="${DEPEND} +BDEPEND=">=net-libs/nodejs-10[npm]" +COMMON_DEPEND=" acct? ( acct-group/git - acct-user/git[gitea] - ) + acct-user/git[gitea] ) + pam? ( sys-libs/pam )" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND} dev-vcs/git" -DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) -FILECAPS=( cap_net_bind_service+ep usr/bin/gitea ) -S="${WORKDIR}/${P}/src/${EGO_PN}" - -PATCHES=( "${FILESDIR}/gitea-logflags.patch" ) - -gitea_make() { - local gitea_tags=( - bindata - $(usev pam) - $(usex sqlite 'sqlite sqlite_unlock_notify' '') - ) - local gitea_settings=( - "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini" - "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom" - "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea" - ) - local makeenv=( - TAGS="${gitea_tags[@]}" - LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}" - GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" - ) - [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}") - - env "${makeenv[@]}" emake -j1 "$@" -} +DOCS=( + custom/conf/app.ini.sample CONTRIBUTING.md README.md +) +FILECAPS=( + cap_net_bind_service+ep usr/bin/gitea +) src_prepare() { default @@ -89,27 +61,34 @@ src_prepare() { sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die fi - # Remove already build assets (like frontend part) - gitea_make clean-all -} + einfo "Remove tests which are known to fail with network-sandbox enabled." + rm ./modules/migrations/github_test.go || die -src_compile() { - gitea_make build + einfo "Remove tests which depend on gitea git-repo." + rm ./modules/git/blob_test.go || die + rm ./modules/git/repo_test.go || die } -src_test() { - if has network-sandbox ${FEATURES}; then - einfo "Remove tests which are known to fail with network-sandbox enabled." - rm ./modules/migrations/github_test.go || die - fi - - if [[ ${PV} != 9999* ]] ; then - einfo "Remove tests which depend on gitea git-repo." - rm ./modules/git/blob_test.go || die - rm ./modules/git/repo_test.go || die - fi +src_compile() { + local gitea_tags=( + bindata + $(usev pam) + $(usex sqlite 'sqlite sqlite_unlock_notify' '') + ) + local gitea_settings=( + "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini" + "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom" + "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea" + ) + local makeenv=( + TAGS="${gitea_tags[@]}" + LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}" + ) + [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}") - default + # -j1 as Makefile doesn't handle dependancy correctly, and is not + # useful as golang compiler don't use this info. + env "${makeenv[@]}" emake -j1 build } src_install() {