Antoine Jacoutot said:
> I am OK with this but why don't you use INSTALL_PROGRAM in the 
> MODGO_INSTALL_TARGET then, instead of cp?
> I'd give us more control about the owner/mode no?

The patch below adds this change.  But pkg_create already resets
owner/mode anyway, so I am not sure it is really needed.

FWIW I planned to switch MODGO_INSTALL_TARGET for libraries to
INSTALL_DATA, but I don't think this should be done in this commit.

-- 
Dmitrij D. Czarkoff

Index: lang/go/Makefile
===================================================================
RCS file: /cvs/ports/lang/go/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- lang/go/Makefile    14 Apr 2016 17:43:26 -0000      1.29
+++ lang/go/Makefile    4 May 2016 21:46:35 -0000
@@ -8,6 +8,7 @@ VERSION =               1.5.4
 EXTRACT_SUFX =         .src.tar.gz
 DISTNAME =             go${VERSION}
 PKGNAME =              go-${VERSION}
+REVISION =             0
 CATEGORIES =           lang
 
 HOMEPAGE =             https://golang.org/
@@ -29,6 +30,8 @@ SUBST_VARS =          GOCFG
 
 WRKDIST =              ${WRKDIR}/go
 WRKSRC =               ${WRKDIST}/src
+
+INSTALL_STRIP =
 
 GOOS =                         openbsd
 GOARCH =               unknown
Index: lang/go/go.port.mk
===================================================================
RCS file: /cvs/ports/lang/go/go.port.mk,v
retrieving revision 1.6
diff -u -p -r1.6 go.port.mk
--- lang/go/go.port.mk  28 Feb 2016 13:24:16 -0000      1.6
+++ lang/go/go.port.mk  5 May 2016 08:28:24 -0000
@@ -40,8 +40,9 @@ CATEGORIES +=         lang/go
 MODGO_BUILD_TARGET =   ${MODGO_BUILD_CMD} ${ALL_TARGET}
 MODGO_FLAGS ?=         -x
 
+INSTALL_STRIP =
 .if ${MODGO_TYPE:L:Mbin}
-MODGO_INSTALL_TARGET = cp ${MODGO_WORKSPACE}/bin/* ${PREFIX}/bin
+MODGO_INSTALL_TARGET = ${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/* 
${PREFIX}/bin
 .endif
 
 # Go source files serve the purpose of libraries, so sources should be included
Index: lang/go-bootstrap/Makefile
===================================================================
RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- lang/go-bootstrap/Makefile  4 Dec 2015 17:19:18 -0000       1.1.1.1
+++ lang/go-bootstrap/Makefile  4 May 2016 21:48:19 -0000
@@ -8,6 +8,7 @@ VERSION =               1.4.3
 EXTRACT_SUFX =         .src.tar.gz
 DISTNAME =             go${VERSION}
 PKGNAME =              go-bootstrap-${VERSION}
+REVISION =             0
 CATEGORIES =           lang
 
 HOMEPAGE =             https://golang.org/
@@ -31,6 +32,8 @@ SUBST_VARS =          GOEXE GOCFG
 
 WRKDIST =              ${WRKDIR}/go
 WRKSRC =               ${WRKDIST}/src
+
+INSTALL_STRIP =
 
 GOOS =                         openbsd
 GOARCH =               unknown
Index: net/syncthing/Makefile
===================================================================
RCS file: /cvs/ports/net/syncthing/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- net/syncthing/Makefile      23 Apr 2016 08:02:05 -0000      1.2
+++ net/syncthing/Makefile      4 May 2016 21:51:13 -0000
@@ -34,8 +34,7 @@ do-test:
        cd ${WRKSRC} && ${MODGO_CMD} run build.go test
 
 do-install:
-       # Note: Don't use INSTALL_PROGRAM. It strips, and go hates this.
-       ${INSTALL_SCRIPT} ${WRKSRC}/bin/syncthing ${PREFIX}/bin/
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/syncthing ${PREFIX}/bin/
 .for sec in 1 5 7
        ${INSTALL_MAN} ${WRKSRC}/man/*.${sec} ${PREFIX}/man/man${sec}/
 .endfor
Index: sysutils/terraform/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/terraform/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- sysutils/terraform/Makefile 3 May 2016 16:16:47 -0000       1.4
+++ sysutils/terraform/Makefile 4 May 2016 21:53:15 -0000
@@ -35,9 +35,6 @@ PROVIDERS=            atlas aws azure azurerm chef
 
 PROVISIONERS=          chef file local-exec remote-exec
 
-# prevent stripping go binaries
-INSTALL_STRIP=
-
 post-build:
 .for provider in ${PROVIDERS}
        cd ${WRKSRC} && \

Reply via email to