pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/go111 lang/go111: Fix ALTERNATIVES



details:   https://anonhg.NetBSD.org/pkgsrc/rev/49fa3f9a4131
branches:  trunk
changeset: 385387:49fa3f9a4131
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Sat Sep 22 12:15:28 2018 +0000

description:
lang/go111: Fix ALTERNATIVES

- Install versioned commands in bin/
- Use ALTERNATIVES to create commands without version suffix

diffstat:

 lang/go111/ALTERNATIVES |  4 ++--
 lang/go111/Makefile     |  8 +++++++-
 lang/go111/PLIST        |  4 +++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r 5b7d61203302 -r 49fa3f9a4131 lang/go111/ALTERNATIVES
--- a/lang/go111/ALTERNATIVES   Sat Sep 22 11:30:23 2018 +0000
+++ b/lang/go111/ALTERNATIVES   Sat Sep 22 12:15:28 2018 +0000
@@ -1,2 +1,2 @@
-bin/go111 @PREFIX@/go111/bin/go
-bin/gofmt111 @PREFIX@/go111/bin/gofmt
+bin/go @PREFIX@/go111/bin/go
+bin/gofmt @PREFIX@/go111/bin/gofmt
diff -r 5b7d61203302 -r 49fa3f9a4131 lang/go111/Makefile
--- a/lang/go111/Makefile       Sat Sep 22 11:30:23 2018 +0000
+++ b/lang/go111/Makefile       Sat Sep 22 12:15:28 2018 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2018/09/18 16:22:14 bsiegert Exp $
+# $NetBSD: Makefile,v 1.2 2018/09/22 12:15:28 minskim Exp $
 
 .include "../../lang/go/version.mk"
 
 DISTNAME=      go${GO111_VERSION}.src
 PKGNAME=       go111-${GO111_VERSION}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  https://storage.googleapis.com/golang/
 EXTRACT_USING= bsdtar
@@ -87,6 +88,8 @@
 BUILD_DEPENDS+=                go14-1.4*:../../lang/go14
 GOROOT_BOOTSTRAP=      ${PREFIX}/go14
 
+PLIST_SUBST+=  GOVERSSUFFIX=${GOVERSSUFFIX}
+
 .include "../../mk/bsd.prefs.mk"
 
 PLIST_VARS+=   pty route
@@ -108,6 +111,9 @@
        cd ${WRKSRC} && rm -rf .hgignore .hgtags pkg/obj
        cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX}
        find ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} -name \*.orig -exec rm {} \;
+.for cmd in go gofmt
+       ${LN} -s ${PREFIX}/go111/bin/${cmd} ${DESTDIR}${PREFIX}/bin/${cmd}${GOVERSSUFFIX}
+.endfor
 
 do-test:
        cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner ""
diff -r 5b7d61203302 -r 49fa3f9a4131 lang/go111/PLIST
--- a/lang/go111/PLIST  Sat Sep 22 11:30:23 2018 +0000
+++ b/lang/go111/PLIST  Sat Sep 22 12:15:28 2018 +0000
@@ -1,4 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2018/09/19 17:59:35 minskim Exp $
+@comment $NetBSD: PLIST,v 1.3 2018/09/22 12:15:28 minskim Exp $
+bin/go${GOVERSSUFFIX}
+bin/gofmt${GOVERSSUFFIX}
 go111/AUTHORS
 go111/CONTRIBUTING.md
 go111/CONTRIBUTORS



Home | Main Index | Thread Index | Old Index