Date: Mon, 23 Sep 2019 22:57:28 +0000 (UTC) From: Dmitri Goutnik <dmgk@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r512686 - head/www/gitea Message-ID: <201909232257.x8NMvS82055469@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dmgk Date: Mon Sep 23 22:57:28 2019 New Revision: 512686 URL: https://svnweb.freebsd.org/changeset/ports/512686 Log: www/gitea: Use linker flags to set version instead of patching the source. PR: 240744 Submitted by: stb@lassitu.de (maintainer) Reported by: Ivan <bsd@abinet.ru> Approved by: araujo (mentor) Differential Revision: https://reviews.freebsd.org/D21771 Modified: head/www/gitea/Makefile Modified: head/www/gitea/Makefile ============================================================================== --- head/www/gitea/Makefile Mon Sep 23 22:56:21 2019 (r512685) +++ head/www/gitea/Makefile Mon Sep 23 22:57:28 2019 (r512686) @@ -4,6 +4,7 @@ PORTNAME= gitea DISTVERSIONPREFIX= v DISTVERSION= 1.9.3 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= stb@lassitu.de @@ -19,7 +20,7 @@ USE_GITHUB= yes GH_ACCOUNT= go-gitea USE_RC_SUBR= gitea -GO_BUILDFLAGS= -tags "${GO_TAGS}" +GO_BUILDFLAGS= -tags "${GO_TAGS}" -ldflags '-X "main.Version=${PORTVERSION}"' SUB_FILES+= app.ini.sample SUB_LIST+= GITUSER=${USERS} @@ -46,15 +47,6 @@ DAEMONARGS= -f .endif SUB_LIST+= DAEMONARGS="${DAEMONARGS}" - -post-patch: - # Gitea releases don't supply the release version number; the - # automatic method to obtain the version number in the Gitea build - # system only works when sources are checked out from git. - # See https://github.com/go-gitea/gitea/issues/1136#issuecomment-311622745 - @${SED} -Ei .orig \ - -e 's#^(var Version = )"[^"]+"#\1"${PORTVERSION}"#' \ - ${GO_WRKSRC}/main.go do-install: ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909232257.x8NMvS82055469>