Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2017 09:28:41 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r452050 - head/www/gitea
Message-ID:  <201710140928.v9E9SfKd016328@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sat Oct 14 09:28:41 2017
New Revision: 452050
URL: https://svnweb.freebsd.org/changeset/ports/452050

Log:
  Fix version number in resulting binary
  
  Details:
  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.
  
  PR:		222885
  Submitted by:	stb@lassitu.de (maintainer)
  MFH:		2017Q4

Modified:
  head/www/gitea/Makefile

Modified: head/www/gitea/Makefile
==============================================================================
--- head/www/gitea/Makefile	Sat Oct 14 09:11:13 2017	(r452049)
+++ head/www/gitea/Makefile	Sat Oct 14 09:28:41 2017	(r452050)
@@ -3,6 +3,7 @@
 
 PORTNAME=	gitea
 PORTVERSION=	1.1.4
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	www
 
@@ -39,6 +40,15 @@ OPTIONS_DEFAULT=	${OPTIONS_DEFINE}
 CERT_VARS=	GO_TAGS+=cert
 PAM_VARS=	GO_TAGS+=pam
 SQLITE_VARS=	GO_TAGS+=sqlite
+
+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?201710140928.v9E9SfKd016328>