pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Some updates for module-based Go builds.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Sun Jan 19 20:38:12 2020 +0100
Changeset:	a5ddfbd8e548ebafdc829b233f93221fb2f3048f

Modified Files:
	go/go-package.mk
	lf/Makefile
	lf/distinfo
Added Files:
	lf/TODO

Log Message:
Some updates for module-based Go builds.

Update lf to r13 as a testbed for making module support work.

Here is what works:

- building a Go module without external dependencies
- "make patch && make show-go-modules" shows a list of dependency
  files.

What does not:

- adding the lines from "make show-go-modules" to the Makefile does
  nothing.
- "make stage-install" does not do the right thing.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a5ddfbd8e548ebafdc829b233f93221fb2f3048f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 go/go-package.mk | 14 ++++++++------
 lf/Makefile      | 13 +++++++------
 lf/TODO          |  2 ++
 lf/distinfo      |  8 ++++----
 4 files changed, 21 insertions(+), 16 deletions(-)

diffs:
diff --git a/go/go-package.mk b/go/go-package.mk
index 77bfe3c4d5..fb24524ddc 100644
--- a/go/go-package.mk
+++ b/go/go-package.mk
@@ -53,12 +53,12 @@
 
 .include "../../lang/go/version.mk"
 
-_GO_DIST_BASE!=		basename ${GO_SRCPATH}
-GO_DIST_BASE?=		${_GO_DIST_BASE}
-
 .if !empty(GO_MODULE:M[Yy][Ee][Ss])
 GO_BUILD_PATTERN?=	...
 .else
+_GO_DIST_BASE!=		basename ${GO_SRCPATH}
+GO_DIST_BASE?=		${_GO_DIST_BASE}
+
 GO_BUILD_PATTERN?=	${GO_SRCPATH}/...
 WRKSRC=			${WRKDIR}/src/${GO_SRCPATH}
 .endif
@@ -75,7 +75,8 @@ PRINT_PLIST_AWK+=	/^@pkgdir bin$$/ { next; }
 PRINT_PLIST_AWK+=	/^@pkgdir gopkg$$/ { next; }
 
 .if !empty(GO_MODULE:M[Yy][Ee][Ss])
-MAKE_ENV+=	GO111MODULE=on GOPATH=${WRKDIR}/.gopath GOPROXY=file://${WRKDIR}/.gopath/pkg/mod/
+MAKE_ENV+=	GO111MODULE=on GOPATH=${WRKDIR}/.gopath
+# GOPROXY=file://${WRKDIR}/.gopath/pkg/mod/cache/download
 .else
 MAKE_ENV+=	GO111MODULE=off GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg 
 .endif
@@ -107,8 +108,9 @@ do-install:
 .if !empty(GO_MODULE:M[Yy][Ee][Ss])
 .PHONY: show-go-modules
 show-go-modules:
-	cd ${WRKSRC} && ${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} get -d
-	cd ${WRKDIR}/.gopath/pkg/mod && ${RUN} ${FIND} . | ${SED} -e 's/\.\//GO_MODULE_FILES+=	/'
+	# cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} env
+	${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} get -d
+	${RUN} cd ${WRKDIR}/.gopath/pkg/mod/cache/download && ${FIND} . -type f | ${SED} -e 's/\.\//GO_MODULE_FILES+=	/'
 .endif
 
 _VARGROUPS+=		go
diff --git a/lf/Makefile b/lf/Makefile
index db20095eb3..17887e4a50 100644
--- a/lf/Makefile
+++ b/lf/Makefile
@@ -1,19 +1,20 @@
 # $NetBSD: Makefile,v 1.22 2020/01/10 13:32:18 bsiegert Exp $
 #
 
-DISTNAME=		lf-20180302
-PKGREVISION=		14
+DISTNAME=		lf-13
 CATEGORIES=		sysutils
 MASTER_SITES=		${MASTER_SITE_GITHUB:=gokcehan/}
-GITHUB_TAG=		c3f4aa5
+GITHUB_TAG=		r13
 
 HOMEPAGE=		https://${GO_SRCPATH}
 COMMENT=		Terminal file manager
 LICENSE=		2-clause-bsd
 
-GO_SRCPATH=		github.com/gokcehan/lf
-GO_DIST_BASE=		${GITHUB_PROJECT}-${GITHUB_TAG}*
+#GO_SRCPATH=		github.com/gokcehan/lf
+# GO_DIST_BASE=		${GITHUB_PROJECT}-${GITHUB_TAG}*
+
+GO_MODULE=		yes
 
 .include "../../devel/go-termbox/buildlink3.mk"
-.include "../../lang/go/go-package.mk"
+.include "../../wip/go/go-package.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/lf/TODO b/lf/TODO
new file mode 100644
index 0000000000..efee3e243b
--- /dev/null
+++ b/lf/TODO
@@ -0,0 +1,2 @@
+Installing this package does not work yet, since it uses a module-based
+build. It is a testbed for making module-based builds work.
diff --git a/lf/distinfo b/lf/distinfo
index d9649bd800..22fe3f8633 100644
--- a/lf/distinfo
+++ b/lf/distinfo
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.2 2018/03/14 08:46:23 bsiegert Exp $
 
-SHA1 (lf-20180302-c3f4aa5.tar.gz) = 12e67cb9101d2da54919341efe4f09d5c6e6b919
-RMD160 (lf-20180302-c3f4aa5.tar.gz) = 3f2762fa91d01df14e083a6a407977876d17ccc3
-SHA512 (lf-20180302-c3f4aa5.tar.gz) = fa3d89adc9b2666345fd0c4ac285db9f62bbe8ed4c7f7aedd7767ced64cc4038b6fc57f392d2a27029e805405ae0f0b21a05e2092a478b7a041c92f272e48fe5
-Size (lf-20180302-c3f4aa5.tar.gz) = 37753 bytes
+SHA1 (lf-13.tar.gz) = 0ac58823fbaef505c98f32d478a64100e5191cd1
+RMD160 (lf-13.tar.gz) = d542305b5a26090262304d5f330145b4926ba319
+SHA512 (lf-13.tar.gz) = 67c0fdbf7dc86a3856a0dce9fb8ed38f1a4c8a66a8ae051887b4aa6ddcbd086a748124cae804f4a051e20efcffb1cd847611b400c54143a79587ce4561a938c0
+Size (lf-13.tar.gz) = 67064 bytes


Home | Main Index | Thread Index | Old Index