Tue Jun 14 18:41:44 2022 UTC ()
go118: make print-PLIST work without manual fixups

Add some PRINT_PLIST_AWK statements to do the standard transformations
that I used to do by hand. With this change, "make print-PLIST" outputs
the correct PLIST without a need for manually fixing some lines.


(bsiegert)
diff -r1.1 -r1.2 pkgsrc/lang/go118/Makefile

cvs diff -r1.1 -r1.2 pkgsrc/lang/go118/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/go118/Makefile 2022/03/15 20:13:45 1.1
+++ pkgsrc/lang/go118/Makefile 2022/06/14 18:41:44 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.1 2022/03/15 20:13:45 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.2 2022/06/14 18:41:44 bsiegert Exp $
2 2
3.include "../../lang/go/version.mk" 3.include "../../lang/go/version.mk"
4.include "../../lang/go/bootstrap.mk" 4.include "../../lang/go/bootstrap.mk"
5 5
6GOVERSSUFFIX= 118 6GOVERSSUFFIX= 118
7 7
8DISTNAME= go${GO${GOVERSSUFFIX}_VERSION:S/.rc/rc/}.src 8DISTNAME= go${GO${GOVERSSUFFIX}_VERSION:S/.rc/rc/}.src
9PKGNAME= go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION} 9PKGNAME= go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION}
10CATEGORIES= lang 10CATEGORIES= lang
11MASTER_SITES= https://storage.googleapis.com/golang/ 11MASTER_SITES= https://storage.googleapis.com/golang/
12 12
13MAINTAINER= bsiegert@NetBSD.org 13MAINTAINER= bsiegert@NetBSD.org
14HOMEPAGE= https://golang.org/ 14HOMEPAGE= https://golang.org/
@@ -82,26 +82,31 @@ SUBST_SED.grplist= -e 's,return getgroup @@ -82,26 +82,31 @@ SUBST_SED.grplist= -e 's,return getgroup
82 82
83PLIST_SUBST+= GOVERSSUFFIX=${GOVERSSUFFIX} 83PLIST_SUBST+= GOVERSSUFFIX=${GOVERSSUFFIX}
84 84
85PLIST_VARS+= pty route 85PLIST_VARS+= pty route
86 86
87.if ${OPSYS} != "SunOS" 87.if ${OPSYS} != "SunOS"
88PLIST.pty= yes 88PLIST.pty= yes
89.endif 89.endif
90 90
91.if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS" 91.if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS"
92PLIST.route= yes 92PLIST.route= yes
93.endif 93.endif
94 94
 95PRINT_PLIST_AWK+= /^bin\/go${GOVERSSUFFIX}/ { print "bin/go$${GOVERSSUFFIX}"; next; }
 96PRINT_PLIST_AWK+= /^bin\/gofmt${GOVERSSUFFIX}/ { print "bin/gofmt$${GOVERSSUFFIX}"; next; }
 97PRINT_PLIST_AWK+= /internal\/pty\.a/ { printf "%s", "$${PLIST.pty}"; }
 98PRINT_PLIST_AWK+= /x\/net\/route\.a/ { printf "%s", "$${PLIST.route}"; }
 99
95post-extract: 100post-extract:
96 ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836* 101 ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836*
97 102
98do-build: 103do-build:
99 cd ${WRKSRC}/src && \ 104 cd ${WRKSRC}/src && \
100 env \ 105 env \
101 GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \ 106 GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \
102 GOROOT_FINAL=${GOROOT_FINAL:Q} \ 107 GOROOT_FINAL=${GOROOT_FINAL:Q} \
103 ${GOOPT} \ 108 ${GOOPT} \
104 GOCACHE=${WRKDIR}/.cache/go-build \ 109 GOCACHE=${WRKDIR}/.cache/go-build \
105 ${BASH} ./make.bash 110 ${BASH} ./make.bash
106# for RELRO build: 111# for RELRO build:
107# cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash 112# cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash