MFH: r528631 r528729

www/gitea: Use OPTIONS_SUB

gitea: Update to 1.11.3

This release fixes three bugs.

Release notes: https://blog.gitea.io/2020/03/gitea-1.11.3-and-1.10.6-released/

Also fix LDFLAGS so that the version number (among other things) is built into
the binary correctly, and make the regexp used in the Makefile work with
bsdgrep (both thanks to adamw).

Will MFH due to bsdgrep build failure and stopwatch panic fix.

PR:		244898
Submitted by:	maintainer

Approved by:	portmgr (with hat)
This commit is contained in:
Adam Weinberger 2020-03-19 16:18:47 +00:00
parent bbd40a75e5
commit 9062b34334
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q1/; revision=528731
4 changed files with 2714 additions and 2698 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= gitea
DISTVERSIONPREFIX= v
DISTVERSION= 1.11.2
DISTVERSION= 1.11.3
CATEGORIES= www
MASTER_SITES= https://github.com/go-gitea/gitea/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
DISTNAME= gitea-src-${DISTVERSION}
@ -28,6 +28,7 @@ GROUPS= git
OPTIONS_DEFINE= BINDATA PAM SQLITE
OPTIONS_DEFAULT= PAM SQLITE
OPTIONS_SUB= yes
BINDATA_DESC= Build a single monolithic binary, with all assets included
PAM_DESC= Enable support for PAM
@ -38,13 +39,6 @@ SQLITE_VARS= GO_TAGS+="sqlite sqlite_unlock_notify"
.include <bsd.port.options.mk>
# active option removes files from plist
.if ${PORT_OPTIONS:MBINDATA}
PLIST_SUB+= BINDATA="@comment "
.else
PLIST_SUB+= BINDATA=""
.endif
.if ${OPSYS} == FreeBSD
DAEMONARGS= -S -l \$${gitea_facility} -s \$${gitea_priority} -T \$${name}
.else
@ -53,11 +47,13 @@ DAEMONARGS= -f
SUB_LIST+= DAEMONARGS="${DAEMONARGS}"
SSP_UNSAFE= true
# use sane defaults for path, overriden with actual PREFIX in start script
EXTRA_LDFLAGS= -X code.gitea.io/gitea/modules/setting.CustomPath=${PREFIX}/etc/gitea
EXTRA_LDFLAGS+= -X code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}/share/gitea
# Default LDFLAGS are incompatible with build
MAKE_ARGS= GOPATH=${WRKDIR} TAGS="${GO_TAGS}" LDFLAGS="${EXTRA_LDFLAGS}"
MAKE_ENV= LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
MAKE_ARGS= GOPATH=${WRKDIR} TAGS="${GO_TAGS}"
ALL_TARGET= backend
MAKE_JOBS_UNSAFE= yes

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1583582463
SHA256 (gitea-src-1.11.2.tar.gz) = 777ad27929809811e17e2d0a539d2a47163e382473cefa680debcb0777aa2cba
SIZE (gitea-src-1.11.2.tar.gz) = 69381797
TIMESTAMP = 1584565552
SHA256 (gitea-src-1.11.3.tar.gz) = 5d0b31295788cc81d9f0033d00e509b6798ffeef0b603c4e1360e1762f3b11ec
SIZE (gitea-src-1.11.3.tar.gz) = 69382786

View File

@ -0,0 +1,20 @@
--- Makefile.orig 2020-03-06 17:18:36.000000000 +0000
+++ Makefile 2020-03-18 20:56:00.588102000 +0000
@@ -123,7 +123,7 @@
.PHONY: go-check
go-check:
- $(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');))
+ $(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | bsdgrep -Eo 'go[0-9\.]+' | tr -d go | tr '.' ' ');))
@if [ "$(GO_VERSION)" -lt "001011000" ]; then \
echo "Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/"; \
exit 1; \
@@ -138,7 +138,7 @@
.PHONY: node-check
node-check:
- $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');))
+ $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+\.?[0-9]+' | tr '.' ' ');))
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
@if [ "$(NODE_VERSION)" -lt "010000000" -o "$(NPM_MISSING)" = "1" ]; then \
echo "Gitea requires Node.js 10.0.0 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \

File diff suppressed because it is too large Load Diff