pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/go
Module Name: pkgsrc
Committed By: leot
Date: Fri Oct 26 13:49:23 UTC 2018
Modified Files:
pkgsrc/lang/go: go-package.mk version.mk
Log Message:
go: Improve PRINT_PLIST_AWK patterns and avoid possible double definition
- Move GO_PLATFORM definition in lang/go/version.mk in order that also lang/go*
packages can (re)use it
- Change PRINT_PLIST_AWK pattern that replace all ${GO_PLATFORM} and apply it
only when ${GO_PLATFORM} is a directory (between two "/"). There are only
3 exceptions to that in lang/go14.
Move it to version.mk so lang/go* PLIST can be mostly automatically
generated.
These changes should help to avoid (most) manual editing of
lang/go*/PLIST.
Discussed with and thanks to <bsiegert>!
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/lang/go/go-package.mk
cvs rdiff -u -r1.46 -r1.47 pkgsrc/lang/go/version.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/go/go-package.mk
diff -u pkgsrc/lang/go/go-package.mk:1.19 pkgsrc/lang/go/go-package.mk:1.20
--- pkgsrc/lang/go/go-package.mk:1.19 Sun Oct 14 18:15:34 2018
+++ pkgsrc/lang/go/go-package.mk Fri Oct 26 13:49:23 2018
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.19 2018/10/14 18:15:34 bsiegert Exp $
+# $NetBSD: go-package.mk,v 1.20 2018/10/26 13:49:23 leot Exp $
#
# This file implements common logic for compiling Go programs in pkgsrc.
#
@@ -62,12 +62,8 @@ USE_TOOLS+= pax
BUILD_DEPENDS+= ${GO_PACKAGE_DEP}
-GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH}
GOTOOLDIR= go${GOVERSSUFFIX}/pkg/tool/${GO_PLATFORM}
-PRINT_PLIST_AWK+= /${GO_PLATFORM}/ { gsub(/${GO_PLATFORM}/, \
- "$${GO_PLATFORM}"); \
- print; next; }
PRINT_PLIST_AWK+= /^@pkgdir bin$$/ { next; }
PRINT_PLIST_AWK+= /^@pkgdir gopkg$$/ { next; }
Index: pkgsrc/lang/go/version.mk
diff -u pkgsrc/lang/go/version.mk:1.46 pkgsrc/lang/go/version.mk:1.47
--- pkgsrc/lang/go/version.mk:1.46 Tue Oct 2 18:19:56 2018
+++ pkgsrc/lang/go/version.mk Fri Oct 26 13:49:23 2018
@@ -1,4 +1,4 @@
-# $NetBSD: version.mk,v 1.46 2018/10/02 18:19:56 bsiegert Exp $
+# $NetBSD: version.mk,v 1.47 2018/10/26 13:49:23 leot Exp $
SSP_SUPPORTED= no
@@ -44,5 +44,8 @@ GOOPT= GOARM=6
.elif ${MACHINE_ARCH} == "earmv7hf"
GOOPT= GOARM=7
.endif
-PLIST_SUBST+= GO_PLATFORM=${LOWER_OPSYS:Q}_${GOARCH:Q} GOARCH=${GOARCH:Q}
+GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH}
+PLIST_SUBST+= GO_PLATFORM=${GO_PLATFORM:Q} GOARCH=${GOARCH:Q}
PLIST_SUBST+= GOCHAR=${GOCHAR:Q}
+
+PRINT_PLIST_AWK+= { sub("/${GO_PLATFORM}/", "/$${GO_PLATFORM}/") }
Home |
Main Index |
Thread Index |
Old Index